diff options
| author | Pavel Machek <pavel@denx.de> | 2012-10-17 14:16:48 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-25 10:52:53 -0400 |
| commit | ef3f94412a4d7e107392e7c7cfc3e2d0668aa1aa (patch) | |
| tree | e9a3489d60e86ad8c902104ffa2697edf4738c90 | |
| parent | 5e3059b2cb6fb412415da08b213549a6aed65d36 (diff) | |
ARM: socfpga: Fix socfpga compilation with early_printk() enabled
This fixes early_printk() compilation for
socfpga. (senduart/busyuart/waituart were missing). It does that by
making Picochip code generic.
Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| -rw-r--r-- | arch/arm/include/debug/8250_32.S | 27 | ||||
| -rw-r--r-- | arch/arm/include/debug/picoxcell.S | 18 | ||||
| -rw-r--r-- | arch/arm/include/debug/socfpga.S | 5 |
3 files changed, 33 insertions, 17 deletions
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S new file mode 100644 index 000000000000..8db01eeabbb4 --- /dev/null +++ b/arch/arm/include/debug/8250_32.S | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
| 9 | * accesses to the 8250. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/serial_reg.h> | ||
| 13 | |||
| 14 | .macro senduart,rd,rx | ||
| 15 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
| 16 | .endm | ||
| 17 | |||
| 18 | .macro busyuart,rd,rx | ||
| 19 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
| 20 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 21 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 22 | bne 1002b | ||
| 23 | .endm | ||
| 24 | |||
| 25 | /* The UART's don't have any flow control IO's wired up. */ | ||
| 26 | .macro waituart,rd,rx | ||
| 27 | .endm | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S index 7419deb1b948..bc1f07c49cd4 100644 --- a/arch/arm/include/debug/picoxcell.S +++ b/arch/arm/include/debug/picoxcell.S | |||
| @@ -5,10 +5,7 @@ | |||
| 5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | * | 7 | * |
| 8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
| 9 | * accesses to the 8250. | ||
| 10 | */ | 8 | */ |
| 11 | #include <linux/serial_reg.h> | ||
| 12 | 9 | ||
| 13 | #define UART_SHIFT 2 | 10 | #define UART_SHIFT 2 |
| 14 | #define PICOXCELL_UART1_BASE 0x80230000 | 11 | #define PICOXCELL_UART1_BASE 0x80230000 |
| @@ -19,17 +16,4 @@ | |||
| 19 | ldr \rp, =PICOXCELL_UART1_BASE | 16 | ldr \rp, =PICOXCELL_UART1_BASE |
| 20 | .endm | 17 | .endm |
| 21 | 18 | ||
| 22 | .macro senduart,rd,rx | 19 | #include "8250_32.S" |
| 23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
| 24 | .endm | ||
| 25 | |||
| 26 | .macro busyuart,rd,rx | ||
| 27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
| 28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
| 30 | bne 1002b | ||
| 31 | .endm | ||
| 32 | |||
| 33 | /* The UART's don't have any flow control IO's wired up. */ | ||
| 34 | .macro waituart,rd,rx | ||
| 35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S index d6f26d23374f..966b2f994946 100644 --- a/arch/arm/include/debug/socfpga.S +++ b/arch/arm/include/debug/socfpga.S | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #define UART_SHIFT 2 | ||
| 11 | #define DEBUG_LL_UART_OFFSET 0x00002000 | ||
| 12 | |||
| 10 | .macro addruart, rp, rv, tmp | 13 | .macro addruart, rp, rv, tmp |
| 11 | mov \rp, #DEBUG_LL_UART_OFFSET | 14 | mov \rp, #DEBUG_LL_UART_OFFSET |
| 12 | orr \rp, \rp, #0x00c00000 | 15 | orr \rp, \rp, #0x00c00000 |
| @@ -14,3 +17,5 @@ | |||
| 14 | orr \rp, \rp, #0xff000000 @ physical base | 17 | orr \rp, \rp, #0xff000000 @ physical base |
| 15 | .endm | 18 | .endm |
| 16 | 19 | ||
| 20 | #include "8250_32.S" | ||
| 21 | |||
