[PATCH 03/15] ARM: MXS: Do not register devices with device tree support
Sascha Hauer
s.hauer at pengutronix.de
Tue Jan 27 23:32:07 PST 2015
When a device tree is present the SoC internal devices come from
it, so do not register them as platform devices.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-mxs/soc-imx23.c | 3 +++
arch/arm/mach-mxs/soc-imx28.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/arch/arm/mach-mxs/soc-imx23.c b/arch/arm/mach-mxs/soc-imx23.c
index b219865..ece91e5 100644
--- a/arch/arm/mach-mxs/soc-imx23.c
+++ b/arch/arm/mach-mxs/soc-imx23.c
@@ -38,6 +38,9 @@ EXPORT_SYMBOL(reset_cpu);
static int imx23_devices_init(void)
{
+ if (of_get_root_node())
+ return 0;
+
add_generic_device("imx23-dma-apbh", 0, NULL, MXS_APBH_BASE, 0x2000, IORESOURCE_MEM, NULL);
add_generic_device("imx23-clkctrl", 0, NULL, IMX_CCM_BASE, 0x100, IORESOURCE_MEM, NULL);
diff --git a/arch/arm/mach-mxs/soc-imx28.c b/arch/arm/mach-mxs/soc-imx28.c
index c7252f5..001c969 100644
--- a/arch/arm/mach-mxs/soc-imx28.c
+++ b/arch/arm/mach-mxs/soc-imx28.c
@@ -56,6 +56,9 @@ postcore_initcall(imx28_init);
static int imx28_devices_init(void)
{
+ if (of_get_root_node())
+ return 0;
+
add_generic_device("imx28-dma-apbh", 0, NULL, MXS_APBH_BASE, 0x2000, IORESOURCE_MEM, NULL);
add_generic_device("imx28-clkctrl", 0, NULL, IMX_CCM_BASE, 0x100, IORESOURCE_MEM, NULL);
--
2.1.4
More information about the barebox
mailing list