diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2008-04-18 17:43:10 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2008-04-18 17:43:10 -0400 |
commit | a44ddfd5bf5354281eebd0f0ae0d6dcf8818fc5c (patch) | |
tree | 9f377ae5af5ab2d1ec802dde4b3c2451b197b649 | |
parent | 073b6ff3b94c4737c91c45ed0f0c4d40cf1cb1c8 (diff) |
RealView: Move the flash definitions out of platform.h
This patch moves the patch definitions into board-eb.h and
realview_eb.c (from core.c) as they are different on the PB11MPCore
and PB1176 platforms.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm/mach-realview/core.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 7 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/board-eb.h | 3 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/platform.h | 3 |
5 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 98aefc9f4df3..f3cf5712091c 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -109,22 +109,21 @@ static struct flash_platform_data realview_flash_data = { | |||
109 | .set_vpp = realview_flash_set_vpp, | 109 | .set_vpp = realview_flash_set_vpp, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static struct resource realview_flash_resource = { | ||
113 | .start = REALVIEW_FLASH_BASE, | ||
114 | .end = REALVIEW_FLASH_BASE + REALVIEW_FLASH_SIZE, | ||
115 | .flags = IORESOURCE_MEM, | ||
116 | }; | ||
117 | |||
118 | struct platform_device realview_flash_device = { | 112 | struct platform_device realview_flash_device = { |
119 | .name = "armflash", | 113 | .name = "armflash", |
120 | .id = 0, | 114 | .id = 0, |
121 | .dev = { | 115 | .dev = { |
122 | .platform_data = &realview_flash_data, | 116 | .platform_data = &realview_flash_data, |
123 | }, | 117 | }, |
124 | .num_resources = 1, | ||
125 | .resource = &realview_flash_resource, | ||
126 | }; | 118 | }; |
127 | 119 | ||
120 | int realview_flash_register(struct resource *res, u32 num) | ||
121 | { | ||
122 | realview_flash_device.resource = res; | ||
123 | realview_flash_device.num_resources = num; | ||
124 | return platform_device_register(&realview_flash_device); | ||
125 | } | ||
126 | |||
128 | static struct resource realview_i2c_resource = { | 127 | static struct resource realview_i2c_resource = { |
129 | .start = REALVIEW_I2C_BASE, | 128 | .start = REALVIEW_I2C_BASE, |
130 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, | 129 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 492a14c0d604..6fcaeae16db9 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -58,5 +58,6 @@ extern unsigned int twd_size; | |||
58 | 58 | ||
59 | extern void realview_leds_event(led_event_t ledevt); | 59 | extern void realview_leds_event(led_event_t ledevt); |
60 | extern void realview_timer_init(unsigned int timer_irq); | 60 | extern void realview_timer_init(unsigned int timer_irq); |
61 | extern int realview_flash_register(struct resource *res, u32 num); | ||
61 | 62 | ||
62 | #endif | 63 | #endif |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 6848e5182994..860e3ca833ed 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -223,6 +223,11 @@ static struct amba_device *amba_devs[] __initdata = { | |||
223 | /* | 223 | /* |
224 | * RealView EB platform devices | 224 | * RealView EB platform devices |
225 | */ | 225 | */ |
226 | static struct resource realview_eb_flash_resource = { | ||
227 | .start = REALVIEW_EB_FLASH_BASE, | ||
228 | .end = REALVIEW_EB_FLASH_BASE + REALVIEW_EB_FLASH_SIZE - 1, | ||
229 | .flags = IORESOURCE_MEM, | ||
230 | }; | ||
226 | 231 | ||
227 | static struct resource realview_eb_eth_resources[] = { | 232 | static struct resource realview_eb_eth_resources[] = { |
228 | [0] = { | 233 | [0] = { |
@@ -362,7 +367,7 @@ static void __init realview_eb_init(void) | |||
362 | 367 | ||
363 | clk_register(&realview_clcd_clk); | 368 | clk_register(&realview_clcd_clk); |
364 | 369 | ||
365 | platform_device_register(&realview_flash_device); | 370 | realview_flash_register(&realview_eb_flash_resource, 1); |
366 | platform_device_register(&realview_i2c_device); | 371 | platform_device_register(&realview_i2c_device); |
367 | eth_device_register(); | 372 | eth_device_register(); |
368 | 373 | ||
diff --git a/include/asm-arm/arch-realview/board-eb.h b/include/asm-arm/arch-realview/board-eb.h index cacfdbbc2e4e..8adb81e7d1b9 100644 --- a/include/asm-arm/arch-realview/board-eb.h +++ b/include/asm-arm/arch-realview/board-eb.h | |||
@@ -29,6 +29,9 @@ | |||
29 | #define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | 29 | #define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ |
30 | #define REALVIEW_EB_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | 30 | #define REALVIEW_EB_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ |
31 | 31 | ||
32 | #define REALVIEW_EB_FLASH_BASE 0x40000000 | ||
33 | #define REALVIEW_EB_FLASH_SIZE SZ_64M | ||
34 | |||
32 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB | 35 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB |
33 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ | 36 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ |
34 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | 37 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ |
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 5ff6c8b303b1..08d6f05ce0a1 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -32,9 +32,6 @@ | |||
32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ | 32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ |
33 | #define REALVIEW_SSRAM_SIZE SZ_2M | 33 | #define REALVIEW_SSRAM_SIZE SZ_2M |
34 | 34 | ||
35 | #define REALVIEW_FLASH_BASE 0x40000000 | ||
36 | #define REALVIEW_FLASH_SIZE SZ_64M | ||
37 | |||
38 | /* | 35 | /* |
39 | * SDRAM | 36 | * SDRAM |
40 | */ | 37 | */ |