Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: meson: enable building drivers as modules

Enable SoC drivers for 64-bit Amlogic SoCs to be built as modules.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>

+20 -8
+4 -4
drivers/soc/amlogic/Kconfig
··· 9 9 Say yes to support the canvas IP for Amlogic SoCs. 10 10 11 11 config MESON_CLK_MEASURE 12 - bool "Amlogic Meson SoC Clock Measure driver" 12 + tristate "Amlogic Meson SoC Clock Measure driver" 13 13 depends on ARCH_MESON || COMPILE_TEST 14 14 default ARCH_MESON 15 15 select REGMAP_MMIO ··· 27 27 information about the type, package and version. 28 28 29 29 config MESON_GX_PM_DOMAINS 30 - bool "Amlogic Meson GX Power Domains driver" 30 + tristate "Amlogic Meson GX Power Domains driver" 31 31 depends on ARCH_MESON || COMPILE_TEST 32 32 depends on PM && OF 33 33 default ARCH_MESON ··· 38 38 Generic Power Domains. 39 39 40 40 config MESON_EE_PM_DOMAINS 41 - bool "Amlogic Meson Everything-Else Power Domains driver" 41 + tristate "Amlogic Meson Everything-Else Power Domains driver" 42 42 depends on ARCH_MESON || COMPILE_TEST 43 43 depends on PM && OF 44 44 default ARCH_MESON ··· 49 49 Generic Power Domains. 50 50 51 51 config MESON_SECURE_PM_DOMAINS 52 - bool "Amlogic Meson Secure Power Domains driver" 52 + tristate "Amlogic Meson Secure Power Domains driver" 53 53 depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM 54 54 depends on PM && OF 55 55 depends on HAVE_ARM_SMCCC
+4 -1
drivers/soc/amlogic/meson-clk-measure.c
··· 10 10 #include <linux/seq_file.h> 11 11 #include <linux/debugfs.h> 12 12 #include <linux/regmap.h> 13 + #include <linux/module.h> 13 14 14 15 static DEFINE_MUTEX(measure_lock); 15 16 ··· 682 681 }, 683 682 { /* sentinel */ } 684 683 }; 684 + MODULE_DEVICE_TABLE(of, meson_msr_match_table); 685 685 686 686 static struct platform_driver meson_msr_driver = { 687 687 .probe = meson_msr_probe, ··· 691 689 .of_match_table = meson_msr_match_table, 692 690 }, 693 691 }; 694 - builtin_platform_driver(meson_msr_driver); 692 + module_platform_driver(meson_msr_driver); 693 + MODULE_LICENSE("GPL v2");
+4 -1
drivers/soc/amlogic/meson-ee-pwrc.c
··· 14 14 #include <linux/reset-controller.h> 15 15 #include <linux/reset.h> 16 16 #include <linux/clk.h> 17 + #include <linux/module.h> 17 18 #include <dt-bindings/power/meson8-power.h> 18 19 #include <dt-bindings/power/meson-axg-power.h> 19 20 #include <dt-bindings/power/meson-g12a-power.h> ··· 603 602 }, 604 603 { /* sentinel */ } 605 604 }; 605 + MODULE_DEVICE_TABLE(of, meson_ee_pwrc_match_table); 606 606 607 607 static struct platform_driver meson_ee_pwrc_driver = { 608 608 .probe = meson_ee_pwrc_probe, ··· 613 611 .of_match_table = meson_ee_pwrc_match_table, 614 612 }, 615 613 }; 616 - builtin_platform_driver(meson_ee_pwrc_driver); 614 + module_platform_driver(meson_ee_pwrc_driver); 615 + MODULE_LICENSE("GPL v2");
+4 -1
drivers/soc/amlogic/meson-gx-pwrc-vpu.c
··· 14 14 #include <linux/of_device.h> 15 15 #include <linux/reset.h> 16 16 #include <linux/clk.h> 17 + #include <linux/module.h> 17 18 18 19 /* AO Offsets */ 19 20 ··· 365 364 }, 366 365 { /* sentinel */ } 367 366 }; 367 + MODULE_DEVICE_TABLE(of, meson_gx_pwrc_vpu_match_table); 368 368 369 369 static struct platform_driver meson_gx_pwrc_vpu_driver = { 370 370 .probe = meson_gx_pwrc_vpu_probe, ··· 375 373 .of_match_table = meson_gx_pwrc_vpu_match_table, 376 374 }, 377 375 }; 378 - builtin_platform_driver(meson_gx_pwrc_vpu_driver); 376 + module_platform_driver(meson_gx_pwrc_vpu_driver); 377 + MODULE_LICENSE("GPL v2");
+4 -1
drivers/soc/amlogic/meson-secure-pwrc.c
··· 13 13 #include <dt-bindings/power/meson-a1-power.h> 14 14 #include <linux/arm-smccc.h> 15 15 #include <linux/firmware/meson/meson_sm.h> 16 + #include <linux/module.h> 16 17 17 18 #define PWRC_ON 1 18 19 #define PWRC_OFF 0 ··· 194 193 }, 195 194 { /* sentinel */ } 196 195 }; 196 + MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table); 197 197 198 198 static struct platform_driver meson_secure_pwrc_driver = { 199 199 .probe = meson_secure_pwrc_probe, ··· 203 201 .of_match_table = meson_secure_pwrc_match_table, 204 202 }, 205 203 }; 206 - builtin_platform_driver(meson_secure_pwrc_driver); 204 + module_platform_driver(meson_secure_pwrc_driver); 205 + MODULE_LICENSE("Dual MIT/GPL");