Commit d9edae44 authored by Robert Jarzmik's avatar Robert Jarzmik

ARM: pxa: add pxa25x device-tree support

Add a device-tree machine entry (DT_MACHINE_START) for pxa25x based
platforms.

Take the opportunity to sort the file machine descriptions by
alphabetical order.
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
parent ca5be4c6
...@@ -4,6 +4,17 @@ menu "Intel PXA2xx/PXA3xx Implementations" ...@@ -4,6 +4,17 @@ menu "Intel PXA2xx/PXA3xx Implementations"
comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" comment "Intel/Marvell Dev Platforms (sorted by hardware release time)"
config MACH_PXA25X_DT
bool "Support PXA25x platforms from device tree"
select PINCTRL
select POWER_SUPPLY
select PXA25x
select USE_OF
help
Include support for Marvell PXA25x based platforms using
the device tree. Needn't select any other machine while
MACH_PXA25x_DT is enabled.
config MACH_PXA27X_DT config MACH_PXA27X_DT
bool "Support PXA27x platforms from device tree" bool "Support PXA27x platforms from device tree"
select PINCTRL select PINCTRL
......
...@@ -19,8 +19,9 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o ...@@ -19,8 +19,9 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o
# NOTE: keep the order of boards in accordance to their order in Kconfig # NOTE: keep the order of boards in accordance to their order in Kconfig
# Device Tree support # Device Tree support
obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o obj-$(CONFIG_MACH_PXA25X_DT) += pxa-dt.o
obj-$(CONFIG_MACH_PXA27X_DT) += pxa-dt.o obj-$(CONFIG_MACH_PXA27X_DT) += pxa-dt.o
obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o
# Intel/Marvell Dev Platforms # Intel/Marvell Dev Platforms
obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
......
...@@ -18,20 +18,18 @@ ...@@ -18,20 +18,18 @@
#include "generic.h" #include "generic.h"
#ifdef CONFIG_PXA3xx #ifdef CONFIG_PXA25x
static const char *const pxa3xx_dt_board_compat[] __initconst = { static const char * const pxa25x_dt_board_compat[] __initconst = {
"marvell,pxa300", "marvell,pxa250",
"marvell,pxa310",
"marvell,pxa320",
NULL, NULL,
}; };
DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)") DT_MACHINE_START(PXA25X_DT, "Marvell PXA25x (Device Tree Support)")
.map_io = pxa3xx_map_io, .map_io = pxa25x_map_io,
.init_irq = pxa3xx_dt_init_irq, .init_irq = pxa25x_dt_init_irq,
.handle_irq = pxa3xx_handle_irq, .handle_irq = pxa25x_handle_irq,
.restart = pxa_restart, .restart = pxa_restart,
.dt_compat = pxa3xx_dt_board_compat, .dt_compat = pxa25x_dt_board_compat,
MACHINE_END MACHINE_END
#endif #endif
...@@ -41,7 +39,7 @@ static const char * const pxa27x_dt_board_compat[] __initconst = { ...@@ -41,7 +39,7 @@ static const char * const pxa27x_dt_board_compat[] __initconst = {
NULL, NULL,
}; };
DT_MACHINE_START(PXA27X_DT, "Marvell PXA2xx (Device Tree Support)") DT_MACHINE_START(PXA27X_DT, "Marvell PXA27x (Device Tree Support)")
.map_io = pxa27x_map_io, .map_io = pxa27x_map_io,
.init_irq = pxa27x_dt_init_irq, .init_irq = pxa27x_dt_init_irq,
.handle_irq = pxa27x_handle_irq, .handle_irq = pxa27x_handle_irq,
...@@ -49,3 +47,20 @@ DT_MACHINE_START(PXA27X_DT, "Marvell PXA2xx (Device Tree Support)") ...@@ -49,3 +47,20 @@ DT_MACHINE_START(PXA27X_DT, "Marvell PXA2xx (Device Tree Support)")
.dt_compat = pxa27x_dt_board_compat, .dt_compat = pxa27x_dt_board_compat,
MACHINE_END MACHINE_END
#endif #endif
#ifdef CONFIG_PXA3xx
static const char *const pxa3xx_dt_board_compat[] __initconst = {
"marvell,pxa300",
"marvell,pxa310",
"marvell,pxa320",
NULL,
};
DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)")
.map_io = pxa3xx_map_io,
.init_irq = pxa3xx_dt_init_irq,
.handle_irq = pxa3xx_handle_irq,
.restart = pxa_restart,
.dt_compat = pxa3xx_dt_board_compat,
MACHINE_END
#endif
...@@ -209,12 +209,12 @@ static int __init pxa25x_init(void) ...@@ -209,12 +209,12 @@ static int __init pxa25x_init(void)
register_syscore_ops(&pxa_irq_syscore_ops); register_syscore_ops(&pxa_irq_syscore_ops);
register_syscore_ops(&pxa2xx_mfp_syscore_ops); register_syscore_ops(&pxa2xx_mfp_syscore_ops);
pxa2xx_set_dmac_info(16, 40); if (!of_have_populated_dt()) {
pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info); pxa2xx_set_dmac_info(16, 40);
ret = platform_add_devices(pxa25x_devices, pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info);
ARRAY_SIZE(pxa25x_devices)); ret = platform_add_devices(pxa25x_devices,
if (ret) ARRAY_SIZE(pxa25x_devices));
return ret; }
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment