diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-iop32x/debug-macro.S | 20 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/dma.h (renamed from include/asm-arm/arch-iop3xx/dma.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/entry-macro.S | 28 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/hardware.h (renamed from include/asm-arm/arch-iop3xx/hardware.h) | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/io.h (renamed from include/asm-arm/arch-iop3xx/io.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/iop321.h (renamed from include/asm-arm/arch-iop3xx/iop321.h) | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/iq31244.h (renamed from include/asm-arm/arch-iop3xx/iq31244.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/iq80321.h (renamed from include/asm-arm/arch-iop3xx/iq80321.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/irqs.h (renamed from include/asm-arm/arch-iop3xx/iop321-irqs.h) | 12 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/memory.h (renamed from include/asm-arm/arch-iop3xx/memory.h) | 13 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/system.h (renamed from include/asm-arm/arch-iop3xx/system.h) | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/timex.h | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/uncompress.h | 38 | ||||
-rw-r--r-- | include/asm-arm/arch-iop32x/vmalloc.h (renamed from include/asm-arm/arch-iop3xx/vmalloc.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/debug-macro.S | 24 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/dma.h | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/entry-macro.S (renamed from include/asm-arm/arch-iop3xx/entry-macro.S) | 29 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/hardware.h | 54 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/io.h | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/iop331.h (renamed from include/asm-arm/arch-iop3xx/iop331.h) | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/iq80331.h (renamed from include/asm-arm/arch-iop3xx/iq80331.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/iq80332.h (renamed from include/asm-arm/arch-iop3xx/iq80332.h) | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/irqs.h (renamed from include/asm-arm/arch-iop3xx/iop331-irqs.h) | 12 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/memory.h | 26 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/system.h | 29 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/timex.h | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/uncompress.h | 36 | ||||
-rw-r--r-- | include/asm-arm/arch-iop33x/vmalloc.h | 16 | ||||
-rw-r--r-- | include/asm-arm/arch-iop3xx/debug-macro.S | 35 | ||||
-rw-r--r-- | include/asm-arm/arch-iop3xx/irqs.h | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-iop3xx/timex.h | 20 | ||||
-rw-r--r-- | include/asm-arm/arch-iop3xx/uncompress.h | 48 |
32 files changed, 344 insertions, 207 deletions
diff --git a/include/asm-arm/arch-iop32x/debug-macro.S b/include/asm-arm/arch-iop32x/debug-macro.S new file mode 100644 index 000000000000..75ab2e0d8c67 --- /dev/null +++ b/include/asm-arm/arch-iop32x/debug-macro.S | |||
@@ -0,0 +1,20 @@ | |||
1 | /* linux/include/asm-arm/arch-iop32x/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mov \rx, #0xfe000000 @ physical | ||
16 | orr \rx, \rx, #0x00800000 @ location of the UART | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 0 | ||
20 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-iop3xx/dma.h b/include/asm-arm/arch-iop32x/dma.h index 1e808db8af2a..5be36676e58f 100644 --- a/include/asm-arm/arch-iop3xx/dma.h +++ b/include/asm-arm/arch-iop32x/dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/dma.h | 2 | * linux/include/asm-arm/arch-iop32x/dma.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Intel Corp. | 4 | * Copyright (C) 2004 Intel Corp. |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-iop32x/entry-macro.S b/include/asm-arm/arch-iop32x/entry-macro.S new file mode 100644 index 000000000000..52d9435c6a34 --- /dev/null +++ b/include/asm-arm/arch-iop32x/entry-macro.S | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-iop32x/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for IOP32x-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <asm/arch/irqs.h> | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | /* | ||
16 | * Note: only deal with normal interrupts, not FIQ | ||
17 | */ | ||
18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
19 | mov \irqnr, #0 | ||
20 | mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC | ||
21 | cmp \irqstat, #0 | ||
22 | beq 1001f | ||
23 | clz \irqnr, \irqstat | ||
24 | mov \base, #31 | ||
25 | subs \irqnr,\base,\irqnr | ||
26 | add \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT | ||
27 | 1001: | ||
28 | .endm | ||
diff --git a/include/asm-arm/arch-iop3xx/hardware.h b/include/asm-arm/arch-iop32x/hardware.h index 3b138171d086..8fb10134a107 100644 --- a/include/asm-arm/arch-iop3xx/hardware.h +++ b/include/asm-arm/arch-iop32x/hardware.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/hardware.h | 2 | * linux/include/asm-arm/arch-iop32x/hardware.h |
3 | */ | 3 | */ |
4 | #ifndef __ASM_ARCH_HARDWARE_H | 4 | #ifndef __ASM_ARCH_HARDWARE_H |
5 | #define __ASM_ARCH_HARDWARE_H | 5 | #define __ASM_ARCH_HARDWARE_H |
@@ -44,14 +44,11 @@ extern unsigned int processor_id; | |||
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | #include "iop321.h" | 46 | #include "iop321.h" |
47 | #include "iop331.h" | ||
48 | 47 | ||
49 | /* | 48 | /* |
50 | * Board specific bits | 49 | * Board specific bits |
51 | */ | 50 | */ |
52 | #include "iq80321.h" | 51 | #include "iq80321.h" |
53 | #include "iq31244.h" | 52 | #include "iq31244.h" |
54 | #include "iq80331.h" | ||
55 | #include "iq80332.h" | ||
56 | 53 | ||
57 | #endif /* _ASM_ARCH_HARDWARE_H */ | 54 | #endif /* _ASM_ARCH_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-iop3xx/io.h b/include/asm-arm/arch-iop32x/io.h index 36adbdf5055a..36d05ada12c4 100644 --- a/include/asm-arm/arch-iop3xx/io.h +++ b/include/asm-arm/arch-iop32x/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/io.h | 2 | * linux/include/asm-arm/arch-iop32x/io.h |
3 | * | 3 | * |
4 | * Copyright (C) 2001 MontaVista Software, Inc. | 4 | * Copyright (C) 2001 MontaVista Software, Inc. |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop32x/iop321.h index d198d72a50a4..7ba93faf8da4 100644 --- a/include/asm-arm/arch-iop3xx/iop321.h +++ b/include/asm-arm/arch-iop32x/iop321.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iop321.h | 2 | * linux/include/asm/arch-iop32x/iop321.h |
3 | * | 3 | * |
4 | * Intel IOP321 Chip definitions | 4 | * Intel IOP321 Chip definitions |
5 | * | 5 | * |
@@ -21,11 +21,7 @@ | |||
21 | * IOP3xx variants but behave slightly differently on each. | 21 | * IOP3xx variants but behave slightly differently on each. |
22 | */ | 22 | */ |
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | #ifdef CONFIG_ARCH_IOP32X | 24 | #define iop_is_321() 1 |
25 | #define iop_is_321() (((processor_id & 0xfffff5e0) == 0x69052420)) | ||
26 | #else | ||
27 | #define iop_is_321() 0 | ||
28 | #endif | ||
29 | #endif | 25 | #endif |
30 | 26 | ||
31 | /* | 27 | /* |
diff --git a/include/asm-arm/arch-iop3xx/iq31244.h b/include/asm-arm/arch-iop32x/iq31244.h index 4177cfa8100f..f490063d2156 100644 --- a/include/asm-arm/arch-iop3xx/iq31244.h +++ b/include/asm-arm/arch-iop32x/iq31244.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iq31244.h | 2 | * linux/include/asm/arch-iop32x/iq31244.h |
3 | * | 3 | * |
4 | * Intel IQ31244 evaluation board registers | 4 | * Intel IQ31244 evaluation board registers |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/arch-iop3xx/iq80321.h b/include/asm-arm/arch-iop32x/iq80321.h index cb8725979ffa..7015a605ab64 100644 --- a/include/asm-arm/arch-iop3xx/iq80321.h +++ b/include/asm-arm/arch-iop32x/iq80321.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iq80321.h | 2 | * linux/include/asm/arch-iop32x/iq80321.h |
3 | * | 3 | * |
4 | * Intel IQ80321 evaluation board registers | 4 | * Intel IQ80321 evaluation board registers |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/arch-iop3xx/iop321-irqs.h b/include/asm-arm/arch-iop32x/irqs.h index 2fcc1654cb9d..4b0c82711f96 100644 --- a/include/asm-arm/arch-iop3xx/iop321-irqs.h +++ b/include/asm-arm/arch-iop32x/irqs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/irqs.h | 2 | * linux/include/asm-arm/arch-iop32x/irqs.h |
3 | * | 3 | * |
4 | * Author: Rory Bolt <rorybolt@pacbell.net> | 4 | * Author: Rory Bolt <rorybolt@pacbell.net> |
5 | * Copyright: (C) 2002 Rory Bolt | 5 | * Copyright: (C) 2002 Rory Bolt |
@@ -9,8 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #ifndef _IOP321_IRQS_H_ | 12 | #ifndef _IRQS_H_ |
13 | #define _IOP321_IRQS_H_ | 13 | #define _IRQS_H_ |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * IOP80321 chipset interrupts | 16 | * IOP80321 chipset interrupts |
@@ -54,9 +54,7 @@ | |||
54 | #define IRQ_IOP321_XINT3 IOP321_IRQ(30) | 54 | #define IRQ_IOP321_XINT3 IOP321_IRQ(30) |
55 | #define IRQ_IOP321_HPI IOP321_IRQ(31) | 55 | #define IRQ_IOP321_HPI IOP321_IRQ(31) |
56 | 56 | ||
57 | #define NR_IOP321_IRQS (IOP321_IRQ(31) + 1) | 57 | #define NR_IRQS (IOP321_IRQ(31) + 1) |
58 | |||
59 | #define NR_IRQS NR_IOP321_IRQS | ||
60 | 58 | ||
61 | 59 | ||
62 | /* | 60 | /* |
@@ -97,4 +95,4 @@ | |||
97 | #define IRQ_IQ31244_INTC IRQ_IOP321_XINT2 | 95 | #define IRQ_IQ31244_INTC IRQ_IOP321_XINT2 |
98 | #define IRQ_IQ31244_INTD IRQ_IOP321_XINT3 | 96 | #define IRQ_IQ31244_INTD IRQ_IOP321_XINT3 |
99 | 97 | ||
100 | #endif // _IOP321_IRQ_H_ | 98 | #endif // _IRQ_H_ |
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop32x/memory.h index 25666184e8fc..b4073f15b405 100644 --- a/include/asm-arm/arch-iop3xx/memory.h +++ b/include/asm-arm/arch-iop32x/memory.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/memory.h | 2 | * linux/include/asm-arm/arch-iop32x/memory.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef __ASM_ARCH_MEMORY_H | 5 | #ifndef __ASM_ARCH_MEMORY_H |
@@ -10,11 +10,7 @@ | |||
10 | /* | 10 | /* |
11 | * Physical DRAM offset. | 11 | * Physical DRAM offset. |
12 | */ | 12 | */ |
13 | #ifndef CONFIG_ARCH_IOP33X | ||
14 | #define PHYS_OFFSET UL(0xa0000000) | 13 | #define PHYS_OFFSET UL(0xa0000000) |
15 | #else | ||
16 | #define PHYS_OFFSET UL(0x00000000) | ||
17 | #endif | ||
18 | 14 | ||
19 | /* | 15 | /* |
20 | * Virtual view <-> PCI DMA view memory address translations | 16 | * Virtual view <-> PCI DMA view memory address translations |
@@ -23,16 +19,9 @@ | |||
23 | * bus_to_virt: Used to convert an address for DMA operations | 19 | * bus_to_virt: Used to convert an address for DMA operations |
24 | * to an address that the kernel can use. | 20 | * to an address that the kernel can use. |
25 | */ | 21 | */ |
26 | #if defined(CONFIG_ARCH_IOP32X) | ||
27 | 22 | ||
28 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP321_IATVR2)) | ((*IOP321_IABAR2) & 0xfffffff0)) | 23 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP321_IATVR2)) | ((*IOP321_IABAR2) & 0xfffffff0)) |
29 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP321_IALR2)) | ( *IOP321_IATVR2))) | 24 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP321_IALR2)) | ( *IOP321_IATVR2))) |
30 | 25 | ||
31 | #elif defined(CONFIG_ARCH_IOP33X) | ||
32 | |||
33 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP331_IATVR2)) | ((*IOP331_IABAR2) & 0xfffffff0)) | ||
34 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP331_IALR2)) | ( *IOP331_IATVR2))) | ||
35 | |||
36 | #endif | ||
37 | 26 | ||
38 | #endif | 27 | #endif |
diff --git a/include/asm-arm/arch-iop3xx/system.h b/include/asm-arm/arch-iop32x/system.h index a16cbb77a7f6..d4c8d691e1b0 100644 --- a/include/asm-arm/arch-iop3xx/system.h +++ b/include/asm-arm/arch-iop32x/system.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/system.h | 2 | * linux/include/asm-arm/arch-iop32x/system.h |
3 | * | 3 | * |
4 | * Copyright (C) 2001 MontaVista Software, Inc. | 4 | * Copyright (C) 2001 MontaVista Software, Inc. |
5 | * | 5 | * |
@@ -16,13 +16,7 @@ static inline void arch_idle(void) | |||
16 | 16 | ||
17 | static inline void arch_reset(char mode) | 17 | static inline void arch_reset(char mode) |
18 | { | 18 | { |
19 | #ifdef CONFIG_ARCH_IOP32X | ||
20 | *IOP321_PCSR = 0x30; | 19 | *IOP321_PCSR = 0x30; |
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_ARCH_IOP33X | ||
24 | *IOP331_PCSR = 0x30; | ||
25 | #endif | ||
26 | 20 | ||
27 | if ( 1 && mode == 's') { | 21 | if ( 1 && mode == 's') { |
28 | /* Jump into ROM at address 0 */ | 22 | /* Jump into ROM at address 0 */ |
diff --git a/include/asm-arm/arch-iop32x/timex.h b/include/asm-arm/arch-iop32x/timex.h new file mode 100644 index 000000000000..08badde2e820 --- /dev/null +++ b/include/asm-arm/arch-iop32x/timex.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop32x/timex.h | ||
3 | * | ||
4 | * IOP3xx architecture timex specifications | ||
5 | */ | ||
6 | #include <asm/hardware.h> | ||
7 | |||
8 | #define CLOCK_TICK_RATE IOP321_TICK_RATE | ||
diff --git a/include/asm-arm/arch-iop32x/uncompress.h b/include/asm-arm/arch-iop32x/uncompress.h new file mode 100644 index 000000000000..4a85f20c796f --- /dev/null +++ b/include/asm-arm/arch-iop32x/uncompress.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop32x/uncompress.h | ||
3 | */ | ||
4 | #include <asm/types.h> | ||
5 | #include <asm/mach-types.h> | ||
6 | #include <linux/serial_reg.h> | ||
7 | #include <asm/hardware.h> | ||
8 | |||
9 | static volatile u8 *uart_base; | ||
10 | |||
11 | #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) | ||
12 | |||
13 | static inline void putc(char c) | ||
14 | { | ||
15 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) | ||
16 | barrier(); | ||
17 | *uart_base = c; | ||
18 | } | ||
19 | |||
20 | static inline void flush(void) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | ||
25 | { | ||
26 | if (machine_is_iq80321()) | ||
27 | uart_base = (volatile u8 *)IQ80321_UART; | ||
28 | else if (machine_is_iq31244()) | ||
29 | uart_base = (volatile u8 *)IQ31244_UART; | ||
30 | else | ||
31 | uart_base = (volatile u8 *)0xfe800000; | ||
32 | } | ||
33 | |||
34 | /* | ||
35 | * nothing to do | ||
36 | */ | ||
37 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) | ||
38 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop32x/vmalloc.h index 0f2f6847f93c..8492e1708a63 100644 --- a/include/asm-arm/arch-iop3xx/vmalloc.h +++ b/include/asm-arm/arch-iop32x/vmalloc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/vmalloc.h | 2 | * linux/include/asm-arm/arch-iop32x/vmalloc.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | /* | 5 | /* |
diff --git a/include/asm-arm/arch-iop33x/debug-macro.S b/include/asm-arm/arch-iop33x/debug-macro.S new file mode 100644 index 000000000000..b647edff475d --- /dev/null +++ b/include/asm-arm/arch-iop33x/debug-macro.S | |||
@@ -0,0 +1,24 @@ | |||
1 | /* linux/include/asm-arm/arch-iop33x/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ mmu enabled? | ||
17 | moveq \rx, #0xff000000 @ physical | ||
18 | movne \rx, #0xfe000000 @ virtual | ||
19 | orr \rx, \rx, #0x00ff0000 | ||
20 | orr \rx, \rx, #0x0000f700 | ||
21 | .endm | ||
22 | |||
23 | #define UART_SHIFT 2 | ||
24 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-iop33x/dma.h b/include/asm-arm/arch-iop33x/dma.h new file mode 100644 index 000000000000..d577ca59f4b0 --- /dev/null +++ b/include/asm-arm/arch-iop33x/dma.h | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
diff --git a/include/asm-arm/arch-iop3xx/entry-macro.S b/include/asm-arm/arch-iop33x/entry-macro.S index f3db54637ad3..980ec9b1ac83 100644 --- a/include/asm-arm/arch-iop3xx/entry-macro.S +++ b/include/asm-arm/arch-iop33x/entry-macro.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-iop3xx/entry-macro.S | 2 | * include/asm-arm/arch-iop33x/entry-macro.S |
3 | * | 3 | * |
4 | * Low-level IRQ helper macros for IOP3xx-based platforms | 4 | * Low-level IRQ helper macros for IOP33x-based platforms |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
@@ -9,26 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/arch/irqs.h> | 10 | #include <asm/arch/irqs.h> |
11 | 11 | ||
12 | #if defined(CONFIG_ARCH_IOP32X) | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | /* | ||
17 | * Note: only deal with normal interrupts, not FIQ | ||
18 | */ | ||
19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
20 | mov \irqnr, #0 | ||
21 | mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC | ||
22 | cmp \irqstat, #0 | ||
23 | beq 1001f | ||
24 | clz \irqnr, \irqstat | ||
25 | mov \base, #31 | ||
26 | subs \irqnr,\base,\irqnr | ||
27 | add \irqnr,\irqnr,#IRQ_IOP321_DMA0_EOT | ||
28 | 1001: | ||
29 | .endm | ||
30 | |||
31 | #elif defined(CONFIG_ARCH_IOP33X) | ||
32 | .macro disable_fiq | 12 | .macro disable_fiq |
33 | .endm | 13 | .endm |
34 | 14 | ||
@@ -47,11 +27,8 @@ | |||
47 | rsbs \irqnr,\irqnr,#31 @ recommend by RMK | 27 | rsbs \irqnr,\irqnr,#31 @ recommend by RMK |
48 | add \irqnr,\irqnr,#IRQ_IOP331_XINT8 | 28 | add \irqnr,\irqnr,#IRQ_IOP331_XINT8 |
49 | b 1001f | 29 | b 1001f |
50 | 1002: clz \irqnr, \irqstat | 30 | 1002: clz \irqnr, \irqstat |
51 | rsbs \irqnr,\irqnr,#31 @ recommend by RMK | 31 | rsbs \irqnr,\irqnr,#31 @ recommend by RMK |
52 | add \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT | 32 | add \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT |
53 | 1001: | 33 | 1001: |
54 | .endm | 34 | .endm |
55 | |||
56 | #endif | ||
57 | |||
diff --git a/include/asm-arm/arch-iop33x/hardware.h b/include/asm-arm/arch-iop33x/hardware.h new file mode 100644 index 000000000000..4a457084c5c6 --- /dev/null +++ b/include/asm-arm/arch-iop33x/hardware.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/hardware.h | ||
3 | */ | ||
4 | #ifndef __ASM_ARCH_HARDWARE_H | ||
5 | #define __ASM_ARCH_HARDWARE_H | ||
6 | |||
7 | #include <asm/types.h> | ||
8 | |||
9 | /* | ||
10 | * Note about PCI IO space mappings | ||
11 | * | ||
12 | * To make IO space accesses efficient, we store virtual addresses in | ||
13 | * the IO resources. | ||
14 | * | ||
15 | * The PCI IO space is located at virtual 0xfe000000 from physical | ||
16 | * 0x90000000. The PCI BARs must be programmed with physical addresses, | ||
17 | * but when we read them, we convert them to virtual addresses. See | ||
18 | * arch/arm/mach-iop33x/pci.c | ||
19 | */ | ||
20 | |||
21 | #define pcibios_assign_all_busses() 1 | ||
22 | |||
23 | |||
24 | /* | ||
25 | * The min PCI I/O and MEM space are dependent on what specific | ||
26 | * chipset/platform we are running on, so instead of hardcoding with | ||
27 | * #ifdefs, we just fill these in the platform level PCI init code. | ||
28 | */ | ||
29 | #ifndef __ASSEMBLY__ | ||
30 | extern unsigned long iop3xx_pcibios_min_io; | ||
31 | extern unsigned long iop3xx_pcibios_min_mem; | ||
32 | |||
33 | extern unsigned int processor_id; | ||
34 | #endif | ||
35 | |||
36 | /* | ||
37 | * We just set these to zero since they are really bogus anyways | ||
38 | */ | ||
39 | #define PCIBIOS_MIN_IO (iop3xx_pcibios_min_io) | ||
40 | #define PCIBIOS_MIN_MEM (iop3xx_pcibios_min_mem) | ||
41 | |||
42 | /* | ||
43 | * Generic chipset bits | ||
44 | * | ||
45 | */ | ||
46 | #include "iop331.h" | ||
47 | |||
48 | /* | ||
49 | * Board specific bits | ||
50 | */ | ||
51 | #include "iq80331.h" | ||
52 | #include "iq80332.h" | ||
53 | |||
54 | #endif /* _ASM_ARCH_HARDWARE_H */ | ||
diff --git a/include/asm-arm/arch-iop33x/io.h b/include/asm-arm/arch-iop33x/io.h new file mode 100644 index 000000000000..a9949d5d4953 --- /dev/null +++ b/include/asm-arm/arch-iop33x/io.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/io.h | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARM_ARCH_IO_H | ||
12 | #define __ASM_ARM_ARCH_IO_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | ||
17 | |||
18 | #define __io(p) ((void __iomem *)(p)) | ||
19 | #define __mem_pci(a) (a) | ||
20 | |||
21 | #endif | ||
diff --git a/include/asm-arm/arch-iop3xx/iop331.h b/include/asm-arm/arch-iop33x/iop331.h index 4d7bcc62cb3e..780b707edb1e 100644 --- a/include/asm-arm/arch-iop3xx/iop331.h +++ b/include/asm-arm/arch-iop33x/iop331.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iop331.h | 2 | * linux/include/asm/arch-iop33x/iop331.h |
3 | * | 3 | * |
4 | * Intel IOP331 Chip definitions | 4 | * Intel IOP331 Chip definitions |
5 | * | 5 | * |
@@ -20,12 +20,7 @@ | |||
20 | * IOP3xx variants but behave slightly differently on each. | 20 | * IOP3xx variants but behave slightly differently on each. |
21 | */ | 21 | */ |
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | #ifdef CONFIG_ARCH_IOP33X | 23 | #define iop_is_331() 1 |
24 | /*#define iop_is_331() ((processor_id & 0xffffffb0) == 0x69054090) */ | ||
25 | #define iop_is_331() ((processor_id & 0xffffff30) == 0x69054010) | ||
26 | #else | ||
27 | #define iop_is_331() 0 | ||
28 | #endif | ||
29 | #endif | 24 | #endif |
30 | 25 | ||
31 | /* | 26 | /* |
diff --git a/include/asm-arm/arch-iop3xx/iq80331.h b/include/asm-arm/arch-iop33x/iq80331.h index 0668e78d483e..bda7ab6d55cf 100644 --- a/include/asm-arm/arch-iop3xx/iq80331.h +++ b/include/asm-arm/arch-iop33x/iq80331.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iq80331.h | 2 | * linux/include/asm/arch-iop33x/iq80331.h |
3 | * | 3 | * |
4 | * Intel IQ80331 evaluation board registers | 4 | * Intel IQ80331 evaluation board registers |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/arch-iop3xx/iq80332.h b/include/asm-arm/arch-iop33x/iq80332.h index e5fff1775d1a..f728e04378ab 100644 --- a/include/asm-arm/arch-iop3xx/iq80332.h +++ b/include/asm-arm/arch-iop33x/iq80332.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm/arch-iop3xx/iq80332.h | 2 | * linux/include/asm/arch-iop33x/iq80332.h |
3 | * | 3 | * |
4 | * Intel IQ80332 evaluation board registers | 4 | * Intel IQ80332 evaluation board registers |
5 | */ | 5 | */ |
diff --git a/include/asm-arm/arch-iop3xx/iop331-irqs.h b/include/asm-arm/arch-iop33x/irqs.h index 7135ad7e335e..45856a12815a 100644 --- a/include/asm-arm/arch-iop3xx/iop331-irqs.h +++ b/include/asm-arm/arch-iop33x/irqs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/irqs.h | 2 | * linux/include/asm-arm/arch-iop33x/irqs.h |
3 | * | 3 | * |
4 | * Author: Dave Jiang (dave.jiang@intel.com) | 4 | * Author: Dave Jiang (dave.jiang@intel.com) |
5 | * Copyright: (C) 2003 Intel Corp. | 5 | * Copyright: (C) 2003 Intel Corp. |
@@ -9,8 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #ifndef _IOP331_IRQS_H_ | 12 | #ifndef _IRQS_H_ |
13 | #define _IOP331_IRQS_H_ | 13 | #define _IRQS_H_ |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * IOP80331 chipset interrupts | 16 | * IOP80331 chipset interrupts |
@@ -86,9 +86,7 @@ | |||
86 | #define IRQ_IOP331_MSG_ERR IOP331_IRQ(62) // 30 | 86 | #define IRQ_IOP331_MSG_ERR IOP331_IRQ(62) // 30 |
87 | #define IRQ_IOP331_HPI IOP331_IRQ(63) // 31 | 87 | #define IRQ_IOP331_HPI IOP331_IRQ(63) // 31 |
88 | 88 | ||
89 | #define NR_IOP331_IRQS (IOP331_IRQ(63) + 1) | 89 | #define NR_IRQS (IOP331_IRQ(63) + 1) |
90 | |||
91 | #define NR_IRQS NR_IOP331_IRQS | ||
92 | 90 | ||
93 | 91 | ||
94 | /* | 92 | /* |
@@ -129,4 +127,4 @@ | |||
129 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 | 127 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 |
130 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 | 128 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 |
131 | 129 | ||
132 | #endif // _IOP331_IRQ_H_ | 130 | #endif // _IRQ_H_ |
diff --git a/include/asm-arm/arch-iop33x/memory.h b/include/asm-arm/arch-iop33x/memory.h new file mode 100644 index 000000000000..5e47164934ce --- /dev/null +++ b/include/asm-arm/arch-iop33x/memory.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #include <asm/hardware.h> | ||
9 | |||
10 | /* | ||
11 | * Physical DRAM offset. | ||
12 | */ | ||
13 | #define PHYS_OFFSET UL(0x00000000) | ||
14 | |||
15 | /* | ||
16 | * Virtual view <-> PCI DMA view memory address translations | ||
17 | * virt_to_bus: Used to translate the virtual address to an | ||
18 | * address suitable to be passed to set_dma_addr | ||
19 | * bus_to_virt: Used to convert an address for DMA operations | ||
20 | * to an address that the kernel can use. | ||
21 | */ | ||
22 | #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP331_IATVR2)) | ((*IOP331_IABAR2) & 0xfffffff0)) | ||
23 | #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP331_IALR2)) | ( *IOP331_IATVR2))) | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/include/asm-arm/arch-iop33x/system.h b/include/asm-arm/arch-iop33x/system.h new file mode 100644 index 000000000000..43cc787ea629 --- /dev/null +++ b/include/asm-arm/arch-iop33x/system.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/system.h | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | static inline void arch_idle(void) | ||
12 | { | ||
13 | cpu_do_idle(); | ||
14 | } | ||
15 | |||
16 | |||
17 | static inline void arch_reset(char mode) | ||
18 | { | ||
19 | *IOP331_PCSR = 0x30; | ||
20 | |||
21 | if ( 1 && mode == 's') { | ||
22 | /* Jump into ROM at address 0 */ | ||
23 | cpu_reset(0); | ||
24 | } else { | ||
25 | /* No on-chip reset capability */ | ||
26 | cpu_reset(0); | ||
27 | } | ||
28 | } | ||
29 | |||
diff --git a/include/asm-arm/arch-iop33x/timex.h b/include/asm-arm/arch-iop33x/timex.h new file mode 100644 index 000000000000..cc8085fa2a1e --- /dev/null +++ b/include/asm-arm/arch-iop33x/timex.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/timex.h | ||
3 | * | ||
4 | * IOP3xx architecture timex specifications | ||
5 | */ | ||
6 | #include <asm/hardware.h> | ||
7 | |||
8 | #define CLOCK_TICK_RATE IOP331_TICK_RATE | ||
diff --git a/include/asm-arm/arch-iop33x/uncompress.h b/include/asm-arm/arch-iop33x/uncompress.h new file mode 100644 index 000000000000..62904ae3b038 --- /dev/null +++ b/include/asm-arm/arch-iop33x/uncompress.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/uncompress.h | ||
3 | */ | ||
4 | #include <asm/types.h> | ||
5 | #include <asm/mach-types.h> | ||
6 | #include <linux/serial_reg.h> | ||
7 | #include <asm/hardware.h> | ||
8 | |||
9 | static volatile u32 *uart_base; | ||
10 | |||
11 | #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) | ||
12 | |||
13 | static inline void putc(char c) | ||
14 | { | ||
15 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) | ||
16 | barrier(); | ||
17 | *uart_base = c; | ||
18 | } | ||
19 | |||
20 | static inline void flush(void) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | ||
25 | { | ||
26 | if (machine_is_iq80331() || machine_is_iq80332()) | ||
27 | uart_base = (volatile u32 *)IOP331_UART0_PHYS; | ||
28 | else | ||
29 | uart_base = (volatile u32 *)0xfe800000; | ||
30 | } | ||
31 | |||
32 | /* | ||
33 | * nothing to do | ||
34 | */ | ||
35 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) | ||
36 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-iop33x/vmalloc.h b/include/asm-arm/arch-iop33x/vmalloc.h new file mode 100644 index 000000000000..b5092027449e --- /dev/null +++ b/include/asm-arm/arch-iop33x/vmalloc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop33x/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * Just any arbitrary offset to the start of the vmalloc VM area: the | ||
7 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
8 | * physical memory until the kernel virtual memory starts. That means that | ||
9 | * any out-of-bounds memory accesses will hopefully be caught. | ||
10 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
11 | * area for the same reason. ;) | ||
12 | */ | ||
13 | //#define VMALLOC_END (0xe8000000) | ||
14 | /* increase usable physical RAM to ~992M per RMK */ | ||
15 | #define VMALLOC_END (0xfe000000) | ||
16 | |||
diff --git a/include/asm-arm/arch-iop3xx/debug-macro.S b/include/asm-arm/arch-iop3xx/debug-macro.S deleted file mode 100644 index dcc6856d14ff..000000000000 --- a/include/asm-arm/arch-iop3xx/debug-macro.S +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* linux/include/asm-arm/arch-iop3xx/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mov \rx, #0xfe000000 @ physical | ||
16 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) | ||
17 | orr \rx, \rx, #0x00800000 @ location of the UART | ||
18 | #elif defined(CONFIG_ARCH_IOP33X) | ||
19 | mrc p15, 0, \rx, c1, c0 | ||
20 | tst \rx, #1 @ MMU enabled? | ||
21 | moveq \rx, #0x000fe000 @ Physical Base | ||
22 | movne \rx, #0 | ||
23 | orr \rx, \rx, #0xfe000000 | ||
24 | orr \rx, \rx, #0x00f00000 @ Virtual Base | ||
25 | orr \rx, \rx, #0x00001700 @ location of the UART | ||
26 | #else | ||
27 | #error Unknown IOP3XX implementation | ||
28 | #endif | ||
29 | .endm | ||
30 | |||
31 | #if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331) | ||
32 | #define FLOW_CONTROL | ||
33 | #endif | ||
34 | #define UART_SHIFT 0 | ||
35 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-iop3xx/irqs.h b/include/asm-arm/arch-iop3xx/irqs.h deleted file mode 100644 index 4f7c7aa87b4a..000000000000 --- a/include/asm-arm/arch-iop3xx/irqs.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop3xx/irqs.h | ||
3 | * | ||
4 | * Copyright: (C) 2001-2003 MontaVista Software Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * Chipset-specific bits | ||
14 | */ | ||
15 | #ifdef CONFIG_ARCH_IOP32X | ||
16 | #include "iop321-irqs.h" | ||
17 | #endif | ||
18 | |||
19 | #ifdef CONFIG_ARCH_IOP33X | ||
20 | #include "iop331-irqs.h" | ||
21 | #endif | ||
diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h deleted file mode 100644 index 14ca8d0f7b29..000000000000 --- a/include/asm-arm/arch-iop3xx/timex.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop3xx/timex.h | ||
3 | * | ||
4 | * IOP3xx architecture timex specifications | ||
5 | */ | ||
6 | #include <asm/hardware.h> | ||
7 | |||
8 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) | ||
9 | |||
10 | #define CLOCK_TICK_RATE IOP321_TICK_RATE | ||
11 | |||
12 | #elif defined(CONFIG_ARCH_IQ80331) || defined(CONFIG_MACH_IQ80332) | ||
13 | |||
14 | #define CLOCK_TICK_RATE IOP331_TICK_RATE | ||
15 | |||
16 | #else | ||
17 | |||
18 | #error "No IOP3xx timex information for this architecture" | ||
19 | |||
20 | #endif | ||
diff --git a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h deleted file mode 100644 index 066c16bc1250..000000000000 --- a/include/asm-arm/arch-iop3xx/uncompress.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop3xx/uncompress.h | ||
3 | */ | ||
4 | #include <asm/types.h> | ||
5 | #include <asm/mach-types.h> | ||
6 | #include <linux/serial_reg.h> | ||
7 | #include <asm/hardware.h> | ||
8 | |||
9 | #ifdef CONFIG_ARCH_IOP32X | ||
10 | #define UTYPE unsigned char * | ||
11 | #elif defined(CONFIG_ARCH_IOP33X) | ||
12 | #define UTYPE u32 * | ||
13 | #else | ||
14 | #error "Missing IOP3xx arch type def" | ||
15 | #endif | ||
16 | |||
17 | static volatile UTYPE uart_base; | ||
18 | |||
19 | #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) | ||
20 | |||
21 | static inline void putc(char c) | ||
22 | { | ||
23 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) | ||
24 | barrier(); | ||
25 | *uart_base = c; | ||
26 | } | ||
27 | |||
28 | static inline void flush(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | ||
33 | { | ||
34 | if(machine_is_iq80321()) | ||
35 | uart_base = (volatile UTYPE)IQ80321_UART; | ||
36 | else if(machine_is_iq31244()) | ||
37 | uart_base = (volatile UTYPE)IQ31244_UART; | ||
38 | else if(machine_is_iq80331() || machine_is_iq80332()) | ||
39 | uart_base = (volatile UTYPE)IOP331_UART0_PHYS; | ||
40 | else | ||
41 | uart_base = (volatile UTYPE)0xfe800000; | ||
42 | } | ||
43 | |||
44 | /* | ||
45 | * nothing to do | ||
46 | */ | ||
47 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) | ||
48 | #define arch_decomp_wdog() | ||