Skip to content

Commit

Permalink
soc: meson: enable building drivers as modules
Browse files Browse the repository at this point in the history
Enable SoC drivers for 64-bit Amlogic SoCs to be built as modules.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
  • Loading branch information
Kevin Hilman committed Oct 26, 2020
1 parent 5d2fc13 commit d9da178
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/soc/amlogic/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config MESON_CANVAS
Say yes to support the canvas IP for Amlogic SoCs.

config MESON_CLK_MEASURE
bool "Amlogic Meson SoC Clock Measure driver"
tristate "Amlogic Meson SoC Clock Measure driver"
depends on ARCH_MESON || COMPILE_TEST
default ARCH_MESON
select REGMAP_MMIO
Expand All @@ -27,7 +27,7 @@ config MESON_GX_SOCINFO
information about the type, package and version.

config MESON_GX_PM_DOMAINS
bool "Amlogic Meson GX Power Domains driver"
tristate "Amlogic Meson GX Power Domains driver"
depends on ARCH_MESON || COMPILE_TEST
depends on PM && OF
default ARCH_MESON
Expand All @@ -38,7 +38,7 @@ config MESON_GX_PM_DOMAINS
Generic Power Domains.

config MESON_EE_PM_DOMAINS
bool "Amlogic Meson Everything-Else Power Domains driver"
tristate "Amlogic Meson Everything-Else Power Domains driver"
depends on ARCH_MESON || COMPILE_TEST
depends on PM && OF
default ARCH_MESON
Expand All @@ -49,7 +49,7 @@ config MESON_EE_PM_DOMAINS
Generic Power Domains.

config MESON_SECURE_PM_DOMAINS
bool "Amlogic Meson Secure Power Domains driver"
tristate "Amlogic Meson Secure Power Domains driver"
depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
depends on PM && OF
depends on HAVE_ARM_SMCCC
Expand Down
5 changes: 4 additions & 1 deletion drivers/soc/amlogic/meson-clk-measure.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/seq_file.h>
#include <linux/debugfs.h>
#include <linux/regmap.h>
#include <linux/module.h>

static DEFINE_MUTEX(measure_lock);

Expand Down Expand Up @@ -681,6 +682,7 @@ static const struct of_device_id meson_msr_match_table[] = {
},
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, meson_msr_match_table);

static struct platform_driver meson_msr_driver = {
.probe = meson_msr_probe,
Expand All @@ -689,4 +691,5 @@ static struct platform_driver meson_msr_driver = {
.of_match_table = meson_msr_match_table,
},
};
builtin_platform_driver(meson_msr_driver);
module_platform_driver(meson_msr_driver);
MODULE_LICENSE("GPL v2");
5 changes: 4 additions & 1 deletion drivers/soc/amlogic/meson-ee-pwrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/reset-controller.h>
#include <linux/reset.h>
#include <linux/clk.h>
#include <linux/module.h>
#include <dt-bindings/power/meson8-power.h>
#include <dt-bindings/power/meson-axg-power.h>
#include <dt-bindings/power/meson-g12a-power.h>
Expand Down Expand Up @@ -602,6 +603,7 @@ static const struct of_device_id meson_ee_pwrc_match_table[] = {
},
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, meson_ee_pwrc_match_table);

static struct platform_driver meson_ee_pwrc_driver = {
.probe = meson_ee_pwrc_probe,
Expand All @@ -611,4 +613,5 @@ static struct platform_driver meson_ee_pwrc_driver = {
.of_match_table = meson_ee_pwrc_match_table,
},
};
builtin_platform_driver(meson_ee_pwrc_driver);
module_platform_driver(meson_ee_pwrc_driver);
MODULE_LICENSE("GPL v2");
5 changes: 4 additions & 1 deletion drivers/soc/amlogic/meson-gx-pwrc-vpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/of_device.h>
#include <linux/reset.h>
#include <linux/clk.h>
#include <linux/module.h>

/* AO Offsets */

Expand Down Expand Up @@ -364,6 +365,7 @@ static const struct of_device_id meson_gx_pwrc_vpu_match_table[] = {
},
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, meson_gx_pwrc_vpu_match_table);

static struct platform_driver meson_gx_pwrc_vpu_driver = {
.probe = meson_gx_pwrc_vpu_probe,
Expand All @@ -373,4 +375,5 @@ static struct platform_driver meson_gx_pwrc_vpu_driver = {
.of_match_table = meson_gx_pwrc_vpu_match_table,
},
};
builtin_platform_driver(meson_gx_pwrc_vpu_driver);
module_platform_driver(meson_gx_pwrc_vpu_driver);
MODULE_LICENSE("GPL v2");
5 changes: 4 additions & 1 deletion drivers/soc/amlogic/meson-secure-pwrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <dt-bindings/power/meson-a1-power.h>
#include <linux/arm-smccc.h>
#include <linux/firmware/meson/meson_sm.h>
#include <linux/module.h>

#define PWRC_ON 1
#define PWRC_OFF 0
Expand Down Expand Up @@ -193,6 +194,7 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
},
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table);

static struct platform_driver meson_secure_pwrc_driver = {
.probe = meson_secure_pwrc_probe,
Expand All @@ -201,4 +203,5 @@ static struct platform_driver meson_secure_pwrc_driver = {
.of_match_table = meson_secure_pwrc_match_table,
},
};
builtin_platform_driver(meson_secure_pwrc_driver);
module_platform_driver(meson_secure_pwrc_driver);
MODULE_LICENSE("Dual MIT/GPL");

0 comments on commit d9da178

Please sign in to comment.