diff options
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 32 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/board-eb.h | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/platform.h | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/uncompress.h | 32 |
4 files changed, 44 insertions, 28 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index c5e5f07b5f5e..f970c9fb155a 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -78,8 +78,8 @@ static struct map_desc realview_eb_io_desc[] __initdata = { | |||
78 | }, | 78 | }, |
79 | #ifdef CONFIG_DEBUG_LL | 79 | #ifdef CONFIG_DEBUG_LL |
80 | { | 80 | { |
81 | .virtual = IO_ADDRESS(REALVIEW_UART0_BASE), | 81 | .virtual = IO_ADDRESS(REALVIEW_EB_UART0_BASE), |
82 | .pfn = __phys_to_pfn(REALVIEW_UART0_BASE), | 82 | .pfn = __phys_to_pfn(REALVIEW_EB_UART0_BASE), |
83 | .length = SZ_4K, | 83 | .length = SZ_4K, |
84 | .type = MT_DEVICE, | 84 | .type = MT_DEVICE, |
85 | } | 85 | } |
@@ -164,14 +164,14 @@ static void __init realview_eb_map_io(void) | |||
164 | */ | 164 | */ |
165 | #define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } | 165 | #define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } |
166 | #define SCI_DMA { 7, 6 } | 166 | #define SCI_DMA { 7, 6 } |
167 | #define UART0_IRQ { IRQ_EB_UART0, NO_IRQ } | 167 | #define EB_UART0_IRQ { IRQ_EB_UART0, NO_IRQ } |
168 | #define UART0_DMA { 15, 14 } | 168 | #define EB_UART0_DMA { 15, 14 } |
169 | #define UART1_IRQ { IRQ_EB_UART1, NO_IRQ } | 169 | #define EB_UART1_IRQ { IRQ_EB_UART1, NO_IRQ } |
170 | #define UART1_DMA { 13, 12 } | 170 | #define EB_UART1_DMA { 13, 12 } |
171 | #define UART2_IRQ { IRQ_EB_UART2, NO_IRQ } | 171 | #define EB_UART2_IRQ { IRQ_EB_UART2, NO_IRQ } |
172 | #define UART2_DMA { 11, 10 } | 172 | #define EB_UART2_DMA { 11, 10 } |
173 | #define UART3_IRQ { IRQ_EB_UART3, NO_IRQ } | 173 | #define EB_UART3_IRQ { IRQ_EB_UART3, NO_IRQ } |
174 | #define UART3_DMA { 0x86, 0x87 } | 174 | #define EB_UART3_DMA { 0x86, 0x87 } |
175 | #define SSP_IRQ { IRQ_EB_SSP, NO_IRQ } | 175 | #define SSP_IRQ { IRQ_EB_SSP, NO_IRQ } |
176 | #define SSP_DMA { 9, 8 } | 176 | #define SSP_DMA { 9, 8 } |
177 | 177 | ||
@@ -180,7 +180,7 @@ AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); | |||
180 | AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); | 180 | AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); |
181 | AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); | 181 | AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); |
182 | AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); | 182 | AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); |
183 | AMBA_DEVICE(uart3, "fpga:09", UART3, NULL); | 183 | AMBA_DEVICE(uart3, "fpga:09", EB_UART3, NULL); |
184 | 184 | ||
185 | /* DevChip Primecells */ | 185 | /* DevChip Primecells */ |
186 | AMBA_DEVICE(smc, "dev:00", SMC, NULL); | 186 | AMBA_DEVICE(smc, "dev:00", SMC, NULL); |
@@ -193,9 +193,9 @@ AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); | |||
193 | AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); | 193 | AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); |
194 | AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); | 194 | AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); |
195 | AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); | 195 | AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); |
196 | AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); | 196 | AMBA_DEVICE(uart0, "dev:f1", EB_UART0, NULL); |
197 | AMBA_DEVICE(uart1, "dev:f2", UART1, NULL); | 197 | AMBA_DEVICE(uart1, "dev:f2", EB_UART1, NULL); |
198 | AMBA_DEVICE(uart2, "dev:f3", UART2, NULL); | 198 | AMBA_DEVICE(uart2, "dev:f3", EB_UART2, NULL); |
199 | AMBA_DEVICE(ssp0, "dev:f4", SSP, NULL); | 199 | AMBA_DEVICE(ssp0, "dev:f4", SSP, NULL); |
200 | 200 | ||
201 | static struct amba_device *amba_devs[] __initdata = { | 201 | static struct amba_device *amba_devs[] __initdata = { |
@@ -388,8 +388,8 @@ static void __init realview_eb_init(void) | |||
388 | 388 | ||
389 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 389 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
390 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 390 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
391 | .phys_io = REALVIEW_UART0_BASE, | 391 | .phys_io = REALVIEW_EB_UART0_BASE, |
392 | .io_pg_offst = (IO_ADDRESS(REALVIEW_UART0_BASE) >> 18) & 0xfffc, | 392 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
393 | .boot_params = 0x00000100, | 393 | .boot_params = 0x00000100, |
394 | .map_io = realview_eb_map_io, | 394 | .map_io = realview_eb_map_io, |
395 | .init_irq = gic_init_irq, | 395 | .init_irq = gic_init_irq, |
diff --git a/include/asm-arm/arch-realview/board-eb.h b/include/asm-arm/arch-realview/board-eb.h index 142d77a72f39..565bb937ac86 100644 --- a/include/asm-arm/arch-realview/board-eb.h +++ b/include/asm-arm/arch-realview/board-eb.h | |||
@@ -26,6 +26,10 @@ | |||
26 | /* | 26 | /* |
27 | * RealView EB + ARM11MPCore peripheral addresses | 27 | * RealView EB + ARM11MPCore peripheral addresses |
28 | */ | 28 | */ |
29 | #define REALVIEW_EB_UART0_BASE 0x10009000 /* UART 0 */ | ||
30 | #define REALVIEW_EB_UART1_BASE 0x1000A000 /* UART 1 */ | ||
31 | #define REALVIEW_EB_UART2_BASE 0x1000B000 /* UART 2 */ | ||
32 | #define REALVIEW_EB_UART3_BASE 0x1000C000 /* UART 3 */ | ||
29 | #define REALVIEW_EB_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | 33 | #define REALVIEW_EB_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ |
30 | #define REALVIEW_EB_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | 34 | #define REALVIEW_EB_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ |
31 | #define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | 35 | #define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ |
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 7aa78a5ebc88..d18fb128ed9c 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -182,10 +182,6 @@ | |||
182 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ | 182 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ |
183 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ | 183 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ |
184 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ | 184 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ |
185 | #define REALVIEW_UART0_BASE 0x10009000 /* UART 0 */ | ||
186 | #define REALVIEW_UART1_BASE 0x1000A000 /* UART 1 */ | ||
187 | #define REALVIEW_UART2_BASE 0x1000B000 /* UART 2 */ | ||
188 | #define REALVIEW_UART3_BASE 0x1000C000 /* UART 3 */ | ||
189 | #define REALVIEW_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | 185 | #define REALVIEW_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ |
190 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ | 186 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ |
191 | /* Reserved 0x1000F000 */ | 187 | /* Reserved 0x1000F000 */ |
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h index 3d5c2db07a26..9b790a7e782d 100644 --- a/include/asm-arm/arch-realview/uncompress.h +++ b/include/asm-arm/arch-realview/uncompress.h | |||
@@ -18,28 +18,44 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
21 | #include <asm/mach-types.h> | ||
21 | 22 | ||
22 | #include <asm/arch/platform.h> | 23 | #include <asm/arch/board-eb.h> |
23 | 24 | ||
24 | #define AMBA_UART_DR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x00)) | 25 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) |
25 | #define AMBA_UART_LCRH (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x2c)) | 26 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) |
26 | #define AMBA_UART_CR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x30)) | 27 | #define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) |
27 | #define AMBA_UART_FR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x18)) | 28 | #define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) |
29 | |||
30 | /* | ||
31 | * Return the UART base address | ||
32 | */ | ||
33 | static inline unsigned long get_uart_base(void) | ||
34 | { | ||
35 | if (machine_is_realview_eb()) | ||
36 | return REALVIEW_EB_UART0_BASE; | ||
37 | else | ||
38 | return 0; | ||
39 | } | ||
28 | 40 | ||
29 | /* | 41 | /* |
30 | * This does not append a newline | 42 | * This does not append a newline |
31 | */ | 43 | */ |
32 | static inline void putc(int c) | 44 | static inline void putc(int c) |
33 | { | 45 | { |
34 | while (AMBA_UART_FR & (1 << 5)) | 46 | unsigned long base = get_uart_base(); |
47 | |||
48 | while (AMBA_UART_FR(base) & (1 << 5)) | ||
35 | barrier(); | 49 | barrier(); |
36 | 50 | ||
37 | AMBA_UART_DR = c; | 51 | AMBA_UART_DR(base) = c; |
38 | } | 52 | } |
39 | 53 | ||
40 | static inline void flush(void) | 54 | static inline void flush(void) |
41 | { | 55 | { |
42 | while (AMBA_UART_FR & (1 << 3)) | 56 | unsigned long base = get_uart_base(); |
57 | |||
58 | while (AMBA_UART_FR(base) & (1 << 3)) | ||
43 | barrier(); | 59 | barrier(); |
44 | } | 60 | } |
45 | 61 | ||