diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-08-15 12:28:06 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 09:55:19 -0400 |
commit | ce55754c4f3ea6985d19e24aa8972918bd07c88d (patch) | |
tree | fae3ea5859b30a26fa3d080e361227664207f28f /arch/arm/mach-clps711x/autcpu12.c | |
parent | d1f55c680e5d021e7066f4461dd678d42af18898 (diff) |
mtd: autcpu12-nvram: Convert driver to platform_device
Because we can have a single kernel to support multiple machines, we
need to make loading specific drivers for the target platform only.
For this, driver is converted to the platform driver.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/arm/mach-clps711x/autcpu12.c')
-rw-r--r-- | arch/arm/mach-clps711x/autcpu12.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c index 3fb79a1d0bde..32871918bb6e 100644 --- a/arch/arm/mach-clps711x/autcpu12.c +++ b/arch/arm/mach-clps711x/autcpu12.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/ioport.h> | ||
27 | #include <linux/platform_device.h> | ||
26 | 28 | ||
27 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
28 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
@@ -62,9 +64,26 @@ void __init autcpu12_map_io(void) | |||
62 | iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc)); | 64 | iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc)); |
63 | } | 65 | } |
64 | 66 | ||
67 | static struct resource autcpu12_nvram_resource[] __initdata = { | ||
68 | DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | ||
69 | }; | ||
70 | |||
71 | static struct platform_device autcpu12_nvram_pdev __initdata = { | ||
72 | .name = "autcpu12_nvram", | ||
73 | .id = -1, | ||
74 | .resource = autcpu12_nvram_resource, | ||
75 | .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | ||
76 | }; | ||
77 | |||
78 | static void __init autcpu12_init(void) | ||
79 | { | ||
80 | platform_device_register(&autcpu12_nvram_pdev); | ||
81 | } | ||
82 | |||
65 | MACHINE_START(AUTCPU12, "autronix autcpu12") | 83 | MACHINE_START(AUTCPU12, "autronix autcpu12") |
66 | /* Maintainer: Thomas Gleixner */ | 84 | /* Maintainer: Thomas Gleixner */ |
67 | .atag_offset = 0x20000, | 85 | .atag_offset = 0x20000, |
86 | .init_machine = autcpu12_init, | ||
68 | .map_io = autcpu12_map_io, | 87 | .map_io = autcpu12_map_io, |
69 | .init_irq = clps711x_init_irq, | 88 | .init_irq = clps711x_init_irq, |
70 | .timer = &clps711x_timer, | 89 | .timer = &clps711x_timer, |