diff options
129 files changed, 865 insertions, 7861 deletions
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX index 91c24a1e8a9e..36420e116c90 100644 --- a/Documentation/arm/00-INDEX +++ b/Documentation/arm/00-INDEX | |||
@@ -4,8 +4,6 @@ Booting | |||
4 | - requirements for booting | 4 | - requirements for booting |
5 | Interrupts | 5 | Interrupts |
6 | - ARM Interrupt subsystem documentation | 6 | - ARM Interrupt subsystem documentation |
7 | IXP2000 | ||
8 | - Release Notes for Linux on Intel's IXP2000 Network Processor | ||
9 | msm | 7 | msm |
10 | - MSM specific documentation | 8 | - MSM specific documentation |
11 | Netwinder | 9 | Netwinder |
diff --git a/Documentation/arm/IXP2000 b/Documentation/arm/IXP2000 deleted file mode 100644 index 68d21d92a30b..000000000000 --- a/Documentation/arm/IXP2000 +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | |||
2 | ------------------------------------------------------------------------- | ||
3 | Release Notes for Linux on Intel's IXP2000 Network Processor | ||
4 | |||
5 | Maintained by Deepak Saxena <dsaxena@plexity.net> | ||
6 | ------------------------------------------------------------------------- | ||
7 | |||
8 | 1. Overview | ||
9 | |||
10 | Intel's IXP2000 family of NPUs (IXP2400, IXP2800, IXP2850) is designed | ||
11 | for high-performance network applications such high-availability | ||
12 | telecom systems. In addition to an XScale core, it contains up to 8 | ||
13 | "MicroEngines" that run special code, several high-end networking | ||
14 | interfaces (UTOPIA, SPI, etc), a PCI host bridge, one serial port, | ||
15 | flash interface, and some other odds and ends. For more information, see: | ||
16 | |||
17 | http://developer.intel.com | ||
18 | |||
19 | 2. Linux Support | ||
20 | |||
21 | Linux currently supports the following features on the IXP2000 NPUs: | ||
22 | |||
23 | - On-chip serial | ||
24 | - PCI | ||
25 | - Flash (MTD/JFFS2) | ||
26 | - I2C through GPIO | ||
27 | - Timers (watchdog, OS) | ||
28 | |||
29 | That is about all we can support under Linux ATM b/c the core networking | ||
30 | components of the chip are accessed via Intel's closed source SDK. | ||
31 | Please contact Intel directly on issues with using those. There is | ||
32 | also a mailing list run by some folks at Princeton University that might | ||
33 | be of help: https://lists.cs.princeton.edu/mailman/listinfo/ixp2xxx | ||
34 | |||
35 | WHATEVER YOU DO, DO NOT POST EMAIL TO THE LINUX-ARM OR LINUX-ARM-KERNEL | ||
36 | MAILING LISTS REGARDING THE INTEL SDK. | ||
37 | |||
38 | 3. Supported Platforms | ||
39 | |||
40 | - Intel IXDP2400 Reference Platform | ||
41 | - Intel IXDP2800 Reference Platform | ||
42 | - Intel IXDP2401 Reference Platform | ||
43 | - Intel IXDP2801 Reference Platform | ||
44 | - RadiSys ENP-2611 | ||
45 | |||
46 | 4. Usage Notes | ||
47 | |||
48 | - The IXP2000 platforms usually have rather complex PCI bus topologies | ||
49 | with large memory space requirements. In addition, b/c of the way the | ||
50 | Intel SDK is designed, devices are enumerated in a very specific | ||
51 | way. B/c of this this, we use "pci=firmware" option in the kernel | ||
52 | command line so that we do not re-enumerate the bus. | ||
53 | |||
54 | - IXDP2x01 systems have variable clock tick rates that we cannot determine | ||
55 | via HW registers. The "ixdp2x01_clk=XXX" cmd line options allow you | ||
56 | to pass the clock rate to the board port. | ||
57 | |||
58 | 5. Thanks | ||
59 | |||
60 | The IXP2000 work has been funded by Intel Corp. and MontaVista Software, Inc. | ||
61 | |||
62 | The following people have contributed patches/comments/etc: | ||
63 | |||
64 | Naeem F. Afzal | ||
65 | Lennert Buytenhek | ||
66 | Jeffrey Daly | ||
67 | |||
68 | ------------------------------------------------------------------------- | ||
69 | Last Update: 8/09/2004 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 1a2f8f5823e0..069ec4030395 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -640,13 +640,6 @@ S: Maintained | |||
640 | F: drivers/amba/ | 640 | F: drivers/amba/ |
641 | F: include/linux/amba/bus.h | 641 | F: include/linux/amba/bus.h |
642 | 642 | ||
643 | ARM/ADI ROADRUNNER MACHINE SUPPORT | ||
644 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
645 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
646 | S: Maintained | ||
647 | F: arch/arm/mach-ixp23xx/ | ||
648 | F: arch/arm/mach-ixp23xx/include/mach/ | ||
649 | |||
650 | ARM/ADS SPHERE MACHINE SUPPORT | 643 | ARM/ADS SPHERE MACHINE SUPPORT |
651 | M: Lennert Buytenhek <kernel@wantstofly.org> | 644 | M: Lennert Buytenhek <kernel@wantstofly.org> |
652 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 645 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -859,21 +852,11 @@ M: Dan Williams <dan.j.williams@intel.com> | |||
859 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 852 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
860 | S: Maintained | 853 | S: Maintained |
861 | 854 | ||
862 | ARM/INTEL IXP2000 ARM ARCHITECTURE | ||
863 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
864 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
865 | S: Maintained | ||
866 | |||
867 | ARM/INTEL IXDP2850 MACHINE SUPPORT | 855 | ARM/INTEL IXDP2850 MACHINE SUPPORT |
868 | M: Lennert Buytenhek <kernel@wantstofly.org> | 856 | M: Lennert Buytenhek <kernel@wantstofly.org> |
869 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 857 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
870 | S: Maintained | 858 | S: Maintained |
871 | 859 | ||
872 | ARM/INTEL IXP23XX ARM ARCHITECTURE | ||
873 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
874 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
875 | S: Maintained | ||
876 | |||
877 | ARM/INTEL IXP4XX ARM ARCHITECTURE | 860 | ARM/INTEL IXP4XX ARM ARCHITECTURE |
878 | M: Imre Kaloz <kaloz@openwrt.org> | 861 | M: Imre Kaloz <kaloz@openwrt.org> |
879 | M: Krzysztof Halasa <khc@pm.waw.pl> | 862 | M: Krzysztof Halasa <khc@pm.waw.pl> |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf006d40342c..a231594ba44e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -340,8 +340,8 @@ config ARCH_AT91 | |||
340 | select IRQ_DOMAIN | 340 | select IRQ_DOMAIN |
341 | select NEED_MACH_IO_H if PCCARD | 341 | select NEED_MACH_IO_H if PCCARD |
342 | help | 342 | help |
343 | This enables support for systems based on the Atmel AT91RM9200, | 343 | This enables support for systems based on Atmel |
344 | AT91SAM9 processors. | 344 | AT91RM9200 and AT91SAM9* processors. |
345 | 345 | ||
346 | config ARCH_BCMRING | 346 | config ARCH_BCMRING |
347 | bool "Broadcom BCMRING" | 347 | bool "Broadcom BCMRING" |
@@ -528,28 +528,6 @@ config ARCH_IOP33X | |||
528 | help | 528 | help |
529 | Support for Intel's IOP33X (XScale) family of processors. | 529 | Support for Intel's IOP33X (XScale) family of processors. |
530 | 530 | ||
531 | config ARCH_IXP23XX | ||
532 | bool "IXP23XX-based" | ||
533 | depends on MMU | ||
534 | select CPU_XSC3 | ||
535 | select PCI | ||
536 | select ARCH_USES_GETTIMEOFFSET | ||
537 | select NEED_MACH_IO_H | ||
538 | select NEED_MACH_MEMORY_H | ||
539 | help | ||
540 | Support for Intel's IXP23xx (XScale) family of processors. | ||
541 | |||
542 | config ARCH_IXP2000 | ||
543 | bool "IXP2400/2800-based" | ||
544 | depends on MMU | ||
545 | select CPU_XSCALE | ||
546 | select PCI | ||
547 | select ARCH_USES_GETTIMEOFFSET | ||
548 | select NEED_MACH_IO_H | ||
549 | select NEED_MACH_MEMORY_H | ||
550 | help | ||
551 | Support for Intel's IXP2400/2800 (XScale) family of processors. | ||
552 | |||
553 | config ARCH_IXP4XX | 531 | config ARCH_IXP4XX |
554 | bool "IXP4xx-based" | 532 | bool "IXP4xx-based" |
555 | depends on MMU | 533 | depends on MMU |
@@ -1046,10 +1024,6 @@ source "arch/arm/mach-iop13xx/Kconfig" | |||
1046 | 1024 | ||
1047 | source "arch/arm/mach-ixp4xx/Kconfig" | 1025 | source "arch/arm/mach-ixp4xx/Kconfig" |
1048 | 1026 | ||
1049 | source "arch/arm/mach-ixp2000/Kconfig" | ||
1050 | |||
1051 | source "arch/arm/mach-ixp23xx/Kconfig" | ||
1052 | |||
1053 | source "arch/arm/mach-kirkwood/Kconfig" | 1027 | source "arch/arm/mach-kirkwood/Kconfig" |
1054 | 1028 | ||
1055 | source "arch/arm/mach-ks8695/Kconfig" | 1029 | source "arch/arm/mach-ks8695/Kconfig" |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 047a20780fc1..a0c40a0986cd 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -149,8 +149,6 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator | |||
149 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx | 149 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx |
150 | machine-$(CONFIG_ARCH_IOP32X) := iop32x | 150 | machine-$(CONFIG_ARCH_IOP32X) := iop32x |
151 | machine-$(CONFIG_ARCH_IOP33X) := iop33x | 151 | machine-$(CONFIG_ARCH_IOP33X) := iop33x |
152 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 | ||
153 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | ||
154 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 152 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
155 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood | 153 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood |
156 | machine-$(CONFIG_ARCH_KS8695) := ks8695 | 154 | machine-$(CONFIG_ARCH_KS8695) := ks8695 |
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index aa5ee49c5c5a..6ab0599c02dd 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S | |||
@@ -32,10 +32,3 @@ __XScale_start: | |||
32 | bic r0, r0, #0x1000 @ clear Icache | 32 | bic r0, r0, #0x1000 @ clear Icache |
33 | mcr p15, 0, r0, c1, c0, 0 | 33 | mcr p15, 0, r0, c1, c0, 0 |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_IXP2000 | ||
36 | mov r1, #-1 | ||
37 | mov r0, #0xd6000000 | ||
38 | str r1, [r0, #0x14] | ||
39 | str r1, [r0, #0x18] | ||
40 | #endif | ||
41 | |||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 215816f1775f..e8a4e58f1b82 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -11,7 +11,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o | |||
11 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o | 11 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o |
12 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o | 12 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o |
13 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o | 13 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o |
14 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | ||
15 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | ||
16 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 14 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
17 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 15 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c deleted file mode 100644 index bef408f3d76c..000000000000 --- a/arch/arm/common/uengine.c +++ /dev/null | |||
@@ -1,507 +0,0 @@ | |||
1 | /* | ||
2 | * Generic library functions for the microengines found on the Intel | ||
3 | * IXP2000 series of network processors. | ||
4 | * | ||
5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * Dedicated to Marija Kulikova. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU Lesser General Public License as | ||
10 | * published by the Free Software Foundation; either version 2.1 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <mach/hardware.h> | ||
21 | #include <asm/hardware/uengine.h> | ||
22 | |||
23 | #if defined(CONFIG_ARCH_IXP2000) | ||
24 | #define IXP_UENGINE_CSR_VIRT_BASE IXP2000_UENGINE_CSR_VIRT_BASE | ||
25 | #define IXP_PRODUCT_ID IXP2000_PRODUCT_ID | ||
26 | #define IXP_MISC_CONTROL IXP2000_MISC_CONTROL | ||
27 | #define IXP_RESET1 IXP2000_RESET1 | ||
28 | #else | ||
29 | #if defined(CONFIG_ARCH_IXP23XX) | ||
30 | #define IXP_UENGINE_CSR_VIRT_BASE IXP23XX_UENGINE_CSR_VIRT_BASE | ||
31 | #define IXP_PRODUCT_ID IXP23XX_PRODUCT_ID | ||
32 | #define IXP_MISC_CONTROL IXP23XX_MISC_CONTROL | ||
33 | #define IXP_RESET1 IXP23XX_RESET1 | ||
34 | #else | ||
35 | #error unknown platform | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | #define USTORE_ADDRESS 0x000 | ||
40 | #define USTORE_DATA_LOWER 0x004 | ||
41 | #define USTORE_DATA_UPPER 0x008 | ||
42 | #define CTX_ENABLES 0x018 | ||
43 | #define CC_ENABLE 0x01c | ||
44 | #define CSR_CTX_POINTER 0x020 | ||
45 | #define INDIRECT_CTX_STS 0x040 | ||
46 | #define ACTIVE_CTX_STS 0x044 | ||
47 | #define INDIRECT_CTX_SIG_EVENTS 0x048 | ||
48 | #define INDIRECT_CTX_WAKEUP_EVENTS 0x050 | ||
49 | #define NN_PUT 0x080 | ||
50 | #define NN_GET 0x084 | ||
51 | #define TIMESTAMP_LOW 0x0c0 | ||
52 | #define TIMESTAMP_HIGH 0x0c4 | ||
53 | #define T_INDEX_BYTE_INDEX 0x0f4 | ||
54 | #define LOCAL_CSR_STATUS 0x180 | ||
55 | |||
56 | u32 ixp2000_uengine_mask; | ||
57 | |||
58 | static void *ixp2000_uengine_csr_area(int uengine) | ||
59 | { | ||
60 | return ((void *)IXP_UENGINE_CSR_VIRT_BASE) + (uengine << 10); | ||
61 | } | ||
62 | |||
63 | /* | ||
64 | * LOCAL_CSR_STATUS=1 after a read or write to a microengine's CSR | ||
65 | * space means that the microengine we tried to access was also trying | ||
66 | * to access its own CSR space on the same clock cycle as we did. When | ||
67 | * this happens, we lose the arbitration process by default, and the | ||
68 | * read or write we tried to do was not actually performed, so we try | ||
69 | * again until it succeeds. | ||
70 | */ | ||
71 | u32 ixp2000_uengine_csr_read(int uengine, int offset) | ||
72 | { | ||
73 | void *uebase; | ||
74 | u32 *local_csr_status; | ||
75 | u32 *reg; | ||
76 | u32 value; | ||
77 | |||
78 | uebase = ixp2000_uengine_csr_area(uengine); | ||
79 | |||
80 | local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS); | ||
81 | reg = (u32 *)(uebase + offset); | ||
82 | do { | ||
83 | value = ixp2000_reg_read(reg); | ||
84 | } while (ixp2000_reg_read(local_csr_status) & 1); | ||
85 | |||
86 | return value; | ||
87 | } | ||
88 | EXPORT_SYMBOL(ixp2000_uengine_csr_read); | ||
89 | |||
90 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value) | ||
91 | { | ||
92 | void *uebase; | ||
93 | u32 *local_csr_status; | ||
94 | u32 *reg; | ||
95 | |||
96 | uebase = ixp2000_uengine_csr_area(uengine); | ||
97 | |||
98 | local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS); | ||
99 | reg = (u32 *)(uebase + offset); | ||
100 | do { | ||
101 | ixp2000_reg_write(reg, value); | ||
102 | } while (ixp2000_reg_read(local_csr_status) & 1); | ||
103 | } | ||
104 | EXPORT_SYMBOL(ixp2000_uengine_csr_write); | ||
105 | |||
106 | void ixp2000_uengine_reset(u32 uengine_mask) | ||
107 | { | ||
108 | u32 value; | ||
109 | |||
110 | value = ixp2000_reg_read(IXP_RESET1) & ~ixp2000_uengine_mask; | ||
111 | |||
112 | uengine_mask &= ixp2000_uengine_mask; | ||
113 | ixp2000_reg_wrb(IXP_RESET1, value | uengine_mask); | ||
114 | ixp2000_reg_wrb(IXP_RESET1, value); | ||
115 | } | ||
116 | EXPORT_SYMBOL(ixp2000_uengine_reset); | ||
117 | |||
118 | void ixp2000_uengine_set_mode(int uengine, u32 mode) | ||
119 | { | ||
120 | /* | ||
121 | * CTL_STR_PAR_EN: unconditionally enable parity checking on | ||
122 | * control store. | ||
123 | */ | ||
124 | mode |= 0x10000000; | ||
125 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mode); | ||
126 | |||
127 | /* | ||
128 | * Enable updating of condition codes. | ||
129 | */ | ||
130 | ixp2000_uengine_csr_write(uengine, CC_ENABLE, 0x00002000); | ||
131 | |||
132 | /* | ||
133 | * Initialise other per-microengine registers. | ||
134 | */ | ||
135 | ixp2000_uengine_csr_write(uengine, NN_PUT, 0x00); | ||
136 | ixp2000_uengine_csr_write(uengine, NN_GET, 0x00); | ||
137 | ixp2000_uengine_csr_write(uengine, T_INDEX_BYTE_INDEX, 0); | ||
138 | } | ||
139 | EXPORT_SYMBOL(ixp2000_uengine_set_mode); | ||
140 | |||
141 | static int make_even_parity(u32 x) | ||
142 | { | ||
143 | return hweight32(x) & 1; | ||
144 | } | ||
145 | |||
146 | static void ustore_write(int uengine, u64 insn) | ||
147 | { | ||
148 | /* | ||
149 | * Generate even parity for top and bottom 20 bits. | ||
150 | */ | ||
151 | insn |= (u64)make_even_parity((insn >> 20) & 0x000fffff) << 41; | ||
152 | insn |= (u64)make_even_parity(insn & 0x000fffff) << 40; | ||
153 | |||
154 | /* | ||
155 | * Write to microstore. The second write auto-increments | ||
156 | * the USTORE_ADDRESS index register. | ||
157 | */ | ||
158 | ixp2000_uengine_csr_write(uengine, USTORE_DATA_LOWER, (u32)insn); | ||
159 | ixp2000_uengine_csr_write(uengine, USTORE_DATA_UPPER, (u32)(insn >> 32)); | ||
160 | } | ||
161 | |||
162 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns) | ||
163 | { | ||
164 | int i; | ||
165 | |||
166 | /* | ||
167 | * Start writing to microstore at address 0. | ||
168 | */ | ||
169 | ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x80000000); | ||
170 | for (i = 0; i < insns; i++) { | ||
171 | u64 insn; | ||
172 | |||
173 | insn = (((u64)ucode[0]) << 32) | | ||
174 | (((u64)ucode[1]) << 24) | | ||
175 | (((u64)ucode[2]) << 16) | | ||
176 | (((u64)ucode[3]) << 8) | | ||
177 | ((u64)ucode[4]); | ||
178 | ucode += 5; | ||
179 | |||
180 | ustore_write(uengine, insn); | ||
181 | } | ||
182 | |||
183 | /* | ||
184 | * Pad with a few NOPs at the end (to avoid the microengine | ||
185 | * aborting as it prefetches beyond the last instruction), unless | ||
186 | * we run off the end of the instruction store first, at which | ||
187 | * point the address register will wrap back to zero. | ||
188 | */ | ||
189 | for (i = 0; i < 4; i++) { | ||
190 | u32 addr; | ||
191 | |||
192 | addr = ixp2000_uengine_csr_read(uengine, USTORE_ADDRESS); | ||
193 | if (addr == 0x80000000) | ||
194 | break; | ||
195 | ustore_write(uengine, 0xf0000c0300ULL); | ||
196 | } | ||
197 | |||
198 | /* | ||
199 | * End programming. | ||
200 | */ | ||
201 | ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x00000000); | ||
202 | } | ||
203 | EXPORT_SYMBOL(ixp2000_uengine_load_microcode); | ||
204 | |||
205 | void ixp2000_uengine_init_context(int uengine, int context, int pc) | ||
206 | { | ||
207 | /* | ||
208 | * Select the right context for indirect access. | ||
209 | */ | ||
210 | ixp2000_uengine_csr_write(uengine, CSR_CTX_POINTER, context); | ||
211 | |||
212 | /* | ||
213 | * Initialise signal masks to immediately go to Ready state. | ||
214 | */ | ||
215 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_SIG_EVENTS, 1); | ||
216 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_WAKEUP_EVENTS, 1); | ||
217 | |||
218 | /* | ||
219 | * Set program counter. | ||
220 | */ | ||
221 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_STS, pc); | ||
222 | } | ||
223 | EXPORT_SYMBOL(ixp2000_uengine_init_context); | ||
224 | |||
225 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask) | ||
226 | { | ||
227 | u32 mask; | ||
228 | |||
229 | /* | ||
230 | * Enable the specified context to go to Executing state. | ||
231 | */ | ||
232 | mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES); | ||
233 | mask |= ctx_mask << 8; | ||
234 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask); | ||
235 | } | ||
236 | EXPORT_SYMBOL(ixp2000_uengine_start_contexts); | ||
237 | |||
238 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask) | ||
239 | { | ||
240 | u32 mask; | ||
241 | |||
242 | /* | ||
243 | * Disable the Ready->Executing transition. Note that this | ||
244 | * does not stop the context until it voluntarily yields. | ||
245 | */ | ||
246 | mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES); | ||
247 | mask &= ~(ctx_mask << 8); | ||
248 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask); | ||
249 | } | ||
250 | EXPORT_SYMBOL(ixp2000_uengine_stop_contexts); | ||
251 | |||
252 | static int check_ixp_type(struct ixp2000_uengine_code *c) | ||
253 | { | ||
254 | u32 product_id; | ||
255 | u32 rev; | ||
256 | |||
257 | product_id = ixp2000_reg_read(IXP_PRODUCT_ID); | ||
258 | if (((product_id >> 16) & 0x1f) != 0) | ||
259 | return 0; | ||
260 | |||
261 | switch ((product_id >> 8) & 0xff) { | ||
262 | #ifdef CONFIG_ARCH_IXP2000 | ||
263 | case 0: /* IXP2800 */ | ||
264 | if (!(c->cpu_model_bitmask & 4)) | ||
265 | return 0; | ||
266 | break; | ||
267 | |||
268 | case 1: /* IXP2850 */ | ||
269 | if (!(c->cpu_model_bitmask & 8)) | ||
270 | return 0; | ||
271 | break; | ||
272 | |||
273 | case 2: /* IXP2400 */ | ||
274 | if (!(c->cpu_model_bitmask & 2)) | ||
275 | return 0; | ||
276 | break; | ||
277 | #endif | ||
278 | |||
279 | #ifdef CONFIG_ARCH_IXP23XX | ||
280 | case 4: /* IXP23xx */ | ||
281 | if (!(c->cpu_model_bitmask & 0x3f0)) | ||
282 | return 0; | ||
283 | break; | ||
284 | #endif | ||
285 | |||
286 | default: | ||
287 | return 0; | ||
288 | } | ||
289 | |||
290 | rev = product_id & 0xff; | ||
291 | if (rev < c->cpu_min_revision || rev > c->cpu_max_revision) | ||
292 | return 0; | ||
293 | |||
294 | return 1; | ||
295 | } | ||
296 | |||
297 | static void generate_ucode(u8 *ucode, u32 *gpr_a, u32 *gpr_b) | ||
298 | { | ||
299 | int offset; | ||
300 | int i; | ||
301 | |||
302 | offset = 0; | ||
303 | |||
304 | for (i = 0; i < 128; i++) { | ||
305 | u8 b3; | ||
306 | u8 b2; | ||
307 | u8 b1; | ||
308 | u8 b0; | ||
309 | |||
310 | b3 = (gpr_a[i] >> 24) & 0xff; | ||
311 | b2 = (gpr_a[i] >> 16) & 0xff; | ||
312 | b1 = (gpr_a[i] >> 8) & 0xff; | ||
313 | b0 = gpr_a[i] & 0xff; | ||
314 | |||
315 | /* immed[@ai, (b1 << 8) | b0] */ | ||
316 | /* 11110000 0000VVVV VVVV11VV VVVVVV00 1IIIIIII */ | ||
317 | ucode[offset++] = 0xf0; | ||
318 | ucode[offset++] = (b1 >> 4); | ||
319 | ucode[offset++] = (b1 << 4) | 0x0c | (b0 >> 6); | ||
320 | ucode[offset++] = (b0 << 2); | ||
321 | ucode[offset++] = 0x80 | i; | ||
322 | |||
323 | /* immed_w1[@ai, (b3 << 8) | b2] */ | ||
324 | /* 11110100 0100VVVV VVVV11VV VVVVVV00 1IIIIIII */ | ||
325 | ucode[offset++] = 0xf4; | ||
326 | ucode[offset++] = 0x40 | (b3 >> 4); | ||
327 | ucode[offset++] = (b3 << 4) | 0x0c | (b2 >> 6); | ||
328 | ucode[offset++] = (b2 << 2); | ||
329 | ucode[offset++] = 0x80 | i; | ||
330 | } | ||
331 | |||
332 | for (i = 0; i < 128; i++) { | ||
333 | u8 b3; | ||
334 | u8 b2; | ||
335 | u8 b1; | ||
336 | u8 b0; | ||
337 | |||
338 | b3 = (gpr_b[i] >> 24) & 0xff; | ||
339 | b2 = (gpr_b[i] >> 16) & 0xff; | ||
340 | b1 = (gpr_b[i] >> 8) & 0xff; | ||
341 | b0 = gpr_b[i] & 0xff; | ||
342 | |||
343 | /* immed[@bi, (b1 << 8) | b0] */ | ||
344 | /* 11110000 0000VVVV VVVV001I IIIIII11 VVVVVVVV */ | ||
345 | ucode[offset++] = 0xf0; | ||
346 | ucode[offset++] = (b1 >> 4); | ||
347 | ucode[offset++] = (b1 << 4) | 0x02 | (i >> 6); | ||
348 | ucode[offset++] = (i << 2) | 0x03; | ||
349 | ucode[offset++] = b0; | ||
350 | |||
351 | /* immed_w1[@bi, (b3 << 8) | b2] */ | ||
352 | /* 11110100 0100VVVV VVVV001I IIIIII11 VVVVVVVV */ | ||
353 | ucode[offset++] = 0xf4; | ||
354 | ucode[offset++] = 0x40 | (b3 >> 4); | ||
355 | ucode[offset++] = (b3 << 4) | 0x02 | (i >> 6); | ||
356 | ucode[offset++] = (i << 2) | 0x03; | ||
357 | ucode[offset++] = b2; | ||
358 | } | ||
359 | |||
360 | /* ctx_arb[kill] */ | ||
361 | ucode[offset++] = 0xe0; | ||
362 | ucode[offset++] = 0x00; | ||
363 | ucode[offset++] = 0x01; | ||
364 | ucode[offset++] = 0x00; | ||
365 | ucode[offset++] = 0x00; | ||
366 | } | ||
367 | |||
368 | static int set_initial_registers(int uengine, struct ixp2000_uengine_code *c) | ||
369 | { | ||
370 | int per_ctx_regs; | ||
371 | u32 *gpr_a; | ||
372 | u32 *gpr_b; | ||
373 | u8 *ucode; | ||
374 | int i; | ||
375 | |||
376 | gpr_a = kzalloc(128 * sizeof(u32), GFP_KERNEL); | ||
377 | gpr_b = kzalloc(128 * sizeof(u32), GFP_KERNEL); | ||
378 | ucode = kmalloc(513 * 5, GFP_KERNEL); | ||
379 | if (gpr_a == NULL || gpr_b == NULL || ucode == NULL) { | ||
380 | kfree(ucode); | ||
381 | kfree(gpr_b); | ||
382 | kfree(gpr_a); | ||
383 | return 1; | ||
384 | } | ||
385 | |||
386 | per_ctx_regs = 16; | ||
387 | if (c->uengine_parameters & IXP2000_UENGINE_4_CONTEXTS) | ||
388 | per_ctx_regs = 32; | ||
389 | |||
390 | for (i = 0; i < 256; i++) { | ||
391 | struct ixp2000_reg_value *r = c->initial_reg_values + i; | ||
392 | u32 *bank; | ||
393 | int inc; | ||
394 | int j; | ||
395 | |||
396 | if (r->reg == -1) | ||
397 | break; | ||
398 | |||
399 | bank = (r->reg & 0x400) ? gpr_b : gpr_a; | ||
400 | inc = (r->reg & 0x80) ? 128 : per_ctx_regs; | ||
401 | |||
402 | j = r->reg & 0x7f; | ||
403 | while (j < 128) { | ||
404 | bank[j] = r->value; | ||
405 | j += inc; | ||
406 | } | ||
407 | } | ||
408 | |||
409 | generate_ucode(ucode, gpr_a, gpr_b); | ||
410 | ixp2000_uengine_load_microcode(uengine, ucode, 513); | ||
411 | ixp2000_uengine_init_context(uengine, 0, 0); | ||
412 | ixp2000_uengine_start_contexts(uengine, 0x01); | ||
413 | for (i = 0; i < 100; i++) { | ||
414 | u32 status; | ||
415 | |||
416 | status = ixp2000_uengine_csr_read(uengine, ACTIVE_CTX_STS); | ||
417 | if (!(status & 0x80000000)) | ||
418 | break; | ||
419 | } | ||
420 | ixp2000_uengine_stop_contexts(uengine, 0x01); | ||
421 | |||
422 | kfree(ucode); | ||
423 | kfree(gpr_b); | ||
424 | kfree(gpr_a); | ||
425 | |||
426 | return !!(i == 100); | ||
427 | } | ||
428 | |||
429 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c) | ||
430 | { | ||
431 | int ctx; | ||
432 | |||
433 | if (!check_ixp_type(c)) | ||
434 | return 1; | ||
435 | |||
436 | if (!(ixp2000_uengine_mask & (1 << uengine))) | ||
437 | return 1; | ||
438 | |||
439 | ixp2000_uengine_reset(1 << uengine); | ||
440 | ixp2000_uengine_set_mode(uengine, c->uengine_parameters); | ||
441 | if (set_initial_registers(uengine, c)) | ||
442 | return 1; | ||
443 | ixp2000_uengine_load_microcode(uengine, c->insns, c->num_insns); | ||
444 | |||
445 | for (ctx = 0; ctx < 8; ctx++) | ||
446 | ixp2000_uengine_init_context(uengine, ctx, 0); | ||
447 | |||
448 | return 0; | ||
449 | } | ||
450 | EXPORT_SYMBOL(ixp2000_uengine_load); | ||
451 | |||
452 | |||
453 | static int __init ixp2000_uengine_init(void) | ||
454 | { | ||
455 | int uengine; | ||
456 | u32 value; | ||
457 | |||
458 | /* | ||
459 | * Determine number of microengines present. | ||
460 | */ | ||
461 | switch ((ixp2000_reg_read(IXP_PRODUCT_ID) >> 8) & 0x1fff) { | ||
462 | #ifdef CONFIG_ARCH_IXP2000 | ||
463 | case 0: /* IXP2800 */ | ||
464 | case 1: /* IXP2850 */ | ||
465 | ixp2000_uengine_mask = 0x00ff00ff; | ||
466 | break; | ||
467 | |||
468 | case 2: /* IXP2400 */ | ||
469 | ixp2000_uengine_mask = 0x000f000f; | ||
470 | break; | ||
471 | #endif | ||
472 | |||
473 | #ifdef CONFIG_ARCH_IXP23XX | ||
474 | case 4: /* IXP23xx */ | ||
475 | ixp2000_uengine_mask = (*IXP23XX_EXP_CFG_FUSE >> 8) & 0xf; | ||
476 | break; | ||
477 | #endif | ||
478 | |||
479 | default: | ||
480 | printk(KERN_INFO "Detected unknown IXP2000 model (%.8x)\n", | ||
481 | (unsigned int)ixp2000_reg_read(IXP_PRODUCT_ID)); | ||
482 | ixp2000_uengine_mask = 0x00000000; | ||
483 | break; | ||
484 | } | ||
485 | |||
486 | /* | ||
487 | * Reset microengines. | ||
488 | */ | ||
489 | ixp2000_uengine_reset(ixp2000_uengine_mask); | ||
490 | |||
491 | /* | ||
492 | * Synchronise timestamp counters across all microengines. | ||
493 | */ | ||
494 | value = ixp2000_reg_read(IXP_MISC_CONTROL); | ||
495 | ixp2000_reg_wrb(IXP_MISC_CONTROL, value & ~0x80); | ||
496 | for (uengine = 0; uengine < 32; uengine++) { | ||
497 | if (ixp2000_uengine_mask & (1 << uengine)) { | ||
498 | ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0); | ||
499 | ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0); | ||
500 | } | ||
501 | } | ||
502 | ixp2000_reg_wrb(IXP_MISC_CONTROL, value | 0x80); | ||
503 | |||
504 | return 0; | ||
505 | } | ||
506 | |||
507 | subsys_initcall(ixp2000_uengine_init); | ||
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig new file mode 100644 index 000000000000..67bc571ed0c3 --- /dev/null +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -0,0 +1,196 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | CONFIG_KALLSYMS_ALL=y | ||
9 | CONFIG_EMBEDDED=y | ||
10 | CONFIG_SLAB=y | ||
11 | CONFIG_MODULES=y | ||
12 | CONFIG_MODULE_UNLOAD=y | ||
13 | # CONFIG_LBDAF is not set | ||
14 | # CONFIG_BLK_DEV_BSG is not set | ||
15 | # CONFIG_IOSCHED_DEADLINE is not set | ||
16 | # CONFIG_IOSCHED_CFQ is not set | ||
17 | CONFIG_ARCH_AT91=y | ||
18 | CONFIG_SOC_AT91SAM9260=y | ||
19 | CONFIG_SOC_AT91SAM9263=y | ||
20 | CONFIG_SOC_AT91SAM9G45=y | ||
21 | CONFIG_SOC_AT91SAM9X5=y | ||
22 | CONFIG_MACH_AT91SAM_DT=y | ||
23 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
24 | CONFIG_AT91_TIMER_HZ=128 | ||
25 | CONFIG_AEABI=y | ||
26 | # CONFIG_OABI_COMPAT is not set | ||
27 | CONFIG_LEDS=y | ||
28 | CONFIG_LEDS_CPU=y | ||
29 | CONFIG_UACCESS_WITH_MEMCPY=y | ||
30 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
31 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
32 | CONFIG_ARM_APPENDED_DTB=y | ||
33 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
34 | CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" | ||
35 | CONFIG_KEXEC=y | ||
36 | CONFIG_AUTO_ZRELADDR=y | ||
37 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
38 | CONFIG_NET=y | ||
39 | CONFIG_PACKET=y | ||
40 | CONFIG_UNIX=y | ||
41 | CONFIG_INET=y | ||
42 | CONFIG_IP_MULTICAST=y | ||
43 | CONFIG_IP_PNP=y | ||
44 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
45 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
46 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
47 | # CONFIG_INET_DIAG is not set | ||
48 | CONFIG_IPV6=y | ||
49 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
50 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
51 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
52 | CONFIG_IPV6_SIT_6RD=y | ||
53 | # CONFIG_WIRELESS is not set | ||
54 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
55 | CONFIG_DEVTMPFS=y | ||
56 | CONFIG_DEVTMPFS_MOUNT=y | ||
57 | # CONFIG_STANDALONE is not set | ||
58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
59 | CONFIG_MTD=y | ||
60 | CONFIG_MTD_CMDLINE_PARTS=y | ||
61 | CONFIG_MTD_CHAR=y | ||
62 | CONFIG_MTD_BLOCK=y | ||
63 | CONFIG_MTD_NAND=y | ||
64 | CONFIG_MTD_NAND_ATMEL=y | ||
65 | CONFIG_MTD_UBI=y | ||
66 | CONFIG_MTD_UBI_GLUEBI=y | ||
67 | CONFIG_PROC_DEVICETREE=y | ||
68 | CONFIG_BLK_DEV_LOOP=y | ||
69 | CONFIG_BLK_DEV_RAM=y | ||
70 | CONFIG_BLK_DEV_RAM_COUNT=4 | ||
71 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
72 | CONFIG_ATMEL_PWM=y | ||
73 | CONFIG_ATMEL_TCLIB=y | ||
74 | CONFIG_EEPROM_93CX6=m | ||
75 | CONFIG_SCSI=y | ||
76 | CONFIG_BLK_DEV_SD=y | ||
77 | CONFIG_SCSI_MULTI_LUN=y | ||
78 | # CONFIG_SCSI_LOWLEVEL is not set | ||
79 | CONFIG_NETDEVICES=y | ||
80 | CONFIG_MII=y | ||
81 | CONFIG_MACB=y | ||
82 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
83 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
84 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
85 | # CONFIG_NET_VENDOR_INTEL is not set | ||
86 | # CONFIG_NET_VENDOR_MARVELL is not set | ||
87 | # CONFIG_NET_VENDOR_MICREL is not set | ||
88 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
89 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
90 | # CONFIG_NET_VENDOR_SMSC is not set | ||
91 | # CONFIG_NET_VENDOR_STMICRO is not set | ||
92 | CONFIG_DAVICOM_PHY=y | ||
93 | CONFIG_MICREL_PHY=y | ||
94 | # CONFIG_WLAN is not set | ||
95 | CONFIG_INPUT_POLLDEV=y | ||
96 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
97 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 | ||
98 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 | ||
99 | CONFIG_INPUT_JOYDEV=y | ||
100 | CONFIG_INPUT_EVDEV=y | ||
101 | # CONFIG_KEYBOARD_ATKBD is not set | ||
102 | CONFIG_KEYBOARD_GPIO=y | ||
103 | # CONFIG_INPUT_MOUSE is not set | ||
104 | CONFIG_INPUT_TOUCHSCREEN=y | ||
105 | # CONFIG_SERIO is not set | ||
106 | CONFIG_LEGACY_PTY_COUNT=4 | ||
107 | CONFIG_SERIAL_ATMEL=y | ||
108 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
109 | CONFIG_HW_RANDOM=y | ||
110 | CONFIG_I2C=y | ||
111 | CONFIG_I2C_GPIO=y | ||
112 | CONFIG_SPI=y | ||
113 | CONFIG_SPI_ATMEL=y | ||
114 | # CONFIG_HWMON is not set | ||
115 | CONFIG_WATCHDOG=y | ||
116 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
117 | CONFIG_SSB=m | ||
118 | CONFIG_FB=y | ||
119 | CONFIG_FB_MODE_HELPERS=y | ||
120 | CONFIG_FB_ATMEL=y | ||
121 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
122 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
123 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
124 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
125 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
126 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
127 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
128 | CONFIG_FONTS=y | ||
129 | CONFIG_FONT_8x8=y | ||
130 | CONFIG_FONT_ACORN_8x8=y | ||
131 | CONFIG_FONT_MINI_4x6=y | ||
132 | CONFIG_LOGO=y | ||
133 | # CONFIG_HID_SUPPORT is not set | ||
134 | CONFIG_USB=y | ||
135 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
136 | CONFIG_USB_DEVICEFS=y | ||
137 | # CONFIG_USB_DEVICE_CLASS is not set | ||
138 | CONFIG_USB_EHCI_HCD=y | ||
139 | CONFIG_USB_OHCI_HCD=y | ||
140 | CONFIG_USB_ACM=y | ||
141 | CONFIG_USB_STORAGE=y | ||
142 | CONFIG_USB_SERIAL=y | ||
143 | CONFIG_USB_SERIAL_GENERIC=y | ||
144 | CONFIG_USB_SERIAL_FTDI_SIO=y | ||
145 | CONFIG_USB_SERIAL_PL2303=y | ||
146 | CONFIG_USB_GADGET=y | ||
147 | CONFIG_USB_AT91=m | ||
148 | CONFIG_USB_ATMEL_USBA=m | ||
149 | CONFIG_USB_ETH=m | ||
150 | CONFIG_USB_GADGETFS=m | ||
151 | CONFIG_USB_CDC_COMPOSITE=m | ||
152 | CONFIG_USB_G_ACM_MS=m | ||
153 | CONFIG_USB_G_MULTI=m | ||
154 | CONFIG_USB_G_MULTI_CDC=y | ||
155 | CONFIG_MMC=y | ||
156 | CONFIG_MMC_ATMELMCI=y | ||
157 | CONFIG_NEW_LEDS=y | ||
158 | CONFIG_LEDS_CLASS=y | ||
159 | CONFIG_LEDS_GPIO=y | ||
160 | CONFIG_LEDS_TRIGGERS=y | ||
161 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
162 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
163 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
164 | CONFIG_RTC_CLASS=y | ||
165 | CONFIG_RTC_DRV_AT91RM9200=y | ||
166 | CONFIG_RTC_DRV_AT91SAM9=y | ||
167 | CONFIG_DMADEVICES=y | ||
168 | # CONFIG_IOMMU_SUPPORT is not set | ||
169 | CONFIG_EXT2_FS=y | ||
170 | CONFIG_FANOTIFY=y | ||
171 | CONFIG_VFAT_FS=y | ||
172 | CONFIG_TMPFS=y | ||
173 | CONFIG_NFS_FS=y | ||
174 | CONFIG_NFS_V3=y | ||
175 | CONFIG_ROOT_NFS=y | ||
176 | CONFIG_NLS_CODEPAGE_437=y | ||
177 | CONFIG_NLS_CODEPAGE_850=y | ||
178 | CONFIG_NLS_ISO8859_1=y | ||
179 | CONFIG_STRIP_ASM_SYMS=y | ||
180 | CONFIG_DEBUG_FS=y | ||
181 | # CONFIG_SCHED_DEBUG is not set | ||
182 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
183 | # CONFIG_FTRACE is not set | ||
184 | CONFIG_DEBUG_USER=y | ||
185 | CONFIG_CRYPTO=y | ||
186 | CONFIG_CRYPTO_ECB=y | ||
187 | CONFIG_CRYPTO_AES=y | ||
188 | CONFIG_CRYPTO_ARC4=y | ||
189 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
190 | CONFIG_CRYPTO_USER_API_HASH=m | ||
191 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | ||
192 | # CONFIG_CRYPTO_HW is not set | ||
193 | CONFIG_CRC_CCITT=m | ||
194 | CONFIG_CRC_ITU_T=m | ||
195 | CONFIG_CRC7=m | ||
196 | CONFIG_AVERAGE=y | ||
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig index bbe4e1a1f5d8..d54e2acd3ab1 100644 --- a/arch/arm/configs/at91rm9200_defconfig +++ b/arch/arm/configs/at91rm9200_defconfig | |||
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y | |||
14 | # CONFIG_BLK_DEV_BSG is not set | 14 | # CONFIG_BLK_DEV_BSG is not set |
15 | # CONFIG_IOSCHED_CFQ is not set | 15 | # CONFIG_IOSCHED_CFQ is not set |
16 | CONFIG_ARCH_AT91=y | 16 | CONFIG_ARCH_AT91=y |
17 | CONFIG_ARCH_AT91RM9200=y | ||
17 | CONFIG_MACH_ONEARM=y | 18 | CONFIG_MACH_ONEARM=y |
18 | CONFIG_ARCH_AT91RM9200DK=y | 19 | CONFIG_ARCH_AT91RM9200DK=y |
19 | CONFIG_MACH_AT91RM9200EK=y | 20 | CONFIG_MACH_AT91RM9200EK=y |
diff --git a/arch/arm/configs/ixp2000_defconfig b/arch/arm/configs/ixp2000_defconfig deleted file mode 100644 index 8405aded97a3..000000000000 --- a/arch/arm/configs/ixp2000_defconfig +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EXPERT=y | ||
7 | # CONFIG_HOTPLUG is not set | ||
8 | CONFIG_SLAB=y | ||
9 | CONFIG_MODULES=y | ||
10 | CONFIG_MODULE_UNLOAD=y | ||
11 | CONFIG_ARCH_IXP2000=y | ||
12 | CONFIG_ARCH_ENP2611=y | ||
13 | CONFIG_ARCH_IXDP2400=y | ||
14 | CONFIG_ARCH_IXDP2800=y | ||
15 | CONFIG_ARCH_IXDP2401=y | ||
16 | CONFIG_ARCH_IXDP2801=y | ||
17 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
18 | # CONFIG_ARM_THUMB is not set | ||
19 | CONFIG_CPU_BIG_ENDIAN=y | ||
20 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
21 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
22 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" | ||
23 | CONFIG_FPE_NWFPE=y | ||
24 | CONFIG_FPE_NWFPE_XP=y | ||
25 | CONFIG_NET=y | ||
26 | CONFIG_PACKET=y | ||
27 | CONFIG_UNIX=y | ||
28 | CONFIG_INET=y | ||
29 | CONFIG_IP_PNP=y | ||
30 | CONFIG_IP_PNP_DHCP=y | ||
31 | CONFIG_IP_PNP_BOOTP=y | ||
32 | CONFIG_SYN_COOKIES=y | ||
33 | CONFIG_IPV6=y | ||
34 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
35 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
36 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
37 | # CONFIG_IPV6_SIT is not set | ||
38 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
39 | CONFIG_MTD=y | ||
40 | CONFIG_MTD_PARTITIONS=y | ||
41 | CONFIG_MTD_REDBOOT_PARTS=y | ||
42 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
43 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
44 | CONFIG_MTD_CHAR=y | ||
45 | CONFIG_MTD_BLOCK=y | ||
46 | CONFIG_MTD_CFI=y | ||
47 | CONFIG_MTD_CFI_INTELEXT=y | ||
48 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
49 | CONFIG_MTD_IXP2000=y | ||
50 | CONFIG_BLK_DEV_LOOP=y | ||
51 | CONFIG_BLK_DEV_NBD=y | ||
52 | CONFIG_BLK_DEV_RAM=y | ||
53 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
54 | CONFIG_EEPROM_LEGACY=y | ||
55 | CONFIG_NETDEVICES=y | ||
56 | CONFIG_DUMMY=y | ||
57 | CONFIG_NET_ETHERNET=y | ||
58 | CONFIG_NET_PCI=y | ||
59 | CONFIG_CS89x0=y | ||
60 | CONFIG_E100=y | ||
61 | CONFIG_ENP2611_MSF_NET=y | ||
62 | CONFIG_WAN=y | ||
63 | CONFIG_HDLC=y | ||
64 | CONFIG_HDLC_RAW=y | ||
65 | CONFIG_HDLC_CISCO=y | ||
66 | CONFIG_HDLC_FR=y | ||
67 | CONFIG_HDLC_PPP=y | ||
68 | CONFIG_DLCI=y | ||
69 | # CONFIG_INPUT_KEYBOARD is not set | ||
70 | # CONFIG_INPUT_MOUSE is not set | ||
71 | # CONFIG_SERIO is not set | ||
72 | # CONFIG_VT is not set | ||
73 | CONFIG_SERIAL_8250=y | ||
74 | CONFIG_SERIAL_8250_CONSOLE=y | ||
75 | CONFIG_SERIAL_8250_NR_UARTS=3 | ||
76 | # CONFIG_HW_RANDOM is not set | ||
77 | CONFIG_I2C=y | ||
78 | CONFIG_I2C_CHARDEV=y | ||
79 | CONFIG_I2C_IXP2000=y | ||
80 | CONFIG_WATCHDOG=y | ||
81 | CONFIG_IXP2000_WATCHDOG=y | ||
82 | CONFIG_EXT2_FS=y | ||
83 | CONFIG_EXT2_FS_XATTR=y | ||
84 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
85 | CONFIG_EXT3_FS=y | ||
86 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
87 | CONFIG_INOTIFY=y | ||
88 | CONFIG_TMPFS=y | ||
89 | CONFIG_JFFS2_FS=y | ||
90 | CONFIG_NFS_FS=y | ||
91 | CONFIG_NFS_V3=y | ||
92 | CONFIG_ROOT_NFS=y | ||
93 | CONFIG_PARTITION_ADVANCED=y | ||
94 | CONFIG_MAGIC_SYSRQ=y | ||
95 | CONFIG_DEBUG_KERNEL=y | ||
96 | CONFIG_DEBUG_MUTEXES=y | ||
97 | CONFIG_DEBUG_USER=y | ||
98 | CONFIG_DEBUG_ERRORS=y | ||
99 | CONFIG_DEBUG_LL=y | ||
diff --git a/arch/arm/configs/ixp23xx_defconfig b/arch/arm/configs/ixp23xx_defconfig deleted file mode 100644 index 688717612e91..000000000000 --- a/arch/arm/configs/ixp23xx_defconfig +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EXPERT=y | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | CONFIG_ARCH_IXP23XX=y | ||
11 | CONFIG_MACH_ESPRESSO=y | ||
12 | CONFIG_MACH_IXDP2351=y | ||
13 | CONFIG_MACH_ROADRUNNER=y | ||
14 | # CONFIG_ARM_THUMB is not set | ||
15 | CONFIG_CPU_BIG_ENDIAN=y | ||
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
18 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp" | ||
19 | CONFIG_FPE_NWFPE=y | ||
20 | CONFIG_FPE_NWFPE_XP=y | ||
21 | CONFIG_NET=y | ||
22 | CONFIG_PACKET=y | ||
23 | CONFIG_UNIX=y | ||
24 | CONFIG_INET=y | ||
25 | CONFIG_IP_PNP=y | ||
26 | CONFIG_IP_PNP_DHCP=y | ||
27 | CONFIG_IP_PNP_BOOTP=y | ||
28 | CONFIG_SYN_COOKIES=y | ||
29 | CONFIG_IPV6=y | ||
30 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
31 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
32 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
33 | # CONFIG_IPV6_SIT is not set | ||
34 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
35 | # CONFIG_FW_LOADER is not set | ||
36 | CONFIG_MTD=y | ||
37 | CONFIG_MTD_PARTITIONS=y | ||
38 | CONFIG_MTD_REDBOOT_PARTS=y | ||
39 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
40 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
41 | CONFIG_MTD_CHAR=y | ||
42 | CONFIG_MTD_BLOCK=y | ||
43 | CONFIG_MTD_CFI=y | ||
44 | CONFIG_MTD_CFI_INTELEXT=y | ||
45 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
46 | CONFIG_MTD_PHYSMAP=y | ||
47 | CONFIG_BLK_DEV_LOOP=y | ||
48 | CONFIG_BLK_DEV_NBD=y | ||
49 | CONFIG_BLK_DEV_RAM=y | ||
50 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
51 | CONFIG_EEPROM_LEGACY=y | ||
52 | CONFIG_IDE=y | ||
53 | CONFIG_BLK_DEV_SIIMAGE=y | ||
54 | CONFIG_SCSI=y | ||
55 | CONFIG_BLK_DEV_SD=y | ||
56 | CONFIG_NETDEVICES=y | ||
57 | CONFIG_DUMMY=y | ||
58 | CONFIG_NET_ETHERNET=y | ||
59 | CONFIG_NET_PCI=y | ||
60 | CONFIG_E100=y | ||
61 | CONFIG_E1000=y | ||
62 | CONFIG_WAN=y | ||
63 | CONFIG_HDLC=y | ||
64 | CONFIG_HDLC_RAW=y | ||
65 | CONFIG_HDLC_CISCO=y | ||
66 | CONFIG_HDLC_FR=y | ||
67 | CONFIG_HDLC_PPP=y | ||
68 | CONFIG_DLCI=y | ||
69 | # CONFIG_INPUT_KEYBOARD is not set | ||
70 | # CONFIG_INPUT_MOUSE is not set | ||
71 | # CONFIG_SERIO is not set | ||
72 | # CONFIG_VT is not set | ||
73 | CONFIG_SERIAL_8250=y | ||
74 | CONFIG_SERIAL_8250_CONSOLE=y | ||
75 | # CONFIG_HW_RANDOM is not set | ||
76 | CONFIG_I2C=y | ||
77 | CONFIG_I2C_CHARDEV=y | ||
78 | CONFIG_WATCHDOG=y | ||
79 | # CONFIG_USB_HID is not set | ||
80 | CONFIG_USB=y | ||
81 | CONFIG_USB_MON=y | ||
82 | CONFIG_USB_EHCI_HCD=y | ||
83 | CONFIG_USB_OHCI_HCD=y | ||
84 | CONFIG_USB_UHCI_HCD=y | ||
85 | CONFIG_USB_STORAGE=y | ||
86 | CONFIG_EXT2_FS=y | ||
87 | CONFIG_EXT2_FS_XATTR=y | ||
88 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
89 | CONFIG_EXT3_FS=y | ||
90 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
91 | CONFIG_INOTIFY=y | ||
92 | CONFIG_MSDOS_FS=y | ||
93 | CONFIG_TMPFS=y | ||
94 | CONFIG_JFFS2_FS=y | ||
95 | CONFIG_NFS_FS=y | ||
96 | CONFIG_NFS_V3=y | ||
97 | CONFIG_ROOT_NFS=y | ||
98 | CONFIG_PARTITION_ADVANCED=y | ||
99 | CONFIG_NLS_CODEPAGE_437=y | ||
100 | CONFIG_MAGIC_SYSRQ=y | ||
101 | CONFIG_DEBUG_KERNEL=y | ||
102 | CONFIG_DEBUG_MUTEXES=y | ||
103 | CONFIG_DEBUG_USER=y | ||
104 | CONFIG_DEBUG_ERRORS=y | ||
105 | CONFIG_DEBUG_LL=y | ||
diff --git a/arch/arm/include/asm/hardware/uengine.h b/arch/arm/include/asm/hardware/uengine.h deleted file mode 100644 index b442d65c6593..000000000000 --- a/arch/arm/include/asm/hardware/uengine.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Generic library functions for the microengines found on the Intel | ||
3 | * IXP2000 series of network processors. | ||
4 | * | ||
5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * Dedicated to Marija Kulikova. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU Lesser General Public License as | ||
10 | * published by the Free Software Foundation; either version 2.1 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef __IXP2000_UENGINE_H | ||
15 | #define __IXP2000_UENGINE_H | ||
16 | |||
17 | extern u32 ixp2000_uengine_mask; | ||
18 | |||
19 | struct ixp2000_uengine_code | ||
20 | { | ||
21 | u32 cpu_model_bitmask; | ||
22 | u8 cpu_min_revision; | ||
23 | u8 cpu_max_revision; | ||
24 | |||
25 | u32 uengine_parameters; | ||
26 | |||
27 | struct ixp2000_reg_value { | ||
28 | int reg; | ||
29 | u32 value; | ||
30 | } *initial_reg_values; | ||
31 | |||
32 | int num_insns; | ||
33 | u8 *insns; | ||
34 | }; | ||
35 | |||
36 | u32 ixp2000_uengine_csr_read(int uengine, int offset); | ||
37 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value); | ||
38 | void ixp2000_uengine_reset(u32 uengine_mask); | ||
39 | void ixp2000_uengine_set_mode(int uengine, u32 mode); | ||
40 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns); | ||
41 | void ixp2000_uengine_init_context(int uengine, int context, int pc); | ||
42 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask); | ||
43 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask); | ||
44 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c); | ||
45 | |||
46 | #define IXP2000_UENGINE_8_CONTEXTS 0x00000000 | ||
47 | #define IXP2000_UENGINE_4_CONTEXTS 0x80000000 | ||
48 | #define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000 | ||
49 | #define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000 | ||
50 | #define IXP2000_UENGINE_NN_FROM_SELF 0x00100000 | ||
51 | #define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000 | ||
52 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000 | ||
53 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000 | ||
54 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000 | ||
55 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000 | ||
56 | #define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000 | ||
57 | #define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000 | ||
58 | #define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000 | ||
59 | #define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000 | ||
60 | |||
61 | |||
62 | #endif | ||
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 45db05d8d94c..98a42f3472d5 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -9,15 +9,6 @@ config HAVE_AT91_DBGU0 | |||
9 | config HAVE_AT91_DBGU1 | 9 | config HAVE_AT91_DBGU1 |
10 | bool | 10 | bool |
11 | 11 | ||
12 | config HAVE_AT91_USART3 | ||
13 | bool | ||
14 | |||
15 | config HAVE_AT91_USART4 | ||
16 | bool | ||
17 | |||
18 | config HAVE_AT91_USART5 | ||
19 | bool | ||
20 | |||
21 | config AT91_SAM9_ALT_RESET | 12 | config AT91_SAM9_ALT_RESET |
22 | bool | 13 | bool |
23 | default !ARCH_AT91X40 | 14 | default !ARCH_AT91X40 |
@@ -26,87 +17,121 @@ config AT91_SAM9G45_RESET | |||
26 | bool | 17 | bool |
27 | default !ARCH_AT91X40 | 18 | default !ARCH_AT91X40 |
28 | 19 | ||
20 | config SOC_AT91SAM9 | ||
21 | bool | ||
22 | select GENERIC_CLOCKEVENTS | ||
23 | select CPU_ARM926T | ||
24 | |||
29 | menu "Atmel AT91 System-on-Chip" | 25 | menu "Atmel AT91 System-on-Chip" |
30 | 26 | ||
31 | choice | 27 | comment "Atmel AT91 Processor" |
32 | prompt "Atmel AT91 Processor" | ||
33 | 28 | ||
34 | config ARCH_AT91RM9200 | 29 | config SOC_AT91SAM9 |
30 | bool | ||
31 | select CPU_ARM926T | ||
32 | select AT91_SAM9_TIME | ||
33 | select AT91_SAM9_SMC | ||
34 | |||
35 | config SOC_AT91RM9200 | ||
35 | bool "AT91RM9200" | 36 | bool "AT91RM9200" |
36 | select CPU_ARM920T | 37 | select CPU_ARM920T |
37 | select GENERIC_CLOCKEVENTS | 38 | select GENERIC_CLOCKEVENTS |
38 | select HAVE_AT91_DBGU0 | 39 | select HAVE_AT91_DBGU0 |
39 | select HAVE_AT91_USART3 | ||
40 | 40 | ||
41 | config ARCH_AT91SAM9260 | 41 | config SOC_AT91SAM9260 |
42 | bool "AT91SAM9260 or AT91SAM9XE" | 42 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" |
43 | select CPU_ARM926T | 43 | select SOC_AT91SAM9 |
44 | select GENERIC_CLOCKEVENTS | ||
45 | select HAVE_AT91_DBGU0 | 44 | select HAVE_AT91_DBGU0 |
46 | select HAVE_AT91_USART3 | ||
47 | select HAVE_AT91_USART4 | ||
48 | select HAVE_AT91_USART5 | ||
49 | select HAVE_NET_MACB | 45 | select HAVE_NET_MACB |
46 | help | ||
47 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE | ||
48 | or AT91SAM9G20 SoC. | ||
50 | 49 | ||
51 | config ARCH_AT91SAM9261 | 50 | config SOC_AT91SAM9261 |
52 | bool "AT91SAM9261" | 51 | bool "AT91SAM9261 or AT91SAM9G10" |
53 | select CPU_ARM926T | 52 | select SOC_AT91SAM9 |
54 | select GENERIC_CLOCKEVENTS | 53 | select HAVE_AT91_DBGU0 |
55 | select HAVE_FB_ATMEL | 54 | select HAVE_FB_ATMEL |
55 | help | ||
56 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. | ||
57 | |||
58 | config SOC_AT91SAM9263 | ||
59 | bool "AT91SAM9263" | ||
60 | select SOC_AT91SAM9 | ||
61 | select HAVE_AT91_DBGU1 | ||
62 | select HAVE_FB_ATMEL | ||
63 | select HAVE_NET_MACB | ||
64 | |||
65 | config SOC_AT91SAM9RL | ||
66 | bool "AT91SAM9RL" | ||
67 | select SOC_AT91SAM9 | ||
56 | select HAVE_AT91_DBGU0 | 68 | select HAVE_AT91_DBGU0 |
69 | select HAVE_FB_ATMEL | ||
57 | 70 | ||
58 | config ARCH_AT91SAM9G10 | 71 | config SOC_AT91SAM9G45 |
59 | bool "AT91SAM9G10" | 72 | bool "AT91SAM9G45 or AT91SAM9M10 families" |
60 | select CPU_ARM926T | 73 | select SOC_AT91SAM9 |
61 | select GENERIC_CLOCKEVENTS | 74 | select HAVE_AT91_DBGU1 |
75 | select HAVE_FB_ATMEL | ||
76 | select HAVE_NET_MACB | ||
77 | help | ||
78 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. | ||
79 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. | ||
80 | |||
81 | config SOC_AT91SAM9X5 | ||
82 | bool "AT91SAM9x5 family" | ||
83 | select SOC_AT91SAM9 | ||
62 | select HAVE_AT91_DBGU0 | 84 | select HAVE_AT91_DBGU0 |
63 | select HAVE_FB_ATMEL | 85 | select HAVE_FB_ATMEL |
86 | select HAVE_NET_MACB | ||
87 | help | ||
88 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. | ||
89 | This means that your SAM9 name finishes with a '5' (except if it is | ||
90 | AT91SAM9G45!). | ||
91 | This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35 | ||
92 | and AT91SAM9X35. | ||
93 | |||
94 | choice | ||
95 | prompt "Atmel AT91 Processor Devices for non DT boards" | ||
96 | |||
97 | config ARCH_AT91_NONE | ||
98 | bool "None" | ||
99 | |||
100 | config ARCH_AT91RM9200 | ||
101 | bool "AT91RM9200" | ||
102 | select SOC_AT91RM9200 | ||
103 | |||
104 | config ARCH_AT91SAM9260 | ||
105 | bool "AT91SAM9260 or AT91SAM9XE" | ||
106 | select SOC_AT91SAM9260 | ||
107 | |||
108 | config ARCH_AT91SAM9261 | ||
109 | bool "AT91SAM9261" | ||
110 | select SOC_AT91SAM9261 | ||
111 | |||
112 | config ARCH_AT91SAM9G10 | ||
113 | bool "AT91SAM9G10" | ||
114 | select SOC_AT91SAM9261 | ||
64 | 115 | ||
65 | config ARCH_AT91SAM9263 | 116 | config ARCH_AT91SAM9263 |
66 | bool "AT91SAM9263" | 117 | bool "AT91SAM9263" |
67 | select CPU_ARM926T | 118 | select SOC_AT91SAM9263 |
68 | select GENERIC_CLOCKEVENTS | ||
69 | select HAVE_FB_ATMEL | ||
70 | select HAVE_NET_MACB | ||
71 | select HAVE_AT91_DBGU1 | ||
72 | 119 | ||
73 | config ARCH_AT91SAM9RL | 120 | config ARCH_AT91SAM9RL |
74 | bool "AT91SAM9RL" | 121 | bool "AT91SAM9RL" |
75 | select CPU_ARM926T | 122 | select SOC_AT91SAM9RL |
76 | select GENERIC_CLOCKEVENTS | ||
77 | select HAVE_AT91_USART3 | ||
78 | select HAVE_FB_ATMEL | ||
79 | select HAVE_AT91_DBGU0 | ||
80 | 123 | ||
81 | config ARCH_AT91SAM9G20 | 124 | config ARCH_AT91SAM9G20 |
82 | bool "AT91SAM9G20" | 125 | bool "AT91SAM9G20" |
83 | select CPU_ARM926T | 126 | select SOC_AT91SAM9260 |
84 | select GENERIC_CLOCKEVENTS | ||
85 | select HAVE_AT91_DBGU0 | ||
86 | select HAVE_AT91_USART3 | ||
87 | select HAVE_AT91_USART4 | ||
88 | select HAVE_AT91_USART5 | ||
89 | select HAVE_NET_MACB | ||
90 | 127 | ||
91 | config ARCH_AT91SAM9G45 | 128 | config ARCH_AT91SAM9G45 |
92 | bool "AT91SAM9G45" | 129 | bool "AT91SAM9G45" |
93 | select CPU_ARM926T | 130 | select SOC_AT91SAM9G45 |
94 | select GENERIC_CLOCKEVENTS | ||
95 | select HAVE_AT91_USART3 | ||
96 | select HAVE_FB_ATMEL | ||
97 | select HAVE_NET_MACB | ||
98 | select HAVE_AT91_DBGU1 | ||
99 | |||
100 | config ARCH_AT91SAM9X5 | ||
101 | bool "AT91SAM9x5 family" | ||
102 | select CPU_ARM926T | ||
103 | select GENERIC_CLOCKEVENTS | ||
104 | select HAVE_FB_ATMEL | ||
105 | select HAVE_NET_MACB | ||
106 | select HAVE_AT91_DBGU0 | ||
107 | 131 | ||
108 | config ARCH_AT91X40 | 132 | config ARCH_AT91X40 |
109 | bool "AT91x40" | 133 | bool "AT91x40" |
134 | depends on !MMU | ||
110 | select ARCH_USES_GETTIMEOFFSET | 135 | select ARCH_USES_GETTIMEOFFSET |
111 | 136 | ||
112 | endchoice | 137 | endchoice |
@@ -364,6 +389,7 @@ config MACH_AT91SAM9G20EK_2MMC | |||
364 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit | 389 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit |
365 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and | 390 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and |
366 | onwards. | 391 | onwards. |
392 | <http://www.atmel.com/tools/SAM9G20-EK.aspx> | ||
367 | 393 | ||
368 | config MACH_CPU9G20 | 394 | config MACH_CPU9G20 |
369 | bool "Eukrea CPU9G20 board" | 395 | bool "Eukrea CPU9G20 board" |
@@ -433,9 +459,10 @@ comment "AT91SAM9G45 Board Type" | |||
433 | config MACH_AT91SAM9M10G45EK | 459 | config MACH_AT91SAM9M10G45EK |
434 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" | 460 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" |
435 | help | 461 | help |
436 | Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. | 462 | Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit. |
437 | "ES" at the end of the name means that this board is an | 463 | Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10 |
438 | Engineering Sample. | 464 | families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. |
465 | <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx> | ||
439 | 466 | ||
440 | endif | 467 | endif |
441 | 468 | ||
@@ -515,41 +542,6 @@ config AT91_TIMER_HZ | |||
515 | system clock (of at least several MHz), rounding is less of a | 542 | system clock (of at least several MHz), rounding is less of a |
516 | problem so it can be safer to use a decimal values like 100. | 543 | problem so it can be safer to use a decimal values like 100. |
517 | 544 | ||
518 | choice | ||
519 | prompt "Select a UART for early kernel messages" | ||
520 | |||
521 | config AT91_EARLY_DBGU0 | ||
522 | bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl" | ||
523 | depends on HAVE_AT91_DBGU0 | ||
524 | |||
525 | config AT91_EARLY_DBGU1 | ||
526 | bool "DBGU on 9263 and 9g45" | ||
527 | depends on HAVE_AT91_DBGU1 | ||
528 | |||
529 | config AT91_EARLY_USART0 | ||
530 | bool "USART0" | ||
531 | |||
532 | config AT91_EARLY_USART1 | ||
533 | bool "USART1" | ||
534 | |||
535 | config AT91_EARLY_USART2 | ||
536 | bool "USART2" | ||
537 | depends on ! ARCH_AT91X40 | ||
538 | |||
539 | config AT91_EARLY_USART3 | ||
540 | bool "USART3" | ||
541 | depends on HAVE_AT91_USART3 | ||
542 | |||
543 | config AT91_EARLY_USART4 | ||
544 | bool "USART4" | ||
545 | depends on HAVE_AT91_USART4 | ||
546 | |||
547 | config AT91_EARLY_USART5 | ||
548 | bool "USART5" | ||
549 | depends on HAVE_AT91_USART5 | ||
550 | |||
551 | endchoice | ||
552 | |||
553 | endmenu | 545 | endmenu |
554 | 546 | ||
555 | endif | 547 | endif |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 8512e53bed93..79d0f60af0b2 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -10,17 +10,25 @@ obj- := | |||
10 | obj-$(CONFIG_AT91_PMC_UNIT) += clock.o | 10 | obj-$(CONFIG_AT91_PMC_UNIT) += clock.o |
11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o | 11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o |
12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o | 12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o |
13 | obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o | ||
13 | 14 | ||
14 | # CPU-specific support | 15 | # CPU-specific support |
15 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o | 16 | obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o |
16 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 17 | obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o |
17 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 18 | obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o |
18 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 19 | obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o |
19 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o | 20 | obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o |
20 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o | 21 | obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o |
21 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 22 | obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o |
22 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 23 | |
23 | obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o at91sam926x_time.o sam9_smc.o | 24 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o |
25 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o | ||
26 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o | ||
27 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o | ||
28 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o | ||
29 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o | ||
30 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o | ||
31 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o | ||
24 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 32 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
25 | 33 | ||
26 | # AT91RM9200 board-specific support | 34 | # AT91RM9200 board-specific support |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 364c19357e60..d50da1a9d0bf 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -258,18 +258,6 @@ static void __init at91rm9200_register_clocks(void) | |||
258 | clk_register(&pck3); | 258 | clk_register(&pck3); |
259 | } | 259 | } |
260 | 260 | ||
261 | static struct clk_lookup console_clock_lookup; | ||
262 | |||
263 | void __init at91rm9200_set_console_clock(int id) | ||
264 | { | ||
265 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
266 | return; | ||
267 | |||
268 | console_clock_lookup.con_id = "usart"; | ||
269 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
270 | clkdev_add(&console_clock_lookup); | ||
271 | } | ||
272 | |||
273 | /* -------------------------------------------------------------------- | 261 | /* -------------------------------------------------------------------- |
274 | * GPIO | 262 | * GPIO |
275 | * -------------------------------------------------------------------- */ | 263 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 05774e5b1cba..99affb5d0563 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1152 | at91_uarts[portnr] = pdev; | 1152 | at91_uarts[portnr] = pdev; |
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | void __init at91_set_serial_console(unsigned portnr) | ||
1156 | { | ||
1157 | if (portnr < ATMEL_MAX_UART) { | ||
1158 | atmel_default_console_device = at91_uarts[portnr]; | ||
1159 | at91rm9200_set_console_clock(at91_uarts[portnr]->id); | ||
1160 | } | ||
1161 | } | ||
1162 | |||
1163 | void __init at91_add_device_serial(void) | 1155 | void __init at91_add_device_serial(void) |
1164 | { | 1156 | { |
1165 | int i; | 1157 | int i; |
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void) | |||
1168 | if (at91_uarts[i]) | 1160 | if (at91_uarts[i]) |
1169 | platform_device_register(at91_uarts[i]); | 1161 | platform_device_register(at91_uarts[i]); |
1170 | } | 1162 | } |
1171 | |||
1172 | if (!atmel_default_console_device) | ||
1173 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1174 | } | 1163 | } |
1175 | #else | 1164 | #else |
1176 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1165 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1177 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1178 | void __init at91_add_device_serial(void) {} | 1166 | void __init at91_add_device_serial(void) {} |
1179 | #endif | 1167 | #endif |
1180 | 1168 | ||
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 46f774233298..a27bbec50ca3 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void) | |||
268 | clk_register(&pck1); | 268 | clk_register(&pck1); |
269 | } | 269 | } |
270 | 270 | ||
271 | static struct clk_lookup console_clock_lookup; | ||
272 | |||
273 | void __init at91sam9260_set_console_clock(int id) | ||
274 | { | ||
275 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
276 | return; | ||
277 | |||
278 | console_clock_lookup.con_id = "usart"; | ||
279 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
280 | clkdev_add(&console_clock_lookup); | ||
281 | } | ||
282 | |||
283 | /* -------------------------------------------------------------------- | 271 | /* -------------------------------------------------------------------- |
284 | * GPIO | 272 | * GPIO |
285 | * -------------------------------------------------------------------- */ | 273 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 5652dde4bbe2..ad00fe91d37d 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -1229,14 +1229,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1229 | at91_uarts[portnr] = pdev; | 1229 | at91_uarts[portnr] = pdev; |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | void __init at91_set_serial_console(unsigned portnr) | ||
1233 | { | ||
1234 | if (portnr < ATMEL_MAX_UART) { | ||
1235 | atmel_default_console_device = at91_uarts[portnr]; | ||
1236 | at91sam9260_set_console_clock(at91_uarts[portnr]->id); | ||
1237 | } | ||
1238 | } | ||
1239 | |||
1240 | void __init at91_add_device_serial(void) | 1232 | void __init at91_add_device_serial(void) |
1241 | { | 1233 | { |
1242 | int i; | 1234 | int i; |
@@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void) | |||
1245 | if (at91_uarts[i]) | 1237 | if (at91_uarts[i]) |
1246 | platform_device_register(at91_uarts[i]); | 1238 | platform_device_register(at91_uarts[i]); |
1247 | } | 1239 | } |
1248 | |||
1249 | if (!atmel_default_console_device) | ||
1250 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1251 | } | 1240 | } |
1252 | #else | 1241 | #else |
1253 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1242 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1254 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1255 | void __init at91_add_device_serial(void) {} | 1243 | void __init at91_add_device_serial(void) {} |
1256 | #endif | 1244 | #endif |
1257 | 1245 | ||
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 7de81e6222f1..c77d503d09d1 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void) | |||
239 | clk_register(&hck1); | 239 | clk_register(&hck1); |
240 | } | 240 | } |
241 | 241 | ||
242 | static struct clk_lookup console_clock_lookup; | ||
243 | |||
244 | void __init at91sam9261_set_console_clock(int id) | ||
245 | { | ||
246 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
247 | return; | ||
248 | |||
249 | console_clock_lookup.con_id = "usart"; | ||
250 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
251 | clkdev_add(&console_clock_lookup); | ||
252 | } | ||
253 | |||
254 | /* -------------------------------------------------------------------- | 242 | /* -------------------------------------------------------------------- |
255 | * GPIO | 243 | * GPIO |
256 | * -------------------------------------------------------------------- */ | 244 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 4db961a93085..9295e90b08ff 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1051 | at91_uarts[portnr] = pdev; | 1051 | at91_uarts[portnr] = pdev; |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | void __init at91_set_serial_console(unsigned portnr) | ||
1055 | { | ||
1056 | if (portnr < ATMEL_MAX_UART) { | ||
1057 | atmel_default_console_device = at91_uarts[portnr]; | ||
1058 | at91sam9261_set_console_clock(at91_uarts[portnr]->id); | ||
1059 | } | ||
1060 | } | ||
1061 | |||
1062 | void __init at91_add_device_serial(void) | 1054 | void __init at91_add_device_serial(void) |
1063 | { | 1055 | { |
1064 | int i; | 1056 | int i; |
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void) | |||
1067 | if (at91_uarts[i]) | 1059 | if (at91_uarts[i]) |
1068 | platform_device_register(at91_uarts[i]); | 1060 | platform_device_register(at91_uarts[i]); |
1069 | } | 1061 | } |
1070 | |||
1071 | if (!atmel_default_console_device) | ||
1072 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1073 | } | 1062 | } |
1074 | #else | 1063 | #else |
1075 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1064 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1076 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1077 | void __init at91_add_device_serial(void) {} | 1065 | void __init at91_add_device_serial(void) {} |
1078 | #endif | 1066 | #endif |
1079 | 1067 | ||
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index ef301be66575..7fae36502fbb 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void) | |||
255 | clk_register(&pck3); | 255 | clk_register(&pck3); |
256 | } | 256 | } |
257 | 257 | ||
258 | static struct clk_lookup console_clock_lookup; | ||
259 | |||
260 | void __init at91sam9263_set_console_clock(int id) | ||
261 | { | ||
262 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
263 | return; | ||
264 | |||
265 | console_clock_lookup.con_id = "usart"; | ||
266 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
267 | clkdev_add(&console_clock_lookup); | ||
268 | } | ||
269 | |||
270 | /* -------------------------------------------------------------------- | 258 | /* -------------------------------------------------------------------- |
271 | * GPIO | 259 | * GPIO |
272 | * -------------------------------------------------------------------- */ | 260 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index fe99206de880..dfe5bc006d5e 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1461,14 +1461,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1461 | at91_uarts[portnr] = pdev; | 1461 | at91_uarts[portnr] = pdev; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | void __init at91_set_serial_console(unsigned portnr) | ||
1465 | { | ||
1466 | if (portnr < ATMEL_MAX_UART) { | ||
1467 | atmel_default_console_device = at91_uarts[portnr]; | ||
1468 | at91sam9263_set_console_clock(at91_uarts[portnr]->id); | ||
1469 | } | ||
1470 | } | ||
1471 | |||
1472 | void __init at91_add_device_serial(void) | 1464 | void __init at91_add_device_serial(void) |
1473 | { | 1465 | { |
1474 | int i; | 1466 | int i; |
@@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void) | |||
1477 | if (at91_uarts[i]) | 1469 | if (at91_uarts[i]) |
1478 | platform_device_register(at91_uarts[i]); | 1470 | platform_device_register(at91_uarts[i]); |
1479 | } | 1471 | } |
1480 | |||
1481 | if (!atmel_default_console_device) | ||
1482 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1483 | } | 1472 | } |
1484 | #else | 1473 | #else |
1485 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1474 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1486 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1487 | void __init at91_add_device_serial(void) {} | 1475 | void __init at91_add_device_serial(void) {} |
1488 | #endif | 1476 | #endif |
1489 | 1477 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index d222f8333dab..f2054495a655 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void) | |||
288 | clk_register(&pck1); | 288 | clk_register(&pck1); |
289 | } | 289 | } |
290 | 290 | ||
291 | static struct clk_lookup console_clock_lookup; | ||
292 | |||
293 | void __init at91sam9g45_set_console_clock(int id) | ||
294 | { | ||
295 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
296 | return; | ||
297 | |||
298 | console_clock_lookup.con_id = "usart"; | ||
299 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
300 | clkdev_add(&console_clock_lookup); | ||
301 | } | ||
302 | |||
303 | /* -------------------------------------------------------------------- | 291 | /* -------------------------------------------------------------------- |
304 | * GPIO | 292 | * GPIO |
305 | * -------------------------------------------------------------------- */ | 293 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 6b008aee1dff..db2f88c246ff 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1741,14 +1741,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1741 | at91_uarts[portnr] = pdev; | 1741 | at91_uarts[portnr] = pdev; |
1742 | } | 1742 | } |
1743 | 1743 | ||
1744 | void __init at91_set_serial_console(unsigned portnr) | ||
1745 | { | ||
1746 | if (portnr < ATMEL_MAX_UART) { | ||
1747 | atmel_default_console_device = at91_uarts[portnr]; | ||
1748 | at91sam9g45_set_console_clock(at91_uarts[portnr]->id); | ||
1749 | } | ||
1750 | } | ||
1751 | |||
1752 | void __init at91_add_device_serial(void) | 1744 | void __init at91_add_device_serial(void) |
1753 | { | 1745 | { |
1754 | int i; | 1746 | int i; |
@@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void) | |||
1757 | if (at91_uarts[i]) | 1749 | if (at91_uarts[i]) |
1758 | platform_device_register(at91_uarts[i]); | 1750 | platform_device_register(at91_uarts[i]); |
1759 | } | 1751 | } |
1760 | |||
1761 | if (!atmel_default_console_device) | ||
1762 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1763 | } | 1752 | } |
1764 | #else | 1753 | #else |
1765 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1754 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1766 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1767 | void __init at91_add_device_serial(void) {} | 1755 | void __init at91_add_device_serial(void) {} |
1768 | #endif | 1756 | #endif |
1769 | 1757 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index d9f2774f385e..e420085a57ef 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void) | |||
232 | clk_register(&pck1); | 232 | clk_register(&pck1); |
233 | } | 233 | } |
234 | 234 | ||
235 | static struct clk_lookup console_clock_lookup; | ||
236 | |||
237 | void __init at91sam9rl_set_console_clock(int id) | ||
238 | { | ||
239 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
240 | return; | ||
241 | |||
242 | console_clock_lookup.con_id = "usart"; | ||
243 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
244 | clkdev_add(&console_clock_lookup); | ||
245 | } | ||
246 | |||
247 | /* -------------------------------------------------------------------- | 235 | /* -------------------------------------------------------------------- |
248 | * GPIO | 236 | * GPIO |
249 | * -------------------------------------------------------------------- */ | 237 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index fe4ae22e8561..9c0b1481a9a7 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1192 | at91_uarts[portnr] = pdev; | 1192 | at91_uarts[portnr] = pdev; |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | void __init at91_set_serial_console(unsigned portnr) | ||
1196 | { | ||
1197 | if (portnr < ATMEL_MAX_UART) { | ||
1198 | atmel_default_console_device = at91_uarts[portnr]; | ||
1199 | at91sam9rl_set_console_clock(at91_uarts[portnr]->id); | ||
1200 | } | ||
1201 | } | ||
1202 | |||
1203 | void __init at91_add_device_serial(void) | 1195 | void __init at91_add_device_serial(void) |
1204 | { | 1196 | { |
1205 | int i; | 1197 | int i; |
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void) | |||
1208 | if (at91_uarts[i]) | 1200 | if (at91_uarts[i]) |
1209 | platform_device_register(at91_uarts[i]); | 1201 | platform_device_register(at91_uarts[i]); |
1210 | } | 1202 | } |
1211 | |||
1212 | if (!atmel_default_console_device) | ||
1213 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1214 | } | 1203 | } |
1215 | #else | 1204 | #else |
1216 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1205 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1217 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1218 | void __init at91_add_device_serial(void) {} | 1206 | void __init at91_add_device_serial(void) {} |
1219 | #endif | 1207 | #endif |
1220 | 1208 | ||
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 2628384aaae1..271f994314a4 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void) | |||
47 | 47 | ||
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91_initialize(18432000); | 49 | at91_initialize(18432000); |
50 | |||
51 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
52 | at91_register_uart(0, 0, 0); | ||
53 | |||
54 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
55 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
56 | |||
57 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
59 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
60 | | ATMEL_UART_RI); | ||
61 | |||
62 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
63 | at91_set_serial_console(0); | ||
64 | } | 50 | } |
65 | 51 | ||
66 | static struct macb_platform_data __initdata onearm_eth_data = { | 52 | static struct macb_platform_data __initdata onearm_eth_data = { |
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = { | |||
82 | static void __init onearm_board_init(void) | 68 | static void __init onearm_board_init(void) |
83 | { | 69 | { |
84 | /* Serial */ | 70 | /* Serial */ |
71 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
72 | at91_register_uart(0, 0, 0); | ||
73 | |||
74 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
75 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
76 | |||
77 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
79 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
80 | | ATMEL_UART_RI); | ||
85 | at91_add_device_serial(); | 81 | at91_add_device_serial(); |
86 | /* Ethernet */ | 82 | /* Ethernet */ |
87 | at91_add_device_eth(&onearm_eth_data); | 83 | at91_add_device_eth(&onearm_eth_data); |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 161efbaa1029..b7d8aa7b81e6 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -52,22 +52,6 @@ static void __init afeb9260_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
61 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
63 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
64 | |||
65 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
66 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
67 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 55 | } |
72 | 56 | ||
73 | /* | 57 | /* |
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = { | |||
183 | static void __init afeb9260_board_init(void) | 167 | static void __init afeb9260_board_init(void) |
184 | { | 168 | { |
185 | /* Serial */ | 169 | /* Serial */ |
170 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
171 | at91_register_uart(0, 0, 0); | ||
172 | |||
173 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
174 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
175 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
176 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
177 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
178 | |||
179 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
180 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
181 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
186 | at91_add_device_serial(); | 182 | at91_add_device_serial(); |
187 | /* USB Host */ | 183 | /* USB Host */ |
188 | at91_add_device_usbh(&afeb9260_usbh_data); | 184 | at91_add_device_usbh(&afeb9260_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index c6d44ee0c77e..29d3ef0a50fb 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -49,12 +49,6 @@ static void __init cam60_init_early(void) | |||
49 | { | 49 | { |
50 | /* Initialize processor: 10 MHz crystal */ | 50 | /* Initialize processor: 10 MHz crystal */ |
51 | at91_initialize(10000000); | 51 | at91_initialize(10000000); |
52 | |||
53 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
54 | at91_register_uart(0, 0, 0); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 52 | } |
59 | 53 | ||
60 | /* | 54 | /* |
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void) | |||
175 | static void __init cam60_board_init(void) | 169 | static void __init cam60_board_init(void) |
176 | { | 170 | { |
177 | /* Serial */ | 171 | /* Serial */ |
172 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
173 | at91_register_uart(0, 0, 0); | ||
178 | at91_add_device_serial(); | 174 | at91_add_device_serial(); |
179 | /* SPI */ | 175 | /* SPI */ |
180 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); | 176 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 59d9cf997537..44328a6d4609 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -44,17 +44,6 @@ static void __init carmeva_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 20.000 MHz crystal */ | 45 | /* Initialize processor: 20.000 MHz crystal */ |
46 | at91_initialize(20000000); | 46 | at91_initialize(20000000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 47 | } |
59 | 48 | ||
60 | static struct macb_platform_data __initdata carmeva_eth_data = { | 49 | static struct macb_platform_data __initdata carmeva_eth_data = { |
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = { | |||
139 | static void __init carmeva_board_init(void) | 128 | static void __init carmeva_board_init(void) |
140 | { | 129 | { |
141 | /* Serial */ | 130 | /* Serial */ |
131 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
132 | at91_register_uart(0, 0, 0); | ||
133 | |||
134 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
135 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
136 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
137 | | ATMEL_UART_RI); | ||
142 | at91_add_device_serial(); | 138 | at91_add_device_serial(); |
143 | /* Ethernet */ | 139 | /* Ethernet */ |
144 | at91_add_device_eth(&carmeva_eth_data); | 140 | at91_add_device_eth(&carmeva_eth_data); |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index 5f3680e7c883..69951ec7dbf3 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -52,34 +52,6 @@ static void __init cpu9krea_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
61 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
62 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
66 | ATMEL_UART_RTS); | ||
67 | |||
68 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
70 | ATMEL_UART_RTS); | ||
71 | |||
72 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
74 | |||
75 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
76 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
77 | |||
78 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
79 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
80 | |||
81 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
82 | at91_set_serial_console(0); | ||
83 | } | 55 | } |
84 | 56 | ||
85 | /* | 57 | /* |
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void) | |||
352 | /* NOR */ | 324 | /* NOR */ |
353 | cpu9krea_add_device_nor(); | 325 | cpu9krea_add_device_nor(); |
354 | /* Serial */ | 326 | /* Serial */ |
327 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
328 | at91_register_uart(0, 0, 0); | ||
329 | |||
330 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
331 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
332 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
333 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
334 | |||
335 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
336 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
337 | ATMEL_UART_RTS); | ||
338 | |||
339 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
340 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
341 | ATMEL_UART_RTS); | ||
342 | |||
343 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
344 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
345 | |||
346 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
347 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
348 | |||
349 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
350 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
355 | at91_add_device_serial(); | 351 | at91_add_device_serial(); |
356 | /* USB Host */ | 352 | /* USB Host */ |
357 | at91_add_device_usbh(&cpu9krea_usbh_data); | 353 | at91_add_device_usbh(&cpu9krea_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index e094cc81fe25..895cf2dba612 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -59,28 +59,6 @@ static void __init cpuat91_init_early(void) | |||
59 | 59 | ||
60 | /* Initialize processor: 18.432 MHz crystal */ | 60 | /* Initialize processor: 18.432 MHz crystal */ |
61 | at91_initialize(18432000); | 61 | at91_initialize(18432000); |
62 | |||
63 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
64 | at91_register_uart(0, 0, 0); | ||
65 | |||
66 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
68 | ATMEL_UART_RTS); | ||
69 | |||
70 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
71 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
72 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
73 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
74 | |||
75 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
76 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
77 | |||
78 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
79 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
80 | ATMEL_UART_RTS); | ||
81 | |||
82 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
83 | at91_set_serial_console(0); | ||
84 | } | 62 | } |
85 | 63 | ||
86 | static struct macb_platform_data __initdata cpuat91_eth_data = { | 64 | static struct macb_platform_data __initdata cpuat91_eth_data = { |
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = { | |||
161 | static void __init cpuat91_board_init(void) | 139 | static void __init cpuat91_board_init(void) |
162 | { | 140 | { |
163 | /* Serial */ | 141 | /* Serial */ |
142 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
143 | at91_register_uart(0, 0, 0); | ||
144 | |||
145 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
146 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
147 | ATMEL_UART_RTS); | ||
148 | |||
149 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
151 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
152 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
153 | |||
154 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
155 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
156 | |||
157 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
159 | ATMEL_UART_RTS); | ||
164 | at91_add_device_serial(); | 160 | at91_add_device_serial(); |
165 | /* LEDs. */ | 161 | /* LEDs. */ |
166 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); | 162 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 1a1547b1ce4e..cd813361cd26 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -47,15 +47,6 @@ static void __init csb337_init_early(void) | |||
47 | { | 47 | { |
48 | /* Initialize processor: 3.6864 MHz crystal */ | 48 | /* Initialize processor: 3.6864 MHz crystal */ |
49 | at91_initialize(3686400); | 49 | at91_initialize(3686400); |
50 | |||
51 | /* Setup the LEDs */ | ||
52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
53 | |||
54 | /* DBGU on ttyS0 */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* make console=ttyS0 the default */ | ||
58 | at91_set_serial_console(0); | ||
59 | } | 50 | } |
60 | 51 | ||
61 | static struct macb_platform_data __initdata csb337_eth_data = { | 52 | static struct macb_platform_data __initdata csb337_eth_data = { |
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = { | |||
228 | 219 | ||
229 | static void __init csb337_board_init(void) | 220 | static void __init csb337_board_init(void) |
230 | { | 221 | { |
222 | /* Setup the LEDs */ | ||
223 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
231 | /* Serial */ | 224 | /* Serial */ |
225 | /* DBGU on ttyS0 */ | ||
226 | at91_register_uart(0, 0, 0); | ||
232 | at91_add_device_serial(); | 227 | at91_add_device_serial(); |
233 | /* Ethernet */ | 228 | /* Ethernet */ |
234 | at91_add_device_eth(&csb337_eth_data); | 229 | at91_add_device_eth(&csb337_eth_data); |
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index f650bf39455d..7c8b05a57d7f 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -44,12 +44,6 @@ static void __init csb637_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 3.6864 MHz crystal */ | 45 | /* Initialize processor: 3.6864 MHz crystal */ |
46 | at91_initialize(3686400); | 46 | at91_initialize(3686400); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* make console=ttyS0 (ie, DBGU) the default */ | ||
52 | at91_set_serial_console(0); | ||
53 | } | 47 | } |
54 | 48 | ||
55 | static struct macb_platform_data __initdata csb637_eth_data = { | 49 | static struct macb_platform_data __initdata csb637_eth_data = { |
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void) | |||
118 | /* LED(s) */ | 112 | /* LED(s) */ |
119 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); | 113 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); |
120 | /* Serial */ | 114 | /* Serial */ |
115 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
116 | at91_register_uart(0, 0, 0); | ||
121 | at91_add_device_serial(); | 117 | at91_add_device_serial(); |
122 | /* Ethernet */ | 118 | /* Ethernet */ |
123 | at91_add_device_eth(&csb637_eth_data); | 119 | at91_add_device_eth(&csb637_eth_data); |
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index c18d4d307801..a1fce05aa7a5 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -1,10 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Setup code for AT91SAM Evaluation Kits with Device Tree support | 2 | * Setup code for AT91SAM Evaluation Kits with Device Tree support |
3 | * | 3 | * |
4 | * Covers: * AT91SAM9G45-EKES board | ||
5 | * * AT91SAM9M10-EKES board | ||
6 | * * AT91SAM9M10G45-EK board | ||
7 | * | ||
8 | * Copyright (C) 2011 Atmel, | 4 | * Copyright (C) 2011 Atmel, |
9 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> | 5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> |
10 | * | 6 | * |
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void) | |||
49 | } | 45 | } |
50 | 46 | ||
51 | static const char *at91_dt_board_compat[] __initdata = { | 47 | static const char *at91_dt_board_compat[] __initdata = { |
52 | "atmel,at91sam9m10g45ek", | 48 | "atmel,at91sam9", |
53 | "atmel,at91sam9x5ek", | ||
54 | "calao,usb-a9g20", | ||
55 | NULL | 49 | NULL |
56 | }; | 50 | }; |
57 | 51 | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index d302ca3eeb64..bd1017297989 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 18.432 MHz crystal */ | 45 | /* Initialize processor: 18.432 MHz crystal */ |
46 | at91_initialize(18432000); | 46 | at91_initialize(18432000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | |||
56 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
57 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
58 | |||
59 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
60 | at91_set_serial_console(0); | ||
61 | } | 47 | } |
62 | 48 | ||
63 | static struct macb_platform_data __initdata eb9200_eth_data = { | 49 | static struct macb_platform_data __initdata eb9200_eth_data = { |
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = { | |||
101 | static void __init eb9200_board_init(void) | 87 | static void __init eb9200_board_init(void) |
102 | { | 88 | { |
103 | /* Serial */ | 89 | /* Serial */ |
90 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
91 | at91_register_uart(0, 0, 0); | ||
92 | |||
93 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
94 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
95 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
96 | | ATMEL_UART_RI); | ||
97 | |||
98 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
99 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
104 | at91_add_device_serial(); | 100 | at91_add_device_serial(); |
105 | /* Ethernet */ | 101 | /* Ethernet */ |
106 | at91_add_device_eth(&eb9200_eth_data); | 102 | at91_add_device_eth(&eb9200_eth_data); |
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 69966ce4d776..89cc3726a9ce 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -50,18 +50,6 @@ static void __init ecb_at91init_early(void) | |||
50 | 50 | ||
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | |||
63 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
64 | at91_set_serial_console(0); | ||
65 | } | 53 | } |
66 | 54 | ||
67 | static struct macb_platform_data __initdata ecb_at91eth_data = { | 55 | static struct macb_platform_data __initdata ecb_at91eth_data = { |
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { | |||
151 | 139 | ||
152 | static void __init ecb_at91board_init(void) | 140 | static void __init ecb_at91board_init(void) |
153 | { | 141 | { |
142 | /* Setup the LEDs */ | ||
143 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | ||
144 | |||
154 | /* Serial */ | 145 | /* Serial */ |
146 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
147 | at91_register_uart(0, 0, 0); | ||
148 | |||
149 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
155 | at91_add_device_serial(); | 151 | at91_add_device_serial(); |
156 | 152 | ||
157 | /* Ethernet */ | 153 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index f23aabef8551..558546cf63f4 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void) | |||
37 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | 37 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); |
38 | 38 | ||
39 | at91_initialize(18432000); | 39 | at91_initialize(18432000); |
40 | |||
41 | /* Setup the LEDs */ | ||
42 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
43 | |||
44 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
45 | at91_register_uart(0, 0, 0); | ||
46 | |||
47 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
48 | at91_set_serial_console(0); | ||
49 | } | 40 | } |
50 | 41 | ||
51 | static struct macb_platform_data __initdata eco920_eth_data = { | 42 | static struct macb_platform_data __initdata eco920_eth_data = { |
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = { | |||
103 | 94 | ||
104 | static void __init eco920_board_init(void) | 95 | static void __init eco920_board_init(void) |
105 | { | 96 | { |
97 | /* Setup the LEDs */ | ||
98 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
99 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
100 | at91_register_uart(0, 0, 0); | ||
106 | at91_add_device_serial(); | 101 | at91_add_device_serial(); |
107 | at91_add_device_eth(&eco920_eth_data); | 102 | at91_add_device_eth(&eco920_eth_data); |
108 | at91_add_device_usbh(&eco920_usbh_data); | 103 | at91_add_device_usbh(&eco920_usbh_data); |
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c index 1815152001f7..47658f78105d 100644 --- a/arch/arm/mach-at91/board-flexibity.c +++ b/arch/arm/mach-at91/board-flexibity.c | |||
@@ -41,12 +41,6 @@ static void __init flexibity_init_early(void) | |||
41 | { | 41 | { |
42 | /* Initialize processor: 18.432 MHz crystal */ | 42 | /* Initialize processor: 18.432 MHz crystal */ |
43 | at91_initialize(18432000); | 43 | at91_initialize(18432000); |
44 | |||
45 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
46 | at91_register_uart(0, 0, 0); | ||
47 | |||
48 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
49 | at91_set_serial_console(0); | ||
50 | } | 44 | } |
51 | 45 | ||
52 | /* USB Host port */ | 46 | /* USB Host port */ |
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = { | |||
143 | static void __init flexibity_board_init(void) | 137 | static void __init flexibity_board_init(void) |
144 | { | 138 | { |
145 | /* Serial */ | 139 | /* Serial */ |
140 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
141 | at91_register_uart(0, 0, 0); | ||
146 | at91_add_device_serial(); | 142 | at91_add_device_serial(); |
147 | /* USB Host */ | 143 | /* USB Host */ |
148 | at91_add_device_usbh(&flexibity_usbh_data); | 144 | at91_add_device_usbh(&flexibity_usbh_data); |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index caf017f0f4ee..33411e6ecb1f 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -61,44 +61,6 @@ static void __init foxg20_init_early(void) | |||
61 | { | 61 | { |
62 | /* Initialize processor: 18.432 MHz crystal */ | 62 | /* Initialize processor: 18.432 MHz crystal */ |
63 | at91_initialize(18432000); | 63 | at91_initialize(18432000); |
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
70 | ATMEL_UART_CTS | ||
71 | | ATMEL_UART_RTS | ||
72 | | ATMEL_UART_DTR | ||
73 | | ATMEL_UART_DSR | ||
74 | | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
79 | ATMEL_UART_CTS | ||
80 | | ATMEL_UART_RTS); | ||
81 | |||
82 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
83 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
84 | |||
85 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
86 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
87 | ATMEL_UART_CTS | ||
88 | | ATMEL_UART_RTS); | ||
89 | |||
90 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
91 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
92 | |||
93 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
94 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
95 | |||
96 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
97 | at91_set_serial_console(0); | ||
98 | |||
99 | /* Set the internal pull-up resistor on DRXD */ | ||
100 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
101 | |||
102 | } | 64 | } |
103 | 65 | ||
104 | /* | 66 | /* |
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = { | |||
241 | static void __init foxg20_board_init(void) | 203 | static void __init foxg20_board_init(void) |
242 | { | 204 | { |
243 | /* Serial */ | 205 | /* Serial */ |
206 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
207 | at91_register_uart(0, 0, 0); | ||
208 | |||
209 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
210 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
211 | ATMEL_UART_CTS | ||
212 | | ATMEL_UART_RTS | ||
213 | | ATMEL_UART_DTR | ||
214 | | ATMEL_UART_DSR | ||
215 | | ATMEL_UART_DCD | ||
216 | | ATMEL_UART_RI); | ||
217 | |||
218 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
219 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
220 | ATMEL_UART_CTS | ||
221 | | ATMEL_UART_RTS); | ||
222 | |||
223 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
225 | |||
226 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
227 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
228 | ATMEL_UART_CTS | ||
229 | | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
233 | |||
234 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
235 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
236 | |||
237 | /* Set the internal pull-up resistor on DRXD */ | ||
238 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
244 | at91_add_device_serial(); | 239 | at91_add_device_serial(); |
245 | /* USB Host */ | 240 | /* USB Host */ |
246 | at91_add_device_usbh(&foxg20_usbh_data); | 241 | at91_add_device_usbh(&foxg20_usbh_data); |
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index 230e71969fb7..3e0dfa643a86 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -41,38 +41,6 @@ | |||
41 | static void __init gsia18s_init_early(void) | 41 | static void __init gsia18s_init_early(void) |
42 | { | 42 | { |
43 | stamp9g20_init_early(); | 43 | stamp9g20_init_early(); |
44 | |||
45 | /* | ||
46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
47 | * Used for Internal Analog Modem. | ||
48 | */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
50 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
51 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
52 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
53 | /* | ||
54 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
55 | * Used for GPS or WiFi or Data stream. | ||
56 | */ | ||
57 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
58 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | /* | ||
60 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
61 | * Used for External Modem. | ||
62 | */ | ||
63 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
64 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | /* | ||
66 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
67 | * Used for RS-485. | ||
68 | */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
70 | |||
71 | /* | ||
72 | * USART4 on ttyS5 (Rx, Tx). | ||
73 | * Used for TRX433 Radio Module. | ||
74 | */ | ||
75 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
76 | } | 44 | } |
77 | 45 | ||
78 | /* | 46 | /* |
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void) | |||
558 | 526 | ||
559 | static void __init gsia18s_board_init(void) | 527 | static void __init gsia18s_board_init(void) |
560 | { | 528 | { |
529 | /* | ||
530 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
531 | * Used for Internal Analog Modem. | ||
532 | */ | ||
533 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
534 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
535 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
536 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
537 | /* | ||
538 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
539 | * Used for GPS or WiFi or Data stream. | ||
540 | */ | ||
541 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
542 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
543 | /* | ||
544 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
545 | * Used for External Modem. | ||
546 | */ | ||
547 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
548 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
549 | /* | ||
550 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
551 | * Used for RS-485. | ||
552 | */ | ||
553 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
554 | |||
555 | /* | ||
556 | * USART4 on ttyS5 (Rx, Tx). | ||
557 | * Used for TRX433 Radio Module. | ||
558 | */ | ||
559 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
561 | stamp9g20_board_init(); | 560 | stamp9g20_board_init(); |
562 | at91_add_device_usbh(&usbh_data); | 561 | at91_add_device_usbh(&usbh_data); |
563 | at91_add_device_udc(&udc_data); | 562 | at91_add_device_udc(&udc_data); |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index efde1b2327c8..f260657f32bc 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -47,18 +47,6 @@ static void __init kafa_init_early(void) | |||
47 | 47 | ||
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91_initialize(18432000); | 49 | at91_initialize(18432000); |
50 | |||
51 | /* Set up the LEDs */ | ||
52 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | ||
53 | |||
54 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 50 | } |
63 | 51 | ||
64 | static struct macb_platform_data __initdata kafa_eth_data = { | 52 | static struct macb_platform_data __initdata kafa_eth_data = { |
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = { | |||
79 | 67 | ||
80 | static void __init kafa_board_init(void) | 68 | static void __init kafa_board_init(void) |
81 | { | 69 | { |
70 | /* Set up the LEDs */ | ||
71 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | ||
72 | |||
82 | /* Serial */ | 73 | /* Serial */ |
74 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
75 | at91_register_uart(0, 0, 0); | ||
76 | |||
77 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
83 | at91_add_device_serial(); | 79 | at91_add_device_serial(); |
84 | /* Ethernet */ | 80 | /* Ethernet */ |
85 | at91_add_device_eth(&kafa_eth_data); | 81 | at91_add_device_eth(&kafa_eth_data); |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 59b92aab9bcf..ba39db5482b9 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -50,24 +50,6 @@ static void __init kb9202_init_early(void) | |||
50 | 50 | ||
51 | /* Initialize processor: 10 MHz crystal */ | 51 | /* Initialize processor: 10 MHz crystal */ |
52 | at91_initialize(10000000); | 52 | at91_initialize(10000000); |
53 | |||
54 | /* Set up the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | |||
63 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
64 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
65 | |||
66 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 53 | } |
72 | 54 | ||
73 | static struct macb_platform_data __initdata kb9202_eth_data = { | 55 | static struct macb_platform_data __initdata kb9202_eth_data = { |
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { | |||
115 | 97 | ||
116 | static void __init kb9202_board_init(void) | 98 | static void __init kb9202_board_init(void) |
117 | { | 99 | { |
100 | /* Set up the LEDs */ | ||
101 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | ||
102 | |||
118 | /* Serial */ | 103 | /* Serial */ |
104 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
105 | at91_register_uart(0, 0, 0); | ||
106 | |||
107 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
108 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
109 | |||
110 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
111 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
112 | |||
113 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
114 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
119 | at91_add_device_serial(); | 115 | at91_add_device_serial(); |
120 | /* Ethernet */ | 116 | /* Ethernet */ |
121 | at91_add_device_eth(&kb9202_eth_data); | 117 | at91_add_device_eth(&kb9202_eth_data); |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 57d5f6a4726a..d2f4cc161766 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -55,15 +55,6 @@ static void __init neocore926_init_early(void) | |||
55 | { | 55 | { |
56 | /* Initialize processor: 20 MHz crystal */ | 56 | /* Initialize processor: 20 MHz crystal */ |
57 | at91_initialize(20000000); | 57 | at91_initialize(20000000); |
58 | |||
59 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
60 | at91_register_uart(0, 0, 0); | ||
61 | |||
62 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
63 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 58 | } |
68 | 59 | ||
69 | /* | 60 | /* |
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = { | |||
341 | static void __init neocore926_board_init(void) | 332 | static void __init neocore926_board_init(void) |
342 | { | 333 | { |
343 | /* Serial */ | 334 | /* Serial */ |
335 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
336 | at91_register_uart(0, 0, 0); | ||
337 | |||
338 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
339 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
344 | at91_add_device_serial(); | 340 | at91_add_device_serial(); |
345 | 341 | ||
346 | /* USB Host */ | 342 | /* USB Host */ |
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index b4a12fc184c8..7fe638342421 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -40,17 +40,6 @@ | |||
40 | static void __init pcontrol_g20_init_early(void) | 40 | static void __init pcontrol_g20_init_early(void) |
41 | { | 41 | { |
42 | stamp9g20_init_early(); | 42 | stamp9g20_init_early(); |
43 | |||
44 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
45 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
46 | | ATMEL_UART_RTS); | ||
47 | |||
48 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
50 | | ATMEL_UART_RTS); | ||
51 | |||
52 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
53 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
54 | } | 43 | } |
55 | 44 | ||
56 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { | 45 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { |
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = { | |||
199 | 188 | ||
200 | static void __init pcontrol_g20_board_init(void) | 189 | static void __init pcontrol_g20_board_init(void) |
201 | { | 190 | { |
191 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
192 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
193 | | ATMEL_UART_RTS); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
196 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
197 | | ATMEL_UART_RTS); | ||
198 | |||
199 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
200 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
202 | stamp9g20_board_init(); | 201 | stamp9g20_board_init(); |
203 | at91_add_device_usbh(&usbh_data); | 202 | at91_add_device_usbh(&usbh_data); |
204 | at91_add_device_eth(&macb_data); | 203 | at91_add_device_eth(&macb_data); |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index 59e35dd14863..b45c0a5d5ca7 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -48,17 +48,6 @@ static void __init picotux200_init_early(void) | |||
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91_initialize(18432000); | 50 | at91_initialize(18432000); |
51 | |||
52 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
53 | at91_register_uart(0, 0, 0); | ||
54 | |||
55 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
56 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
57 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
58 | | ATMEL_UART_RI); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 51 | } |
63 | 52 | ||
64 | static struct macb_platform_data __initdata picotux200_eth_data = { | 53 | static struct macb_platform_data __initdata picotux200_eth_data = { |
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = { | |||
106 | static void __init picotux200_board_init(void) | 95 | static void __init picotux200_board_init(void) |
107 | { | 96 | { |
108 | /* Serial */ | 97 | /* Serial */ |
98 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
99 | at91_register_uart(0, 0, 0); | ||
100 | |||
101 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
102 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
103 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
104 | | ATMEL_UART_RI); | ||
109 | at91_add_device_serial(); | 105 | at91_add_device_serial(); |
110 | /* Ethernet */ | 106 | /* Ethernet */ |
111 | at91_add_device_eth(&picotux200_eth_data); | 107 | at91_add_device_eth(&picotux200_eth_data); |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index b6ed5ed7081a..0c61bf0d272c 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -52,24 +52,6 @@ static void __init ek_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 12.000 MHz crystal */ | 53 | /* Initialize processor: 12.000 MHz crystal */ |
54 | at91_initialize(12000000); | 54 | at91_initialize(12000000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
61 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
62 | | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | |||
67 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
68 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
69 | |||
70 | /* set serial console to ttyS1 (ie, USART0) */ | ||
71 | at91_set_serial_console(1); | ||
72 | |||
73 | } | 55 | } |
74 | 56 | ||
75 | /* | 57 | /* |
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = { | |||
235 | static void __init ek_board_init(void) | 217 | static void __init ek_board_init(void) |
236 | { | 218 | { |
237 | /* Serial */ | 219 | /* Serial */ |
220 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
221 | at91_register_uart(0, 0, 0); | ||
222 | |||
223 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
225 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
226 | | ATMEL_UART_RI); | ||
227 | |||
228 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
229 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
238 | at91_add_device_serial(); | 233 | at91_add_device_serial(); |
239 | /* USB Host */ | 234 | /* USB Host */ |
240 | at91_add_device_usbh(&ek_usbh_data); | 235 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 01332aa538b2..afd7a4713766 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -50,20 +50,6 @@ static void __init dk_init_early(void) | |||
50 | { | 50 | { |
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 53 | } |
68 | 54 | ||
69 | static struct macb_platform_data __initdata dk_eth_data = { | 55 | static struct macb_platform_data __initdata dk_eth_data = { |
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = { | |||
190 | 176 | ||
191 | static void __init dk_board_init(void) | 177 | static void __init dk_board_init(void) |
192 | { | 178 | { |
179 | /* Setup the LEDs */ | ||
180 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | ||
181 | |||
193 | /* Serial */ | 182 | /* Serial */ |
183 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
184 | at91_register_uart(0, 0, 0); | ||
185 | |||
186 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
187 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
188 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
189 | | ATMEL_UART_RI); | ||
194 | at91_add_device_serial(); | 190 | at91_add_device_serial(); |
195 | /* Ethernet */ | 191 | /* Ethernet */ |
196 | at91_add_device_eth(&dk_eth_data); | 192 | at91_add_device_eth(&dk_eth_data); |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index b2e4fe21f346..2b15b8adec4c 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -50,20 +50,6 @@ static void __init ek_init_early(void) | |||
50 | { | 50 | { |
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 53 | } |
68 | 54 | ||
69 | static struct macb_platform_data __initdata ek_eth_data = { | 55 | static struct macb_platform_data __initdata ek_eth_data = { |
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = { | |||
161 | 147 | ||
162 | static void __init ek_board_init(void) | 148 | static void __init ek_board_init(void) |
163 | { | 149 | { |
150 | /* Setup the LEDs */ | ||
151 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | ||
152 | |||
164 | /* Serial */ | 153 | /* Serial */ |
154 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
155 | at91_register_uart(0, 0, 0); | ||
156 | |||
157 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
159 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
160 | | ATMEL_UART_RI); | ||
165 | at91_add_device_serial(); | 161 | at91_add_device_serial(); |
166 | /* Ethernet */ | 162 | /* Ethernet */ |
167 | at91_add_device_eth(&ek_eth_data); | 163 | at91_add_device_eth(&ek_eth_data); |
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c index af0750fafa29..24ab9be7510f 100644 --- a/arch/arm/mach-at91/board-rsi-ews.c +++ b/arch/arm/mach-at91/board-rsi-ews.c | |||
@@ -35,26 +35,6 @@ static void __init rsi_ews_init_early(void) | |||
35 | { | 35 | { |
36 | /* Initialize processor: 18.432 MHz crystal */ | 36 | /* Initialize processor: 18.432 MHz crystal */ |
37 | at91_initialize(18432000); | 37 | at91_initialize(18432000); |
38 | |||
39 | /* Setup the LEDs */ | ||
40 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); | ||
41 | |||
42 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
43 | /* This one is for debugging */ | ||
44 | at91_register_uart(0, 0, 0); | ||
45 | |||
46 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
47 | /* Dialin/-out modem interface */ | ||
48 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
49 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
50 | | ATMEL_UART_RI); | ||
51 | |||
52 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
53 | /* RS485 communication */ | ||
54 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 38 | } |
59 | 39 | ||
60 | /* | 40 | /* |
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = { | |||
204 | */ | 184 | */ |
205 | static void __init rsi_ews_board_init(void) | 185 | static void __init rsi_ews_board_init(void) |
206 | { | 186 | { |
187 | /* Setup the LEDs */ | ||
188 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); | ||
189 | |||
207 | /* Serial */ | 190 | /* Serial */ |
191 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
192 | /* This one is for debugging */ | ||
193 | at91_register_uart(0, 0, 0); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
196 | /* Dialin/-out modem interface */ | ||
197 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
198 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
199 | | ATMEL_UART_RI); | ||
200 | |||
201 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
202 | /* RS485 communication */ | ||
203 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
208 | at91_add_device_serial(); | 204 | at91_add_device_serial(); |
209 | at91_set_gpio_output(AT91_PIN_PA21, 0); | 205 | at91_set_gpio_output(AT91_PIN_PA21, 0); |
210 | /* Ethernet */ | 206 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index e8b116b6cba6..cdd21f2595d2 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -48,23 +48,6 @@ static void __init ek_init_early(void) | |||
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91_initialize(18432000); | 50 | at91_initialize(18432000); |
51 | |||
52 | /* Setup the LEDs */ | ||
53 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); | ||
54 | |||
55 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
56 | at91_register_uart(0, 0, 0); | ||
57 | |||
58 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
59 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
60 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
61 | | ATMEL_UART_RI); | ||
62 | |||
63 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
64 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | |||
66 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
67 | at91_set_serial_console(0); | ||
68 | } | 51 | } |
69 | 52 | ||
70 | /* | 53 | /* |
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = { | |||
184 | 167 | ||
185 | static void __init ek_board_init(void) | 168 | static void __init ek_board_init(void) |
186 | { | 169 | { |
170 | /* Setup the LEDs */ | ||
171 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); | ||
172 | |||
187 | /* Serial */ | 173 | /* Serial */ |
174 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
175 | at91_register_uart(0, 0, 0); | ||
176 | |||
177 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
178 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
179 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
180 | | ATMEL_UART_RI); | ||
181 | |||
182 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
183 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
188 | at91_add_device_serial(); | 184 | at91_add_device_serial(); |
189 | /* USB Host */ | 185 | /* USB Host */ |
190 | at91_add_device_usbh(&ek_usbh_data); | 186 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index d5aec55b0eb4..7b3c3913551a 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -54,20 +54,6 @@ static void __init ek_init_early(void) | |||
54 | { | 54 | { |
55 | /* Initialize processor: 18.432 MHz crystal */ | 55 | /* Initialize processor: 18.432 MHz crystal */ |
56 | at91_initialize(18432000); | 56 | at91_initialize(18432000); |
57 | |||
58 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
59 | at91_register_uart(0, 0, 0); | ||
60 | |||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
63 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
64 | | ATMEL_UART_RI); | ||
65 | |||
66 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 57 | } |
72 | 58 | ||
73 | /* | 59 | /* |
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {} | |||
320 | static void __init ek_board_init(void) | 306 | static void __init ek_board_init(void) |
321 | { | 307 | { |
322 | /* Serial */ | 308 | /* Serial */ |
309 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
310 | at91_register_uart(0, 0, 0); | ||
311 | |||
312 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
313 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
314 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
315 | | ATMEL_UART_RI); | ||
316 | |||
317 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
318 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
323 | at91_add_device_serial(); | 319 | at91_add_device_serial(); |
324 | /* USB Host */ | 320 | /* USB Host */ |
325 | at91_add_device_usbh(&ek_usbh_data); | 321 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 065fed342424..2736453821b0 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -58,15 +58,6 @@ static void __init ek_init_early(void) | |||
58 | { | 58 | { |
59 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
60 | at91_initialize(18432000); | 60 | at91_initialize(18432000); |
61 | |||
62 | /* Setup the LEDs */ | ||
63 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); | ||
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
69 | at91_set_serial_console(0); | ||
70 | } | 61 | } |
71 | 62 | ||
72 | /* | 63 | /* |
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = { | |||
577 | 568 | ||
578 | static void __init ek_board_init(void) | 569 | static void __init ek_board_init(void) |
579 | { | 570 | { |
571 | /* Setup the LEDs */ | ||
572 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); | ||
573 | |||
580 | /* Serial */ | 574 | /* Serial */ |
575 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
576 | at91_register_uart(0, 0, 0); | ||
581 | at91_add_device_serial(); | 577 | at91_add_device_serial(); |
582 | /* USB Host */ | 578 | /* USB Host */ |
583 | at91_add_device_usbh(&ek_usbh_data); | 579 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 2ffe50f3a9e9..983cb98d2465 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -57,15 +57,6 @@ static void __init ek_init_early(void) | |||
57 | { | 57 | { |
58 | /* Initialize processor: 16.367 MHz crystal */ | 58 | /* Initialize processor: 16.367 MHz crystal */ |
59 | at91_initialize(16367660); | 59 | at91_initialize(16367660); |
60 | |||
61 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
62 | at91_register_uart(0, 0, 0); | ||
63 | |||
64 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | |||
67 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
68 | at91_set_serial_console(0); | ||
69 | } | 60 | } |
70 | 61 | ||
71 | /* | 62 | /* |
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = { | |||
412 | static void __init ek_board_init(void) | 403 | static void __init ek_board_init(void) |
413 | { | 404 | { |
414 | /* Serial */ | 405 | /* Serial */ |
406 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
407 | at91_register_uart(0, 0, 0); | ||
408 | |||
409 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
410 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
415 | at91_add_device_serial(); | 411 | at91_add_device_serial(); |
416 | /* USB Host */ | 412 | /* USB Host */ |
417 | at91_add_device_usbh(&ek_usbh_data); | 413 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 8923ec9f5831..3d615532ae5c 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -65,20 +65,6 @@ static void __init ek_init_early(void) | |||
65 | { | 65 | { |
66 | /* Initialize processor: 18.432 MHz crystal */ | 66 | /* Initialize processor: 18.432 MHz crystal */ |
67 | at91_initialize(18432000); | 67 | at91_initialize(18432000); |
68 | |||
69 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
70 | at91_register_uart(0, 0, 0); | ||
71 | |||
72 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
74 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
79 | |||
80 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
81 | at91_set_serial_console(0); | ||
82 | } | 68 | } |
83 | 69 | ||
84 | /* | 70 | /* |
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { | |||
372 | static void __init ek_board_init(void) | 358 | static void __init ek_board_init(void) |
373 | { | 359 | { |
374 | /* Serial */ | 360 | /* Serial */ |
361 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
362 | at91_register_uart(0, 0, 0); | ||
363 | |||
364 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
365 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
366 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
367 | | ATMEL_UART_RI); | ||
368 | |||
369 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
370 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
375 | at91_add_device_serial(); | 371 | at91_add_device_serial(); |
376 | /* USB Host */ | 372 | /* USB Host */ |
377 | at91_add_device_usbh(&ek_usbh_data); | 373 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index c88e908ddd82..9a87f0b072f8 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -53,16 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.000 MHz crystal */ | 54 | /* Initialize processor: 12.000 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 not connected on the -EK board */ | ||
61 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
62 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
63 | |||
64 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
65 | at91_set_serial_console(0); | ||
66 | } | 56 | } |
67 | 57 | ||
68 | /* | 58 | /* |
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = { | |||
457 | static void __init ek_board_init(void) | 447 | static void __init ek_board_init(void) |
458 | { | 448 | { |
459 | /* Serial */ | 449 | /* Serial */ |
450 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
451 | at91_register_uart(0, 0, 0); | ||
452 | |||
453 | /* USART0 not connected on the -EK board */ | ||
454 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
455 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
460 | at91_add_device_serial(); | 456 | at91_add_device_serial(); |
461 | /* USB HS Host */ | 457 | /* USB HS Host */ |
462 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); | 458 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index b109ce2ba864..be3239f13daa 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -42,15 +42,6 @@ static void __init ek_init_early(void) | |||
42 | { | 42 | { |
43 | /* Initialize processor: 12.000 MHz crystal */ | 43 | /* Initialize processor: 12.000 MHz crystal */ |
44 | at91_initialize(12000000); | 44 | at91_initialize(12000000); |
45 | |||
46 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
47 | at91_register_uart(0, 0, 0); | ||
48 | |||
49 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
50 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
51 | |||
52 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
53 | at91_set_serial_console(0); | ||
54 | } | 45 | } |
55 | 46 | ||
56 | /* | 47 | /* |
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {} | |||
296 | static void __init ek_board_init(void) | 287 | static void __init ek_board_init(void) |
297 | { | 288 | { |
298 | /* Serial */ | 289 | /* Serial */ |
290 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
291 | at91_register_uart(0, 0, 0); | ||
292 | |||
293 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
294 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
299 | at91_add_device_serial(); | 295 | at91_add_device_serial(); |
300 | /* USB HS */ | 296 | /* USB HS */ |
301 | at91_add_device_usba(&ek_usba_udc_data); | 297 | at91_add_device_usba(&ek_usba_udc_data); |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index ebc9d01ce742..9d446f1bb45f 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -43,16 +43,6 @@ | |||
43 | static void __init snapper9260_init_early(void) | 43 | static void __init snapper9260_init_early(void) |
44 | { | 44 | { |
45 | at91_initialize(18432000); | 45 | at91_initialize(18432000); |
46 | |||
47 | /* Debug on ttyS0 */ | ||
48 | at91_register_uart(0, 0, 0); | ||
49 | at91_set_serial_console(0); | ||
50 | |||
51 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
52 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
53 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
54 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
55 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
56 | } | 46 | } |
57 | 47 | ||
58 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { | 48 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { |
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void) | |||
168 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); | 158 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); |
169 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); | 159 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); |
170 | 160 | ||
161 | /* Debug on ttyS0 */ | ||
162 | at91_register_uart(0, 0, 0); | ||
163 | |||
164 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
165 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
166 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
167 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
168 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
171 | at91_add_device_serial(); | 169 | at91_add_device_serial(); |
172 | at91_add_device_usbh(&snapper9260_usbh_data); | 170 | at91_add_device_usbh(&snapper9260_usbh_data); |
173 | at91_add_device_udc(&snapper9260_udc_data); | 171 | at91_add_device_udc(&snapper9260_udc_data); |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 7640049410a0..ee86f9d7ee72 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -36,44 +36,6 @@ void __init stamp9g20_init_early(void) | |||
36 | { | 36 | { |
37 | /* Initialize processor: 18.432 MHz crystal */ | 37 | /* Initialize processor: 18.432 MHz crystal */ |
38 | at91_initialize(18432000); | 38 | at91_initialize(18432000); |
39 | |||
40 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
41 | at91_register_uart(0, 0, 0); | ||
42 | |||
43 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
44 | at91_set_serial_console(0); | ||
45 | } | ||
46 | |||
47 | static void __init stamp9g20evb_init_early(void) | ||
48 | { | ||
49 | stamp9g20_init_early(); | ||
50 | |||
51 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
54 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
55 | } | ||
56 | |||
57 | static void __init portuxg20_init_early(void) | ||
58 | { | ||
59 | stamp9g20_init_early(); | ||
60 | |||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
63 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
64 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
65 | |||
66 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
70 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
71 | |||
72 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
74 | |||
75 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
76 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
77 | } | 39 | } |
78 | 40 | ||
79 | /* | 41 | /* |
@@ -254,6 +216,8 @@ void add_w1(void) | |||
254 | void __init stamp9g20_board_init(void) | 216 | void __init stamp9g20_board_init(void) |
255 | { | 217 | { |
256 | /* Serial */ | 218 | /* Serial */ |
219 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
220 | at91_register_uart(0, 0, 0); | ||
257 | at91_add_device_serial(); | 221 | at91_add_device_serial(); |
258 | /* NAND */ | 222 | /* NAND */ |
259 | add_device_nand(); | 223 | add_device_nand(); |
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void) | |||
269 | 233 | ||
270 | static void __init portuxg20_board_init(void) | 234 | static void __init portuxg20_board_init(void) |
271 | { | 235 | { |
236 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
237 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
238 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
239 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
240 | |||
241 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
242 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
243 | |||
244 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
245 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
246 | |||
247 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
248 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
249 | |||
250 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
251 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
272 | stamp9g20_board_init(); | 252 | stamp9g20_board_init(); |
273 | /* USB Host */ | 253 | /* USB Host */ |
274 | at91_add_device_usbh(&usbh_data); | 254 | at91_add_device_usbh(&usbh_data); |
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void) | |||
286 | 266 | ||
287 | static void __init stamp9g20evb_board_init(void) | 267 | static void __init stamp9g20evb_board_init(void) |
288 | { | 268 | { |
269 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
270 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
271 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
272 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
289 | stamp9g20_board_init(); | 273 | stamp9g20_board_init(); |
290 | /* USB Host */ | 274 | /* USB Host */ |
291 | at91_add_device_usbh(&usbh_data); | 275 | at91_add_device_usbh(&usbh_data); |
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20") | |||
303 | /* Maintainer: taskit GmbH */ | 287 | /* Maintainer: taskit GmbH */ |
304 | .timer = &at91sam926x_timer, | 288 | .timer = &at91sam926x_timer, |
305 | .map_io = at91_map_io, | 289 | .map_io = at91_map_io, |
306 | .init_early = portuxg20_init_early, | 290 | .init_early = stamp9g20_init_early, |
307 | .init_irq = at91_init_irq_default, | 291 | .init_irq = at91_init_irq_default, |
308 | .init_machine = portuxg20_board_init, | 292 | .init_machine = portuxg20_board_init, |
309 | MACHINE_END | 293 | MACHINE_END |
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20") | |||
312 | /* Maintainer: taskit GmbH */ | 296 | /* Maintainer: taskit GmbH */ |
313 | .timer = &at91sam926x_timer, | 297 | .timer = &at91sam926x_timer, |
314 | .map_io = at91_map_io, | 298 | .map_io = at91_map_io, |
315 | .init_early = stamp9g20evb_init_early, | 299 | .init_early = stamp9g20_init_early, |
316 | .init_irq = at91_init_irq_default, | 300 | .init_irq = at91_init_irq_default, |
317 | .init_machine = stamp9g20evb_board_init, | 301 | .init_machine = stamp9g20evb_board_init, |
318 | MACHINE_END | 302 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index b7483a3d0980..332ecd40bd02 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -53,12 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.00 MHz crystal */ | 54 | /* Initialize processor: 12.00 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 56 | } |
63 | 57 | ||
64 | /* | 58 | /* |
@@ -325,6 +319,8 @@ static void __init ek_add_device_leds(void) | |||
325 | static void __init ek_board_init(void) | 319 | static void __init ek_board_init(void) |
326 | { | 320 | { |
327 | /* Serial */ | 321 | /* Serial */ |
322 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
323 | at91_register_uart(0, 0, 0); | ||
328 | at91_add_device_serial(); | 324 | at91_add_device_serial(); |
329 | /* USB Host */ | 325 | /* USB Host */ |
330 | at91_add_device_usbh(&ek_usbh_data); | 326 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 38dd279d30b2..d56665ea4b55 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -58,26 +58,6 @@ static void __init yl9200_init_early(void) | |||
58 | 58 | ||
59 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
60 | at91_initialize(18432000); | 60 | at91_initialize(18432000); |
61 | |||
62 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | ||
63 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | ||
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
70 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
71 | | ATMEL_UART_RI); | ||
72 | |||
73 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
74 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
75 | |||
76 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
77 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
78 | |||
79 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
80 | at91_set_serial_console(0); | ||
81 | } | 61 | } |
82 | 62 | ||
83 | /* | 63 | /* |
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {} | |||
560 | 540 | ||
561 | static void __init yl9200_board_init(void) | 541 | static void __init yl9200_board_init(void) |
562 | { | 542 | { |
543 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | ||
544 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | ||
545 | |||
563 | /* Serial */ | 546 | /* Serial */ |
547 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
548 | at91_register_uart(0, 0, 0); | ||
549 | |||
550 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
551 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
552 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
553 | | ATMEL_UART_RI); | ||
554 | |||
555 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
556 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
557 | |||
558 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
559 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
564 | at91_add_device_serial(); | 560 | at91_add_device_serial(); |
565 | /* Ethernet */ | 561 | /* Ethernet */ |
566 | at91_add_device_eth(&yl9200_eth_data); | 562 | at91_add_device_eth(&yl9200_eth_data); |
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index ece1f9aefb47..0c6381516a5a 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/export.h> | 21 | #include <linux/export.h> |
22 | #include <asm/proc-fns.h> | 22 | #include <asm/proc-fns.h> |
23 | #include <asm/cpuidle.h> | 23 | #include <asm/cpuidle.h> |
24 | #include <mach/cpu.h> | ||
24 | 25 | ||
25 | #include "pm.h" | 26 | #include "pm.h" |
26 | 27 | ||
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev, | |||
33 | struct cpuidle_driver *drv, | 34 | struct cpuidle_driver *drv, |
34 | int index) | 35 | int index) |
35 | { | 36 | { |
36 | at91_standby(); | 37 | if (cpu_is_at91rm9200()) |
38 | at91rm9200_standby(); | ||
39 | else if (cpu_is_at91sam9g45()) | ||
40 | at91sam9g45_standby(); | ||
41 | else | ||
42 | at91sam9_standby(); | ||
37 | 43 | ||
38 | return index; | 44 | return index; |
39 | } | 45 | } |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index dd9b346c451d..0a60bf837037 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer; | |||
40 | extern struct sys_timer at91x40_timer; | 40 | extern struct sys_timer at91x40_timer; |
41 | 41 | ||
42 | /* Clocks */ | 42 | /* Clocks */ |
43 | /* | ||
44 | * function to specify the clock of the default console. As we do not | ||
45 | * use the device/driver bus, the dev_name is not intialize. So we need | ||
46 | * to link the clock to a specific con_id only "usart" | ||
47 | */ | ||
48 | extern void __init at91rm9200_set_console_clock(int id); | ||
49 | extern void __init at91sam9260_set_console_clock(int id); | ||
50 | extern void __init at91sam9261_set_console_clock(int id); | ||
51 | extern void __init at91sam9263_set_console_clock(int id); | ||
52 | extern void __init at91sam9rl_set_console_clock(int id); | ||
53 | extern void __init at91sam9g45_set_console_clock(int id); | ||
54 | #ifdef CONFIG_AT91_PMC_UNIT | 43 | #ifdef CONFIG_AT91_PMC_UNIT |
55 | extern int __init at91_clock_init(unsigned long main_clock); | 44 | extern int __init at91_clock_init(unsigned long main_clock); |
56 | extern int __init at91_dt_clock_init(void); | 45 | extern int __init at91_dt_clock_init(void); |
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h index 603e6aac2a4f..e67317c67761 100644 --- a/arch/arm/mach-at91/include/mach/at91rm9200.h +++ b/arch/arm/mach-at91/include/mach/at91rm9200.h | |||
@@ -88,11 +88,6 @@ | |||
88 | #define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */ | 88 | #define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */ |
89 | #define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */ | 89 | #define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */ |
90 | 90 | ||
91 | #define AT91_USART0 AT91RM9200_BASE_US0 | ||
92 | #define AT91_USART1 AT91RM9200_BASE_US1 | ||
93 | #define AT91_USART2 AT91RM9200_BASE_US2 | ||
94 | #define AT91_USART3 AT91RM9200_BASE_US3 | ||
95 | |||
96 | /* | 91 | /* |
97 | * Internal Memory. | 92 | * Internal Memory. |
98 | */ | 93 | */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h index 08ae9afd00fe..416c7b6c56d3 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9260.h +++ b/arch/arm/mach-at91/include/mach/at91sam9260.h | |||
@@ -95,13 +95,6 @@ | |||
95 | #define AT91SAM9260_BASE_WDT 0xfffffd40 | 95 | #define AT91SAM9260_BASE_WDT 0xfffffd40 |
96 | #define AT91SAM9260_BASE_GPBR 0xfffffd50 | 96 | #define AT91SAM9260_BASE_GPBR 0xfffffd50 |
97 | 97 | ||
98 | #define AT91_USART0 AT91SAM9260_BASE_US0 | ||
99 | #define AT91_USART1 AT91SAM9260_BASE_US1 | ||
100 | #define AT91_USART2 AT91SAM9260_BASE_US2 | ||
101 | #define AT91_USART3 AT91SAM9260_BASE_US3 | ||
102 | #define AT91_USART4 AT91SAM9260_BASE_US4 | ||
103 | #define AT91_USART5 AT91SAM9260_BASE_US5 | ||
104 | |||
105 | 98 | ||
106 | /* | 99 | /* |
107 | * Internal Memory. | 100 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h index 44fbdc12ee62..a041406d06ee 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9261.h +++ b/arch/arm/mach-at91/include/mach/at91sam9261.h | |||
@@ -79,10 +79,6 @@ | |||
79 | #define AT91SAM9261_BASE_WDT 0xfffffd40 | 79 | #define AT91SAM9261_BASE_WDT 0xfffffd40 |
80 | #define AT91SAM9261_BASE_GPBR 0xfffffd50 | 80 | #define AT91SAM9261_BASE_GPBR 0xfffffd50 |
81 | 81 | ||
82 | #define AT91_USART0 AT91SAM9261_BASE_US0 | ||
83 | #define AT91_USART1 AT91SAM9261_BASE_US1 | ||
84 | #define AT91_USART2 AT91SAM9261_BASE_US2 | ||
85 | |||
86 | 82 | ||
87 | /* | 83 | /* |
88 | * Internal Memory. | 84 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h index d96cbb2e03c4..d201029d60b3 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9263.h +++ b/arch/arm/mach-at91/include/mach/at91sam9263.h | |||
@@ -95,10 +95,6 @@ | |||
95 | #define AT91SAM9263_BASE_RTT1 0xfffffd50 | 95 | #define AT91SAM9263_BASE_RTT1 0xfffffd50 |
96 | #define AT91SAM9263_BASE_GPBR 0xfffffd60 | 96 | #define AT91SAM9263_BASE_GPBR 0xfffffd60 |
97 | 97 | ||
98 | #define AT91_USART0 AT91SAM9263_BASE_US0 | ||
99 | #define AT91_USART1 AT91SAM9263_BASE_US1 | ||
100 | #define AT91_USART2 AT91SAM9263_BASE_US2 | ||
101 | |||
102 | #define AT91_SMC AT91_SMC0 | 98 | #define AT91_SMC AT91_SMC0 |
103 | 99 | ||
104 | /* | 100 | /* |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h index d052abcff852..3a4da24d5911 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9g45.h +++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h | |||
@@ -106,11 +106,6 @@ | |||
106 | #define AT91SAM9G45_BASE_RTC 0xfffffdb0 | 106 | #define AT91SAM9G45_BASE_RTC 0xfffffdb0 |
107 | #define AT91SAM9G45_BASE_GPBR 0xfffffd60 | 107 | #define AT91SAM9G45_BASE_GPBR 0xfffffd60 |
108 | 108 | ||
109 | #define AT91_USART0 AT91SAM9G45_BASE_US0 | ||
110 | #define AT91_USART1 AT91SAM9G45_BASE_US1 | ||
111 | #define AT91_USART2 AT91SAM9G45_BASE_US2 | ||
112 | #define AT91_USART3 AT91SAM9G45_BASE_US3 | ||
113 | |||
114 | /* | 109 | /* |
115 | * Internal Memory. | 110 | * Internal Memory. |
116 | */ | 111 | */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h index e0073eb10144..a15db56d33fa 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9rl.h +++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h | |||
@@ -89,11 +89,6 @@ | |||
89 | #define AT91SAM9RL_BASE_GPBR 0xfffffd60 | 89 | #define AT91SAM9RL_BASE_GPBR 0xfffffd60 |
90 | #define AT91SAM9RL_BASE_RTC 0xfffffe00 | 90 | #define AT91SAM9RL_BASE_RTC 0xfffffe00 |
91 | 91 | ||
92 | #define AT91_USART0 AT91SAM9RL_BASE_US0 | ||
93 | #define AT91_USART1 AT91SAM9RL_BASE_US1 | ||
94 | #define AT91_USART2 AT91SAM9RL_BASE_US2 | ||
95 | #define AT91_USART3 AT91SAM9RL_BASE_US3 | ||
96 | |||
97 | 92 | ||
98 | /* | 93 | /* |
99 | * Internal Memory. | 94 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h index 88e43d534cdf..c75ee19b58d3 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9x5.h +++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h | |||
@@ -55,14 +55,6 @@ | |||
55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 | 55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * Base addresses for early serial code (uncompress.h) | ||
59 | */ | ||
60 | #define AT91_DBGU AT91_BASE_DBGU0 | ||
61 | #define AT91_USART0 AT91SAM9X5_BASE_USART0 | ||
62 | #define AT91_USART1 AT91SAM9X5_BASE_USART1 | ||
63 | #define AT91_USART2 AT91SAM9X5_BASE_USART2 | ||
64 | |||
65 | /* | ||
66 | * Internal Memory. | 58 | * Internal Memory. |
67 | */ | 59 | */ |
68 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 60 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 49a821192c65..369afc2ffc5b 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de | |||
121 | #define ATMEL_UART_RI 0x20 | 121 | #define ATMEL_UART_RI 0x20 |
122 | 122 | ||
123 | extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); | 123 | extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); |
124 | extern void __init at91_set_serial_console(unsigned portnr); | ||
125 | 124 | ||
126 | extern struct platform_device *atmel_default_console_device; | 125 | extern struct platform_device *atmel_default_console_device; |
127 | 126 | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 0118c3338552..73d2fd209ce4 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #define ARCH_REVISON_9200_BGA (0 << 0) | 54 | #define ARCH_REVISON_9200_BGA (0 << 0) |
55 | #define ARCH_REVISON_9200_PQFP (1 << 0) | 55 | #define ARCH_REVISON_9200_PQFP (1 << 0) |
56 | 56 | ||
57 | #ifndef __ASSEMBLY__ | ||
57 | enum at91_soc_type { | 58 | enum at91_soc_type { |
58 | /* 920T */ | 59 | /* 920T */ |
59 | AT91_SOC_RM9200, | 60 | AT91_SOC_RM9200, |
@@ -106,7 +107,7 @@ static inline int at91_soc_is_detected(void) | |||
106 | return at91_soc_initdata.type != AT91_SOC_NONE; | 107 | return at91_soc_initdata.type != AT91_SOC_NONE; |
107 | } | 108 | } |
108 | 109 | ||
109 | #ifdef CONFIG_ARCH_AT91RM9200 | 110 | #ifdef CONFIG_SOC_AT91RM9200 |
110 | #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) | 111 | #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) |
111 | #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) | 112 | #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) |
112 | #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) | 113 | #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) |
@@ -116,45 +117,37 @@ static inline int at91_soc_is_detected(void) | |||
116 | #define cpu_is_at91rm9200_pqfp() (0) | 117 | #define cpu_is_at91rm9200_pqfp() (0) |
117 | #endif | 118 | #endif |
118 | 119 | ||
119 | #ifdef CONFIG_ARCH_AT91SAM9260 | 120 | #ifdef CONFIG_SOC_AT91SAM9260 |
120 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) | 121 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) |
121 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) | 122 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) |
123 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) | ||
122 | #else | 124 | #else |
123 | #define cpu_is_at91sam9xe() (0) | 125 | #define cpu_is_at91sam9xe() (0) |
124 | #define cpu_is_at91sam9260() (0) | 126 | #define cpu_is_at91sam9260() (0) |
125 | #endif | ||
126 | |||
127 | #ifdef CONFIG_ARCH_AT91SAM9G20 | ||
128 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) | ||
129 | #else | ||
130 | #define cpu_is_at91sam9g20() (0) | 127 | #define cpu_is_at91sam9g20() (0) |
131 | #endif | 128 | #endif |
132 | 129 | ||
133 | #ifdef CONFIG_ARCH_AT91SAM9261 | 130 | #ifdef CONFIG_SOC_AT91SAM9261 |
134 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) | 131 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) |
135 | #else | ||
136 | #define cpu_is_at91sam9261() (0) | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_ARCH_AT91SAM9G10 | ||
140 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) | 132 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) |
141 | #else | 133 | #else |
134 | #define cpu_is_at91sam9261() (0) | ||
142 | #define cpu_is_at91sam9g10() (0) | 135 | #define cpu_is_at91sam9g10() (0) |
143 | #endif | 136 | #endif |
144 | 137 | ||
145 | #ifdef CONFIG_ARCH_AT91SAM9263 | 138 | #ifdef CONFIG_SOC_AT91SAM9263 |
146 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) | 139 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) |
147 | #else | 140 | #else |
148 | #define cpu_is_at91sam9263() (0) | 141 | #define cpu_is_at91sam9263() (0) |
149 | #endif | 142 | #endif |
150 | 143 | ||
151 | #ifdef CONFIG_ARCH_AT91SAM9RL | 144 | #ifdef CONFIG_SOC_AT91SAM9RL |
152 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) | 145 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) |
153 | #else | 146 | #else |
154 | #define cpu_is_at91sam9rl() (0) | 147 | #define cpu_is_at91sam9rl() (0) |
155 | #endif | 148 | #endif |
156 | 149 | ||
157 | #ifdef CONFIG_ARCH_AT91SAM9G45 | 150 | #ifdef CONFIG_SOC_AT91SAM9G45 |
158 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) | 151 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) |
159 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) | 152 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) |
160 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) | 153 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) |
@@ -168,7 +161,7 @@ static inline int at91_soc_is_detected(void) | |||
168 | #define cpu_is_at91sam9m11() (0) | 161 | #define cpu_is_at91sam9m11() (0) |
169 | #endif | 162 | #endif |
170 | 163 | ||
171 | #ifdef CONFIG_ARCH_AT91SAM9X5 | 164 | #ifdef CONFIG_SOC_AT91SAM9X5 |
172 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) | 165 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) |
173 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) | 166 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) |
174 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) | 167 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) |
@@ -189,5 +182,6 @@ static inline int at91_soc_is_detected(void) | |||
189 | * definitions may reduce clutter in common drivers. | 182 | * definitions may reduce clutter in common drivers. |
190 | */ | 183 | */ |
191 | #define cpu_is_at32ap7000() (0) | 184 | #define cpu_is_at32ap7000() (0) |
185 | #endif /* __ASSEMBLY__ */ | ||
192 | 186 | ||
193 | #endif /* __MACH_CPU_H__ */ | 187 | #endif /* __MACH_CPU_H__ */ |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index e9e29a6c3868..3a01f8ff7e74 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -22,27 +22,17 @@ | |||
22 | /* 9263, 9g45 */ | 22 | /* 9263, 9g45 */ |
23 | #define AT91_BASE_DBGU1 0xffffee00 | 23 | #define AT91_BASE_DBGU1 0xffffee00 |
24 | 24 | ||
25 | #if defined(CONFIG_ARCH_AT91RM9200) | 25 | #if defined(CONFIG_ARCH_AT91X40) |
26 | #include <mach/at91x40.h> | ||
27 | #else | ||
26 | #include <mach/at91rm9200.h> | 28 | #include <mach/at91rm9200.h> |
27 | #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20) | ||
28 | #include <mach/at91sam9260.h> | 29 | #include <mach/at91sam9260.h> |
29 | #elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10) | ||
30 | #include <mach/at91sam9261.h> | 30 | #include <mach/at91sam9261.h> |
31 | #elif defined(CONFIG_ARCH_AT91SAM9263) | ||
32 | #include <mach/at91sam9263.h> | 31 | #include <mach/at91sam9263.h> |
33 | #elif defined(CONFIG_ARCH_AT91SAM9RL) | ||
34 | #include <mach/at91sam9rl.h> | 32 | #include <mach/at91sam9rl.h> |
35 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
36 | #include <mach/at91sam9g45.h> | 33 | #include <mach/at91sam9g45.h> |
37 | #elif defined(CONFIG_ARCH_AT91SAM9X5) | ||
38 | #include <mach/at91sam9x5.h> | 34 | #include <mach/at91sam9x5.h> |
39 | #elif defined(CONFIG_ARCH_AT91X40) | ||
40 | #include <mach/at91x40.h> | ||
41 | #else | ||
42 | #error "Unsupported AT91 processor" | ||
43 | #endif | ||
44 | 35 | ||
45 | #if !defined(CONFIG_ARCH_AT91X40) | ||
46 | /* | 36 | /* |
47 | * On all at91 except rm9200 and x40 have the System Controller starts | 37 | * On all at91 except rm9200 and x40 have the System Controller starts |
48 | * at address 0xffffc000 and has a size of 16KiB. | 38 | * at address 0xffffc000 and has a size of 16KiB. |
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h index 4218647c1fcd..6f6118d1576a 100644 --- a/arch/arm/mach-at91/include/mach/uncompress.h +++ b/arch/arm/mach-at91/include/mach/uncompress.h | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-at91/include/mach/uncompress.h | 2 | * arch/arm/mach-at91/include/mach/uncompress.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -25,22 +26,147 @@ | |||
25 | #include <linux/atmel_serial.h> | 26 | #include <linux/atmel_serial.h> |
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | 28 | ||
28 | #if defined(CONFIG_AT91_EARLY_DBGU0) | 29 | #include <mach/at91_dbgu.h> |
29 | #define UART_OFFSET AT91_BASE_DBGU0 | 30 | #include <mach/cpu.h> |
30 | #elif defined(CONFIG_AT91_EARLY_DBGU1) | 31 | |
31 | #define UART_OFFSET AT91_BASE_DBGU1 | 32 | void __iomem *at91_uart; |
32 | #elif defined(CONFIG_AT91_EARLY_USART0) | 33 | |
33 | #define UART_OFFSET AT91_USART0 | 34 | #if !defined(CONFIG_ARCH_AT91X40) |
34 | #elif defined(CONFIG_AT91_EARLY_USART1) | 35 | static const u32 uarts_rm9200[] = { |
35 | #define UART_OFFSET AT91_USART1 | 36 | AT91_BASE_DBGU0, |
36 | #elif defined(CONFIG_AT91_EARLY_USART2) | 37 | AT91RM9200_BASE_US0, |
37 | #define UART_OFFSET AT91_USART2 | 38 | AT91RM9200_BASE_US1, |
38 | #elif defined(CONFIG_AT91_EARLY_USART3) | 39 | AT91RM9200_BASE_US2, |
39 | #define UART_OFFSET AT91_USART3 | 40 | AT91RM9200_BASE_US3, |
40 | #elif defined(CONFIG_AT91_EARLY_USART4) | 41 | 0, |
41 | #define UART_OFFSET AT91_USART4 | 42 | }; |
42 | #elif defined(CONFIG_AT91_EARLY_USART5) | 43 | |
43 | #define UART_OFFSET AT91_USART5 | 44 | static const u32 uarts_sam9260[] = { |
45 | AT91_BASE_DBGU0, | ||
46 | AT91SAM9260_BASE_US0, | ||
47 | AT91SAM9260_BASE_US1, | ||
48 | AT91SAM9260_BASE_US2, | ||
49 | AT91SAM9260_BASE_US3, | ||
50 | AT91SAM9260_BASE_US4, | ||
51 | AT91SAM9260_BASE_US5, | ||
52 | 0, | ||
53 | }; | ||
54 | |||
55 | static const u32 uarts_sam9261[] = { | ||
56 | AT91_BASE_DBGU0, | ||
57 | AT91SAM9261_BASE_US0, | ||
58 | AT91SAM9261_BASE_US1, | ||
59 | AT91SAM9261_BASE_US2, | ||
60 | 0, | ||
61 | }; | ||
62 | |||
63 | static const u32 uarts_sam9263[] = { | ||
64 | AT91_BASE_DBGU1, | ||
65 | AT91SAM9263_BASE_US0, | ||
66 | AT91SAM9263_BASE_US1, | ||
67 | AT91SAM9263_BASE_US2, | ||
68 | 0, | ||
69 | }; | ||
70 | |||
71 | static const u32 uarts_sam9g45[] = { | ||
72 | AT91_BASE_DBGU1, | ||
73 | AT91SAM9G45_BASE_US0, | ||
74 | AT91SAM9G45_BASE_US1, | ||
75 | AT91SAM9G45_BASE_US2, | ||
76 | AT91SAM9G45_BASE_US3, | ||
77 | 0, | ||
78 | }; | ||
79 | |||
80 | static const u32 uarts_sam9rl[] = { | ||
81 | AT91_BASE_DBGU0, | ||
82 | AT91SAM9RL_BASE_US0, | ||
83 | AT91SAM9RL_BASE_US1, | ||
84 | AT91SAM9RL_BASE_US2, | ||
85 | AT91SAM9RL_BASE_US3, | ||
86 | 0, | ||
87 | }; | ||
88 | |||
89 | static const u32 uarts_sam9x5[] = { | ||
90 | AT91_BASE_DBGU0, | ||
91 | AT91SAM9X5_BASE_USART0, | ||
92 | AT91SAM9X5_BASE_USART1, | ||
93 | AT91SAM9X5_BASE_USART2, | ||
94 | 0, | ||
95 | }; | ||
96 | |||
97 | static inline const u32* decomp_soc_detect(u32 dbgu_base) | ||
98 | { | ||
99 | u32 cidr, socid; | ||
100 | |||
101 | cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR); | ||
102 | socid = cidr & ~AT91_CIDR_VERSION; | ||
103 | |||
104 | switch (socid) { | ||
105 | case ARCH_ID_AT91RM9200: | ||
106 | return uarts_rm9200; | ||
107 | |||
108 | case ARCH_ID_AT91SAM9G20: | ||
109 | case ARCH_ID_AT91SAM9260: | ||
110 | return uarts_sam9260; | ||
111 | |||
112 | case ARCH_ID_AT91SAM9261: | ||
113 | return uarts_sam9261; | ||
114 | |||
115 | case ARCH_ID_AT91SAM9263: | ||
116 | return uarts_sam9263; | ||
117 | |||
118 | case ARCH_ID_AT91SAM9G45: | ||
119 | return uarts_sam9g45; | ||
120 | |||
121 | case ARCH_ID_AT91SAM9RL64: | ||
122 | return uarts_sam9rl; | ||
123 | |||
124 | case ARCH_ID_AT91SAM9X5: | ||
125 | return uarts_sam9x5; | ||
126 | } | ||
127 | |||
128 | /* at91sam9g10 */ | ||
129 | if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { | ||
130 | return uarts_sam9261; | ||
131 | } | ||
132 | /* at91sam9xe */ | ||
133 | else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) { | ||
134 | return uarts_sam9260; | ||
135 | } | ||
136 | |||
137 | return NULL; | ||
138 | } | ||
139 | |||
140 | static inline void arch_decomp_setup(void) | ||
141 | { | ||
142 | int i = 0; | ||
143 | const u32* usarts; | ||
144 | |||
145 | usarts = decomp_soc_detect(AT91_BASE_DBGU0); | ||
146 | |||
147 | if (!usarts) | ||
148 | usarts = decomp_soc_detect(AT91_BASE_DBGU1); | ||
149 | if (!usarts) { | ||
150 | at91_uart = NULL; | ||
151 | return; | ||
152 | } | ||
153 | |||
154 | do { | ||
155 | /* physical address */ | ||
156 | at91_uart = (void __iomem *)usarts[i]; | ||
157 | |||
158 | if (__raw_readl(at91_uart + ATMEL_US_BRGR)) | ||
159 | return; | ||
160 | i++; | ||
161 | } while (usarts[i]); | ||
162 | |||
163 | at91_uart = NULL; | ||
164 | } | ||
165 | #else | ||
166 | static inline void arch_decomp_setup(void) | ||
167 | { | ||
168 | at91_uart = NULL; | ||
169 | } | ||
44 | #endif | 170 | #endif |
45 | 171 | ||
46 | /* | 172 | /* |
@@ -52,28 +178,24 @@ | |||
52 | */ | 178 | */ |
53 | static void putc(int c) | 179 | static void putc(int c) |
54 | { | 180 | { |
55 | #ifdef UART_OFFSET | 181 | if (!at91_uart) |
56 | void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ | 182 | return; |
57 | 183 | ||
58 | while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY)) | 184 | while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY)) |
59 | barrier(); | 185 | barrier(); |
60 | __raw_writel(c, sys + ATMEL_US_THR); | 186 | __raw_writel(c, at91_uart + ATMEL_US_THR); |
61 | #endif | ||
62 | } | 187 | } |
63 | 188 | ||
64 | static inline void flush(void) | 189 | static inline void flush(void) |
65 | { | 190 | { |
66 | #ifdef UART_OFFSET | 191 | if (!at91_uart) |
67 | void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ | 192 | return; |
68 | 193 | ||
69 | /* wait for transmission to complete */ | 194 | /* wait for transmission to complete */ |
70 | while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY)) | 195 | while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY)) |
71 | barrier(); | 196 | barrier(); |
72 | #endif | ||
73 | } | 197 | } |
74 | 198 | ||
75 | #define arch_decomp_setup() | ||
76 | |||
77 | #define arch_decomp_wdog() | 199 | #define arch_decomp_wdog() |
78 | 200 | ||
79 | #endif | 201 | #endif |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index f630250c6b87..1bfaad628731 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -261,7 +261,12 @@ static int at91_pm_enter(suspend_state_t state) | |||
261 | * For ARM 926 based chips, this requirement is weaker | 261 | * For ARM 926 based chips, this requirement is weaker |
262 | * as at91sam9 can access a RAM in self-refresh mode. | 262 | * as at91sam9 can access a RAM in self-refresh mode. |
263 | */ | 263 | */ |
264 | at91_standby(); | 264 | if (cpu_is_at91rm9200()) |
265 | at91rm9200_standby(); | ||
266 | else if (cpu_is_at91sam9g45()) | ||
267 | at91sam9g45_standby(); | ||
268 | else | ||
269 | at91sam9_standby(); | ||
265 | break; | 270 | break; |
266 | 271 | ||
267 | case PM_SUSPEND_ON: | 272 | case PM_SUSPEND_ON: |
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void) | |||
307 | 312 | ||
308 | pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : "")); | 313 | pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : "")); |
309 | 314 | ||
310 | #ifdef CONFIG_ARCH_AT91RM9200 | ||
311 | /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */ | 315 | /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */ |
312 | at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0); | 316 | if (cpu_is_at91rm9200()) |
313 | #endif | 317 | at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0); |
314 | 318 | ||
315 | suspend_set_ops(&at91_pm_ops); | 319 | suspend_set_ops(&at91_pm_ops); |
316 | 320 | ||
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 89f56f3a802e..38f467c6b710 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #define __ARCH_ARM_MACH_AT91_PM | 12 | #define __ARCH_ARM_MACH_AT91_PM |
13 | 13 | ||
14 | #include <mach/at91_ramc.h> | 14 | #include <mach/at91_ramc.h> |
15 | #ifdef CONFIG_ARCH_AT91RM9200 | ||
16 | #include <mach/at91rm9200_sdramc.h> | 15 | #include <mach/at91rm9200_sdramc.h> |
17 | 16 | ||
18 | /* | 17 | /* |
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void) | |||
43 | "r" (lpr)); | 42 | "r" (lpr)); |
44 | } | 43 | } |
45 | 44 | ||
46 | #define at91_standby at91rm9200_standby | ||
47 | |||
48 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
49 | |||
50 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to | 45 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to |
51 | * remember. | 46 | * remember. |
52 | */ | 47 | */ |
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void) | |||
75 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); | 70 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); |
76 | } | 71 | } |
77 | 72 | ||
78 | #define at91_standby at91sam9g45_standby | 73 | #ifdef CONFIG_SOC_AT91SAM9263 |
79 | |||
80 | #else | ||
81 | |||
82 | #ifdef CONFIG_ARCH_AT91SAM9263 | ||
83 | /* | 74 | /* |
84 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 75 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
85 | * handle those cases both here and in the Suspend-To-RAM support. | 76 | * handle those cases both here and in the Suspend-To-RAM support. |
@@ -102,8 +93,4 @@ static inline void at91sam9_standby(void) | |||
102 | at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); | 93 | at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); |
103 | } | 94 | } |
104 | 95 | ||
105 | #define at91_standby at91sam9_standby | ||
106 | |||
107 | #endif | ||
108 | |||
109 | #endif | 96 | #endif |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index db5452123f17..098c28ddf025 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <mach/at91_ramc.h> | 18 | #include <mach/at91_ramc.h> |
19 | 19 | ||
20 | 20 | ||
21 | #ifdef CONFIG_ARCH_AT91SAM9263 | 21 | #ifdef CONFIG_SOC_AT91SAM9263 |
22 | /* | 22 | /* |
23 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 23 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
24 | * handle those cases both here and in the Suspend-To-RAM support. | 24 | * handle those cases both here and in the Suspend-To-RAM support. |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 5db4aa45404a..683dddfd8b13 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -26,30 +26,30 @@ static inline int at91_soc_is_enabled(void) | |||
26 | return at91_boot_soc.init != NULL; | 26 | return at91_boot_soc.init != NULL; |
27 | } | 27 | } |
28 | 28 | ||
29 | #if !defined(CONFIG_ARCH_AT91RM9200) | 29 | #if !defined(CONFIG_SOC_AT91RM9200) |
30 | #define at91rm9200_soc at91_boot_soc | 30 | #define at91rm9200_soc at91_boot_soc |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)) | 33 | #if !defined(CONFIG_SOC_AT91SAM9260) |
34 | #define at91sam9260_soc at91_boot_soc | 34 | #define at91sam9260_soc at91_boot_soc |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)) | 37 | #if !defined(CONFIG_SOC_AT91SAM9261) |
38 | #define at91sam9261_soc at91_boot_soc | 38 | #define at91sam9261_soc at91_boot_soc |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #if !defined(CONFIG_ARCH_AT91SAM9263) | 41 | #if !defined(CONFIG_SOC_AT91SAM9263) |
42 | #define at91sam9263_soc at91_boot_soc | 42 | #define at91sam9263_soc at91_boot_soc |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #if !defined(CONFIG_ARCH_AT91SAM9G45) | 45 | #if !defined(CONFIG_SOC_AT91SAM9G45) |
46 | #define at91sam9g45_soc at91_boot_soc | 46 | #define at91sam9g45_soc at91_boot_soc |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #if !defined(CONFIG_ARCH_AT91SAM9RL) | 49 | #if !defined(CONFIG_SOC_AT91SAM9RL) |
50 | #define at91sam9rl_soc at91_boot_soc | 50 | #define at91sam9rl_soc at91_boot_soc |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #if !defined(CONFIG_ARCH_AT91SAM9X5) | 53 | #if !defined(CONFIG_SOC_AT91SAM9X5) |
54 | #define at91sam9x5_soc at91_boot_soc | 54 | #define at91sam9x5_soc at91_boot_soc |
55 | #endif | 55 | #endif |
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index e432d4acee1f..d14bbe949a4f 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -304,8 +304,7 @@ static void __init mx21ads_board_init(void) | |||
304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
305 | 305 | ||
306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
307 | platform_device_register_full( | 307 | platform_device_register_full(&mx21ads_cs8900_devinfo); |
308 | (struct platform_device_info *)&mx21ads_cs8900_devinfo); | ||
309 | } | 308 | } |
310 | 309 | ||
311 | static void __init mx21ads_timer_init(void) | 310 | static void __init mx21ads_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c index 586e9f822124..86e96ef11f9d 100644 --- a/arch/arm/mach-imx/mach-mx51_efikamx.c +++ b/arch/arm/mach-imx/mach-mx51_efikamx.c | |||
@@ -284,8 +284,7 @@ static struct sys_timer mx51_efikamx_timer = { | |||
284 | .init = mx51_efikamx_timer_init, | 284 | .init = mx51_efikamx_timer_init, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | 287 | MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)") |
288 | /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */ | ||
289 | .atag_offset = 0x100, | 288 | .atag_offset = 0x100, |
290 | .map_io = mx51_map_io, | 289 | .map_io = mx51_map_io, |
291 | .init_early = imx51_init_early, | 290 | .init_early = imx51_init_early, |
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c index 24aded9e109f..88f837a6cc76 100644 --- a/arch/arm/mach-imx/mach-mx51_efikasb.c +++ b/arch/arm/mach-imx/mach-mx51_efikasb.c | |||
@@ -280,7 +280,7 @@ static struct sys_timer mx51_efikasb_timer = { | |||
280 | .init = mx51_efikasb_timer_init, | 280 | .init = mx51_efikasb_timer_init, |
281 | }; | 281 | }; |
282 | 282 | ||
283 | MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") | 283 | MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)") |
284 | .atag_offset = 0x100, | 284 | .atag_offset = 0x100, |
285 | .map_io = mx51_map_io, | 285 | .map_io = mx51_map_io, |
286 | .init_early = imx51_init_early, | 286 | .init_early = imx51_init_early, |
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig deleted file mode 100644 index 08d2707f6ca8..000000000000 --- a/arch/arm/mach-ixp2000/Kconfig +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | |||
2 | if ARCH_IXP2000 | ||
3 | |||
4 | config ARCH_SUPPORTS_BIG_ENDIAN | ||
5 | bool | ||
6 | default y | ||
7 | |||
8 | menu "Intel IXP2400/2800 Implementation Options" | ||
9 | |||
10 | comment "IXP2400/2800 Platforms" | ||
11 | |||
12 | config ARCH_ENP2611 | ||
13 | bool "Support Radisys ENP-2611" | ||
14 | help | ||
15 | Say 'Y' here if you want your kernel to support the Radisys | ||
16 | ENP2611 PCI network processing card. For more information on | ||
17 | this card, see <file:Documentation/arm/IXP2000>. | ||
18 | |||
19 | config ARCH_IXDP2400 | ||
20 | bool "Support Intel IXDP2400" | ||
21 | help | ||
22 | Say 'Y' here if you want your kernel to support the Intel | ||
23 | IXDP2400 reference platform. For more information on | ||
24 | this platform, see <file:Documentation/arm/IXP2000>. | ||
25 | |||
26 | config ARCH_IXDP2800 | ||
27 | bool "Support Intel IXDP2800" | ||
28 | help | ||
29 | Say 'Y' here if you want your kernel to support the Intel | ||
30 | IXDP2800 reference platform. For more information on | ||
31 | this platform, see <file:Documentation/arm/IXP2000>. | ||
32 | |||
33 | config ARCH_IXDP2X00 | ||
34 | bool | ||
35 | depends on ARCH_IXDP2400 || ARCH_IXDP2800 | ||
36 | default y | ||
37 | |||
38 | config ARCH_IXDP2401 | ||
39 | bool "Support Intel IXDP2401" | ||
40 | help | ||
41 | Say 'Y' here if you want your kernel to support the Intel | ||
42 | IXDP2401 reference platform. For more information on | ||
43 | this platform, see <file:Documentation/arm/IXP2000>. | ||
44 | |||
45 | config ARCH_IXDP2801 | ||
46 | bool "Support Intel IXDP2801 and IXDP28x5" | ||
47 | help | ||
48 | Say 'Y' here if you want your kernel to support the Intel | ||
49 | IXDP2801/2805/2855 reference platforms. For more information on | ||
50 | this platform, see <file:Documentation/arm/IXP2000>. | ||
51 | |||
52 | config MACH_IXDP28X5 | ||
53 | bool | ||
54 | depends on ARCH_IXDP2801 | ||
55 | default y | ||
56 | |||
57 | config ARCH_IXDP2X01 | ||
58 | bool | ||
59 | depends on ARCH_IXDP2401 || ARCH_IXDP2801 | ||
60 | default y | ||
61 | |||
62 | config IXP2000_SUPPORT_BROKEN_PCI_IO | ||
63 | bool "Support broken PCI I/O on older IXP2000s" | ||
64 | default y | ||
65 | help | ||
66 | Say 'N' here if you only intend to run your kernel on an | ||
67 | IXP2000 B0 or later model and do not need the PCI I/O | ||
68 | byteswap workaround. Say 'Y' otherwise. | ||
69 | |||
70 | endmenu | ||
71 | |||
72 | endif | ||
diff --git a/arch/arm/mach-ixp2000/Makefile b/arch/arm/mach-ixp2000/Makefile deleted file mode 100644 index 1e6139d42a92..000000000000 --- a/arch/arm/mach-ixp2000/Makefile +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o pci.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_ARCH_ENP2611) += enp2611.o | ||
10 | obj-$(CONFIG_ARCH_IXDP2400) += ixdp2400.o | ||
11 | obj-$(CONFIG_ARCH_IXDP2800) += ixdp2800.o | ||
12 | obj-$(CONFIG_ARCH_IXDP2X00) += ixdp2x00.o | ||
13 | obj-$(CONFIG_ARCH_IXDP2X01) += ixdp2x01.o | ||
14 | |||
diff --git a/arch/arm/mach-ixp2000/Makefile.boot b/arch/arm/mach-ixp2000/Makefile.boot deleted file mode 100644 index 9c7af91d93da..000000000000 --- a/arch/arm/mach-ixp2000/Makefile.boot +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | zreladdr-y += 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | |||
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c deleted file mode 100644 index f214cdff01cb..000000000000 --- a/arch/arm/mach-ixp2000/core.c +++ /dev/null | |||
@@ -1,520 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/core.c | ||
3 | * | ||
4 | * Common routines used by all IXP2400/2800 based platforms. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (C) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on work Copyright (C) 2002-2003 Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/serial_8250.h> | ||
27 | #include <linux/mm.h> | ||
28 | #include <linux/export.h> | ||
29 | |||
30 | #include <asm/types.h> | ||
31 | #include <asm/setup.h> | ||
32 | #include <asm/memory.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/tlbflush.h> | ||
36 | #include <asm/pgtable.h> | ||
37 | |||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | #include <asm/mach/irq.h> | ||
41 | |||
42 | #include <mach/gpio-ixp2000.h> | ||
43 | |||
44 | static DEFINE_SPINLOCK(ixp2000_slowport_lock); | ||
45 | static unsigned long ixp2000_slowport_irq_flags; | ||
46 | |||
47 | /************************************************************************* | ||
48 | * Slowport access routines | ||
49 | *************************************************************************/ | ||
50 | void ixp2000_acquire_slowport(struct slowport_cfg *new_cfg, struct slowport_cfg *old_cfg) | ||
51 | { | ||
52 | spin_lock_irqsave(&ixp2000_slowport_lock, ixp2000_slowport_irq_flags); | ||
53 | |||
54 | old_cfg->CCR = *IXP2000_SLOWPORT_CCR; | ||
55 | old_cfg->WTC = *IXP2000_SLOWPORT_WTC2; | ||
56 | old_cfg->RTC = *IXP2000_SLOWPORT_RTC2; | ||
57 | old_cfg->PCR = *IXP2000_SLOWPORT_PCR; | ||
58 | old_cfg->ADC = *IXP2000_SLOWPORT_ADC; | ||
59 | |||
60 | ixp2000_reg_write(IXP2000_SLOWPORT_CCR, new_cfg->CCR); | ||
61 | ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, new_cfg->WTC); | ||
62 | ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, new_cfg->RTC); | ||
63 | ixp2000_reg_write(IXP2000_SLOWPORT_PCR, new_cfg->PCR); | ||
64 | ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, new_cfg->ADC); | ||
65 | } | ||
66 | |||
67 | void ixp2000_release_slowport(struct slowport_cfg *old_cfg) | ||
68 | { | ||
69 | ixp2000_reg_write(IXP2000_SLOWPORT_CCR, old_cfg->CCR); | ||
70 | ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, old_cfg->WTC); | ||
71 | ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, old_cfg->RTC); | ||
72 | ixp2000_reg_write(IXP2000_SLOWPORT_PCR, old_cfg->PCR); | ||
73 | ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, old_cfg->ADC); | ||
74 | |||
75 | spin_unlock_irqrestore(&ixp2000_slowport_lock, | ||
76 | ixp2000_slowport_irq_flags); | ||
77 | } | ||
78 | |||
79 | /************************************************************************* | ||
80 | * Chip specific mappings shared by all IXP2000 systems | ||
81 | *************************************************************************/ | ||
82 | static struct map_desc ixp2000_io_desc[] __initdata = { | ||
83 | { | ||
84 | .virtual = IXP2000_CAP_VIRT_BASE, | ||
85 | .pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE), | ||
86 | .length = IXP2000_CAP_SIZE, | ||
87 | .type = MT_DEVICE, | ||
88 | }, { | ||
89 | .virtual = IXP2000_INTCTL_VIRT_BASE, | ||
90 | .pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE), | ||
91 | .length = IXP2000_INTCTL_SIZE, | ||
92 | .type = MT_DEVICE, | ||
93 | }, { | ||
94 | .virtual = IXP2000_PCI_CREG_VIRT_BASE, | ||
95 | .pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE), | ||
96 | .length = IXP2000_PCI_CREG_SIZE, | ||
97 | .type = MT_DEVICE, | ||
98 | }, { | ||
99 | .virtual = IXP2000_PCI_CSR_VIRT_BASE, | ||
100 | .pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE), | ||
101 | .length = IXP2000_PCI_CSR_SIZE, | ||
102 | .type = MT_DEVICE, | ||
103 | }, { | ||
104 | .virtual = IXP2000_MSF_VIRT_BASE, | ||
105 | .pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE), | ||
106 | .length = IXP2000_MSF_SIZE, | ||
107 | .type = MT_DEVICE, | ||
108 | }, { | ||
109 | .virtual = IXP2000_SCRATCH_RING_VIRT_BASE, | ||
110 | .pfn = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE), | ||
111 | .length = IXP2000_SCRATCH_RING_SIZE, | ||
112 | .type = MT_DEVICE, | ||
113 | }, { | ||
114 | .virtual = IXP2000_SRAM0_VIRT_BASE, | ||
115 | .pfn = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE), | ||
116 | .length = IXP2000_SRAM0_SIZE, | ||
117 | .type = MT_DEVICE, | ||
118 | }, { | ||
119 | .virtual = IXP2000_PCI_IO_VIRT_BASE, | ||
120 | .pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE), | ||
121 | .length = IXP2000_PCI_IO_SIZE, | ||
122 | .type = MT_DEVICE, | ||
123 | }, { | ||
124 | .virtual = IXP2000_PCI_CFG0_VIRT_BASE, | ||
125 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE), | ||
126 | .length = IXP2000_PCI_CFG0_SIZE, | ||
127 | .type = MT_DEVICE, | ||
128 | }, { | ||
129 | .virtual = IXP2000_PCI_CFG1_VIRT_BASE, | ||
130 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE), | ||
131 | .length = IXP2000_PCI_CFG1_SIZE, | ||
132 | .type = MT_DEVICE, | ||
133 | } | ||
134 | }; | ||
135 | |||
136 | void __init ixp2000_map_io(void) | ||
137 | { | ||
138 | iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); | ||
139 | |||
140 | /* Set slowport to 8-bit mode. */ | ||
141 | ixp2000_reg_wrb(IXP2000_SLOWPORT_FRM, 1); | ||
142 | } | ||
143 | |||
144 | |||
145 | /************************************************************************* | ||
146 | * Serial port support for IXP2000 | ||
147 | *************************************************************************/ | ||
148 | static struct plat_serial8250_port ixp2000_serial_port[] = { | ||
149 | { | ||
150 | .mapbase = IXP2000_UART_PHYS_BASE, | ||
151 | .membase = (char *)(IXP2000_UART_VIRT_BASE + 3), | ||
152 | .irq = IRQ_IXP2000_UART, | ||
153 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
154 | .iotype = UPIO_MEM, | ||
155 | .regshift = 2, | ||
156 | .uartclk = 50000000, | ||
157 | }, | ||
158 | { }, | ||
159 | }; | ||
160 | |||
161 | static struct resource ixp2000_uart_resource = { | ||
162 | .start = IXP2000_UART_PHYS_BASE, | ||
163 | .end = IXP2000_UART_PHYS_BASE + 0x1f, | ||
164 | .flags = IORESOURCE_MEM, | ||
165 | }; | ||
166 | |||
167 | static struct platform_device ixp2000_serial_device = { | ||
168 | .name = "serial8250", | ||
169 | .id = PLAT8250_DEV_PLATFORM, | ||
170 | .dev = { | ||
171 | .platform_data = ixp2000_serial_port, | ||
172 | }, | ||
173 | .num_resources = 1, | ||
174 | .resource = &ixp2000_uart_resource, | ||
175 | }; | ||
176 | |||
177 | void __init ixp2000_uart_init(void) | ||
178 | { | ||
179 | platform_device_register(&ixp2000_serial_device); | ||
180 | } | ||
181 | |||
182 | |||
183 | /************************************************************************* | ||
184 | * Timer-tick functions for IXP2000 | ||
185 | *************************************************************************/ | ||
186 | static unsigned ticks_per_jiffy; | ||
187 | static unsigned ticks_per_usec; | ||
188 | static unsigned next_jiffy_time; | ||
189 | static volatile unsigned long *missing_jiffy_timer_csr; | ||
190 | |||
191 | unsigned long ixp2000_gettimeoffset (void) | ||
192 | { | ||
193 | unsigned long offset; | ||
194 | |||
195 | offset = next_jiffy_time - *missing_jiffy_timer_csr; | ||
196 | |||
197 | return offset / ticks_per_usec; | ||
198 | } | ||
199 | |||
200 | static irqreturn_t ixp2000_timer_interrupt(int irq, void *dev_id) | ||
201 | { | ||
202 | /* clear timer 1 */ | ||
203 | ixp2000_reg_wrb(IXP2000_T1_CLR, 1); | ||
204 | |||
205 | while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) | ||
206 | >= ticks_per_jiffy) { | ||
207 | timer_tick(); | ||
208 | next_jiffy_time -= ticks_per_jiffy; | ||
209 | } | ||
210 | |||
211 | return IRQ_HANDLED; | ||
212 | } | ||
213 | |||
214 | static struct irqaction ixp2000_timer_irq = { | ||
215 | .name = "IXP2000 Timer Tick", | ||
216 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
217 | .handler = ixp2000_timer_interrupt, | ||
218 | }; | ||
219 | |||
220 | void __init ixp2000_init_time(unsigned long tick_rate) | ||
221 | { | ||
222 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; | ||
223 | ticks_per_usec = tick_rate / 1000000; | ||
224 | |||
225 | /* | ||
226 | * We use timer 1 as our timer interrupt. | ||
227 | */ | ||
228 | ixp2000_reg_write(IXP2000_T1_CLR, 0); | ||
229 | ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1); | ||
230 | ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7)); | ||
231 | |||
232 | /* | ||
233 | * We use a second timer as a monotonic counter for tracking | ||
234 | * missed jiffies. The IXP2000 has four timers, but if we're | ||
235 | * on an A-step IXP2800, timer 2 and 3 don't work, so on those | ||
236 | * chips we use timer 4. Timer 4 is the only timer that can | ||
237 | * be used for the watchdog, so we use timer 2 if we're on a | ||
238 | * non-buggy chip. | ||
239 | */ | ||
240 | if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) { | ||
241 | printk(KERN_INFO "Enabling IXP2800 erratum #25 workaround\n"); | ||
242 | |||
243 | ixp2000_reg_write(IXP2000_T4_CLR, 0); | ||
244 | ixp2000_reg_write(IXP2000_T4_CLD, -1); | ||
245 | ixp2000_reg_wrb(IXP2000_T4_CTL, (1 << 7)); | ||
246 | missing_jiffy_timer_csr = IXP2000_T4_CSR; | ||
247 | } else { | ||
248 | ixp2000_reg_write(IXP2000_T2_CLR, 0); | ||
249 | ixp2000_reg_write(IXP2000_T2_CLD, -1); | ||
250 | ixp2000_reg_wrb(IXP2000_T2_CTL, (1 << 7)); | ||
251 | missing_jiffy_timer_csr = IXP2000_T2_CSR; | ||
252 | } | ||
253 | next_jiffy_time = 0xffffffff; | ||
254 | |||
255 | /* register for interrupt */ | ||
256 | setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq); | ||
257 | } | ||
258 | |||
259 | /************************************************************************* | ||
260 | * GPIO helpers | ||
261 | *************************************************************************/ | ||
262 | static unsigned long GPIO_IRQ_falling_edge; | ||
263 | static unsigned long GPIO_IRQ_rising_edge; | ||
264 | static unsigned long GPIO_IRQ_level_low; | ||
265 | static unsigned long GPIO_IRQ_level_high; | ||
266 | |||
267 | static void update_gpio_int_csrs(void) | ||
268 | { | ||
269 | ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge); | ||
270 | ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge); | ||
271 | ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low); | ||
272 | ixp2000_reg_wrb(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high); | ||
273 | } | ||
274 | |||
275 | void gpio_line_config(int line, int direction) | ||
276 | { | ||
277 | unsigned long flags; | ||
278 | |||
279 | local_irq_save(flags); | ||
280 | if (direction == GPIO_OUT) { | ||
281 | /* if it's an output, it ain't an interrupt anymore */ | ||
282 | GPIO_IRQ_falling_edge &= ~(1 << line); | ||
283 | GPIO_IRQ_rising_edge &= ~(1 << line); | ||
284 | GPIO_IRQ_level_low &= ~(1 << line); | ||
285 | GPIO_IRQ_level_high &= ~(1 << line); | ||
286 | update_gpio_int_csrs(); | ||
287 | |||
288 | ixp2000_reg_wrb(IXP2000_GPIO_PDSR, 1 << line); | ||
289 | } else if (direction == GPIO_IN) { | ||
290 | ixp2000_reg_wrb(IXP2000_GPIO_PDCR, 1 << line); | ||
291 | } | ||
292 | local_irq_restore(flags); | ||
293 | } | ||
294 | EXPORT_SYMBOL(gpio_line_config); | ||
295 | |||
296 | |||
297 | /************************************************************************* | ||
298 | * IRQ handling IXP2000 | ||
299 | *************************************************************************/ | ||
300 | static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
301 | { | ||
302 | int i; | ||
303 | unsigned long status = *IXP2000_GPIO_INST; | ||
304 | |||
305 | for (i = 0; i <= 7; i++) { | ||
306 | if (status & (1<<i)) { | ||
307 | generic_handle_irq(i + IRQ_IXP2000_GPIO0); | ||
308 | } | ||
309 | } | ||
310 | } | ||
311 | |||
312 | static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type) | ||
313 | { | ||
314 | int line = d->irq - IRQ_IXP2000_GPIO0; | ||
315 | |||
316 | /* | ||
317 | * First, configure this GPIO line as an input. | ||
318 | */ | ||
319 | ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line); | ||
320 | |||
321 | /* | ||
322 | * Then, set the proper trigger type. | ||
323 | */ | ||
324 | if (type & IRQ_TYPE_EDGE_FALLING) | ||
325 | GPIO_IRQ_falling_edge |= 1 << line; | ||
326 | else | ||
327 | GPIO_IRQ_falling_edge &= ~(1 << line); | ||
328 | if (type & IRQ_TYPE_EDGE_RISING) | ||
329 | GPIO_IRQ_rising_edge |= 1 << line; | ||
330 | else | ||
331 | GPIO_IRQ_rising_edge &= ~(1 << line); | ||
332 | if (type & IRQ_TYPE_LEVEL_LOW) | ||
333 | GPIO_IRQ_level_low |= 1 << line; | ||
334 | else | ||
335 | GPIO_IRQ_level_low &= ~(1 << line); | ||
336 | if (type & IRQ_TYPE_LEVEL_HIGH) | ||
337 | GPIO_IRQ_level_high |= 1 << line; | ||
338 | else | ||
339 | GPIO_IRQ_level_high &= ~(1 << line); | ||
340 | update_gpio_int_csrs(); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | |||
345 | static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d) | ||
346 | { | ||
347 | unsigned int irq = d->irq; | ||
348 | |||
349 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
350 | |||
351 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
352 | ixp2000_reg_write(IXP2000_GPIO_LDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
353 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
354 | } | ||
355 | |||
356 | static void ixp2000_GPIO_irq_mask(struct irq_data *d) | ||
357 | { | ||
358 | unsigned int irq = d->irq; | ||
359 | |||
360 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
361 | } | ||
362 | |||
363 | static void ixp2000_GPIO_irq_unmask(struct irq_data *d) | ||
364 | { | ||
365 | unsigned int irq = d->irq; | ||
366 | |||
367 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
368 | } | ||
369 | |||
370 | static struct irq_chip ixp2000_GPIO_irq_chip = { | ||
371 | .irq_ack = ixp2000_GPIO_irq_mask_ack, | ||
372 | .irq_mask = ixp2000_GPIO_irq_mask, | ||
373 | .irq_unmask = ixp2000_GPIO_irq_unmask, | ||
374 | .irq_set_type = ixp2000_GPIO_irq_type, | ||
375 | }; | ||
376 | |||
377 | static void ixp2000_pci_irq_mask(struct irq_data *d) | ||
378 | { | ||
379 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | ||
380 | if (d->irq == IRQ_IXP2000_PCIA) | ||
381 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); | ||
382 | else if (d->irq == IRQ_IXP2000_PCIB) | ||
383 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); | ||
384 | } | ||
385 | |||
386 | static void ixp2000_pci_irq_unmask(struct irq_data *d) | ||
387 | { | ||
388 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | ||
389 | if (d->irq == IRQ_IXP2000_PCIA) | ||
390 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); | ||
391 | else if (d->irq == IRQ_IXP2000_PCIB) | ||
392 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); | ||
393 | } | ||
394 | |||
395 | /* | ||
396 | * Error interrupts. These are used extensively by the microengine drivers | ||
397 | */ | ||
398 | static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
399 | { | ||
400 | int i; | ||
401 | unsigned long status = *IXP2000_IRQ_ERR_STATUS; | ||
402 | |||
403 | for(i = 31; i >= 0; i--) { | ||
404 | if(status & (1 << i)) { | ||
405 | generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i); | ||
406 | } | ||
407 | } | ||
408 | } | ||
409 | |||
410 | static void ixp2000_err_irq_mask(struct irq_data *d) | ||
411 | { | ||
412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, | ||
413 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | ||
414 | } | ||
415 | |||
416 | static void ixp2000_err_irq_unmask(struct irq_data *d) | ||
417 | { | ||
418 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, | ||
419 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | ||
420 | } | ||
421 | |||
422 | static struct irq_chip ixp2000_err_irq_chip = { | ||
423 | .irq_ack = ixp2000_err_irq_mask, | ||
424 | .irq_mask = ixp2000_err_irq_mask, | ||
425 | .irq_unmask = ixp2000_err_irq_unmask | ||
426 | }; | ||
427 | |||
428 | static struct irq_chip ixp2000_pci_irq_chip = { | ||
429 | .irq_ack = ixp2000_pci_irq_mask, | ||
430 | .irq_mask = ixp2000_pci_irq_mask, | ||
431 | .irq_unmask = ixp2000_pci_irq_unmask | ||
432 | }; | ||
433 | |||
434 | static void ixp2000_irq_mask(struct irq_data *d) | ||
435 | { | ||
436 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq)); | ||
437 | } | ||
438 | |||
439 | static void ixp2000_irq_unmask(struct irq_data *d) | ||
440 | { | ||
441 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq)); | ||
442 | } | ||
443 | |||
444 | static struct irq_chip ixp2000_irq_chip = { | ||
445 | .irq_ack = ixp2000_irq_mask, | ||
446 | .irq_mask = ixp2000_irq_mask, | ||
447 | .irq_unmask = ixp2000_irq_unmask | ||
448 | }; | ||
449 | |||
450 | void __init ixp2000_init_irq(void) | ||
451 | { | ||
452 | int irq; | ||
453 | |||
454 | /* | ||
455 | * Mask all sources | ||
456 | */ | ||
457 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, 0xffffffff); | ||
458 | ixp2000_reg_write(IXP2000_FIQ_ENABLE_CLR, 0xffffffff); | ||
459 | |||
460 | /* clear all GPIO edge/level detects */ | ||
461 | ixp2000_reg_write(IXP2000_GPIO_REDR, 0); | ||
462 | ixp2000_reg_write(IXP2000_GPIO_FEDR, 0); | ||
463 | ixp2000_reg_write(IXP2000_GPIO_LSHR, 0); | ||
464 | ixp2000_reg_write(IXP2000_GPIO_LSLR, 0); | ||
465 | ixp2000_reg_write(IXP2000_GPIO_INCR, -1); | ||
466 | |||
467 | /* clear PCI interrupt sources */ | ||
468 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, 0); | ||
469 | |||
470 | /* | ||
471 | * Certain bits in the IRQ status register of the | ||
472 | * IXP2000 are reserved. Instead of trying to map | ||
473 | * things non 1:1 from bit position to IRQ number, | ||
474 | * we mark the reserved IRQs as invalid. This makes | ||
475 | * our mask/unmask code much simpler. | ||
476 | */ | ||
477 | for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) { | ||
478 | if ((1 << irq) & IXP2000_VALID_IRQ_MASK) { | ||
479 | irq_set_chip_and_handler(irq, &ixp2000_irq_chip, | ||
480 | handle_level_irq); | ||
481 | set_irq_flags(irq, IRQF_VALID); | ||
482 | } else set_irq_flags(irq, 0); | ||
483 | } | ||
484 | |||
485 | for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) { | ||
486 | if((1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) & | ||
487 | IXP2000_VALID_ERR_IRQ_MASK) { | ||
488 | irq_set_chip_and_handler(irq, &ixp2000_err_irq_chip, | ||
489 | handle_level_irq); | ||
490 | set_irq_flags(irq, IRQF_VALID); | ||
491 | } | ||
492 | else | ||
493 | set_irq_flags(irq, 0); | ||
494 | } | ||
495 | irq_set_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); | ||
496 | |||
497 | for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { | ||
498 | irq_set_chip_and_handler(irq, &ixp2000_GPIO_irq_chip, | ||
499 | handle_level_irq); | ||
500 | set_irq_flags(irq, IRQF_VALID); | ||
501 | } | ||
502 | irq_set_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler); | ||
503 | |||
504 | /* | ||
505 | * Enable PCI irqs. The actual PCI[AB] decoding is done in | ||
506 | * entry-macro.S, so we don't need a chained handler for the | ||
507 | * PCI interrupt source. | ||
508 | */ | ||
509 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI)); | ||
510 | for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) { | ||
511 | irq_set_chip_and_handler(irq, &ixp2000_pci_irq_chip, | ||
512 | handle_level_irq); | ||
513 | set_irq_flags(irq, IRQF_VALID); | ||
514 | } | ||
515 | } | ||
516 | |||
517 | void ixp2000_restart(char mode, const char *cmd) | ||
518 | { | ||
519 | ixp2000_reg_wrb(IXP2000_RESET0, RSTALL); | ||
520 | } | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c deleted file mode 100644 index 4867f408617c..000000000000 --- a/arch/arm/mach-ixp2000/enp2611.c +++ /dev/null | |||
@@ -1,265 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/enp2611.c | ||
3 | * | ||
4 | * Radisys ENP-2611 support. | ||
5 | * | ||
6 | * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The | ||
7 | * original version carries the following notices: | ||
8 | * | ||
9 | * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com> | ||
10 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
11 | * | ||
12 | * Copyright (C) 2002-2003 Intel Corp. | ||
13 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/interrupt.h> | ||
26 | #include <linux/bitops.h> | ||
27 | #include <linux/pci.h> | ||
28 | #include <linux/ioport.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/serial.h> | ||
31 | #include <linux/tty.h> | ||
32 | #include <linux/serial_core.h> | ||
33 | #include <linux/platform_device.h> | ||
34 | #include <linux/io.h> | ||
35 | |||
36 | #include <asm/irq.h> | ||
37 | #include <asm/pgtable.h> | ||
38 | #include <asm/page.h> | ||
39 | #include <mach/hardware.h> | ||
40 | #include <asm/mach-types.h> | ||
41 | |||
42 | #include <asm/mach/pci.h> | ||
43 | #include <asm/mach/map.h> | ||
44 | #include <asm/mach/irq.h> | ||
45 | #include <asm/mach/time.h> | ||
46 | #include <asm/mach/arch.h> | ||
47 | #include <asm/mach/flash.h> | ||
48 | |||
49 | /************************************************************************* | ||
50 | * ENP-2611 timer tick configuration | ||
51 | *************************************************************************/ | ||
52 | static void __init enp2611_timer_init(void) | ||
53 | { | ||
54 | ixp2000_init_time(50 * 1000 * 1000); | ||
55 | } | ||
56 | |||
57 | static struct sys_timer enp2611_timer = { | ||
58 | .init = enp2611_timer_init, | ||
59 | .offset = ixp2000_gettimeoffset, | ||
60 | }; | ||
61 | |||
62 | |||
63 | /************************************************************************* | ||
64 | * ENP-2611 I/O | ||
65 | *************************************************************************/ | ||
66 | static struct map_desc enp2611_io_desc[] __initdata = { | ||
67 | { | ||
68 | .virtual = ENP2611_CALEB_VIRT_BASE, | ||
69 | .pfn = __phys_to_pfn(ENP2611_CALEB_PHYS_BASE), | ||
70 | .length = ENP2611_CALEB_SIZE, | ||
71 | .type = MT_DEVICE, | ||
72 | }, { | ||
73 | .virtual = ENP2611_PM3386_0_VIRT_BASE, | ||
74 | .pfn = __phys_to_pfn(ENP2611_PM3386_0_PHYS_BASE), | ||
75 | .length = ENP2611_PM3386_0_SIZE, | ||
76 | .type = MT_DEVICE, | ||
77 | }, { | ||
78 | .virtual = ENP2611_PM3386_1_VIRT_BASE, | ||
79 | .pfn = __phys_to_pfn(ENP2611_PM3386_1_PHYS_BASE), | ||
80 | .length = ENP2611_PM3386_1_SIZE, | ||
81 | .type = MT_DEVICE, | ||
82 | } | ||
83 | }; | ||
84 | |||
85 | void __init enp2611_map_io(void) | ||
86 | { | ||
87 | ixp2000_map_io(); | ||
88 | iotable_init(enp2611_io_desc, ARRAY_SIZE(enp2611_io_desc)); | ||
89 | } | ||
90 | |||
91 | |||
92 | /************************************************************************* | ||
93 | * ENP-2611 PCI | ||
94 | *************************************************************************/ | ||
95 | static int enp2611_pci_setup(int nr, struct pci_sys_data *sys) | ||
96 | { | ||
97 | sys->mem_offset = 0xe0000000; | ||
98 | ixp2000_pci_setup(nr, sys); | ||
99 | return 1; | ||
100 | } | ||
101 | |||
102 | static void __init enp2611_pci_preinit(void) | ||
103 | { | ||
104 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | ||
105 | ixp2000_pci_preinit(); | ||
106 | pcibios_setup("firmware"); | ||
107 | } | ||
108 | |||
109 | static inline int enp2611_pci_valid_device(struct pci_bus *bus, | ||
110 | unsigned int devfn) | ||
111 | { | ||
112 | /* The 82559 ethernet controller appears at both PCI:1:0:0 and | ||
113 | * PCI:1:2:0, so let's pretend the second one isn't there. | ||
114 | */ | ||
115 | if (bus->number == 0x01 && devfn == 0x10) | ||
116 | return 0; | ||
117 | |||
118 | return 1; | ||
119 | } | ||
120 | |||
121 | static int enp2611_pci_read_config(struct pci_bus *bus, unsigned int devfn, | ||
122 | int where, int size, u32 *value) | ||
123 | { | ||
124 | if (enp2611_pci_valid_device(bus, devfn)) | ||
125 | return ixp2000_pci_read_config(bus, devfn, where, size, value); | ||
126 | |||
127 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
128 | } | ||
129 | |||
130 | static int enp2611_pci_write_config(struct pci_bus *bus, unsigned int devfn, | ||
131 | int where, int size, u32 value) | ||
132 | { | ||
133 | if (enp2611_pci_valid_device(bus, devfn)) | ||
134 | return ixp2000_pci_write_config(bus, devfn, where, size, value); | ||
135 | |||
136 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
137 | } | ||
138 | |||
139 | static struct pci_ops enp2611_pci_ops = { | ||
140 | .read = enp2611_pci_read_config, | ||
141 | .write = enp2611_pci_write_config | ||
142 | }; | ||
143 | |||
144 | static struct pci_bus * __init enp2611_pci_scan_bus(int nr, | ||
145 | struct pci_sys_data *sys) | ||
146 | { | ||
147 | return pci_scan_root_bus(NULL, sys->busnr, &enp2611_pci_ops, sys, | ||
148 | &sys->resources); | ||
149 | } | ||
150 | |||
151 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
152 | u8 pin) | ||
153 | { | ||
154 | int irq; | ||
155 | |||
156 | if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) { | ||
157 | /* IXP2400. */ | ||
158 | irq = IRQ_IXP2000_PCIA; | ||
159 | } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) { | ||
160 | /* 21555 non-transparent bridge. */ | ||
161 | irq = IRQ_IXP2000_PCIB; | ||
162 | } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) { | ||
163 | /* PCI2050B transparent bridge. */ | ||
164 | irq = -1; | ||
165 | } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) { | ||
166 | /* 82559 ethernet. */ | ||
167 | irq = IRQ_IXP2000_PCIA; | ||
168 | } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) { | ||
169 | /* SPI-3 option board. */ | ||
170 | irq = IRQ_IXP2000_PCIB; | ||
171 | } else { | ||
172 | printk(KERN_ERR "enp2611_pci_map_irq() called for unknown " | ||
173 | "device PCI:%d:%d:%d\n", dev->bus->number, | ||
174 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); | ||
175 | irq = -1; | ||
176 | } | ||
177 | |||
178 | return irq; | ||
179 | } | ||
180 | |||
181 | struct hw_pci enp2611_pci __initdata = { | ||
182 | .nr_controllers = 1, | ||
183 | .setup = enp2611_pci_setup, | ||
184 | .preinit = enp2611_pci_preinit, | ||
185 | .scan = enp2611_pci_scan_bus, | ||
186 | .map_irq = enp2611_pci_map_irq, | ||
187 | }; | ||
188 | |||
189 | int __init enp2611_pci_init(void) | ||
190 | { | ||
191 | if (machine_is_enp2611()) | ||
192 | pci_common_init(&enp2611_pci); | ||
193 | |||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | subsys_initcall(enp2611_pci_init); | ||
198 | |||
199 | |||
200 | /************************************************************************* | ||
201 | * ENP-2611 Machine Initialization | ||
202 | *************************************************************************/ | ||
203 | static struct flash_platform_data enp2611_flash_platform_data = { | ||
204 | .map_name = "cfi_probe", | ||
205 | .width = 1, | ||
206 | }; | ||
207 | |||
208 | static struct ixp2000_flash_data enp2611_flash_data = { | ||
209 | .platform_data = &enp2611_flash_platform_data, | ||
210 | .nr_banks = 1 | ||
211 | }; | ||
212 | |||
213 | static struct resource enp2611_flash_resource = { | ||
214 | .start = 0xc4000000, | ||
215 | .end = 0xc4000000 + 0x00ffffff, | ||
216 | .flags = IORESOURCE_MEM, | ||
217 | }; | ||
218 | |||
219 | static struct platform_device enp2611_flash = { | ||
220 | .name = "IXP2000-Flash", | ||
221 | .id = 0, | ||
222 | .dev = { | ||
223 | .platform_data = &enp2611_flash_data, | ||
224 | }, | ||
225 | .num_resources = 1, | ||
226 | .resource = &enp2611_flash_resource, | ||
227 | }; | ||
228 | |||
229 | static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = { | ||
230 | .sda_pin = ENP2611_GPIO_SDA, | ||
231 | .scl_pin = ENP2611_GPIO_SCL, | ||
232 | }; | ||
233 | |||
234 | static struct platform_device enp2611_i2c_controller = { | ||
235 | .name = "IXP2000-I2C", | ||
236 | .id = 0, | ||
237 | .dev = { | ||
238 | .platform_data = &enp2611_i2c_gpio_pins | ||
239 | }, | ||
240 | .num_resources = 0 | ||
241 | }; | ||
242 | |||
243 | static struct platform_device *enp2611_devices[] __initdata = { | ||
244 | &enp2611_flash, | ||
245 | &enp2611_i2c_controller | ||
246 | }; | ||
247 | |||
248 | static void __init enp2611_init_machine(void) | ||
249 | { | ||
250 | platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices)); | ||
251 | ixp2000_uart_init(); | ||
252 | } | ||
253 | |||
254 | |||
255 | MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") | ||
256 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
257 | .atag_offset = 0x100, | ||
258 | .map_io = enp2611_map_io, | ||
259 | .init_irq = ixp2000_init_irq, | ||
260 | .timer = &enp2611_timer, | ||
261 | .init_machine = enp2611_init_machine, | ||
262 | .restart = ixp2000_restart, | ||
263 | MACHINE_END | ||
264 | |||
265 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S deleted file mode 100644 index bdd3ccdc2890..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* arch/arm/mach-ixp2000/include/mach/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, rp, rv, tmp | ||
15 | mov \rp, #0x00030000 | ||
16 | #ifdef __ARMEB__ | ||
17 | orr \rp, \rp, #0x00000003 | ||
18 | #endif | ||
19 | orr \rv, \rp, #0xfe000000 @ virtual base | ||
20 | orr \rv, \rv, #0x00f00000 | ||
21 | orr \rp, \rp, #0xc0000000 @ Physical base | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/enp2611.h b/arch/arm/mach-ixp2000/include/mach/enp2611.h deleted file mode 100644 index 9ce3690061d5..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/enp2611.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/enp2611.h | ||
3 | * | ||
4 | * Register and other defines for Radisys ENP-2611 | ||
5 | * | ||
6 | * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The | ||
7 | * original version carries the following notices: | ||
8 | * | ||
9 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
10 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
11 | * | ||
12 | * Copyright (C) 2002 Intel Corp. | ||
13 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ENP2611_H | ||
22 | #define __ENP2611_H | ||
23 | |||
24 | #define ENP2611_CALEB_PHYS_BASE 0xc5000000 | ||
25 | #define ENP2611_CALEB_VIRT_BASE 0xfe000000 | ||
26 | #define ENP2611_CALEB_SIZE 0x00100000 | ||
27 | |||
28 | #define ENP2611_PM3386_0_PHYS_BASE 0xc6000000 | ||
29 | #define ENP2611_PM3386_0_VIRT_BASE 0xfe100000 | ||
30 | #define ENP2611_PM3386_0_SIZE 0x00100000 | ||
31 | |||
32 | #define ENP2611_PM3386_1_PHYS_BASE 0xc6400000 | ||
33 | #define ENP2611_PM3386_1_VIRT_BASE 0xfe200000 | ||
34 | #define ENP2611_PM3386_1_SIZE 0x00100000 | ||
35 | |||
36 | #define ENP2611_GPIO_SCL 7 | ||
37 | #define ENP2611_GPIO_SDA 6 | ||
38 | |||
39 | #define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4 | ||
40 | #define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3 | ||
41 | #define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2 | ||
42 | #define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1 | ||
43 | #define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0 | ||
44 | |||
45 | |||
46 | #endif | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S deleted file mode 100644 index c4444dff9202..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for IXP2000-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 <mach/irqs.h> | ||
11 | |||
12 | .macro get_irqnr_preamble, base, tmp | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
16 | |||
17 | mov \irqnr, #0x0 @clear out irqnr as default | ||
18 | mov \base, #0xfe000000 | ||
19 | orr \base, \base, #0x00e00000 | ||
20 | orr \base, \base, #0x08 | ||
21 | ldr \irqstat, [\base] @ get interrupts | ||
22 | |||
23 | cmp \irqstat, #0 | ||
24 | beq 1001f | ||
25 | |||
26 | clz \irqnr, \irqstat | ||
27 | mov \base, #31 | ||
28 | subs \irqnr, \base, \irqnr | ||
29 | |||
30 | /* | ||
31 | * We handle PCIA and PCIB here so we don't have an | ||
32 | * extra layer of code just to check these two bits. | ||
33 | */ | ||
34 | cmp \irqnr, #IRQ_IXP2000_PCI | ||
35 | bne 1001f | ||
36 | |||
37 | mov \base, #0xfe000000 | ||
38 | orr \base, \base, #0x00c00000 | ||
39 | orr \base, \base, #0x00000100 | ||
40 | orr \base, \base, #0x00000058 | ||
41 | ldr \irqstat, [\base] | ||
42 | |||
43 | mov \tmp, #(1<<26) | ||
44 | tst \irqstat, \tmp | ||
45 | movne \irqnr, #IRQ_IXP2000_PCIA | ||
46 | bne 1001f | ||
47 | |||
48 | mov \tmp, #(1<<27) | ||
49 | tst \irqstat, \tmp | ||
50 | movne \irqnr, #IRQ_IXP2000_PCIB | ||
51 | |||
52 | 1001: | ||
53 | .endm | ||
54 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h deleted file mode 100644 index af836c76c3f1..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/gpio.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corporation. | ||
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 | * IXP2000 GPIO in/out, edge/level detection for IRQs: | ||
13 | * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High | ||
14 | * or both Falling-edge and Rising-edge. | ||
15 | * This must be called *before* the corresponding IRQ is registerd. | ||
16 | * Use this instead of directly setting the GPIO registers. | ||
17 | * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb) | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_GPIO_H | ||
20 | #define __ASM_ARCH_GPIO_H | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | |||
24 | #define GPIO_IN 0 | ||
25 | #define GPIO_OUT 1 | ||
26 | |||
27 | #define IXP2000_GPIO_LOW 0 | ||
28 | #define IXP2000_GPIO_HIGH 1 | ||
29 | |||
30 | extern void gpio_line_config(int line, int direction); | ||
31 | |||
32 | static inline int gpio_line_get(int line) | ||
33 | { | ||
34 | return (((*IXP2000_GPIO_PLR) >> line) & 1); | ||
35 | } | ||
36 | |||
37 | static inline void gpio_line_set(int line, int value) | ||
38 | { | ||
39 | if (value == IXP2000_GPIO_HIGH) { | ||
40 | ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line); | ||
41 | } else if (value == IXP2000_GPIO_LOW) { | ||
42 | ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line); | ||
43 | } | ||
44 | } | ||
45 | |||
46 | #endif /* !__ASSEMBLY__ */ | ||
47 | |||
48 | #endif /* ASM_ARCH_IXP2000_GPIO_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/hardware.h b/arch/arm/mach-ixp2000/include/mach/hardware.h deleted file mode 100644 index cdaf1db84003..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/hardware.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for IXP2400/2800 based systems | ||
5 | * | ||
6 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Maintainer: Deepak Saxena <dsaxena@mvista.com> | ||
9 | * | ||
10 | * Copyright (C) 2001-2002 Intel Corp. | ||
11 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_HARDWARE_H__ | ||
20 | #define __ASM_ARCH_HARDWARE_H__ | ||
21 | |||
22 | #include "ixp2000-regs.h" /* Chipset Registers */ | ||
23 | |||
24 | /* | ||
25 | * Platform helper functions | ||
26 | */ | ||
27 | #include "platform.h" | ||
28 | |||
29 | /* | ||
30 | * Platform-specific bits | ||
31 | */ | ||
32 | #include "enp2611.h" /* ENP-2611 */ | ||
33 | #include "ixdp2x00.h" /* IXDP2400/2800 */ | ||
34 | #include "ixdp2x01.h" /* IXDP2401/2801 */ | ||
35 | |||
36 | #endif /* _ASM_ARCH_HARDWARE_H__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h deleted file mode 100644 index f6552d6f35ab..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/io.h +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/io.h | ||
3 | * | ||
4 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2002 Intel Corp. | ||
8 | * Copyrgiht (C) 2003-2004 MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARM_ARCH_IO_H | ||
16 | #define __ASM_ARM_ARCH_IO_H | ||
17 | |||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | #define IO_SPACE_LIMIT 0xffffffff | ||
21 | |||
22 | /* | ||
23 | * The A? revisions of the IXP2000s assert byte lanes for PCI I/O | ||
24 | * transactions the other way round (MEM transactions don't have this | ||
25 | * issue), so if we want to support those models, we need to override | ||
26 | * the standard I/O functions. | ||
27 | * | ||
28 | * B0 and later have a bit that can be set to 1 to get the proper | ||
29 | * behavior for I/O transactions, which then allows us to use the | ||
30 | * standard I/O functions. This is what we do if the user does not | ||
31 | * explicitly ask for support for pre-B0. | ||
32 | */ | ||
33 | #ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO | ||
34 | #define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
35 | |||
36 | #define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3) | ||
37 | #define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2) | ||
38 | |||
39 | #define outb(v,p) __raw_writeb((v),alignb(___io(p))) | ||
40 | #define outw(v,p) __raw_writew((v),alignw(___io(p))) | ||
41 | #define outl(v,p) __raw_writel((v),___io(p)) | ||
42 | |||
43 | #define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; }) | ||
44 | #define inw(p) \ | ||
45 | ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; }) | ||
46 | #define inl(p) \ | ||
47 | ({ unsigned int __v = (__raw_readl(___io(p))); __v; }) | ||
48 | |||
49 | #define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l) | ||
50 | #define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l) | ||
51 | #define outsl(p,d,l) __raw_writesl(___io(p),d,l) | ||
52 | |||
53 | #define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l) | ||
54 | #define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l) | ||
55 | #define insl(p,d,l) __raw_readsl(___io(p),d,l) | ||
56 | |||
57 | #define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE) | ||
58 | |||
59 | #define ioread8(p) \ | ||
60 | ({ \ | ||
61 | unsigned int __v; \ | ||
62 | \ | ||
63 | if (__is_io_address(p)) { \ | ||
64 | __v = __raw_readb(alignb(p)); \ | ||
65 | } else { \ | ||
66 | __v = __raw_readb(p); \ | ||
67 | } \ | ||
68 | \ | ||
69 | __v; \ | ||
70 | }) \ | ||
71 | |||
72 | #define ioread16(p) \ | ||
73 | ({ \ | ||
74 | unsigned int __v; \ | ||
75 | \ | ||
76 | if (__is_io_address(p)) { \ | ||
77 | __v = __raw_readw(alignw(p)); \ | ||
78 | } else { \ | ||
79 | __v = le16_to_cpu(__raw_readw(p)); \ | ||
80 | } \ | ||
81 | \ | ||
82 | __v; \ | ||
83 | }) | ||
84 | |||
85 | #define ioread32(p) \ | ||
86 | ({ \ | ||
87 | unsigned int __v; \ | ||
88 | \ | ||
89 | if (__is_io_address(p)) { \ | ||
90 | __v = __raw_readl(p); \ | ||
91 | } else { \ | ||
92 | __v = le32_to_cpu(__raw_readl(p)); \ | ||
93 | } \ | ||
94 | \ | ||
95 | __v; \ | ||
96 | }) | ||
97 | |||
98 | #define iowrite8(v,p) \ | ||
99 | ({ \ | ||
100 | if (__is_io_address(p)) { \ | ||
101 | __raw_writeb((v), alignb(p)); \ | ||
102 | } else { \ | ||
103 | __raw_writeb((v), p); \ | ||
104 | } \ | ||
105 | }) | ||
106 | |||
107 | #define iowrite16(v,p) \ | ||
108 | ({ \ | ||
109 | if (__is_io_address(p)) { \ | ||
110 | __raw_writew((v), alignw(p)); \ | ||
111 | } else { \ | ||
112 | __raw_writew(cpu_to_le16(v), p); \ | ||
113 | } \ | ||
114 | }) | ||
115 | |||
116 | #define iowrite32(v,p) \ | ||
117 | ({ \ | ||
118 | if (__is_io_address(p)) { \ | ||
119 | __raw_writel((v), p); \ | ||
120 | } else { \ | ||
121 | __raw_writel(cpu_to_le32(v), p); \ | ||
122 | } \ | ||
123 | }) | ||
124 | |||
125 | #define ioport_map(port, nr) ___io(port) | ||
126 | |||
127 | #define ioport_unmap(addr) | ||
128 | #else | ||
129 | #define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
130 | #endif | ||
131 | |||
132 | |||
133 | #endif | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/irqs.h b/arch/arm/mach-ixp2000/include/mach/irqs.h deleted file mode 100644 index bee96bcafdca..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/irqs.h +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/irqs.h | ||
3 | * | ||
4 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2002 Intel Corp. | ||
8 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef _IRQS_H | ||
16 | #define _IRQS_H | ||
17 | |||
18 | /* | ||
19 | * Do NOT add #ifdef MACHINE_FOO in here. | ||
20 | * Simpy add your machine IRQs here and increase NR_IRQS if needed to | ||
21 | * hold your machine's IRQ table. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Some interrupt numbers go unused b/c the IRQ mask/ummask/status | ||
26 | * register has those bit reserved. We just mark those interrupts | ||
27 | * as invalid and this allows us to do mask/unmask with a single | ||
28 | * shift operation instead of having to map the IRQ number to | ||
29 | * a HW IRQ number. | ||
30 | */ | ||
31 | #define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */ | ||
32 | #define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/ | ||
33 | #define IRQ_IXP2000_UART 2 | ||
34 | #define IRQ_IXP2000_GPIO 3 | ||
35 | #define IRQ_IXP2000_TIMER1 4 | ||
36 | #define IRQ_IXP2000_TIMER2 5 | ||
37 | #define IRQ_IXP2000_TIMER3 6 | ||
38 | #define IRQ_IXP2000_TIMER4 7 | ||
39 | #define IRQ_IXP2000_PMU 8 | ||
40 | #define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */ | ||
41 | #define IRQ_IXP2000_DMA1 10 | ||
42 | #define IRQ_IXP2000_DMA2 11 | ||
43 | #define IRQ_IXP2000_DMA3 12 | ||
44 | #define IRQ_IXP2000_PCI_DOORBELL 13 | ||
45 | #define IRQ_IXP2000_ME_ATTN 14 | ||
46 | #define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */ | ||
47 | #define IRQ_IXP2000_THDA0 16 /* thread 0-31A */ | ||
48 | #define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */ | ||
49 | #define IRQ_IXP2000_THDA2 18 /* thread 64-95A */ | ||
50 | #define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */ | ||
51 | #define IRQ_IXP2000_THDB0 24 /* thread 0-31B */ | ||
52 | #define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */ | ||
53 | #define IRQ_IXP2000_THDB2 26 /* thread 64-95B */ | ||
54 | #define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */ | ||
55 | |||
56 | /* define generic GPIOs */ | ||
57 | #define IRQ_IXP2000_GPIO0 32 | ||
58 | #define IRQ_IXP2000_GPIO1 33 | ||
59 | #define IRQ_IXP2000_GPIO2 34 | ||
60 | #define IRQ_IXP2000_GPIO3 35 | ||
61 | #define IRQ_IXP2000_GPIO4 36 | ||
62 | #define IRQ_IXP2000_GPIO5 37 | ||
63 | #define IRQ_IXP2000_GPIO6 38 | ||
64 | #define IRQ_IXP2000_GPIO7 39 | ||
65 | |||
66 | /* split off the 2 PCI sources */ | ||
67 | #define IRQ_IXP2000_PCIA 40 | ||
68 | #define IRQ_IXP2000_PCIB 41 | ||
69 | |||
70 | /* Int sources from IRQ_ERROR_STATUS */ | ||
71 | #define IRQ_IXP2000_DRAM0_MIN_ERR 42 | ||
72 | #define IRQ_IXP2000_DRAM0_MAJ_ERR 43 | ||
73 | #define IRQ_IXP2000_DRAM1_MIN_ERR 44 | ||
74 | #define IRQ_IXP2000_DRAM1_MAJ_ERR 45 | ||
75 | #define IRQ_IXP2000_DRAM2_MIN_ERR 46 | ||
76 | #define IRQ_IXP2000_DRAM2_MAJ_ERR 47 | ||
77 | /* 48-57 reserved */ | ||
78 | #define IRQ_IXP2000_SRAM0_ERR 58 | ||
79 | #define IRQ_IXP2000_SRAM1_ERR 59 | ||
80 | #define IRQ_IXP2000_SRAM2_ERR 60 | ||
81 | #define IRQ_IXP2000_SRAM3_ERR 61 | ||
82 | /* 62-65 reserved */ | ||
83 | #define IRQ_IXP2000_MEDIA_ERR 66 | ||
84 | #define IRQ_IXP2000_PCI_ERR 67 | ||
85 | #define IRQ_IXP2000_SP_INT 68 | ||
86 | |||
87 | #define NR_IXP2000_IRQS 69 | ||
88 | |||
89 | #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) | ||
90 | |||
91 | #define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS)) | ||
92 | |||
93 | #define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) | ||
94 | #define IXP2000_VALID_ERR_IRQ_MASK (\ | ||
95 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \ | ||
96 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \ | ||
97 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \ | ||
98 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \ | ||
99 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \ | ||
100 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \ | ||
101 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \ | ||
102 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \ | ||
103 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \ | ||
104 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \ | ||
105 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \ | ||
106 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \ | ||
107 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) ) | ||
108 | |||
109 | /* | ||
110 | * This allows for all the on-chip sources plus up to 32 CPLD based | ||
111 | * IRQs. Should be more than enough. | ||
112 | */ | ||
113 | #define IXP2000_BOARD_IRQS 32 | ||
114 | #define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS) | ||
115 | |||
116 | |||
117 | /* | ||
118 | * IXDP2400 specific IRQs | ||
119 | */ | ||
120 | #define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0) | ||
121 | #define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1) | ||
122 | #define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2) | ||
123 | #define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3) | ||
124 | #define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4) | ||
125 | #define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5) | ||
126 | #define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6) | ||
127 | #define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7) | ||
128 | |||
129 | #define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1) | ||
130 | #define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS | ||
131 | |||
132 | /* IXDP2800 specific IRQs */ | ||
133 | #define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0) | ||
134 | #define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1) | ||
135 | #define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2) | ||
136 | #define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3) | ||
137 | #define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4) | ||
138 | #define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5) | ||
139 | |||
140 | #define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1) | ||
141 | #define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS | ||
142 | |||
143 | /* | ||
144 | * IRQs on both IXDP2x01 boards | ||
145 | */ | ||
146 | #define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2) | ||
147 | #define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3) | ||
148 | #define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4) | ||
149 | #define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5) | ||
150 | #define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6) | ||
151 | #define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7) | ||
152 | #define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8) | ||
153 | #define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16) | ||
154 | #define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17) | ||
155 | #define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18) | ||
156 | #define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19) | ||
157 | #define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21) | ||
158 | #define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22) | ||
159 | #define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24) | ||
160 | #define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25) | ||
161 | #define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26) | ||
162 | |||
163 | #define IXDP2X01_VALID_IRQ_MASK ( \ | ||
164 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \ | ||
165 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \ | ||
166 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \ | ||
167 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \ | ||
168 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \ | ||
169 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \ | ||
170 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \ | ||
171 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \ | ||
172 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \ | ||
173 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \ | ||
174 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \ | ||
175 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \ | ||
176 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \ | ||
177 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \ | ||
178 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \ | ||
179 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) ) | ||
180 | |||
181 | /* | ||
182 | * IXDP2401 specific IRQs | ||
183 | */ | ||
184 | #define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0) | ||
185 | #define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1) | ||
186 | |||
187 | #define IXDP2401_VALID_IRQ_MASK ( \ | ||
188 | IXDP2X01_VALID_IRQ_MASK | \ | ||
189 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\ | ||
190 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546)) | ||
191 | |||
192 | /* | ||
193 | * IXDP2801-specific IRQs | ||
194 | */ | ||
195 | #define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0) | ||
196 | #define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27) | ||
197 | #define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28) | ||
198 | |||
199 | #define IXDP2801_VALID_IRQ_MASK ( \ | ||
200 | IXDP2X01_VALID_IRQ_MASK | \ | ||
201 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\ | ||
202 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\ | ||
203 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF)) | ||
204 | |||
205 | #define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1) | ||
206 | |||
207 | #endif /*_IRQS_H*/ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h deleted file mode 100644 index 5df8479d9481..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixdp2x00.h | ||
3 | * | ||
4 | * Register and other defines for IXDP2[48]00 platforms | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #ifndef _IXDP2X00_H_ | ||
18 | #define _IXDP2X00_H_ | ||
19 | |||
20 | /* | ||
21 | * On board CPLD memory map | ||
22 | */ | ||
23 | #define IXDP2X00_PHYS_CPLD_BASE 0xc7000000 | ||
24 | #define IXDP2X00_VIRT_CPLD_BASE 0xfe000000 | ||
25 | #define IXDP2X00_CPLD_SIZE 0x00100000 | ||
26 | |||
27 | |||
28 | #define IXDP2X00_CPLD_REG(x) \ | ||
29 | (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x) | ||
30 | |||
31 | /* | ||
32 | * IXDP2400 CPLD registers | ||
33 | */ | ||
34 | #define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0) | ||
35 | #define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4) | ||
36 | #define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8) | ||
37 | #define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc) | ||
38 | #define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10) | ||
39 | #define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14) | ||
40 | #define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18) | ||
41 | #define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48) | ||
42 | |||
43 | /* | ||
44 | * IXDP2800 CPLD registers | ||
45 | */ | ||
46 | #define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0) | ||
47 | #define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140) | ||
48 | |||
49 | |||
50 | #define IXDP2X00_GPIO_I2C_ENABLE 0x02 | ||
51 | #define IXDP2X00_GPIO_SCL 0x07 | ||
52 | #define IXDP2X00_GPIO_SDA 0x06 | ||
53 | |||
54 | /* | ||
55 | * PCI devfns for on-board devices. We need these to be able to | ||
56 | * properly translate IRQs and for device removal. | ||
57 | */ | ||
58 | #define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */ | ||
59 | #define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */ | ||
60 | #define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */ | ||
61 | #define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */ | ||
62 | |||
63 | #define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */ | ||
64 | #define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */ | ||
65 | #define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */ | ||
66 | |||
67 | #define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */ | ||
68 | #define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */ | ||
69 | #define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */ | ||
70 | #define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */ | ||
71 | #define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */ | ||
72 | |||
73 | #ifndef __ASSEMBLY__ | ||
74 | /* | ||
75 | * The master NPU is always PCI master. | ||
76 | */ | ||
77 | static inline unsigned int ixdp2x00_master_npu(void) | ||
78 | { | ||
79 | return !!ixp2000_is_pcimaster(); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * Helper functions used by ixdp2400 and ixdp2800 specific code | ||
84 | */ | ||
85 | void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long); | ||
86 | void ixdp2x00_slave_pci_postinit(void); | ||
87 | void ixdp2x00_init_machine(void); | ||
88 | void ixdp2x00_map_io(void); | ||
89 | |||
90 | #endif | ||
91 | |||
92 | #endif /*_IXDP2X00_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h deleted file mode 100644 index 4c1f04083e54..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixdp2x01.h | ||
3 | * | ||
4 | * Platform definitions for IXDP2X01 && IXDP2801 systems | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on original code Copyright (c) 2002-2003 Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #ifndef __IXDP2X01_H__ | ||
18 | #define __IXDP2X01_H__ | ||
19 | |||
20 | #define IXDP2X01_PHYS_CPLD_BASE 0xc6024000 | ||
21 | #define IXDP2X01_VIRT_CPLD_BASE 0xfe000000 | ||
22 | #define IXDP2X01_CPLD_REGION_SIZE 0x00100000 | ||
23 | |||
24 | #define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg) | ||
25 | #define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg) | ||
26 | |||
27 | #define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40) | ||
28 | #define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40) | ||
29 | |||
30 | #define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60) | ||
31 | #define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60) | ||
32 | |||
33 | #define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80) | ||
34 | #define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16) | ||
35 | |||
36 | #define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00) | ||
37 | #define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08) | ||
38 | #define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C) | ||
39 | #define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10) | ||
40 | #define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG | ||
41 | #define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14) | ||
42 | |||
43 | #define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20) | ||
44 | |||
45 | #define IXDP2X01_CPLD_FLASH_INTERN 0x8000 | ||
46 | #define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF | ||
47 | #define IXDP2X01_FLASH_WINDOW_BITS 25 | ||
48 | #define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS) | ||
49 | #define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1) | ||
50 | |||
51 | #define IXDP2X01_UART_CLK 1843200 | ||
52 | |||
53 | #define IXDP2X01_GPIO_I2C_ENABLE 0x02 | ||
54 | #define IXDP2X01_GPIO_SCL 0x07 | ||
55 | #define IXDP2X01_GPIO_SDA 0x06 | ||
56 | |||
57 | #endif /* __IXDP2x01_H__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h b/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h deleted file mode 100644 index 822f63f2f4a2..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h +++ /dev/null | |||
@@ -1,451 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h | ||
3 | * | ||
4 | * Chipset register definitions for IXP2400/2800 based systems. | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
9 | * | ||
10 | * Copyright (C) 2002 Intel Corp. | ||
11 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | #ifndef _IXP2000_REGS_H_ | ||
19 | #define _IXP2000_REGS_H_ | ||
20 | |||
21 | /* | ||
22 | * IXP2000 linux memory map: | ||
23 | * | ||
24 | * virt phys size | ||
25 | * fb000000 db000000 16M PCI CFG1 | ||
26 | * fc000000 da000000 16M PCI CFG0 | ||
27 | * fd000000 d8000000 16M PCI I/O | ||
28 | * fe[0-7]00000 8M per-platform mappings | ||
29 | * fe900000 80000000 1M SRAM #0 (first MB) | ||
30 | * fea00000 cb400000 1M SCRATCH ring get/put | ||
31 | * feb00000 c8000000 1M MSF | ||
32 | * fec00000 df000000 1M PCI CSRs | ||
33 | * fed00000 de000000 1M PCI CREG | ||
34 | * fee00000 d6000000 1M INTCTL | ||
35 | * fef00000 c0000000 1M CAP | ||
36 | */ | ||
37 | |||
38 | /* | ||
39 | * Static I/O regions. | ||
40 | * | ||
41 | * Most of the registers are clumped in 4K regions spread throughout | ||
42 | * the 0xc0000000 -> 0xc0100000 address range, but we just map in | ||
43 | * the whole range using a single 1 MB section instead of small | ||
44 | * 4K pages. | ||
45 | * | ||
46 | * CAP stands for CSR Access Proxy. | ||
47 | * | ||
48 | * If you change the virtual address of this mapping, please propagate | ||
49 | * the change to arch/arm/kernel/debug.S, which hardcodes the virtual | ||
50 | * address of the UART located in this region. | ||
51 | */ | ||
52 | |||
53 | #define IXP2000_CAP_PHYS_BASE 0xc0000000 | ||
54 | #define IXP2000_CAP_VIRT_BASE 0xfef00000 | ||
55 | #define IXP2000_CAP_SIZE 0x00100000 | ||
56 | |||
57 | /* | ||
58 | * Addresses for specific on-chip peripherals. | ||
59 | */ | ||
60 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 | ||
61 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 | ||
62 | #define IXP2000_UART_PHYS_BASE 0xc0030000 | ||
63 | #define IXP2000_UART_VIRT_BASE 0xfef30000 | ||
64 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 | ||
65 | #define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000 | ||
66 | #define IXP2000_GPIO_VIRT_BASE 0xfef10000 | ||
67 | |||
68 | /* | ||
69 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual | ||
70 | * addresses of the INTCTL and PCI_CSR mappings are hardcoded in | ||
71 | * entry-macro.S, so if you ever change these please propagate | ||
72 | * the change. | ||
73 | */ | ||
74 | #define IXP2000_INTCTL_PHYS_BASE 0xd6000000 | ||
75 | #define IXP2000_INTCTL_VIRT_BASE 0xfee00000 | ||
76 | #define IXP2000_INTCTL_SIZE 0x00100000 | ||
77 | |||
78 | #define IXP2000_PCI_CREG_PHYS_BASE 0xde000000 | ||
79 | #define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000 | ||
80 | #define IXP2000_PCI_CREG_SIZE 0x00100000 | ||
81 | |||
82 | #define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000 | ||
83 | #define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000 | ||
84 | #define IXP2000_PCI_CSR_SIZE 0x00100000 | ||
85 | |||
86 | #define IXP2000_MSF_PHYS_BASE 0xc8000000 | ||
87 | #define IXP2000_MSF_VIRT_BASE 0xfeb00000 | ||
88 | #define IXP2000_MSF_SIZE 0x00100000 | ||
89 | |||
90 | #define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000 | ||
91 | #define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000 | ||
92 | #define IXP2000_SCRATCH_RING_SIZE 0x00100000 | ||
93 | |||
94 | #define IXP2000_SRAM0_PHYS_BASE 0x80000000 | ||
95 | #define IXP2000_SRAM0_VIRT_BASE 0xfe900000 | ||
96 | #define IXP2000_SRAM0_SIZE 0x00100000 | ||
97 | |||
98 | #define IXP2000_PCI_IO_PHYS_BASE 0xd8000000 | ||
99 | #define IXP2000_PCI_IO_VIRT_BASE 0xfd000000 | ||
100 | #define IXP2000_PCI_IO_SIZE 0x01000000 | ||
101 | |||
102 | #define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000 | ||
103 | #define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000 | ||
104 | #define IXP2000_PCI_CFG0_SIZE 0x01000000 | ||
105 | |||
106 | #define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000 | ||
107 | #define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000 | ||
108 | #define IXP2000_PCI_CFG1_SIZE 0x01000000 | ||
109 | |||
110 | /* | ||
111 | * Timers | ||
112 | */ | ||
113 | #define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x))) | ||
114 | /* Timer control */ | ||
115 | #define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00) | ||
116 | #define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04) | ||
117 | #define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08) | ||
118 | #define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c) | ||
119 | /* Store initial value */ | ||
120 | #define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10) | ||
121 | #define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14) | ||
122 | #define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18) | ||
123 | #define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c) | ||
124 | /* Read current value */ | ||
125 | #define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20) | ||
126 | #define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24) | ||
127 | #define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28) | ||
128 | #define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c) | ||
129 | /* Clear associated timer interrupt */ | ||
130 | #define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30) | ||
131 | #define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34) | ||
132 | #define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38) | ||
133 | #define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c) | ||
134 | /* Timer watchdog enable for T4 */ | ||
135 | #define IXP2000_TWDE IXP2000_TIMER_REG(0x40) | ||
136 | |||
137 | #define WDT_ENABLE 0x00000001 | ||
138 | #define TIMER_DIVIDER_256 0x00000008 | ||
139 | #define TIMER_ENABLE 0x00000080 | ||
140 | #define IRQ_MASK_TIMER1 (1 << 4) | ||
141 | |||
142 | /* | ||
143 | * Interrupt controller registers | ||
144 | */ | ||
145 | #define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x)) | ||
146 | #define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08) | ||
147 | #define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10) | ||
148 | #define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10) | ||
149 | #define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18) | ||
150 | #define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14) | ||
151 | #define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24) | ||
152 | #define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c) | ||
153 | #define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30) | ||
154 | #define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34) | ||
155 | #define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60) | ||
156 | #define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64) | ||
157 | #define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68) | ||
158 | #define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c) | ||
159 | #define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80) | ||
160 | #define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84) | ||
161 | #define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88) | ||
162 | #define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c) | ||
163 | #define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0) | ||
164 | #define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4) | ||
165 | #define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8) | ||
166 | #define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec) | ||
167 | #define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100) | ||
168 | #define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104) | ||
169 | #define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108) | ||
170 | #define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c) | ||
171 | #define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160) | ||
172 | #define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164) | ||
173 | #define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168) | ||
174 | #define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c) | ||
175 | #define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180) | ||
176 | #define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184) | ||
177 | #define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188) | ||
178 | #define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c) | ||
179 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0) | ||
180 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4) | ||
181 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8) | ||
182 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec) | ||
183 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200) | ||
184 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204) | ||
185 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208) | ||
186 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c) | ||
187 | |||
188 | /* | ||
189 | * Mask of valid IRQs in the 32-bit IRQ register. We use | ||
190 | * this to mark certain IRQs as being invalid. | ||
191 | */ | ||
192 | #define IXP2000_VALID_IRQ_MASK 0x0f0fffff | ||
193 | |||
194 | /* | ||
195 | * PCI config register access from core | ||
196 | */ | ||
197 | #define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x)) | ||
198 | #define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04) | ||
199 | #define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10) | ||
200 | #define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14) | ||
201 | #define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18) | ||
202 | |||
203 | /* | ||
204 | * PCI CSRs | ||
205 | */ | ||
206 | #define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x)) | ||
207 | |||
208 | /* | ||
209 | * PCI outbound interrupts | ||
210 | */ | ||
211 | #define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30) | ||
212 | #define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34) | ||
213 | /* | ||
214 | * PCI communications | ||
215 | */ | ||
216 | #define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50) | ||
217 | #define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54) | ||
218 | #define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58) | ||
219 | #define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C) | ||
220 | #define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60) | ||
221 | #define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64) | ||
222 | #define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70) | ||
223 | #define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74) | ||
224 | |||
225 | /* | ||
226 | * DMA engines | ||
227 | */ | ||
228 | #define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80) | ||
229 | #define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84) | ||
230 | #define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88) | ||
231 | #define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C) | ||
232 | #define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90) | ||
233 | #define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94) | ||
234 | #define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0) | ||
235 | #define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4) | ||
236 | #define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8) | ||
237 | #define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC) | ||
238 | #define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0) | ||
239 | #define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4) | ||
240 | #define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0) | ||
241 | #define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4) | ||
242 | #define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8) | ||
243 | #define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC) | ||
244 | #define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0) | ||
245 | #define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4) | ||
246 | #define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0) | ||
247 | /* | ||
248 | * Size masks for BARs | ||
249 | */ | ||
250 | #define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC) | ||
251 | #define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100) | ||
252 | /* | ||
253 | * Control and uEngine related | ||
254 | */ | ||
255 | #define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C) | ||
256 | #define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140) | ||
257 | #define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148) | ||
258 | #define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C) | ||
259 | #define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150) | ||
260 | #define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154) | ||
261 | /* | ||
262 | * Inbound PCI interrupt control | ||
263 | */ | ||
264 | #define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158) | ||
265 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) | ||
266 | |||
267 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ | ||
268 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */ | ||
269 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ | ||
270 | |||
271 | /* These are from the IRQ register in the PCI ISR register */ | ||
272 | #define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */ | ||
273 | #define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */ | ||
274 | #define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */ | ||
275 | #define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */ | ||
276 | #define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */ | ||
277 | |||
278 | #define IXP2000_PCI_RST_REL (1 << 2) | ||
279 | #define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF) | ||
280 | #define CFG_PCI_BOOT_HOST (1 << 2) | ||
281 | #define CFG_BOOT_PROM (1 << 1) | ||
282 | |||
283 | /* | ||
284 | * SlowPort CSRs | ||
285 | * | ||
286 | * The slowport is used to access things like flash, SONET framer control | ||
287 | * ports, slave microprocessors, CPLDs, and others of chip memory mapped | ||
288 | * peripherals. | ||
289 | */ | ||
290 | #define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x)) | ||
291 | |||
292 | #define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00) | ||
293 | #define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04) | ||
294 | #define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08) | ||
295 | #define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c) | ||
296 | #define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10) | ||
297 | #define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14) | ||
298 | #define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18) | ||
299 | #define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C) | ||
300 | #define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20) | ||
301 | #define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24) | ||
302 | #define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28) | ||
303 | |||
304 | /* | ||
305 | * CCR values. | ||
306 | * The CCR configures the clock division for the slowport interface. | ||
307 | */ | ||
308 | #define SLOWPORT_CCR_DIV_1 0x00 | ||
309 | #define SLOWPORT_CCR_DIV_2 0x01 | ||
310 | #define SLOWPORT_CCR_DIV_4 0x02 | ||
311 | #define SLOWPORT_CCR_DIV_6 0x03 | ||
312 | #define SLOWPORT_CCR_DIV_8 0x04 | ||
313 | #define SLOWPORT_CCR_DIV_10 0x05 | ||
314 | #define SLOWPORT_CCR_DIV_12 0x06 | ||
315 | #define SLOWPORT_CCR_DIV_14 0x07 | ||
316 | #define SLOWPORT_CCR_DIV_16 0x08 | ||
317 | #define SLOWPORT_CCR_DIV_18 0x09 | ||
318 | #define SLOWPORT_CCR_DIV_20 0x0a | ||
319 | #define SLOWPORT_CCR_DIV_22 0x0b | ||
320 | #define SLOWPORT_CCR_DIV_24 0x0c | ||
321 | #define SLOWPORT_CCR_DIV_26 0x0d | ||
322 | #define SLOWPORT_CCR_DIV_28 0x0e | ||
323 | #define SLOWPORT_CCR_DIV_30 0x0f | ||
324 | |||
325 | /* | ||
326 | * PCR values. PCR configure the mode of the interface. | ||
327 | */ | ||
328 | #define SLOWPORT_MODE_FLASH 0x00 | ||
329 | #define SLOWPORT_MODE_LUCENT 0x01 | ||
330 | #define SLOWPORT_MODE_PMC_SIERRA 0x02 | ||
331 | #define SLOWPORT_MODE_INTEL_UP 0x03 | ||
332 | #define SLOWPORT_MODE_MOTOROLA_UP 0x04 | ||
333 | |||
334 | /* | ||
335 | * ADC values. Defines data and address bus widths. | ||
336 | */ | ||
337 | #define SLOWPORT_ADDR_WIDTH_8 0x00 | ||
338 | #define SLOWPORT_ADDR_WIDTH_16 0x01 | ||
339 | #define SLOWPORT_ADDR_WIDTH_24 0x02 | ||
340 | #define SLOWPORT_ADDR_WIDTH_32 0x03 | ||
341 | #define SLOWPORT_DATA_WIDTH_8 0x00 | ||
342 | #define SLOWPORT_DATA_WIDTH_16 0x10 | ||
343 | #define SLOWPORT_DATA_WIDTH_24 0x20 | ||
344 | #define SLOWPORT_DATA_WIDTH_32 0x30 | ||
345 | |||
346 | /* | ||
347 | * Masks and shifts for various fields in the WTC and RTC registers. | ||
348 | */ | ||
349 | #define SLOWPORT_WRTC_MASK_HD 0x0003 | ||
350 | #define SLOWPORT_WRTC_MASK_PW 0x003c | ||
351 | #define SLOWPORT_WRTC_MASK_SU 0x03c0 | ||
352 | |||
353 | #define SLOWPORT_WRTC_SHIFT_HD 0x00 | ||
354 | #define SLOWPORT_WRTC_SHIFT_SU 0x02 | ||
355 | #define SLOWPORT_WRTC_SHFIT_PW 0x06 | ||
356 | |||
357 | |||
358 | /* | ||
359 | * GPIO registers & GPIO interface. | ||
360 | */ | ||
361 | #define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x))) | ||
362 | #define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00) | ||
363 | #define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04) | ||
364 | #define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08) | ||
365 | #define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c) | ||
366 | #define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10) | ||
367 | #define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14) | ||
368 | #define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18) | ||
369 | #define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c) | ||
370 | #define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20) | ||
371 | #define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24) | ||
372 | #define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28) | ||
373 | #define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c) | ||
374 | #define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30) | ||
375 | #define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34) | ||
376 | #define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38) | ||
377 | #define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c) | ||
378 | #define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40) | ||
379 | |||
380 | /* | ||
381 | * "Global" registers...whatever that's supposed to mean. | ||
382 | */ | ||
383 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) | ||
384 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) | ||
385 | |||
386 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 | ||
387 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 | ||
388 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 | ||
389 | #define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200 | ||
390 | #define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100 | ||
391 | #define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000 | ||
392 | #define IXP2000_MAJ_REV_MASK 0x000000F0 | ||
393 | #define IXP2000_MIN_REV_MASK 0x0000000F | ||
394 | #define IXP2000_PROD_ID_MASK 0xFFFFFFFF | ||
395 | |||
396 | #define IXP2000_PRODUCT_ID GLOBAL_REG(0x00) | ||
397 | #define IXP2000_MISC_CONTROL GLOBAL_REG(0x04) | ||
398 | #define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08) | ||
399 | #define IXP2000_RESET0 GLOBAL_REG(0x0c) | ||
400 | #define IXP2000_RESET1 GLOBAL_REG(0x10) | ||
401 | #define IXP2000_CCR GLOBAL_REG(0x14) | ||
402 | #define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18) | ||
403 | |||
404 | #define RSTALL (1 << 16) | ||
405 | #define WDT_RESET_ENABLE 0x01000000 | ||
406 | |||
407 | |||
408 | /* | ||
409 | * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF | ||
410 | * units, but the registers that differ between the two don't overlap, | ||
411 | * so we can have one register list for both. | ||
412 | */ | ||
413 | #define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x))) | ||
414 | #define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000) | ||
415 | #define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004) | ||
416 | #define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008) | ||
417 | #define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c) | ||
418 | #define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010) | ||
419 | #define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014) | ||
420 | #define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018) | ||
421 | #define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024) | ||
422 | #define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028) | ||
423 | #define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c) | ||
424 | #define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040) | ||
425 | #define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044) | ||
426 | #define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048) | ||
427 | #define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048) | ||
428 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050) | ||
429 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054) | ||
430 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058) | ||
431 | #define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060) | ||
432 | #define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064) | ||
433 | #define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068) | ||
434 | #define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070) | ||
435 | #define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070) | ||
436 | #define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080) | ||
437 | #define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084) | ||
438 | #define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088) | ||
439 | #define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c) | ||
440 | #define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090) | ||
441 | #define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094) | ||
442 | #define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098) | ||
443 | #define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c) | ||
444 | #define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0) | ||
445 | #define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4) | ||
446 | #define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8) | ||
447 | #define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000) | ||
448 | #define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400) | ||
449 | |||
450 | |||
451 | #endif /* _IXP2000_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h deleted file mode 100644 index 5f0c4fd4076a..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/memory.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2002 Intel Corp. | ||
5 | * Copyright (c) 2003-2004 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
17 | |||
18 | #include <mach/ixp2000-regs.h> | ||
19 | |||
20 | #define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0) | ||
21 | |||
22 | #define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
23 | #define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
24 | |||
25 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
26 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
27 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
28 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h deleted file mode 100644 index bb0f8dcf9ee1..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/platform.h +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/platform.h | ||
3 | * | ||
4 | * Various bits of code used by platform-level code. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
19 | { | ||
20 | return *((volatile unsigned long *)reg); | ||
21 | } | ||
22 | |||
23 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | ||
24 | { | ||
25 | *((volatile unsigned long *)reg) = val; | ||
26 | } | ||
27 | |||
28 | /* | ||
29 | * On the IXP2400, we can't use XCB=000 due to chip bugs. We use | ||
30 | * XCB=101 instead, but that makes all I/O accesses bufferable. This | ||
31 | * is not a problem in general, but we do have to be slightly more | ||
32 | * careful because I/O writes are no longer automatically flushed out | ||
33 | * of the write buffer. | ||
34 | * | ||
35 | * In cases where we want to make sure that a write has been flushed | ||
36 | * out of the write buffer before we proceed, for example when masking | ||
37 | * a device interrupt before re-enabling IRQs in CPSR, we can use this | ||
38 | * function, ixp2000_reg_wrb, which performs a write, a readback, and | ||
39 | * issues a dummy instruction dependent on the value of the readback | ||
40 | * (mov rX, rX) to make sure that the readback has completed before we | ||
41 | * continue. | ||
42 | */ | ||
43 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | ||
44 | { | ||
45 | unsigned long dummy; | ||
46 | |||
47 | *((volatile unsigned long *)reg) = val; | ||
48 | |||
49 | dummy = *((volatile unsigned long *)reg); | ||
50 | __asm__ __volatile__("mov %0, %0" : "+r" (dummy)); | ||
51 | } | ||
52 | |||
53 | /* | ||
54 | * Boards may multiplex different devices on the 2nd channel of | ||
55 | * the slowport interface that each need different configuration | ||
56 | * settings. For example, the IXDP2400 uses channel 2 on the interface | ||
57 | * to access the CPLD, the switch fabric card, and the media card. Each | ||
58 | * one needs a different mode so drivers must save/restore the mode | ||
59 | * before and after each operation. | ||
60 | * | ||
61 | * acquire_slowport(&your_config); | ||
62 | * ... | ||
63 | * do slowport operations | ||
64 | * ... | ||
65 | * release_slowport(); | ||
66 | * | ||
67 | * Note that while you have the slowport, you are holding a spinlock, | ||
68 | * so your code should be written as if you explicitly acquired a lock. | ||
69 | * | ||
70 | * The configuration only affects device 2 on the slowport, so the | ||
71 | * MTD map driver does not acquire/release the slowport. | ||
72 | */ | ||
73 | struct slowport_cfg { | ||
74 | unsigned long CCR; /* Clock divide */ | ||
75 | unsigned long WTC; /* Write Timing Control */ | ||
76 | unsigned long RTC; /* Read Timing Control */ | ||
77 | unsigned long PCR; /* Protocol Control Register */ | ||
78 | unsigned long ADC; /* Address/Data Width Control */ | ||
79 | }; | ||
80 | |||
81 | |||
82 | void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *); | ||
83 | void ixp2000_release_slowport(struct slowport_cfg *); | ||
84 | |||
85 | /* | ||
86 | * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires | ||
87 | * tweaking of addresses in the MTD driver. | ||
88 | */ | ||
89 | static inline unsigned ixp2000_has_broken_slowport(void) | ||
90 | { | ||
91 | unsigned long id = *IXP2000_PRODUCT_ID; | ||
92 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | | ||
93 | IXP2000_MIN_PROD_TYPE_MASK); | ||
94 | return (((id_prod == | ||
95 | /* fixed in IXP2400-B0 */ | ||
96 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
97 | IXP2000_MIN_PROD_TYPE_IXP2400)) && | ||
98 | ((id & IXP2000_MAJ_REV_MASK) == 0)) || | ||
99 | ((id_prod == | ||
100 | /* fixed in IXP2800-B0 */ | ||
101 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
102 | IXP2000_MIN_PROD_TYPE_IXP2800)) && | ||
103 | ((id & IXP2000_MAJ_REV_MASK) == 0)) || | ||
104 | ((id_prod == | ||
105 | /* fixed in IXP2850-B0 */ | ||
106 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
107 | IXP2000_MIN_PROD_TYPE_IXP2850)) && | ||
108 | ((id & IXP2000_MAJ_REV_MASK) == 0))); | ||
109 | } | ||
110 | |||
111 | static inline unsigned int ixp2000_has_flash(void) | ||
112 | { | ||
113 | return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM)); | ||
114 | } | ||
115 | |||
116 | static inline unsigned int ixp2000_is_pcimaster(void) | ||
117 | { | ||
118 | return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST)); | ||
119 | } | ||
120 | |||
121 | void ixp2000_map_io(void); | ||
122 | void ixp2000_uart_init(void); | ||
123 | void ixp2000_init_irq(void); | ||
124 | void ixp2000_init_time(unsigned long); | ||
125 | void ixp2000_restart(char, const char *); | ||
126 | unsigned long ixp2000_gettimeoffset(void); | ||
127 | |||
128 | struct pci_sys_data; | ||
129 | |||
130 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); | ||
131 | void ixp2000_pci_preinit(void); | ||
132 | int ixp2000_pci_setup(int, struct pci_sys_data*); | ||
133 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); | ||
134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); | ||
135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); | ||
136 | |||
137 | /* | ||
138 | * Several of the IXP2000 systems have banked flash so we need to extend the | ||
139 | * flash_platform_data structure with some private pointers | ||
140 | */ | ||
141 | struct ixp2000_flash_data { | ||
142 | struct flash_platform_data *platform_data; | ||
143 | int nr_banks; | ||
144 | unsigned long (*bank_setup)(unsigned long); | ||
145 | }; | ||
146 | |||
147 | struct ixp2000_i2c_pins { | ||
148 | unsigned long sda_pin; | ||
149 | unsigned long scl_pin; | ||
150 | }; | ||
151 | |||
152 | |||
153 | #endif /* !__ASSEMBLY__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/timex.h b/arch/arm/mach-ixp2000/include/mach/timex.h deleted file mode 100644 index 835e659f93d4..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/timex.h | ||
3 | * | ||
4 | * IXP2000 architecture timex specifications | ||
5 | */ | ||
6 | |||
7 | |||
8 | /* | ||
9 | * Default clock is 50MHz APB, but platform code can override this | ||
10 | */ | ||
11 | #define CLOCK_TICK_RATE 50000000 | ||
12 | |||
13 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h deleted file mode 100644 index ce363087df78..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/uncompress.h | ||
3 | * | ||
4 | * | ||
5 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
6 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2002 Intel Corp. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/serial_reg.h> | ||
18 | |||
19 | #define UART_BASE 0xc0030000 | ||
20 | |||
21 | #define PHYS(x) ((volatile unsigned long *)(UART_BASE + x)) | ||
22 | |||
23 | #define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */ | ||
24 | #define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/ | ||
25 | #define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/ | ||
26 | #define UARTIER PHYS(0x04) /* Interrupt enable reg */ | ||
27 | #define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/ | ||
28 | #define UARTLCR PHYS(0x0c) /* Control reg */ | ||
29 | #define UARTSR PHYS(0x14) /* Status reg */ | ||
30 | |||
31 | |||
32 | static inline void putc(int c) | ||
33 | { | ||
34 | int j = 0x1000; | ||
35 | |||
36 | while (--j && !(*UARTSR & UART_LSR_THRE)) | ||
37 | barrier(); | ||
38 | |||
39 | *UARTDR = c; | ||
40 | } | ||
41 | |||
42 | static inline void flush(void) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c deleted file mode 100644 index 915ad49e3b8f..000000000000 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2400.c | ||
3 | * | ||
4 | * IXDP2400 platform support | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | |||
35 | #include <asm/mach/pci.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/time.h> | ||
39 | #include <asm/mach/flash.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | |||
42 | /************************************************************************* | ||
43 | * IXDP2400 timer tick | ||
44 | *************************************************************************/ | ||
45 | static void __init ixdp2400_timer_init(void) | ||
46 | { | ||
47 | int numerator, denominator; | ||
48 | int denom_array[] = {2, 4, 8, 16, 1, 2, 4, 8}; | ||
49 | |||
50 | numerator = (*(IXDP2400_CPLD_SYS_CLK_M) & 0xFF) *2; | ||
51 | denominator = denom_array[(*(IXDP2400_CPLD_SYS_CLK_N) & 0x7)]; | ||
52 | |||
53 | ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2); | ||
54 | } | ||
55 | |||
56 | static struct sys_timer ixdp2400_timer = { | ||
57 | .init = ixdp2400_timer_init, | ||
58 | .offset = ixp2000_gettimeoffset, | ||
59 | }; | ||
60 | |||
61 | /************************************************************************* | ||
62 | * IXDP2400 PCI | ||
63 | *************************************************************************/ | ||
64 | void __init ixdp2400_pci_preinit(void) | ||
65 | { | ||
66 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | ||
67 | ixp2000_pci_preinit(); | ||
68 | pcibios_setup("firmware"); | ||
69 | } | ||
70 | |||
71 | int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) | ||
72 | { | ||
73 | sys->mem_offset = 0xe0000000; | ||
74 | |||
75 | ixp2000_pci_setup(nr, sys); | ||
76 | |||
77 | return 1; | ||
78 | } | ||
79 | |||
80 | static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
81 | u8 pin) | ||
82 | { | ||
83 | if (ixdp2x00_master_npu()) { | ||
84 | |||
85 | /* | ||
86 | * Root bus devices. Slave NPU is only one with interrupt. | ||
87 | * Everything else, we just return -1 b/c nothing else | ||
88 | * on the root bus has interrupts. | ||
89 | */ | ||
90 | if(!dev->bus->self) { | ||
91 | if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN ) | ||
92 | return IRQ_IXDP2400_INGRESS_NPU; | ||
93 | |||
94 | return -1; | ||
95 | } | ||
96 | |||
97 | /* | ||
98 | * Bridge behind the PMC slot. | ||
99 | * NOTE: Only INTA from the PMC slot is routed. VERY BAD. | ||
100 | */ | ||
101 | if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN && | ||
102 | dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN && | ||
103 | !dev->bus->parent->self->bus->parent) | ||
104 | return IRQ_IXDP2400_PMC; | ||
105 | |||
106 | /* | ||
107 | * Device behind the first bridge | ||
108 | */ | ||
109 | if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) { | ||
110 | switch(dev->devfn) { | ||
111 | case IXDP2400_MASTER_ENET_DEVFN: | ||
112 | return IRQ_IXDP2400_ENET; | ||
113 | |||
114 | case IXDP2400_MEDIA_DEVFN: | ||
115 | return IRQ_IXDP2400_MEDIA_PCI; | ||
116 | |||
117 | case IXDP2400_SWITCH_FABRIC_DEVFN: | ||
118 | return IRQ_IXDP2400_SF_PCI; | ||
119 | |||
120 | case IXDP2X00_PMC_DEVFN: | ||
121 | return IRQ_IXDP2400_PMC; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | return -1; | ||
126 | } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */ | ||
127 | } | ||
128 | |||
129 | |||
130 | static void ixdp2400_pci_postinit(void) | ||
131 | { | ||
132 | struct pci_dev *dev; | ||
133 | |||
134 | if (ixdp2x00_master_npu()) { | ||
135 | dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN); | ||
136 | pci_stop_and_remove_bus_device(dev); | ||
137 | pci_dev_put(dev); | ||
138 | } else { | ||
139 | dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN); | ||
140 | pci_stop_and_remove_bus_device(dev); | ||
141 | pci_dev_put(dev); | ||
142 | |||
143 | ixdp2x00_slave_pci_postinit(); | ||
144 | } | ||
145 | } | ||
146 | |||
147 | static struct hw_pci ixdp2400_pci __initdata = { | ||
148 | .nr_controllers = 1, | ||
149 | .setup = ixdp2400_pci_setup, | ||
150 | .preinit = ixdp2400_pci_preinit, | ||
151 | .postinit = ixdp2400_pci_postinit, | ||
152 | .scan = ixp2000_pci_scan_bus, | ||
153 | .map_irq = ixdp2400_pci_map_irq, | ||
154 | }; | ||
155 | |||
156 | int __init ixdp2400_pci_init(void) | ||
157 | { | ||
158 | if (machine_is_ixdp2400()) | ||
159 | pci_common_init(&ixdp2400_pci); | ||
160 | |||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | subsys_initcall(ixdp2400_pci_init); | ||
165 | |||
166 | void __init ixdp2400_init_irq(void) | ||
167 | { | ||
168 | ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS); | ||
169 | } | ||
170 | |||
171 | MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") | ||
172 | /* Maintainer: MontaVista Software, Inc. */ | ||
173 | .atag_offset = 0x100, | ||
174 | .map_io = ixdp2x00_map_io, | ||
175 | .init_irq = ixdp2400_init_irq, | ||
176 | .timer = &ixdp2400_timer, | ||
177 | .init_machine = ixdp2x00_init_machine, | ||
178 | .restart = ixp2000_restart, | ||
179 | MACHINE_END | ||
180 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c deleted file mode 100644 index a9f1819ea049..000000000000 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ /dev/null | |||
@@ -1,295 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2800.c | ||
3 | * | ||
4 | * IXDP2800 platform support | ||
5 | * | ||
6 | * Original Author: Jeffrey Daly <jeffrey.daly@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | |||
35 | #include <asm/mach/pci.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/time.h> | ||
39 | #include <asm/mach/flash.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | |||
42 | /************************************************************************* | ||
43 | * IXDP2800 timer tick | ||
44 | *************************************************************************/ | ||
45 | |||
46 | static void __init ixdp2800_timer_init(void) | ||
47 | { | ||
48 | ixp2000_init_time(50000000); | ||
49 | } | ||
50 | |||
51 | static struct sys_timer ixdp2800_timer = { | ||
52 | .init = ixdp2800_timer_init, | ||
53 | .offset = ixp2000_gettimeoffset, | ||
54 | }; | ||
55 | |||
56 | /************************************************************************* | ||
57 | * IXDP2800 PCI | ||
58 | *************************************************************************/ | ||
59 | static void __init ixdp2800_slave_disable_pci_master(void) | ||
60 | { | ||
61 | *IXP2000_PCI_CMDSTAT &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | ||
62 | } | ||
63 | |||
64 | static void __init ixdp2800_master_wait_for_slave(void) | ||
65 | { | ||
66 | volatile u32 *addr; | ||
67 | |||
68 | printk(KERN_INFO "IXDP2800: waiting for slave NPU to configure " | ||
69 | "its BAR sizes\n"); | ||
70 | |||
71 | addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN, | ||
72 | PCI_BASE_ADDRESS_1); | ||
73 | do { | ||
74 | *addr = 0xffffffff; | ||
75 | cpu_relax(); | ||
76 | } while (*addr != 0xfe000008); | ||
77 | |||
78 | addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN, | ||
79 | PCI_BASE_ADDRESS_2); | ||
80 | do { | ||
81 | *addr = 0xffffffff; | ||
82 | cpu_relax(); | ||
83 | } while (*addr != 0xc0000008); | ||
84 | |||
85 | /* | ||
86 | * Configure the slave's SDRAM BAR by hand. | ||
87 | */ | ||
88 | *addr = 0x40000008; | ||
89 | } | ||
90 | |||
91 | static void __init ixdp2800_slave_wait_for_master_enable(void) | ||
92 | { | ||
93 | printk(KERN_INFO "IXDP2800: waiting for master NPU to enable us\n"); | ||
94 | |||
95 | while ((*IXP2000_PCI_CMDSTAT & PCI_COMMAND_MASTER) == 0) | ||
96 | cpu_relax(); | ||
97 | } | ||
98 | |||
99 | void __init ixdp2800_pci_preinit(void) | ||
100 | { | ||
101 | printk("ixdp2x00_pci_preinit called\n"); | ||
102 | |||
103 | *IXP2000_PCI_ADDR_EXT = 0x0001e000; | ||
104 | |||
105 | if (!ixdp2x00_master_npu()) | ||
106 | ixdp2800_slave_disable_pci_master(); | ||
107 | |||
108 | *IXP2000_PCI_SRAM_BASE_ADDR_MASK = (0x2000000 - 1) & ~0x3ffff; | ||
109 | *IXP2000_PCI_DRAM_BASE_ADDR_MASK = (0x40000000 - 1) & ~0xfffff; | ||
110 | |||
111 | ixp2000_pci_preinit(); | ||
112 | |||
113 | if (ixdp2x00_master_npu()) { | ||
114 | /* | ||
115 | * Wait until the slave set its SRAM/SDRAM BAR sizes | ||
116 | * correctly before we proceed to scan and enumerate | ||
117 | * the bus. | ||
118 | */ | ||
119 | ixdp2800_master_wait_for_slave(); | ||
120 | |||
121 | /* | ||
122 | * We configure the SDRAM BARs by hand because they | ||
123 | * are 1G and fall outside of the regular allocated | ||
124 | * PCI address space. | ||
125 | */ | ||
126 | *IXP2000_PCI_SDRAM_BAR = 0x00000008; | ||
127 | } else { | ||
128 | /* | ||
129 | * Wait for the master to complete scanning the bus | ||
130 | * and assigning resources before we proceed to scan | ||
131 | * the bus ourselves. Set pci=firmware to honor the | ||
132 | * master's resource assignment. | ||
133 | */ | ||
134 | ixdp2800_slave_wait_for_master_enable(); | ||
135 | pcibios_setup("firmware"); | ||
136 | } | ||
137 | } | ||
138 | |||
139 | /* | ||
140 | * We assign the SDRAM BARs for the two IXP2800 CPUs by hand, outside | ||
141 | * of the regular PCI window, because there's only 512M of outbound PCI | ||
142 | * memory window on each IXP, while we need 1G for each of the BARs. | ||
143 | */ | ||
144 | static void __devinit ixp2800_pci_fixup(struct pci_dev *dev) | ||
145 | { | ||
146 | if (machine_is_ixdp2800()) { | ||
147 | dev->resource[2].start = 0; | ||
148 | dev->resource[2].end = 0; | ||
149 | dev->resource[2].flags = 0; | ||
150 | } | ||
151 | } | ||
152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP2800, ixp2800_pci_fixup); | ||
153 | |||
154 | static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys) | ||
155 | { | ||
156 | sys->mem_offset = 0x00000000; | ||
157 | |||
158 | ixp2000_pci_setup(nr, sys); | ||
159 | |||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
164 | u8 pin) | ||
165 | { | ||
166 | if (ixdp2x00_master_npu()) { | ||
167 | |||
168 | /* | ||
169 | * Root bus devices. Slave NPU is only one with interrupt. | ||
170 | * Everything else, we just return -1 which is invalid. | ||
171 | */ | ||
172 | if(!dev->bus->self) { | ||
173 | if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN ) | ||
174 | return IRQ_IXDP2800_INGRESS_NPU; | ||
175 | |||
176 | return -1; | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Bridge behind the PMC slot. | ||
181 | */ | ||
182 | if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN && | ||
183 | dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN && | ||
184 | !dev->bus->parent->self->bus->parent) | ||
185 | return IRQ_IXDP2800_PMC; | ||
186 | |||
187 | /* | ||
188 | * Device behind the first bridge | ||
189 | */ | ||
190 | if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) { | ||
191 | switch(dev->devfn) { | ||
192 | case IXDP2X00_PMC_DEVFN: | ||
193 | return IRQ_IXDP2800_PMC; | ||
194 | |||
195 | case IXDP2800_MASTER_ENET_DEVFN: | ||
196 | return IRQ_IXDP2800_EGRESS_ENET; | ||
197 | |||
198 | case IXDP2800_SWITCH_FABRIC_DEVFN: | ||
199 | return IRQ_IXDP2800_FABRIC; | ||
200 | } | ||
201 | } | ||
202 | |||
203 | return -1; | ||
204 | } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */ | ||
205 | } | ||
206 | |||
207 | static void __init ixdp2800_master_enable_slave(void) | ||
208 | { | ||
209 | volatile u32 *addr; | ||
210 | |||
211 | printk(KERN_INFO "IXDP2800: enabling slave NPU\n"); | ||
212 | |||
213 | addr = (volatile u32 *)ixp2000_pci_config_addr(0, | ||
214 | IXDP2X00_SLAVE_NPU_DEVFN, | ||
215 | PCI_COMMAND); | ||
216 | |||
217 | *addr |= PCI_COMMAND_MASTER; | ||
218 | } | ||
219 | |||
220 | static void __init ixdp2800_master_wait_for_slave_bus_scan(void) | ||
221 | { | ||
222 | volatile u32 *addr; | ||
223 | |||
224 | printk(KERN_INFO "IXDP2800: waiting for slave to finish bus scan\n"); | ||
225 | |||
226 | addr = (volatile u32 *)ixp2000_pci_config_addr(0, | ||
227 | IXDP2X00_SLAVE_NPU_DEVFN, | ||
228 | PCI_COMMAND); | ||
229 | while ((*addr & PCI_COMMAND_MEMORY) == 0) | ||
230 | cpu_relax(); | ||
231 | } | ||
232 | |||
233 | static void __init ixdp2800_slave_signal_bus_scan_completion(void) | ||
234 | { | ||
235 | printk(KERN_INFO "IXDP2800: bus scan done, signaling master\n"); | ||
236 | *IXP2000_PCI_CMDSTAT |= PCI_COMMAND_MEMORY; | ||
237 | } | ||
238 | |||
239 | static void __init ixdp2800_pci_postinit(void) | ||
240 | { | ||
241 | if (!ixdp2x00_master_npu()) { | ||
242 | ixdp2x00_slave_pci_postinit(); | ||
243 | ixdp2800_slave_signal_bus_scan_completion(); | ||
244 | } | ||
245 | } | ||
246 | |||
247 | struct __initdata hw_pci ixdp2800_pci __initdata = { | ||
248 | .nr_controllers = 1, | ||
249 | .setup = ixdp2800_pci_setup, | ||
250 | .preinit = ixdp2800_pci_preinit, | ||
251 | .postinit = ixdp2800_pci_postinit, | ||
252 | .scan = ixp2000_pci_scan_bus, | ||
253 | .map_irq = ixdp2800_pci_map_irq, | ||
254 | }; | ||
255 | |||
256 | int __init ixdp2800_pci_init(void) | ||
257 | { | ||
258 | if (machine_is_ixdp2800()) { | ||
259 | struct pci_dev *dev; | ||
260 | |||
261 | pci_common_init(&ixdp2800_pci); | ||
262 | if (ixdp2x00_master_npu()) { | ||
263 | dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN); | ||
264 | pci_stop_and_remove_bus_device(dev); | ||
265 | pci_dev_put(dev); | ||
266 | |||
267 | ixdp2800_master_enable_slave(); | ||
268 | ixdp2800_master_wait_for_slave_bus_scan(); | ||
269 | } else { | ||
270 | dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN); | ||
271 | pci_stop_and_remove_bus_device(dev); | ||
272 | pci_dev_put(dev); | ||
273 | } | ||
274 | } | ||
275 | |||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | subsys_initcall(ixdp2800_pci_init); | ||
280 | |||
281 | void __init ixdp2800_init_irq(void) | ||
282 | { | ||
283 | ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS); | ||
284 | } | ||
285 | |||
286 | MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") | ||
287 | /* Maintainer: MontaVista Software, Inc. */ | ||
288 | .atag_offset = 0x100, | ||
289 | .map_io = ixdp2x00_map_io, | ||
290 | .init_irq = ixdp2800_init_irq, | ||
291 | .timer = &ixdp2800_timer, | ||
292 | .init_machine = ixdp2x00_init_machine, | ||
293 | .restart = ixp2000_restart, | ||
294 | MACHINE_END | ||
295 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c deleted file mode 100644 index 421e38dc0fac..000000000000 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ /dev/null | |||
@@ -1,306 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2x00.c | ||
3 | * | ||
4 | * Code common to IXDP2400 and IXDP2800 platforms. | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/pci.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/io.h> | ||
29 | |||
30 | #include <asm/irq.h> | ||
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | |||
36 | #include <asm/mach/pci.h> | ||
37 | #include <asm/mach/map.h> | ||
38 | #include <asm/mach/irq.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | #include <asm/mach/flash.h> | ||
41 | #include <asm/mach/arch.h> | ||
42 | |||
43 | #include <mach/gpio-ixp2000.h> | ||
44 | |||
45 | /************************************************************************* | ||
46 | * IXDP2x00 IRQ Initialization | ||
47 | *************************************************************************/ | ||
48 | static volatile unsigned long *board_irq_mask; | ||
49 | static volatile unsigned long *board_irq_stat; | ||
50 | static unsigned long board_irq_count; | ||
51 | |||
52 | #ifdef CONFIG_ARCH_IXDP2400 | ||
53 | /* | ||
54 | * Slowport configuration for accessing CPLD registers on IXDP2x00 | ||
55 | */ | ||
56 | static struct slowport_cfg slowport_cpld_cfg = { | ||
57 | .CCR = SLOWPORT_CCR_DIV_2, | ||
58 | .WTC = 0x00000070, | ||
59 | .RTC = 0x00000070, | ||
60 | .PCR = SLOWPORT_MODE_FLASH, | ||
61 | .ADC = SLOWPORT_ADDR_WIDTH_24 | SLOWPORT_DATA_WIDTH_8 | ||
62 | }; | ||
63 | #endif | ||
64 | |||
65 | static void ixdp2x00_irq_mask(struct irq_data *d) | ||
66 | { | ||
67 | unsigned long dummy; | ||
68 | static struct slowport_cfg old_cfg; | ||
69 | |||
70 | /* | ||
71 | * This is ugly in common code but really don't know | ||
72 | * of a better way to handle it. :( | ||
73 | */ | ||
74 | #ifdef CONFIG_ARCH_IXDP2400 | ||
75 | if (machine_is_ixdp2400()) | ||
76 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
77 | #endif | ||
78 | |||
79 | dummy = *board_irq_mask; | ||
80 | dummy |= IXP2000_BOARD_IRQ_MASK(d->irq); | ||
81 | ixp2000_reg_wrb(board_irq_mask, dummy); | ||
82 | |||
83 | #ifdef CONFIG_ARCH_IXDP2400 | ||
84 | if (machine_is_ixdp2400()) | ||
85 | ixp2000_release_slowport(&old_cfg); | ||
86 | #endif | ||
87 | } | ||
88 | |||
89 | static void ixdp2x00_irq_unmask(struct irq_data *d) | ||
90 | { | ||
91 | unsigned long dummy; | ||
92 | static struct slowport_cfg old_cfg; | ||
93 | |||
94 | #ifdef CONFIG_ARCH_IXDP2400 | ||
95 | if (machine_is_ixdp2400()) | ||
96 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
97 | #endif | ||
98 | |||
99 | dummy = *board_irq_mask; | ||
100 | dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq); | ||
101 | ixp2000_reg_wrb(board_irq_mask, dummy); | ||
102 | |||
103 | if (machine_is_ixdp2400()) | ||
104 | ixp2000_release_slowport(&old_cfg); | ||
105 | } | ||
106 | |||
107 | static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
108 | { | ||
109 | volatile u32 ex_interrupt = 0; | ||
110 | static struct slowport_cfg old_cfg; | ||
111 | int i; | ||
112 | |||
113 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
114 | |||
115 | #ifdef CONFIG_ARCH_IXDP2400 | ||
116 | if (machine_is_ixdp2400()) | ||
117 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
118 | #endif | ||
119 | ex_interrupt = *board_irq_stat & 0xff; | ||
120 | if (machine_is_ixdp2400()) | ||
121 | ixp2000_release_slowport(&old_cfg); | ||
122 | |||
123 | if(!ex_interrupt) { | ||
124 | printk(KERN_ERR "Spurious IXDP2x00 CPLD interrupt!\n"); | ||
125 | return; | ||
126 | } | ||
127 | |||
128 | for(i = 0; i < board_irq_count; i++) { | ||
129 | if(ex_interrupt & (1 << i)) { | ||
130 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | ||
131 | generic_handle_irq(cpld_irq); | ||
132 | } | ||
133 | } | ||
134 | |||
135 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
136 | } | ||
137 | |||
138 | static struct irq_chip ixdp2x00_cpld_irq_chip = { | ||
139 | .irq_ack = ixdp2x00_irq_mask, | ||
140 | .irq_mask = ixdp2x00_irq_mask, | ||
141 | .irq_unmask = ixdp2x00_irq_unmask | ||
142 | }; | ||
143 | |||
144 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) | ||
145 | { | ||
146 | unsigned int irq; | ||
147 | |||
148 | ixp2000_init_irq(); | ||
149 | |||
150 | if (!ixdp2x00_master_npu()) | ||
151 | return; | ||
152 | |||
153 | board_irq_stat = stat_reg; | ||
154 | board_irq_mask = mask_reg; | ||
155 | board_irq_count = nr_of_irqs; | ||
156 | |||
157 | *board_irq_mask = 0xffffffff; | ||
158 | |||
159 | for(irq = IXP2000_BOARD_IRQ(0); irq < IXP2000_BOARD_IRQ(board_irq_count); irq++) { | ||
160 | irq_set_chip_and_handler(irq, &ixdp2x00_cpld_irq_chip, | ||
161 | handle_level_irq); | ||
162 | set_irq_flags(irq, IRQF_VALID); | ||
163 | } | ||
164 | |||
165 | /* Hook into PCI interrupt */ | ||
166 | irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler); | ||
167 | } | ||
168 | |||
169 | /************************************************************************* | ||
170 | * IXDP2x00 memory map | ||
171 | *************************************************************************/ | ||
172 | static struct map_desc ixdp2x00_io_desc __initdata = { | ||
173 | .virtual = IXDP2X00_VIRT_CPLD_BASE, | ||
174 | .pfn = __phys_to_pfn(IXDP2X00_PHYS_CPLD_BASE), | ||
175 | .length = IXDP2X00_CPLD_SIZE, | ||
176 | .type = MT_DEVICE | ||
177 | }; | ||
178 | |||
179 | void __init ixdp2x00_map_io(void) | ||
180 | { | ||
181 | ixp2000_map_io(); | ||
182 | |||
183 | iotable_init(&ixdp2x00_io_desc, 1); | ||
184 | } | ||
185 | |||
186 | /************************************************************************* | ||
187 | * IXDP2x00-common PCI init | ||
188 | * | ||
189 | * The IXDP2[48]00 has a horrid PCI bus layout. Basically the board | ||
190 | * contains two NPUs (ingress and egress) connected over PCI, both running | ||
191 | * instances of the kernel. So far so good. Peers on the PCI bus running | ||
192 | * Linux is a common design in telecom systems. The problem is that instead | ||
193 | * of all the devices being controlled by a single host, different | ||
194 | * devices are controlled by different NPUs on the same bus, leading to | ||
195 | * multiple hosts on the bus. The exact bus layout looks like: | ||
196 | * | ||
197 | * Bus 0 | ||
198 | * Master NPU <-------------------+-------------------> Slave NPU | ||
199 | * | | ||
200 | * | | ||
201 | * P2P | ||
202 | * | | ||
203 | * | ||
204 | * Bus 1 | | ||
205 | * <--+------+---------+---------+------+--> | ||
206 | * | | | | | | ||
207 | * | | | | | | ||
208 | * ... Dev PMC Media Eth0 Eth1 ... | ||
209 | * | ||
210 | * The master controls all but Eth1, which is controlled by the | ||
211 | * slave. What this means is that the both the master and the slave | ||
212 | * have to scan the bus, but only one of them can enumerate the bus. | ||
213 | * In addition, after the bus is scanned, each kernel must remove | ||
214 | * the device(s) it does not control from the PCI dev list otherwise | ||
215 | * a driver on each NPU will try to manage it and we will have horrible | ||
216 | * conflicts. Oh..and the slave NPU needs to see the master NPU | ||
217 | * for Intel's drivers to work properly. Closed source drivers... | ||
218 | * | ||
219 | * The way we deal with this is fairly simple but ugly: | ||
220 | * | ||
221 | * 1) Let master scan and enumerate the bus completely. | ||
222 | * 2) Master deletes Eth1 from device list. | ||
223 | * 3) Slave scans bus and then deletes all but Eth1 (Eth0 on slave) | ||
224 | * from device list. | ||
225 | * 4) Find HW designers and LART them. | ||
226 | * | ||
227 | * The boards also do not do normal PCI IRQ routing, or any sort of | ||
228 | * sensical swizzling, so we just need to check where on the bus a | ||
229 | * device sits and figure out to which CPLD pin the interrupt is routed. | ||
230 | * See ixdp2[48]00.c files. | ||
231 | * | ||
232 | *************************************************************************/ | ||
233 | void ixdp2x00_slave_pci_postinit(void) | ||
234 | { | ||
235 | struct pci_dev *dev; | ||
236 | |||
237 | /* | ||
238 | * Remove PMC device is there is one | ||
239 | */ | ||
240 | if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) { | ||
241 | pci_stop_and_remove_bus_device(dev); | ||
242 | pci_dev_put(dev); | ||
243 | } | ||
244 | |||
245 | dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN); | ||
246 | pci_stop_and_remove_bus_device(dev); | ||
247 | pci_dev_put(dev); | ||
248 | } | ||
249 | |||
250 | /************************************************************************** | ||
251 | * IXDP2x00 Machine Setup | ||
252 | *************************************************************************/ | ||
253 | static struct flash_platform_data ixdp2x00_platform_data = { | ||
254 | .map_name = "cfi_probe", | ||
255 | .width = 1, | ||
256 | }; | ||
257 | |||
258 | static struct ixp2000_flash_data ixdp2x00_flash_data = { | ||
259 | .platform_data = &ixdp2x00_platform_data, | ||
260 | .nr_banks = 1 | ||
261 | }; | ||
262 | |||
263 | static struct resource ixdp2x00_flash_resource = { | ||
264 | .start = 0xc4000000, | ||
265 | .end = 0xc4000000 + 0x00ffffff, | ||
266 | .flags = IORESOURCE_MEM, | ||
267 | }; | ||
268 | |||
269 | static struct platform_device ixdp2x00_flash = { | ||
270 | .name = "IXP2000-Flash", | ||
271 | .id = 0, | ||
272 | .dev = { | ||
273 | .platform_data = &ixdp2x00_flash_data, | ||
274 | }, | ||
275 | .num_resources = 1, | ||
276 | .resource = &ixdp2x00_flash_resource, | ||
277 | }; | ||
278 | |||
279 | static struct ixp2000_i2c_pins ixdp2x00_i2c_gpio_pins = { | ||
280 | .sda_pin = IXDP2X00_GPIO_SDA, | ||
281 | .scl_pin = IXDP2X00_GPIO_SCL, | ||
282 | }; | ||
283 | |||
284 | static struct platform_device ixdp2x00_i2c_controller = { | ||
285 | .name = "IXP2000-I2C", | ||
286 | .id = 0, | ||
287 | .dev = { | ||
288 | .platform_data = &ixdp2x00_i2c_gpio_pins, | ||
289 | }, | ||
290 | .num_resources = 0 | ||
291 | }; | ||
292 | |||
293 | static struct platform_device *ixdp2x00_devices[] __initdata = { | ||
294 | &ixdp2x00_flash, | ||
295 | &ixdp2x00_i2c_controller | ||
296 | }; | ||
297 | |||
298 | void __init ixdp2x00_init_machine(void) | ||
299 | { | ||
300 | gpio_line_set(IXDP2X00_GPIO_I2C_ENABLE, 1); | ||
301 | gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT); | ||
302 | |||
303 | platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices)); | ||
304 | ixp2000_uart_init(); | ||
305 | } | ||
306 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c deleted file mode 100644 index 5196c39cdba4..000000000000 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ /dev/null | |||
@@ -1,483 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2x01.c | ||
3 | * | ||
4 | * Code common to Intel IXDP2401 and IXDP2801 platforms | ||
5 | * | ||
6 | * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002-2003 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/serial.h> | ||
28 | #include <linux/tty.h> | ||
29 | #include <linux/serial_core.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/serial_8250.h> | ||
32 | #include <linux/io.h> | ||
33 | |||
34 | #include <asm/irq.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/page.h> | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | |||
40 | #include <asm/mach/pci.h> | ||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/irq.h> | ||
43 | #include <asm/mach/time.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/flash.h> | ||
46 | |||
47 | /************************************************************************* | ||
48 | * IXDP2x01 IRQ Handling | ||
49 | *************************************************************************/ | ||
50 | static void ixdp2x01_irq_mask(struct irq_data *d) | ||
51 | { | ||
52 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, | ||
53 | IXP2000_BOARD_IRQ_MASK(d->irq)); | ||
54 | } | ||
55 | |||
56 | static void ixdp2x01_irq_unmask(struct irq_data *d) | ||
57 | { | ||
58 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, | ||
59 | IXP2000_BOARD_IRQ_MASK(d->irq)); | ||
60 | } | ||
61 | |||
62 | static u32 valid_irq_mask; | ||
63 | |||
64 | static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
65 | { | ||
66 | u32 ex_interrupt; | ||
67 | int i; | ||
68 | |||
69 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
70 | |||
71 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; | ||
72 | |||
73 | if (!ex_interrupt) { | ||
74 | printk(KERN_ERR "Spurious IXDP2X01 CPLD interrupt!\n"); | ||
75 | return; | ||
76 | } | ||
77 | |||
78 | for (i = 0; i < IXP2000_BOARD_IRQS; i++) { | ||
79 | if (ex_interrupt & (1 << i)) { | ||
80 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | ||
81 | generic_handle_irq(cpld_irq); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
86 | } | ||
87 | |||
88 | static struct irq_chip ixdp2x01_irq_chip = { | ||
89 | .irq_mask = ixdp2x01_irq_mask, | ||
90 | .irq_ack = ixdp2x01_irq_mask, | ||
91 | .irq_unmask = ixdp2x01_irq_unmask | ||
92 | }; | ||
93 | |||
94 | /* | ||
95 | * We only do anything if we are the master NPU on the board. | ||
96 | * The slave NPU only has the ethernet chip going directly to | ||
97 | * the PCIB interrupt input. | ||
98 | */ | ||
99 | void __init ixdp2x01_init_irq(void) | ||
100 | { | ||
101 | int irq = 0; | ||
102 | |||
103 | /* initialize chip specific interrupts */ | ||
104 | ixp2000_init_irq(); | ||
105 | |||
106 | if (machine_is_ixdp2401()) | ||
107 | valid_irq_mask = IXDP2401_VALID_IRQ_MASK; | ||
108 | else | ||
109 | valid_irq_mask = IXDP2801_VALID_IRQ_MASK; | ||
110 | |||
111 | /* Mask all interrupts from CPLD, disable simulation */ | ||
112 | ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff); | ||
113 | ixp2000_reg_wrb(IXDP2X01_INT_SIM_REG, 0); | ||
114 | |||
115 | for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) { | ||
116 | if (irq & valid_irq_mask) { | ||
117 | irq_set_chip_and_handler(irq, &ixdp2x01_irq_chip, | ||
118 | handle_level_irq); | ||
119 | set_irq_flags(irq, IRQF_VALID); | ||
120 | } else { | ||
121 | set_irq_flags(irq, 0); | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /* Hook into PCI interrupts */ | ||
126 | irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler); | ||
127 | } | ||
128 | |||
129 | |||
130 | /************************************************************************* | ||
131 | * IXDP2x01 memory map | ||
132 | *************************************************************************/ | ||
133 | static struct map_desc ixdp2x01_io_desc __initdata = { | ||
134 | .virtual = IXDP2X01_VIRT_CPLD_BASE, | ||
135 | .pfn = __phys_to_pfn(IXDP2X01_PHYS_CPLD_BASE), | ||
136 | .length = IXDP2X01_CPLD_REGION_SIZE, | ||
137 | .type = MT_DEVICE | ||
138 | }; | ||
139 | |||
140 | static void __init ixdp2x01_map_io(void) | ||
141 | { | ||
142 | ixp2000_map_io(); | ||
143 | iotable_init(&ixdp2x01_io_desc, 1); | ||
144 | } | ||
145 | |||
146 | |||
147 | /************************************************************************* | ||
148 | * IXDP2x01 serial ports | ||
149 | *************************************************************************/ | ||
150 | static struct plat_serial8250_port ixdp2x01_serial_port1[] = { | ||
151 | { | ||
152 | .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE, | ||
153 | .membase = (char *)IXDP2X01_UART1_VIRT_BASE, | ||
154 | .irq = IRQ_IXDP2X01_UART1, | ||
155 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
156 | .iotype = UPIO_MEM32, | ||
157 | .regshift = 2, | ||
158 | .uartclk = IXDP2X01_UART_CLK, | ||
159 | }, | ||
160 | { } | ||
161 | }; | ||
162 | |||
163 | static struct resource ixdp2x01_uart_resource1 = { | ||
164 | .start = IXDP2X01_UART1_PHYS_BASE, | ||
165 | .end = IXDP2X01_UART1_PHYS_BASE + 0xffff, | ||
166 | .flags = IORESOURCE_MEM, | ||
167 | }; | ||
168 | |||
169 | static struct platform_device ixdp2x01_serial_device1 = { | ||
170 | .name = "serial8250", | ||
171 | .id = PLAT8250_DEV_PLATFORM1, | ||
172 | .dev = { | ||
173 | .platform_data = ixdp2x01_serial_port1, | ||
174 | }, | ||
175 | .num_resources = 1, | ||
176 | .resource = &ixdp2x01_uart_resource1, | ||
177 | }; | ||
178 | |||
179 | static struct plat_serial8250_port ixdp2x01_serial_port2[] = { | ||
180 | { | ||
181 | .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE, | ||
182 | .membase = (char *)IXDP2X01_UART2_VIRT_BASE, | ||
183 | .irq = IRQ_IXDP2X01_UART2, | ||
184 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
185 | .iotype = UPIO_MEM32, | ||
186 | .regshift = 2, | ||
187 | .uartclk = IXDP2X01_UART_CLK, | ||
188 | }, | ||
189 | { } | ||
190 | }; | ||
191 | |||
192 | static struct resource ixdp2x01_uart_resource2 = { | ||
193 | .start = IXDP2X01_UART2_PHYS_BASE, | ||
194 | .end = IXDP2X01_UART2_PHYS_BASE + 0xffff, | ||
195 | .flags = IORESOURCE_MEM, | ||
196 | }; | ||
197 | |||
198 | static struct platform_device ixdp2x01_serial_device2 = { | ||
199 | .name = "serial8250", | ||
200 | .id = PLAT8250_DEV_PLATFORM2, | ||
201 | .dev = { | ||
202 | .platform_data = ixdp2x01_serial_port2, | ||
203 | }, | ||
204 | .num_resources = 1, | ||
205 | .resource = &ixdp2x01_uart_resource2, | ||
206 | }; | ||
207 | |||
208 | static void ixdp2x01_uart_init(void) | ||
209 | { | ||
210 | platform_device_register(&ixdp2x01_serial_device1); | ||
211 | platform_device_register(&ixdp2x01_serial_device2); | ||
212 | } | ||
213 | |||
214 | |||
215 | /************************************************************************* | ||
216 | * IXDP2x01 timer tick configuration | ||
217 | *************************************************************************/ | ||
218 | static unsigned int ixdp2x01_clock; | ||
219 | |||
220 | static int __init ixdp2x01_clock_setup(char *str) | ||
221 | { | ||
222 | ixdp2x01_clock = simple_strtoul(str, NULL, 10); | ||
223 | |||
224 | return 1; | ||
225 | } | ||
226 | |||
227 | __setup("ixdp2x01_clock=", ixdp2x01_clock_setup); | ||
228 | |||
229 | static void __init ixdp2x01_timer_init(void) | ||
230 | { | ||
231 | if (!ixdp2x01_clock) | ||
232 | ixdp2x01_clock = 50000000; | ||
233 | |||
234 | ixp2000_init_time(ixdp2x01_clock); | ||
235 | } | ||
236 | |||
237 | static struct sys_timer ixdp2x01_timer = { | ||
238 | .init = ixdp2x01_timer_init, | ||
239 | .offset = ixp2000_gettimeoffset, | ||
240 | }; | ||
241 | |||
242 | /************************************************************************* | ||
243 | * IXDP2x01 PCI | ||
244 | *************************************************************************/ | ||
245 | void __init ixdp2x01_pci_preinit(void) | ||
246 | { | ||
247 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000); | ||
248 | ixp2000_pci_preinit(); | ||
249 | pcibios_setup("firmware"); | ||
250 | } | ||
251 | |||
252 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | ||
253 | |||
254 | static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
255 | u8 pin) | ||
256 | { | ||
257 | u8 bus = dev->bus->number; | ||
258 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | ||
259 | struct pci_bus *tmp_bus = dev->bus; | ||
260 | |||
261 | /* Primary bus, no interrupts here */ | ||
262 | if (bus == 0) { | ||
263 | return -1; | ||
264 | } | ||
265 | |||
266 | /* Lookup first leaf in bus tree */ | ||
267 | while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) { | ||
268 | tmp_bus = tmp_bus->parent; | ||
269 | } | ||
270 | |||
271 | /* Select between known bridges */ | ||
272 | switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) { | ||
273 | /* Device is located after first MB bridge */ | ||
274 | case 0x0008: | ||
275 | if (tmp_bus == dev->bus) { | ||
276 | /* Device is located directly after first MB bridge */ | ||
277 | switch (devpin) { | ||
278 | case DEVPIN(1, 1): /* Onboard 82546 ch 0 */ | ||
279 | if (machine_is_ixdp2401()) | ||
280 | return IRQ_IXDP2401_INTA_82546; | ||
281 | return -1; | ||
282 | case DEVPIN(1, 2): /* Onboard 82546 ch 1 */ | ||
283 | if (machine_is_ixdp2401()) | ||
284 | return IRQ_IXDP2401_INTB_82546; | ||
285 | return -1; | ||
286 | case DEVPIN(0, 1): /* PMC INTA# */ | ||
287 | return IRQ_IXDP2X01_SPCI_PMC_INTA; | ||
288 | case DEVPIN(0, 2): /* PMC INTB# */ | ||
289 | return IRQ_IXDP2X01_SPCI_PMC_INTB; | ||
290 | case DEVPIN(0, 3): /* PMC INTC# */ | ||
291 | return IRQ_IXDP2X01_SPCI_PMC_INTC; | ||
292 | case DEVPIN(0, 4): /* PMC INTD# */ | ||
293 | return IRQ_IXDP2X01_SPCI_PMC_INTD; | ||
294 | } | ||
295 | } | ||
296 | break; | ||
297 | case 0x0010: | ||
298 | if (tmp_bus == dev->bus) { | ||
299 | /* Device is located directly after second MB bridge */ | ||
300 | /* Secondary bus of second bridge */ | ||
301 | switch (devpin) { | ||
302 | case DEVPIN(0, 1): /* DB#0 */ | ||
303 | return IRQ_IXDP2X01_SPCI_DB_0; | ||
304 | case DEVPIN(1, 1): /* DB#1 */ | ||
305 | return IRQ_IXDP2X01_SPCI_DB_1; | ||
306 | } | ||
307 | } else { | ||
308 | /* Device is located indirectly after second MB bridge */ | ||
309 | /* Not supported now */ | ||
310 | } | ||
311 | break; | ||
312 | } | ||
313 | |||
314 | return -1; | ||
315 | } | ||
316 | |||
317 | |||
318 | static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys) | ||
319 | { | ||
320 | sys->mem_offset = 0xe0000000; | ||
321 | |||
322 | if (machine_is_ixdp2801() || machine_is_ixdp28x5()) | ||
323 | sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16); | ||
324 | |||
325 | return ixp2000_pci_setup(nr, sys); | ||
326 | } | ||
327 | |||
328 | struct hw_pci ixdp2x01_pci __initdata = { | ||
329 | .nr_controllers = 1, | ||
330 | .setup = ixdp2x01_pci_setup, | ||
331 | .preinit = ixdp2x01_pci_preinit, | ||
332 | .scan = ixp2000_pci_scan_bus, | ||
333 | .map_irq = ixdp2x01_pci_map_irq, | ||
334 | }; | ||
335 | |||
336 | int __init ixdp2x01_pci_init(void) | ||
337 | { | ||
338 | if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\ | ||
339 | machine_is_ixdp28x5()) | ||
340 | pci_common_init(&ixdp2x01_pci); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | |||
345 | subsys_initcall(ixdp2x01_pci_init); | ||
346 | |||
347 | /************************************************************************* | ||
348 | * IXDP2x01 Machine Initialization | ||
349 | *************************************************************************/ | ||
350 | static struct flash_platform_data ixdp2x01_flash_platform_data = { | ||
351 | .map_name = "cfi_probe", | ||
352 | .width = 1, | ||
353 | }; | ||
354 | |||
355 | static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs) | ||
356 | { | ||
357 | ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG, | ||
358 | ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN)); | ||
359 | return (ofs & IXDP2X01_FLASH_WINDOW_MASK); | ||
360 | } | ||
361 | |||
362 | static struct ixp2000_flash_data ixdp2x01_flash_data = { | ||
363 | .platform_data = &ixdp2x01_flash_platform_data, | ||
364 | .bank_setup = ixdp2x01_flash_bank_setup | ||
365 | }; | ||
366 | |||
367 | static struct resource ixdp2x01_flash_resource = { | ||
368 | .start = 0xc4000000, | ||
369 | .end = 0xc4000000 + 0x01ffffff, | ||
370 | .flags = IORESOURCE_MEM, | ||
371 | }; | ||
372 | |||
373 | static struct platform_device ixdp2x01_flash = { | ||
374 | .name = "IXP2000-Flash", | ||
375 | .id = 0, | ||
376 | .dev = { | ||
377 | .platform_data = &ixdp2x01_flash_data, | ||
378 | }, | ||
379 | .num_resources = 1, | ||
380 | .resource = &ixdp2x01_flash_resource, | ||
381 | }; | ||
382 | |||
383 | static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = { | ||
384 | .sda_pin = IXDP2X01_GPIO_SDA, | ||
385 | .scl_pin = IXDP2X01_GPIO_SCL, | ||
386 | }; | ||
387 | |||
388 | static struct platform_device ixdp2x01_i2c_controller = { | ||
389 | .name = "IXP2000-I2C", | ||
390 | .id = 0, | ||
391 | .dev = { | ||
392 | .platform_data = &ixdp2x01_i2c_gpio_pins, | ||
393 | }, | ||
394 | .num_resources = 0 | ||
395 | }; | ||
396 | |||
397 | static struct platform_device *ixdp2x01_devices[] __initdata = { | ||
398 | &ixdp2x01_flash, | ||
399 | &ixdp2x01_i2c_controller | ||
400 | }; | ||
401 | |||
402 | static void __init ixdp2x01_init_machine(void) | ||
403 | { | ||
404 | ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG, | ||
405 | (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN)); | ||
406 | |||
407 | ixdp2x01_flash_data.nr_banks = | ||
408 | ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); | ||
409 | |||
410 | platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); | ||
411 | ixp2000_uart_init(); | ||
412 | ixdp2x01_uart_init(); | ||
413 | } | ||
414 | |||
415 | static void ixdp2401_restart(char mode, const char *cmd) | ||
416 | { | ||
417 | /* | ||
418 | * Reset flash banking register so that we are pointing at | ||
419 | * RedBoot bank. | ||
420 | */ | ||
421 | ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, | ||
422 | ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | ||
423 | | IXDP2X01_CPLD_FLASH_INTERN)); | ||
424 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff); | ||
425 | |||
426 | ixp2000_restart(mode, cmd); | ||
427 | } | ||
428 | |||
429 | static void ixdp280x_restart(char mode, const char *cmd) | ||
430 | { | ||
431 | /* | ||
432 | * On IXDP2801 we need to write this magic sequence to the CPLD | ||
433 | * to cause a complete reset of the CPU and all external devices | ||
434 | * and move the flash bank register back to 0. | ||
435 | */ | ||
436 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | ||
437 | |||
438 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | ||
439 | ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg); | ||
440 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000); | ||
441 | |||
442 | ixp2000_restart(mode, cmd); | ||
443 | } | ||
444 | |||
445 | #ifdef CONFIG_ARCH_IXDP2401 | ||
446 | MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") | ||
447 | /* Maintainer: MontaVista Software, Inc. */ | ||
448 | .atag_offset = 0x100, | ||
449 | .map_io = ixdp2x01_map_io, | ||
450 | .init_irq = ixdp2x01_init_irq, | ||
451 | .timer = &ixdp2x01_timer, | ||
452 | .init_machine = ixdp2x01_init_machine, | ||
453 | .restart = ixdp2401_restart, | ||
454 | MACHINE_END | ||
455 | #endif | ||
456 | |||
457 | #ifdef CONFIG_ARCH_IXDP2801 | ||
458 | MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") | ||
459 | /* Maintainer: MontaVista Software, Inc. */ | ||
460 | .atag_offset = 0x100, | ||
461 | .map_io = ixdp2x01_map_io, | ||
462 | .init_irq = ixdp2x01_init_irq, | ||
463 | .timer = &ixdp2x01_timer, | ||
464 | .init_machine = ixdp2x01_init_machine, | ||
465 | .restart = ixdp280x_restart, | ||
466 | MACHINE_END | ||
467 | |||
468 | /* | ||
469 | * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel | ||
470 | * changed the machine ID in the bootloader | ||
471 | */ | ||
472 | MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform") | ||
473 | /* Maintainer: MontaVista Software, Inc. */ | ||
474 | .atag_offset = 0x100, | ||
475 | .map_io = ixdp2x01_map_io, | ||
476 | .init_irq = ixdp2x01_init_irq, | ||
477 | .timer = &ixdp2x01_timer, | ||
478 | .init_machine = ixdp2x01_init_machine, | ||
479 | .restart = ixdp280x_restart, | ||
480 | MACHINE_END | ||
481 | #endif | ||
482 | |||
483 | |||
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c deleted file mode 100644 index 9c02de932fac..000000000000 --- a/arch/arm/mach-ixp2000/pci.c +++ /dev/null | |||
@@ -1,252 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/pci.c | ||
3 | * | ||
4 | * PCI routines for IXDP2400/IXDP2800 boards | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintained by: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | |||
18 | #include <linux/sched.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/pci.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/mm.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/ioport.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/io.h> | ||
27 | |||
28 | #include <asm/irq.h> | ||
29 | #include <mach/hardware.h> | ||
30 | |||
31 | #include <asm/mach/pci.h> | ||
32 | |||
33 | static volatile int pci_master_aborts = 0; | ||
34 | |||
35 | static int clear_master_aborts(void); | ||
36 | |||
37 | u32 * | ||
38 | ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) | ||
39 | { | ||
40 | u32 *paddress; | ||
41 | |||
42 | if (PCI_SLOT(devfn) > 7) | ||
43 | return 0; | ||
44 | |||
45 | /* Must be dword aligned */ | ||
46 | where &= ~3; | ||
47 | |||
48 | /* | ||
49 | * For top bus, generate type 0, else type 1 | ||
50 | */ | ||
51 | if (!bus_nr) { | ||
52 | /* only bits[23:16] are used for IDSEL */ | ||
53 | paddress = (u32 *) (IXP2000_PCI_CFG0_VIRT_BASE | ||
54 | | (1 << (PCI_SLOT(devfn) + 16)) | ||
55 | | (PCI_FUNC(devfn) << 8) | where); | ||
56 | } else { | ||
57 | paddress = (u32 *) (IXP2000_PCI_CFG1_VIRT_BASE | ||
58 | | (bus_nr << 16) | ||
59 | | (PCI_SLOT(devfn) << 11) | ||
60 | | (PCI_FUNC(devfn) << 8) | where); | ||
61 | } | ||
62 | |||
63 | return paddress; | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes. | ||
68 | * 0 and 3 are not valid indexes... | ||
69 | */ | ||
70 | static u32 bytemask[] = { | ||
71 | /*0*/ 0, | ||
72 | /*1*/ 0xff, | ||
73 | /*2*/ 0xffff, | ||
74 | /*3*/ 0, | ||
75 | /*4*/ 0xffffffff, | ||
76 | }; | ||
77 | |||
78 | |||
79 | int ixp2000_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
80 | int size, u32 *value) | ||
81 | { | ||
82 | u32 n; | ||
83 | u32 *addr; | ||
84 | |||
85 | n = where % 4; | ||
86 | |||
87 | addr = ixp2000_pci_config_addr(bus->number, devfn, where); | ||
88 | if (!addr) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | |||
91 | pci_master_aborts = 0; | ||
92 | *value = (*addr >> (8*n)) & bytemask[size]; | ||
93 | if (pci_master_aborts) { | ||
94 | pci_master_aborts = 0; | ||
95 | *value = 0xffffffff; | ||
96 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
97 | } | ||
98 | |||
99 | return PCIBIOS_SUCCESSFUL; | ||
100 | } | ||
101 | |||
102 | /* | ||
103 | * We don't do error checks by calling clear_master_aborts() b/c the | ||
104 | * assumption is that the caller did a read first to make sure a device | ||
105 | * exists. | ||
106 | */ | ||
107 | int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
108 | int size, u32 value) | ||
109 | { | ||
110 | u32 mask; | ||
111 | u32 *addr; | ||
112 | u32 temp; | ||
113 | |||
114 | mask = ~(bytemask[size] << ((where % 0x4) * 8)); | ||
115 | addr = ixp2000_pci_config_addr(bus->number, devfn, where); | ||
116 | if (!addr) | ||
117 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
118 | temp = (u32) (value) << ((where % 0x4) * 8); | ||
119 | *addr = (*addr & mask) | temp; | ||
120 | |||
121 | clear_master_aborts(); | ||
122 | |||
123 | return PCIBIOS_SUCCESSFUL; | ||
124 | } | ||
125 | |||
126 | |||
127 | static struct pci_ops ixp2000_pci_ops = { | ||
128 | .read = ixp2000_pci_read_config, | ||
129 | .write = ixp2000_pci_write_config | ||
130 | }; | ||
131 | |||
132 | struct pci_bus *ixp2000_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
133 | { | ||
134 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp2000_pci_ops, | ||
135 | sysdata, &sysdata->resources); | ||
136 | } | ||
137 | |||
138 | |||
139 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
140 | { | ||
141 | |||
142 | volatile u32 temp; | ||
143 | unsigned long flags; | ||
144 | |||
145 | pci_master_aborts = 1; | ||
146 | |||
147 | local_irq_save(flags); | ||
148 | temp = *(IXP2000_PCI_CONTROL); | ||
149 | if (temp & ((1 << 8) | (1 << 5))) { | ||
150 | ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp); | ||
151 | } | ||
152 | |||
153 | temp = *(IXP2000_PCI_CMDSTAT); | ||
154 | if (temp & (1 << 29)) { | ||
155 | while (temp & (1 << 29)) { | ||
156 | ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); | ||
157 | temp = *(IXP2000_PCI_CMDSTAT); | ||
158 | } | ||
159 | } | ||
160 | local_irq_restore(flags); | ||
161 | |||
162 | /* | ||
163 | * If it was an imprecise abort, then we need to correct the | ||
164 | * return address to be _after_ the instruction. | ||
165 | */ | ||
166 | if (fsr & (1 << 10)) | ||
167 | regs->ARM_pc += 4; | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | int | ||
173 | clear_master_aborts(void) | ||
174 | { | ||
175 | volatile u32 temp; | ||
176 | unsigned long flags; | ||
177 | |||
178 | local_irq_save(flags); | ||
179 | temp = *(IXP2000_PCI_CONTROL); | ||
180 | if (temp & ((1 << 8) | (1 << 5))) { | ||
181 | ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp); | ||
182 | } | ||
183 | |||
184 | temp = *(IXP2000_PCI_CMDSTAT); | ||
185 | if (temp & (1 << 29)) { | ||
186 | while (temp & (1 << 29)) { | ||
187 | ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); | ||
188 | temp = *(IXP2000_PCI_CMDSTAT); | ||
189 | } | ||
190 | } | ||
191 | local_irq_restore(flags); | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | void __init | ||
197 | ixp2000_pci_preinit(void) | ||
198 | { | ||
199 | pci_set_flags(0); | ||
200 | |||
201 | pcibios_min_io = 0; | ||
202 | pcibios_min_mem = 0; | ||
203 | |||
204 | #ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO | ||
205 | /* | ||
206 | * Configure the PCI unit to properly byteswap I/O transactions, | ||
207 | * and verify that it worked. | ||
208 | */ | ||
209 | ixp2000_reg_write(IXP2000_PCI_CONTROL, | ||
210 | (*IXP2000_PCI_CONTROL | PCI_CONTROL_IEE)); | ||
211 | |||
212 | if ((*IXP2000_PCI_CONTROL & PCI_CONTROL_IEE) == 0) | ||
213 | panic("IXP2000: PCI I/O is broken on this ixp model, and " | ||
214 | "the needed workaround has not been configured in"); | ||
215 | #endif | ||
216 | |||
217 | hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS, 0, | ||
218 | "PCI config cycle to non-existent device"); | ||
219 | } | ||
220 | |||
221 | |||
222 | /* | ||
223 | * IXP2000 systems often have large resource requirements, so we just | ||
224 | * use our own resource space. | ||
225 | */ | ||
226 | static struct resource ixp2000_pci_mem_space = { | ||
227 | .start = 0xe0000000, | ||
228 | .end = 0xffffffff, | ||
229 | .flags = IORESOURCE_MEM, | ||
230 | .name = "PCI Mem Space" | ||
231 | }; | ||
232 | |||
233 | static struct resource ixp2000_pci_io_space = { | ||
234 | .start = 0x00010000, | ||
235 | .end = 0x0001ffff, | ||
236 | .flags = IORESOURCE_IO, | ||
237 | .name = "PCI I/O Space" | ||
238 | }; | ||
239 | |||
240 | int ixp2000_pci_setup(int nr, struct pci_sys_data *sys) | ||
241 | { | ||
242 | if (nr >= 1) | ||
243 | return 0; | ||
244 | |||
245 | pci_add_resource_offset(&sys->resources, | ||
246 | &ixp2000_pci_io_space, sys->io_offset); | ||
247 | pci_add_resource_offset(&sys->resources, | ||
248 | &ixp2000_pci_mem_space, sys->mem_offset); | ||
249 | |||
250 | return 1; | ||
251 | } | ||
252 | |||
diff --git a/arch/arm/mach-ixp23xx/Kconfig b/arch/arm/mach-ixp23xx/Kconfig deleted file mode 100644 index 982670ec3866..000000000000 --- a/arch/arm/mach-ixp23xx/Kconfig +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | if ARCH_IXP23XX | ||
2 | |||
3 | config ARCH_SUPPORTS_BIG_ENDIAN | ||
4 | bool | ||
5 | default y | ||
6 | |||
7 | menu "Intel IXP23xx Implementation Options" | ||
8 | |||
9 | comment "IXP23xx Platforms" | ||
10 | |||
11 | config MACH_ESPRESSO | ||
12 | bool "Support IP Fabrics Double Espresso platform" | ||
13 | help | ||
14 | |||
15 | config MACH_IXDP2351 | ||
16 | bool "Support Intel IXDP2351 platform" | ||
17 | help | ||
18 | |||
19 | config MACH_ROADRUNNER | ||
20 | bool "Support ADI RoadRunner platform" | ||
21 | help | ||
22 | |||
23 | endmenu | ||
24 | |||
25 | endif | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile b/arch/arm/mach-ixp23xx/Makefile deleted file mode 100644 index 288b371b6d03..000000000000 --- a/arch/arm/mach-ixp23xx/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o pci.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_MACH_ESPRESSO) += espresso.o | ||
10 | obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o | ||
11 | obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile.boot b/arch/arm/mach-ixp23xx/Makefile.boot deleted file mode 100644 index 44fb4a717c3f..000000000000 --- a/arch/arm/mach-ixp23xx/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y += 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c deleted file mode 100644 index d34542425990..000000000000 --- a/arch/arm/mach-ixp23xx/core.c +++ /dev/null | |||
@@ -1,455 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/core.c | ||
3 | * | ||
4 | * Core routines for IXP23xx chips | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/tty.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/serial_8250.h> | ||
26 | #include <linux/serial_core.h> | ||
27 | #include <linux/device.h> | ||
28 | #include <linux/mm.h> | ||
29 | #include <linux/time.h> | ||
30 | #include <linux/timex.h> | ||
31 | |||
32 | #include <asm/types.h> | ||
33 | #include <asm/setup.h> | ||
34 | #include <asm/memory.h> | ||
35 | #include <mach/hardware.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/tlbflush.h> | ||
38 | #include <asm/pgtable.h> | ||
39 | #include <asm/system_misc.h> | ||
40 | |||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/time.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | |||
46 | |||
47 | /************************************************************************* | ||
48 | * Chip specific mappings shared by all IXP23xx systems | ||
49 | *************************************************************************/ | ||
50 | static struct map_desc ixp23xx_io_desc[] __initdata = { | ||
51 | { /* XSI-CPP CSRs */ | ||
52 | .virtual = IXP23XX_XSI2CPP_CSR_VIRT, | ||
53 | .pfn = __phys_to_pfn(IXP23XX_XSI2CPP_CSR_PHYS), | ||
54 | .length = IXP23XX_XSI2CPP_CSR_SIZE, | ||
55 | .type = MT_DEVICE, | ||
56 | }, { /* Expansion Bus Config */ | ||
57 | .virtual = IXP23XX_EXP_CFG_VIRT, | ||
58 | .pfn = __phys_to_pfn(IXP23XX_EXP_CFG_PHYS), | ||
59 | .length = IXP23XX_EXP_CFG_SIZE, | ||
60 | .type = MT_DEVICE, | ||
61 | }, { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACS,.... */ | ||
62 | .virtual = IXP23XX_PERIPHERAL_VIRT, | ||
63 | .pfn = __phys_to_pfn(IXP23XX_PERIPHERAL_PHYS), | ||
64 | .length = IXP23XX_PERIPHERAL_SIZE, | ||
65 | .type = MT_DEVICE, | ||
66 | }, { /* CAP CSRs */ | ||
67 | .virtual = IXP23XX_CAP_CSR_VIRT, | ||
68 | .pfn = __phys_to_pfn(IXP23XX_CAP_CSR_PHYS), | ||
69 | .length = IXP23XX_CAP_CSR_SIZE, | ||
70 | .type = MT_DEVICE, | ||
71 | }, { /* MSF CSRs */ | ||
72 | .virtual = IXP23XX_MSF_CSR_VIRT, | ||
73 | .pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS), | ||
74 | .length = IXP23XX_MSF_CSR_SIZE, | ||
75 | .type = MT_DEVICE, | ||
76 | }, { /* PCI I/O Space */ | ||
77 | .virtual = IXP23XX_PCI_IO_VIRT, | ||
78 | .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS), | ||
79 | .length = IXP23XX_PCI_IO_SIZE, | ||
80 | .type = MT_DEVICE, | ||
81 | }, { /* PCI Config Space */ | ||
82 | .virtual = IXP23XX_PCI_CFG_VIRT, | ||
83 | .pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS), | ||
84 | .length = IXP23XX_PCI_CFG_SIZE, | ||
85 | .type = MT_DEVICE, | ||
86 | }, { /* PCI local CFG CSRs */ | ||
87 | .virtual = IXP23XX_PCI_CREG_VIRT, | ||
88 | .pfn = __phys_to_pfn(IXP23XX_PCI_CREG_PHYS), | ||
89 | .length = IXP23XX_PCI_CREG_SIZE, | ||
90 | .type = MT_DEVICE, | ||
91 | }, { /* PCI MEM Space */ | ||
92 | .virtual = IXP23XX_PCI_MEM_VIRT, | ||
93 | .pfn = __phys_to_pfn(IXP23XX_PCI_MEM_PHYS), | ||
94 | .length = IXP23XX_PCI_MEM_SIZE, | ||
95 | .type = MT_DEVICE, | ||
96 | } | ||
97 | }; | ||
98 | |||
99 | void __init ixp23xx_map_io(void) | ||
100 | { | ||
101 | iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc)); | ||
102 | } | ||
103 | |||
104 | |||
105 | /*************************************************************************** | ||
106 | * IXP23xx Interrupt Handling | ||
107 | ***************************************************************************/ | ||
108 | enum ixp23xx_irq_type { | ||
109 | IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE | ||
110 | }; | ||
111 | |||
112 | static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type); | ||
113 | |||
114 | static int ixp23xx_irq_set_type(struct irq_data *d, unsigned int type) | ||
115 | { | ||
116 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; | ||
117 | u32 int_style; | ||
118 | enum ixp23xx_irq_type irq_type; | ||
119 | volatile u32 *int_reg; | ||
120 | |||
121 | /* | ||
122 | * Only GPIOs 6-15 are wired to interrupts on IXP23xx | ||
123 | */ | ||
124 | if (line < 6 || line > 15) | ||
125 | return -EINVAL; | ||
126 | |||
127 | switch (type) { | ||
128 | case IRQ_TYPE_EDGE_BOTH: | ||
129 | int_style = IXP23XX_GPIO_STYLE_TRANSITIONAL; | ||
130 | irq_type = IXP23XX_IRQ_EDGE; | ||
131 | break; | ||
132 | case IRQ_TYPE_EDGE_RISING: | ||
133 | int_style = IXP23XX_GPIO_STYLE_RISING_EDGE; | ||
134 | irq_type = IXP23XX_IRQ_EDGE; | ||
135 | break; | ||
136 | case IRQ_TYPE_EDGE_FALLING: | ||
137 | int_style = IXP23XX_GPIO_STYLE_FALLING_EDGE; | ||
138 | irq_type = IXP23XX_IRQ_EDGE; | ||
139 | break; | ||
140 | case IRQ_TYPE_LEVEL_HIGH: | ||
141 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_HIGH; | ||
142 | irq_type = IXP23XX_IRQ_LEVEL; | ||
143 | break; | ||
144 | case IRQ_TYPE_LEVEL_LOW: | ||
145 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_LOW; | ||
146 | irq_type = IXP23XX_IRQ_LEVEL; | ||
147 | break; | ||
148 | default: | ||
149 | return -EINVAL; | ||
150 | } | ||
151 | |||
152 | ixp23xx_config_irq(d->irq, irq_type); | ||
153 | |||
154 | if (line >= 8) { /* pins 8-15 */ | ||
155 | line -= 8; | ||
156 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT2R; | ||
157 | } else { /* pins 0-7 */ | ||
158 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT1R; | ||
159 | } | ||
160 | |||
161 | /* | ||
162 | * Clear pending interrupts | ||
163 | */ | ||
164 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
165 | |||
166 | /* Clear the style for the appropriate pin */ | ||
167 | *int_reg &= ~(IXP23XX_GPIO_STYLE_MASK << | ||
168 | (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
169 | |||
170 | /* Set the new style */ | ||
171 | *int_reg |= (int_style << (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
172 | |||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | static void ixp23xx_irq_mask(struct irq_data *d) | ||
177 | { | ||
178 | volatile unsigned long *intr_reg; | ||
179 | unsigned int irq = d->irq; | ||
180 | |||
181 | if (irq >= 56) | ||
182 | irq += 8; | ||
183 | |||
184 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
185 | *intr_reg &= ~(1 << (irq % 32)); | ||
186 | } | ||
187 | |||
188 | static void ixp23xx_irq_ack(struct irq_data *d) | ||
189 | { | ||
190 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; | ||
191 | |||
192 | if ((line < 6) || (line > 15)) | ||
193 | return; | ||
194 | |||
195 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
196 | } | ||
197 | |||
198 | /* | ||
199 | * Level triggered interrupts on GPIO lines can only be cleared when the | ||
200 | * interrupt condition disappears. | ||
201 | */ | ||
202 | static void ixp23xx_irq_level_unmask(struct irq_data *d) | ||
203 | { | ||
204 | volatile unsigned long *intr_reg; | ||
205 | unsigned int irq = d->irq; | ||
206 | |||
207 | ixp23xx_irq_ack(d); | ||
208 | |||
209 | if (irq >= 56) | ||
210 | irq += 8; | ||
211 | |||
212 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
213 | *intr_reg |= (1 << (irq % 32)); | ||
214 | } | ||
215 | |||
216 | static void ixp23xx_irq_edge_unmask(struct irq_data *d) | ||
217 | { | ||
218 | volatile unsigned long *intr_reg; | ||
219 | unsigned int irq = d->irq; | ||
220 | |||
221 | if (irq >= 56) | ||
222 | irq += 8; | ||
223 | |||
224 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
225 | *intr_reg |= (1 << (irq % 32)); | ||
226 | } | ||
227 | |||
228 | static struct irq_chip ixp23xx_irq_level_chip = { | ||
229 | .irq_ack = ixp23xx_irq_mask, | ||
230 | .irq_mask = ixp23xx_irq_mask, | ||
231 | .irq_unmask = ixp23xx_irq_level_unmask, | ||
232 | .irq_set_type = ixp23xx_irq_set_type | ||
233 | }; | ||
234 | |||
235 | static struct irq_chip ixp23xx_irq_edge_chip = { | ||
236 | .irq_ack = ixp23xx_irq_ack, | ||
237 | .irq_mask = ixp23xx_irq_mask, | ||
238 | .irq_unmask = ixp23xx_irq_edge_unmask, | ||
239 | .irq_set_type = ixp23xx_irq_set_type | ||
240 | }; | ||
241 | |||
242 | static void ixp23xx_pci_irq_mask(struct irq_data *d) | ||
243 | { | ||
244 | unsigned int irq = d->irq; | ||
245 | |||
246 | *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
247 | } | ||
248 | |||
249 | static void ixp23xx_pci_irq_unmask(struct irq_data *d) | ||
250 | { | ||
251 | unsigned int irq = d->irq; | ||
252 | |||
253 | *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
254 | } | ||
255 | |||
256 | /* | ||
257 | * TODO: Should this just be done at ASM level? | ||
258 | */ | ||
259 | static void pci_handler(unsigned int irq, struct irq_desc *desc) | ||
260 | { | ||
261 | u32 pci_interrupt; | ||
262 | unsigned int irqno; | ||
263 | |||
264 | pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS; | ||
265 | |||
266 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
267 | |||
268 | /* See which PCI_INTA, or PCI_INTB interrupted */ | ||
269 | if (pci_interrupt & (1 << 26)) { | ||
270 | irqno = IRQ_IXP23XX_INTB; | ||
271 | } else if (pci_interrupt & (1 << 27)) { | ||
272 | irqno = IRQ_IXP23XX_INTA; | ||
273 | } else { | ||
274 | BUG(); | ||
275 | } | ||
276 | |||
277 | generic_handle_irq(irqno); | ||
278 | |||
279 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
280 | } | ||
281 | |||
282 | static struct irq_chip ixp23xx_pci_irq_chip = { | ||
283 | .irq_ack = ixp23xx_pci_irq_mask, | ||
284 | .irq_mask = ixp23xx_pci_irq_mask, | ||
285 | .irq_unmask = ixp23xx_pci_irq_unmask | ||
286 | }; | ||
287 | |||
288 | static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type) | ||
289 | { | ||
290 | switch (type) { | ||
291 | case IXP23XX_IRQ_LEVEL: | ||
292 | irq_set_chip_and_handler(irq, &ixp23xx_irq_level_chip, | ||
293 | handle_level_irq); | ||
294 | break; | ||
295 | case IXP23XX_IRQ_EDGE: | ||
296 | irq_set_chip_and_handler(irq, &ixp23xx_irq_edge_chip, | ||
297 | handle_edge_irq); | ||
298 | break; | ||
299 | } | ||
300 | set_irq_flags(irq, IRQF_VALID); | ||
301 | } | ||
302 | |||
303 | void __init ixp23xx_init_irq(void) | ||
304 | { | ||
305 | int irq; | ||
306 | |||
307 | /* Route everything to IRQ */ | ||
308 | *IXP23XX_INTR_SEL1 = 0x0; | ||
309 | *IXP23XX_INTR_SEL2 = 0x0; | ||
310 | *IXP23XX_INTR_SEL3 = 0x0; | ||
311 | *IXP23XX_INTR_SEL4 = 0x0; | ||
312 | |||
313 | /* Mask all sources */ | ||
314 | *IXP23XX_INTR_EN1 = 0x0; | ||
315 | *IXP23XX_INTR_EN2 = 0x0; | ||
316 | *IXP23XX_INTR_EN3 = 0x0; | ||
317 | *IXP23XX_INTR_EN4 = 0x0; | ||
318 | |||
319 | /* | ||
320 | * Configure all IRQs for level-sensitive operation | ||
321 | */ | ||
322 | for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) { | ||
323 | ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL); | ||
324 | } | ||
325 | |||
326 | for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) { | ||
327 | irq_set_chip_and_handler(irq, &ixp23xx_pci_irq_chip, | ||
328 | handle_level_irq); | ||
329 | set_irq_flags(irq, IRQF_VALID); | ||
330 | } | ||
331 | |||
332 | irq_set_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler); | ||
333 | } | ||
334 | |||
335 | |||
336 | /************************************************************************* | ||
337 | * Timer-tick functions for IXP23xx | ||
338 | *************************************************************************/ | ||
339 | #define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC) | ||
340 | |||
341 | static unsigned long next_jiffy_time; | ||
342 | |||
343 | static unsigned long | ||
344 | ixp23xx_gettimeoffset(void) | ||
345 | { | ||
346 | unsigned long elapsed; | ||
347 | |||
348 | elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH); | ||
349 | |||
350 | return elapsed / CLOCK_TICKS_PER_USEC; | ||
351 | } | ||
352 | |||
353 | static irqreturn_t | ||
354 | ixp23xx_timer_interrupt(int irq, void *dev_id) | ||
355 | { | ||
356 | /* Clear Pending Interrupt by writing '1' to it */ | ||
357 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
358 | while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { | ||
359 | timer_tick(); | ||
360 | next_jiffy_time += LATCH; | ||
361 | } | ||
362 | |||
363 | return IRQ_HANDLED; | ||
364 | } | ||
365 | |||
366 | static struct irqaction ixp23xx_timer_irq = { | ||
367 | .name = "IXP23xx Timer Tick", | ||
368 | .handler = ixp23xx_timer_interrupt, | ||
369 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
370 | }; | ||
371 | |||
372 | void __init ixp23xx_init_timer(void) | ||
373 | { | ||
374 | /* Clear Pending Interrupt by writing '1' to it */ | ||
375 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
376 | |||
377 | /* Setup the Timer counter value */ | ||
378 | *IXP23XX_TIMER1_RELOAD = | ||
379 | (LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE; | ||
380 | |||
381 | *IXP23XX_TIMER_CONT = 0; | ||
382 | next_jiffy_time = LATCH; | ||
383 | |||
384 | /* Connect the interrupt handler and enable the interrupt */ | ||
385 | setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq); | ||
386 | } | ||
387 | |||
388 | struct sys_timer ixp23xx_timer = { | ||
389 | .init = ixp23xx_init_timer, | ||
390 | .offset = ixp23xx_gettimeoffset, | ||
391 | }; | ||
392 | |||
393 | |||
394 | /************************************************************************* | ||
395 | * IXP23xx Platform Initialization | ||
396 | *************************************************************************/ | ||
397 | static struct resource ixp23xx_uart_resources[] = { | ||
398 | { | ||
399 | .start = IXP23XX_UART1_PHYS, | ||
400 | .end = IXP23XX_UART1_PHYS + 0x0fff, | ||
401 | .flags = IORESOURCE_MEM | ||
402 | }, { | ||
403 | .start = IXP23XX_UART2_PHYS, | ||
404 | .end = IXP23XX_UART2_PHYS + 0x0fff, | ||
405 | .flags = IORESOURCE_MEM | ||
406 | } | ||
407 | }; | ||
408 | |||
409 | static struct plat_serial8250_port ixp23xx_uart_data[] = { | ||
410 | { | ||
411 | .mapbase = IXP23XX_UART1_PHYS, | ||
412 | .membase = (char *)(IXP23XX_UART1_VIRT + 3), | ||
413 | .irq = IRQ_IXP23XX_UART1, | ||
414 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
415 | .iotype = UPIO_MEM, | ||
416 | .regshift = 2, | ||
417 | .uartclk = IXP23XX_UART_XTAL, | ||
418 | }, { | ||
419 | .mapbase = IXP23XX_UART2_PHYS, | ||
420 | .membase = (char *)(IXP23XX_UART2_VIRT + 3), | ||
421 | .irq = IRQ_IXP23XX_UART2, | ||
422 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
423 | .iotype = UPIO_MEM, | ||
424 | .regshift = 2, | ||
425 | .uartclk = IXP23XX_UART_XTAL, | ||
426 | }, | ||
427 | { }, | ||
428 | }; | ||
429 | |||
430 | static struct platform_device ixp23xx_uart = { | ||
431 | .name = "serial8250", | ||
432 | .id = 0, | ||
433 | .dev.platform_data = ixp23xx_uart_data, | ||
434 | .num_resources = 2, | ||
435 | .resource = ixp23xx_uart_resources, | ||
436 | }; | ||
437 | |||
438 | static struct platform_device *ixp23xx_devices[] __initdata = { | ||
439 | &ixp23xx_uart, | ||
440 | }; | ||
441 | |||
442 | void __init ixp23xx_sys_init(void) | ||
443 | { | ||
444 | /* by default, the idle code is disabled */ | ||
445 | disable_hlt(); | ||
446 | |||
447 | *IXP23XX_EXP_UNIT_FUSE |= 0xf; | ||
448 | platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices)); | ||
449 | } | ||
450 | |||
451 | void ixp23xx_restart(char mode, const char *cmd) | ||
452 | { | ||
453 | /* Use on-chip reset capability */ | ||
454 | *IXP23XX_RESET0 |= IXP23XX_RST_ALL; | ||
455 | } | ||
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c deleted file mode 100644 index d142d45dea12..000000000000 --- a/arch/arm/mach-ixp23xx/espresso.c +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/espresso.c | ||
3 | * | ||
4 | * Double Espresso-specific routines | ||
5 | * | ||
6 | * Author: Lennert Buytenhek <buytenh@wantstofly.org> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/serial.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/bitops.h> | ||
21 | #include <linux/ioport.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serial_core.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <linux/pci.h> | ||
27 | #include <linux/mtd/physmap.h> | ||
28 | |||
29 | #include <asm/types.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/memory.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/tlbflush.h> | ||
36 | #include <asm/pgtable.h> | ||
37 | |||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/irq.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | #include <asm/mach/pci.h> | ||
42 | |||
43 | static int __init espresso_pci_init(void) | ||
44 | { | ||
45 | if (machine_is_espresso()) | ||
46 | ixp23xx_pci_slave_init(); | ||
47 | |||
48 | return 0; | ||
49 | }; | ||
50 | subsys_initcall(espresso_pci_init); | ||
51 | |||
52 | static struct physmap_flash_data espresso_flash_data = { | ||
53 | .width = 2, | ||
54 | }; | ||
55 | |||
56 | static struct resource espresso_flash_resource = { | ||
57 | .start = 0x90000000, | ||
58 | .end = 0x91ffffff, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device espresso_flash = { | ||
63 | .name = "physmap-flash", | ||
64 | .id = 0, | ||
65 | .dev = { | ||
66 | .platform_data = &espresso_flash_data, | ||
67 | }, | ||
68 | .num_resources = 1, | ||
69 | .resource = &espresso_flash_resource, | ||
70 | }; | ||
71 | |||
72 | static void __init espresso_init(void) | ||
73 | { | ||
74 | platform_device_register(&espresso_flash); | ||
75 | |||
76 | /* | ||
77 | * Mark flash as writeable. | ||
78 | */ | ||
79 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
80 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
81 | |||
82 | ixp23xx_sys_init(); | ||
83 | } | ||
84 | |||
85 | MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso") | ||
86 | /* Maintainer: Lennert Buytenhek */ | ||
87 | .map_io = ixp23xx_map_io, | ||
88 | .init_irq = ixp23xx_init_irq, | ||
89 | .timer = &ixp23xx_timer, | ||
90 | .atag_offset = 0x100, | ||
91 | .init_machine = espresso_init, | ||
92 | .restart = ixp23xx_restart, | ||
93 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S deleted file mode 100644 index 5ff524c13744..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | #include <mach/ixp23xx.h> | ||
14 | |||
15 | .macro addruart, rp, rv, tmp | ||
16 | ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical | ||
17 | ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual | ||
18 | #ifdef __ARMEB__ | ||
19 | orr \rp, \rp, #0x00000003 | ||
20 | orr \rv, \rv, #0x00000003 | ||
21 | #endif | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S deleted file mode 100644 index 3fd2cb984e42..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/entry-macro.S | ||
3 | */ | ||
4 | |||
5 | .macro get_irqnr_preamble, base, tmp | ||
6 | .endm | ||
7 | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | ||
10 | ldr \irqnr, [\irqnr] @ get interrupt number | ||
11 | cmp \irqnr, #0x0 @ spurious interrupt ? | ||
12 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits | ||
13 | subne \irqnr, \irqnr, #1 @ convert to 0 based | ||
14 | |||
15 | #if 0 | ||
16 | cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH | ||
17 | bne 1001f | ||
18 | mov \irqnr, #IRQ_IXP23XX_INTA | ||
19 | |||
20 | ldr \irqnr, =0xf5000030 | ||
21 | |||
22 | mov \tmp, #(1<<26) | ||
23 | tst \irqnr, \tmp | ||
24 | movne \irqnr, #IRQ_IXP23XX_INTB | ||
25 | |||
26 | mov \tmp, #(1<<27) | ||
27 | tst \irqnr, \tmp | ||
28 | movne \irqnr, #IRQ_IXP23XX_INTA | ||
29 | 1001: | ||
30 | #endif | ||
31 | .endm | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/hardware.h b/arch/arm/mach-ixp23xx/include/mach/hardware.h deleted file mode 100644 index 60e55fa10238..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/hardware.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
5 | * Copyricht (C) 2005 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Hardware definitions for IXP23XX based systems | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_HARDWARE_H | ||
15 | #define __ASM_ARCH_HARDWARE_H | ||
16 | |||
17 | /* PCI IO info */ | ||
18 | |||
19 | #include "ixp23xx.h" | ||
20 | |||
21 | /* | ||
22 | * Platform helper functions | ||
23 | */ | ||
24 | #include "platform.h" | ||
25 | |||
26 | /* | ||
27 | * Platform-specific headers | ||
28 | */ | ||
29 | #include "ixdp2351.h" | ||
30 | |||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h deleted file mode 100644 index a7aceb55c130..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/io.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/io.h | ||
3 | * | ||
4 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2003-2005 Intel Corp. | ||
8 | * Copyright (C) 2005 MontaVista Software, Inc | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IO_H | ||
16 | #define __ASM_ARCH_IO_H | ||
17 | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | ||
19 | |||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/irqs.h b/arch/arm/mach-ixp23xx/include/mach/irqs.h deleted file mode 100644 index 3af33a04b8a2..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/irqs.h +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for IXP23XX based systems | ||
5 | * | ||
6 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Copyright (C) 2003-2004 Intel Corporation. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IRQS_H | ||
16 | #define __ASM_ARCH_IRQS_H | ||
17 | |||
18 | #define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1 | ||
19 | #define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS | ||
20 | |||
21 | |||
22 | #define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */ | ||
23 | #define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */ | ||
24 | #define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */ | ||
25 | #define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */ | ||
26 | #define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */ | ||
27 | #define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */ | ||
28 | #define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */ | ||
29 | #define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */ | ||
30 | #define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */ | ||
31 | #define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */ | ||
32 | #define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */ | ||
33 | #define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */ | ||
34 | #define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */ | ||
35 | #define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */ | ||
36 | #define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */ | ||
37 | #define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */ | ||
38 | #define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */ | ||
39 | #define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */ | ||
40 | #define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */ | ||
41 | #define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */ | ||
42 | #define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */ | ||
43 | #define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */ | ||
44 | #define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */ | ||
45 | #define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */ | ||
46 | #define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */ | ||
47 | #define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */ | ||
48 | #define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */ | ||
49 | #define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */ | ||
50 | #define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */ | ||
51 | #define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */ | ||
52 | #define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */ | ||
53 | #define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */ | ||
54 | #define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */ | ||
55 | #define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */ | ||
56 | #define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */ | ||
57 | #define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */ | ||
58 | #define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */ | ||
59 | #define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */ | ||
60 | #define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */ | ||
61 | #define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */ | ||
62 | #define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */ | ||
63 | #define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */ | ||
64 | #define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */ | ||
65 | #define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */ | ||
66 | #define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */ | ||
67 | #define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */ | ||
68 | #define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */ | ||
69 | #define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */ | ||
70 | #define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */ | ||
71 | #define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */ | ||
72 | #define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */ | ||
73 | #define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */ | ||
74 | #define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */ | ||
75 | #define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */ | ||
76 | #define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */ | ||
77 | #define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */ | ||
78 | #define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */ | ||
79 | #define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */ | ||
80 | #define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */ | ||
81 | #define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */ | ||
82 | #define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */ | ||
83 | #define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */ | ||
84 | #define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */ | ||
85 | #define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */ | ||
86 | #define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */ | ||
87 | #define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */ | ||
88 | #define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */ | ||
89 | #define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */ | ||
90 | #define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */ | ||
91 | #define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */ | ||
92 | #define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */ | ||
93 | #define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */ | ||
94 | #define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */ | ||
95 | #define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */ | ||
96 | #define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */ | ||
97 | #define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */ | ||
98 | #define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */ | ||
99 | #define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */ | ||
100 | #define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */ | ||
101 | #define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */ | ||
102 | #define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */ | ||
103 | #define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */ | ||
104 | #define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */ | ||
105 | #define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */ | ||
106 | #define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */ | ||
107 | #define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */ | ||
108 | #define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */ | ||
109 | #define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */ | ||
110 | #define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */ | ||
111 | #define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */ | ||
112 | #define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */ | ||
113 | #define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */ | ||
114 | #define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */ | ||
115 | #define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */ | ||
116 | #define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */ | ||
117 | #define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */ | ||
118 | #define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */ | ||
119 | #define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */ | ||
120 | #define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */ | ||
121 | #define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */ | ||
122 | #define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */ | ||
123 | #define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */ | ||
124 | #define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */ | ||
125 | #define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */ | ||
126 | #define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */ | ||
127 | #define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */ | ||
128 | #define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */ | ||
129 | #define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */ | ||
130 | #define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */ | ||
131 | #define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */ | ||
132 | #define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */ | ||
133 | #define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */ | ||
134 | #define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */ | ||
135 | #define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */ | ||
136 | #define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */ | ||
137 | #define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */ | ||
138 | #define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */ | ||
139 | #define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */ | ||
140 | #define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */ | ||
141 | #define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */ | ||
142 | |||
143 | #define NUM_IXP23XX_RAW_IRQS 120 | ||
144 | |||
145 | #define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */ | ||
146 | #define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */ | ||
147 | |||
148 | #define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1) | ||
149 | |||
150 | /* | ||
151 | * We default to 32 per-board IRQs. Increase this number if you need | ||
152 | * more, but keep it realistic. | ||
153 | */ | ||
154 | #define NR_IXP23XX_MACH_IRQS 32 | ||
155 | |||
156 | #define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS) | ||
157 | |||
158 | #define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq)) | ||
159 | |||
160 | |||
161 | /* | ||
162 | * IXDP2351-specific interrupts | ||
163 | */ | ||
164 | |||
165 | /* | ||
166 | * External PCI interrupts signaled through INTB | ||
167 | * | ||
168 | */ | ||
169 | #define IXDP2351_INTB_IRQ_BASE 0 | ||
170 | #define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0) | ||
171 | #define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1) | ||
172 | #define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2) | ||
173 | #define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3) | ||
174 | #define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4) | ||
175 | #define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5) | ||
176 | #define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6) | ||
177 | #define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7) | ||
178 | #define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8) | ||
179 | |||
180 | #define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0)) | ||
181 | #define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq)) | ||
182 | #define IXDP2351_INTB_IRQ_VALID 0x01FF | ||
183 | #define IXDP2351_INTB_IRQ_NUM 16 | ||
184 | |||
185 | /* | ||
186 | * Other external interrupts signaled through INTA | ||
187 | */ | ||
188 | #define IXDP2351_INTA_IRQ_BASE 16 | ||
189 | #define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16) | ||
190 | #define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17) | ||
191 | #define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18) | ||
192 | #define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19) | ||
193 | #define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20) | ||
194 | #define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21) | ||
195 | #define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24) | ||
196 | #define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25) | ||
197 | #define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26) | ||
198 | #define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27) | ||
199 | #define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28) | ||
200 | #define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29) | ||
201 | #define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30) | ||
202 | #define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31) | ||
203 | |||
204 | #define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16)) | ||
205 | #define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq)) | ||
206 | #define IXDP2351_INTA_IRQ_VALID 0xFF3F | ||
207 | #define IXDP2351_INTA_IRQ_NUM 16 | ||
208 | |||
209 | |||
210 | /* | ||
211 | * ADI RoadRunner IRQs | ||
212 | */ | ||
213 | #define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA | ||
214 | #define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB | ||
215 | #define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11 | ||
216 | #define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12 | ||
217 | |||
218 | /* | ||
219 | * Put new board definitions here | ||
220 | */ | ||
221 | |||
222 | |||
223 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h b/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h deleted file mode 100644 index 663951027de5..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/ixdp2351.h | ||
3 | * | ||
4 | * Register and other defines for IXDP2351 | ||
5 | * | ||
6 | * Copyright (c) 2002-2004 Intel Corp. | ||
7 | * Copytight (c) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IXDP2351_H | ||
16 | #define __ASM_ARCH_IXDP2351_H | ||
17 | |||
18 | /* | ||
19 | * NP module memory map | ||
20 | */ | ||
21 | #define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE) | ||
22 | #define IXDP2351_NP_PHYS_SIZE 0x00100000 | ||
23 | #define IXDP2351_NP_VIRT_BASE 0xeff00000 | ||
24 | |||
25 | #define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE) | ||
26 | #define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16) | ||
27 | |||
28 | #define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000) | ||
29 | |||
30 | #define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg)) | ||
31 | |||
32 | #define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00) | ||
33 | #define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02) | ||
34 | #define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04) | ||
35 | |||
36 | /* | ||
37 | * Base board module memory map | ||
38 | */ | ||
39 | |||
40 | #define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE) | ||
41 | #define IXDP2351_BB_SIZE 0x01000000 | ||
42 | #define IXDP2351_BB_BASE_VIRT (0xee000000) | ||
43 | |||
44 | #define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset) | ||
45 | |||
46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) | ||
47 | #define IXDP2351_NVRAM_SIZE (0x20000) | ||
48 | |||
49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000) | ||
50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) | ||
51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) | ||
52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) | ||
53 | #define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000) | ||
54 | #define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000) | ||
55 | |||
56 | /* | ||
57 | * On board CPLD registers | ||
58 | */ | ||
59 | #define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg)) | ||
60 | |||
61 | #define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00) | ||
62 | #define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04) | ||
63 | |||
64 | #define IXDP2351_CPLD_RESET1_MAGIC 0x55AA | ||
65 | #define IXDP2351_CPLD_RESET1_ENABLE 0x8000 | ||
66 | |||
67 | #define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08) | ||
68 | #define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10) | ||
69 | #define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14) | ||
70 | #define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18) | ||
71 | #define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C) | ||
72 | #define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */ | ||
73 | #define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */ | ||
74 | #define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */ | ||
75 | #define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */ | ||
76 | #define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28) | ||
77 | #define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C) | ||
78 | /* Interrupt bits are defined in irqs.h */ | ||
79 | #define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30) | ||
80 | #define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34) | ||
81 | |||
82 | /* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */ | ||
83 | /* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */ | ||
84 | /* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */ | ||
85 | /* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */ | ||
86 | /* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */ | ||
87 | |||
88 | |||
89 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h deleted file mode 100644 index 6d02481b1d6d..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h +++ /dev/null | |||
@@ -1,298 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/ixp23xx.h | ||
3 | * | ||
4 | * Register definitions for IXP23XX | ||
5 | * | ||
6 | * Copyright (C) 2003-2005 Intel Corporation. | ||
7 | * Copyright (C) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_IXP23XX_H | ||
17 | #define __ASM_ARCH_IXP23XX_H | ||
18 | |||
19 | /* | ||
20 | * IXP2300 linux memory map: | ||
21 | * | ||
22 | * virt phys size | ||
23 | * fffd0000 a0000000 64K XSI2CPP_CSR | ||
24 | * fffc0000 c4000000 4K EXP_CFG | ||
25 | * fff00000 c8000000 64K PERIPHERAL | ||
26 | * fe000000 1c0000000 16M CAP_CSR | ||
27 | * fd000000 1c8000000 16M MSF_CSR | ||
28 | * fb000000 16M --- | ||
29 | * fa000000 1d8000000 32M PCI_IO | ||
30 | * f8000000 1da000000 32M PCI_CFG | ||
31 | * f6000000 1de000000 32M PCI_CREG | ||
32 | * f4000000 32M --- | ||
33 | * f0000000 1e0000000 64M PCI_MEM | ||
34 | * e[c-f]000000 per-platform mappings | ||
35 | */ | ||
36 | |||
37 | |||
38 | /**************************************************************************** | ||
39 | * Static mappings. | ||
40 | ****************************************************************************/ | ||
41 | #define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000 | ||
42 | #define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000 | ||
43 | #define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000 | ||
44 | |||
45 | #define IXP23XX_EXP_CFG_PHYS 0xc4000000 | ||
46 | #define IXP23XX_EXP_CFG_VIRT 0xfffc0000 | ||
47 | #define IXP23XX_EXP_CFG_SIZE 0x00001000 | ||
48 | |||
49 | #define IXP23XX_PERIPHERAL_PHYS 0xc8000000 | ||
50 | #define IXP23XX_PERIPHERAL_VIRT 0xfff00000 | ||
51 | #define IXP23XX_PERIPHERAL_SIZE 0x00010000 | ||
52 | |||
53 | #define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL | ||
54 | #define IXP23XX_CAP_CSR_VIRT 0xfe000000 | ||
55 | #define IXP23XX_CAP_CSR_SIZE 0x01000000 | ||
56 | |||
57 | #define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL | ||
58 | #define IXP23XX_MSF_CSR_VIRT 0xfd000000 | ||
59 | #define IXP23XX_MSF_CSR_SIZE 0x01000000 | ||
60 | |||
61 | #define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL | ||
62 | #define IXP23XX_PCI_IO_VIRT 0xfa000000 | ||
63 | #define IXP23XX_PCI_IO_SIZE 0x02000000 | ||
64 | |||
65 | #define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL | ||
66 | #define IXP23XX_PCI_CFG_VIRT 0xf8000000 | ||
67 | #define IXP23XX_PCI_CFG_SIZE 0x02000000 | ||
68 | #define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT | ||
69 | #define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000) | ||
70 | |||
71 | #define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL | ||
72 | #define IXP23XX_PCI_CREG_VIRT 0xf6000000 | ||
73 | #define IXP23XX_PCI_CREG_SIZE 0x02000000 | ||
74 | #define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000) | ||
75 | |||
76 | #define IXP23XX_PCI_MEM_START 0xe0000000 | ||
77 | #define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL | ||
78 | #define IXP23XX_PCI_MEM_VIRT 0xf0000000 | ||
79 | #define IXP23XX_PCI_MEM_SIZE 0x04000000 | ||
80 | |||
81 | |||
82 | /**************************************************************************** | ||
83 | * XSI2CPP CSRs. | ||
84 | ****************************************************************************/ | ||
85 | #define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x))) | ||
86 | #define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8) | ||
87 | #define IXP23XX_CPP2XSI_ADDR_31 (1 << 19) | ||
88 | #define IXP23XX_CPP2XSI_PSH_OFF (1 << 20) | ||
89 | #define IXP23XX_CPP2XSI_COH_OFF (1 << 21) | ||
90 | |||
91 | |||
92 | /**************************************************************************** | ||
93 | * Expansion Bus Config. | ||
94 | ****************************************************************************/ | ||
95 | #define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x))) | ||
96 | #define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00) | ||
97 | #define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04) | ||
98 | #define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08) | ||
99 | #define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c) | ||
100 | #define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10) | ||
101 | #define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14) | ||
102 | #define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18) | ||
103 | #define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c) | ||
104 | #define IXP23XX_FLASH_WRITABLE (0x2) | ||
105 | #define IXP23XX_FLASH_BUS8 (0x1) | ||
106 | |||
107 | #define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20) | ||
108 | #define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24) | ||
109 | #define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31) | ||
110 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22) | ||
111 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21) | ||
112 | #define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19) | ||
113 | #define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18) | ||
114 | #define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16) | ||
115 | #define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14) | ||
116 | #define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13) | ||
117 | #define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12) | ||
118 | #define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5) | ||
119 | #define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4) | ||
120 | #define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3) | ||
121 | #define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2) | ||
122 | #define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1) | ||
123 | #define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0) | ||
124 | |||
125 | #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) | ||
126 | #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) | ||
127 | #define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34) | ||
128 | |||
129 | #define IXP23XX_EXP_BUS_PHYS 0x90000000 | ||
130 | #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 | ||
131 | |||
132 | #define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000) | ||
133 | #define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000) | ||
134 | #define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000) | ||
135 | #define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000) | ||
136 | #define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000) | ||
137 | #define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000) | ||
138 | #define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000) | ||
139 | #define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000) | ||
140 | |||
141 | |||
142 | /**************************************************************************** | ||
143 | * Peripherals. | ||
144 | ****************************************************************************/ | ||
145 | #define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000) | ||
146 | #define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000) | ||
147 | #define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000) | ||
148 | #define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000) | ||
149 | #define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000) | ||
150 | #define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000) | ||
151 | #define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000) | ||
152 | #define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000) | ||
153 | #define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000) | ||
154 | #define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000) | ||
155 | #define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000) | ||
156 | #define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000) | ||
157 | #define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000) | ||
158 | #define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000) | ||
159 | |||
160 | #define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000) | ||
161 | #define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000) | ||
162 | #define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000) | ||
163 | #define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000) | ||
164 | #define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000) | ||
165 | #define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000) | ||
166 | #define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000) | ||
167 | #define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000) | ||
168 | #define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000) | ||
169 | #define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000) | ||
170 | #define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000) | ||
171 | #define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000) | ||
172 | #define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000) | ||
173 | #define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000) | ||
174 | |||
175 | |||
176 | /**************************************************************************** | ||
177 | * Interrupt controller. | ||
178 | ****************************************************************************/ | ||
179 | #define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x))) | ||
180 | #define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00) | ||
181 | #define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04) | ||
182 | #define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08) | ||
183 | #define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c) | ||
184 | #define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10) | ||
185 | #define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14) | ||
186 | #define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18) | ||
187 | #define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c) | ||
188 | #define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20) | ||
189 | #define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24) | ||
190 | #define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28) | ||
191 | #define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c) | ||
192 | #define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30) | ||
193 | #define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34) | ||
194 | #define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38) | ||
195 | #define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c) | ||
196 | #define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54 | ||
197 | |||
198 | |||
199 | /**************************************************************************** | ||
200 | * GPIO. | ||
201 | ****************************************************************************/ | ||
202 | #define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x))) | ||
203 | #define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00) | ||
204 | #define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04) | ||
205 | #define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08) | ||
206 | #define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c) | ||
207 | #define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10) | ||
208 | #define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14) | ||
209 | #define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18) | ||
210 | #define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c) | ||
211 | |||
212 | #define IXP23XX_GPIO_STYLE_MASK 0x7 | ||
213 | #define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0 | ||
214 | #define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1 | ||
215 | #define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2 | ||
216 | #define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3 | ||
217 | #define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4 | ||
218 | |||
219 | #define IXP23XX_GPIO_STYLE_SIZE 3 | ||
220 | |||
221 | |||
222 | /**************************************************************************** | ||
223 | * Timer. | ||
224 | ****************************************************************************/ | ||
225 | #define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x))) | ||
226 | #define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00) | ||
227 | #define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04) | ||
228 | #define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08) | ||
229 | #define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c) | ||
230 | #define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10) | ||
231 | #define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14) | ||
232 | #define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18) | ||
233 | #define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c) | ||
234 | #define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e | ||
235 | #define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20) | ||
236 | #define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24) | ||
237 | #define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28) | ||
238 | |||
239 | #define IXP23XX_TIMER_ENABLE (1 << 0) | ||
240 | #define IXP23XX_TIMER_ONE_SHOT (1 << 1) | ||
241 | /* Low order bits of reload value ignored */ | ||
242 | #define IXP23XX_TIMER_RELOAD_MASK (0x3) | ||
243 | #define IXP23XX_TIMER_DISABLED (0x0) | ||
244 | #define IXP23XX_TIMER1_INT_PEND (1 << 0) | ||
245 | #define IXP23XX_TIMER2_INT_PEND (1 << 1) | ||
246 | #define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2) | ||
247 | #define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3) | ||
248 | #define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4) | ||
249 | |||
250 | |||
251 | /**************************************************************************** | ||
252 | * CAP CSRs. | ||
253 | ****************************************************************************/ | ||
254 | #define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) | ||
255 | #define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00) | ||
256 | #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) | ||
257 | #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) | ||
258 | #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) | ||
259 | #define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10) | ||
260 | #define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18) | ||
261 | |||
262 | #define IXP23XX_ENABLE_WATCHDOG (1 << 24) | ||
263 | #define IXP23XX_SHPC_INIT_COMP (1 << 21) | ||
264 | #define IXP23XX_RST_ALL (1 << 16) | ||
265 | #define IXP23XX_RESET_PCI (1 << 2) | ||
266 | #define IXP23XX_PCI_UNIT_RESET (1 << 1) | ||
267 | #define IXP23XX_XSCALE_RESET (1 << 0) | ||
268 | |||
269 | #define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000) | ||
270 | |||
271 | |||
272 | /**************************************************************************** | ||
273 | * PCI CSRs. | ||
274 | ****************************************************************************/ | ||
275 | #define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x))) | ||
276 | #define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04) | ||
277 | #define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14) | ||
278 | #define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18) | ||
279 | |||
280 | |||
281 | #define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x))) | ||
282 | #define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030) | ||
283 | #define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034) | ||
284 | #define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc) | ||
285 | #define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100) | ||
286 | #define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c) | ||
287 | #define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140) | ||
288 | #define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148) | ||
289 | #define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c) | ||
290 | #define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
291 | #define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
292 | #define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154) | ||
293 | #define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158) | ||
294 | #define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c) | ||
295 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) | ||
296 | |||
297 | |||
298 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h deleted file mode 100644 index 6cf0704e946a..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2003-2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MEMORY_H | ||
13 | #define __ASM_ARCH_MEMORY_H | ||
14 | |||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | /* | ||
18 | * Physical DRAM offset. | ||
19 | */ | ||
20 | #define PLAT_PHYS_OFFSET (0x00000000) | ||
21 | |||
22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0) | ||
23 | |||
24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
26 | |||
27 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
28 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
29 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
30 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
31 | |||
32 | #define arch_is_coherent() 1 | ||
33 | |||
34 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h deleted file mode 100644 index 50de558e722e..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/platform.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/platform.h | ||
3 | * | ||
4 | * Various bits of code used by platform-level code. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
18 | { | ||
19 | return *((volatile unsigned long *)reg); | ||
20 | } | ||
21 | |||
22 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | ||
23 | { | ||
24 | *((volatile unsigned long *)reg) = val; | ||
25 | } | ||
26 | |||
27 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | ||
28 | { | ||
29 | *((volatile unsigned long *)reg) = val; | ||
30 | } | ||
31 | |||
32 | struct pci_sys_data; | ||
33 | |||
34 | void ixp23xx_map_io(void); | ||
35 | void ixp23xx_init_irq(void); | ||
36 | void ixp23xx_sys_init(void); | ||
37 | void ixp23xx_restart(char, const char *); | ||
38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | ||
39 | void ixp23xx_pci_preinit(void); | ||
40 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | ||
41 | void ixp23xx_pci_slave_init(void); | ||
42 | |||
43 | extern struct sys_timer ixp23xx_timer; | ||
44 | |||
45 | #define IXP23XX_UART_XTAL 14745600 | ||
46 | |||
47 | #ifndef __ASSEMBLY__ | ||
48 | /* | ||
49 | * Is system memory on the XSI or CPP bus? | ||
50 | */ | ||
51 | static inline unsigned ixp23xx_cpp_boot(void) | ||
52 | { | ||
53 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
54 | } | ||
55 | #endif | ||
56 | |||
57 | |||
58 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/time.h b/arch/arm/mach-ixp23xx/include/mach/time.h deleted file mode 100644 index b61dafc884ac..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/time.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/time.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/timex.h b/arch/arm/mach-ixp23xx/include/mach/timex.h deleted file mode 100644 index e341e9cf9c37..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/timex.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/timex.h | ||
3 | * | ||
4 | * XScale architecture timex specifications | ||
5 | */ | ||
6 | |||
7 | #define CLOCK_TICK_RATE 75000000 | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h deleted file mode 100644 index 8b4c358d2c04..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
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_ARCH_UNCOMPRESS_H | ||
12 | #define __ASM_ARCH_UNCOMPRESS_H | ||
13 | |||
14 | #include <mach/ixp23xx.h> | ||
15 | #include <linux/serial_reg.h> | ||
16 | |||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | ||
18 | |||
19 | static inline void putc(char c) | ||
20 | { | ||
21 | int j; | ||
22 | |||
23 | for (j = 0; j < 0x1000; j++) { | ||
24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) | ||
25 | break; | ||
26 | barrier(); | ||
27 | } | ||
28 | |||
29 | UART_BASE[UART_TX] = c; | ||
30 | } | ||
31 | |||
32 | static inline void flush(void) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | #define arch_decomp_setup() | ||
37 | #define arch_decomp_wdog() | ||
38 | |||
39 | |||
40 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c deleted file mode 100644 index b0e07db5ceaf..000000000000 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ /dev/null | |||
@@ -1,347 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/ixdp2351.c | ||
3 | * | ||
4 | * IXDP2351 board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/serial_8250.h> | ||
28 | #include <linux/serial_core.h> | ||
29 | #include <linux/device.h> | ||
30 | #include <linux/mm.h> | ||
31 | #include <linux/pci.h> | ||
32 | #include <linux/mtd/physmap.h> | ||
33 | |||
34 | #include <asm/types.h> | ||
35 | #include <asm/setup.h> | ||
36 | #include <asm/memory.h> | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/tlbflush.h> | ||
40 | #include <asm/pgtable.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/pci.h> | ||
46 | |||
47 | /* | ||
48 | * IXDP2351 Interrupt Handling | ||
49 | */ | ||
50 | static void ixdp2351_inta_mask(struct irq_data *d) | ||
51 | { | ||
52 | *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq); | ||
53 | } | ||
54 | |||
55 | static void ixdp2351_inta_unmask(struct irq_data *d) | ||
56 | { | ||
57 | *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq); | ||
58 | } | ||
59 | |||
60 | static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) | ||
61 | { | ||
62 | u16 ex_interrupt = | ||
63 | *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; | ||
64 | int i; | ||
65 | |||
66 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
67 | |||
68 | for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) { | ||
69 | if (ex_interrupt & (1 << i)) { | ||
70 | int cpld_irq = | ||
71 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); | ||
72 | generic_handle_irq(cpld_irq); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
77 | } | ||
78 | |||
79 | static struct irq_chip ixdp2351_inta_chip = { | ||
80 | .irq_ack = ixdp2351_inta_mask, | ||
81 | .irq_mask = ixdp2351_inta_mask, | ||
82 | .irq_unmask = ixdp2351_inta_unmask | ||
83 | }; | ||
84 | |||
85 | static void ixdp2351_intb_mask(struct irq_data *d) | ||
86 | { | ||
87 | *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq); | ||
88 | } | ||
89 | |||
90 | static void ixdp2351_intb_unmask(struct irq_data *d) | ||
91 | { | ||
92 | *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq); | ||
93 | } | ||
94 | |||
95 | static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) | ||
96 | { | ||
97 | u16 ex_interrupt = | ||
98 | *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; | ||
99 | int i; | ||
100 | |||
101 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
102 | |||
103 | for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) { | ||
104 | if (ex_interrupt & (1 << i)) { | ||
105 | int cpld_irq = | ||
106 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); | ||
107 | generic_handle_irq(cpld_irq); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
112 | } | ||
113 | |||
114 | static struct irq_chip ixdp2351_intb_chip = { | ||
115 | .irq_ack = ixdp2351_intb_mask, | ||
116 | .irq_mask = ixdp2351_intb_mask, | ||
117 | .irq_unmask = ixdp2351_intb_unmask | ||
118 | }; | ||
119 | |||
120 | void __init ixdp2351_init_irq(void) | ||
121 | { | ||
122 | int irq; | ||
123 | |||
124 | /* Mask all interrupts from CPLD, disable simulation */ | ||
125 | *IXDP2351_CPLD_INTA_MASK_SET_REG = (u16) -1; | ||
126 | *IXDP2351_CPLD_INTB_MASK_SET_REG = (u16) -1; | ||
127 | *IXDP2351_CPLD_INTA_SIM_REG = 0; | ||
128 | *IXDP2351_CPLD_INTB_SIM_REG = 0; | ||
129 | |||
130 | ixp23xx_init_irq(); | ||
131 | |||
132 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE); | ||
133 | irq < | ||
134 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + IXDP2351_INTA_IRQ_NUM); | ||
135 | irq++) { | ||
136 | if (IXDP2351_INTA_IRQ_MASK(irq) & IXDP2351_INTA_IRQ_VALID) { | ||
137 | set_irq_flags(irq, IRQF_VALID); | ||
138 | irq_set_chip_and_handler(irq, &ixdp2351_inta_chip, | ||
139 | handle_level_irq); | ||
140 | } | ||
141 | } | ||
142 | |||
143 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE); | ||
144 | irq < | ||
145 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + IXDP2351_INTB_IRQ_NUM); | ||
146 | irq++) { | ||
147 | if (IXDP2351_INTB_IRQ_MASK(irq) & IXDP2351_INTB_IRQ_VALID) { | ||
148 | set_irq_flags(irq, IRQF_VALID); | ||
149 | irq_set_chip_and_handler(irq, &ixdp2351_intb_chip, | ||
150 | handle_level_irq); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | irq_set_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler); | ||
155 | irq_set_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler); | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * IXDP2351 PCI | ||
160 | */ | ||
161 | |||
162 | /* | ||
163 | * This board does not do normal PCI IRQ routing, or any | ||
164 | * sort of swizzling, so we just need to check where on the | ||
165 | * bus the device is and figure out what CPLD pin it is | ||
166 | * being routed to. | ||
167 | */ | ||
168 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | ||
169 | |||
170 | static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
171 | { | ||
172 | u8 bus = dev->bus->number; | ||
173 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | ||
174 | struct pci_bus *tmp_bus = dev->bus; | ||
175 | |||
176 | /* Primary bus, no interrupts here */ | ||
177 | if (!bus) | ||
178 | return -1; | ||
179 | |||
180 | /* Lookup first leaf in bus tree */ | ||
181 | while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) | ||
182 | tmp_bus = tmp_bus->parent; | ||
183 | |||
184 | /* Select between known bridges */ | ||
185 | switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) { | ||
186 | /* Device is located after first bridge */ | ||
187 | case 0x0008: | ||
188 | if (tmp_bus == dev->bus) { | ||
189 | /* Device is located directy after first bridge */ | ||
190 | switch (devpin) { | ||
191 | /* Onboard 82546 */ | ||
192 | case DEVPIN(1, 1): /* Onboard 82546 ch 0 */ | ||
193 | return IRQ_IXDP2351_INTA_82546; | ||
194 | case DEVPIN(1, 2): /* Onboard 82546 ch 1 */ | ||
195 | return IRQ_IXDP2351_INTB_82546; | ||
196 | /* PMC SLOT */ | ||
197 | case DEVPIN(0, 1): /* PMCP INTA# */ | ||
198 | case DEVPIN(2, 4): /* PMCS INTD# */ | ||
199 | return IRQ_IXDP2351_SPCI_PMC_INTA; | ||
200 | case DEVPIN(0, 2): /* PMCP INTB# */ | ||
201 | case DEVPIN(2, 1): /* PMCS INTA# */ | ||
202 | return IRQ_IXDP2351_SPCI_PMC_INTB; | ||
203 | case DEVPIN(0, 3): /* PMCP INTC# */ | ||
204 | case DEVPIN(2, 2): /* PMCS INTB# */ | ||
205 | return IRQ_IXDP2351_SPCI_PMC_INTC; | ||
206 | case DEVPIN(0, 4): /* PMCP INTD# */ | ||
207 | case DEVPIN(2, 3): /* PMCS INTC# */ | ||
208 | return IRQ_IXDP2351_SPCI_PMC_INTD; | ||
209 | } | ||
210 | } else { | ||
211 | /* Device is located indirectly after first bridge */ | ||
212 | /* Not supported now */ | ||
213 | return -1; | ||
214 | } | ||
215 | break; | ||
216 | case 0x0010: | ||
217 | if (tmp_bus == dev->bus) { | ||
218 | /* Device is located directy after second bridge */ | ||
219 | /* Secondary bus of second bridge */ | ||
220 | switch (devpin) { | ||
221 | case DEVPIN(0, 1): /* DB#0 */ | ||
222 | case DEVPIN(0, 2): | ||
223 | case DEVPIN(0, 3): | ||
224 | case DEVPIN(0, 4): | ||
225 | return IRQ_IXDP2351_SPCI_DB_0; | ||
226 | case DEVPIN(1, 1): /* DB#1 */ | ||
227 | case DEVPIN(1, 2): | ||
228 | case DEVPIN(1, 3): | ||
229 | case DEVPIN(1, 4): | ||
230 | return IRQ_IXDP2351_SPCI_DB_1; | ||
231 | case DEVPIN(2, 1): /* FIC1 */ | ||
232 | case DEVPIN(2, 2): | ||
233 | case DEVPIN(2, 3): | ||
234 | case DEVPIN(2, 4): | ||
235 | case DEVPIN(3, 1): /* FIC2 */ | ||
236 | case DEVPIN(3, 2): | ||
237 | case DEVPIN(3, 3): | ||
238 | case DEVPIN(3, 4): | ||
239 | return IRQ_IXDP2351_SPCI_FIC; | ||
240 | } | ||
241 | } else { | ||
242 | /* Device is located indirectly after second bridge */ | ||
243 | /* Not supported now */ | ||
244 | return -1; | ||
245 | } | ||
246 | break; | ||
247 | } | ||
248 | |||
249 | return -1; | ||
250 | } | ||
251 | |||
252 | struct hw_pci ixdp2351_pci __initdata = { | ||
253 | .nr_controllers = 1, | ||
254 | .preinit = ixp23xx_pci_preinit, | ||
255 | .setup = ixp23xx_pci_setup, | ||
256 | .scan = ixp23xx_pci_scan_bus, | ||
257 | .map_irq = ixdp2351_map_irq, | ||
258 | }; | ||
259 | |||
260 | int __init ixdp2351_pci_init(void) | ||
261 | { | ||
262 | if (machine_is_ixdp2351()) | ||
263 | pci_common_init(&ixdp2351_pci); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | subsys_initcall(ixdp2351_pci_init); | ||
269 | |||
270 | /* | ||
271 | * IXDP2351 Static Mapped I/O | ||
272 | */ | ||
273 | static struct map_desc ixdp2351_io_desc[] __initdata = { | ||
274 | { | ||
275 | .virtual = IXDP2351_NP_VIRT_BASE, | ||
276 | .pfn = __phys_to_pfn((u64)IXDP2351_NP_PHYS_BASE), | ||
277 | .length = IXDP2351_NP_PHYS_SIZE, | ||
278 | .type = MT_DEVICE | ||
279 | }, { | ||
280 | .virtual = IXDP2351_BB_BASE_VIRT, | ||
281 | .pfn = __phys_to_pfn((u64)IXDP2351_BB_BASE_PHYS), | ||
282 | .length = IXDP2351_BB_SIZE, | ||
283 | .type = MT_DEVICE | ||
284 | } | ||
285 | }; | ||
286 | |||
287 | static void __init ixdp2351_map_io(void) | ||
288 | { | ||
289 | ixp23xx_map_io(); | ||
290 | iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc)); | ||
291 | } | ||
292 | |||
293 | static struct physmap_flash_data ixdp2351_flash_data = { | ||
294 | .width = 1, | ||
295 | }; | ||
296 | |||
297 | static struct resource ixdp2351_flash_resource = { | ||
298 | .start = 0x90000000, | ||
299 | .end = 0x93ffffff, | ||
300 | .flags = IORESOURCE_MEM, | ||
301 | }; | ||
302 | |||
303 | static struct platform_device ixdp2351_flash = { | ||
304 | .name = "physmap-flash", | ||
305 | .id = 0, | ||
306 | .dev = { | ||
307 | .platform_data = &ixdp2351_flash_data, | ||
308 | }, | ||
309 | .num_resources = 1, | ||
310 | .resource = &ixdp2351_flash_resource, | ||
311 | }; | ||
312 | |||
313 | static void __init ixdp2351_init(void) | ||
314 | { | ||
315 | platform_device_register(&ixdp2351_flash); | ||
316 | |||
317 | /* | ||
318 | * Mark flash as writeable | ||
319 | */ | ||
320 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
321 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
322 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
323 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
324 | |||
325 | ixp23xx_sys_init(); | ||
326 | } | ||
327 | |||
328 | static void ixdp2351_restart(char mode, const char *cmd) | ||
329 | { | ||
330 | /* First try machine specific support */ | ||
331 | |||
332 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC; | ||
333 | (void) *IXDP2351_CPLD_RESET1_REG; | ||
334 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE; | ||
335 | |||
336 | ixp23xx_restart(mode, cmd); | ||
337 | } | ||
338 | |||
339 | MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform") | ||
340 | /* Maintainer: MontaVista Software, Inc. */ | ||
341 | .map_io = ixdp2351_map_io, | ||
342 | .init_irq = ixdp2351_init_irq, | ||
343 | .timer = &ixp23xx_timer, | ||
344 | .atag_offset = 0x100, | ||
345 | .init_machine = ixdp2351_init, | ||
346 | .restart = ixdp2351_restart, | ||
347 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c deleted file mode 100644 index 911f5a58e006..000000000000 --- a/arch/arm/mach-ixp23xx/pci.c +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/pci.c | ||
3 | * | ||
4 | * PCI routines for IXP23XX based systems | ||
5 | * | ||
6 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
7 | * | ||
8 | * based on original code: | ||
9 | * | ||
10 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
11 | * Copyright 2002-2005 Intel Corp. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | |||
19 | #include <linux/sched.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/pci.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/sizes.h> | ||
31 | #include <asm/mach/pci.h> | ||
32 | #include <mach/hardware.h> | ||
33 | |||
34 | extern int (*external_fault) (unsigned long, struct pt_regs *); | ||
35 | |||
36 | static volatile int pci_master_aborts = 0; | ||
37 | |||
38 | #ifdef DEBUG | ||
39 | #define DBG(x...) printk(x) | ||
40 | #else | ||
41 | #define DBG(x...) | ||
42 | #endif | ||
43 | |||
44 | int clear_master_aborts(void); | ||
45 | |||
46 | static u32 | ||
47 | *ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) | ||
48 | { | ||
49 | u32 *paddress; | ||
50 | |||
51 | /* | ||
52 | * Must be dword aligned | ||
53 | */ | ||
54 | where &= ~3; | ||
55 | |||
56 | /* | ||
57 | * For top bus, generate type 0, else type 1 | ||
58 | */ | ||
59 | if (!bus_nr) { | ||
60 | if (PCI_SLOT(devfn) >= 8) | ||
61 | return 0; | ||
62 | |||
63 | paddress = (u32 *) (IXP23XX_PCI_CFG0_VIRT | ||
64 | | (1 << (PCI_SLOT(devfn) + 16)) | ||
65 | | (PCI_FUNC(devfn) << 8) | where); | ||
66 | } else { | ||
67 | paddress = (u32 *) (IXP23XX_PCI_CFG1_VIRT | ||
68 | | (bus_nr << 16) | ||
69 | | (PCI_SLOT(devfn) << 11) | ||
70 | | (PCI_FUNC(devfn) << 8) | where); | ||
71 | } | ||
72 | |||
73 | return paddress; | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes. | ||
78 | * 0 and 3 are not valid indexes... | ||
79 | */ | ||
80 | static u32 bytemask[] = { | ||
81 | /*0*/ 0, | ||
82 | /*1*/ 0xff, | ||
83 | /*2*/ 0xffff, | ||
84 | /*3*/ 0, | ||
85 | /*4*/ 0xffffffff, | ||
86 | }; | ||
87 | |||
88 | static int ixp23xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, | ||
89 | int where, int size, u32 *value) | ||
90 | { | ||
91 | u32 n; | ||
92 | u32 *addr; | ||
93 | |||
94 | n = where % 4; | ||
95 | |||
96 | DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where, | ||
97 | bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
98 | |||
99 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
100 | if (!addr) | ||
101 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
102 | |||
103 | pci_master_aborts = 0; | ||
104 | *value = (*addr >> (8*n)) & bytemask[size]; | ||
105 | if (pci_master_aborts) { | ||
106 | pci_master_aborts = 0; | ||
107 | *value = 0xffffffff; | ||
108 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
109 | } | ||
110 | |||
111 | return PCIBIOS_SUCCESSFUL; | ||
112 | } | ||
113 | |||
114 | /* | ||
115 | * We don't do error checking on the address for writes. | ||
116 | * It's assumed that the user checked for the device existing first | ||
117 | * by doing a read first. | ||
118 | */ | ||
119 | static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, | ||
120 | int where, int size, u32 value) | ||
121 | { | ||
122 | u32 mask; | ||
123 | u32 *addr; | ||
124 | u32 temp; | ||
125 | |||
126 | mask = ~(bytemask[size] << ((where % 0x4) * 8)); | ||
127 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
128 | if (!addr) | ||
129 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
130 | temp = (u32) (value) << ((where % 0x4) * 8); | ||
131 | *addr = (*addr & mask) | temp; | ||
132 | |||
133 | clear_master_aborts(); | ||
134 | |||
135 | return PCIBIOS_SUCCESSFUL; | ||
136 | } | ||
137 | |||
138 | struct pci_ops ixp23xx_pci_ops = { | ||
139 | .read = ixp23xx_pci_read_config, | ||
140 | .write = ixp23xx_pci_write_config, | ||
141 | }; | ||
142 | |||
143 | struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
144 | { | ||
145 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp23xx_pci_ops, | ||
146 | sysdata, &sysdata->resources); | ||
147 | } | ||
148 | |||
149 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
150 | { | ||
151 | volatile unsigned long temp; | ||
152 | unsigned long flags; | ||
153 | |||
154 | pci_master_aborts = 1; | ||
155 | |||
156 | local_irq_save(flags); | ||
157 | temp = *IXP23XX_PCI_CONTROL; | ||
158 | |||
159 | /* | ||
160 | * master abort and cmd tgt err | ||
161 | */ | ||
162 | if (temp & ((1 << 8) | (1 << 5))) | ||
163 | *IXP23XX_PCI_CONTROL = temp; | ||
164 | |||
165 | temp = *IXP23XX_PCI_CMDSTAT; | ||
166 | |||
167 | if (temp & (1 << 29)) | ||
168 | *IXP23XX_PCI_CMDSTAT = temp; | ||
169 | local_irq_restore(flags); | ||
170 | |||
171 | /* | ||
172 | * If it was an imprecise abort, then we need to correct the | ||
173 | * return address to be _after_ the instruction. | ||
174 | */ | ||
175 | if (fsr & (1 << 10)) | ||
176 | regs->ARM_pc += 4; | ||
177 | |||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | int clear_master_aborts(void) | ||
182 | { | ||
183 | volatile u32 temp; | ||
184 | |||
185 | temp = *IXP23XX_PCI_CONTROL; | ||
186 | |||
187 | /* | ||
188 | * master abort and cmd tgt err | ||
189 | */ | ||
190 | if (temp & ((1 << 8) | (1 << 5))) | ||
191 | *IXP23XX_PCI_CONTROL = temp; | ||
192 | |||
193 | temp = *IXP23XX_PCI_CMDSTAT; | ||
194 | |||
195 | if (temp & (1 << 29)) | ||
196 | *IXP23XX_PCI_CMDSTAT = temp; | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | static void __init ixp23xx_pci_common_init(void) | ||
202 | { | ||
203 | #ifdef __ARMEB__ | ||
204 | *IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */ | ||
205 | #endif | ||
206 | /* | ||
207 | * ADDR_31 needs to be clear for PCI memory access to CPP memory | ||
208 | */ | ||
209 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_ADDR_31; | ||
210 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 |= IXP23XX_CPP2XSI_PSH_OFF; | ||
211 | |||
212 | /* | ||
213 | * Select correct memory for PCI inbound transactions | ||
214 | */ | ||
215 | if (ixp23xx_cpp_boot()) { | ||
216 | *IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1); | ||
217 | } else { | ||
218 | *IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1); | ||
219 | |||
220 | /* | ||
221 | * Enable coherency on A2 silicon. | ||
222 | */ | ||
223 | if (arch_is_coherent()) | ||
224 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_COH_OFF; | ||
225 | } | ||
226 | } | ||
227 | |||
228 | void __init ixp23xx_pci_preinit(void) | ||
229 | { | ||
230 | pcibios_min_io = 0; | ||
231 | pcibios_min_mem = 0xe0000000; | ||
232 | |||
233 | pci_set_flags(0); | ||
234 | |||
235 | ixp23xx_pci_common_init(); | ||
236 | |||
237 | hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, 0, | ||
238 | "PCI config cycle to non-existent device"); | ||
239 | |||
240 | *IXP23XX_PCI_ADDR_EXT = 0x0000e000; | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * Prevent PCI layer from seeing the inbound host-bridge resources | ||
245 | */ | ||
246 | static void __devinit pci_fixup_ixp23xx(struct pci_dev *dev) | ||
247 | { | ||
248 | int i; | ||
249 | |||
250 | dev->class &= 0xff; | ||
251 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
252 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | ||
253 | dev->resource[i].start = 0; | ||
254 | dev->resource[i].end = 0; | ||
255 | dev->resource[i].flags = 0; | ||
256 | } | ||
257 | } | ||
258 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9002, pci_fixup_ixp23xx); | ||
259 | |||
260 | /* | ||
261 | * IXP2300 systems often have large resource requirements, so we just | ||
262 | * use our own resource space. | ||
263 | */ | ||
264 | static struct resource ixp23xx_pci_mem_space = { | ||
265 | .start = IXP23XX_PCI_MEM_START, | ||
266 | .end = IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE - 1, | ||
267 | .flags = IORESOURCE_MEM, | ||
268 | .name = "PCI Mem Space" | ||
269 | }; | ||
270 | |||
271 | static struct resource ixp23xx_pci_io_space = { | ||
272 | .start = 0x00000100, | ||
273 | .end = 0x01ffffff, | ||
274 | .flags = IORESOURCE_IO, | ||
275 | .name = "PCI I/O Space" | ||
276 | }; | ||
277 | |||
278 | int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys) | ||
279 | { | ||
280 | if (nr >= 1) | ||
281 | return 0; | ||
282 | |||
283 | pci_add_resource_offset(&sys->resources, | ||
284 | &ixp23xx_pci_io_space, sys->io_offset); | ||
285 | pci_add_resource_offset(&sys->resources, | ||
286 | &ixp23xx_pci_mem_space, sys->mem_offset); | ||
287 | |||
288 | return 1; | ||
289 | } | ||
290 | |||
291 | void __init ixp23xx_pci_slave_init(void) | ||
292 | { | ||
293 | ixp23xx_pci_common_init(); | ||
294 | } | ||
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c deleted file mode 100644 index eaaa3fa9fd05..000000000000 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/roadrunner.c | ||
3 | * | ||
4 | * RoadRunner board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2005 (c) ADI Engineering Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/tty.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/serial_8250.h> | ||
27 | #include <linux/serial_core.h> | ||
28 | #include <linux/device.h> | ||
29 | #include <linux/mm.h> | ||
30 | #include <linux/pci.h> | ||
31 | #include <linux/mtd/physmap.h> | ||
32 | |||
33 | #include <asm/types.h> | ||
34 | #include <asm/setup.h> | ||
35 | #include <asm/memory.h> | ||
36 | #include <mach/hardware.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/irq.h> | ||
39 | #include <asm/tlbflush.h> | ||
40 | #include <asm/pgtable.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/pci.h> | ||
46 | |||
47 | /* | ||
48 | * Interrupt mapping | ||
49 | */ | ||
50 | #define INTA IRQ_ROADRUNNER_PCI_INTA | ||
51 | #define INTB IRQ_ROADRUNNER_PCI_INTB | ||
52 | #define INTC IRQ_ROADRUNNER_PCI_INTC | ||
53 | #define INTD IRQ_ROADRUNNER_PCI_INTD | ||
54 | |||
55 | #define INTC_PIN IXP23XX_GPIO_PIN_11 | ||
56 | #define INTD_PIN IXP23XX_GPIO_PIN_12 | ||
57 | |||
58 | static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel, | ||
59 | u8 pin) | ||
60 | { | ||
61 | static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; | ||
62 | static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; | ||
63 | static int usb_irq[] = {INTB, INTC, INTD, -1}; | ||
64 | static int mini_pci_1_irq[] = {INTB, INTC, -1, -1}; | ||
65 | static int mini_pci_2_irq[] = {INTC, INTD, -1, -1}; | ||
66 | |||
67 | switch(dev->bus->number) { | ||
68 | case 0: | ||
69 | switch(dev->devfn) { | ||
70 | case 0x0: // PCI-PCI bridge | ||
71 | break; | ||
72 | case 0x8: // PCI Card Slot | ||
73 | return pci_card_slot_irq[pin - 1]; | ||
74 | case 0x10: // PMC Slot | ||
75 | return pmc_card_slot_irq[pin - 1]; | ||
76 | case 0x18: // PMC Slot Secondary Agent | ||
77 | break; | ||
78 | case 0x20: // IXP Processor | ||
79 | break; | ||
80 | default: | ||
81 | return NO_IRQ; | ||
82 | } | ||
83 | break; | ||
84 | |||
85 | case 1: | ||
86 | switch(dev->devfn) { | ||
87 | case 0x0: // IDE Controller | ||
88 | return (pin == 1) ? INTC : -1; | ||
89 | case 0x8: // USB fun 0 | ||
90 | case 0x9: // USB fun 1 | ||
91 | case 0xa: // USB fun 2 | ||
92 | return usb_irq[pin - 1]; | ||
93 | case 0x10: // Mini PCI 1 | ||
94 | return mini_pci_1_irq[pin-1]; | ||
95 | case 0x18: // Mini PCI 2 | ||
96 | return mini_pci_2_irq[pin-1]; | ||
97 | case 0x20: // MEM slot | ||
98 | return (pin == 1) ? INTA : -1; | ||
99 | default: | ||
100 | return NO_IRQ; | ||
101 | } | ||
102 | break; | ||
103 | |||
104 | default: | ||
105 | return NO_IRQ; | ||
106 | } | ||
107 | |||
108 | return NO_IRQ; | ||
109 | } | ||
110 | |||
111 | static void __init roadrunner_pci_preinit(void) | ||
112 | { | ||
113 | irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQ_TYPE_LEVEL_LOW); | ||
114 | irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQ_TYPE_LEVEL_LOW); | ||
115 | |||
116 | ixp23xx_pci_preinit(); | ||
117 | } | ||
118 | |||
119 | static struct hw_pci roadrunner_pci __initdata = { | ||
120 | .nr_controllers = 1, | ||
121 | .preinit = roadrunner_pci_preinit, | ||
122 | .setup = ixp23xx_pci_setup, | ||
123 | .scan = ixp23xx_pci_scan_bus, | ||
124 | .map_irq = roadrunner_map_irq, | ||
125 | }; | ||
126 | |||
127 | static int __init roadrunner_pci_init(void) | ||
128 | { | ||
129 | if (machine_is_roadrunner()) | ||
130 | pci_common_init(&roadrunner_pci); | ||
131 | |||
132 | return 0; | ||
133 | }; | ||
134 | |||
135 | subsys_initcall(roadrunner_pci_init); | ||
136 | |||
137 | static struct physmap_flash_data roadrunner_flash_data = { | ||
138 | .width = 2, | ||
139 | }; | ||
140 | |||
141 | static struct resource roadrunner_flash_resource = { | ||
142 | .start = 0x90000000, | ||
143 | .end = 0x93ffffff, | ||
144 | .flags = IORESOURCE_MEM, | ||
145 | }; | ||
146 | |||
147 | static struct platform_device roadrunner_flash = { | ||
148 | .name = "physmap-flash", | ||
149 | .id = 0, | ||
150 | .dev = { | ||
151 | .platform_data = &roadrunner_flash_data, | ||
152 | }, | ||
153 | .num_resources = 1, | ||
154 | .resource = &roadrunner_flash_resource, | ||
155 | }; | ||
156 | |||
157 | static void __init roadrunner_init(void) | ||
158 | { | ||
159 | platform_device_register(&roadrunner_flash); | ||
160 | |||
161 | /* | ||
162 | * Mark flash as writeable | ||
163 | */ | ||
164 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
165 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
166 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
167 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
168 | |||
169 | ixp23xx_sys_init(); | ||
170 | } | ||
171 | |||
172 | MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform") | ||
173 | /* Maintainer: Deepak Saxena */ | ||
174 | .map_io = ixp23xx_map_io, | ||
175 | .init_irq = ixp23xx_init_irq, | ||
176 | .timer = &ixp23xx_timer, | ||
177 | .atag_offset = 0x100, | ||
178 | .init_machine = roadrunner_init, | ||
179 | .restart = ixp23xx_restart, | ||
180 | MACHINE_END | ||
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 0689bf6b0183..b2402eb076c7 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -62,7 +62,7 @@ config HW_RANDOM_AMD | |||
62 | 62 | ||
63 | config HW_RANDOM_ATMEL | 63 | config HW_RANDOM_ATMEL |
64 | tristate "Atmel Random Number Generator support" | 64 | tristate "Atmel Random Number Generator support" |
65 | depends on HW_RANDOM && ARCH_AT91SAM9G45 | 65 | depends on HW_RANDOM && HAVE_CLK |
66 | default HW_RANDOM | 66 | default HW_RANDOM |
67 | ---help--- | 67 | ---help--- |
68 | This driver provides kernel-side support for the Random Number | 68 | This driver provides kernel-side support for the Random Number |
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 2a2141915aa0..75838d7710ce 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -489,10 +489,10 @@ config TOUCHSCREEN_TI_TSCADC | |||
489 | 489 | ||
490 | config TOUCHSCREEN_ATMEL_TSADCC | 490 | config TOUCHSCREEN_ATMEL_TSADCC |
491 | tristate "Atmel Touchscreen Interface" | 491 | tristate "Atmel Touchscreen Interface" |
492 | depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 | 492 | depends on ARCH_AT91 |
493 | help | 493 | help |
494 | Say Y here if you have a 4-wire touchscreen connected to the | 494 | Say Y here if you have a 4-wire touchscreen connected to the |
495 | ADC Controller on your Atmel SoC (such as the AT91SAM9RL). | 495 | ADC Controller on your Atmel SoC. |
496 | 496 | ||
497 | If unsure, say N. | 497 | If unsure, say N. |
498 | 498 | ||
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 8c8377d50c4c..4161bfe462cd 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -838,7 +838,7 @@ config RTC_DRV_AT32AP700X | |||
838 | 838 | ||
839 | config RTC_DRV_AT91RM9200 | 839 | config RTC_DRV_AT91RM9200 |
840 | tristate "AT91RM9200 or some AT91SAM9 RTC" | 840 | tristate "AT91RM9200 or some AT91SAM9 RTC" |
841 | depends on ARCH_AT91RM9200 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 | 841 | depends on ARCH_AT91 |
842 | help | 842 | help |
843 | Driver for the internal RTC (Realtime Clock) module found on | 843 | Driver for the internal RTC (Realtime Clock) module found on |
844 | Atmel AT91RM9200's and some AT91SAM9 chips. On AT91SAM9 chips | 844 | Atmel AT91RM9200's and some AT91SAM9 chips. On AT91SAM9 chips |