diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-05-30 08:56:13 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-05-30 08:56:13 -0400 |
commit | af607747def54d8f76d2509c1394587da5d9bdfd (patch) | |
tree | 4a3bd173d739b434ce2ae981284647f4405e39ff | |
parent | 1b504bbe7a4a6c251cdc9dcba1fab72234827945 (diff) |
RealView: Allow access to the secure flash memory block on PB1176
This patch adds a Kconfig option for specifying whether Linux will only
be run in secure mode on the RealView PB1176 platform. Enabling it will
make the secure flash memory block (64MB @ 0x3c000000) available to
Linux.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm/mach-realview/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/board-pb1176.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 23 |
3 files changed, 29 insertions, 5 deletions
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index 368b58ae3043..e09f540f3217 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -48,6 +48,15 @@ config MACH_REALVIEW_PB1176 | |||
48 | help | 48 | help |
49 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. | 49 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. |
50 | 50 | ||
51 | config REALVIEW_PB1176_SECURE_FLASH | ||
52 | bool "Allow access to the secure flash memory block" | ||
53 | depends on MACH_REALVIEW_PB1176 | ||
54 | default n | ||
55 | help | ||
56 | Select this option if Linux will only run in secure mode on the | ||
57 | RealView PB1176 platform and access to the secure flash memory | ||
58 | block (64MB @ 0x3c000000) is required. | ||
59 | |||
51 | config MACH_REALVIEW_PBA8 | 60 | config MACH_REALVIEW_PBA8 |
52 | bool "Support RealView/PB-A8 platform" | 61 | bool "Support RealView/PB-A8 platform" |
53 | select CPU_V7 | 62 | select CPU_V7 |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 858eea7b1adc..e4d0e8046ea5 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #define REALVIEW_PB1176_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */ | 32 | #define REALVIEW_PB1176_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */ |
33 | #define REALVIEW_PB1176_FLASH_BASE 0x30000000 | 33 | #define REALVIEW_PB1176_FLASH_BASE 0x30000000 |
34 | #define REALVIEW_PB1176_FLASH_SIZE SZ_64M | 34 | #define REALVIEW_PB1176_FLASH_SIZE SZ_64M |
35 | #define REALVIEW_PB1176_SEC_FLASH_BASE 0x3C000000 /* Secure flash */ | ||
36 | #define REALVIEW_PB1176_SEC_FLASH_SIZE SZ_64M | ||
35 | 37 | ||
36 | #define REALVIEW_PB1176_TIMER0_1_BASE 0x10104000 /* Timer 0 and 1 */ | 38 | #define REALVIEW_PB1176_TIMER0_1_BASE 0x10104000 /* Timer 0 and 1 */ |
37 | #define REALVIEW_PB1176_TIMER2_3_BASE 0x10105000 /* Timer 2 and 3 */ | 39 | #define REALVIEW_PB1176_TIMER2_3_BASE 0x10105000 /* Timer 2 and 3 */ |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index a64b84a7a3df..25efe71a67c7 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -203,11 +203,23 @@ static struct amba_device *amba_devs[] __initdata = { | |||
203 | /* | 203 | /* |
204 | * RealView PB1176 platform devices | 204 | * RealView PB1176 platform devices |
205 | */ | 205 | */ |
206 | static struct resource realview_pb1176_flash_resource = { | 206 | static struct resource realview_pb1176_flash_resources[] = { |
207 | .start = REALVIEW_PB1176_FLASH_BASE, | 207 | [0] = { |
208 | .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1, | 208 | .start = REALVIEW_PB1176_FLASH_BASE, |
209 | .flags = IORESOURCE_MEM, | 209 | .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1, |
210 | .flags = IORESOURCE_MEM, | ||
211 | }, | ||
212 | [1] = { | ||
213 | .start = REALVIEW_PB1176_SEC_FLASH_BASE, | ||
214 | .end = REALVIEW_PB1176_SEC_FLASH_BASE + REALVIEW_PB1176_SEC_FLASH_SIZE - 1, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
210 | }; | 217 | }; |
218 | #ifdef CONFIG_REALVIEW_PB1176_SECURE_FLASH | ||
219 | #define PB1176_FLASH_BLOCKS 2 | ||
220 | #else | ||
221 | #define PB1176_FLASH_BLOCKS 1 | ||
222 | #endif | ||
211 | 223 | ||
212 | static struct resource realview_pb1176_smsc911x_resources[] = { | 224 | static struct resource realview_pb1176_smsc911x_resources[] = { |
213 | [0] = { | 225 | [0] = { |
@@ -271,7 +283,8 @@ static void __init realview_pb1176_init(void) | |||
271 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); | 283 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); |
272 | #endif | 284 | #endif |
273 | 285 | ||
274 | realview_flash_register(&realview_pb1176_flash_resource, 1); | 286 | realview_flash_register(realview_pb1176_flash_resources, |
287 | PB1176_FLASH_BLOCKS); | ||
275 | realview_eth_register(NULL, realview_pb1176_smsc911x_resources); | 288 | realview_eth_register(NULL, realview_pb1176_smsc911x_resources); |
276 | platform_device_register(&realview_i2c_device); | 289 | platform_device_register(&realview_i2c_device); |
277 | realview_usb_register(realview_pb1176_isp1761_resources); | 290 | realview_usb_register(realview_pb1176_isp1761_resources); |