diff options
Diffstat (limited to 'include/asm-arm/arch-orion5x')
-rw-r--r-- | include/asm-arm/arch-orion5x/io.h | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-orion5x/orion5x.h | 7 | ||||
-rw-r--r-- | include/asm-arm/arch-orion5x/uncompress.h | 29 |
3 files changed, 29 insertions, 15 deletions
diff --git a/include/asm-arm/arch-orion5x/io.h b/include/asm-arm/arch-orion5x/io.h index 50f8c8802206..59f1bc96a23b 100644 --- a/include/asm-arm/arch-orion5x/io.h +++ b/include/asm-arm/arch-orion5x/io.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #include "orion5x.h" | 14 | #include "orion5x.h" |
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE | ||
18 | 17 | ||
19 | static inline void __iomem * | 18 | static inline void __iomem * |
20 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | 19 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) |
@@ -53,15 +52,12 @@ static inline void __iomem *__io(unsigned long addr) | |||
53 | /***************************************************************************** | 52 | /***************************************************************************** |
54 | * Helpers to access Orion registers | 53 | * Helpers to access Orion registers |
55 | ****************************************************************************/ | 54 | ****************************************************************************/ |
56 | #define orion5x_read(r) __raw_readl(r) | ||
57 | #define orion5x_write(r, val) __raw_writel(val, r) | ||
58 | |||
59 | /* | 55 | /* |
60 | * These are not preempt-safe. Locks, if needed, must be taken | 56 | * These are not preempt-safe. Locks, if needed, must be taken |
61 | * care of by the caller. | 57 | * care of by the caller. |
62 | */ | 58 | */ |
63 | #define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask)) | 59 | #define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r)) |
64 | #define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask)) | 60 | #define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r)) |
65 | 61 | ||
66 | 62 | ||
67 | #endif | 63 | #endif |
diff --git a/include/asm-arm/arch-orion5x/orion5x.h b/include/asm-arm/arch-orion5x/orion5x.h index 206ddd71e193..10257f5c5e9e 100644 --- a/include/asm-arm/arch-orion5x/orion5x.h +++ b/include/asm-arm/arch-orion5x/orion5x.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * include/asm-arm/arch-orion5x/orion5x.h | 2 | * include/asm-arm/arch-orion5x/orion5x.h |
3 | * | 3 | * |
4 | * Generic definitions of Orion SoC flavors: | 4 | * Generic definitions of Orion SoC flavors: |
5 | * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2. | 5 | * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2. |
6 | * | 6 | * |
7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | 7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> |
8 | * | 8 | * |
@@ -63,9 +63,11 @@ | |||
63 | /******************************************************************************* | 63 | /******************************************************************************* |
64 | * Supported Devices & Revisions | 64 | * Supported Devices & Revisions |
65 | ******************************************************************************/ | 65 | ******************************************************************************/ |
66 | /* Orion-1 (88F5181) */ | 66 | /* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */ |
67 | #define MV88F5181_DEV_ID 0x5181 | 67 | #define MV88F5181_DEV_ID 0x5181 |
68 | #define MV88F5181_REV_B1 3 | 68 | #define MV88F5181_REV_B1 3 |
69 | #define MV88F5181L_REV_A0 8 | ||
70 | #define MV88F5181L_REV_A1 9 | ||
69 | /* Orion-NAS (88F5182) */ | 71 | /* Orion-NAS (88F5182) */ |
70 | #define MV88F5182_DEV_ID 0x5182 | 72 | #define MV88F5182_DEV_ID 0x5182 |
71 | #define MV88F5182_REV_A2 2 | 73 | #define MV88F5182_REV_A2 2 |
@@ -152,6 +154,7 @@ | |||
152 | #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114) | 154 | #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114) |
153 | #define BRIDGE_INT_TIMER0 0x0002 | 155 | #define BRIDGE_INT_TIMER0 0x0002 |
154 | #define BRIDGE_INT_TIMER1 0x0004 | 156 | #define BRIDGE_INT_TIMER1 0x0004 |
157 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | ||
155 | #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200) | 158 | #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200) |
156 | #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204) | 159 | #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204) |
157 | 160 | ||
diff --git a/include/asm-arm/arch-orion5x/uncompress.h b/include/asm-arm/arch-orion5x/uncompress.h index 5c13d4fafb4e..7548cedf2d76 100644 --- a/include/asm-arm/arch-orion5x/uncompress.h +++ b/include/asm-arm/arch-orion5x/uncompress.h | |||
@@ -8,23 +8,38 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/serial_reg.h> | ||
11 | #include <asm/arch/orion5x.h> | 12 | #include <asm/arch/orion5x.h> |
12 | 13 | ||
13 | #define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) | 14 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) |
14 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) | ||
15 | |||
16 | #define LSR_THRE 0x20 | ||
17 | 15 | ||
18 | static void putc(const char c) | 16 | static void putc(const char c) |
19 | { | 17 | { |
20 | int j = 0x1000; | 18 | unsigned char *base = SERIAL_BASE; |
21 | while (--j && !(*MV_UART_LSR & LSR_THRE)) | 19 | int i; |
20 | |||
21 | for (i = 0; i < 0x1000; i++) { | ||
22 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
23 | break; | ||
22 | barrier(); | 24 | barrier(); |
23 | *MV_UART_THR = c; | 25 | } |
26 | |||
27 | base[UART_TX << 2] = c; | ||
24 | } | 28 | } |
25 | 29 | ||
26 | static void flush(void) | 30 | static void flush(void) |
27 | { | 31 | { |
32 | unsigned char *base = SERIAL_BASE; | ||
33 | unsigned char mask; | ||
34 | int i; | ||
35 | |||
36 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
37 | |||
38 | for (i = 0; i < 0x1000; i++) { | ||
39 | if ((base[UART_LSR << 2] & mask) == mask) | ||
40 | break; | ||
41 | barrier(); | ||
42 | } | ||
28 | } | 43 | } |
29 | 44 | ||
30 | /* | 45 | /* |