aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx/adssphere.c
diff options
context:
space:
mode:
authorHartley Sweeten <hartleys@visionengravers.com>2010-06-10 11:19:08 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-06-16 17:56:05 -0400
commit16bcf78f8cac9cc3057c6ce3800490cb6e684ce8 (patch)
tree20f1337b5e0bd6bad2a25e01adf7aa84bf92dcb4 /arch/arm/mach-ep93xx/adssphere.c
parent6ea4b7418dfd07dc76d20a3c3bf632ee7b59a2c4 (diff)
ARM: 6168/1: ep93xx: move physmap flash registration into core.c
Create a core.c __init function to handle the physmap flash registration for all the ep93xx platforms. Also, modify all the ep93xx platforms to use this new function. This simplifies all the ep93xx platform init code and reduces the size of the kernel when including multiple ep93xx boards. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Martin Guy <martinwguy@gmail.com> Acked-by: Hubert Feurstein <hubert.feurstein@contec.at> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx/adssphere.c')
-rw-r--r--arch/arm/mach-ep93xx/adssphere.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 3a1a855bfdca..f744f676783f 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -13,7 +13,6 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/mtd/physmap.h>
17 16
18#include <mach/hardware.h> 17#include <mach/hardware.h>
19 18
@@ -21,26 +20,6 @@
21#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
22 21
23 22
24static struct physmap_flash_data adssphere_flash_data = {
25 .width = 4,
26};
27
28static struct resource adssphere_flash_resource = {
29 .start = EP93XX_CS6_PHYS_BASE,
30 .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1,
31 .flags = IORESOURCE_MEM,
32};
33
34static struct platform_device adssphere_flash = {
35 .name = "physmap-flash",
36 .id = 0,
37 .dev = {
38 .platform_data = &adssphere_flash_data,
39 },
40 .num_resources = 1,
41 .resource = &adssphere_flash_resource,
42};
43
44static struct ep93xx_eth_data __initdata adssphere_eth_data = { 23static struct ep93xx_eth_data __initdata adssphere_eth_data = {
45 .phy_id = 1, 24 .phy_id = 1,
46}; 25};
@@ -48,8 +27,7 @@ static struct ep93xx_eth_data __initdata adssphere_eth_data = {
48static void __init adssphere_init_machine(void) 27static void __init adssphere_init_machine(void)
49{ 28{
50 ep93xx_init_devices(); 29 ep93xx_init_devices();
51 platform_device_register(&adssphere_flash); 30 ep93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M);
52
53 ep93xx_register_eth(&adssphere_eth_data, 1); 31 ep93xx_register_eth(&adssphere_eth_data, 1);
54} 32}
55 33