aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/integrator_ap.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-09-06 09:09:11 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-09-17 23:20:23 +0100
commit73efd53012af7775a4504da46ebf4145528d50e7 (patch)
tree5a287cbba28ac33007223a21e9846b57979bdb87 /arch/arm/mach-integrator/integrator_ap.c
parentARM: 7518/1: integrator: convert AMBA devices to device tree (diff)
downloadlinux-dev-73efd53012af7775a4504da46ebf4145528d50e7.tar.xz
linux-dev-73efd53012af7775a4504da46ebf4145528d50e7.zip
ARM: 7519/1: integrator: convert platform devices to Device Tree
This moves the physmap flash and SMSC91x ethernet devices over to the device tree, moving the static board code down into the #ifndef CONFIG_OF section. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator/integrator_ap.c')
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 8cd05607435a..ff1255ae7121 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -256,22 +256,6 @@ static struct physmap_flash_data ap_flash_data = {
.set_vpp = ap_flash_set_vpp,
};
-static struct resource cfi_flash_resource = {
- .start = INTEGRATOR_FLASH_BASE,
- .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1,
- .flags = IORESOURCE_MEM,
-};
-
-static struct platform_device cfi_flash_device = {
- .name = "physmap-flash",
- .id = 0,
- .dev = {
- .platform_data = &ap_flash_data,
- },
- .num_resources = 1,
- .resource = &cfi_flash_resource,
-};
-
/*
* Where is the timer (VA)?
*/
@@ -476,6 +460,8 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = {
"kmi0", NULL),
OF_DEV_AUXDATA("arm,primecell", KMI1_BASE,
"kmi1", NULL),
+ OF_DEV_AUXDATA("cfi-flash", INTEGRATOR_FLASH_BASE,
+ "physmap-flash", &ap_flash_data),
{ /* sentinel */ },
};
@@ -487,8 +473,6 @@ static void __init ap_init_of(void)
of_platform_populate(NULL, of_default_bus_match_table,
ap_auxdata_lookup, NULL);
- platform_device_register(&cfi_flash_device);
-
sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET);
for (i = 0; i < 4; i++) {
struct lm_device *lmdev;
@@ -537,6 +521,22 @@ MACHINE_END
* for eventual deletion.
*/
+static struct resource cfi_flash_resource = {
+ .start = INTEGRATOR_FLASH_BASE,
+ .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device cfi_flash_device = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &ap_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &cfi_flash_resource,
+};
+
static void __init ap_init_timer(void)
{
struct clk *clk;