diff options
128 files changed, 12023 insertions, 905 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index e182992ff799..deae37416eec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -348,6 +348,13 @@ P: Ian Molton | |||
348 | M: spyro@f2s.com | 348 | M: spyro@f2s.com |
349 | S: Maintained | 349 | S: Maintained |
350 | 350 | ||
351 | ARM/ATMEL AT91RM9200 ARM ARCHITECTURE | ||
352 | P: Andrew Victor | ||
353 | M: andrew@sanpeople.com | ||
354 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||
355 | W: http://maxim.org.za/at91_26.html | ||
356 | S: Maintained | ||
357 | |||
351 | ARM/CORGI MACHINE SUPPORT | 358 | ARM/CORGI MACHINE SUPPORT |
352 | P: Richard Purdie | 359 | P: Richard Purdie |
353 | M: rpurdie@rpsys.net | 360 | M: rpurdie@rpsys.net |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7be67ef4b84f..8c05d4321ae9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -223,6 +223,12 @@ config ARCH_IOP33X | |||
223 | help | 223 | help |
224 | Support for Intel's IOP33X (XScale) family of processors. | 224 | Support for Intel's IOP33X (XScale) family of processors. |
225 | 225 | ||
226 | config ARCH_IOP13XX | ||
227 | bool "IOP13xx-based" | ||
228 | select PCI | ||
229 | help | ||
230 | Support for Intel's IOP13XX (XScale) family of processors. | ||
231 | |||
226 | config ARCH_IXP4XX | 232 | config ARCH_IXP4XX |
227 | bool "IXP4xx-based" | 233 | bool "IXP4xx-based" |
228 | depends on MMU | 234 | depends on MMU |
@@ -331,6 +337,8 @@ source "arch/arm/mach-iop32x/Kconfig" | |||
331 | 337 | ||
332 | source "arch/arm/mach-iop33x/Kconfig" | 338 | source "arch/arm/mach-iop33x/Kconfig" |
333 | 339 | ||
340 | source "arch/arm/mach-iop13xx/Kconfig" | ||
341 | |||
334 | source "arch/arm/mach-ixp4xx/Kconfig" | 342 | source "arch/arm/mach-ixp4xx/Kconfig" |
335 | 343 | ||
336 | source "arch/arm/mach-ixp2000/Kconfig" | 344 | source "arch/arm/mach-ixp2000/Kconfig" |
@@ -591,7 +599,7 @@ config LEDS | |||
591 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ | 599 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ |
592 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ | 600 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ |
593 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ | 601 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ |
594 | ARCH_AT91RM9200 || MACH_TRIZEPS4 | 602 | ARCH_AT91 || MACH_TRIZEPS4 |
595 | help | 603 | help |
596 | If you say Y here, the LEDs on your machine will be used | 604 | If you say Y here, the LEDs on your machine will be used |
597 | to provide useful information about your current system status. | 605 | to provide useful information about your current system status. |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index b6001f97c80c..000f1100b553 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -110,6 +110,7 @@ endif | |||
110 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x | 110 | machine-$(CONFIG_ARCH_CLPS711X) := clps711x |
111 | machine-$(CONFIG_ARCH_IOP32X) := iop32x | 111 | machine-$(CONFIG_ARCH_IOP32X) := iop32x |
112 | machine-$(CONFIG_ARCH_IOP33X) := iop33x | 112 | machine-$(CONFIG_ARCH_IOP33X) := iop33x |
113 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx | ||
113 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 114 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
114 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 | 115 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 |
115 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | 116 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx |
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig index 02164c1a301c..e10d003566d6 100644 --- a/arch/arm/configs/at91rm9200dk_defconfig +++ b/arch/arm/configs/at91rm9200dk_defconfig | |||
@@ -357,9 +357,9 @@ CONFIG_MTD_CFI_UTIL=y | |||
357 | # | 357 | # |
358 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 358 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
359 | CONFIG_MTD_PHYSMAP=y | 359 | CONFIG_MTD_PHYSMAP=y |
360 | CONFIG_MTD_PHYSMAP_START=0x10000000 | 360 | CONFIG_MTD_PHYSMAP_START=0 |
361 | CONFIG_MTD_PHYSMAP_LEN=0x200000 | 361 | CONFIG_MTD_PHYSMAP_LEN=0 |
362 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | 362 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 |
363 | # CONFIG_MTD_ARM_INTEGRATOR is not set | 363 | # CONFIG_MTD_ARM_INTEGRATOR is not set |
364 | # CONFIG_MTD_IMPA7 is not set | 364 | # CONFIG_MTD_IMPA7 is not set |
365 | # CONFIG_MTD_PLATRAM is not set | 365 | # CONFIG_MTD_PLATRAM is not set |
@@ -585,7 +585,9 @@ CONFIG_AT91RM9200_WATCHDOG=y | |||
585 | # CONFIG_USBPCWATCHDOG is not set | 585 | # CONFIG_USBPCWATCHDOG is not set |
586 | # CONFIG_NVRAM is not set | 586 | # CONFIG_NVRAM is not set |
587 | # CONFIG_RTC is not set | 587 | # CONFIG_RTC is not set |
588 | CONFIG_AT91_RTC=y | 588 | CONFIG_RTC_LIB=y |
589 | CONFIG_RTC_CLASS=y | ||
590 | CONFIG_RTC_DRV_AT91RM9200=y | ||
589 | # CONFIG_DTLK is not set | 591 | # CONFIG_DTLK is not set |
590 | # CONFIG_R3964 is not set | 592 | # CONFIG_R3964 is not set |
591 | 593 | ||
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index bee410cc4e92..834dddb51314 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig | |||
@@ -348,9 +348,9 @@ CONFIG_MTD_CFI_UTIL=y | |||
348 | # | 348 | # |
349 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 349 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
350 | CONFIG_MTD_PHYSMAP=y | 350 | CONFIG_MTD_PHYSMAP=y |
351 | CONFIG_MTD_PHYSMAP_START=0x10000000 | 351 | CONFIG_MTD_PHYSMAP_START=0 |
352 | CONFIG_MTD_PHYSMAP_LEN=0x800000 | 352 | CONFIG_MTD_PHYSMAP_LEN=0 |
353 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | 353 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 |
354 | # CONFIG_MTD_ARM_INTEGRATOR is not set | 354 | # CONFIG_MTD_ARM_INTEGRATOR is not set |
355 | # CONFIG_MTD_IMPA7 is not set | 355 | # CONFIG_MTD_IMPA7 is not set |
356 | # CONFIG_MTD_PLATRAM is not set | 356 | # CONFIG_MTD_PLATRAM is not set |
@@ -566,7 +566,9 @@ CONFIG_AT91RM9200_WATCHDOG=y | |||
566 | # CONFIG_USBPCWATCHDOG is not set | 566 | # CONFIG_USBPCWATCHDOG is not set |
567 | # CONFIG_NVRAM is not set | 567 | # CONFIG_NVRAM is not set |
568 | # CONFIG_RTC is not set | 568 | # CONFIG_RTC is not set |
569 | CONFIG_AT91_RTC=y | 569 | CONFIG_RTC_LIB=y |
570 | CONFIG_RTC_CLASS=y | ||
571 | CONFIG_RTC_DRV_AT91RM9200=y | ||
570 | # CONFIG_DTLK is not set | 572 | # CONFIG_DTLK is not set |
571 | # CONFIG_R3964 is not set | 573 | # CONFIG_R3964 is not set |
572 | 574 | ||
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig new file mode 100644 index 000000000000..79049206dfa5 --- /dev/null +++ b/arch/arm/configs/at91sam9260ek_defconfig | |||
@@ -0,0 +1,950 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19-rc6 | ||
4 | # Fri Nov 17 18:42:21 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | # CONFIG_GENERIC_TIME is not set | ||
8 | CONFIG_MMU=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
11 | CONFIG_HARDIRQS_SW_RESEND=y | ||
12 | CONFIG_GENERIC_IRQ_PROBE=y | ||
13 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_VECTORS_BASE=0xffff0000 | ||
17 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
18 | |||
19 | # | ||
20 | # Code maturity level options | ||
21 | # | ||
22 | CONFIG_EXPERIMENTAL=y | ||
23 | CONFIG_BROKEN_ON_SMP=y | ||
24 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_LOCALVERSION="" | ||
30 | # CONFIG_LOCALVERSION_AUTO is not set | ||
31 | # CONFIG_SWAP is not set | ||
32 | CONFIG_SYSVIPC=y | ||
33 | # CONFIG_IPC_NS is not set | ||
34 | # CONFIG_POSIX_MQUEUE is not set | ||
35 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
36 | # CONFIG_TASKSTATS is not set | ||
37 | # CONFIG_UTS_NS is not set | ||
38 | # CONFIG_AUDIT is not set | ||
39 | # CONFIG_IKCONFIG is not set | ||
40 | # CONFIG_RELAY is not set | ||
41 | CONFIG_INITRAMFS_SOURCE="" | ||
42 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
43 | CONFIG_SYSCTL=y | ||
44 | # CONFIG_EMBEDDED is not set | ||
45 | CONFIG_UID16=y | ||
46 | CONFIG_SYSCTL_SYSCALL=y | ||
47 | CONFIG_KALLSYMS=y | ||
48 | # CONFIG_KALLSYMS_ALL is not set | ||
49 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
50 | CONFIG_HOTPLUG=y | ||
51 | CONFIG_PRINTK=y | ||
52 | CONFIG_BUG=y | ||
53 | CONFIG_ELF_CORE=y | ||
54 | CONFIG_BASE_FULL=y | ||
55 | CONFIG_FUTEX=y | ||
56 | CONFIG_EPOLL=y | ||
57 | CONFIG_SHMEM=y | ||
58 | CONFIG_SLAB=y | ||
59 | CONFIG_VM_EVENT_COUNTERS=y | ||
60 | CONFIG_RT_MUTEXES=y | ||
61 | # CONFIG_TINY_SHMEM is not set | ||
62 | CONFIG_BASE_SMALL=0 | ||
63 | # CONFIG_SLOB is not set | ||
64 | |||
65 | # | ||
66 | # Loadable module support | ||
67 | # | ||
68 | CONFIG_MODULES=y | ||
69 | CONFIG_MODULE_UNLOAD=y | ||
70 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
71 | # CONFIG_MODVERSIONS is not set | ||
72 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
73 | CONFIG_KMOD=y | ||
74 | |||
75 | # | ||
76 | # Block layer | ||
77 | # | ||
78 | CONFIG_BLOCK=y | ||
79 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
80 | |||
81 | # | ||
82 | # IO Schedulers | ||
83 | # | ||
84 | CONFIG_IOSCHED_NOOP=y | ||
85 | CONFIG_IOSCHED_AS=y | ||
86 | # CONFIG_IOSCHED_DEADLINE is not set | ||
87 | # CONFIG_IOSCHED_CFQ is not set | ||
88 | CONFIG_DEFAULT_AS=y | ||
89 | # CONFIG_DEFAULT_DEADLINE is not set | ||
90 | # CONFIG_DEFAULT_CFQ is not set | ||
91 | # CONFIG_DEFAULT_NOOP is not set | ||
92 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
93 | |||
94 | # | ||
95 | # System Type | ||
96 | # | ||
97 | # CONFIG_ARCH_AAEC2000 is not set | ||
98 | # CONFIG_ARCH_INTEGRATOR is not set | ||
99 | # CONFIG_ARCH_REALVIEW is not set | ||
100 | # CONFIG_ARCH_VERSATILE is not set | ||
101 | CONFIG_ARCH_AT91=y | ||
102 | # CONFIG_ARCH_CLPS7500 is not set | ||
103 | # CONFIG_ARCH_CLPS711X is not set | ||
104 | # CONFIG_ARCH_CO285 is not set | ||
105 | # CONFIG_ARCH_EBSA110 is not set | ||
106 | # CONFIG_ARCH_EP93XX is not set | ||
107 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
108 | # CONFIG_ARCH_NETX is not set | ||
109 | # CONFIG_ARCH_H720X is not set | ||
110 | # CONFIG_ARCH_IMX is not set | ||
111 | # CONFIG_ARCH_IOP32X is not set | ||
112 | # CONFIG_ARCH_IOP33X is not set | ||
113 | # CONFIG_ARCH_IXP4XX is not set | ||
114 | # CONFIG_ARCH_IXP2000 is not set | ||
115 | # CONFIG_ARCH_IXP23XX is not set | ||
116 | # CONFIG_ARCH_L7200 is not set | ||
117 | # CONFIG_ARCH_PNX4008 is not set | ||
118 | # CONFIG_ARCH_PXA is not set | ||
119 | # CONFIG_ARCH_RPC is not set | ||
120 | # CONFIG_ARCH_SA1100 is not set | ||
121 | # CONFIG_ARCH_S3C2410 is not set | ||
122 | # CONFIG_ARCH_SHARK is not set | ||
123 | # CONFIG_ARCH_LH7A40X is not set | ||
124 | # CONFIG_ARCH_OMAP is not set | ||
125 | |||
126 | # | ||
127 | # Atmel AT91 System-on-Chip | ||
128 | # | ||
129 | # CONFIG_ARCH_AT91RM9200 is not set | ||
130 | CONFIG_ARCH_AT91SAM9260=y | ||
131 | # CONFIG_ARCH_AT91SAM9261 is not set | ||
132 | |||
133 | # | ||
134 | # AT91SAM9260 Board Type | ||
135 | # | ||
136 | CONFIG_MACH_AT91SAM9260EK=y | ||
137 | |||
138 | # | ||
139 | # AT91 Board Options | ||
140 | # | ||
141 | # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set | ||
142 | |||
143 | # | ||
144 | # AT91 Feature Selections | ||
145 | # | ||
146 | # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set | ||
147 | |||
148 | # | ||
149 | # Processor Type | ||
150 | # | ||
151 | CONFIG_CPU_32=y | ||
152 | CONFIG_CPU_ARM926T=y | ||
153 | CONFIG_CPU_32v5=y | ||
154 | CONFIG_CPU_ABRT_EV5TJ=y | ||
155 | CONFIG_CPU_CACHE_VIVT=y | ||
156 | CONFIG_CPU_COPY_V4WB=y | ||
157 | CONFIG_CPU_TLB_V4WBI=y | ||
158 | CONFIG_CPU_CP15=y | ||
159 | CONFIG_CPU_CP15_MMU=y | ||
160 | |||
161 | # | ||
162 | # Processor Features | ||
163 | # | ||
164 | # CONFIG_ARM_THUMB is not set | ||
165 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
166 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
167 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
168 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
169 | |||
170 | # | ||
171 | # Bus support | ||
172 | # | ||
173 | |||
174 | # | ||
175 | # PCCARD (PCMCIA/CardBus) support | ||
176 | # | ||
177 | # CONFIG_PCCARD is not set | ||
178 | |||
179 | # | ||
180 | # Kernel Features | ||
181 | # | ||
182 | # CONFIG_PREEMPT is not set | ||
183 | # CONFIG_NO_IDLE_HZ is not set | ||
184 | CONFIG_HZ=100 | ||
185 | # CONFIG_AEABI is not set | ||
186 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
187 | CONFIG_SELECT_MEMORY_MODEL=y | ||
188 | CONFIG_FLATMEM_MANUAL=y | ||
189 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
190 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
191 | CONFIG_FLATMEM=y | ||
192 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
193 | # CONFIG_SPARSEMEM_STATIC is not set | ||
194 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
195 | # CONFIG_RESOURCES_64BIT is not set | ||
196 | # CONFIG_LEDS is not set | ||
197 | CONFIG_ALIGNMENT_TRAP=y | ||
198 | |||
199 | # | ||
200 | # Boot options | ||
201 | # | ||
202 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
203 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
204 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | ||
205 | # CONFIG_XIP_KERNEL is not set | ||
206 | |||
207 | # | ||
208 | # Floating point emulation | ||
209 | # | ||
210 | |||
211 | # | ||
212 | # At least one emulation must be selected | ||
213 | # | ||
214 | CONFIG_FPE_NWFPE=y | ||
215 | # CONFIG_FPE_NWFPE_XP is not set | ||
216 | # CONFIG_FPE_FASTFPE is not set | ||
217 | # CONFIG_VFP is not set | ||
218 | |||
219 | # | ||
220 | # Userspace binary formats | ||
221 | # | ||
222 | CONFIG_BINFMT_ELF=y | ||
223 | # CONFIG_BINFMT_AOUT is not set | ||
224 | # CONFIG_BINFMT_MISC is not set | ||
225 | # CONFIG_ARTHUR is not set | ||
226 | |||
227 | # | ||
228 | # Power management options | ||
229 | # | ||
230 | # CONFIG_PM is not set | ||
231 | # CONFIG_APM is not set | ||
232 | |||
233 | # | ||
234 | # Networking | ||
235 | # | ||
236 | CONFIG_NET=y | ||
237 | |||
238 | # | ||
239 | # Networking options | ||
240 | # | ||
241 | # CONFIG_NETDEBUG is not set | ||
242 | CONFIG_PACKET=y | ||
243 | # CONFIG_PACKET_MMAP is not set | ||
244 | CONFIG_UNIX=y | ||
245 | CONFIG_XFRM=y | ||
246 | # CONFIG_XFRM_USER is not set | ||
247 | # CONFIG_XFRM_SUB_POLICY is not set | ||
248 | # CONFIG_NET_KEY is not set | ||
249 | CONFIG_INET=y | ||
250 | # CONFIG_IP_MULTICAST is not set | ||
251 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
252 | CONFIG_IP_FIB_HASH=y | ||
253 | CONFIG_IP_PNP=y | ||
254 | # CONFIG_IP_PNP_DHCP is not set | ||
255 | CONFIG_IP_PNP_BOOTP=y | ||
256 | # CONFIG_IP_PNP_RARP is not set | ||
257 | # CONFIG_NET_IPIP is not set | ||
258 | # CONFIG_NET_IPGRE is not set | ||
259 | # CONFIG_ARPD is not set | ||
260 | # CONFIG_SYN_COOKIES is not set | ||
261 | # CONFIG_INET_AH is not set | ||
262 | # CONFIG_INET_ESP is not set | ||
263 | # CONFIG_INET_IPCOMP is not set | ||
264 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
265 | # CONFIG_INET_TUNNEL is not set | ||
266 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
267 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
268 | CONFIG_INET_XFRM_MODE_BEET=y | ||
269 | CONFIG_INET_DIAG=y | ||
270 | CONFIG_INET_TCP_DIAG=y | ||
271 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
272 | CONFIG_TCP_CONG_CUBIC=y | ||
273 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
274 | # CONFIG_IPV6 is not set | ||
275 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
276 | # CONFIG_INET6_TUNNEL is not set | ||
277 | # CONFIG_NETWORK_SECMARK is not set | ||
278 | # CONFIG_NETFILTER is not set | ||
279 | |||
280 | # | ||
281 | # DCCP Configuration (EXPERIMENTAL) | ||
282 | # | ||
283 | # CONFIG_IP_DCCP is not set | ||
284 | |||
285 | # | ||
286 | # SCTP Configuration (EXPERIMENTAL) | ||
287 | # | ||
288 | # CONFIG_IP_SCTP is not set | ||
289 | |||
290 | # | ||
291 | # TIPC Configuration (EXPERIMENTAL) | ||
292 | # | ||
293 | # CONFIG_TIPC is not set | ||
294 | # CONFIG_ATM is not set | ||
295 | # CONFIG_BRIDGE is not set | ||
296 | # CONFIG_VLAN_8021Q is not set | ||
297 | # CONFIG_DECNET is not set | ||
298 | # CONFIG_LLC2 is not set | ||
299 | # CONFIG_IPX is not set | ||
300 | # CONFIG_ATALK is not set | ||
301 | # CONFIG_X25 is not set | ||
302 | # CONFIG_LAPB is not set | ||
303 | # CONFIG_ECONET is not set | ||
304 | # CONFIG_WAN_ROUTER is not set | ||
305 | |||
306 | # | ||
307 | # QoS and/or fair queueing | ||
308 | # | ||
309 | # CONFIG_NET_SCHED is not set | ||
310 | |||
311 | # | ||
312 | # Network testing | ||
313 | # | ||
314 | # CONFIG_NET_PKTGEN is not set | ||
315 | # CONFIG_HAMRADIO is not set | ||
316 | # CONFIG_IRDA is not set | ||
317 | # CONFIG_BT is not set | ||
318 | # CONFIG_IEEE80211 is not set | ||
319 | |||
320 | # | ||
321 | # Device Drivers | ||
322 | # | ||
323 | |||
324 | # | ||
325 | # Generic Driver Options | ||
326 | # | ||
327 | CONFIG_STANDALONE=y | ||
328 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
329 | # CONFIG_FW_LOADER is not set | ||
330 | # CONFIG_DEBUG_DRIVER is not set | ||
331 | # CONFIG_SYS_HYPERVISOR is not set | ||
332 | |||
333 | # | ||
334 | # Connector - unified userspace <-> kernelspace linker | ||
335 | # | ||
336 | # CONFIG_CONNECTOR is not set | ||
337 | |||
338 | # | ||
339 | # Memory Technology Devices (MTD) | ||
340 | # | ||
341 | # CONFIG_MTD is not set | ||
342 | |||
343 | # | ||
344 | # Parallel port support | ||
345 | # | ||
346 | # CONFIG_PARPORT is not set | ||
347 | |||
348 | # | ||
349 | # Plug and Play support | ||
350 | # | ||
351 | |||
352 | # | ||
353 | # Block devices | ||
354 | # | ||
355 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
356 | # CONFIG_BLK_DEV_LOOP is not set | ||
357 | # CONFIG_BLK_DEV_NBD is not set | ||
358 | # CONFIG_BLK_DEV_UB is not set | ||
359 | CONFIG_BLK_DEV_RAM=y | ||
360 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
361 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
362 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
363 | CONFIG_BLK_DEV_INITRD=y | ||
364 | # CONFIG_CDROM_PKTCDVD is not set | ||
365 | # CONFIG_ATA_OVER_ETH is not set | ||
366 | |||
367 | # | ||
368 | # SCSI device support | ||
369 | # | ||
370 | # CONFIG_RAID_ATTRS is not set | ||
371 | CONFIG_SCSI=y | ||
372 | # CONFIG_SCSI_NETLINK is not set | ||
373 | CONFIG_SCSI_PROC_FS=y | ||
374 | |||
375 | # | ||
376 | # SCSI support type (disk, tape, CD-ROM) | ||
377 | # | ||
378 | CONFIG_BLK_DEV_SD=y | ||
379 | # CONFIG_CHR_DEV_ST is not set | ||
380 | # CONFIG_CHR_DEV_OSST is not set | ||
381 | # CONFIG_BLK_DEV_SR is not set | ||
382 | # CONFIG_CHR_DEV_SG is not set | ||
383 | # CONFIG_CHR_DEV_SCH is not set | ||
384 | |||
385 | # | ||
386 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
387 | # | ||
388 | CONFIG_SCSI_MULTI_LUN=y | ||
389 | # CONFIG_SCSI_CONSTANTS is not set | ||
390 | # CONFIG_SCSI_LOGGING is not set | ||
391 | |||
392 | # | ||
393 | # SCSI Transports | ||
394 | # | ||
395 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
396 | # CONFIG_SCSI_FC_ATTRS is not set | ||
397 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
398 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
399 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
400 | |||
401 | # | ||
402 | # SCSI low-level drivers | ||
403 | # | ||
404 | # CONFIG_ISCSI_TCP is not set | ||
405 | # CONFIG_SCSI_DEBUG is not set | ||
406 | |||
407 | # | ||
408 | # Multi-device support (RAID and LVM) | ||
409 | # | ||
410 | # CONFIG_MD is not set | ||
411 | |||
412 | # | ||
413 | # Fusion MPT device support | ||
414 | # | ||
415 | # CONFIG_FUSION is not set | ||
416 | |||
417 | # | ||
418 | # IEEE 1394 (FireWire) support | ||
419 | # | ||
420 | |||
421 | # | ||
422 | # I2O device support | ||
423 | # | ||
424 | |||
425 | # | ||
426 | # Network device support | ||
427 | # | ||
428 | # CONFIG_NETDEVICES is not set | ||
429 | # CONFIG_NETPOLL is not set | ||
430 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
431 | |||
432 | # | ||
433 | # ISDN subsystem | ||
434 | # | ||
435 | # CONFIG_ISDN is not set | ||
436 | |||
437 | # | ||
438 | # Input device support | ||
439 | # | ||
440 | CONFIG_INPUT=y | ||
441 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
442 | |||
443 | # | ||
444 | # Userland interfaces | ||
445 | # | ||
446 | CONFIG_INPUT_MOUSEDEV=y | ||
447 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
448 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
449 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
450 | # CONFIG_INPUT_JOYDEV is not set | ||
451 | # CONFIG_INPUT_TSDEV is not set | ||
452 | # CONFIG_INPUT_EVDEV is not set | ||
453 | # CONFIG_INPUT_EVBUG is not set | ||
454 | |||
455 | # | ||
456 | # Input Device Drivers | ||
457 | # | ||
458 | # CONFIG_INPUT_KEYBOARD is not set | ||
459 | # CONFIG_INPUT_MOUSE is not set | ||
460 | # CONFIG_INPUT_JOYSTICK is not set | ||
461 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
462 | # CONFIG_INPUT_MISC is not set | ||
463 | |||
464 | # | ||
465 | # Hardware I/O ports | ||
466 | # | ||
467 | # CONFIG_SERIO is not set | ||
468 | # CONFIG_GAMEPORT is not set | ||
469 | |||
470 | # | ||
471 | # Character devices | ||
472 | # | ||
473 | CONFIG_VT=y | ||
474 | CONFIG_VT_CONSOLE=y | ||
475 | CONFIG_HW_CONSOLE=y | ||
476 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
477 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
478 | |||
479 | # | ||
480 | # Serial drivers | ||
481 | # | ||
482 | # CONFIG_SERIAL_8250 is not set | ||
483 | |||
484 | # | ||
485 | # Non-8250 serial port support | ||
486 | # | ||
487 | CONFIG_SERIAL_ATMEL=y | ||
488 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
489 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | ||
490 | CONFIG_SERIAL_CORE=y | ||
491 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
492 | CONFIG_UNIX98_PTYS=y | ||
493 | CONFIG_LEGACY_PTYS=y | ||
494 | CONFIG_LEGACY_PTY_COUNT=256 | ||
495 | |||
496 | # | ||
497 | # IPMI | ||
498 | # | ||
499 | # CONFIG_IPMI_HANDLER is not set | ||
500 | |||
501 | # | ||
502 | # Watchdog Cards | ||
503 | # | ||
504 | CONFIG_WATCHDOG=y | ||
505 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
506 | |||
507 | # | ||
508 | # Watchdog Device Drivers | ||
509 | # | ||
510 | # CONFIG_SOFT_WATCHDOG is not set | ||
511 | |||
512 | # | ||
513 | # USB-based Watchdog Cards | ||
514 | # | ||
515 | # CONFIG_USBPCWATCHDOG is not set | ||
516 | CONFIG_HW_RANDOM=y | ||
517 | # CONFIG_NVRAM is not set | ||
518 | # CONFIG_DTLK is not set | ||
519 | # CONFIG_R3964 is not set | ||
520 | |||
521 | # | ||
522 | # Ftape, the floppy tape device driver | ||
523 | # | ||
524 | # CONFIG_RAW_DRIVER is not set | ||
525 | |||
526 | # | ||
527 | # TPM devices | ||
528 | # | ||
529 | # CONFIG_TCG_TPM is not set | ||
530 | |||
531 | # | ||
532 | # I2C support | ||
533 | # | ||
534 | # CONFIG_I2C is not set | ||
535 | |||
536 | # | ||
537 | # SPI support | ||
538 | # | ||
539 | # CONFIG_SPI is not set | ||
540 | # CONFIG_SPI_MASTER is not set | ||
541 | |||
542 | # | ||
543 | # Dallas's 1-wire bus | ||
544 | # | ||
545 | # CONFIG_W1 is not set | ||
546 | |||
547 | # | ||
548 | # Hardware Monitoring support | ||
549 | # | ||
550 | # CONFIG_HWMON is not set | ||
551 | # CONFIG_HWMON_VID is not set | ||
552 | |||
553 | # | ||
554 | # Misc devices | ||
555 | # | ||
556 | # CONFIG_TIFM_CORE is not set | ||
557 | |||
558 | # | ||
559 | # LED devices | ||
560 | # | ||
561 | # CONFIG_NEW_LEDS is not set | ||
562 | |||
563 | # | ||
564 | # LED drivers | ||
565 | # | ||
566 | |||
567 | # | ||
568 | # LED Triggers | ||
569 | # | ||
570 | |||
571 | # | ||
572 | # Multimedia devices | ||
573 | # | ||
574 | # CONFIG_VIDEO_DEV is not set | ||
575 | |||
576 | # | ||
577 | # Digital Video Broadcasting Devices | ||
578 | # | ||
579 | # CONFIG_DVB is not set | ||
580 | # CONFIG_USB_DABUSB is not set | ||
581 | |||
582 | # | ||
583 | # Graphics support | ||
584 | # | ||
585 | # CONFIG_FIRMWARE_EDID is not set | ||
586 | # CONFIG_FB is not set | ||
587 | |||
588 | # | ||
589 | # Console display driver support | ||
590 | # | ||
591 | # CONFIG_VGA_CONSOLE is not set | ||
592 | CONFIG_DUMMY_CONSOLE=y | ||
593 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
594 | |||
595 | # | ||
596 | # Sound | ||
597 | # | ||
598 | # CONFIG_SOUND is not set | ||
599 | |||
600 | # | ||
601 | # USB support | ||
602 | # | ||
603 | CONFIG_USB_ARCH_HAS_HCD=y | ||
604 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
605 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
606 | CONFIG_USB=y | ||
607 | # CONFIG_USB_DEBUG is not set | ||
608 | |||
609 | # | ||
610 | # Miscellaneous USB options | ||
611 | # | ||
612 | CONFIG_USB_DEVICEFS=y | ||
613 | # CONFIG_USB_BANDWIDTH is not set | ||
614 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
615 | # CONFIG_USB_OTG is not set | ||
616 | |||
617 | # | ||
618 | # USB Host Controller Drivers | ||
619 | # | ||
620 | # CONFIG_USB_ISP116X_HCD is not set | ||
621 | CONFIG_USB_OHCI_HCD=y | ||
622 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
623 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
624 | # CONFIG_USB_SL811_HCD is not set | ||
625 | |||
626 | # | ||
627 | # USB Device Class drivers | ||
628 | # | ||
629 | # CONFIG_USB_ACM is not set | ||
630 | # CONFIG_USB_PRINTER is not set | ||
631 | |||
632 | # | ||
633 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
634 | # | ||
635 | |||
636 | # | ||
637 | # may also be needed; see USB_STORAGE Help for more information | ||
638 | # | ||
639 | CONFIG_USB_STORAGE=y | ||
640 | CONFIG_USB_STORAGE_DEBUG=y | ||
641 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
642 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
643 | # CONFIG_USB_STORAGE_DPCM is not set | ||
644 | # CONFIG_USB_STORAGE_USBAT is not set | ||
645 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
646 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
647 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
648 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
649 | # CONFIG_USB_STORAGE_KARMA is not set | ||
650 | # CONFIG_USB_LIBUSUAL is not set | ||
651 | |||
652 | # | ||
653 | # USB Input Devices | ||
654 | # | ||
655 | # CONFIG_USB_HID is not set | ||
656 | |||
657 | # | ||
658 | # USB HID Boot Protocol drivers | ||
659 | # | ||
660 | # CONFIG_USB_KBD is not set | ||
661 | # CONFIG_USB_MOUSE is not set | ||
662 | # CONFIG_USB_AIPTEK is not set | ||
663 | # CONFIG_USB_WACOM is not set | ||
664 | # CONFIG_USB_ACECAD is not set | ||
665 | # CONFIG_USB_KBTAB is not set | ||
666 | # CONFIG_USB_POWERMATE is not set | ||
667 | # CONFIG_USB_TOUCHSCREEN is not set | ||
668 | # CONFIG_USB_YEALINK is not set | ||
669 | # CONFIG_USB_XPAD is not set | ||
670 | # CONFIG_USB_ATI_REMOTE is not set | ||
671 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
672 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
673 | # CONFIG_USB_APPLETOUCH is not set | ||
674 | |||
675 | # | ||
676 | # USB Imaging devices | ||
677 | # | ||
678 | # CONFIG_USB_MDC800 is not set | ||
679 | # CONFIG_USB_MICROTEK is not set | ||
680 | |||
681 | # | ||
682 | # USB Network Adapters | ||
683 | # | ||
684 | # CONFIG_USB_CATC is not set | ||
685 | # CONFIG_USB_KAWETH is not set | ||
686 | # CONFIG_USB_PEGASUS is not set | ||
687 | # CONFIG_USB_RTL8150 is not set | ||
688 | # CONFIG_USB_USBNET_MII is not set | ||
689 | # CONFIG_USB_USBNET is not set | ||
690 | CONFIG_USB_MON=y | ||
691 | |||
692 | # | ||
693 | # USB port drivers | ||
694 | # | ||
695 | |||
696 | # | ||
697 | # USB Serial Converter support | ||
698 | # | ||
699 | # CONFIG_USB_SERIAL is not set | ||
700 | |||
701 | # | ||
702 | # USB Miscellaneous drivers | ||
703 | # | ||
704 | # CONFIG_USB_EMI62 is not set | ||
705 | # CONFIG_USB_EMI26 is not set | ||
706 | # CONFIG_USB_ADUTUX is not set | ||
707 | # CONFIG_USB_AUERSWALD is not set | ||
708 | # CONFIG_USB_RIO500 is not set | ||
709 | # CONFIG_USB_LEGOTOWER is not set | ||
710 | # CONFIG_USB_LCD is not set | ||
711 | # CONFIG_USB_LED is not set | ||
712 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
713 | # CONFIG_USB_CYTHERM is not set | ||
714 | # CONFIG_USB_PHIDGET is not set | ||
715 | # CONFIG_USB_IDMOUSE is not set | ||
716 | # CONFIG_USB_FTDI_ELAN is not set | ||
717 | # CONFIG_USB_APPLEDISPLAY is not set | ||
718 | # CONFIG_USB_LD is not set | ||
719 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
720 | # CONFIG_USB_TEST is not set | ||
721 | |||
722 | # | ||
723 | # USB DSL modem support | ||
724 | # | ||
725 | |||
726 | # | ||
727 | # USB Gadget Support | ||
728 | # | ||
729 | CONFIG_USB_GADGET=y | ||
730 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
731 | CONFIG_USB_GADGET_SELECTED=y | ||
732 | # CONFIG_USB_GADGET_NET2280 is not set | ||
733 | # CONFIG_USB_GADGET_PXA2XX is not set | ||
734 | # CONFIG_USB_GADGET_GOKU is not set | ||
735 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
736 | # CONFIG_USB_GADGET_OMAP is not set | ||
737 | CONFIG_USB_GADGET_AT91=y | ||
738 | CONFIG_USB_AT91=y | ||
739 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
740 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
741 | CONFIG_USB_ZERO=m | ||
742 | # CONFIG_USB_ETH is not set | ||
743 | CONFIG_USB_GADGETFS=m | ||
744 | CONFIG_USB_FILE_STORAGE=m | ||
745 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
746 | CONFIG_USB_G_SERIAL=m | ||
747 | # CONFIG_USB_MIDI_GADGET is not set | ||
748 | |||
749 | # | ||
750 | # MMC/SD Card support | ||
751 | # | ||
752 | # CONFIG_MMC is not set | ||
753 | |||
754 | # | ||
755 | # Real Time Clock | ||
756 | # | ||
757 | CONFIG_RTC_LIB=y | ||
758 | # CONFIG_RTC_CLASS is not set | ||
759 | |||
760 | # | ||
761 | # File systems | ||
762 | # | ||
763 | CONFIG_EXT2_FS=y | ||
764 | # CONFIG_EXT2_FS_XATTR is not set | ||
765 | # CONFIG_EXT2_FS_XIP is not set | ||
766 | # CONFIG_EXT3_FS is not set | ||
767 | # CONFIG_EXT4DEV_FS is not set | ||
768 | # CONFIG_REISERFS_FS is not set | ||
769 | # CONFIG_JFS_FS is not set | ||
770 | # CONFIG_FS_POSIX_ACL is not set | ||
771 | # CONFIG_XFS_FS is not set | ||
772 | # CONFIG_GFS2_FS is not set | ||
773 | # CONFIG_OCFS2_FS is not set | ||
774 | # CONFIG_MINIX_FS is not set | ||
775 | # CONFIG_ROMFS_FS is not set | ||
776 | CONFIG_INOTIFY=y | ||
777 | CONFIG_INOTIFY_USER=y | ||
778 | # CONFIG_QUOTA is not set | ||
779 | CONFIG_DNOTIFY=y | ||
780 | # CONFIG_AUTOFS_FS is not set | ||
781 | # CONFIG_AUTOFS4_FS is not set | ||
782 | # CONFIG_FUSE_FS is not set | ||
783 | |||
784 | # | ||
785 | # CD-ROM/DVD Filesystems | ||
786 | # | ||
787 | # CONFIG_ISO9660_FS is not set | ||
788 | # CONFIG_UDF_FS is not set | ||
789 | |||
790 | # | ||
791 | # DOS/FAT/NT Filesystems | ||
792 | # | ||
793 | CONFIG_FAT_FS=y | ||
794 | # CONFIG_MSDOS_FS is not set | ||
795 | CONFIG_VFAT_FS=y | ||
796 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
797 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
798 | # CONFIG_NTFS_FS is not set | ||
799 | |||
800 | # | ||
801 | # Pseudo filesystems | ||
802 | # | ||
803 | CONFIG_PROC_FS=y | ||
804 | CONFIG_PROC_SYSCTL=y | ||
805 | CONFIG_SYSFS=y | ||
806 | CONFIG_TMPFS=y | ||
807 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
808 | # CONFIG_HUGETLB_PAGE is not set | ||
809 | CONFIG_RAMFS=y | ||
810 | # CONFIG_CONFIGFS_FS is not set | ||
811 | |||
812 | # | ||
813 | # Miscellaneous filesystems | ||
814 | # | ||
815 | # CONFIG_ADFS_FS is not set | ||
816 | # CONFIG_AFFS_FS is not set | ||
817 | # CONFIG_HFS_FS is not set | ||
818 | # CONFIG_HFSPLUS_FS is not set | ||
819 | # CONFIG_BEFS_FS is not set | ||
820 | # CONFIG_BFS_FS is not set | ||
821 | # CONFIG_EFS_FS is not set | ||
822 | CONFIG_CRAMFS=y | ||
823 | # CONFIG_VXFS_FS is not set | ||
824 | # CONFIG_HPFS_FS is not set | ||
825 | # CONFIG_QNX4FS_FS is not set | ||
826 | # CONFIG_SYSV_FS is not set | ||
827 | # CONFIG_UFS_FS is not set | ||
828 | |||
829 | # | ||
830 | # Network File Systems | ||
831 | # | ||
832 | # CONFIG_NFS_FS is not set | ||
833 | # CONFIG_NFSD is not set | ||
834 | # CONFIG_SMB_FS is not set | ||
835 | # CONFIG_CIFS is not set | ||
836 | # CONFIG_NCP_FS is not set | ||
837 | # CONFIG_CODA_FS is not set | ||
838 | # CONFIG_AFS_FS is not set | ||
839 | # CONFIG_9P_FS is not set | ||
840 | |||
841 | # | ||
842 | # Partition Types | ||
843 | # | ||
844 | # CONFIG_PARTITION_ADVANCED is not set | ||
845 | CONFIG_MSDOS_PARTITION=y | ||
846 | |||
847 | # | ||
848 | # Native Language Support | ||
849 | # | ||
850 | CONFIG_NLS=y | ||
851 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
852 | CONFIG_NLS_CODEPAGE_437=y | ||
853 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
854 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
855 | CONFIG_NLS_CODEPAGE_850=y | ||
856 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
857 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
858 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
859 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
860 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
861 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
862 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
863 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
864 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
865 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
866 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
867 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
868 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
869 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
870 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
871 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
872 | # CONFIG_NLS_ISO8859_8 is not set | ||
873 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
874 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
875 | # CONFIG_NLS_ASCII is not set | ||
876 | CONFIG_NLS_ISO8859_1=y | ||
877 | # CONFIG_NLS_ISO8859_2 is not set | ||
878 | # CONFIG_NLS_ISO8859_3 is not set | ||
879 | # CONFIG_NLS_ISO8859_4 is not set | ||
880 | # CONFIG_NLS_ISO8859_5 is not set | ||
881 | # CONFIG_NLS_ISO8859_6 is not set | ||
882 | # CONFIG_NLS_ISO8859_7 is not set | ||
883 | # CONFIG_NLS_ISO8859_9 is not set | ||
884 | # CONFIG_NLS_ISO8859_13 is not set | ||
885 | # CONFIG_NLS_ISO8859_14 is not set | ||
886 | # CONFIG_NLS_ISO8859_15 is not set | ||
887 | # CONFIG_NLS_KOI8_R is not set | ||
888 | # CONFIG_NLS_KOI8_U is not set | ||
889 | # CONFIG_NLS_UTF8 is not set | ||
890 | |||
891 | # | ||
892 | # Profiling support | ||
893 | # | ||
894 | # CONFIG_PROFILING is not set | ||
895 | |||
896 | # | ||
897 | # Kernel hacking | ||
898 | # | ||
899 | # CONFIG_PRINTK_TIME is not set | ||
900 | CONFIG_ENABLE_MUST_CHECK=y | ||
901 | # CONFIG_MAGIC_SYSRQ is not set | ||
902 | # CONFIG_UNUSED_SYMBOLS is not set | ||
903 | CONFIG_DEBUG_KERNEL=y | ||
904 | CONFIG_LOG_BUF_SHIFT=14 | ||
905 | CONFIG_DETECT_SOFTLOCKUP=y | ||
906 | # CONFIG_SCHEDSTATS is not set | ||
907 | # CONFIG_DEBUG_SLAB is not set | ||
908 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
909 | # CONFIG_RT_MUTEX_TESTER is not set | ||
910 | # CONFIG_DEBUG_SPINLOCK is not set | ||
911 | # CONFIG_DEBUG_MUTEXES is not set | ||
912 | # CONFIG_DEBUG_RWSEMS is not set | ||
913 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
914 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
915 | # CONFIG_DEBUG_KOBJECT is not set | ||
916 | CONFIG_DEBUG_BUGVERBOSE=y | ||
917 | # CONFIG_DEBUG_INFO is not set | ||
918 | # CONFIG_DEBUG_FS is not set | ||
919 | # CONFIG_DEBUG_VM is not set | ||
920 | # CONFIG_DEBUG_LIST is not set | ||
921 | CONFIG_FRAME_POINTER=y | ||
922 | CONFIG_FORCED_INLINING=y | ||
923 | # CONFIG_HEADERS_CHECK is not set | ||
924 | # CONFIG_RCU_TORTURE_TEST is not set | ||
925 | CONFIG_DEBUG_USER=y | ||
926 | # CONFIG_DEBUG_WAITQ is not set | ||
927 | # CONFIG_DEBUG_ERRORS is not set | ||
928 | CONFIG_DEBUG_LL=y | ||
929 | # CONFIG_DEBUG_ICEDCC is not set | ||
930 | |||
931 | # | ||
932 | # Security options | ||
933 | # | ||
934 | # CONFIG_KEYS is not set | ||
935 | # CONFIG_SECURITY is not set | ||
936 | |||
937 | # | ||
938 | # Cryptographic options | ||
939 | # | ||
940 | # CONFIG_CRYPTO is not set | ||
941 | |||
942 | # | ||
943 | # Library routines | ||
944 | # | ||
945 | # CONFIG_CRC_CCITT is not set | ||
946 | # CONFIG_CRC16 is not set | ||
947 | CONFIG_CRC32=y | ||
948 | # CONFIG_LIBCRC32C is not set | ||
949 | CONFIG_ZLIB_INFLATE=y | ||
950 | CONFIG_PLIST=y | ||
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig new file mode 100644 index 000000000000..784ad7c0186d --- /dev/null +++ b/arch/arm/configs/at91sam9261ek_defconfig | |||
@@ -0,0 +1,1106 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19-rc6 | ||
4 | # Fri Nov 17 18:00:38 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | # CONFIG_GENERIC_TIME is not set | ||
8 | CONFIG_MMU=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
11 | CONFIG_HARDIRQS_SW_RESEND=y | ||
12 | CONFIG_GENERIC_IRQ_PROBE=y | ||
13 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_VECTORS_BASE=0xffff0000 | ||
17 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
18 | |||
19 | # | ||
20 | # Code maturity level options | ||
21 | # | ||
22 | CONFIG_EXPERIMENTAL=y | ||
23 | CONFIG_BROKEN_ON_SMP=y | ||
24 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_LOCALVERSION="" | ||
30 | # CONFIG_LOCALVERSION_AUTO is not set | ||
31 | # CONFIG_SWAP is not set | ||
32 | CONFIG_SYSVIPC=y | ||
33 | # CONFIG_IPC_NS is not set | ||
34 | # CONFIG_POSIX_MQUEUE is not set | ||
35 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
36 | # CONFIG_TASKSTATS is not set | ||
37 | # CONFIG_UTS_NS is not set | ||
38 | # CONFIG_AUDIT is not set | ||
39 | # CONFIG_IKCONFIG is not set | ||
40 | # CONFIG_RELAY is not set | ||
41 | CONFIG_INITRAMFS_SOURCE="" | ||
42 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
43 | CONFIG_SYSCTL=y | ||
44 | # CONFIG_EMBEDDED is not set | ||
45 | CONFIG_UID16=y | ||
46 | CONFIG_SYSCTL_SYSCALL=y | ||
47 | CONFIG_KALLSYMS=y | ||
48 | # CONFIG_KALLSYMS_ALL is not set | ||
49 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
50 | CONFIG_HOTPLUG=y | ||
51 | CONFIG_PRINTK=y | ||
52 | CONFIG_BUG=y | ||
53 | CONFIG_ELF_CORE=y | ||
54 | CONFIG_BASE_FULL=y | ||
55 | CONFIG_FUTEX=y | ||
56 | CONFIG_EPOLL=y | ||
57 | CONFIG_SHMEM=y | ||
58 | CONFIG_SLAB=y | ||
59 | CONFIG_VM_EVENT_COUNTERS=y | ||
60 | CONFIG_RT_MUTEXES=y | ||
61 | # CONFIG_TINY_SHMEM is not set | ||
62 | CONFIG_BASE_SMALL=0 | ||
63 | # CONFIG_SLOB is not set | ||
64 | |||
65 | # | ||
66 | # Loadable module support | ||
67 | # | ||
68 | CONFIG_MODULES=y | ||
69 | CONFIG_MODULE_UNLOAD=y | ||
70 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
71 | # CONFIG_MODVERSIONS is not set | ||
72 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
73 | CONFIG_KMOD=y | ||
74 | |||
75 | # | ||
76 | # Block layer | ||
77 | # | ||
78 | CONFIG_BLOCK=y | ||
79 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
80 | |||
81 | # | ||
82 | # IO Schedulers | ||
83 | # | ||
84 | CONFIG_IOSCHED_NOOP=y | ||
85 | CONFIG_IOSCHED_AS=y | ||
86 | # CONFIG_IOSCHED_DEADLINE is not set | ||
87 | # CONFIG_IOSCHED_CFQ is not set | ||
88 | CONFIG_DEFAULT_AS=y | ||
89 | # CONFIG_DEFAULT_DEADLINE is not set | ||
90 | # CONFIG_DEFAULT_CFQ is not set | ||
91 | # CONFIG_DEFAULT_NOOP is not set | ||
92 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
93 | |||
94 | # | ||
95 | # System Type | ||
96 | # | ||
97 | # CONFIG_ARCH_AAEC2000 is not set | ||
98 | # CONFIG_ARCH_INTEGRATOR is not set | ||
99 | # CONFIG_ARCH_REALVIEW is not set | ||
100 | # CONFIG_ARCH_VERSATILE is not set | ||
101 | CONFIG_ARCH_AT91=y | ||
102 | # CONFIG_ARCH_CLPS7500 is not set | ||
103 | # CONFIG_ARCH_CLPS711X is not set | ||
104 | # CONFIG_ARCH_CO285 is not set | ||
105 | # CONFIG_ARCH_EBSA110 is not set | ||
106 | # CONFIG_ARCH_EP93XX is not set | ||
107 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
108 | # CONFIG_ARCH_NETX is not set | ||
109 | # CONFIG_ARCH_H720X is not set | ||
110 | # CONFIG_ARCH_IMX is not set | ||
111 | # CONFIG_ARCH_IOP32X is not set | ||
112 | # CONFIG_ARCH_IOP33X is not set | ||
113 | # CONFIG_ARCH_IXP4XX is not set | ||
114 | # CONFIG_ARCH_IXP2000 is not set | ||
115 | # CONFIG_ARCH_IXP23XX is not set | ||
116 | # CONFIG_ARCH_L7200 is not set | ||
117 | # CONFIG_ARCH_PNX4008 is not set | ||
118 | # CONFIG_ARCH_PXA is not set | ||
119 | # CONFIG_ARCH_RPC is not set | ||
120 | # CONFIG_ARCH_SA1100 is not set | ||
121 | # CONFIG_ARCH_S3C2410 is not set | ||
122 | # CONFIG_ARCH_SHARK is not set | ||
123 | # CONFIG_ARCH_LH7A40X is not set | ||
124 | # CONFIG_ARCH_OMAP is not set | ||
125 | |||
126 | # | ||
127 | # Atmel AT91 System-on-Chip | ||
128 | # | ||
129 | # CONFIG_ARCH_AT91RM9200 is not set | ||
130 | # CONFIG_ARCH_AT91SAM9260 is not set | ||
131 | CONFIG_ARCH_AT91SAM9261=y | ||
132 | |||
133 | # | ||
134 | # AT91SAM9261 Board Type | ||
135 | # | ||
136 | CONFIG_MACH_AT91SAM9261EK=y | ||
137 | |||
138 | # | ||
139 | # AT91 Board Options | ||
140 | # | ||
141 | # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set | ||
142 | |||
143 | # | ||
144 | # AT91 Feature Selections | ||
145 | # | ||
146 | # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set | ||
147 | |||
148 | # | ||
149 | # Processor Type | ||
150 | # | ||
151 | CONFIG_CPU_32=y | ||
152 | CONFIG_CPU_ARM926T=y | ||
153 | CONFIG_CPU_32v5=y | ||
154 | CONFIG_CPU_ABRT_EV5TJ=y | ||
155 | CONFIG_CPU_CACHE_VIVT=y | ||
156 | CONFIG_CPU_COPY_V4WB=y | ||
157 | CONFIG_CPU_TLB_V4WBI=y | ||
158 | CONFIG_CPU_CP15=y | ||
159 | CONFIG_CPU_CP15_MMU=y | ||
160 | |||
161 | # | ||
162 | # Processor Features | ||
163 | # | ||
164 | # CONFIG_ARM_THUMB is not set | ||
165 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
166 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
167 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
168 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
169 | |||
170 | # | ||
171 | # Bus support | ||
172 | # | ||
173 | |||
174 | # | ||
175 | # PCCARD (PCMCIA/CardBus) support | ||
176 | # | ||
177 | # CONFIG_PCCARD is not set | ||
178 | |||
179 | # | ||
180 | # Kernel Features | ||
181 | # | ||
182 | # CONFIG_PREEMPT is not set | ||
183 | # CONFIG_NO_IDLE_HZ is not set | ||
184 | CONFIG_HZ=100 | ||
185 | # CONFIG_AEABI is not set | ||
186 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
187 | CONFIG_SELECT_MEMORY_MODEL=y | ||
188 | CONFIG_FLATMEM_MANUAL=y | ||
189 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
190 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
191 | CONFIG_FLATMEM=y | ||
192 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
193 | # CONFIG_SPARSEMEM_STATIC is not set | ||
194 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
195 | # CONFIG_RESOURCES_64BIT is not set | ||
196 | # CONFIG_LEDS is not set | ||
197 | CONFIG_ALIGNMENT_TRAP=y | ||
198 | |||
199 | # | ||
200 | # Boot options | ||
201 | # | ||
202 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
203 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
204 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | ||
205 | # CONFIG_XIP_KERNEL is not set | ||
206 | |||
207 | # | ||
208 | # Floating point emulation | ||
209 | # | ||
210 | |||
211 | # | ||
212 | # At least one emulation must be selected | ||
213 | # | ||
214 | CONFIG_FPE_NWFPE=y | ||
215 | # CONFIG_FPE_NWFPE_XP is not set | ||
216 | # CONFIG_FPE_FASTFPE is not set | ||
217 | # CONFIG_VFP is not set | ||
218 | |||
219 | # | ||
220 | # Userspace binary formats | ||
221 | # | ||
222 | CONFIG_BINFMT_ELF=y | ||
223 | # CONFIG_BINFMT_AOUT is not set | ||
224 | # CONFIG_BINFMT_MISC is not set | ||
225 | # CONFIG_ARTHUR is not set | ||
226 | |||
227 | # | ||
228 | # Power management options | ||
229 | # | ||
230 | # CONFIG_PM is not set | ||
231 | # CONFIG_APM is not set | ||
232 | |||
233 | # | ||
234 | # Networking | ||
235 | # | ||
236 | CONFIG_NET=y | ||
237 | |||
238 | # | ||
239 | # Networking options | ||
240 | # | ||
241 | # CONFIG_NETDEBUG is not set | ||
242 | CONFIG_PACKET=y | ||
243 | # CONFIG_PACKET_MMAP is not set | ||
244 | CONFIG_UNIX=y | ||
245 | CONFIG_XFRM=y | ||
246 | # CONFIG_XFRM_USER is not set | ||
247 | # CONFIG_XFRM_SUB_POLICY is not set | ||
248 | # CONFIG_NET_KEY is not set | ||
249 | CONFIG_INET=y | ||
250 | # CONFIG_IP_MULTICAST is not set | ||
251 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
252 | CONFIG_IP_FIB_HASH=y | ||
253 | CONFIG_IP_PNP=y | ||
254 | # CONFIG_IP_PNP_DHCP is not set | ||
255 | CONFIG_IP_PNP_BOOTP=y | ||
256 | # CONFIG_IP_PNP_RARP is not set | ||
257 | # CONFIG_NET_IPIP is not set | ||
258 | # CONFIG_NET_IPGRE is not set | ||
259 | # CONFIG_ARPD is not set | ||
260 | # CONFIG_SYN_COOKIES is not set | ||
261 | # CONFIG_INET_AH is not set | ||
262 | # CONFIG_INET_ESP is not set | ||
263 | # CONFIG_INET_IPCOMP is not set | ||
264 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
265 | # CONFIG_INET_TUNNEL is not set | ||
266 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
267 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
268 | CONFIG_INET_XFRM_MODE_BEET=y | ||
269 | CONFIG_INET_DIAG=y | ||
270 | CONFIG_INET_TCP_DIAG=y | ||
271 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
272 | CONFIG_TCP_CONG_CUBIC=y | ||
273 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
274 | # CONFIG_IPV6 is not set | ||
275 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
276 | # CONFIG_INET6_TUNNEL is not set | ||
277 | # CONFIG_NETWORK_SECMARK is not set | ||
278 | # CONFIG_NETFILTER is not set | ||
279 | |||
280 | # | ||
281 | # DCCP Configuration (EXPERIMENTAL) | ||
282 | # | ||
283 | # CONFIG_IP_DCCP is not set | ||
284 | |||
285 | # | ||
286 | # SCTP Configuration (EXPERIMENTAL) | ||
287 | # | ||
288 | # CONFIG_IP_SCTP is not set | ||
289 | |||
290 | # | ||
291 | # TIPC Configuration (EXPERIMENTAL) | ||
292 | # | ||
293 | # CONFIG_TIPC is not set | ||
294 | # CONFIG_ATM is not set | ||
295 | # CONFIG_BRIDGE is not set | ||
296 | # CONFIG_VLAN_8021Q is not set | ||
297 | # CONFIG_DECNET is not set | ||
298 | # CONFIG_LLC2 is not set | ||
299 | # CONFIG_IPX is not set | ||
300 | # CONFIG_ATALK is not set | ||
301 | # CONFIG_X25 is not set | ||
302 | # CONFIG_LAPB is not set | ||
303 | # CONFIG_ECONET is not set | ||
304 | # CONFIG_WAN_ROUTER is not set | ||
305 | |||
306 | # | ||
307 | # QoS and/or fair queueing | ||
308 | # | ||
309 | # CONFIG_NET_SCHED is not set | ||
310 | |||
311 | # | ||
312 | # Network testing | ||
313 | # | ||
314 | # CONFIG_NET_PKTGEN is not set | ||
315 | # CONFIG_HAMRADIO is not set | ||
316 | # CONFIG_IRDA is not set | ||
317 | # CONFIG_BT is not set | ||
318 | # CONFIG_IEEE80211 is not set | ||
319 | |||
320 | # | ||
321 | # Device Drivers | ||
322 | # | ||
323 | |||
324 | # | ||
325 | # Generic Driver Options | ||
326 | # | ||
327 | CONFIG_STANDALONE=y | ||
328 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
329 | # CONFIG_FW_LOADER is not set | ||
330 | # CONFIG_DEBUG_DRIVER is not set | ||
331 | # CONFIG_SYS_HYPERVISOR is not set | ||
332 | |||
333 | # | ||
334 | # Connector - unified userspace <-> kernelspace linker | ||
335 | # | ||
336 | # CONFIG_CONNECTOR is not set | ||
337 | |||
338 | # | ||
339 | # Memory Technology Devices (MTD) | ||
340 | # | ||
341 | CONFIG_MTD=y | ||
342 | # CONFIG_MTD_DEBUG is not set | ||
343 | # CONFIG_MTD_CONCAT is not set | ||
344 | CONFIG_MTD_PARTITIONS=y | ||
345 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
346 | CONFIG_MTD_CMDLINE_PARTS=y | ||
347 | # CONFIG_MTD_AFS_PARTS is not set | ||
348 | |||
349 | # | ||
350 | # User Modules And Translation Layers | ||
351 | # | ||
352 | # CONFIG_MTD_CHAR is not set | ||
353 | CONFIG_MTD_BLOCK=y | ||
354 | # CONFIG_FTL is not set | ||
355 | # CONFIG_NFTL is not set | ||
356 | # CONFIG_INFTL is not set | ||
357 | # CONFIG_RFD_FTL is not set | ||
358 | # CONFIG_SSFDC is not set | ||
359 | |||
360 | # | ||
361 | # RAM/ROM/Flash chip drivers | ||
362 | # | ||
363 | # CONFIG_MTD_CFI is not set | ||
364 | # CONFIG_MTD_JEDECPROBE is not set | ||
365 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
366 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
367 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
368 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
369 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
370 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
371 | CONFIG_MTD_CFI_I1=y | ||
372 | CONFIG_MTD_CFI_I2=y | ||
373 | # CONFIG_MTD_CFI_I4 is not set | ||
374 | # CONFIG_MTD_CFI_I8 is not set | ||
375 | # CONFIG_MTD_RAM is not set | ||
376 | # CONFIG_MTD_ROM is not set | ||
377 | # CONFIG_MTD_ABSENT is not set | ||
378 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
379 | |||
380 | # | ||
381 | # Mapping drivers for chip access | ||
382 | # | ||
383 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
384 | # CONFIG_MTD_PLATRAM is not set | ||
385 | |||
386 | # | ||
387 | # Self-contained MTD device drivers | ||
388 | # | ||
389 | # CONFIG_MTD_SLRAM is not set | ||
390 | # CONFIG_MTD_PHRAM is not set | ||
391 | # CONFIG_MTD_MTDRAM is not set | ||
392 | # CONFIG_MTD_BLOCK2MTD is not set | ||
393 | |||
394 | # | ||
395 | # Disk-On-Chip Device Drivers | ||
396 | # | ||
397 | # CONFIG_MTD_DOC2000 is not set | ||
398 | # CONFIG_MTD_DOC2001 is not set | ||
399 | # CONFIG_MTD_DOC2001PLUS is not set | ||
400 | |||
401 | # | ||
402 | # NAND Flash Device Drivers | ||
403 | # | ||
404 | CONFIG_MTD_NAND=y | ||
405 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
406 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
407 | CONFIG_MTD_NAND_IDS=y | ||
408 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
409 | CONFIG_MTD_NAND_AT91=y | ||
410 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
411 | |||
412 | # | ||
413 | # OneNAND Flash Device Drivers | ||
414 | # | ||
415 | # CONFIG_MTD_ONENAND is not set | ||
416 | |||
417 | # | ||
418 | # Parallel port support | ||
419 | # | ||
420 | # CONFIG_PARPORT is not set | ||
421 | |||
422 | # | ||
423 | # Plug and Play support | ||
424 | # | ||
425 | |||
426 | # | ||
427 | # Block devices | ||
428 | # | ||
429 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
430 | # CONFIG_BLK_DEV_LOOP is not set | ||
431 | # CONFIG_BLK_DEV_NBD is not set | ||
432 | # CONFIG_BLK_DEV_UB is not set | ||
433 | CONFIG_BLK_DEV_RAM=y | ||
434 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
435 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
436 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
437 | CONFIG_BLK_DEV_INITRD=y | ||
438 | # CONFIG_CDROM_PKTCDVD is not set | ||
439 | # CONFIG_ATA_OVER_ETH is not set | ||
440 | |||
441 | # | ||
442 | # SCSI device support | ||
443 | # | ||
444 | # CONFIG_RAID_ATTRS is not set | ||
445 | CONFIG_SCSI=y | ||
446 | # CONFIG_SCSI_NETLINK is not set | ||
447 | CONFIG_SCSI_PROC_FS=y | ||
448 | |||
449 | # | ||
450 | # SCSI support type (disk, tape, CD-ROM) | ||
451 | # | ||
452 | CONFIG_BLK_DEV_SD=y | ||
453 | # CONFIG_CHR_DEV_ST is not set | ||
454 | # CONFIG_CHR_DEV_OSST is not set | ||
455 | # CONFIG_BLK_DEV_SR is not set | ||
456 | # CONFIG_CHR_DEV_SG is not set | ||
457 | # CONFIG_CHR_DEV_SCH is not set | ||
458 | |||
459 | # | ||
460 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
461 | # | ||
462 | CONFIG_SCSI_MULTI_LUN=y | ||
463 | # CONFIG_SCSI_CONSTANTS is not set | ||
464 | # CONFIG_SCSI_LOGGING is not set | ||
465 | |||
466 | # | ||
467 | # SCSI Transports | ||
468 | # | ||
469 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
470 | # CONFIG_SCSI_FC_ATTRS is not set | ||
471 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
472 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
473 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
474 | |||
475 | # | ||
476 | # SCSI low-level drivers | ||
477 | # | ||
478 | # CONFIG_ISCSI_TCP is not set | ||
479 | # CONFIG_SCSI_DEBUG is not set | ||
480 | |||
481 | # | ||
482 | # Multi-device support (RAID and LVM) | ||
483 | # | ||
484 | # CONFIG_MD is not set | ||
485 | |||
486 | # | ||
487 | # Fusion MPT device support | ||
488 | # | ||
489 | # CONFIG_FUSION is not set | ||
490 | |||
491 | # | ||
492 | # IEEE 1394 (FireWire) support | ||
493 | # | ||
494 | |||
495 | # | ||
496 | # I2O device support | ||
497 | # | ||
498 | |||
499 | # | ||
500 | # Network device support | ||
501 | # | ||
502 | CONFIG_NETDEVICES=y | ||
503 | # CONFIG_DUMMY is not set | ||
504 | # CONFIG_BONDING is not set | ||
505 | # CONFIG_EQUALIZER is not set | ||
506 | # CONFIG_TUN is not set | ||
507 | |||
508 | # | ||
509 | # PHY device support | ||
510 | # | ||
511 | # CONFIG_PHYLIB is not set | ||
512 | |||
513 | # | ||
514 | # Ethernet (10 or 100Mbit) | ||
515 | # | ||
516 | CONFIG_NET_ETHERNET=y | ||
517 | CONFIG_MII=y | ||
518 | # CONFIG_SMC91X is not set | ||
519 | CONFIG_DM9000=y | ||
520 | |||
521 | # | ||
522 | # Ethernet (1000 Mbit) | ||
523 | # | ||
524 | |||
525 | # | ||
526 | # Ethernet (10000 Mbit) | ||
527 | # | ||
528 | |||
529 | # | ||
530 | # Token Ring devices | ||
531 | # | ||
532 | |||
533 | # | ||
534 | # Wireless LAN (non-hamradio) | ||
535 | # | ||
536 | # CONFIG_NET_RADIO is not set | ||
537 | |||
538 | # | ||
539 | # Wan interfaces | ||
540 | # | ||
541 | # CONFIG_WAN is not set | ||
542 | # CONFIG_PPP is not set | ||
543 | # CONFIG_SLIP is not set | ||
544 | # CONFIG_SHAPER is not set | ||
545 | # CONFIG_NETCONSOLE is not set | ||
546 | # CONFIG_NETPOLL is not set | ||
547 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
548 | |||
549 | # | ||
550 | # ISDN subsystem | ||
551 | # | ||
552 | # CONFIG_ISDN is not set | ||
553 | |||
554 | # | ||
555 | # Input device support | ||
556 | # | ||
557 | CONFIG_INPUT=y | ||
558 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
559 | |||
560 | # | ||
561 | # Userland interfaces | ||
562 | # | ||
563 | CONFIG_INPUT_MOUSEDEV=y | ||
564 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
565 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
566 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
567 | # CONFIG_INPUT_JOYDEV is not set | ||
568 | # CONFIG_INPUT_TSDEV is not set | ||
569 | # CONFIG_INPUT_EVDEV is not set | ||
570 | # CONFIG_INPUT_EVBUG is not set | ||
571 | |||
572 | # | ||
573 | # Input Device Drivers | ||
574 | # | ||
575 | # CONFIG_INPUT_KEYBOARD is not set | ||
576 | # CONFIG_INPUT_MOUSE is not set | ||
577 | # CONFIG_INPUT_JOYSTICK is not set | ||
578 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
579 | # CONFIG_INPUT_MISC is not set | ||
580 | |||
581 | # | ||
582 | # Hardware I/O ports | ||
583 | # | ||
584 | # CONFIG_SERIO is not set | ||
585 | # CONFIG_GAMEPORT is not set | ||
586 | |||
587 | # | ||
588 | # Character devices | ||
589 | # | ||
590 | CONFIG_VT=y | ||
591 | CONFIG_VT_CONSOLE=y | ||
592 | CONFIG_HW_CONSOLE=y | ||
593 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
594 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
595 | |||
596 | # | ||
597 | # Serial drivers | ||
598 | # | ||
599 | # CONFIG_SERIAL_8250 is not set | ||
600 | |||
601 | # | ||
602 | # Non-8250 serial port support | ||
603 | # | ||
604 | CONFIG_SERIAL_ATMEL=y | ||
605 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
606 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | ||
607 | CONFIG_SERIAL_CORE=y | ||
608 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
609 | CONFIG_UNIX98_PTYS=y | ||
610 | CONFIG_LEGACY_PTYS=y | ||
611 | CONFIG_LEGACY_PTY_COUNT=256 | ||
612 | |||
613 | # | ||
614 | # IPMI | ||
615 | # | ||
616 | # CONFIG_IPMI_HANDLER is not set | ||
617 | |||
618 | # | ||
619 | # Watchdog Cards | ||
620 | # | ||
621 | CONFIG_WATCHDOG=y | ||
622 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
623 | |||
624 | # | ||
625 | # Watchdog Device Drivers | ||
626 | # | ||
627 | # CONFIG_SOFT_WATCHDOG is not set | ||
628 | |||
629 | # | ||
630 | # USB-based Watchdog Cards | ||
631 | # | ||
632 | # CONFIG_USBPCWATCHDOG is not set | ||
633 | CONFIG_HW_RANDOM=y | ||
634 | # CONFIG_NVRAM is not set | ||
635 | # CONFIG_DTLK is not set | ||
636 | # CONFIG_R3964 is not set | ||
637 | |||
638 | # | ||
639 | # Ftape, the floppy tape device driver | ||
640 | # | ||
641 | # CONFIG_RAW_DRIVER is not set | ||
642 | |||
643 | # | ||
644 | # TPM devices | ||
645 | # | ||
646 | # CONFIG_TCG_TPM is not set | ||
647 | |||
648 | # | ||
649 | # I2C support | ||
650 | # | ||
651 | CONFIG_I2C=y | ||
652 | CONFIG_I2C_CHARDEV=y | ||
653 | |||
654 | # | ||
655 | # I2C Algorithms | ||
656 | # | ||
657 | # CONFIG_I2C_ALGOBIT is not set | ||
658 | # CONFIG_I2C_ALGOPCF is not set | ||
659 | # CONFIG_I2C_ALGOPCA is not set | ||
660 | |||
661 | # | ||
662 | # I2C Hardware Bus support | ||
663 | # | ||
664 | CONFIG_I2C_AT91=y | ||
665 | # CONFIG_I2C_OCORES is not set | ||
666 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
667 | # CONFIG_I2C_STUB is not set | ||
668 | # CONFIG_I2C_PCA is not set | ||
669 | # CONFIG_I2C_PCA_ISA is not set | ||
670 | |||
671 | # | ||
672 | # Miscellaneous I2C Chip support | ||
673 | # | ||
674 | # CONFIG_SENSORS_DS1337 is not set | ||
675 | # CONFIG_SENSORS_DS1374 is not set | ||
676 | # CONFIG_SENSORS_EEPROM is not set | ||
677 | # CONFIG_SENSORS_PCF8574 is not set | ||
678 | # CONFIG_SENSORS_PCA9539 is not set | ||
679 | # CONFIG_SENSORS_PCF8591 is not set | ||
680 | # CONFIG_SENSORS_MAX6875 is not set | ||
681 | # CONFIG_I2C_DEBUG_CORE is not set | ||
682 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
683 | # CONFIG_I2C_DEBUG_BUS is not set | ||
684 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
685 | |||
686 | # | ||
687 | # SPI support | ||
688 | # | ||
689 | # CONFIG_SPI is not set | ||
690 | # CONFIG_SPI_MASTER is not set | ||
691 | |||
692 | # | ||
693 | # Dallas's 1-wire bus | ||
694 | # | ||
695 | # CONFIG_W1 is not set | ||
696 | |||
697 | # | ||
698 | # Hardware Monitoring support | ||
699 | # | ||
700 | # CONFIG_HWMON is not set | ||
701 | # CONFIG_HWMON_VID is not set | ||
702 | |||
703 | # | ||
704 | # Misc devices | ||
705 | # | ||
706 | # CONFIG_TIFM_CORE is not set | ||
707 | |||
708 | # | ||
709 | # LED devices | ||
710 | # | ||
711 | # CONFIG_NEW_LEDS is not set | ||
712 | |||
713 | # | ||
714 | # LED drivers | ||
715 | # | ||
716 | |||
717 | # | ||
718 | # LED Triggers | ||
719 | # | ||
720 | |||
721 | # | ||
722 | # Multimedia devices | ||
723 | # | ||
724 | # CONFIG_VIDEO_DEV is not set | ||
725 | |||
726 | # | ||
727 | # Digital Video Broadcasting Devices | ||
728 | # | ||
729 | # CONFIG_DVB is not set | ||
730 | # CONFIG_USB_DABUSB is not set | ||
731 | |||
732 | # | ||
733 | # Graphics support | ||
734 | # | ||
735 | # CONFIG_FIRMWARE_EDID is not set | ||
736 | # CONFIG_FB is not set | ||
737 | |||
738 | # | ||
739 | # Console display driver support | ||
740 | # | ||
741 | # CONFIG_VGA_CONSOLE is not set | ||
742 | CONFIG_DUMMY_CONSOLE=y | ||
743 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
744 | |||
745 | # | ||
746 | # Sound | ||
747 | # | ||
748 | # CONFIG_SOUND is not set | ||
749 | |||
750 | # | ||
751 | # USB support | ||
752 | # | ||
753 | CONFIG_USB_ARCH_HAS_HCD=y | ||
754 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
755 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
756 | CONFIG_USB=y | ||
757 | # CONFIG_USB_DEBUG is not set | ||
758 | |||
759 | # | ||
760 | # Miscellaneous USB options | ||
761 | # | ||
762 | CONFIG_USB_DEVICEFS=y | ||
763 | # CONFIG_USB_BANDWIDTH is not set | ||
764 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
765 | # CONFIG_USB_OTG is not set | ||
766 | |||
767 | # | ||
768 | # USB Host Controller Drivers | ||
769 | # | ||
770 | # CONFIG_USB_ISP116X_HCD is not set | ||
771 | CONFIG_USB_OHCI_HCD=y | ||
772 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
773 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
774 | # CONFIG_USB_SL811_HCD is not set | ||
775 | |||
776 | # | ||
777 | # USB Device Class drivers | ||
778 | # | ||
779 | # CONFIG_USB_ACM is not set | ||
780 | # CONFIG_USB_PRINTER is not set | ||
781 | |||
782 | # | ||
783 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
784 | # | ||
785 | |||
786 | # | ||
787 | # may also be needed; see USB_STORAGE Help for more information | ||
788 | # | ||
789 | CONFIG_USB_STORAGE=y | ||
790 | CONFIG_USB_STORAGE_DEBUG=y | ||
791 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
792 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
793 | # CONFIG_USB_STORAGE_DPCM is not set | ||
794 | # CONFIG_USB_STORAGE_USBAT is not set | ||
795 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
796 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
797 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
798 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
799 | # CONFIG_USB_STORAGE_KARMA is not set | ||
800 | # CONFIG_USB_LIBUSUAL is not set | ||
801 | |||
802 | # | ||
803 | # USB Input Devices | ||
804 | # | ||
805 | # CONFIG_USB_HID is not set | ||
806 | |||
807 | # | ||
808 | # USB HID Boot Protocol drivers | ||
809 | # | ||
810 | # CONFIG_USB_KBD is not set | ||
811 | # CONFIG_USB_MOUSE is not set | ||
812 | # CONFIG_USB_AIPTEK is not set | ||
813 | # CONFIG_USB_WACOM is not set | ||
814 | # CONFIG_USB_ACECAD is not set | ||
815 | # CONFIG_USB_KBTAB is not set | ||
816 | # CONFIG_USB_POWERMATE is not set | ||
817 | # CONFIG_USB_TOUCHSCREEN is not set | ||
818 | # CONFIG_USB_YEALINK is not set | ||
819 | # CONFIG_USB_XPAD is not set | ||
820 | # CONFIG_USB_ATI_REMOTE is not set | ||
821 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
822 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
823 | # CONFIG_USB_APPLETOUCH is not set | ||
824 | |||
825 | # | ||
826 | # USB Imaging devices | ||
827 | # | ||
828 | # CONFIG_USB_MDC800 is not set | ||
829 | # CONFIG_USB_MICROTEK is not set | ||
830 | |||
831 | # | ||
832 | # USB Network Adapters | ||
833 | # | ||
834 | # CONFIG_USB_CATC is not set | ||
835 | # CONFIG_USB_KAWETH is not set | ||
836 | # CONFIG_USB_PEGASUS is not set | ||
837 | # CONFIG_USB_RTL8150 is not set | ||
838 | # CONFIG_USB_USBNET_MII is not set | ||
839 | # CONFIG_USB_USBNET is not set | ||
840 | CONFIG_USB_MON=y | ||
841 | |||
842 | # | ||
843 | # USB port drivers | ||
844 | # | ||
845 | |||
846 | # | ||
847 | # USB Serial Converter support | ||
848 | # | ||
849 | # CONFIG_USB_SERIAL is not set | ||
850 | |||
851 | # | ||
852 | # USB Miscellaneous drivers | ||
853 | # | ||
854 | # CONFIG_USB_EMI62 is not set | ||
855 | # CONFIG_USB_EMI26 is not set | ||
856 | # CONFIG_USB_ADUTUX is not set | ||
857 | # CONFIG_USB_AUERSWALD is not set | ||
858 | # CONFIG_USB_RIO500 is not set | ||
859 | # CONFIG_USB_LEGOTOWER is not set | ||
860 | # CONFIG_USB_LCD is not set | ||
861 | # CONFIG_USB_LED is not set | ||
862 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
863 | # CONFIG_USB_CYTHERM is not set | ||
864 | # CONFIG_USB_PHIDGET is not set | ||
865 | # CONFIG_USB_IDMOUSE is not set | ||
866 | # CONFIG_USB_FTDI_ELAN is not set | ||
867 | # CONFIG_USB_APPLEDISPLAY is not set | ||
868 | # CONFIG_USB_LD is not set | ||
869 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
870 | # CONFIG_USB_TEST is not set | ||
871 | |||
872 | # | ||
873 | # USB DSL modem support | ||
874 | # | ||
875 | |||
876 | # | ||
877 | # USB Gadget Support | ||
878 | # | ||
879 | CONFIG_USB_GADGET=y | ||
880 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
881 | CONFIG_USB_GADGET_SELECTED=y | ||
882 | # CONFIG_USB_GADGET_NET2280 is not set | ||
883 | # CONFIG_USB_GADGET_PXA2XX is not set | ||
884 | # CONFIG_USB_GADGET_GOKU is not set | ||
885 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
886 | # CONFIG_USB_GADGET_OMAP is not set | ||
887 | CONFIG_USB_GADGET_AT91=y | ||
888 | CONFIG_USB_AT91=y | ||
889 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
890 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
891 | CONFIG_USB_ZERO=m | ||
892 | # CONFIG_USB_ETH is not set | ||
893 | CONFIG_USB_GADGETFS=m | ||
894 | CONFIG_USB_FILE_STORAGE=m | ||
895 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
896 | CONFIG_USB_G_SERIAL=m | ||
897 | # CONFIG_USB_MIDI_GADGET is not set | ||
898 | |||
899 | # | ||
900 | # MMC/SD Card support | ||
901 | # | ||
902 | CONFIG_MMC=y | ||
903 | # CONFIG_MMC_DEBUG is not set | ||
904 | CONFIG_MMC_BLOCK=y | ||
905 | CONFIG_MMC_AT91=m | ||
906 | # CONFIG_MMC_TIFM_SD is not set | ||
907 | |||
908 | # | ||
909 | # Real Time Clock | ||
910 | # | ||
911 | CONFIG_RTC_LIB=y | ||
912 | # CONFIG_RTC_CLASS is not set | ||
913 | |||
914 | # | ||
915 | # File systems | ||
916 | # | ||
917 | CONFIG_EXT2_FS=y | ||
918 | # CONFIG_EXT2_FS_XATTR is not set | ||
919 | # CONFIG_EXT2_FS_XIP is not set | ||
920 | # CONFIG_EXT3_FS is not set | ||
921 | # CONFIG_EXT4DEV_FS is not set | ||
922 | # CONFIG_REISERFS_FS is not set | ||
923 | # CONFIG_JFS_FS is not set | ||
924 | # CONFIG_FS_POSIX_ACL is not set | ||
925 | # CONFIG_XFS_FS is not set | ||
926 | # CONFIG_GFS2_FS is not set | ||
927 | # CONFIG_OCFS2_FS is not set | ||
928 | # CONFIG_MINIX_FS is not set | ||
929 | # CONFIG_ROMFS_FS is not set | ||
930 | CONFIG_INOTIFY=y | ||
931 | CONFIG_INOTIFY_USER=y | ||
932 | # CONFIG_QUOTA is not set | ||
933 | CONFIG_DNOTIFY=y | ||
934 | # CONFIG_AUTOFS_FS is not set | ||
935 | # CONFIG_AUTOFS4_FS is not set | ||
936 | # CONFIG_FUSE_FS is not set | ||
937 | |||
938 | # | ||
939 | # CD-ROM/DVD Filesystems | ||
940 | # | ||
941 | # CONFIG_ISO9660_FS is not set | ||
942 | # CONFIG_UDF_FS is not set | ||
943 | |||
944 | # | ||
945 | # DOS/FAT/NT Filesystems | ||
946 | # | ||
947 | CONFIG_FAT_FS=y | ||
948 | # CONFIG_MSDOS_FS is not set | ||
949 | CONFIG_VFAT_FS=y | ||
950 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
951 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
952 | # CONFIG_NTFS_FS is not set | ||
953 | |||
954 | # | ||
955 | # Pseudo filesystems | ||
956 | # | ||
957 | CONFIG_PROC_FS=y | ||
958 | CONFIG_PROC_SYSCTL=y | ||
959 | CONFIG_SYSFS=y | ||
960 | CONFIG_TMPFS=y | ||
961 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
962 | # CONFIG_HUGETLB_PAGE is not set | ||
963 | CONFIG_RAMFS=y | ||
964 | # CONFIG_CONFIGFS_FS is not set | ||
965 | |||
966 | # | ||
967 | # Miscellaneous filesystems | ||
968 | # | ||
969 | # CONFIG_ADFS_FS is not set | ||
970 | # CONFIG_AFFS_FS is not set | ||
971 | # CONFIG_HFS_FS is not set | ||
972 | # CONFIG_HFSPLUS_FS is not set | ||
973 | # CONFIG_BEFS_FS is not set | ||
974 | # CONFIG_BFS_FS is not set | ||
975 | # CONFIG_EFS_FS is not set | ||
976 | # CONFIG_JFFS_FS is not set | ||
977 | # CONFIG_JFFS2_FS is not set | ||
978 | CONFIG_CRAMFS=y | ||
979 | # CONFIG_VXFS_FS is not set | ||
980 | # CONFIG_HPFS_FS is not set | ||
981 | # CONFIG_QNX4FS_FS is not set | ||
982 | # CONFIG_SYSV_FS is not set | ||
983 | # CONFIG_UFS_FS is not set | ||
984 | |||
985 | # | ||
986 | # Network File Systems | ||
987 | # | ||
988 | # CONFIG_NFS_FS is not set | ||
989 | # CONFIG_NFSD is not set | ||
990 | # CONFIG_SMB_FS is not set | ||
991 | # CONFIG_CIFS is not set | ||
992 | # CONFIG_NCP_FS is not set | ||
993 | # CONFIG_CODA_FS is not set | ||
994 | # CONFIG_AFS_FS is not set | ||
995 | # CONFIG_9P_FS is not set | ||
996 | |||
997 | # | ||
998 | # Partition Types | ||
999 | # | ||
1000 | # CONFIG_PARTITION_ADVANCED is not set | ||
1001 | CONFIG_MSDOS_PARTITION=y | ||
1002 | |||
1003 | # | ||
1004 | # Native Language Support | ||
1005 | # | ||
1006 | CONFIG_NLS=y | ||
1007 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1008 | CONFIG_NLS_CODEPAGE_437=y | ||
1009 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1010 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1011 | CONFIG_NLS_CODEPAGE_850=y | ||
1012 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1013 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1014 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1015 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1016 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1017 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1018 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1019 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1020 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1021 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1022 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1023 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1024 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1025 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1026 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1027 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1028 | # CONFIG_NLS_ISO8859_8 is not set | ||
1029 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1030 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1031 | # CONFIG_NLS_ASCII is not set | ||
1032 | CONFIG_NLS_ISO8859_1=y | ||
1033 | # CONFIG_NLS_ISO8859_2 is not set | ||
1034 | # CONFIG_NLS_ISO8859_3 is not set | ||
1035 | # CONFIG_NLS_ISO8859_4 is not set | ||
1036 | # CONFIG_NLS_ISO8859_5 is not set | ||
1037 | # CONFIG_NLS_ISO8859_6 is not set | ||
1038 | # CONFIG_NLS_ISO8859_7 is not set | ||
1039 | # CONFIG_NLS_ISO8859_9 is not set | ||
1040 | # CONFIG_NLS_ISO8859_13 is not set | ||
1041 | # CONFIG_NLS_ISO8859_14 is not set | ||
1042 | # CONFIG_NLS_ISO8859_15 is not set | ||
1043 | # CONFIG_NLS_KOI8_R is not set | ||
1044 | # CONFIG_NLS_KOI8_U is not set | ||
1045 | # CONFIG_NLS_UTF8 is not set | ||
1046 | |||
1047 | # | ||
1048 | # Profiling support | ||
1049 | # | ||
1050 | # CONFIG_PROFILING is not set | ||
1051 | |||
1052 | # | ||
1053 | # Kernel hacking | ||
1054 | # | ||
1055 | # CONFIG_PRINTK_TIME is not set | ||
1056 | CONFIG_ENABLE_MUST_CHECK=y | ||
1057 | # CONFIG_MAGIC_SYSRQ is not set | ||
1058 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1059 | CONFIG_DEBUG_KERNEL=y | ||
1060 | CONFIG_LOG_BUF_SHIFT=14 | ||
1061 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1062 | # CONFIG_SCHEDSTATS is not set | ||
1063 | # CONFIG_DEBUG_SLAB is not set | ||
1064 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1065 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1066 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1067 | # CONFIG_DEBUG_MUTEXES is not set | ||
1068 | # CONFIG_DEBUG_RWSEMS is not set | ||
1069 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1070 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1071 | # CONFIG_DEBUG_KOBJECT is not set | ||
1072 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1073 | # CONFIG_DEBUG_INFO is not set | ||
1074 | # CONFIG_DEBUG_FS is not set | ||
1075 | # CONFIG_DEBUG_VM is not set | ||
1076 | # CONFIG_DEBUG_LIST is not set | ||
1077 | CONFIG_FRAME_POINTER=y | ||
1078 | CONFIG_FORCED_INLINING=y | ||
1079 | # CONFIG_HEADERS_CHECK is not set | ||
1080 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1081 | CONFIG_DEBUG_USER=y | ||
1082 | # CONFIG_DEBUG_WAITQ is not set | ||
1083 | # CONFIG_DEBUG_ERRORS is not set | ||
1084 | CONFIG_DEBUG_LL=y | ||
1085 | # CONFIG_DEBUG_ICEDCC is not set | ||
1086 | |||
1087 | # | ||
1088 | # Security options | ||
1089 | # | ||
1090 | # CONFIG_KEYS is not set | ||
1091 | # CONFIG_SECURITY is not set | ||
1092 | |||
1093 | # | ||
1094 | # Cryptographic options | ||
1095 | # | ||
1096 | # CONFIG_CRYPTO is not set | ||
1097 | |||
1098 | # | ||
1099 | # Library routines | ||
1100 | # | ||
1101 | # CONFIG_CRC_CCITT is not set | ||
1102 | # CONFIG_CRC16 is not set | ||
1103 | CONFIG_CRC32=y | ||
1104 | # CONFIG_LIBCRC32C is not set | ||
1105 | CONFIG_ZLIB_INFLATE=y | ||
1106 | CONFIG_PLIST=y | ||
diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig index d24ae8777c35..d392833b31fb 100644 --- a/arch/arm/configs/carmeva_defconfig +++ b/arch/arm/configs/carmeva_defconfig | |||
@@ -474,7 +474,7 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
474 | # CONFIG_WATCHDOG is not set | 474 | # CONFIG_WATCHDOG is not set |
475 | # CONFIG_NVRAM is not set | 475 | # CONFIG_NVRAM is not set |
476 | # CONFIG_RTC is not set | 476 | # CONFIG_RTC is not set |
477 | # CONFIG_AT91_RTC is not set | 477 | # CONFIG_AT91RM9200_RTC is not set |
478 | # CONFIG_DTLK is not set | 478 | # CONFIG_DTLK is not set |
479 | # CONFIG_R3964 is not set | 479 | # CONFIG_R3964 is not set |
480 | 480 | ||
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig index 807f7fc8d777..94908c1df4cf 100644 --- a/arch/arm/configs/csb637_defconfig +++ b/arch/arm/configs/csb637_defconfig | |||
@@ -623,7 +623,7 @@ CONFIG_AT91RM9200_WATCHDOG=y | |||
623 | # CONFIG_USBPCWATCHDOG is not set | 623 | # CONFIG_USBPCWATCHDOG is not set |
624 | # CONFIG_NVRAM is not set | 624 | # CONFIG_NVRAM is not set |
625 | CONFIG_RTC=y | 625 | CONFIG_RTC=y |
626 | # CONFIG_AT91_RTC is not set | 626 | # CONFIG_AT91RM9200_RTC is not set |
627 | # CONFIG_DTLK is not set | 627 | # CONFIG_DTLK is not set |
628 | # CONFIG_R3964 is not set | 628 | # CONFIG_R3964 is not set |
629 | 629 | ||
diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig index 58d5974f41d0..f8a66b72ad5d 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig | |||
@@ -125,6 +125,7 @@ CONFIG_CRUNCH=y | |||
125 | # | 125 | # |
126 | # EP93xx Platforms | 126 | # EP93xx Platforms |
127 | # | 127 | # |
128 | CONFIG_MACH_ADSSPHERE=y | ||
128 | CONFIG_MACH_EDB9302=y | 129 | CONFIG_MACH_EDB9302=y |
129 | CONFIG_MACH_EDB9312=y | 130 | CONFIG_MACH_EDB9312=y |
130 | CONFIG_MACH_EDB9315=y | 131 | CONFIG_MACH_EDB9315=y |
diff --git a/arch/arm/configs/iop13xx_defconfig b/arch/arm/configs/iop13xx_defconfig new file mode 100644 index 000000000000..f6e46193fd26 --- /dev/null +++ b/arch/arm/configs/iop13xx_defconfig | |||
@@ -0,0 +1,1134 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Fri Dec 1 10:51:01 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | # CONFIG_GENERIC_TIME is not set | ||
8 | CONFIG_MMU=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
11 | CONFIG_HARDIRQS_SW_RESEND=y | ||
12 | CONFIG_GENERIC_IRQ_PROBE=y | ||
13 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_VECTORS_BASE=0xffff0000 | ||
17 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
18 | |||
19 | # | ||
20 | # Code maturity level options | ||
21 | # | ||
22 | CONFIG_EXPERIMENTAL=y | ||
23 | CONFIG_BROKEN_ON_SMP=y | ||
24 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_LOCALVERSION="" | ||
30 | # CONFIG_LOCALVERSION_AUTO is not set | ||
31 | CONFIG_SWAP=y | ||
32 | CONFIG_SYSVIPC=y | ||
33 | # CONFIG_IPC_NS is not set | ||
34 | CONFIG_POSIX_MQUEUE=y | ||
35 | CONFIG_BSD_PROCESS_ACCT=y | ||
36 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
37 | # CONFIG_TASKSTATS is not set | ||
38 | # CONFIG_UTS_NS is not set | ||
39 | # CONFIG_AUDIT is not set | ||
40 | CONFIG_IKCONFIG=y | ||
41 | CONFIG_IKCONFIG_PROC=y | ||
42 | # CONFIG_RELAY is not set | ||
43 | CONFIG_INITRAMFS_SOURCE="" | ||
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SYSCTL=y | ||
46 | # CONFIG_EMBEDDED is not set | ||
47 | CONFIG_UID16=y | ||
48 | CONFIG_SYSCTL_SYSCALL=y | ||
49 | CONFIG_KALLSYMS=y | ||
50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
51 | CONFIG_HOTPLUG=y | ||
52 | CONFIG_PRINTK=y | ||
53 | CONFIG_BUG=y | ||
54 | CONFIG_ELF_CORE=y | ||
55 | CONFIG_BASE_FULL=y | ||
56 | CONFIG_FUTEX=y | ||
57 | CONFIG_EPOLL=y | ||
58 | CONFIG_SHMEM=y | ||
59 | CONFIG_SLAB=y | ||
60 | CONFIG_VM_EVENT_COUNTERS=y | ||
61 | CONFIG_RT_MUTEXES=y | ||
62 | # CONFIG_TINY_SHMEM is not set | ||
63 | CONFIG_BASE_SMALL=0 | ||
64 | # CONFIG_SLOB is not set | ||
65 | |||
66 | # | ||
67 | # Loadable module support | ||
68 | # | ||
69 | CONFIG_MODULES=y | ||
70 | CONFIG_MODULE_UNLOAD=y | ||
71 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
72 | CONFIG_MODVERSIONS=y | ||
73 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
74 | CONFIG_KMOD=y | ||
75 | |||
76 | # | ||
77 | # Block layer | ||
78 | # | ||
79 | CONFIG_BLOCK=y | ||
80 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
81 | |||
82 | # | ||
83 | # IO Schedulers | ||
84 | # | ||
85 | CONFIG_IOSCHED_NOOP=y | ||
86 | # CONFIG_IOSCHED_AS is not set | ||
87 | CONFIG_IOSCHED_DEADLINE=y | ||
88 | # CONFIG_IOSCHED_CFQ is not set | ||
89 | # CONFIG_DEFAULT_AS is not set | ||
90 | CONFIG_DEFAULT_DEADLINE=y | ||
91 | # CONFIG_DEFAULT_CFQ is not set | ||
92 | # CONFIG_DEFAULT_NOOP is not set | ||
93 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
94 | |||
95 | # | ||
96 | # System Type | ||
97 | # | ||
98 | # CONFIG_ARCH_AAEC2000 is not set | ||
99 | # CONFIG_ARCH_INTEGRATOR is not set | ||
100 | # CONFIG_ARCH_REALVIEW is not set | ||
101 | # CONFIG_ARCH_VERSATILE is not set | ||
102 | # CONFIG_ARCH_AT91 is not set | ||
103 | # CONFIG_ARCH_CLPS7500 is not set | ||
104 | # CONFIG_ARCH_CLPS711X is not set | ||
105 | # CONFIG_ARCH_CO285 is not set | ||
106 | # CONFIG_ARCH_EBSA110 is not set | ||
107 | # CONFIG_ARCH_EP93XX is not set | ||
108 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
109 | # CONFIG_ARCH_NETX is not set | ||
110 | # CONFIG_ARCH_H720X is not set | ||
111 | # CONFIG_ARCH_IMX is not set | ||
112 | # CONFIG_ARCH_IOP32X is not set | ||
113 | # CONFIG_ARCH_IOP33X is not set | ||
114 | CONFIG_ARCH_IOP13XX=y | ||
115 | # CONFIG_ARCH_IXP4XX is not set | ||
116 | # CONFIG_ARCH_IXP2000 is not set | ||
117 | # CONFIG_ARCH_IXP23XX is not set | ||
118 | # CONFIG_ARCH_L7200 is not set | ||
119 | # CONFIG_ARCH_PNX4008 is not set | ||
120 | # CONFIG_ARCH_PXA is not set | ||
121 | # CONFIG_ARCH_RPC is not set | ||
122 | # CONFIG_ARCH_SA1100 is not set | ||
123 | # CONFIG_ARCH_S3C2410 is not set | ||
124 | # CONFIG_ARCH_SHARK is not set | ||
125 | # CONFIG_ARCH_LH7A40X is not set | ||
126 | # CONFIG_ARCH_OMAP is not set | ||
127 | |||
128 | # | ||
129 | # IOP13XX Implementation Options | ||
130 | # | ||
131 | |||
132 | # | ||
133 | # IOP13XX Platform Support | ||
134 | # | ||
135 | CONFIG_MACH_IQ81340SC=y | ||
136 | CONFIG_MACH_IQ81340MC=y | ||
137 | |||
138 | # | ||
139 | # Processor Type | ||
140 | # | ||
141 | CONFIG_CPU_32=y | ||
142 | CONFIG_CPU_XSC3=y | ||
143 | CONFIG_CPU_32v5=y | ||
144 | CONFIG_CPU_ABRT_EV5T=y | ||
145 | CONFIG_CPU_CACHE_VIVT=y | ||
146 | CONFIG_CPU_TLB_V4WBI=y | ||
147 | CONFIG_CPU_CP15=y | ||
148 | CONFIG_CPU_CP15_MMU=y | ||
149 | CONFIG_IO_36=y | ||
150 | |||
151 | # | ||
152 | # Processor Features | ||
153 | # | ||
154 | CONFIG_ARM_THUMB=y | ||
155 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
156 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
157 | |||
158 | # | ||
159 | # Bus support | ||
160 | # | ||
161 | CONFIG_PCI=y | ||
162 | |||
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
167 | |||
168 | # | ||
169 | # Kernel Features | ||
170 | # | ||
171 | # CONFIG_PREEMPT is not set | ||
172 | # CONFIG_NO_IDLE_HZ is not set | ||
173 | CONFIG_HZ=100 | ||
174 | # CONFIG_AEABI is not set | ||
175 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
176 | CONFIG_SELECT_MEMORY_MODEL=y | ||
177 | CONFIG_FLATMEM_MANUAL=y | ||
178 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
179 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
180 | CONFIG_FLATMEM=y | ||
181 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
182 | # CONFIG_SPARSEMEM_STATIC is not set | ||
183 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
184 | # CONFIG_RESOURCES_64BIT is not set | ||
185 | CONFIG_ALIGNMENT_TRAP=y | ||
186 | |||
187 | # | ||
188 | # Boot options | ||
189 | # | ||
190 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
191 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
192 | CONFIG_CMDLINE="ip=bootp root=nfs console=ttyS0,115200 nfsroot=,tcp,v3,wsize=8192,rsize=8192" | ||
193 | # CONFIG_XIP_KERNEL is not set | ||
194 | |||
195 | # | ||
196 | # Floating point emulation | ||
197 | # | ||
198 | |||
199 | # | ||
200 | # At least one emulation must be selected | ||
201 | # | ||
202 | CONFIG_FPE_NWFPE=y | ||
203 | # CONFIG_FPE_NWFPE_XP is not set | ||
204 | # CONFIG_FPE_FASTFPE is not set | ||
205 | |||
206 | # | ||
207 | # Userspace binary formats | ||
208 | # | ||
209 | CONFIG_BINFMT_ELF=y | ||
210 | CONFIG_BINFMT_AOUT=y | ||
211 | # CONFIG_BINFMT_MISC is not set | ||
212 | # CONFIG_ARTHUR is not set | ||
213 | |||
214 | # | ||
215 | # Power management options | ||
216 | # | ||
217 | # CONFIG_PM is not set | ||
218 | # CONFIG_APM is not set | ||
219 | |||
220 | # | ||
221 | # Networking | ||
222 | # | ||
223 | CONFIG_NET=y | ||
224 | |||
225 | # | ||
226 | # Networking options | ||
227 | # | ||
228 | # CONFIG_NETDEBUG is not set | ||
229 | CONFIG_PACKET=y | ||
230 | CONFIG_PACKET_MMAP=y | ||
231 | CONFIG_UNIX=y | ||
232 | CONFIG_XFRM=y | ||
233 | # CONFIG_XFRM_USER is not set | ||
234 | # CONFIG_XFRM_SUB_POLICY is not set | ||
235 | CONFIG_NET_KEY=y | ||
236 | CONFIG_INET=y | ||
237 | CONFIG_IP_MULTICAST=y | ||
238 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
239 | CONFIG_IP_FIB_HASH=y | ||
240 | CONFIG_IP_PNP=y | ||
241 | # CONFIG_IP_PNP_DHCP is not set | ||
242 | CONFIG_IP_PNP_BOOTP=y | ||
243 | # CONFIG_IP_PNP_RARP is not set | ||
244 | # CONFIG_NET_IPIP is not set | ||
245 | # CONFIG_NET_IPGRE is not set | ||
246 | # CONFIG_IP_MROUTE is not set | ||
247 | # CONFIG_ARPD is not set | ||
248 | # CONFIG_SYN_COOKIES is not set | ||
249 | # CONFIG_INET_AH is not set | ||
250 | # CONFIG_INET_ESP is not set | ||
251 | # CONFIG_INET_IPCOMP is not set | ||
252 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
253 | # CONFIG_INET_TUNNEL is not set | ||
254 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
255 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
256 | CONFIG_INET_XFRM_MODE_BEET=y | ||
257 | CONFIG_INET_DIAG=y | ||
258 | CONFIG_INET_TCP_DIAG=y | ||
259 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
260 | CONFIG_TCP_CONG_CUBIC=y | ||
261 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
262 | # CONFIG_IPV6 is not set | ||
263 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
264 | # CONFIG_INET6_TUNNEL is not set | ||
265 | # CONFIG_NETWORK_SECMARK is not set | ||
266 | # CONFIG_NETFILTER is not set | ||
267 | |||
268 | # | ||
269 | # DCCP Configuration (EXPERIMENTAL) | ||
270 | # | ||
271 | # CONFIG_IP_DCCP is not set | ||
272 | |||
273 | # | ||
274 | # SCTP Configuration (EXPERIMENTAL) | ||
275 | # | ||
276 | # CONFIG_IP_SCTP is not set | ||
277 | |||
278 | # | ||
279 | # TIPC Configuration (EXPERIMENTAL) | ||
280 | # | ||
281 | # CONFIG_TIPC is not set | ||
282 | # CONFIG_ATM is not set | ||
283 | # CONFIG_BRIDGE is not set | ||
284 | # CONFIG_VLAN_8021Q is not set | ||
285 | # CONFIG_DECNET is not set | ||
286 | # CONFIG_LLC2 is not set | ||
287 | # CONFIG_IPX is not set | ||
288 | # CONFIG_ATALK is not set | ||
289 | # CONFIG_X25 is not set | ||
290 | # CONFIG_LAPB is not set | ||
291 | # CONFIG_ECONET is not set | ||
292 | # CONFIG_WAN_ROUTER is not set | ||
293 | |||
294 | # | ||
295 | # QoS and/or fair queueing | ||
296 | # | ||
297 | # CONFIG_NET_SCHED is not set | ||
298 | |||
299 | # | ||
300 | # Network testing | ||
301 | # | ||
302 | # CONFIG_NET_PKTGEN is not set | ||
303 | # CONFIG_HAMRADIO is not set | ||
304 | # CONFIG_IRDA is not set | ||
305 | # CONFIG_BT is not set | ||
306 | # CONFIG_IEEE80211 is not set | ||
307 | |||
308 | # | ||
309 | # Device Drivers | ||
310 | # | ||
311 | |||
312 | # | ||
313 | # Generic Driver Options | ||
314 | # | ||
315 | CONFIG_STANDALONE=y | ||
316 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
317 | # CONFIG_FW_LOADER is not set | ||
318 | # CONFIG_SYS_HYPERVISOR is not set | ||
319 | |||
320 | # | ||
321 | # Connector - unified userspace <-> kernelspace linker | ||
322 | # | ||
323 | # CONFIG_CONNECTOR is not set | ||
324 | |||
325 | # | ||
326 | # Memory Technology Devices (MTD) | ||
327 | # | ||
328 | CONFIG_MTD=y | ||
329 | # CONFIG_MTD_DEBUG is not set | ||
330 | # CONFIG_MTD_CONCAT is not set | ||
331 | CONFIG_MTD_PARTITIONS=y | ||
332 | CONFIG_MTD_REDBOOT_PARTS=y | ||
333 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
334 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
335 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
336 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
337 | # CONFIG_MTD_AFS_PARTS is not set | ||
338 | |||
339 | # | ||
340 | # User Modules And Translation Layers | ||
341 | # | ||
342 | # CONFIG_MTD_CHAR is not set | ||
343 | CONFIG_MTD_BLOCK=y | ||
344 | # CONFIG_FTL is not set | ||
345 | # CONFIG_NFTL is not set | ||
346 | # CONFIG_INFTL is not set | ||
347 | # CONFIG_RFD_FTL is not set | ||
348 | # CONFIG_SSFDC is not set | ||
349 | |||
350 | # | ||
351 | # RAM/ROM/Flash chip drivers | ||
352 | # | ||
353 | CONFIG_MTD_CFI=y | ||
354 | # CONFIG_MTD_JEDECPROBE is not set | ||
355 | CONFIG_MTD_GEN_PROBE=y | ||
356 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
357 | CONFIG_MTD_CFI_NOSWAP=y | ||
358 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
359 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
360 | # CONFIG_MTD_CFI_GEOMETRY is not set | ||
361 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
362 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
363 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
364 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
365 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
366 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
367 | CONFIG_MTD_CFI_I1=y | ||
368 | CONFIG_MTD_CFI_I2=y | ||
369 | # CONFIG_MTD_CFI_I4 is not set | ||
370 | # CONFIG_MTD_CFI_I8 is not set | ||
371 | # CONFIG_MTD_OTP is not set | ||
372 | CONFIG_MTD_CFI_INTELEXT=y | ||
373 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
374 | # CONFIG_MTD_CFI_STAA is not set | ||
375 | CONFIG_MTD_CFI_UTIL=y | ||
376 | # CONFIG_MTD_RAM is not set | ||
377 | # CONFIG_MTD_ROM is not set | ||
378 | # CONFIG_MTD_ABSENT is not set | ||
379 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
380 | |||
381 | # | ||
382 | # Mapping drivers for chip access | ||
383 | # | ||
384 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
385 | CONFIG_MTD_PHYSMAP=y | ||
386 | CONFIG_MTD_PHYSMAP_START=0xfa000000 | ||
387 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
388 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
389 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
390 | # CONFIG_MTD_PLATRAM is not set | ||
391 | |||
392 | # | ||
393 | # Self-contained MTD device drivers | ||
394 | # | ||
395 | # CONFIG_MTD_PMC551 is not set | ||
396 | # CONFIG_MTD_SLRAM is not set | ||
397 | # CONFIG_MTD_PHRAM is not set | ||
398 | # CONFIG_MTD_MTDRAM is not set | ||
399 | # CONFIG_MTD_BLOCK2MTD is not set | ||
400 | |||
401 | # | ||
402 | # Disk-On-Chip Device Drivers | ||
403 | # | ||
404 | # CONFIG_MTD_DOC2000 is not set | ||
405 | # CONFIG_MTD_DOC2001 is not set | ||
406 | # CONFIG_MTD_DOC2001PLUS is not set | ||
407 | |||
408 | # | ||
409 | # NAND Flash Device Drivers | ||
410 | # | ||
411 | # CONFIG_MTD_NAND is not set | ||
412 | |||
413 | # | ||
414 | # OneNAND Flash Device Drivers | ||
415 | # | ||
416 | # CONFIG_MTD_ONENAND is not set | ||
417 | |||
418 | # | ||
419 | # Parallel port support | ||
420 | # | ||
421 | # CONFIG_PARPORT is not set | ||
422 | |||
423 | # | ||
424 | # Plug and Play support | ||
425 | # | ||
426 | |||
427 | # | ||
428 | # Block devices | ||
429 | # | ||
430 | # CONFIG_BLK_CPQ_DA is not set | ||
431 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
432 | # CONFIG_BLK_DEV_DAC960 is not set | ||
433 | # CONFIG_BLK_DEV_UMEM is not set | ||
434 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
435 | # CONFIG_BLK_DEV_LOOP is not set | ||
436 | # CONFIG_BLK_DEV_NBD is not set | ||
437 | # CONFIG_BLK_DEV_SX8 is not set | ||
438 | CONFIG_BLK_DEV_RAM=y | ||
439 | CONFIG_BLK_DEV_RAM_COUNT=2 | ||
440 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
441 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
442 | CONFIG_BLK_DEV_INITRD=y | ||
443 | # CONFIG_CDROM_PKTCDVD is not set | ||
444 | # CONFIG_ATA_OVER_ETH is not set | ||
445 | |||
446 | # | ||
447 | # SCSI device support | ||
448 | # | ||
449 | # CONFIG_RAID_ATTRS is not set | ||
450 | CONFIG_SCSI=y | ||
451 | # CONFIG_SCSI_NETLINK is not set | ||
452 | CONFIG_SCSI_PROC_FS=y | ||
453 | |||
454 | # | ||
455 | # SCSI support type (disk, tape, CD-ROM) | ||
456 | # | ||
457 | CONFIG_BLK_DEV_SD=y | ||
458 | # CONFIG_CHR_DEV_ST is not set | ||
459 | # CONFIG_CHR_DEV_OSST is not set | ||
460 | # CONFIG_BLK_DEV_SR is not set | ||
461 | CONFIG_CHR_DEV_SG=y | ||
462 | # CONFIG_CHR_DEV_SCH is not set | ||
463 | |||
464 | # | ||
465 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
466 | # | ||
467 | # CONFIG_SCSI_MULTI_LUN is not set | ||
468 | CONFIG_SCSI_CONSTANTS=y | ||
469 | # CONFIG_SCSI_LOGGING is not set | ||
470 | |||
471 | # | ||
472 | # SCSI Transports | ||
473 | # | ||
474 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
475 | # CONFIG_SCSI_FC_ATTRS is not set | ||
476 | CONFIG_SCSI_ISCSI_ATTRS=y | ||
477 | CONFIG_SCSI_SAS_ATTRS=y | ||
478 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
479 | |||
480 | # | ||
481 | # SCSI low-level drivers | ||
482 | # | ||
483 | # CONFIG_ISCSI_TCP is not set | ||
484 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
485 | # CONFIG_SCSI_3W_9XXX is not set | ||
486 | # CONFIG_SCSI_ACARD is not set | ||
487 | # CONFIG_SCSI_AACRAID is not set | ||
488 | # CONFIG_SCSI_AIC7XXX is not set | ||
489 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
490 | # CONFIG_SCSI_AIC79XX is not set | ||
491 | # CONFIG_SCSI_AIC94XX is not set | ||
492 | # CONFIG_SCSI_DPT_I2O is not set | ||
493 | # CONFIG_SCSI_ARCMSR is not set | ||
494 | # CONFIG_MEGARAID_NEWGEN is not set | ||
495 | # CONFIG_MEGARAID_LEGACY is not set | ||
496 | # CONFIG_MEGARAID_SAS is not set | ||
497 | # CONFIG_SCSI_HPTIOP is not set | ||
498 | # CONFIG_SCSI_DMX3191D is not set | ||
499 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
500 | # CONFIG_SCSI_IPS is not set | ||
501 | # CONFIG_SCSI_INITIO is not set | ||
502 | # CONFIG_SCSI_INIA100 is not set | ||
503 | # CONFIG_SCSI_STEX is not set | ||
504 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
505 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
506 | # CONFIG_SCSI_QLA_FC is not set | ||
507 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
508 | # CONFIG_SCSI_LPFC is not set | ||
509 | # CONFIG_SCSI_DC395x is not set | ||
510 | # CONFIG_SCSI_DC390T is not set | ||
511 | # CONFIG_SCSI_NSP32 is not set | ||
512 | # CONFIG_SCSI_DEBUG is not set | ||
513 | |||
514 | # | ||
515 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
516 | # | ||
517 | # CONFIG_ATA is not set | ||
518 | |||
519 | # | ||
520 | # Multi-device support (RAID and LVM) | ||
521 | # | ||
522 | CONFIG_MD=y | ||
523 | CONFIG_BLK_DEV_MD=y | ||
524 | # CONFIG_MD_LINEAR is not set | ||
525 | CONFIG_MD_RAID0=y | ||
526 | CONFIG_MD_RAID1=y | ||
527 | CONFIG_MD_RAID10=y | ||
528 | CONFIG_MD_RAID456=y | ||
529 | # CONFIG_MD_RAID5_RESHAPE is not set | ||
530 | # CONFIG_MD_MULTIPATH is not set | ||
531 | # CONFIG_MD_FAULTY is not set | ||
532 | CONFIG_BLK_DEV_DM=y | ||
533 | # CONFIG_DM_DEBUG is not set | ||
534 | # CONFIG_DM_CRYPT is not set | ||
535 | # CONFIG_DM_SNAPSHOT is not set | ||
536 | # CONFIG_DM_MIRROR is not set | ||
537 | # CONFIG_DM_ZERO is not set | ||
538 | # CONFIG_DM_MULTIPATH is not set | ||
539 | |||
540 | # | ||
541 | # Fusion MPT device support | ||
542 | # | ||
543 | # CONFIG_FUSION is not set | ||
544 | # CONFIG_FUSION_SPI is not set | ||
545 | # CONFIG_FUSION_FC is not set | ||
546 | # CONFIG_FUSION_SAS is not set | ||
547 | |||
548 | # | ||
549 | # IEEE 1394 (FireWire) support | ||
550 | # | ||
551 | # CONFIG_IEEE1394 is not set | ||
552 | |||
553 | # | ||
554 | # I2O device support | ||
555 | # | ||
556 | # CONFIG_I2O is not set | ||
557 | |||
558 | # | ||
559 | # Network device support | ||
560 | # | ||
561 | CONFIG_NETDEVICES=y | ||
562 | # CONFIG_DUMMY is not set | ||
563 | # CONFIG_BONDING is not set | ||
564 | # CONFIG_EQUALIZER is not set | ||
565 | # CONFIG_TUN is not set | ||
566 | |||
567 | # | ||
568 | # ARCnet devices | ||
569 | # | ||
570 | # CONFIG_ARCNET is not set | ||
571 | |||
572 | # | ||
573 | # PHY device support | ||
574 | # | ||
575 | |||
576 | # | ||
577 | # Ethernet (10 or 100Mbit) | ||
578 | # | ||
579 | # CONFIG_NET_ETHERNET is not set | ||
580 | |||
581 | # | ||
582 | # Ethernet (1000 Mbit) | ||
583 | # | ||
584 | # CONFIG_ACENIC is not set | ||
585 | # CONFIG_DL2K is not set | ||
586 | CONFIG_E1000=y | ||
587 | CONFIG_E1000_NAPI=y | ||
588 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
589 | # CONFIG_NS83820 is not set | ||
590 | # CONFIG_HAMACHI is not set | ||
591 | # CONFIG_YELLOWFIN is not set | ||
592 | # CONFIG_R8169 is not set | ||
593 | # CONFIG_SIS190 is not set | ||
594 | # CONFIG_SKGE is not set | ||
595 | # CONFIG_SKY2 is not set | ||
596 | # CONFIG_SK98LIN is not set | ||
597 | # CONFIG_TIGON3 is not set | ||
598 | # CONFIG_BNX2 is not set | ||
599 | # CONFIG_QLA3XXX is not set | ||
600 | |||
601 | # | ||
602 | # Ethernet (10000 Mbit) | ||
603 | # | ||
604 | # CONFIG_CHELSIO_T1 is not set | ||
605 | # CONFIG_IXGB is not set | ||
606 | # CONFIG_S2IO is not set | ||
607 | # CONFIG_MYRI10GE is not set | ||
608 | |||
609 | # | ||
610 | # Token Ring devices | ||
611 | # | ||
612 | # CONFIG_TR is not set | ||
613 | |||
614 | # | ||
615 | # Wireless LAN (non-hamradio) | ||
616 | # | ||
617 | # CONFIG_NET_RADIO is not set | ||
618 | |||
619 | # | ||
620 | # Wan interfaces | ||
621 | # | ||
622 | # CONFIG_WAN is not set | ||
623 | # CONFIG_FDDI is not set | ||
624 | # CONFIG_HIPPI is not set | ||
625 | # CONFIG_PPP is not set | ||
626 | # CONFIG_SLIP is not set | ||
627 | # CONFIG_NET_FC is not set | ||
628 | # CONFIG_SHAPER is not set | ||
629 | # CONFIG_NETCONSOLE is not set | ||
630 | # CONFIG_NETPOLL is not set | ||
631 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
632 | |||
633 | # | ||
634 | # ISDN subsystem | ||
635 | # | ||
636 | # CONFIG_ISDN is not set | ||
637 | |||
638 | # | ||
639 | # Input device support | ||
640 | # | ||
641 | CONFIG_INPUT=y | ||
642 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
643 | |||
644 | # | ||
645 | # Userland interfaces | ||
646 | # | ||
647 | CONFIG_INPUT_MOUSEDEV=y | ||
648 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
649 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
650 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
651 | # CONFIG_INPUT_JOYDEV is not set | ||
652 | # CONFIG_INPUT_TSDEV is not set | ||
653 | # CONFIG_INPUT_EVDEV is not set | ||
654 | # CONFIG_INPUT_EVBUG is not set | ||
655 | |||
656 | # | ||
657 | # Input Device Drivers | ||
658 | # | ||
659 | # CONFIG_INPUT_KEYBOARD is not set | ||
660 | # CONFIG_INPUT_MOUSE is not set | ||
661 | # CONFIG_INPUT_JOYSTICK is not set | ||
662 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
663 | # CONFIG_INPUT_MISC is not set | ||
664 | |||
665 | # | ||
666 | # Hardware I/O ports | ||
667 | # | ||
668 | # CONFIG_SERIO is not set | ||
669 | # CONFIG_GAMEPORT is not set | ||
670 | |||
671 | # | ||
672 | # Character devices | ||
673 | # | ||
674 | CONFIG_VT=y | ||
675 | CONFIG_VT_CONSOLE=y | ||
676 | CONFIG_HW_CONSOLE=y | ||
677 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
678 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
679 | |||
680 | # | ||
681 | # Serial drivers | ||
682 | # | ||
683 | CONFIG_SERIAL_8250=y | ||
684 | CONFIG_SERIAL_8250_CONSOLE=y | ||
685 | CONFIG_SERIAL_8250_PCI=y | ||
686 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
687 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
688 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
689 | |||
690 | # | ||
691 | # Non-8250 serial port support | ||
692 | # | ||
693 | CONFIG_SERIAL_CORE=y | ||
694 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
695 | # CONFIG_SERIAL_JSM is not set | ||
696 | CONFIG_UNIX98_PTYS=y | ||
697 | CONFIG_LEGACY_PTYS=y | ||
698 | CONFIG_LEGACY_PTY_COUNT=256 | ||
699 | |||
700 | # | ||
701 | # IPMI | ||
702 | # | ||
703 | # CONFIG_IPMI_HANDLER is not set | ||
704 | |||
705 | # | ||
706 | # Watchdog Cards | ||
707 | # | ||
708 | # CONFIG_WATCHDOG is not set | ||
709 | CONFIG_HW_RANDOM=y | ||
710 | # CONFIG_NVRAM is not set | ||
711 | # CONFIG_DTLK is not set | ||
712 | # CONFIG_R3964 is not set | ||
713 | # CONFIG_APPLICOM is not set | ||
714 | |||
715 | # | ||
716 | # Ftape, the floppy tape device driver | ||
717 | # | ||
718 | # CONFIG_DRM is not set | ||
719 | # CONFIG_RAW_DRIVER is not set | ||
720 | |||
721 | # | ||
722 | # TPM devices | ||
723 | # | ||
724 | # CONFIG_TCG_TPM is not set | ||
725 | |||
726 | # | ||
727 | # I2C support | ||
728 | # | ||
729 | CONFIG_I2C=y | ||
730 | # CONFIG_I2C_CHARDEV is not set | ||
731 | |||
732 | # | ||
733 | # I2C Algorithms | ||
734 | # | ||
735 | CONFIG_I2C_ALGOBIT=m | ||
736 | CONFIG_I2C_ALGOPCF=m | ||
737 | CONFIG_I2C_ALGOPCA=m | ||
738 | |||
739 | # | ||
740 | # I2C Hardware Bus support | ||
741 | # | ||
742 | # CONFIG_I2C_ALI1535 is not set | ||
743 | # CONFIG_I2C_ALI1563 is not set | ||
744 | # CONFIG_I2C_ALI15X3 is not set | ||
745 | # CONFIG_I2C_AMD756 is not set | ||
746 | # CONFIG_I2C_AMD8111 is not set | ||
747 | # CONFIG_I2C_I801 is not set | ||
748 | # CONFIG_I2C_I810 is not set | ||
749 | # CONFIG_I2C_PIIX4 is not set | ||
750 | CONFIG_I2C_IOP3XX=y | ||
751 | # CONFIG_I2C_NFORCE2 is not set | ||
752 | # CONFIG_I2C_OCORES is not set | ||
753 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
754 | # CONFIG_I2C_PROSAVAGE is not set | ||
755 | # CONFIG_I2C_SAVAGE4 is not set | ||
756 | # CONFIG_I2C_SIS5595 is not set | ||
757 | # CONFIG_I2C_SIS630 is not set | ||
758 | # CONFIG_I2C_SIS96X is not set | ||
759 | # CONFIG_I2C_STUB is not set | ||
760 | # CONFIG_I2C_VIA is not set | ||
761 | # CONFIG_I2C_VIAPRO is not set | ||
762 | # CONFIG_I2C_VOODOO3 is not set | ||
763 | # CONFIG_I2C_PCA_ISA is not set | ||
764 | |||
765 | # | ||
766 | # Miscellaneous I2C Chip support | ||
767 | # | ||
768 | # CONFIG_SENSORS_DS1337 is not set | ||
769 | # CONFIG_SENSORS_DS1374 is not set | ||
770 | # CONFIG_SENSORS_EEPROM is not set | ||
771 | # CONFIG_SENSORS_PCF8574 is not set | ||
772 | # CONFIG_SENSORS_PCA9539 is not set | ||
773 | # CONFIG_SENSORS_PCF8591 is not set | ||
774 | # CONFIG_SENSORS_MAX6875 is not set | ||
775 | # CONFIG_I2C_DEBUG_CORE is not set | ||
776 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
777 | # CONFIG_I2C_DEBUG_BUS is not set | ||
778 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
779 | |||
780 | # | ||
781 | # SPI support | ||
782 | # | ||
783 | # CONFIG_SPI is not set | ||
784 | # CONFIG_SPI_MASTER is not set | ||
785 | |||
786 | # | ||
787 | # Dallas's 1-wire bus | ||
788 | # | ||
789 | # CONFIG_W1 is not set | ||
790 | |||
791 | # | ||
792 | # Hardware Monitoring support | ||
793 | # | ||
794 | CONFIG_HWMON=y | ||
795 | # CONFIG_HWMON_VID is not set | ||
796 | # CONFIG_SENSORS_ABITUGURU is not set | ||
797 | # CONFIG_SENSORS_ADM1021 is not set | ||
798 | # CONFIG_SENSORS_ADM1025 is not set | ||
799 | # CONFIG_SENSORS_ADM1026 is not set | ||
800 | # CONFIG_SENSORS_ADM1031 is not set | ||
801 | # CONFIG_SENSORS_ADM9240 is not set | ||
802 | # CONFIG_SENSORS_ASB100 is not set | ||
803 | # CONFIG_SENSORS_ATXP1 is not set | ||
804 | # CONFIG_SENSORS_DS1621 is not set | ||
805 | # CONFIG_SENSORS_F71805F is not set | ||
806 | # CONFIG_SENSORS_FSCHER is not set | ||
807 | # CONFIG_SENSORS_FSCPOS is not set | ||
808 | # CONFIG_SENSORS_GL518SM is not set | ||
809 | # CONFIG_SENSORS_GL520SM is not set | ||
810 | # CONFIG_SENSORS_IT87 is not set | ||
811 | # CONFIG_SENSORS_LM63 is not set | ||
812 | # CONFIG_SENSORS_LM75 is not set | ||
813 | # CONFIG_SENSORS_LM77 is not set | ||
814 | # CONFIG_SENSORS_LM78 is not set | ||
815 | # CONFIG_SENSORS_LM80 is not set | ||
816 | # CONFIG_SENSORS_LM83 is not set | ||
817 | # CONFIG_SENSORS_LM85 is not set | ||
818 | # CONFIG_SENSORS_LM87 is not set | ||
819 | # CONFIG_SENSORS_LM90 is not set | ||
820 | # CONFIG_SENSORS_LM92 is not set | ||
821 | # CONFIG_SENSORS_MAX1619 is not set | ||
822 | # CONFIG_SENSORS_PC87360 is not set | ||
823 | # CONFIG_SENSORS_SIS5595 is not set | ||
824 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
825 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
826 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
827 | # CONFIG_SENSORS_VIA686A is not set | ||
828 | # CONFIG_SENSORS_VT1211 is not set | ||
829 | # CONFIG_SENSORS_VT8231 is not set | ||
830 | # CONFIG_SENSORS_W83781D is not set | ||
831 | # CONFIG_SENSORS_W83791D is not set | ||
832 | # CONFIG_SENSORS_W83792D is not set | ||
833 | # CONFIG_SENSORS_W83L785TS is not set | ||
834 | # CONFIG_SENSORS_W83627HF is not set | ||
835 | # CONFIG_SENSORS_W83627EHF is not set | ||
836 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
837 | |||
838 | # | ||
839 | # Misc devices | ||
840 | # | ||
841 | # CONFIG_SGI_IOC4 is not set | ||
842 | # CONFIG_TIFM_CORE is not set | ||
843 | |||
844 | # | ||
845 | # LED devices | ||
846 | # | ||
847 | # CONFIG_NEW_LEDS is not set | ||
848 | |||
849 | # | ||
850 | # LED drivers | ||
851 | # | ||
852 | |||
853 | # | ||
854 | # LED Triggers | ||
855 | # | ||
856 | |||
857 | # | ||
858 | # Multimedia devices | ||
859 | # | ||
860 | # CONFIG_VIDEO_DEV is not set | ||
861 | |||
862 | # | ||
863 | # Digital Video Broadcasting Devices | ||
864 | # | ||
865 | # CONFIG_DVB is not set | ||
866 | |||
867 | # | ||
868 | # Graphics support | ||
869 | # | ||
870 | CONFIG_FIRMWARE_EDID=y | ||
871 | # CONFIG_FB is not set | ||
872 | |||
873 | # | ||
874 | # Console display driver support | ||
875 | # | ||
876 | # CONFIG_VGA_CONSOLE is not set | ||
877 | CONFIG_DUMMY_CONSOLE=y | ||
878 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
879 | |||
880 | # | ||
881 | # Sound | ||
882 | # | ||
883 | # CONFIG_SOUND is not set | ||
884 | |||
885 | # | ||
886 | # USB support | ||
887 | # | ||
888 | CONFIG_USB_ARCH_HAS_HCD=y | ||
889 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
890 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
891 | # CONFIG_USB is not set | ||
892 | |||
893 | # | ||
894 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
895 | # | ||
896 | |||
897 | # | ||
898 | # USB Gadget Support | ||
899 | # | ||
900 | # CONFIG_USB_GADGET is not set | ||
901 | |||
902 | # | ||
903 | # MMC/SD Card support | ||
904 | # | ||
905 | # CONFIG_MMC is not set | ||
906 | |||
907 | # | ||
908 | # Real Time Clock | ||
909 | # | ||
910 | CONFIG_RTC_LIB=y | ||
911 | # CONFIG_RTC_CLASS is not set | ||
912 | |||
913 | # | ||
914 | # File systems | ||
915 | # | ||
916 | CONFIG_EXT2_FS=y | ||
917 | # CONFIG_EXT2_FS_XATTR is not set | ||
918 | # CONFIG_EXT2_FS_XIP is not set | ||
919 | CONFIG_EXT3_FS=y | ||
920 | CONFIG_EXT3_FS_XATTR=y | ||
921 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
922 | # CONFIG_EXT3_FS_SECURITY is not set | ||
923 | # CONFIG_EXT4DEV_FS is not set | ||
924 | CONFIG_JBD=y | ||
925 | # CONFIG_JBD_DEBUG is not set | ||
926 | CONFIG_FS_MBCACHE=y | ||
927 | # CONFIG_REISERFS_FS is not set | ||
928 | # CONFIG_JFS_FS is not set | ||
929 | # CONFIG_FS_POSIX_ACL is not set | ||
930 | # CONFIG_XFS_FS is not set | ||
931 | # CONFIG_GFS2_FS is not set | ||
932 | # CONFIG_OCFS2_FS is not set | ||
933 | # CONFIG_MINIX_FS is not set | ||
934 | # CONFIG_ROMFS_FS is not set | ||
935 | CONFIG_INOTIFY=y | ||
936 | CONFIG_INOTIFY_USER=y | ||
937 | # CONFIG_QUOTA is not set | ||
938 | CONFIG_DNOTIFY=y | ||
939 | # CONFIG_AUTOFS_FS is not set | ||
940 | # CONFIG_AUTOFS4_FS is not set | ||
941 | # CONFIG_FUSE_FS is not set | ||
942 | |||
943 | # | ||
944 | # CD-ROM/DVD Filesystems | ||
945 | # | ||
946 | # CONFIG_ISO9660_FS is not set | ||
947 | # CONFIG_UDF_FS is not set | ||
948 | |||
949 | # | ||
950 | # DOS/FAT/NT Filesystems | ||
951 | # | ||
952 | # CONFIG_MSDOS_FS is not set | ||
953 | # CONFIG_VFAT_FS is not set | ||
954 | # CONFIG_NTFS_FS is not set | ||
955 | |||
956 | # | ||
957 | # Pseudo filesystems | ||
958 | # | ||
959 | CONFIG_PROC_FS=y | ||
960 | CONFIG_PROC_SYSCTL=y | ||
961 | CONFIG_SYSFS=y | ||
962 | CONFIG_TMPFS=y | ||
963 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
964 | # CONFIG_HUGETLB_PAGE is not set | ||
965 | CONFIG_RAMFS=y | ||
966 | # CONFIG_CONFIGFS_FS is not set | ||
967 | |||
968 | # | ||
969 | # Miscellaneous filesystems | ||
970 | # | ||
971 | # CONFIG_ADFS_FS is not set | ||
972 | # CONFIG_AFFS_FS is not set | ||
973 | # CONFIG_HFS_FS is not set | ||
974 | # CONFIG_HFSPLUS_FS is not set | ||
975 | # CONFIG_BEFS_FS is not set | ||
976 | # CONFIG_BFS_FS is not set | ||
977 | # CONFIG_EFS_FS is not set | ||
978 | # CONFIG_JFFS_FS is not set | ||
979 | CONFIG_JFFS2_FS=y | ||
980 | CONFIG_JFFS2_FS_DEBUG=0 | ||
981 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
982 | # CONFIG_JFFS2_SUMMARY is not set | ||
983 | # CONFIG_JFFS2_FS_XATTR is not set | ||
984 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
985 | CONFIG_JFFS2_ZLIB=y | ||
986 | CONFIG_JFFS2_RTIME=y | ||
987 | # CONFIG_JFFS2_RUBIN is not set | ||
988 | # CONFIG_CRAMFS is not set | ||
989 | # CONFIG_VXFS_FS is not set | ||
990 | # CONFIG_HPFS_FS is not set | ||
991 | # CONFIG_QNX4FS_FS is not set | ||
992 | # CONFIG_SYSV_FS is not set | ||
993 | # CONFIG_UFS_FS is not set | ||
994 | |||
995 | # | ||
996 | # Network File Systems | ||
997 | # | ||
998 | CONFIG_NFS_FS=y | ||
999 | CONFIG_NFS_V3=y | ||
1000 | # CONFIG_NFS_V3_ACL is not set | ||
1001 | # CONFIG_NFS_V4 is not set | ||
1002 | # CONFIG_NFS_DIRECTIO is not set | ||
1003 | CONFIG_NFSD=y | ||
1004 | CONFIG_NFSD_V3=y | ||
1005 | # CONFIG_NFSD_V3_ACL is not set | ||
1006 | # CONFIG_NFSD_V4 is not set | ||
1007 | CONFIG_NFSD_TCP=y | ||
1008 | CONFIG_ROOT_NFS=y | ||
1009 | CONFIG_LOCKD=y | ||
1010 | CONFIG_LOCKD_V4=y | ||
1011 | CONFIG_EXPORTFS=y | ||
1012 | CONFIG_NFS_COMMON=y | ||
1013 | CONFIG_SUNRPC=y | ||
1014 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1015 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1016 | CONFIG_SMB_FS=m | ||
1017 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
1018 | CONFIG_CIFS=m | ||
1019 | # CONFIG_CIFS_STATS is not set | ||
1020 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
1021 | # CONFIG_CIFS_XATTR is not set | ||
1022 | # CONFIG_CIFS_DEBUG2 is not set | ||
1023 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1024 | # CONFIG_NCP_FS is not set | ||
1025 | # CONFIG_CODA_FS is not set | ||
1026 | # CONFIG_AFS_FS is not set | ||
1027 | # CONFIG_9P_FS is not set | ||
1028 | |||
1029 | # | ||
1030 | # Partition Types | ||
1031 | # | ||
1032 | CONFIG_PARTITION_ADVANCED=y | ||
1033 | # CONFIG_ACORN_PARTITION is not set | ||
1034 | # CONFIG_OSF_PARTITION is not set | ||
1035 | # CONFIG_AMIGA_PARTITION is not set | ||
1036 | # CONFIG_ATARI_PARTITION is not set | ||
1037 | # CONFIG_MAC_PARTITION is not set | ||
1038 | CONFIG_MSDOS_PARTITION=y | ||
1039 | # CONFIG_BSD_DISKLABEL is not set | ||
1040 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1041 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1042 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1043 | # CONFIG_LDM_PARTITION is not set | ||
1044 | # CONFIG_SGI_PARTITION is not set | ||
1045 | # CONFIG_ULTRIX_PARTITION is not set | ||
1046 | # CONFIG_SUN_PARTITION is not set | ||
1047 | # CONFIG_KARMA_PARTITION is not set | ||
1048 | # CONFIG_EFI_PARTITION is not set | ||
1049 | |||
1050 | # | ||
1051 | # Native Language Support | ||
1052 | # | ||
1053 | CONFIG_NLS=y | ||
1054 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1055 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1056 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1057 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1058 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1059 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1060 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1061 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1062 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1063 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1064 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1065 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1066 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1067 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1068 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1069 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1070 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1071 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1072 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1073 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1074 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1075 | # CONFIG_NLS_ISO8859_8 is not set | ||
1076 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1077 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1078 | # CONFIG_NLS_ASCII is not set | ||
1079 | # CONFIG_NLS_ISO8859_1 is not set | ||
1080 | # CONFIG_NLS_ISO8859_2 is not set | ||
1081 | # CONFIG_NLS_ISO8859_3 is not set | ||
1082 | # CONFIG_NLS_ISO8859_4 is not set | ||
1083 | # CONFIG_NLS_ISO8859_5 is not set | ||
1084 | # CONFIG_NLS_ISO8859_6 is not set | ||
1085 | # CONFIG_NLS_ISO8859_7 is not set | ||
1086 | # CONFIG_NLS_ISO8859_9 is not set | ||
1087 | # CONFIG_NLS_ISO8859_13 is not set | ||
1088 | # CONFIG_NLS_ISO8859_14 is not set | ||
1089 | # CONFIG_NLS_ISO8859_15 is not set | ||
1090 | # CONFIG_NLS_KOI8_R is not set | ||
1091 | # CONFIG_NLS_KOI8_U is not set | ||
1092 | # CONFIG_NLS_UTF8 is not set | ||
1093 | |||
1094 | # | ||
1095 | # Profiling support | ||
1096 | # | ||
1097 | # CONFIG_PROFILING is not set | ||
1098 | |||
1099 | # | ||
1100 | # Kernel hacking | ||
1101 | # | ||
1102 | # CONFIG_PRINTK_TIME is not set | ||
1103 | CONFIG_ENABLE_MUST_CHECK=y | ||
1104 | # CONFIG_MAGIC_SYSRQ is not set | ||
1105 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1106 | # CONFIG_DEBUG_KERNEL is not set | ||
1107 | CONFIG_LOG_BUF_SHIFT=14 | ||
1108 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1109 | # CONFIG_DEBUG_FS is not set | ||
1110 | CONFIG_FRAME_POINTER=y | ||
1111 | # CONFIG_HEADERS_CHECK is not set | ||
1112 | CONFIG_DEBUG_USER=y | ||
1113 | |||
1114 | # | ||
1115 | # Security options | ||
1116 | # | ||
1117 | # CONFIG_KEYS is not set | ||
1118 | # CONFIG_SECURITY is not set | ||
1119 | |||
1120 | # | ||
1121 | # Cryptographic options | ||
1122 | # | ||
1123 | # CONFIG_CRYPTO is not set | ||
1124 | |||
1125 | # | ||
1126 | # Library routines | ||
1127 | # | ||
1128 | CONFIG_CRC_CCITT=y | ||
1129 | # CONFIG_CRC16 is not set | ||
1130 | CONFIG_CRC32=y | ||
1131 | CONFIG_LIBCRC32C=y | ||
1132 | CONFIG_ZLIB_INFLATE=y | ||
1133 | CONFIG_ZLIB_DEFLATE=y | ||
1134 | CONFIG_PLIST=y | ||
diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig index 89e116f955b1..c16537d9d67a 100644 --- a/arch/arm/configs/kb9202_defconfig +++ b/arch/arm/configs/kb9202_defconfig | |||
@@ -437,7 +437,7 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
437 | # CONFIG_WATCHDOG is not set | 437 | # CONFIG_WATCHDOG is not set |
438 | # CONFIG_NVRAM is not set | 438 | # CONFIG_NVRAM is not set |
439 | # CONFIG_RTC is not set | 439 | # CONFIG_RTC is not set |
440 | # CONFIG_AT91_RTC is not set | 440 | # CONFIG_AT91RM9200_RTC is not set |
441 | # CONFIG_DTLK is not set | 441 | # CONFIG_DTLK is not set |
442 | # CONFIG_R3964 is not set | 442 | # CONFIG_R3964 is not set |
443 | 443 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 6f12d2686aaf..238dd9b6db84 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -438,16 +438,19 @@ __early_param("initrd=", early_initrd); | |||
438 | 438 | ||
439 | static void __init arm_add_memory(unsigned long start, unsigned long size) | 439 | static void __init arm_add_memory(unsigned long start, unsigned long size) |
440 | { | 440 | { |
441 | struct membank *bank; | ||
442 | |||
441 | /* | 443 | /* |
442 | * Ensure that start/size are aligned to a page boundary. | 444 | * Ensure that start/size are aligned to a page boundary. |
443 | * Size is appropriately rounded down, start is rounded up. | 445 | * Size is appropriately rounded down, start is rounded up. |
444 | */ | 446 | */ |
445 | size -= start & ~PAGE_MASK; | 447 | size -= start & ~PAGE_MASK; |
446 | 448 | ||
447 | meminfo.bank[meminfo.nr_banks].start = PAGE_ALIGN(start); | 449 | bank = &meminfo.bank[meminfo.nr_banks++]; |
448 | meminfo.bank[meminfo.nr_banks].size = size & PAGE_MASK; | 450 | |
449 | meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(start); | 451 | bank->start = PAGE_ALIGN(start); |
450 | meminfo.nr_banks += 1; | 452 | bank->size = size & PAGE_MASK; |
453 | bank->node = PHYS_TO_NID(start); | ||
451 | } | 454 | } |
452 | 455 | ||
453 | /* | 456 | /* |
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig index 2f85e8693b1b..9f11db8af233 100644 --- a/arch/arm/mach-at91rm9200/Kconfig +++ b/arch/arm/mach-at91rm9200/Kconfig | |||
@@ -2,7 +2,8 @@ if ARCH_AT91 | |||
2 | 2 | ||
3 | menu "Atmel AT91 System-on-Chip" | 3 | menu "Atmel AT91 System-on-Chip" |
4 | 4 | ||
5 | comment "Atmel AT91 Processors" | 5 | choice |
6 | prompt "Atmel AT91 Processor" | ||
6 | 7 | ||
7 | config ARCH_AT91RM9200 | 8 | config ARCH_AT91RM9200 |
8 | bool "AT91RM9200" | 9 | bool "AT91RM9200" |
@@ -13,6 +14,8 @@ config ARCH_AT91SAM9260 | |||
13 | config ARCH_AT91SAM9261 | 14 | config ARCH_AT91SAM9261 |
14 | bool "AT91SAM9261" | 15 | bool "AT91SAM9261" |
15 | 16 | ||
17 | endchoice | ||
18 | |||
16 | # ---------------------------------------------------------- | 19 | # ---------------------------------------------------------- |
17 | 20 | ||
18 | if ARCH_AT91RM9200 | 21 | if ARCH_AT91RM9200 |
@@ -33,7 +36,6 @@ config ARCH_AT91RM9200DK | |||
33 | Select this if you are using Atmel's AT91RM9200-DK Development board. | 36 | Select this if you are using Atmel's AT91RM9200-DK Development board. |
34 | (Discontinued) | 37 | (Discontinued) |
35 | 38 | ||
36 | |||
37 | config MACH_AT91RM9200EK | 39 | config MACH_AT91RM9200EK |
38 | bool "Atmel AT91RM9200-EK Evaluation Kit" | 40 | bool "Atmel AT91RM9200-EK Evaluation Kit" |
39 | depends on ARCH_AT91RM9200 | 41 | depends on ARCH_AT91RM9200 |
@@ -90,6 +92,13 @@ if ARCH_AT91SAM9260 | |||
90 | 92 | ||
91 | comment "AT91SAM9260 Board Type" | 93 | comment "AT91SAM9260 Board Type" |
92 | 94 | ||
95 | config MACH_AT91SAM9260EK | ||
96 | bool "Atmel AT91SAM9260-EK Evaluation Kit" | ||
97 | depends on ARCH_AT91SAM9260 | ||
98 | help | ||
99 | Select this if you are using Atmel's AT91SAM9260-EK Evaluation Kit. | ||
100 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> | ||
101 | |||
93 | endif | 102 | endif |
94 | 103 | ||
95 | # ---------------------------------------------------------- | 104 | # ---------------------------------------------------------- |
@@ -98,8 +107,31 @@ if ARCH_AT91SAM9261 | |||
98 | 107 | ||
99 | comment "AT91SAM9261 Board Type" | 108 | comment "AT91SAM9261 Board Type" |
100 | 109 | ||
110 | config MACH_AT91SAM9261EK | ||
111 | bool "Atmel AT91SAM9261-EK Evaluation Kit" | ||
112 | depends on ARCH_AT91SAM9261 | ||
113 | help | ||
114 | Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. | ||
115 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> | ||
116 | |||
101 | endif | 117 | endif |
102 | 118 | ||
119 | # ---------------------------------------------------------- | ||
120 | |||
121 | comment "AT91 Board Options" | ||
122 | |||
123 | config MTD_AT91_DATAFLASH_CARD | ||
124 | bool "Enable DataFlash Card support" | ||
125 | depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK) | ||
126 | help | ||
127 | Enable support for the DataFlash card. | ||
128 | |||
129 | config MTD_NAND_AT91_BUSWIDTH_16 | ||
130 | bool "Enable 16-bit data bus interface to NAND flash" | ||
131 | depends on (MACH_AT91SAM9261EK || MACH_AT91SAM9260EK) | ||
132 | help | ||
133 | On AT91SAM926x boards both types of NAND flash can be present | ||
134 | (8 and 16 bit data bus width). | ||
103 | 135 | ||
104 | # ---------------------------------------------------------- | 136 | # ---------------------------------------------------------- |
105 | 137 | ||
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile index c174805c24e5..cf777007847a 100644 --- a/arch/arm/mach-at91rm9200/Makefile +++ b/arch/arm/mach-at91rm9200/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := clock.o irq.o gpio.o devices.o | 5 | obj-y := clock.o irq.o gpio.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
@@ -10,11 +10,11 @@ obj- := | |||
10 | obj-$(CONFIG_PM) += pm.o | 10 | obj-$(CONFIG_PM) += pm.o |
11 | 11 | ||
12 | # CPU-specific support | 12 | # CPU-specific support |
13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o | 13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o |
14 | obj-$(CONFIG_ARCH_AT91SAM9260) += | 14 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o |
15 | obj-$(CONFIG_ARCH_AT91SAM9261) += | 15 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o |
16 | 16 | ||
17 | # AT91RM9200 Board-specific support | 17 | # AT91RM9200 board-specific support |
18 | obj-$(CONFIG_MACH_ONEARM) += board-1arm.o | 18 | obj-$(CONFIG_MACH_ONEARM) += board-1arm.o |
19 | obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o | 19 | obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o |
20 | obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o | 20 | obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o |
@@ -26,8 +26,10 @@ obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o | |||
26 | obj-$(CONFIG_MACH_KAFA) += board-kafa.o | 26 | obj-$(CONFIG_MACH_KAFA) += board-kafa.o |
27 | 27 | ||
28 | # AT91SAM9260 board-specific support | 28 | # AT91SAM9260 board-specific support |
29 | obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o | ||
29 | 30 | ||
30 | # AT91SAM9261 board-specific support | 31 | # AT91SAM9261 board-specific support |
32 | obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o | ||
31 | 33 | ||
32 | # LEDs support | 34 | # LEDs support |
33 | led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o | 35 | led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o |
diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/at91rm9200.c index dcf6136fedf9..a92e9a495b07 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c | |||
@@ -14,8 +14,10 @@ | |||
14 | 14 | ||
15 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/arch/at91rm9200.h> | ||
18 | #include <asm/arch/at91_pmc.h> | ||
19 | #include <asm/arch/at91_st.h> | ||
17 | 20 | ||
18 | #include <asm/hardware.h> | ||
19 | #include "generic.h" | 21 | #include "generic.h" |
20 | #include "clock.h" | 22 | #include "clock.h" |
21 | 23 | ||
@@ -26,32 +28,12 @@ static struct map_desc at91rm9200_io_desc[] __initdata = { | |||
26 | .length = SZ_4K, | 28 | .length = SZ_4K, |
27 | .type = MT_DEVICE, | 29 | .type = MT_DEVICE, |
28 | }, { | 30 | }, { |
29 | .virtual = AT91_VA_BASE_SPI, | ||
30 | .pfn = __phys_to_pfn(AT91RM9200_BASE_SPI), | ||
31 | .length = SZ_16K, | ||
32 | .type = MT_DEVICE, | ||
33 | }, { | ||
34 | .virtual = AT91_VA_BASE_EMAC, | 31 | .virtual = AT91_VA_BASE_EMAC, |
35 | .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), | 32 | .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), |
36 | .length = SZ_16K, | 33 | .length = SZ_16K, |
37 | .type = MT_DEVICE, | 34 | .type = MT_DEVICE, |
38 | }, { | 35 | }, { |
39 | .virtual = AT91_VA_BASE_TWI, | 36 | .virtual = AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE, |
40 | .pfn = __phys_to_pfn(AT91RM9200_BASE_TWI), | ||
41 | .length = SZ_16K, | ||
42 | .type = MT_DEVICE, | ||
43 | }, { | ||
44 | .virtual = AT91_VA_BASE_MCI, | ||
45 | .pfn = __phys_to_pfn(AT91RM9200_BASE_MCI), | ||
46 | .length = SZ_16K, | ||
47 | .type = MT_DEVICE, | ||
48 | }, { | ||
49 | .virtual = AT91_VA_BASE_UDP, | ||
50 | .pfn = __phys_to_pfn(AT91RM9200_BASE_UDP), | ||
51 | .length = SZ_16K, | ||
52 | .type = MT_DEVICE, | ||
53 | }, { | ||
54 | .virtual = AT91_SRAM_VIRT_BASE, | ||
55 | .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), | 37 | .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), |
56 | .length = AT91RM9200_SRAM_SIZE, | 38 | .length = AT91RM9200_SRAM_SIZE, |
57 | .type = MT_DEVICE, | 39 | .type = MT_DEVICE, |
@@ -222,6 +204,16 @@ static struct at91_gpio_bank at91rm9200_gpio[] = { | |||
222 | } | 204 | } |
223 | }; | 205 | }; |
224 | 206 | ||
207 | static void at91rm9200_reset(void) | ||
208 | { | ||
209 | /* | ||
210 | * Perform a hardware reset with the use of the Watchdog timer. | ||
211 | */ | ||
212 | at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); | ||
213 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | ||
214 | } | ||
215 | |||
216 | |||
225 | /* -------------------------------------------------------------------- | 217 | /* -------------------------------------------------------------------- |
226 | * AT91RM9200 processor initialization | 218 | * AT91RM9200 processor initialization |
227 | * -------------------------------------------------------------------- */ | 219 | * -------------------------------------------------------------------- */ |
@@ -230,6 +222,12 @@ void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks | |||
230 | /* Map peripherals */ | 222 | /* Map peripherals */ |
231 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | 223 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); |
232 | 224 | ||
225 | at91_arch_reset = at91rm9200_reset; | ||
226 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | ||
227 | | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) | ||
228 | | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) | ||
229 | | (1 << AT91RM9200_ID_IRQ6); | ||
230 | |||
233 | /* Init clock subsystem */ | 231 | /* Init clock subsystem */ |
234 | at91_clock_init(main_clock); | 232 | at91_clock_init(main_clock); |
235 | 233 | ||
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/at91rm9200_devices.c index 059824376629..4641b99db0ee 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/at91rm9200_devices.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-at91rm9200/devices.c | 2 | * arch/arm/mach-at91rm9200/at91rm9200_devices.c |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> | 4 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> |
5 | * Copyright (C) 2005 David Brownell | 5 | * Copyright (C) 2005 David Brownell |
@@ -15,9 +15,10 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | 17 | ||
18 | #include <asm/hardware.h> | ||
19 | #include <asm/arch/board.h> | 18 | #include <asm/arch/board.h> |
20 | #include <asm/arch/gpio.h> | 19 | #include <asm/arch/gpio.h> |
20 | #include <asm/arch/at91rm9200.h> | ||
21 | #include <asm/arch/at91rm9200_mc.h> | ||
21 | 22 | ||
22 | #include "generic.h" | 23 | #include "generic.h" |
23 | 24 | ||
@@ -33,7 +34,7 @@ | |||
33 | static u64 ohci_dmamask = 0xffffffffUL; | 34 | static u64 ohci_dmamask = 0xffffffffUL; |
34 | static struct at91_usbh_data usbh_data; | 35 | static struct at91_usbh_data usbh_data; |
35 | 36 | ||
36 | static struct resource at91_usbh_resources[] = { | 37 | static struct resource usbh_resources[] = { |
37 | [0] = { | 38 | [0] = { |
38 | .start = AT91RM9200_UHP_BASE, | 39 | .start = AT91RM9200_UHP_BASE, |
39 | .end = AT91RM9200_UHP_BASE + SZ_1M - 1, | 40 | .end = AT91RM9200_UHP_BASE + SZ_1M - 1, |
@@ -54,8 +55,8 @@ static struct platform_device at91rm9200_usbh_device = { | |||
54 | .coherent_dma_mask = 0xffffffff, | 55 | .coherent_dma_mask = 0xffffffff, |
55 | .platform_data = &usbh_data, | 56 | .platform_data = &usbh_data, |
56 | }, | 57 | }, |
57 | .resource = at91_usbh_resources, | 58 | .resource = usbh_resources, |
58 | .num_resources = ARRAY_SIZE(at91_usbh_resources), | 59 | .num_resources = ARRAY_SIZE(usbh_resources), |
59 | }; | 60 | }; |
60 | 61 | ||
61 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | 62 | void __init at91_add_device_usbh(struct at91_usbh_data *data) |
@@ -78,7 +79,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
78 | #ifdef CONFIG_USB_GADGET_AT91 | 79 | #ifdef CONFIG_USB_GADGET_AT91 |
79 | static struct at91_udc_data udc_data; | 80 | static struct at91_udc_data udc_data; |
80 | 81 | ||
81 | static struct resource at91_udc_resources[] = { | 82 | static struct resource udc_resources[] = { |
82 | [0] = { | 83 | [0] = { |
83 | .start = AT91RM9200_BASE_UDP, | 84 | .start = AT91RM9200_BASE_UDP, |
84 | .end = AT91RM9200_BASE_UDP + SZ_16K - 1, | 85 | .end = AT91RM9200_BASE_UDP + SZ_16K - 1, |
@@ -97,8 +98,8 @@ static struct platform_device at91rm9200_udc_device = { | |||
97 | .dev = { | 98 | .dev = { |
98 | .platform_data = &udc_data, | 99 | .platform_data = &udc_data, |
99 | }, | 100 | }, |
100 | .resource = at91_udc_resources, | 101 | .resource = udc_resources, |
101 | .num_resources = ARRAY_SIZE(at91_udc_resources), | 102 | .num_resources = ARRAY_SIZE(udc_resources), |
102 | }; | 103 | }; |
103 | 104 | ||
104 | void __init at91_add_device_udc(struct at91_udc_data *data) | 105 | void __init at91_add_device_udc(struct at91_udc_data *data) |
@@ -129,7 +130,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {} | |||
129 | static u64 eth_dmamask = 0xffffffffUL; | 130 | static u64 eth_dmamask = 0xffffffffUL; |
130 | static struct at91_eth_data eth_data; | 131 | static struct at91_eth_data eth_data; |
131 | 132 | ||
132 | static struct resource at91_eth_resources[] = { | 133 | static struct resource eth_resources[] = { |
133 | [0] = { | 134 | [0] = { |
134 | .start = AT91_VA_BASE_EMAC, | 135 | .start = AT91_VA_BASE_EMAC, |
135 | .end = AT91_VA_BASE_EMAC + SZ_16K - 1, | 136 | .end = AT91_VA_BASE_EMAC + SZ_16K - 1, |
@@ -150,8 +151,8 @@ static struct platform_device at91rm9200_eth_device = { | |||
150 | .coherent_dma_mask = 0xffffffff, | 151 | .coherent_dma_mask = 0xffffffff, |
151 | .platform_data = ð_data, | 152 | .platform_data = ð_data, |
152 | }, | 153 | }, |
153 | .resource = at91_eth_resources, | 154 | .resource = eth_resources, |
154 | .num_resources = ARRAY_SIZE(at91_eth_resources), | 155 | .num_resources = ARRAY_SIZE(eth_resources), |
155 | }; | 156 | }; |
156 | 157 | ||
157 | void __init at91_add_device_eth(struct at91_eth_data *data) | 158 | void __init at91_add_device_eth(struct at91_eth_data *data) |
@@ -202,11 +203,13 @@ void __init at91_add_device_eth(struct at91_eth_data *data) {} | |||
202 | #if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) | 203 | #if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) |
203 | static struct at91_cf_data cf_data; | 204 | static struct at91_cf_data cf_data; |
204 | 205 | ||
205 | static struct resource at91_cf_resources[] = { | 206 | #define CF_BASE AT91_CHIPSELECT_4 |
207 | |||
208 | static struct resource cf_resources[] = { | ||
206 | [0] = { | 209 | [0] = { |
207 | .start = AT91_CF_BASE, | 210 | .start = CF_BASE, |
208 | /* ties up CS4, CS5 and CS6 */ | 211 | /* ties up CS4, CS5 and CS6 */ |
209 | .end = AT91_CF_BASE + (0x30000000 - 1), | 212 | .end = CF_BASE + (0x30000000 - 1), |
210 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, | 213 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, |
211 | }, | 214 | }, |
212 | }; | 215 | }; |
@@ -217,15 +220,38 @@ static struct platform_device at91rm9200_cf_device = { | |||
217 | .dev = { | 220 | .dev = { |
218 | .platform_data = &cf_data, | 221 | .platform_data = &cf_data, |
219 | }, | 222 | }, |
220 | .resource = at91_cf_resources, | 223 | .resource = cf_resources, |
221 | .num_resources = ARRAY_SIZE(at91_cf_resources), | 224 | .num_resources = ARRAY_SIZE(cf_resources), |
222 | }; | 225 | }; |
223 | 226 | ||
224 | void __init at91_add_device_cf(struct at91_cf_data *data) | 227 | void __init at91_add_device_cf(struct at91_cf_data *data) |
225 | { | 228 | { |
229 | unsigned int csa; | ||
230 | |||
226 | if (!data) | 231 | if (!data) |
227 | return; | 232 | return; |
228 | 233 | ||
234 | data->chipselect = 4; /* can only use EBI ChipSelect 4 */ | ||
235 | |||
236 | /* CF takes over CS4, CS5, CS6 */ | ||
237 | csa = at91_sys_read(AT91_EBI_CSA); | ||
238 | at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS4A_SMC_COMPACTFLASH); | ||
239 | |||
240 | /* | ||
241 | * Static memory controller timing adjustments. | ||
242 | * REVISIT: these timings are in terms of MCK cycles, so | ||
243 | * when MCK changes (cpufreq etc) so must these values... | ||
244 | */ | ||
245 | at91_sys_write(AT91_SMC_CSR(4), | ||
246 | AT91_SMC_ACSS_STD | ||
247 | | AT91_SMC_DBW_16 | ||
248 | | AT91_SMC_BAT | ||
249 | | AT91_SMC_WSEN | ||
250 | | AT91_SMC_NWS_(32) /* wait states */ | ||
251 | | AT91_SMC_RWSETUP_(6) /* setup time */ | ||
252 | | AT91_SMC_RWHOLD_(4) /* hold time */ | ||
253 | ); | ||
254 | |||
229 | /* input/irq */ | 255 | /* input/irq */ |
230 | if (data->irq_pin) { | 256 | if (data->irq_pin) { |
231 | at91_set_gpio_input(data->irq_pin, 1); | 257 | at91_set_gpio_input(data->irq_pin, 1); |
@@ -245,6 +271,9 @@ void __init at91_add_device_cf(struct at91_cf_data *data) | |||
245 | at91_set_A_periph(AT91_PIN_PC11, 0); /* NCS5/CFCE1 */ | 271 | at91_set_A_periph(AT91_PIN_PC11, 0); /* NCS5/CFCE1 */ |
246 | at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ | 272 | at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ |
247 | 273 | ||
274 | /* nWAIT is _not_ a default setting */ | ||
275 | at91_set_A_periph(AT91_PIN_PC6, 1); /* nWAIT */ | ||
276 | |||
248 | cf_data = *data; | 277 | cf_data = *data; |
249 | platform_device_register(&at91rm9200_cf_device); | 278 | platform_device_register(&at91rm9200_cf_device); |
250 | } | 279 | } |
@@ -257,11 +286,11 @@ void __init at91_add_device_cf(struct at91_cf_data *data) {} | |||
257 | * MMC / SD | 286 | * MMC / SD |
258 | * -------------------------------------------------------------------- */ | 287 | * -------------------------------------------------------------------- */ |
259 | 288 | ||
260 | #if defined(CONFIG_MMC_AT91RM9200) || defined(CONFIG_MMC_AT91RM9200_MODULE) | 289 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) |
261 | static u64 mmc_dmamask = 0xffffffffUL; | 290 | static u64 mmc_dmamask = 0xffffffffUL; |
262 | static struct at91_mmc_data mmc_data; | 291 | static struct at91_mmc_data mmc_data; |
263 | 292 | ||
264 | static struct resource at91_mmc_resources[] = { | 293 | static struct resource mmc_resources[] = { |
265 | [0] = { | 294 | [0] = { |
266 | .start = AT91RM9200_BASE_MCI, | 295 | .start = AT91RM9200_BASE_MCI, |
267 | .end = AT91RM9200_BASE_MCI + SZ_16K - 1, | 296 | .end = AT91RM9200_BASE_MCI + SZ_16K - 1, |
@@ -282,8 +311,8 @@ static struct platform_device at91rm9200_mmc_device = { | |||
282 | .coherent_dma_mask = 0xffffffff, | 311 | .coherent_dma_mask = 0xffffffff, |
283 | .platform_data = &mmc_data, | 312 | .platform_data = &mmc_data, |
284 | }, | 313 | }, |
285 | .resource = at91_mmc_resources, | 314 | .resource = mmc_resources, |
286 | .num_resources = ARRAY_SIZE(at91_mmc_resources), | 315 | .num_resources = ARRAY_SIZE(mmc_resources), |
287 | }; | 316 | }; |
288 | 317 | ||
289 | void __init at91_add_device_mmc(struct at91_mmc_data *data) | 318 | void __init at91_add_device_mmc(struct at91_mmc_data *data) |
@@ -298,31 +327,33 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data) | |||
298 | } | 327 | } |
299 | if (data->wp_pin) | 328 | if (data->wp_pin) |
300 | at91_set_gpio_input(data->wp_pin, 1); | 329 | at91_set_gpio_input(data->wp_pin, 1); |
330 | if (data->vcc_pin) | ||
331 | at91_set_gpio_output(data->vcc_pin, 0); | ||
301 | 332 | ||
302 | /* CLK */ | 333 | /* CLK */ |
303 | at91_set_A_periph(AT91_PIN_PA27, 0); | 334 | at91_set_A_periph(AT91_PIN_PA27, 0); |
304 | 335 | ||
305 | if (data->is_b) { | 336 | if (data->slot_b) { |
306 | /* CMD */ | 337 | /* CMD */ |
307 | at91_set_B_periph(AT91_PIN_PA8, 0); | 338 | at91_set_B_periph(AT91_PIN_PA8, 1); |
308 | 339 | ||
309 | /* DAT0, maybe DAT1..DAT3 */ | 340 | /* DAT0, maybe DAT1..DAT3 */ |
310 | at91_set_B_periph(AT91_PIN_PA9, 0); | 341 | at91_set_B_periph(AT91_PIN_PA9, 1); |
311 | if (data->wire4) { | 342 | if (data->wire4) { |
312 | at91_set_B_periph(AT91_PIN_PA10, 0); | 343 | at91_set_B_periph(AT91_PIN_PA10, 1); |
313 | at91_set_B_periph(AT91_PIN_PA11, 0); | 344 | at91_set_B_periph(AT91_PIN_PA11, 1); |
314 | at91_set_B_periph(AT91_PIN_PA12, 0); | 345 | at91_set_B_periph(AT91_PIN_PA12, 1); |
315 | } | 346 | } |
316 | } else { | 347 | } else { |
317 | /* CMD */ | 348 | /* CMD */ |
318 | at91_set_A_periph(AT91_PIN_PA28, 0); | 349 | at91_set_A_periph(AT91_PIN_PA28, 1); |
319 | 350 | ||
320 | /* DAT0, maybe DAT1..DAT3 */ | 351 | /* DAT0, maybe DAT1..DAT3 */ |
321 | at91_set_A_periph(AT91_PIN_PA29, 0); | 352 | at91_set_A_periph(AT91_PIN_PA29, 1); |
322 | if (data->wire4) { | 353 | if (data->wire4) { |
323 | at91_set_B_periph(AT91_PIN_PB3, 0); | 354 | at91_set_B_periph(AT91_PIN_PB3, 1); |
324 | at91_set_B_periph(AT91_PIN_PB4, 0); | 355 | at91_set_B_periph(AT91_PIN_PB4, 1); |
325 | at91_set_B_periph(AT91_PIN_PB5, 0); | 356 | at91_set_B_periph(AT91_PIN_PB5, 1); |
326 | } | 357 | } |
327 | } | 358 | } |
328 | 359 | ||
@@ -341,29 +372,45 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data) {} | |||
341 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 372 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
342 | static struct at91_nand_data nand_data; | 373 | static struct at91_nand_data nand_data; |
343 | 374 | ||
344 | static struct resource at91_nand_resources[] = { | 375 | #define NAND_BASE AT91_CHIPSELECT_3 |
376 | |||
377 | static struct resource nand_resources[] = { | ||
345 | { | 378 | { |
346 | .start = AT91_SMARTMEDIA_BASE, | 379 | .start = NAND_BASE, |
347 | .end = AT91_SMARTMEDIA_BASE + SZ_8M - 1, | 380 | .end = NAND_BASE + SZ_8M - 1, |
348 | .flags = IORESOURCE_MEM, | 381 | .flags = IORESOURCE_MEM, |
349 | } | 382 | } |
350 | }; | 383 | }; |
351 | 384 | ||
352 | static struct platform_device at91_nand_device = { | 385 | static struct platform_device at91rm9200_nand_device = { |
353 | .name = "at91_nand", | 386 | .name = "at91_nand", |
354 | .id = -1, | 387 | .id = -1, |
355 | .dev = { | 388 | .dev = { |
356 | .platform_data = &nand_data, | 389 | .platform_data = &nand_data, |
357 | }, | 390 | }, |
358 | .resource = at91_nand_resources, | 391 | .resource = nand_resources, |
359 | .num_resources = ARRAY_SIZE(at91_nand_resources), | 392 | .num_resources = ARRAY_SIZE(nand_resources), |
360 | }; | 393 | }; |
361 | 394 | ||
362 | void __init at91_add_device_nand(struct at91_nand_data *data) | 395 | void __init at91_add_device_nand(struct at91_nand_data *data) |
363 | { | 396 | { |
397 | unsigned int csa; | ||
398 | |||
364 | if (!data) | 399 | if (!data) |
365 | return; | 400 | return; |
366 | 401 | ||
402 | /* enable the address range of CS3 */ | ||
403 | csa = at91_sys_read(AT91_EBI_CSA); | ||
404 | at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS3A_SMC_SMARTMEDIA); | ||
405 | |||
406 | /* set the bus interface characteristics */ | ||
407 | at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_ACSS_STD | AT91_SMC_DBW_8 | AT91_SMC_WSEN | ||
408 | | AT91_SMC_NWS_(5) | ||
409 | | AT91_SMC_TDF_(1) | ||
410 | | AT91_SMC_RWSETUP_(0) /* tDS Data Set up Time 30 - ns */ | ||
411 | | AT91_SMC_RWHOLD_(1) /* tDH Data Hold Time 20 - ns */ | ||
412 | ); | ||
413 | |||
367 | /* enable pin */ | 414 | /* enable pin */ |
368 | if (data->enable_pin) | 415 | if (data->enable_pin) |
369 | at91_set_gpio_output(data->enable_pin, 1); | 416 | at91_set_gpio_output(data->enable_pin, 1); |
@@ -380,7 +427,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
380 | at91_set_A_periph(AT91_PIN_PC3, 0); /* SMWE */ | 427 | at91_set_A_periph(AT91_PIN_PC3, 0); /* SMWE */ |
381 | 428 | ||
382 | nand_data = *data; | 429 | nand_data = *data; |
383 | platform_device_register(&at91_nand_device); | 430 | platform_device_register(&at91rm9200_nand_device); |
384 | } | 431 | } |
385 | #else | 432 | #else |
386 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 433 | void __init at91_add_device_nand(struct at91_nand_data *data) {} |
@@ -392,10 +439,25 @@ void __init at91_add_device_nand(struct at91_nand_data *data) {} | |||
392 | * -------------------------------------------------------------------- */ | 439 | * -------------------------------------------------------------------- */ |
393 | 440 | ||
394 | #if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | 441 | #if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) |
442 | |||
443 | static struct resource twi_resources[] = { | ||
444 | [0] = { | ||
445 | .start = AT91RM9200_BASE_TWI, | ||
446 | .end = AT91RM9200_BASE_TWI + SZ_16K - 1, | ||
447 | .flags = IORESOURCE_MEM, | ||
448 | }, | ||
449 | [1] = { | ||
450 | .start = AT91RM9200_ID_TWI, | ||
451 | .end = AT91RM9200_ID_TWI, | ||
452 | .flags = IORESOURCE_IRQ, | ||
453 | }, | ||
454 | }; | ||
455 | |||
395 | static struct platform_device at91rm9200_twi_device = { | 456 | static struct platform_device at91rm9200_twi_device = { |
396 | .name = "at91_i2c", | 457 | .name = "at91_i2c", |
397 | .id = -1, | 458 | .id = -1, |
398 | .num_resources = 0, | 459 | .resource = twi_resources, |
460 | .num_resources = ARRAY_SIZE(twi_resources), | ||
399 | }; | 461 | }; |
400 | 462 | ||
401 | void __init at91_add_device_i2c(void) | 463 | void __init at91_add_device_i2c(void) |
@@ -421,7 +483,7 @@ void __init at91_add_device_i2c(void) {} | |||
421 | #if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) | 483 | #if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) |
422 | static u64 spi_dmamask = 0xffffffffUL; | 484 | static u64 spi_dmamask = 0xffffffffUL; |
423 | 485 | ||
424 | static struct resource at91_spi_resources[] = { | 486 | static struct resource spi_resources[] = { |
425 | [0] = { | 487 | [0] = { |
426 | .start = AT91RM9200_BASE_SPI, | 488 | .start = AT91RM9200_BASE_SPI, |
427 | .end = AT91RM9200_BASE_SPI + SZ_16K - 1, | 489 | .end = AT91RM9200_BASE_SPI + SZ_16K - 1, |
@@ -438,14 +500,14 @@ static struct platform_device at91rm9200_spi_device = { | |||
438 | .name = "at91_spi", | 500 | .name = "at91_spi", |
439 | .id = 0, | 501 | .id = 0, |
440 | .dev = { | 502 | .dev = { |
441 | .dma_mask = &spi_dmamask, | 503 | .dma_mask = &spi_dmamask, |
442 | .coherent_dma_mask = 0xffffffff, | 504 | .coherent_dma_mask = 0xffffffff, |
443 | }, | 505 | }, |
444 | .resource = at91_spi_resources, | 506 | .resource = spi_resources, |
445 | .num_resources = ARRAY_SIZE(at91_spi_resources), | 507 | .num_resources = ARRAY_SIZE(spi_resources), |
446 | }; | 508 | }; |
447 | 509 | ||
448 | static const unsigned at91_spi_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; | 510 | static const unsigned spi_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; |
449 | 511 | ||
450 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | 512 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) |
451 | { | 513 | { |
@@ -461,7 +523,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
461 | if (devices[i].controller_data) | 523 | if (devices[i].controller_data) |
462 | cs_pin = (unsigned long) devices[i].controller_data; | 524 | cs_pin = (unsigned long) devices[i].controller_data; |
463 | else | 525 | else |
464 | cs_pin = at91_spi_standard_cs[devices[i].chip_select]; | 526 | cs_pin = spi_standard_cs[devices[i].chip_select]; |
465 | 527 | ||
466 | #ifdef CONFIG_SPI_AT91_MANUAL_CS | 528 | #ifdef CONFIG_SPI_AT91_MANUAL_CS |
467 | at91_set_gpio_output(cs_pin, 1); | 529 | at91_set_gpio_output(cs_pin, 1); |
@@ -474,7 +536,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
474 | } | 536 | } |
475 | 537 | ||
476 | spi_register_board_info(devices, nr_devices); | 538 | spi_register_board_info(devices, nr_devices); |
477 | at91_clock_associate("spi0_clk", &at91rm9200_spi_device.dev, "spi"); | 539 | at91_clock_associate("spi_clk", &at91rm9200_spi_device.dev, "spi"); |
478 | platform_device_register(&at91rm9200_spi_device); | 540 | platform_device_register(&at91rm9200_spi_device); |
479 | } | 541 | } |
480 | #else | 542 | #else |
@@ -486,7 +548,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
486 | * RTC | 548 | * RTC |
487 | * -------------------------------------------------------------------- */ | 549 | * -------------------------------------------------------------------- */ |
488 | 550 | ||
489 | #if defined(CONFIG_RTC_DRV_AT91) || defined(CONFIG_RTC_DRV_AT91_MODULE) | 551 | #if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE) |
490 | static struct platform_device at91rm9200_rtc_device = { | 552 | static struct platform_device at91rm9200_rtc_device = { |
491 | .name = "at91_rtc", | 553 | .name = "at91_rtc", |
492 | .id = -1, | 554 | .id = -1, |
@@ -506,7 +568,7 @@ static void __init at91_add_device_rtc(void) {} | |||
506 | * Watchdog | 568 | * Watchdog |
507 | * -------------------------------------------------------------------- */ | 569 | * -------------------------------------------------------------------- */ |
508 | 570 | ||
509 | #if defined(CONFIG_AT91_WATCHDOG) || defined(CONFIG_AT91_WATCHDOG_MODULE) | 571 | #if defined(CONFIG_AT91RM9200_WATCHDOG) || defined(CONFIG_AT91RM9200_WATCHDOG_MODULE) |
510 | static struct platform_device at91rm9200_wdt_device = { | 572 | static struct platform_device at91rm9200_wdt_device = { |
511 | .name = "at91_wdt", | 573 | .name = "at91_wdt", |
512 | .id = -1, | 574 | .id = -1, |
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_time.c b/arch/arm/mach-at91rm9200/at91rm9200_time.c index 07c9cea8961d..b999e192a7e9 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200_time.c +++ b/arch/arm/mach-at91rm9200/at91rm9200_time.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | 32 | ||
33 | #include <asm/arch/at91_st.h> | ||
34 | |||
33 | static unsigned long last_crtr; | 35 | static unsigned long last_crtr; |
34 | 36 | ||
35 | /* | 37 | /* |
@@ -99,6 +101,9 @@ void at91rm9200_timer_reset(void) | |||
99 | /* Set Period Interval timer */ | 101 | /* Set Period Interval timer */ |
100 | at91_sys_write(AT91_ST_PIMR, LATCH); | 102 | at91_sys_write(AT91_ST_PIMR, LATCH); |
101 | 103 | ||
104 | /* Clear any pending interrupts */ | ||
105 | (void) at91_sys_read(AT91_ST_SR); | ||
106 | |||
102 | /* Enable Period Interval Timer interrupt */ | 107 | /* Enable Period Interval Timer interrupt */ |
103 | at91_sys_write(AT91_ST_IER, AT91_ST_PITS); | 108 | at91_sys_write(AT91_ST_IER, AT91_ST_PITS); |
104 | } | 109 | } |
diff --git a/arch/arm/mach-at91rm9200/at91sam9260.c b/arch/arm/mach-at91rm9200/at91sam9260.c new file mode 100644 index 000000000000..203f073a53e6 --- /dev/null +++ b/arch/arm/mach-at91rm9200/at91sam9260.c | |||
@@ -0,0 +1,294 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91rm9200/at91sam9260.c | ||
3 | * | ||
4 | * Copyright (C) 2006 SAN People | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/module.h> | ||
14 | |||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach/map.h> | ||
17 | #include <asm/arch/at91sam9260.h> | ||
18 | #include <asm/arch/at91_pmc.h> | ||
19 | |||
20 | #include "generic.h" | ||
21 | #include "clock.h" | ||
22 | |||
23 | static struct map_desc at91sam9260_io_desc[] __initdata = { | ||
24 | { | ||
25 | .virtual = AT91_VA_BASE_SYS, | ||
26 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | ||
27 | .length = SZ_16K, | ||
28 | .type = MT_DEVICE, | ||
29 | }, { | ||
30 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE, | ||
31 | .pfn = __phys_to_pfn(AT91SAM9260_SRAM0_BASE), | ||
32 | .length = AT91SAM9260_SRAM0_SIZE, | ||
33 | .type = MT_DEVICE, | ||
34 | }, { | ||
35 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE - AT91SAM9260_SRAM1_SIZE, | ||
36 | .pfn = __phys_to_pfn(AT91SAM9260_SRAM1_BASE), | ||
37 | .length = AT91SAM9260_SRAM1_SIZE, | ||
38 | .type = MT_DEVICE, | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | /* -------------------------------------------------------------------- | ||
43 | * Clocks | ||
44 | * -------------------------------------------------------------------- */ | ||
45 | |||
46 | /* | ||
47 | * The peripheral clocks. | ||
48 | */ | ||
49 | static struct clk pioA_clk = { | ||
50 | .name = "pioA_clk", | ||
51 | .pmc_mask = 1 << AT91SAM9260_ID_PIOA, | ||
52 | .type = CLK_TYPE_PERIPHERAL, | ||
53 | }; | ||
54 | static struct clk pioB_clk = { | ||
55 | .name = "pioB_clk", | ||
56 | .pmc_mask = 1 << AT91SAM9260_ID_PIOB, | ||
57 | .type = CLK_TYPE_PERIPHERAL, | ||
58 | }; | ||
59 | static struct clk pioC_clk = { | ||
60 | .name = "pioC_clk", | ||
61 | .pmc_mask = 1 << AT91SAM9260_ID_PIOC, | ||
62 | .type = CLK_TYPE_PERIPHERAL, | ||
63 | }; | ||
64 | static struct clk adc_clk = { | ||
65 | .name = "adc_clk", | ||
66 | .pmc_mask = 1 << AT91SAM9260_ID_ADC, | ||
67 | .type = CLK_TYPE_PERIPHERAL, | ||
68 | }; | ||
69 | static struct clk usart0_clk = { | ||
70 | .name = "usart0_clk", | ||
71 | .pmc_mask = 1 << AT91SAM9260_ID_US0, | ||
72 | .type = CLK_TYPE_PERIPHERAL, | ||
73 | }; | ||
74 | static struct clk usart1_clk = { | ||
75 | .name = "usart1_clk", | ||
76 | .pmc_mask = 1 << AT91SAM9260_ID_US1, | ||
77 | .type = CLK_TYPE_PERIPHERAL, | ||
78 | }; | ||
79 | static struct clk usart2_clk = { | ||
80 | .name = "usart2_clk", | ||
81 | .pmc_mask = 1 << AT91SAM9260_ID_US2, | ||
82 | .type = CLK_TYPE_PERIPHERAL, | ||
83 | }; | ||
84 | static struct clk mmc_clk = { | ||
85 | .name = "mci_clk", | ||
86 | .pmc_mask = 1 << AT91SAM9260_ID_MCI, | ||
87 | .type = CLK_TYPE_PERIPHERAL, | ||
88 | }; | ||
89 | static struct clk udc_clk = { | ||
90 | .name = "udc_clk", | ||
91 | .pmc_mask = 1 << AT91SAM9260_ID_UDP, | ||
92 | .type = CLK_TYPE_PERIPHERAL, | ||
93 | }; | ||
94 | static struct clk twi_clk = { | ||
95 | .name = "twi_clk", | ||
96 | .pmc_mask = 1 << AT91SAM9260_ID_TWI, | ||
97 | .type = CLK_TYPE_PERIPHERAL, | ||
98 | }; | ||
99 | static struct clk spi0_clk = { | ||
100 | .name = "spi0_clk", | ||
101 | .pmc_mask = 1 << AT91SAM9260_ID_SPI0, | ||
102 | .type = CLK_TYPE_PERIPHERAL, | ||
103 | }; | ||
104 | static struct clk spi1_clk = { | ||
105 | .name = "spi1_clk", | ||
106 | .pmc_mask = 1 << AT91SAM9260_ID_SPI1, | ||
107 | .type = CLK_TYPE_PERIPHERAL, | ||
108 | }; | ||
109 | static struct clk ohci_clk = { | ||
110 | .name = "ohci_clk", | ||
111 | .pmc_mask = 1 << AT91SAM9260_ID_UHP, | ||
112 | .type = CLK_TYPE_PERIPHERAL, | ||
113 | }; | ||
114 | static struct clk ether_clk = { | ||
115 | .name = "ether_clk", | ||
116 | .pmc_mask = 1 << AT91SAM9260_ID_EMAC, | ||
117 | .type = CLK_TYPE_PERIPHERAL, | ||
118 | }; | ||
119 | static struct clk isi_clk = { | ||
120 | .name = "isi_clk", | ||
121 | .pmc_mask = 1 << AT91SAM9260_ID_ISI, | ||
122 | .type = CLK_TYPE_PERIPHERAL, | ||
123 | }; | ||
124 | static struct clk usart3_clk = { | ||
125 | .name = "usart3_clk", | ||
126 | .pmc_mask = 1 << AT91SAM9260_ID_US3, | ||
127 | .type = CLK_TYPE_PERIPHERAL, | ||
128 | }; | ||
129 | static struct clk usart4_clk = { | ||
130 | .name = "usart4_clk", | ||
131 | .pmc_mask = 1 << AT91SAM9260_ID_US4, | ||
132 | .type = CLK_TYPE_PERIPHERAL, | ||
133 | }; | ||
134 | static struct clk usart5_clk = { | ||
135 | .name = "usart5_clk", | ||
136 | .pmc_mask = 1 << AT91SAM9260_ID_US5, | ||
137 | .type = CLK_TYPE_PERIPHERAL, | ||
138 | }; | ||
139 | |||
140 | static struct clk *periph_clocks[] __initdata = { | ||
141 | &pioA_clk, | ||
142 | &pioB_clk, | ||
143 | &pioC_clk, | ||
144 | &adc_clk, | ||
145 | &usart0_clk, | ||
146 | &usart1_clk, | ||
147 | &usart2_clk, | ||
148 | &mmc_clk, | ||
149 | &udc_clk, | ||
150 | &twi_clk, | ||
151 | &spi0_clk, | ||
152 | &spi1_clk, | ||
153 | // ssc | ||
154 | // tc0 .. tc2 | ||
155 | &ohci_clk, | ||
156 | ðer_clk, | ||
157 | &isi_clk, | ||
158 | &usart3_clk, | ||
159 | &usart4_clk, | ||
160 | &usart5_clk, | ||
161 | // tc3 .. tc5 | ||
162 | // irq0 .. irq2 | ||
163 | }; | ||
164 | |||
165 | /* | ||
166 | * The two programmable clocks. | ||
167 | * You must configure pin multiplexing to bring these signals out. | ||
168 | */ | ||
169 | static struct clk pck0 = { | ||
170 | .name = "pck0", | ||
171 | .pmc_mask = AT91_PMC_PCK0, | ||
172 | .type = CLK_TYPE_PROGRAMMABLE, | ||
173 | .id = 0, | ||
174 | }; | ||
175 | static struct clk pck1 = { | ||
176 | .name = "pck1", | ||
177 | .pmc_mask = AT91_PMC_PCK1, | ||
178 | .type = CLK_TYPE_PROGRAMMABLE, | ||
179 | .id = 1, | ||
180 | }; | ||
181 | |||
182 | static void __init at91sam9260_register_clocks(void) | ||
183 | { | ||
184 | int i; | ||
185 | |||
186 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
187 | clk_register(periph_clocks[i]); | ||
188 | |||
189 | clk_register(&pck0); | ||
190 | clk_register(&pck1); | ||
191 | } | ||
192 | |||
193 | /* -------------------------------------------------------------------- | ||
194 | * GPIO | ||
195 | * -------------------------------------------------------------------- */ | ||
196 | |||
197 | static struct at91_gpio_bank at91sam9260_gpio[] = { | ||
198 | { | ||
199 | .id = AT91SAM9260_ID_PIOA, | ||
200 | .offset = AT91_PIOA, | ||
201 | .clock = &pioA_clk, | ||
202 | }, { | ||
203 | .id = AT91SAM9260_ID_PIOB, | ||
204 | .offset = AT91_PIOB, | ||
205 | .clock = &pioB_clk, | ||
206 | }, { | ||
207 | .id = AT91SAM9260_ID_PIOC, | ||
208 | .offset = AT91_PIOC, | ||
209 | .clock = &pioC_clk, | ||
210 | } | ||
211 | }; | ||
212 | |||
213 | static void at91sam9260_reset(void) | ||
214 | { | ||
215 | #warning "Implement CPU reset" | ||
216 | } | ||
217 | |||
218 | |||
219 | /* -------------------------------------------------------------------- | ||
220 | * AT91SAM9260 processor initialization | ||
221 | * -------------------------------------------------------------------- */ | ||
222 | |||
223 | void __init at91sam9260_initialize(unsigned long main_clock) | ||
224 | { | ||
225 | /* Map peripherals */ | ||
226 | iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc)); | ||
227 | |||
228 | at91_arch_reset = at91sam9260_reset; | ||
229 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | ||
230 | | (1 << AT91SAM9260_ID_IRQ2); | ||
231 | |||
232 | /* Init clock subsystem */ | ||
233 | at91_clock_init(main_clock); | ||
234 | |||
235 | /* Register the processor-specific clocks */ | ||
236 | at91sam9260_register_clocks(); | ||
237 | |||
238 | /* Register GPIO subsystem */ | ||
239 | at91_gpio_init(at91sam9260_gpio, 3); | ||
240 | } | ||
241 | |||
242 | /* -------------------------------------------------------------------- | ||
243 | * Interrupt initialization | ||
244 | * -------------------------------------------------------------------- */ | ||
245 | |||
246 | /* | ||
247 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
248 | */ | ||
249 | static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
250 | 7, /* Advanced Interrupt Controller */ | ||
251 | 7, /* System Peripherals */ | ||
252 | 0, /* Parallel IO Controller A */ | ||
253 | 0, /* Parallel IO Controller B */ | ||
254 | 0, /* Parallel IO Controller C */ | ||
255 | 0, /* Analog-to-Digital Converter */ | ||
256 | 6, /* USART 0 */ | ||
257 | 6, /* USART 1 */ | ||
258 | 6, /* USART 2 */ | ||
259 | 0, /* Multimedia Card Interface */ | ||
260 | 4, /* USB Device Port */ | ||
261 | 0, /* Two-Wire Interface */ | ||
262 | 6, /* Serial Peripheral Interface 0 */ | ||
263 | 6, /* Serial Peripheral Interface 1 */ | ||
264 | 5, /* Serial Synchronous Controller */ | ||
265 | 0, | ||
266 | 0, | ||
267 | 0, /* Timer Counter 0 */ | ||
268 | 0, /* Timer Counter 1 */ | ||
269 | 0, /* Timer Counter 2 */ | ||
270 | 3, /* USB Host port */ | ||
271 | 3, /* Ethernet */ | ||
272 | 0, /* Image Sensor Interface */ | ||
273 | 6, /* USART 3 */ | ||
274 | 6, /* USART 4 */ | ||
275 | 6, /* USART 5 */ | ||
276 | 0, /* Timer Counter 3 */ | ||
277 | 0, /* Timer Counter 4 */ | ||
278 | 0, /* Timer Counter 5 */ | ||
279 | 0, /* Advanced Interrupt Controller */ | ||
280 | 0, /* Advanced Interrupt Controller */ | ||
281 | 0, /* Advanced Interrupt Controller */ | ||
282 | }; | ||
283 | |||
284 | void __init at91sam9260_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | ||
285 | { | ||
286 | if (!priority) | ||
287 | priority = at91sam9260_default_irq_priority; | ||
288 | |||
289 | /* Initialize the AIC interrupt controller */ | ||
290 | at91_aic_init(priority); | ||
291 | |||
292 | /* Enable GPIO interrupts */ | ||
293 | at91_gpio_irq_setup(); | ||
294 | } | ||
diff --git a/arch/arm/mach-at91rm9200/at91sam9260_devices.c b/arch/arm/mach-at91rm9200/at91sam9260_devices.c new file mode 100644 index 000000000000..a6c596dc4516 --- /dev/null +++ b/arch/arm/mach-at91rm9200/at91sam9260_devices.c | |||
@@ -0,0 +1,866 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91rm9200/at91sam9260_devices.c | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | #include <asm/mach/arch.h> | ||
13 | #include <asm/mach/map.h> | ||
14 | |||
15 | #include <linux/platform_device.h> | ||
16 | |||
17 | #include <asm/arch/board.h> | ||
18 | #include <asm/arch/gpio.h> | ||
19 | #include <asm/arch/at91sam9260.h> | ||
20 | #include <asm/arch/at91sam926x_mc.h> | ||
21 | |||
22 | #include "generic.h" | ||
23 | |||
24 | #define SZ_512 0x00000200 | ||
25 | #define SZ_256 0x00000100 | ||
26 | #define SZ_16 0x00000010 | ||
27 | |||
28 | /* -------------------------------------------------------------------- | ||
29 | * USB Host | ||
30 | * -------------------------------------------------------------------- */ | ||
31 | |||
32 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
33 | static u64 ohci_dmamask = 0xffffffffUL; | ||
34 | static struct at91_usbh_data usbh_data; | ||
35 | |||
36 | static struct resource usbh_resources[] = { | ||
37 | [0] = { | ||
38 | .start = AT91SAM9260_UHP_BASE, | ||
39 | .end = AT91SAM9260_UHP_BASE + SZ_1M - 1, | ||
40 | .flags = IORESOURCE_MEM, | ||
41 | }, | ||
42 | [1] = { | ||
43 | .start = AT91SAM9260_ID_UHP, | ||
44 | .end = AT91SAM9260_ID_UHP, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, | ||
47 | }; | ||
48 | |||
49 | static struct platform_device at91_usbh_device = { | ||
50 | .name = "at91_ohci", | ||
51 | .id = -1, | ||
52 | .dev = { | ||
53 | .dma_mask = &ohci_dmamask, | ||
54 | .coherent_dma_mask = 0xffffffff, | ||
55 | .platform_data = &usbh_data, | ||
56 | }, | ||
57 | .resource = usbh_resources, | ||
58 | .num_resources = ARRAY_SIZE(usbh_resources), | ||
59 | }; | ||
60 | |||
61 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | ||
62 | { | ||
63 | if (!data) | ||
64 | return; | ||
65 | |||
66 | usbh_data = *data; | ||
67 | platform_device_register(&at91_usbh_device); | ||
68 | } | ||
69 | #else | ||
70 | void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
71 | #endif | ||
72 | |||
73 | |||
74 | /* -------------------------------------------------------------------- | ||
75 | * USB Device (Gadget) | ||
76 | * -------------------------------------------------------------------- */ | ||
77 | |||
78 | #ifdef CONFIG_USB_GADGET_AT91 | ||
79 | static struct at91_udc_data udc_data; | ||
80 | |||
81 | static struct resource udc_resources[] = { | ||
82 | [0] = { | ||
83 | .start = AT91SAM9260_BASE_UDP, | ||
84 | .end = AT91SAM9260_BASE_UDP + SZ_16K - 1, | ||
85 | .flags = IORESOURCE_MEM, | ||
86 | }, | ||
87 | [1] = { | ||
88 | .start = AT91SAM9260_ID_UDP, | ||
89 | .end = AT91SAM9260_ID_UDP, | ||
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static struct platform_device at91_udc_device = { | ||
95 | .name = "at91_udc", | ||
96 | .id = -1, | ||
97 | .dev = { | ||
98 | .platform_data = &udc_data, | ||
99 | }, | ||
100 | .resource = udc_resources, | ||
101 | .num_resources = ARRAY_SIZE(udc_resources), | ||
102 | }; | ||
103 | |||
104 | void __init at91_add_device_udc(struct at91_udc_data *data) | ||
105 | { | ||
106 | if (!data) | ||
107 | return; | ||
108 | |||
109 | if (data->vbus_pin) { | ||
110 | at91_set_gpio_input(data->vbus_pin, 0); | ||
111 | at91_set_deglitch(data->vbus_pin, 1); | ||
112 | } | ||
113 | |||
114 | /* Pullup pin is handled internally by USB device peripheral */ | ||
115 | |||
116 | udc_data = *data; | ||
117 | platform_device_register(&at91_udc_device); | ||
118 | } | ||
119 | #else | ||
120 | void __init at91_add_device_udc(struct at91_udc_data *data) {} | ||
121 | #endif | ||
122 | |||
123 | |||
124 | /* -------------------------------------------------------------------- | ||
125 | * Ethernet | ||
126 | * -------------------------------------------------------------------- */ | ||
127 | |||
128 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | ||
129 | static u64 eth_dmamask = 0xffffffffUL; | ||
130 | static struct eth_platform_data eth_data; | ||
131 | |||
132 | static struct resource eth_resources[] = { | ||
133 | [0] = { | ||
134 | .start = AT91SAM9260_BASE_EMAC, | ||
135 | .end = AT91SAM9260_BASE_EMAC + SZ_16K - 1, | ||
136 | .flags = IORESOURCE_MEM, | ||
137 | }, | ||
138 | [1] = { | ||
139 | .start = AT91SAM9260_ID_EMAC, | ||
140 | .end = AT91SAM9260_ID_EMAC, | ||
141 | .flags = IORESOURCE_IRQ, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device at91sam9260_eth_device = { | ||
146 | .name = "macb", | ||
147 | .id = -1, | ||
148 | .dev = { | ||
149 | .dma_mask = ð_dmamask, | ||
150 | .coherent_dma_mask = 0xffffffff, | ||
151 | .platform_data = ð_data, | ||
152 | }, | ||
153 | .resource = eth_resources, | ||
154 | .num_resources = ARRAY_SIZE(eth_resources), | ||
155 | }; | ||
156 | |||
157 | void __init at91_add_device_eth(struct eth_platform_data *data) | ||
158 | { | ||
159 | if (!data) | ||
160 | return; | ||
161 | |||
162 | if (data->phy_irq_pin) { | ||
163 | at91_set_gpio_input(data->phy_irq_pin, 0); | ||
164 | at91_set_deglitch(data->phy_irq_pin, 1); | ||
165 | } | ||
166 | |||
167 | /* Pins used for MII and RMII */ | ||
168 | at91_set_A_periph(AT91_PIN_PA19, 0); /* ETXCK_EREFCK */ | ||
169 | at91_set_A_periph(AT91_PIN_PA17, 0); /* ERXDV */ | ||
170 | at91_set_A_periph(AT91_PIN_PA14, 0); /* ERX0 */ | ||
171 | at91_set_A_periph(AT91_PIN_PA15, 0); /* ERX1 */ | ||
172 | at91_set_A_periph(AT91_PIN_PA18, 0); /* ERXER */ | ||
173 | at91_set_A_periph(AT91_PIN_PA16, 0); /* ETXEN */ | ||
174 | at91_set_A_periph(AT91_PIN_PA12, 0); /* ETX0 */ | ||
175 | at91_set_A_periph(AT91_PIN_PA13, 0); /* ETX1 */ | ||
176 | at91_set_A_periph(AT91_PIN_PA21, 0); /* EMDIO */ | ||
177 | at91_set_A_periph(AT91_PIN_PA20, 0); /* EMDC */ | ||
178 | |||
179 | if (!data->is_rmii) { | ||
180 | at91_set_B_periph(AT91_PIN_PA28, 0); /* ECRS */ | ||
181 | at91_set_B_periph(AT91_PIN_PA29, 0); /* ECOL */ | ||
182 | at91_set_B_periph(AT91_PIN_PA25, 0); /* ERX2 */ | ||
183 | at91_set_B_periph(AT91_PIN_PA26, 0); /* ERX3 */ | ||
184 | at91_set_B_periph(AT91_PIN_PA27, 0); /* ERXCK */ | ||
185 | at91_set_B_periph(AT91_PIN_PA23, 0); /* ETX2 */ | ||
186 | at91_set_B_periph(AT91_PIN_PA24, 0); /* ETX3 */ | ||
187 | at91_set_B_periph(AT91_PIN_PA22, 0); /* ETXER */ | ||
188 | } | ||
189 | |||
190 | eth_data = *data; | ||
191 | platform_device_register(&at91sam9260_eth_device); | ||
192 | } | ||
193 | #else | ||
194 | void __init at91_add_device_eth(struct eth_platform_data *data) {} | ||
195 | #endif | ||
196 | |||
197 | |||
198 | /* -------------------------------------------------------------------- | ||
199 | * MMC / SD | ||
200 | * -------------------------------------------------------------------- */ | ||
201 | |||
202 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | ||
203 | static u64 mmc_dmamask = 0xffffffffUL; | ||
204 | static struct at91_mmc_data mmc_data; | ||
205 | |||
206 | static struct resource mmc_resources[] = { | ||
207 | [0] = { | ||
208 | .start = AT91SAM9260_BASE_MCI, | ||
209 | .end = AT91SAM9260_BASE_MCI + SZ_16K - 1, | ||
210 | .flags = IORESOURCE_MEM, | ||
211 | }, | ||
212 | [1] = { | ||
213 | .start = AT91SAM9260_ID_MCI, | ||
214 | .end = AT91SAM9260_ID_MCI, | ||
215 | .flags = IORESOURCE_IRQ, | ||
216 | }, | ||
217 | }; | ||
218 | |||
219 | static struct platform_device at91sam9260_mmc_device = { | ||
220 | .name = "at91_mci", | ||
221 | .id = -1, | ||
222 | .dev = { | ||
223 | .dma_mask = &mmc_dmamask, | ||
224 | .coherent_dma_mask = 0xffffffff, | ||
225 | .platform_data = &mmc_data, | ||
226 | }, | ||
227 | .resource = mmc_resources, | ||
228 | .num_resources = ARRAY_SIZE(mmc_resources), | ||
229 | }; | ||
230 | |||
231 | void __init at91_add_device_mmc(struct at91_mmc_data *data) | ||
232 | { | ||
233 | if (!data) | ||
234 | return; | ||
235 | |||
236 | /* input/irq */ | ||
237 | if (data->det_pin) { | ||
238 | at91_set_gpio_input(data->det_pin, 1); | ||
239 | at91_set_deglitch(data->det_pin, 1); | ||
240 | } | ||
241 | if (data->wp_pin) | ||
242 | at91_set_gpio_input(data->wp_pin, 1); | ||
243 | if (data->vcc_pin) | ||
244 | at91_set_gpio_output(data->vcc_pin, 0); | ||
245 | |||
246 | /* CLK */ | ||
247 | at91_set_A_periph(AT91_PIN_PA8, 0); | ||
248 | |||
249 | if (data->slot_b) { | ||
250 | /* CMD */ | ||
251 | at91_set_B_periph(AT91_PIN_PA1, 1); | ||
252 | |||
253 | /* DAT0, maybe DAT1..DAT3 */ | ||
254 | at91_set_B_periph(AT91_PIN_PA0, 1); | ||
255 | if (data->wire4) { | ||
256 | at91_set_B_periph(AT91_PIN_PA5, 1); | ||
257 | at91_set_B_periph(AT91_PIN_PA4, 1); | ||
258 | at91_set_B_periph(AT91_PIN_PA3, 1); | ||
259 | } | ||
260 | } else { | ||
261 | /* CMD */ | ||
262 | at91_set_A_periph(AT91_PIN_PA7, 1); | ||
263 | |||
264 | /* DAT0, maybe DAT1..DAT3 */ | ||
265 | at91_set_A_periph(AT91_PIN_PA6, 1); | ||
266 | if (data->wire4) { | ||
267 | at91_set_A_periph(AT91_PIN_PA9, 1); | ||
268 | at91_set_A_periph(AT91_PIN_PA10, 1); | ||
269 | at91_set_A_periph(AT91_PIN_PA11, 1); | ||
270 | } | ||
271 | } | ||
272 | |||
273 | mmc_data = *data; | ||
274 | platform_device_register(&at91sam9260_mmc_device); | ||
275 | } | ||
276 | #else | ||
277 | void __init at91_add_device_mmc(struct at91_mmc_data *data) {} | ||
278 | #endif | ||
279 | |||
280 | |||
281 | /* -------------------------------------------------------------------- | ||
282 | * NAND / SmartMedia | ||
283 | * -------------------------------------------------------------------- */ | ||
284 | |||
285 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | ||
286 | static struct at91_nand_data nand_data; | ||
287 | |||
288 | #define NAND_BASE AT91_CHIPSELECT_3 | ||
289 | |||
290 | static struct resource nand_resources[] = { | ||
291 | { | ||
292 | .start = NAND_BASE, | ||
293 | .end = NAND_BASE + SZ_8M - 1, | ||
294 | .flags = IORESOURCE_MEM, | ||
295 | } | ||
296 | }; | ||
297 | |||
298 | static struct platform_device at91sam9260_nand_device = { | ||
299 | .name = "at91_nand", | ||
300 | .id = -1, | ||
301 | .dev = { | ||
302 | .platform_data = &nand_data, | ||
303 | }, | ||
304 | .resource = nand_resources, | ||
305 | .num_resources = ARRAY_SIZE(nand_resources), | ||
306 | }; | ||
307 | |||
308 | void __init at91_add_device_nand(struct at91_nand_data *data) | ||
309 | { | ||
310 | unsigned long csa, mode; | ||
311 | |||
312 | if (!data) | ||
313 | return; | ||
314 | |||
315 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
316 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC); | ||
317 | |||
318 | /* set the bus interface characteristics */ | ||
319 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | ||
320 | | AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); | ||
321 | |||
322 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) | ||
323 | | AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5)); | ||
324 | |||
325 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); | ||
326 | |||
327 | if (data->bus_width_16) | ||
328 | mode = AT91_SMC_DBW_16; | ||
329 | else | ||
330 | mode = AT91_SMC_DBW_8; | ||
331 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1)); | ||
332 | |||
333 | /* enable pin */ | ||
334 | if (data->enable_pin) | ||
335 | at91_set_gpio_output(data->enable_pin, 1); | ||
336 | |||
337 | /* ready/busy pin */ | ||
338 | if (data->rdy_pin) | ||
339 | at91_set_gpio_input(data->rdy_pin, 1); | ||
340 | |||
341 | /* card detect pin */ | ||
342 | if (data->det_pin) | ||
343 | at91_set_gpio_input(data->det_pin, 1); | ||
344 | |||
345 | nand_data = *data; | ||
346 | platform_device_register(&at91sam9260_nand_device); | ||
347 | } | ||
348 | #else | ||
349 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | ||
350 | #endif | ||
351 | |||
352 | |||
353 | /* -------------------------------------------------------------------- | ||
354 | * TWI (i2c) | ||
355 | * -------------------------------------------------------------------- */ | ||
356 | |||
357 | #if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | ||
358 | |||
359 | static struct resource twi_resources[] = { | ||
360 | [0] = { | ||
361 | .start = AT91SAM9260_BASE_TWI, | ||
362 | .end = AT91SAM9260_BASE_TWI + SZ_16K - 1, | ||
363 | .flags = IORESOURCE_MEM, | ||
364 | }, | ||
365 | [1] = { | ||
366 | .start = AT91SAM9260_ID_TWI, | ||
367 | .end = AT91SAM9260_ID_TWI, | ||
368 | .flags = IORESOURCE_IRQ, | ||
369 | }, | ||
370 | }; | ||
371 | |||
372 | static struct platform_device at91sam9260_twi_device = { | ||
373 | .name = "at91_i2c", | ||
374 | .id = -1, | ||
375 | .resource = twi_resources, | ||
376 | .num_resources = ARRAY_SIZE(twi_resources), | ||
377 | }; | ||
378 | |||
379 | void __init at91_add_device_i2c(void) | ||
380 | { | ||
381 | /* pins used for TWI interface */ | ||
382 | at91_set_A_periph(AT91_PIN_PA23, 0); /* TWD */ | ||
383 | at91_set_multi_drive(AT91_PIN_PA23, 1); | ||
384 | |||
385 | at91_set_A_periph(AT91_PIN_PA24, 0); /* TWCK */ | ||
386 | at91_set_multi_drive(AT91_PIN_PA24, 1); | ||
387 | |||
388 | platform_device_register(&at91sam9260_twi_device); | ||
389 | } | ||
390 | #else | ||
391 | void __init at91_add_device_i2c(void) {} | ||
392 | #endif | ||
393 | |||
394 | |||
395 | /* -------------------------------------------------------------------- | ||
396 | * SPI | ||
397 | * -------------------------------------------------------------------- */ | ||
398 | |||
399 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
400 | static u64 spi_dmamask = 0xffffffffUL; | ||
401 | |||
402 | static struct resource spi0_resources[] = { | ||
403 | [0] = { | ||
404 | .start = AT91SAM9260_BASE_SPI0, | ||
405 | .end = AT91SAM9260_BASE_SPI0 + SZ_16K - 1, | ||
406 | .flags = IORESOURCE_MEM, | ||
407 | }, | ||
408 | [1] = { | ||
409 | .start = AT91SAM9260_ID_SPI0, | ||
410 | .end = AT91SAM9260_ID_SPI0, | ||
411 | .flags = IORESOURCE_IRQ, | ||
412 | }, | ||
413 | }; | ||
414 | |||
415 | static struct platform_device at91sam9260_spi0_device = { | ||
416 | .name = "atmel_spi", | ||
417 | .id = 0, | ||
418 | .dev = { | ||
419 | .dma_mask = &spi_dmamask, | ||
420 | .coherent_dma_mask = 0xffffffff, | ||
421 | }, | ||
422 | .resource = spi0_resources, | ||
423 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
424 | }; | ||
425 | |||
426 | static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PC11, AT91_PIN_PC16, AT91_PIN_PC17 }; | ||
427 | |||
428 | static struct resource spi1_resources[] = { | ||
429 | [0] = { | ||
430 | .start = AT91SAM9260_BASE_SPI1, | ||
431 | .end = AT91SAM9260_BASE_SPI1 + SZ_16K - 1, | ||
432 | .flags = IORESOURCE_MEM, | ||
433 | }, | ||
434 | [1] = { | ||
435 | .start = AT91SAM9260_ID_SPI1, | ||
436 | .end = AT91SAM9260_ID_SPI1, | ||
437 | .flags = IORESOURCE_IRQ, | ||
438 | }, | ||
439 | }; | ||
440 | |||
441 | static struct platform_device at91sam9260_spi1_device = { | ||
442 | .name = "atmel_spi", | ||
443 | .id = 1, | ||
444 | .dev = { | ||
445 | .dma_mask = &spi_dmamask, | ||
446 | .coherent_dma_mask = 0xffffffff, | ||
447 | }, | ||
448 | .resource = spi1_resources, | ||
449 | .num_resources = ARRAY_SIZE(spi1_resources), | ||
450 | }; | ||
451 | |||
452 | static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB3, AT91_PIN_PC5, AT91_PIN_PC4, AT91_PIN_PC3 }; | ||
453 | |||
454 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | ||
455 | { | ||
456 | int i; | ||
457 | unsigned long cs_pin; | ||
458 | short enable_spi0 = 0; | ||
459 | short enable_spi1 = 0; | ||
460 | |||
461 | /* Choose SPI chip-selects */ | ||
462 | for (i = 0; i < nr_devices; i++) { | ||
463 | if (devices[i].controller_data) | ||
464 | cs_pin = (unsigned long) devices[i].controller_data; | ||
465 | else if (devices[i].bus_num == 0) | ||
466 | cs_pin = spi0_standard_cs[devices[i].chip_select]; | ||
467 | else | ||
468 | cs_pin = spi1_standard_cs[devices[i].chip_select]; | ||
469 | |||
470 | if (devices[i].bus_num == 0) | ||
471 | enable_spi0 = 1; | ||
472 | else | ||
473 | enable_spi1 = 1; | ||
474 | |||
475 | /* enable chip-select pin */ | ||
476 | at91_set_gpio_output(cs_pin, 1); | ||
477 | |||
478 | /* pass chip-select pin to driver */ | ||
479 | devices[i].controller_data = (void *) cs_pin; | ||
480 | } | ||
481 | |||
482 | spi_register_board_info(devices, nr_devices); | ||
483 | |||
484 | /* Configure SPI bus(es) */ | ||
485 | if (enable_spi0) { | ||
486 | at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ | ||
487 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | ||
488 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */ | ||
489 | |||
490 | at91_clock_associate("spi0_clk", &at91sam9260_spi0_device.dev, "spi_clk"); | ||
491 | platform_device_register(&at91sam9260_spi0_device); | ||
492 | } | ||
493 | if (enable_spi1) { | ||
494 | at91_set_A_periph(AT91_PIN_PB0, 0); /* SPI1_MISO */ | ||
495 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */ | ||
496 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */ | ||
497 | |||
498 | at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk"); | ||
499 | platform_device_register(&at91sam9260_spi1_device); | ||
500 | } | ||
501 | } | ||
502 | #else | ||
503 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} | ||
504 | #endif | ||
505 | |||
506 | |||
507 | /* -------------------------------------------------------------------- | ||
508 | * LEDs | ||
509 | * -------------------------------------------------------------------- */ | ||
510 | |||
511 | #if defined(CONFIG_LEDS) | ||
512 | u8 at91_leds_cpu; | ||
513 | u8 at91_leds_timer; | ||
514 | |||
515 | void __init at91_init_leds(u8 cpu_led, u8 timer_led) | ||
516 | { | ||
517 | at91_leds_cpu = cpu_led; | ||
518 | at91_leds_timer = timer_led; | ||
519 | } | ||
520 | #else | ||
521 | void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} | ||
522 | #endif | ||
523 | |||
524 | |||
525 | /* -------------------------------------------------------------------- | ||
526 | * UART | ||
527 | * -------------------------------------------------------------------- */ | ||
528 | #if defined(CONFIG_SERIAL_ATMEL) | ||
529 | static struct resource dbgu_resources[] = { | ||
530 | [0] = { | ||
531 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | ||
532 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | ||
533 | .flags = IORESOURCE_MEM, | ||
534 | }, | ||
535 | [1] = { | ||
536 | .start = AT91_ID_SYS, | ||
537 | .end = AT91_ID_SYS, | ||
538 | .flags = IORESOURCE_IRQ, | ||
539 | }, | ||
540 | }; | ||
541 | |||
542 | static struct atmel_uart_data dbgu_data = { | ||
543 | .use_dma_tx = 0, | ||
544 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | ||
545 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
546 | }; | ||
547 | |||
548 | static struct platform_device at91sam9260_dbgu_device = { | ||
549 | .name = "atmel_usart", | ||
550 | .id = 0, | ||
551 | .dev = { | ||
552 | .platform_data = &dbgu_data, | ||
553 | .coherent_dma_mask = 0xffffffff, | ||
554 | }, | ||
555 | .resource = dbgu_resources, | ||
556 | .num_resources = ARRAY_SIZE(dbgu_resources), | ||
557 | }; | ||
558 | |||
559 | static inline void configure_dbgu_pins(void) | ||
560 | { | ||
561 | at91_set_A_periph(AT91_PIN_PB14, 0); /* DRXD */ | ||
562 | at91_set_A_periph(AT91_PIN_PB15, 1); /* DTXD */ | ||
563 | } | ||
564 | |||
565 | static struct resource uart0_resources[] = { | ||
566 | [0] = { | ||
567 | .start = AT91SAM9260_BASE_US0, | ||
568 | .end = AT91SAM9260_BASE_US0 + SZ_16K - 1, | ||
569 | .flags = IORESOURCE_MEM, | ||
570 | }, | ||
571 | [1] = { | ||
572 | .start = AT91SAM9260_ID_US0, | ||
573 | .end = AT91SAM9260_ID_US0, | ||
574 | .flags = IORESOURCE_IRQ, | ||
575 | }, | ||
576 | }; | ||
577 | |||
578 | static struct atmel_uart_data uart0_data = { | ||
579 | .use_dma_tx = 1, | ||
580 | .use_dma_rx = 1, | ||
581 | }; | ||
582 | |||
583 | static struct platform_device at91sam9260_uart0_device = { | ||
584 | .name = "atmel_usart", | ||
585 | .id = 1, | ||
586 | .dev = { | ||
587 | .platform_data = &uart0_data, | ||
588 | .coherent_dma_mask = 0xffffffff, | ||
589 | }, | ||
590 | .resource = uart0_resources, | ||
591 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
592 | }; | ||
593 | |||
594 | static inline void configure_usart0_pins(void) | ||
595 | { | ||
596 | at91_set_A_periph(AT91_PIN_PB4, 1); /* TXD0 */ | ||
597 | at91_set_A_periph(AT91_PIN_PB5, 0); /* RXD0 */ | ||
598 | at91_set_A_periph(AT91_PIN_PB26, 0); /* RTS0 */ | ||
599 | at91_set_A_periph(AT91_PIN_PB27, 0); /* CTS0 */ | ||
600 | at91_set_A_periph(AT91_PIN_PB24, 0); /* DTR0 */ | ||
601 | at91_set_A_periph(AT91_PIN_PB22, 0); /* DSR0 */ | ||
602 | at91_set_A_periph(AT91_PIN_PB23, 0); /* DCD0 */ | ||
603 | at91_set_A_periph(AT91_PIN_PB25, 0); /* RI0 */ | ||
604 | } | ||
605 | |||
606 | static struct resource uart1_resources[] = { | ||
607 | [0] = { | ||
608 | .start = AT91SAM9260_BASE_US1, | ||
609 | .end = AT91SAM9260_BASE_US1 + SZ_16K - 1, | ||
610 | .flags = IORESOURCE_MEM, | ||
611 | }, | ||
612 | [1] = { | ||
613 | .start = AT91SAM9260_ID_US1, | ||
614 | .end = AT91SAM9260_ID_US1, | ||
615 | .flags = IORESOURCE_IRQ, | ||
616 | }, | ||
617 | }; | ||
618 | |||
619 | static struct atmel_uart_data uart1_data = { | ||
620 | .use_dma_tx = 1, | ||
621 | .use_dma_rx = 1, | ||
622 | }; | ||
623 | |||
624 | static struct platform_device at91sam9260_uart1_device = { | ||
625 | .name = "atmel_usart", | ||
626 | .id = 2, | ||
627 | .dev = { | ||
628 | .platform_data = &uart1_data, | ||
629 | .coherent_dma_mask = 0xffffffff, | ||
630 | }, | ||
631 | .resource = uart1_resources, | ||
632 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
633 | }; | ||
634 | |||
635 | static inline void configure_usart1_pins(void) | ||
636 | { | ||
637 | at91_set_A_periph(AT91_PIN_PB6, 1); /* TXD1 */ | ||
638 | at91_set_A_periph(AT91_PIN_PB7, 0); /* RXD1 */ | ||
639 | at91_set_A_periph(AT91_PIN_PB28, 0); /* RTS1 */ | ||
640 | at91_set_A_periph(AT91_PIN_PB29, 0); /* CTS1 */ | ||
641 | } | ||
642 | |||
643 | static struct resource uart2_resources[] = { | ||
644 | [0] = { | ||
645 | .start = AT91SAM9260_BASE_US2, | ||
646 | .end = AT91SAM9260_BASE_US2 + SZ_16K - 1, | ||
647 | .flags = IORESOURCE_MEM, | ||
648 | }, | ||
649 | [1] = { | ||
650 | .start = AT91SAM9260_ID_US2, | ||
651 | .end = AT91SAM9260_ID_US2, | ||
652 | .flags = IORESOURCE_IRQ, | ||
653 | }, | ||
654 | }; | ||
655 | |||
656 | static struct atmel_uart_data uart2_data = { | ||
657 | .use_dma_tx = 1, | ||
658 | .use_dma_rx = 1, | ||
659 | }; | ||
660 | |||
661 | static struct platform_device at91sam9260_uart2_device = { | ||
662 | .name = "atmel_usart", | ||
663 | .id = 3, | ||
664 | .dev = { | ||
665 | .platform_data = &uart2_data, | ||
666 | .coherent_dma_mask = 0xffffffff, | ||
667 | }, | ||
668 | .resource = uart2_resources, | ||
669 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
670 | }; | ||
671 | |||
672 | static inline void configure_usart2_pins(void) | ||
673 | { | ||
674 | at91_set_A_periph(AT91_PIN_PB8, 1); /* TXD2 */ | ||
675 | at91_set_A_periph(AT91_PIN_PB9, 0); /* RXD2 */ | ||
676 | } | ||
677 | |||
678 | static struct resource uart3_resources[] = { | ||
679 | [0] = { | ||
680 | .start = AT91SAM9260_BASE_US3, | ||
681 | .end = AT91SAM9260_BASE_US3 + SZ_16K - 1, | ||
682 | .flags = IORESOURCE_MEM, | ||
683 | }, | ||
684 | [1] = { | ||
685 | .start = AT91SAM9260_ID_US3, | ||
686 | .end = AT91SAM9260_ID_US3, | ||
687 | .flags = IORESOURCE_IRQ, | ||
688 | }, | ||
689 | }; | ||
690 | |||
691 | static struct atmel_uart_data uart3_data = { | ||
692 | .use_dma_tx = 1, | ||
693 | .use_dma_rx = 1, | ||
694 | }; | ||
695 | |||
696 | static struct platform_device at91sam9260_uart3_device = { | ||
697 | .name = "atmel_usart", | ||
698 | .id = 4, | ||
699 | .dev = { | ||
700 | .platform_data = &uart3_data, | ||
701 | .coherent_dma_mask = 0xffffffff, | ||
702 | }, | ||
703 | .resource = uart3_resources, | ||
704 | .num_resources = ARRAY_SIZE(uart3_resources), | ||
705 | }; | ||
706 | |||
707 | static inline void configure_usart3_pins(void) | ||
708 | { | ||
709 | at91_set_A_periph(AT91_PIN_PB10, 1); /* TXD3 */ | ||
710 | at91_set_A_periph(AT91_PIN_PB11, 0); /* RXD3 */ | ||
711 | } | ||
712 | |||
713 | static struct resource uart4_resources[] = { | ||
714 | [0] = { | ||
715 | .start = AT91SAM9260_BASE_US4, | ||
716 | .end = AT91SAM9260_BASE_US4 + SZ_16K - 1, | ||
717 | .flags = IORESOURCE_MEM, | ||
718 | }, | ||
719 | [1] = { | ||
720 | .start = AT91SAM9260_ID_US4, | ||
721 | .end = AT91SAM9260_ID_US4, | ||
722 | .flags = IORESOURCE_IRQ, | ||
723 | }, | ||
724 | }; | ||
725 | |||
726 | static struct atmel_uart_data uart4_data = { | ||
727 | .use_dma_tx = 1, | ||
728 | .use_dma_rx = 1, | ||
729 | }; | ||
730 | |||
731 | static struct platform_device at91sam9260_uart4_device = { | ||
732 | .name = "atmel_usart", | ||
733 | .id = 5, | ||
734 | .dev = { | ||
735 | .platform_data = &uart4_data, | ||
736 | .coherent_dma_mask = 0xffffffff, | ||
737 | }, | ||
738 | .resource = uart4_resources, | ||
739 | .num_resources = ARRAY_SIZE(uart4_resources), | ||
740 | }; | ||
741 | |||
742 | static inline void configure_usart4_pins(void) | ||
743 | { | ||
744 | at91_set_B_periph(AT91_PIN_PA31, 1); /* TXD4 */ | ||
745 | at91_set_B_periph(AT91_PIN_PA30, 0); /* RXD4 */ | ||
746 | } | ||
747 | |||
748 | static struct resource uart5_resources[] = { | ||
749 | [0] = { | ||
750 | .start = AT91SAM9260_BASE_US5, | ||
751 | .end = AT91SAM9260_BASE_US5 + SZ_16K - 1, | ||
752 | .flags = IORESOURCE_MEM, | ||
753 | }, | ||
754 | [1] = { | ||
755 | .start = AT91SAM9260_ID_US5, | ||
756 | .end = AT91SAM9260_ID_US5, | ||
757 | .flags = IORESOURCE_IRQ, | ||
758 | }, | ||
759 | }; | ||
760 | |||
761 | static struct atmel_uart_data uart5_data = { | ||
762 | .use_dma_tx = 1, | ||
763 | .use_dma_rx = 1, | ||
764 | }; | ||
765 | |||
766 | static struct platform_device at91sam9260_uart5_device = { | ||
767 | .name = "atmel_usart", | ||
768 | .id = 6, | ||
769 | .dev = { | ||
770 | .platform_data = &uart5_data, | ||
771 | .coherent_dma_mask = 0xffffffff, | ||
772 | }, | ||
773 | .resource = uart5_resources, | ||
774 | .num_resources = ARRAY_SIZE(uart5_resources), | ||
775 | }; | ||
776 | |||
777 | static inline void configure_usart5_pins(void) | ||
778 | { | ||
779 | at91_set_A_periph(AT91_PIN_PB12, 1); /* TXD5 */ | ||
780 | at91_set_A_periph(AT91_PIN_PB13, 0); /* RXD5 */ | ||
781 | } | ||
782 | |||
783 | struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | ||
784 | struct platform_device *atmel_default_console_device; /* the serial console device */ | ||
785 | |||
786 | void __init at91_init_serial(struct at91_uart_config *config) | ||
787 | { | ||
788 | int i; | ||
789 | |||
790 | /* Fill in list of supported UARTs */ | ||
791 | for (i = 0; i < config->nr_tty; i++) { | ||
792 | switch (config->tty_map[i]) { | ||
793 | case 0: | ||
794 | configure_usart0_pins(); | ||
795 | at91_uarts[i] = &at91sam9260_uart0_device; | ||
796 | at91_clock_associate("usart0_clk", &at91sam9260_uart0_device.dev, "usart"); | ||
797 | break; | ||
798 | case 1: | ||
799 | configure_usart1_pins(); | ||
800 | at91_uarts[i] = &at91sam9260_uart1_device; | ||
801 | at91_clock_associate("usart1_clk", &at91sam9260_uart1_device.dev, "usart"); | ||
802 | break; | ||
803 | case 2: | ||
804 | configure_usart2_pins(); | ||
805 | at91_uarts[i] = &at91sam9260_uart2_device; | ||
806 | at91_clock_associate("usart2_clk", &at91sam9260_uart2_device.dev, "usart"); | ||
807 | break; | ||
808 | case 3: | ||
809 | configure_usart3_pins(); | ||
810 | at91_uarts[i] = &at91sam9260_uart3_device; | ||
811 | at91_clock_associate("usart3_clk", &at91sam9260_uart3_device.dev, "usart"); | ||
812 | break; | ||
813 | case 4: | ||
814 | configure_usart4_pins(); | ||
815 | at91_uarts[i] = &at91sam9260_uart4_device; | ||
816 | at91_clock_associate("usart4_clk", &at91sam9260_uart4_device.dev, "usart"); | ||
817 | break; | ||
818 | case 5: | ||
819 | configure_usart5_pins(); | ||
820 | at91_uarts[i] = &at91sam9260_uart5_device; | ||
821 | at91_clock_associate("usart5_clk", &at91sam9260_uart5_device.dev, "usart"); | ||
822 | break; | ||
823 | case 6: | ||
824 | configure_dbgu_pins(); | ||
825 | at91_uarts[i] = &at91sam9260_dbgu_device; | ||
826 | at91_clock_associate("mck", &at91sam9260_dbgu_device.dev, "usart"); | ||
827 | break; | ||
828 | default: | ||
829 | continue; | ||
830 | } | ||
831 | at91_uarts[i]->id = i; /* update ID number to mapped ID */ | ||
832 | } | ||
833 | |||
834 | /* Set serial console device */ | ||
835 | if (config->console_tty < ATMEL_MAX_UART) | ||
836 | atmel_default_console_device = at91_uarts[config->console_tty]; | ||
837 | if (!atmel_default_console_device) | ||
838 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
839 | } | ||
840 | |||
841 | void __init at91_add_device_serial(void) | ||
842 | { | ||
843 | int i; | ||
844 | |||
845 | for (i = 0; i < ATMEL_MAX_UART; i++) { | ||
846 | if (at91_uarts[i]) | ||
847 | platform_device_register(at91_uarts[i]); | ||
848 | } | ||
849 | } | ||
850 | #else | ||
851 | void __init at91_init_serial(struct at91_uart_config *config) {} | ||
852 | void __init at91_add_device_serial(void) {} | ||
853 | #endif | ||
854 | |||
855 | |||
856 | /* -------------------------------------------------------------------- */ | ||
857 | /* | ||
858 | * These devices are always present and don't need any board-specific | ||
859 | * setup. | ||
860 | */ | ||
861 | static int __init at91_add_standard_devices(void) | ||
862 | { | ||
863 | return 0; | ||
864 | } | ||
865 | |||
866 | arch_initcall(at91_add_standard_devices); | ||
diff --git a/arch/arm/mach-at91rm9200/at91sam9261.c b/arch/arm/mach-at91rm9200/at91sam9261.c new file mode 100644 index 000000000000..5a82f35da2e9 --- /dev/null +++ b/arch/arm/mach-at91rm9200/at91sam9261.c | |||
@@ -0,0 +1,289 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91rm9200/at91sam9261.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/module.h> | ||
14 | |||
15 | #include <asm/mach/arch.h> | ||
16 | #include <asm/mach/map.h> | ||
17 | #include <asm/arch/at91sam9261.h> | ||
18 | #include <asm/arch/at91_pmc.h> | ||
19 | |||
20 | #include "generic.h" | ||
21 | #include "clock.h" | ||
22 | |||
23 | static struct map_desc at91sam9261_io_desc[] __initdata = { | ||
24 | { | ||
25 | .virtual = AT91_VA_BASE_SYS, | ||
26 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | ||
27 | .length = SZ_16K, | ||
28 | .type = MT_DEVICE, | ||
29 | }, { | ||
30 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, | ||
31 | .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), | ||
32 | .length = AT91SAM9261_SRAM_SIZE, | ||
33 | .type = MT_DEVICE, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | /* -------------------------------------------------------------------- | ||
38 | * Clocks | ||
39 | * -------------------------------------------------------------------- */ | ||
40 | |||
41 | /* | ||
42 | * The peripheral clocks. | ||
43 | */ | ||
44 | static struct clk pioA_clk = { | ||
45 | .name = "pioA_clk", | ||
46 | .pmc_mask = 1 << AT91SAM9261_ID_PIOA, | ||
47 | .type = CLK_TYPE_PERIPHERAL, | ||
48 | }; | ||
49 | static struct clk pioB_clk = { | ||
50 | .name = "pioB_clk", | ||
51 | .pmc_mask = 1 << AT91SAM9261_ID_PIOB, | ||
52 | .type = CLK_TYPE_PERIPHERAL, | ||
53 | }; | ||
54 | static struct clk pioC_clk = { | ||
55 | .name = "pioC_clk", | ||
56 | .pmc_mask = 1 << AT91SAM9261_ID_PIOC, | ||
57 | .type = CLK_TYPE_PERIPHERAL, | ||
58 | }; | ||
59 | static struct clk usart0_clk = { | ||
60 | .name = "usart0_clk", | ||
61 | .pmc_mask = 1 << AT91SAM9261_ID_US0, | ||
62 | .type = CLK_TYPE_PERIPHERAL, | ||
63 | }; | ||
64 | static struct clk usart1_clk = { | ||
65 | .name = "usart1_clk", | ||
66 | .pmc_mask = 1 << AT91SAM9261_ID_US1, | ||
67 | .type = CLK_TYPE_PERIPHERAL, | ||
68 | }; | ||
69 | static struct clk usart2_clk = { | ||
70 | .name = "usart2_clk", | ||
71 | .pmc_mask = 1 << AT91SAM9261_ID_US2, | ||
72 | .type = CLK_TYPE_PERIPHERAL, | ||
73 | }; | ||
74 | static struct clk mmc_clk = { | ||
75 | .name = "mci_clk", | ||
76 | .pmc_mask = 1 << AT91SAM9261_ID_MCI, | ||
77 | .type = CLK_TYPE_PERIPHERAL, | ||
78 | }; | ||
79 | static struct clk udc_clk = { | ||
80 | .name = "udc_clk", | ||
81 | .pmc_mask = 1 << AT91SAM9261_ID_UDP, | ||
82 | .type = CLK_TYPE_PERIPHERAL, | ||
83 | }; | ||
84 | static struct clk twi_clk = { | ||
85 | .name = "twi_clk", | ||
86 | .pmc_mask = 1 << AT91SAM9261_ID_TWI, | ||
87 | .type = CLK_TYPE_PERIPHERAL, | ||
88 | }; | ||
89 | static struct clk spi0_clk = { | ||
90 | .name = "spi0_clk", | ||
91 | .pmc_mask = 1 << AT91SAM9261_ID_SPI0, | ||
92 | .type = CLK_TYPE_PERIPHERAL, | ||
93 | }; | ||
94 | static struct clk spi1_clk = { | ||
95 | .name = "spi1_clk", | ||
96 | .pmc_mask = 1 << AT91SAM9261_ID_SPI1, | ||
97 | .type = CLK_TYPE_PERIPHERAL, | ||
98 | }; | ||
99 | static struct clk ohci_clk = { | ||
100 | .name = "ohci_clk", | ||
101 | .pmc_mask = 1 << AT91SAM9261_ID_UHP, | ||
102 | .type = CLK_TYPE_PERIPHERAL, | ||
103 | }; | ||
104 | static struct clk lcdc_clk = { | ||
105 | .name = "lcdc_clk", | ||
106 | .pmc_mask = 1 << AT91SAM9261_ID_LCDC, | ||
107 | .type = CLK_TYPE_PERIPHERAL, | ||
108 | }; | ||
109 | |||
110 | static struct clk *periph_clocks[] __initdata = { | ||
111 | &pioA_clk, | ||
112 | &pioB_clk, | ||
113 | &pioC_clk, | ||
114 | &usart0_clk, | ||
115 | &usart1_clk, | ||
116 | &usart2_clk, | ||
117 | &mmc_clk, | ||
118 | &udc_clk, | ||
119 | &twi_clk, | ||
120 | &spi0_clk, | ||
121 | &spi1_clk, | ||
122 | // ssc 0 .. ssc2 | ||
123 | // tc0 .. tc2 | ||
124 | &ohci_clk, | ||
125 | &lcdc_clk, | ||
126 | // irq0 .. irq2 | ||
127 | }; | ||
128 | |||
129 | /* | ||
130 | * The four programmable clocks. | ||
131 | * You must configure pin multiplexing to bring these signals out. | ||
132 | */ | ||
133 | static struct clk pck0 = { | ||
134 | .name = "pck0", | ||
135 | .pmc_mask = AT91_PMC_PCK0, | ||
136 | .type = CLK_TYPE_PROGRAMMABLE, | ||
137 | .id = 0, | ||
138 | }; | ||
139 | static struct clk pck1 = { | ||
140 | .name = "pck1", | ||
141 | .pmc_mask = AT91_PMC_PCK1, | ||
142 | .type = CLK_TYPE_PROGRAMMABLE, | ||
143 | .id = 1, | ||
144 | }; | ||
145 | static struct clk pck2 = { | ||
146 | .name = "pck2", | ||
147 | .pmc_mask = AT91_PMC_PCK2, | ||
148 | .type = CLK_TYPE_PROGRAMMABLE, | ||
149 | .id = 2, | ||
150 | }; | ||
151 | static struct clk pck3 = { | ||
152 | .name = "pck3", | ||
153 | .pmc_mask = AT91_PMC_PCK3, | ||
154 | .type = CLK_TYPE_PROGRAMMABLE, | ||
155 | .id = 3, | ||
156 | }; | ||
157 | |||
158 | /* HClocks */ | ||
159 | static struct clk hck0 = { | ||
160 | .name = "hck0", | ||
161 | .pmc_mask = AT91_PMC_HCK0, | ||
162 | .type = CLK_TYPE_SYSTEM, | ||
163 | .id = 0, | ||
164 | }; | ||
165 | static struct clk hck1 = { | ||
166 | .name = "hck1", | ||
167 | .pmc_mask = AT91_PMC_HCK1, | ||
168 | .type = CLK_TYPE_SYSTEM, | ||
169 | .id = 1, | ||
170 | }; | ||
171 | |||
172 | static void __init at91sam9261_register_clocks(void) | ||
173 | { | ||
174 | int i; | ||
175 | |||
176 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
177 | clk_register(periph_clocks[i]); | ||
178 | |||
179 | clk_register(&pck0); | ||
180 | clk_register(&pck1); | ||
181 | clk_register(&pck2); | ||
182 | clk_register(&pck3); | ||
183 | |||
184 | clk_register(&hck0); | ||
185 | clk_register(&hck1); | ||
186 | } | ||
187 | |||
188 | /* -------------------------------------------------------------------- | ||
189 | * GPIO | ||
190 | * -------------------------------------------------------------------- */ | ||
191 | |||
192 | static struct at91_gpio_bank at91sam9261_gpio[] = { | ||
193 | { | ||
194 | .id = AT91SAM9261_ID_PIOA, | ||
195 | .offset = AT91_PIOA, | ||
196 | .clock = &pioA_clk, | ||
197 | }, { | ||
198 | .id = AT91SAM9261_ID_PIOB, | ||
199 | .offset = AT91_PIOB, | ||
200 | .clock = &pioB_clk, | ||
201 | }, { | ||
202 | .id = AT91SAM9261_ID_PIOC, | ||
203 | .offset = AT91_PIOC, | ||
204 | .clock = &pioC_clk, | ||
205 | } | ||
206 | }; | ||
207 | |||
208 | static void at91sam9261_reset(void) | ||
209 | { | ||
210 | #warning "Implement CPU reset" | ||
211 | } | ||
212 | |||
213 | |||
214 | /* -------------------------------------------------------------------- | ||
215 | * AT91SAM9261 processor initialization | ||
216 | * -------------------------------------------------------------------- */ | ||
217 | |||
218 | void __init at91sam9261_initialize(unsigned long main_clock) | ||
219 | { | ||
220 | /* Map peripherals */ | ||
221 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); | ||
222 | |||
223 | at91_arch_reset = at91sam9261_reset; | ||
224 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | ||
225 | | (1 << AT91SAM9261_ID_IRQ2); | ||
226 | |||
227 | /* Init clock subsystem */ | ||
228 | at91_clock_init(main_clock); | ||
229 | |||
230 | /* Register the processor-specific clocks */ | ||
231 | at91sam9261_register_clocks(); | ||
232 | |||
233 | /* Register GPIO subsystem */ | ||
234 | at91_gpio_init(at91sam9261_gpio, 3); | ||
235 | } | ||
236 | |||
237 | /* -------------------------------------------------------------------- | ||
238 | * Interrupt initialization | ||
239 | * -------------------------------------------------------------------- */ | ||
240 | |||
241 | /* | ||
242 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
243 | */ | ||
244 | static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
245 | 7, /* Advanced Interrupt Controller */ | ||
246 | 7, /* System Peripherals */ | ||
247 | 0, /* Parallel IO Controller A */ | ||
248 | 0, /* Parallel IO Controller B */ | ||
249 | 0, /* Parallel IO Controller C */ | ||
250 | 0, | ||
251 | 6, /* USART 0 */ | ||
252 | 6, /* USART 1 */ | ||
253 | 6, /* USART 2 */ | ||
254 | 0, /* Multimedia Card Interface */ | ||
255 | 4, /* USB Device Port */ | ||
256 | 0, /* Two-Wire Interface */ | ||
257 | 6, /* Serial Peripheral Interface 0 */ | ||
258 | 6, /* Serial Peripheral Interface 1 */ | ||
259 | 5, /* Serial Synchronous Controller 0 */ | ||
260 | 5, /* Serial Synchronous Controller 1 */ | ||
261 | 5, /* Serial Synchronous Controller 2 */ | ||
262 | 0, /* Timer Counter 0 */ | ||
263 | 0, /* Timer Counter 1 */ | ||
264 | 0, /* Timer Counter 2 */ | ||
265 | 3, /* USB Host port */ | ||
266 | 3, /* LCD Controller */ | ||
267 | 0, | ||
268 | 0, | ||
269 | 0, | ||
270 | 0, | ||
271 | 0, | ||
272 | 0, | ||
273 | 0, | ||
274 | 0, /* Advanced Interrupt Controller */ | ||
275 | 0, /* Advanced Interrupt Controller */ | ||
276 | 0, /* Advanced Interrupt Controller */ | ||
277 | }; | ||
278 | |||
279 | void __init at91sam9261_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | ||
280 | { | ||
281 | if (!priority) | ||
282 | priority = at91sam9261_default_irq_priority; | ||
283 | |||
284 | /* Initialize the AIC interrupt controller */ | ||
285 | at91_aic_init(priority); | ||
286 | |||
287 | /* Enable GPIO interrupts */ | ||
288 | at91_gpio_irq_setup(); | ||
289 | } | ||
diff --git a/arch/arm/mach-at91rm9200/at91sam9261_devices.c b/arch/arm/mach-at91rm9200/at91sam9261_devices.c new file mode 100644 index 000000000000..ed1d79081b35 --- /dev/null +++ b/arch/arm/mach-at91rm9200/at91sam9261_devices.c | |||
@@ -0,0 +1,741 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91rm9200/at91sam9261_devices.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> | ||
5 | * Copyright (C) 2005 David Brownell | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | #include <asm/mach/arch.h> | ||
14 | #include <asm/mach/map.h> | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | #include <asm/arch/board.h> | ||
19 | #include <asm/arch/gpio.h> | ||
20 | #include <asm/arch/at91sam9261.h> | ||
21 | #include <asm/arch/at91sam9261_matrix.h> | ||
22 | #include <asm/arch/at91sam926x_mc.h> | ||
23 | |||
24 | #include "generic.h" | ||
25 | |||
26 | #define SZ_512 0x00000200 | ||
27 | #define SZ_256 0x00000100 | ||
28 | #define SZ_16 0x00000010 | ||
29 | |||
30 | /* -------------------------------------------------------------------- | ||
31 | * USB Host | ||
32 | * -------------------------------------------------------------------- */ | ||
33 | |||
34 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
35 | static u64 ohci_dmamask = 0xffffffffUL; | ||
36 | static struct at91_usbh_data usbh_data; | ||
37 | |||
38 | static struct resource usbh_resources[] = { | ||
39 | [0] = { | ||
40 | .start = AT91SAM9261_UHP_BASE, | ||
41 | .end = AT91SAM9261_UHP_BASE + SZ_1M - 1, | ||
42 | .flags = IORESOURCE_MEM, | ||
43 | }, | ||
44 | [1] = { | ||
45 | .start = AT91SAM9261_ID_UHP, | ||
46 | .end = AT91SAM9261_ID_UHP, | ||
47 | .flags = IORESOURCE_IRQ, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct platform_device at91sam9261_usbh_device = { | ||
52 | .name = "at91_ohci", | ||
53 | .id = -1, | ||
54 | .dev = { | ||
55 | .dma_mask = &ohci_dmamask, | ||
56 | .coherent_dma_mask = 0xffffffff, | ||
57 | .platform_data = &usbh_data, | ||
58 | }, | ||
59 | .resource = usbh_resources, | ||
60 | .num_resources = ARRAY_SIZE(usbh_resources), | ||
61 | }; | ||
62 | |||
63 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | ||
64 | { | ||
65 | if (!data) | ||
66 | return; | ||
67 | |||
68 | usbh_data = *data; | ||
69 | platform_device_register(&at91sam9261_usbh_device); | ||
70 | } | ||
71 | #else | ||
72 | void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
73 | #endif | ||
74 | |||
75 | |||
76 | /* -------------------------------------------------------------------- | ||
77 | * USB Device (Gadget) | ||
78 | * -------------------------------------------------------------------- */ | ||
79 | |||
80 | #ifdef CONFIG_USB_GADGET_AT91 | ||
81 | static struct at91_udc_data udc_data; | ||
82 | |||
83 | static struct resource udc_resources[] = { | ||
84 | [0] = { | ||
85 | .start = AT91SAM9261_BASE_UDP, | ||
86 | .end = AT91SAM9261_BASE_UDP + SZ_16K - 1, | ||
87 | .flags = IORESOURCE_MEM, | ||
88 | }, | ||
89 | [1] = { | ||
90 | .start = AT91SAM9261_ID_UDP, | ||
91 | .end = AT91SAM9261_ID_UDP, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | static struct platform_device at91sam9261_udc_device = { | ||
97 | .name = "at91_udc", | ||
98 | .id = -1, | ||
99 | .dev = { | ||
100 | .platform_data = &udc_data, | ||
101 | }, | ||
102 | .resource = udc_resources, | ||
103 | .num_resources = ARRAY_SIZE(udc_resources), | ||
104 | }; | ||
105 | |||
106 | void __init at91_add_device_udc(struct at91_udc_data *data) | ||
107 | { | ||
108 | unsigned long x; | ||
109 | |||
110 | if (!data) | ||
111 | return; | ||
112 | |||
113 | if (data->vbus_pin) { | ||
114 | at91_set_gpio_input(data->vbus_pin, 0); | ||
115 | at91_set_deglitch(data->vbus_pin, 1); | ||
116 | } | ||
117 | |||
118 | /* Pullup pin is handled internally */ | ||
119 | x = at91_sys_read(AT91_MATRIX_USBPUCR); | ||
120 | at91_sys_write(AT91_MATRIX_USBPUCR, x | AT91_MATRIX_USBPUCR_PUON); | ||
121 | |||
122 | udc_data = *data; | ||
123 | platform_device_register(&at91sam9261_udc_device); | ||
124 | } | ||
125 | #else | ||
126 | void __init at91_add_device_udc(struct at91_udc_data *data) {} | ||
127 | #endif | ||
128 | |||
129 | /* -------------------------------------------------------------------- | ||
130 | * MMC / SD | ||
131 | * -------------------------------------------------------------------- */ | ||
132 | |||
133 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | ||
134 | static u64 mmc_dmamask = 0xffffffffUL; | ||
135 | static struct at91_mmc_data mmc_data; | ||
136 | |||
137 | static struct resource mmc_resources[] = { | ||
138 | [0] = { | ||
139 | .start = AT91SAM9261_BASE_MCI, | ||
140 | .end = AT91SAM9261_BASE_MCI + SZ_16K - 1, | ||
141 | .flags = IORESOURCE_MEM, | ||
142 | }, | ||
143 | [1] = { | ||
144 | .start = AT91SAM9261_ID_MCI, | ||
145 | .end = AT91SAM9261_ID_MCI, | ||
146 | .flags = IORESOURCE_IRQ, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static struct platform_device at91sam9261_mmc_device = { | ||
151 | .name = "at91_mci", | ||
152 | .id = -1, | ||
153 | .dev = { | ||
154 | .dma_mask = &mmc_dmamask, | ||
155 | .coherent_dma_mask = 0xffffffff, | ||
156 | .platform_data = &mmc_data, | ||
157 | }, | ||
158 | .resource = mmc_resources, | ||
159 | .num_resources = ARRAY_SIZE(mmc_resources), | ||
160 | }; | ||
161 | |||
162 | void __init at91_add_device_mmc(struct at91_mmc_data *data) | ||
163 | { | ||
164 | if (!data) | ||
165 | return; | ||
166 | |||
167 | /* input/irq */ | ||
168 | if (data->det_pin) { | ||
169 | at91_set_gpio_input(data->det_pin, 1); | ||
170 | at91_set_deglitch(data->det_pin, 1); | ||
171 | } | ||
172 | if (data->wp_pin) | ||
173 | at91_set_gpio_input(data->wp_pin, 1); | ||
174 | if (data->vcc_pin) | ||
175 | at91_set_gpio_output(data->vcc_pin, 0); | ||
176 | |||
177 | /* CLK */ | ||
178 | at91_set_B_periph(AT91_PIN_PA2, 0); | ||
179 | |||
180 | /* CMD */ | ||
181 | at91_set_B_periph(AT91_PIN_PA1, 1); | ||
182 | |||
183 | /* DAT0, maybe DAT1..DAT3 */ | ||
184 | at91_set_B_periph(AT91_PIN_PA0, 1); | ||
185 | if (data->wire4) { | ||
186 | at91_set_B_periph(AT91_PIN_PA4, 1); | ||
187 | at91_set_B_periph(AT91_PIN_PA5, 1); | ||
188 | at91_set_B_periph(AT91_PIN_PA6, 1); | ||
189 | } | ||
190 | |||
191 | mmc_data = *data; | ||
192 | platform_device_register(&at91sam9261_mmc_device); | ||
193 | } | ||
194 | #else | ||
195 | void __init at91_add_device_mmc(struct at91_mmc_data *data) {} | ||
196 | #endif | ||
197 | |||
198 | |||
199 | /* -------------------------------------------------------------------- | ||
200 | * NAND / SmartMedia | ||
201 | * -------------------------------------------------------------------- */ | ||
202 | |||
203 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | ||
204 | static struct at91_nand_data nand_data; | ||
205 | |||
206 | #define NAND_BASE AT91_CHIPSELECT_3 | ||
207 | |||
208 | static struct resource nand_resources[] = { | ||
209 | { | ||
210 | .start = NAND_BASE, | ||
211 | .end = NAND_BASE + SZ_256M - 1, | ||
212 | .flags = IORESOURCE_MEM, | ||
213 | } | ||
214 | }; | ||
215 | |||
216 | static struct platform_device at91_nand_device = { | ||
217 | .name = "at91_nand", | ||
218 | .id = -1, | ||
219 | .dev = { | ||
220 | .platform_data = &nand_data, | ||
221 | }, | ||
222 | .resource = nand_resources, | ||
223 | .num_resources = ARRAY_SIZE(nand_resources), | ||
224 | }; | ||
225 | |||
226 | void __init at91_add_device_nand(struct at91_nand_data *data) | ||
227 | { | ||
228 | unsigned long csa, mode; | ||
229 | |||
230 | if (!data) | ||
231 | return; | ||
232 | |||
233 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
234 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC); | ||
235 | |||
236 | /* set the bus interface characteristics */ | ||
237 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | ||
238 | | AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); | ||
239 | |||
240 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) | ||
241 | | AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5)); | ||
242 | |||
243 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); | ||
244 | |||
245 | if (data->bus_width_16) | ||
246 | mode = AT91_SMC_DBW_16; | ||
247 | else | ||
248 | mode = AT91_SMC_DBW_8; | ||
249 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1)); | ||
250 | |||
251 | /* enable pin */ | ||
252 | if (data->enable_pin) | ||
253 | at91_set_gpio_output(data->enable_pin, 1); | ||
254 | |||
255 | /* ready/busy pin */ | ||
256 | if (data->rdy_pin) | ||
257 | at91_set_gpio_input(data->rdy_pin, 1); | ||
258 | |||
259 | /* card detect pin */ | ||
260 | if (data->det_pin) | ||
261 | at91_set_gpio_input(data->det_pin, 1); | ||
262 | |||
263 | at91_set_A_periph(AT91_PIN_PC0, 0); /* NANDOE */ | ||
264 | at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ | ||
265 | |||
266 | nand_data = *data; | ||
267 | platform_device_register(&at91_nand_device); | ||
268 | } | ||
269 | |||
270 | #else | ||
271 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | ||
272 | #endif | ||
273 | |||
274 | |||
275 | /* -------------------------------------------------------------------- | ||
276 | * TWI (i2c) | ||
277 | * -------------------------------------------------------------------- */ | ||
278 | |||
279 | #if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | ||
280 | |||
281 | static struct resource twi_resources[] = { | ||
282 | [0] = { | ||
283 | .start = AT91SAM9261_BASE_TWI, | ||
284 | .end = AT91SAM9261_BASE_TWI + SZ_16K - 1, | ||
285 | .flags = IORESOURCE_MEM, | ||
286 | }, | ||
287 | [1] = { | ||
288 | .start = AT91SAM9261_ID_TWI, | ||
289 | .end = AT91SAM9261_ID_TWI, | ||
290 | .flags = IORESOURCE_IRQ, | ||
291 | }, | ||
292 | }; | ||
293 | |||
294 | static struct platform_device at91sam9261_twi_device = { | ||
295 | .name = "at91_i2c", | ||
296 | .id = -1, | ||
297 | .resource = twi_resources, | ||
298 | .num_resources = ARRAY_SIZE(twi_resources), | ||
299 | }; | ||
300 | |||
301 | void __init at91_add_device_i2c(void) | ||
302 | { | ||
303 | /* pins used for TWI interface */ | ||
304 | at91_set_A_periph(AT91_PIN_PA7, 0); /* TWD */ | ||
305 | at91_set_multi_drive(AT91_PIN_PA7, 1); | ||
306 | |||
307 | at91_set_A_periph(AT91_PIN_PA8, 0); /* TWCK */ | ||
308 | at91_set_multi_drive(AT91_PIN_PA8, 1); | ||
309 | |||
310 | platform_device_register(&at91sam9261_twi_device); | ||
311 | } | ||
312 | #else | ||
313 | void __init at91_add_device_i2c(void) {} | ||
314 | #endif | ||
315 | |||
316 | |||
317 | /* -------------------------------------------------------------------- | ||
318 | * SPI | ||
319 | * -------------------------------------------------------------------- */ | ||
320 | |||
321 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
322 | static u64 spi_dmamask = 0xffffffffUL; | ||
323 | |||
324 | static struct resource spi0_resources[] = { | ||
325 | [0] = { | ||
326 | .start = AT91SAM9261_BASE_SPI0, | ||
327 | .end = AT91SAM9261_BASE_SPI0 + SZ_16K - 1, | ||
328 | .flags = IORESOURCE_MEM, | ||
329 | }, | ||
330 | [1] = { | ||
331 | .start = AT91SAM9261_ID_SPI0, | ||
332 | .end = AT91SAM9261_ID_SPI0, | ||
333 | .flags = IORESOURCE_IRQ, | ||
334 | }, | ||
335 | }; | ||
336 | |||
337 | static struct platform_device at91sam9261_spi0_device = { | ||
338 | .name = "atmel_spi", | ||
339 | .id = 0, | ||
340 | .dev = { | ||
341 | .dma_mask = &spi_dmamask, | ||
342 | .coherent_dma_mask = 0xffffffff, | ||
343 | }, | ||
344 | .resource = spi0_resources, | ||
345 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
346 | }; | ||
347 | |||
348 | static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; | ||
349 | |||
350 | static struct resource spi1_resources[] = { | ||
351 | [0] = { | ||
352 | .start = AT91SAM9261_BASE_SPI1, | ||
353 | .end = AT91SAM9261_BASE_SPI1 + SZ_16K - 1, | ||
354 | .flags = IORESOURCE_MEM, | ||
355 | }, | ||
356 | [1] = { | ||
357 | .start = AT91SAM9261_ID_SPI1, | ||
358 | .end = AT91SAM9261_ID_SPI1, | ||
359 | .flags = IORESOURCE_IRQ, | ||
360 | }, | ||
361 | }; | ||
362 | |||
363 | static struct platform_device at91sam9261_spi1_device = { | ||
364 | .name = "atmel_spi", | ||
365 | .id = 1, | ||
366 | .dev = { | ||
367 | .dma_mask = &spi_dmamask, | ||
368 | .coherent_dma_mask = 0xffffffff, | ||
369 | }, | ||
370 | .resource = spi1_resources, | ||
371 | .num_resources = ARRAY_SIZE(spi1_resources), | ||
372 | }; | ||
373 | |||
374 | static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB28, AT91_PIN_PA24, AT91_PIN_PA25, AT91_PIN_PA26 }; | ||
375 | |||
376 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | ||
377 | { | ||
378 | int i; | ||
379 | unsigned long cs_pin; | ||
380 | short enable_spi0 = 0; | ||
381 | short enable_spi1 = 0; | ||
382 | |||
383 | /* Choose SPI chip-selects */ | ||
384 | for (i = 0; i < nr_devices; i++) { | ||
385 | if (devices[i].controller_data) | ||
386 | cs_pin = (unsigned long) devices[i].controller_data; | ||
387 | else if (devices[i].bus_num == 0) | ||
388 | cs_pin = spi0_standard_cs[devices[i].chip_select]; | ||
389 | else | ||
390 | cs_pin = spi1_standard_cs[devices[i].chip_select]; | ||
391 | |||
392 | if (devices[i].bus_num == 0) | ||
393 | enable_spi0 = 1; | ||
394 | else | ||
395 | enable_spi1 = 1; | ||
396 | |||
397 | /* enable chip-select pin */ | ||
398 | at91_set_gpio_output(cs_pin, 1); | ||
399 | |||
400 | /* pass chip-select pin to driver */ | ||
401 | devices[i].controller_data = (void *) cs_pin; | ||
402 | } | ||
403 | |||
404 | spi_register_board_info(devices, nr_devices); | ||
405 | |||
406 | /* Configure SPI bus(es) */ | ||
407 | if (enable_spi0) { | ||
408 | at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ | ||
409 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | ||
410 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | ||
411 | |||
412 | at91_clock_associate("spi0_clk", &at91sam9261_spi0_device.dev, "spi_clk"); | ||
413 | platform_device_register(&at91sam9261_spi0_device); | ||
414 | } | ||
415 | if (enable_spi1) { | ||
416 | at91_set_A_periph(AT91_PIN_PB30, 0); /* SPI1_MISO */ | ||
417 | at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ | ||
418 | at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ | ||
419 | |||
420 | at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk"); | ||
421 | platform_device_register(&at91sam9261_spi1_device); | ||
422 | } | ||
423 | } | ||
424 | #else | ||
425 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} | ||
426 | #endif | ||
427 | |||
428 | |||
429 | /* -------------------------------------------------------------------- | ||
430 | * LCD Controller | ||
431 | * -------------------------------------------------------------------- */ | ||
432 | |||
433 | #if defined(CONFIG_FB_AT91) || defined(CONFIG_FB_AT91_MODULE) | ||
434 | static u64 lcdc_dmamask = 0xffffffffUL; | ||
435 | static struct at91fb_info lcdc_data; | ||
436 | |||
437 | static struct resource lcdc_resources[] = { | ||
438 | [0] = { | ||
439 | .start = AT91SAM9261_LCDC_BASE, | ||
440 | .end = AT91SAM9261_LCDC_BASE + SZ_4K - 1, | ||
441 | .flags = IORESOURCE_MEM, | ||
442 | }, | ||
443 | [1] = { | ||
444 | .start = AT91SAM9261_ID_LCDC, | ||
445 | .end = AT91SAM9261_ID_LCDC, | ||
446 | .flags = IORESOURCE_IRQ, | ||
447 | }, | ||
448 | #if defined(CONFIG_FB_INTSRAM) | ||
449 | [2] = { | ||
450 | .start = AT91SAM9261_SRAM_BASE, | ||
451 | .end = AT91SAM9261_SRAM_BASE + AT91SAM9261_SRAM_SIZE - 1, | ||
452 | .flags = IORESOURCE_MEM, | ||
453 | }, | ||
454 | #endif | ||
455 | }; | ||
456 | |||
457 | static struct platform_device at91_lcdc_device = { | ||
458 | .name = "at91-fb", | ||
459 | .id = 0, | ||
460 | .dev = { | ||
461 | .dma_mask = &lcdc_dmamask, | ||
462 | .coherent_dma_mask = 0xffffffff, | ||
463 | .platform_data = &lcdc_data, | ||
464 | }, | ||
465 | .resource = lcdc_resources, | ||
466 | .num_resources = ARRAY_SIZE(lcdc_resources), | ||
467 | }; | ||
468 | |||
469 | void __init at91_add_device_lcdc(struct at91fb_info *data) | ||
470 | { | ||
471 | if (!data) { | ||
472 | return; | ||
473 | } | ||
474 | |||
475 | at91_set_A_periph(AT91_PIN_PB1, 0); /* LCDHSYNC */ | ||
476 | at91_set_A_periph(AT91_PIN_PB2, 0); /* LCDDOTCK */ | ||
477 | at91_set_A_periph(AT91_PIN_PB3, 0); /* LCDDEN */ | ||
478 | at91_set_A_periph(AT91_PIN_PB4, 0); /* LCDCC */ | ||
479 | at91_set_A_periph(AT91_PIN_PB7, 0); /* LCDD2 */ | ||
480 | at91_set_A_periph(AT91_PIN_PB8, 0); /* LCDD3 */ | ||
481 | at91_set_A_periph(AT91_PIN_PB9, 0); /* LCDD4 */ | ||
482 | at91_set_A_periph(AT91_PIN_PB10, 0); /* LCDD5 */ | ||
483 | at91_set_A_periph(AT91_PIN_PB11, 0); /* LCDD6 */ | ||
484 | at91_set_A_periph(AT91_PIN_PB12, 0); /* LCDD7 */ | ||
485 | at91_set_A_periph(AT91_PIN_PB15, 0); /* LCDD10 */ | ||
486 | at91_set_A_periph(AT91_PIN_PB16, 0); /* LCDD11 */ | ||
487 | at91_set_A_periph(AT91_PIN_PB17, 0); /* LCDD12 */ | ||
488 | at91_set_A_periph(AT91_PIN_PB18, 0); /* LCDD13 */ | ||
489 | at91_set_A_periph(AT91_PIN_PB19, 0); /* LCDD14 */ | ||
490 | at91_set_A_periph(AT91_PIN_PB20, 0); /* LCDD15 */ | ||
491 | at91_set_B_periph(AT91_PIN_PB23, 0); /* LCDD18 */ | ||
492 | at91_set_B_periph(AT91_PIN_PB24, 0); /* LCDD19 */ | ||
493 | at91_set_B_periph(AT91_PIN_PB25, 0); /* LCDD20 */ | ||
494 | at91_set_B_periph(AT91_PIN_PB26, 0); /* LCDD21 */ | ||
495 | at91_set_B_periph(AT91_PIN_PB27, 0); /* LCDD22 */ | ||
496 | at91_set_B_periph(AT91_PIN_PB28, 0); /* LCDD23 */ | ||
497 | |||
498 | lcdc_data = *data; | ||
499 | platform_device_register(&at91_lcdc_device); | ||
500 | } | ||
501 | #else | ||
502 | void __init at91_add_device_lcdc(struct at91fb_info *data) {} | ||
503 | #endif | ||
504 | |||
505 | |||
506 | /* -------------------------------------------------------------------- | ||
507 | * LEDs | ||
508 | * -------------------------------------------------------------------- */ | ||
509 | |||
510 | #if defined(CONFIG_LEDS) | ||
511 | u8 at91_leds_cpu; | ||
512 | u8 at91_leds_timer; | ||
513 | |||
514 | void __init at91_init_leds(u8 cpu_led, u8 timer_led) | ||
515 | { | ||
516 | at91_leds_cpu = cpu_led; | ||
517 | at91_leds_timer = timer_led; | ||
518 | } | ||
519 | #else | ||
520 | void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} | ||
521 | #endif | ||
522 | |||
523 | |||
524 | /* -------------------------------------------------------------------- | ||
525 | * UART | ||
526 | * -------------------------------------------------------------------- */ | ||
527 | |||
528 | #if defined(CONFIG_SERIAL_ATMEL) | ||
529 | static struct resource dbgu_resources[] = { | ||
530 | [0] = { | ||
531 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | ||
532 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | ||
533 | .flags = IORESOURCE_MEM, | ||
534 | }, | ||
535 | [1] = { | ||
536 | .start = AT91_ID_SYS, | ||
537 | .end = AT91_ID_SYS, | ||
538 | .flags = IORESOURCE_IRQ, | ||
539 | }, | ||
540 | }; | ||
541 | |||
542 | static struct atmel_uart_data dbgu_data = { | ||
543 | .use_dma_tx = 0, | ||
544 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | ||
545 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
546 | }; | ||
547 | |||
548 | static struct platform_device at91sam9261_dbgu_device = { | ||
549 | .name = "atmel_usart", | ||
550 | .id = 0, | ||
551 | .dev = { | ||
552 | .platform_data = &dbgu_data, | ||
553 | .coherent_dma_mask = 0xffffffff, | ||
554 | }, | ||
555 | .resource = dbgu_resources, | ||
556 | .num_resources = ARRAY_SIZE(dbgu_resources), | ||
557 | }; | ||
558 | |||
559 | static inline void configure_dbgu_pins(void) | ||
560 | { | ||
561 | at91_set_A_periph(AT91_PIN_PA9, 0); /* DRXD */ | ||
562 | at91_set_A_periph(AT91_PIN_PA10, 1); /* DTXD */ | ||
563 | } | ||
564 | |||
565 | static struct resource uart0_resources[] = { | ||
566 | [0] = { | ||
567 | .start = AT91SAM9261_BASE_US0, | ||
568 | .end = AT91SAM9261_BASE_US0 + SZ_16K - 1, | ||
569 | .flags = IORESOURCE_MEM, | ||
570 | }, | ||
571 | [1] = { | ||
572 | .start = AT91SAM9261_ID_US0, | ||
573 | .end = AT91SAM9261_ID_US0, | ||
574 | .flags = IORESOURCE_IRQ, | ||
575 | }, | ||
576 | }; | ||
577 | |||
578 | static struct atmel_uart_data uart0_data = { | ||
579 | .use_dma_tx = 1, | ||
580 | .use_dma_rx = 1, | ||
581 | }; | ||
582 | |||
583 | static struct platform_device at91sam9261_uart0_device = { | ||
584 | .name = "atmel_usart", | ||
585 | .id = 1, | ||
586 | .dev = { | ||
587 | .platform_data = &uart0_data, | ||
588 | .coherent_dma_mask = 0xffffffff, | ||
589 | }, | ||
590 | .resource = uart0_resources, | ||
591 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
592 | }; | ||
593 | |||
594 | static inline void configure_usart0_pins(void) | ||
595 | { | ||
596 | at91_set_A_periph(AT91_PIN_PC8, 1); /* TXD0 */ | ||
597 | at91_set_A_periph(AT91_PIN_PC9, 0); /* RXD0 */ | ||
598 | at91_set_A_periph(AT91_PIN_PC10, 0); /* RTS0 */ | ||
599 | at91_set_A_periph(AT91_PIN_PC11, 0); /* CTS0 */ | ||
600 | } | ||
601 | |||
602 | static struct resource uart1_resources[] = { | ||
603 | [0] = { | ||
604 | .start = AT91SAM9261_BASE_US1, | ||
605 | .end = AT91SAM9261_BASE_US1 + SZ_16K - 1, | ||
606 | .flags = IORESOURCE_MEM, | ||
607 | }, | ||
608 | [1] = { | ||
609 | .start = AT91SAM9261_ID_US1, | ||
610 | .end = AT91SAM9261_ID_US1, | ||
611 | .flags = IORESOURCE_IRQ, | ||
612 | }, | ||
613 | }; | ||
614 | |||
615 | static struct atmel_uart_data uart1_data = { | ||
616 | .use_dma_tx = 1, | ||
617 | .use_dma_rx = 1, | ||
618 | }; | ||
619 | |||
620 | static struct platform_device at91sam9261_uart1_device = { | ||
621 | .name = "atmel_usart", | ||
622 | .id = 2, | ||
623 | .dev = { | ||
624 | .platform_data = &uart1_data, | ||
625 | .coherent_dma_mask = 0xffffffff, | ||
626 | }, | ||
627 | .resource = uart1_resources, | ||
628 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
629 | }; | ||
630 | |||
631 | static inline void configure_usart1_pins(void) | ||
632 | { | ||
633 | at91_set_A_periph(AT91_PIN_PC12, 1); /* TXD1 */ | ||
634 | at91_set_A_periph(AT91_PIN_PC13, 0); /* RXD1 */ | ||
635 | } | ||
636 | |||
637 | static struct resource uart2_resources[] = { | ||
638 | [0] = { | ||
639 | .start = AT91SAM9261_BASE_US2, | ||
640 | .end = AT91SAM9261_BASE_US2 + SZ_16K - 1, | ||
641 | .flags = IORESOURCE_MEM, | ||
642 | }, | ||
643 | [1] = { | ||
644 | .start = AT91SAM9261_ID_US2, | ||
645 | .end = AT91SAM9261_ID_US2, | ||
646 | .flags = IORESOURCE_IRQ, | ||
647 | }, | ||
648 | }; | ||
649 | |||
650 | static struct atmel_uart_data uart2_data = { | ||
651 | .use_dma_tx = 1, | ||
652 | .use_dma_rx = 1, | ||
653 | }; | ||
654 | |||
655 | static struct platform_device at91sam9261_uart2_device = { | ||
656 | .name = "atmel_usart", | ||
657 | .id = 3, | ||
658 | .dev = { | ||
659 | .platform_data = &uart2_data, | ||
660 | .coherent_dma_mask = 0xffffffff, | ||
661 | }, | ||
662 | .resource = uart2_resources, | ||
663 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
664 | }; | ||
665 | |||
666 | static inline void configure_usart2_pins(void) | ||
667 | { | ||
668 | at91_set_A_periph(AT91_PIN_PC15, 0); /* RXD2 */ | ||
669 | at91_set_A_periph(AT91_PIN_PC14, 1); /* TXD2 */ | ||
670 | } | ||
671 | |||
672 | struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | ||
673 | struct platform_device *atmel_default_console_device; /* the serial console device */ | ||
674 | |||
675 | void __init at91_init_serial(struct at91_uart_config *config) | ||
676 | { | ||
677 | int i; | ||
678 | |||
679 | /* Fill in list of supported UARTs */ | ||
680 | for (i = 0; i < config->nr_tty; i++) { | ||
681 | switch (config->tty_map[i]) { | ||
682 | case 0: | ||
683 | configure_usart0_pins(); | ||
684 | at91_uarts[i] = &at91sam9261_uart0_device; | ||
685 | at91_clock_associate("usart0_clk", &at91sam9261_uart0_device.dev, "usart"); | ||
686 | break; | ||
687 | case 1: | ||
688 | configure_usart1_pins(); | ||
689 | at91_uarts[i] = &at91sam9261_uart1_device; | ||
690 | at91_clock_associate("usart1_clk", &at91sam9261_uart1_device.dev, "usart"); | ||
691 | break; | ||
692 | case 2: | ||
693 | configure_usart2_pins(); | ||
694 | at91_uarts[i] = &at91sam9261_uart2_device; | ||
695 | at91_clock_associate("usart2_clk", &at91sam9261_uart2_device.dev, "usart"); | ||
696 | break; | ||
697 | case 3: | ||
698 | configure_dbgu_pins(); | ||
699 | at91_uarts[i] = &at91sam9261_dbgu_device; | ||
700 | at91_clock_associate("mck", &at91sam9261_dbgu_device.dev, "usart"); | ||
701 | break; | ||
702 | default: | ||
703 | continue; | ||
704 | } | ||
705 | at91_uarts[i]->id = i; /* update ID number to mapped ID */ | ||
706 | } | ||
707 | |||
708 | /* Set serial console device */ | ||
709 | if (config->console_tty < ATMEL_MAX_UART) | ||
710 | atmel_default_console_device = at91_uarts[config->console_tty]; | ||
711 | if (!atmel_default_console_device) | ||
712 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
713 | } | ||
714 | |||
715 | void __init at91_add_device_serial(void) | ||
716 | { | ||
717 | int i; | ||
718 | |||
719 | for (i = 0; i < ATMEL_MAX_UART; i++) { | ||
720 | if (at91_uarts[i]) | ||
721 | platform_device_register(at91_uarts[i]); | ||
722 | } | ||
723 | } | ||
724 | #else | ||
725 | void __init at91_init_serial(struct at91_uart_config *config) {} | ||
726 | void __init at91_add_device_serial(void) {} | ||
727 | #endif | ||
728 | |||
729 | |||
730 | /* -------------------------------------------------------------------- */ | ||
731 | |||
732 | /* | ||
733 | * These devices are always present and don't need any board-specific | ||
734 | * setup. | ||
735 | */ | ||
736 | static int __init at91_add_standard_devices(void) | ||
737 | { | ||
738 | return 0; | ||
739 | } | ||
740 | |||
741 | arch_initcall(at91_add_standard_devices); | ||
diff --git a/arch/arm/mach-at91rm9200/at91sam926x_time.c b/arch/arm/mach-at91rm9200/at91sam926x_time.c new file mode 100644 index 000000000000..99df5f6ee42e --- /dev/null +++ b/arch/arm/mach-at91rm9200/at91sam926x_time.c | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91rm9200/at91sam926x_time.c | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 M. Amine SAYA, ATMEL Rousset, France | ||
5 | * Revision 2005 M. Nicolas Diremdjian, ATMEL Rousset, France | ||
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 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/time.h> | ||
18 | |||
19 | #include <asm/hardware.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/mach/time.h> | ||
22 | |||
23 | #include <asm/arch/at91_pit.h> | ||
24 | |||
25 | |||
26 | #define PIT_CPIV(x) ((x) & AT91_PIT_CPIV) | ||
27 | #define PIT_PICNT(x) (((x) & AT91_PIT_PICNT) >> 20) | ||
28 | |||
29 | /* | ||
30 | * Returns number of microseconds since last timer interrupt. Note that interrupts | ||
31 | * will have been disabled by do_gettimeofday() | ||
32 | * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. | ||
33 | * 'tick' is usecs per jiffy (linux/timex.h). | ||
34 | */ | ||
35 | static unsigned long at91sam926x_gettimeoffset(void) | ||
36 | { | ||
37 | unsigned long elapsed; | ||
38 | unsigned long t = at91_sys_read(AT91_PIT_PIIR); | ||
39 | |||
40 | elapsed = (PIT_PICNT(t) * LATCH) + PIT_CPIV(t); /* hardware clock cycles */ | ||
41 | |||
42 | return (unsigned long)(elapsed * 1000000) / LATCH; | ||
43 | } | ||
44 | |||
45 | /* | ||
46 | * IRQ handler for the timer. | ||
47 | */ | ||
48 | static irqreturn_t at91sam926x_timer_interrupt(int irq, void *dev_id) | ||
49 | { | ||
50 | volatile long nr_ticks; | ||
51 | |||
52 | if (at91_sys_read(AT91_PIT_SR) & AT91_PIT_PITS) { /* This is a shared interrupt */ | ||
53 | write_seqlock(&xtime_lock); | ||
54 | |||
55 | /* Get number to ticks performed before interrupt and clear PIT interrupt */ | ||
56 | nr_ticks = PIT_PICNT(at91_sys_read(AT91_PIT_PIVR)); | ||
57 | do { | ||
58 | timer_tick(); | ||
59 | nr_ticks--; | ||
60 | } while (nr_ticks); | ||
61 | |||
62 | write_sequnlock(&xtime_lock); | ||
63 | return IRQ_HANDLED; | ||
64 | } else | ||
65 | return IRQ_NONE; /* not handled */ | ||
66 | } | ||
67 | |||
68 | static struct irqaction at91sam926x_timer_irq = { | ||
69 | .name = "at91_tick", | ||
70 | .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER, | ||
71 | .handler = at91sam926x_timer_interrupt | ||
72 | }; | ||
73 | |||
74 | void at91sam926x_timer_reset(void) | ||
75 | { | ||
76 | /* Disable timer */ | ||
77 | at91_sys_write(AT91_PIT_MR, 0); | ||
78 | |||
79 | /* Clear any pending interrupts */ | ||
80 | (void) at91_sys_read(AT91_PIT_PIVR); | ||
81 | |||
82 | /* Set Period Interval timer and enable its interrupt */ | ||
83 | at91_sys_write(AT91_PIT_MR, (LATCH & AT91_PIT_PIV) | AT91_PIT_PITIEN | AT91_PIT_PITEN); | ||
84 | } | ||
85 | |||
86 | /* | ||
87 | * Set up timer interrupt. | ||
88 | */ | ||
89 | void __init at91sam926x_timer_init(void) | ||
90 | { | ||
91 | /* Initialize and enable the timer */ | ||
92 | at91sam926x_timer_reset(); | ||
93 | |||
94 | /* Make IRQs happen for the system timer. */ | ||
95 | setup_irq(AT91_ID_SYS, &at91sam926x_timer_irq); | ||
96 | } | ||
97 | |||
98 | #ifdef CONFIG_PM | ||
99 | static void at91sam926x_timer_suspend(void) | ||
100 | { | ||
101 | /* Disable timer */ | ||
102 | at91_sys_write(AT91_PIT_MR, 0); | ||
103 | } | ||
104 | #else | ||
105 | #define at91sam926x_timer_suspend NULL | ||
106 | #endif | ||
107 | |||
108 | struct sys_timer at91sam926x_timer = { | ||
109 | .init = at91sam926x_timer_init, | ||
110 | .offset = at91sam926x_gettimeoffset, | ||
111 | .suspend = at91sam926x_timer_suspend, | ||
112 | .resume = at91sam926x_timer_reset, | ||
113 | }; | ||
114 | |||
diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91rm9200/board-carmeva.c index 98208740e7c5..654f0379550a 100644 --- a/arch/arm/mach-at91rm9200/board-carmeva.c +++ b/arch/arm/mach-at91rm9200/board-carmeva.c | |||
@@ -65,7 +65,6 @@ static void __init carmeva_init_irq(void) | |||
65 | at91rm9200_init_interrupts(NULL); | 65 | at91rm9200_init_interrupts(NULL); |
66 | } | 66 | } |
67 | 67 | ||
68 | |||
69 | static struct at91_eth_data __initdata carmeva_eth_data = { | 68 | static struct at91_eth_data __initdata carmeva_eth_data = { |
70 | .phy_irq_pin = AT91_PIN_PC4, | 69 | .phy_irq_pin = AT91_PIN_PC4, |
71 | .is_rmii = 1, | 70 | .is_rmii = 1, |
@@ -89,8 +88,33 @@ static struct at91_udc_data __initdata carmeva_udc_data = { | |||
89 | // }; | 88 | // }; |
90 | 89 | ||
91 | static struct at91_mmc_data __initdata carmeva_mmc_data = { | 90 | static struct at91_mmc_data __initdata carmeva_mmc_data = { |
92 | .is_b = 0, | 91 | .slot_b = 0, |
93 | .wire4 = 1, | 92 | .wire4 = 1, |
93 | .det_pin = AT91_PIN_PB10, | ||
94 | .wp_pin = AT91_PIN_PC14, | ||
95 | }; | ||
96 | |||
97 | static struct spi_board_info carmeva_spi_devices[] = { | ||
98 | { /* DataFlash chip */ | ||
99 | .modalias = "mtd_dataflash", | ||
100 | .chip_select = 0, | ||
101 | .max_speed_hz = 10 * 1000 * 1000, | ||
102 | }, | ||
103 | { /* User accessable spi - cs1 (250KHz) */ | ||
104 | .modalias = "spi-cs1", | ||
105 | .chip_select = 1, | ||
106 | .max_speed_hz = 250 * 1000, | ||
107 | }, | ||
108 | { /* User accessable spi - cs2 (1MHz) */ | ||
109 | .modalias = "spi-cs2", | ||
110 | .chip_select = 2, | ||
111 | .max_speed_hz = 1 * 1000 * 1000, | ||
112 | }, | ||
113 | { /* User accessable spi - cs3 (10MHz) */ | ||
114 | .modalias = "spi-cs3", | ||
115 | .chip_select = 3, | ||
116 | .max_speed_hz = 10 * 1000 * 1000, | ||
117 | }, | ||
94 | }; | 118 | }; |
95 | 119 | ||
96 | static void __init carmeva_board_init(void) | 120 | static void __init carmeva_board_init(void) |
@@ -105,10 +129,10 @@ static void __init carmeva_board_init(void) | |||
105 | at91_add_device_udc(&carmeva_udc_data); | 129 | at91_add_device_udc(&carmeva_udc_data); |
106 | /* I2C */ | 130 | /* I2C */ |
107 | at91_add_device_i2c(); | 131 | at91_add_device_i2c(); |
132 | /* SPI */ | ||
133 | at91_add_device_spi(carmeva_spi_devices, ARRAY_SIZE(carmeva_spi_devices)); | ||
108 | /* Compact Flash */ | 134 | /* Compact Flash */ |
109 | // at91_add_device_cf(&carmeva_cf_data); | 135 | // at91_add_device_cf(&carmeva_cf_data); |
110 | /* SPI */ | ||
111 | // at91_add_device_spi(NULL, 0); | ||
112 | /* MMC */ | 136 | /* MMC */ |
113 | at91_add_device_mmc(&carmeva_mmc_data); | 137 | at91_add_device_mmc(&carmeva_mmc_data); |
114 | } | 138 | } |
diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c index 8eeae491ce71..b8bb8052607a 100644 --- a/arch/arm/mach-at91rm9200/board-csb337.c +++ b/arch/arm/mach-at91rm9200/board-csb337.c | |||
@@ -99,7 +99,7 @@ static struct at91_cf_data __initdata csb337_cf_data = { | |||
99 | 99 | ||
100 | static struct at91_mmc_data __initdata csb337_mmc_data = { | 100 | static struct at91_mmc_data __initdata csb337_mmc_data = { |
101 | .det_pin = AT91_PIN_PD5, | 101 | .det_pin = AT91_PIN_PD5, |
102 | .is_b = 0, | 102 | .slot_b = 0, |
103 | .wire4 = 1, | 103 | .wire4 = 1, |
104 | .wp_pin = AT91_PIN_PD6, | 104 | .wp_pin = AT91_PIN_PD6, |
105 | }; | 105 | }; |
diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c index c699f3984d4b..7522bf91bce8 100644 --- a/arch/arm/mach-at91rm9200/board-dk.c +++ b/arch/arm/mach-at91rm9200/board-dk.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/mtd/physmap.h> | ||
30 | 31 | ||
31 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
@@ -39,6 +40,7 @@ | |||
39 | 40 | ||
40 | #include <asm/arch/board.h> | 41 | #include <asm/arch/board.h> |
41 | #include <asm/arch/gpio.h> | 42 | #include <asm/arch/gpio.h> |
43 | #include <asm/arch/at91rm9200_mc.h> | ||
42 | 44 | ||
43 | #include "generic.h" | 45 | #include "generic.h" |
44 | 46 | ||
@@ -93,7 +95,7 @@ static struct at91_cf_data __initdata dk_cf_data = { | |||
93 | }; | 95 | }; |
94 | 96 | ||
95 | static struct at91_mmc_data __initdata dk_mmc_data = { | 97 | static struct at91_mmc_data __initdata dk_mmc_data = { |
96 | .is_b = 0, | 98 | .slot_b = 0, |
97 | .wire4 = 1, | 99 | .wire4 = 1, |
98 | }; | 100 | }; |
99 | 101 | ||
@@ -145,6 +147,30 @@ static struct at91_nand_data __initdata dk_nand_data = { | |||
145 | .partition_info = nand_partitions, | 147 | .partition_info = nand_partitions, |
146 | }; | 148 | }; |
147 | 149 | ||
150 | #define DK_FLASH_BASE AT91_CHIPSELECT_0 | ||
151 | #define DK_FLASH_SIZE 0x200000 | ||
152 | |||
153 | static struct physmap_flash_data dk_flash_data = { | ||
154 | .width = 2, | ||
155 | }; | ||
156 | |||
157 | static struct resource dk_flash_resource = { | ||
158 | .start = DK_FLASH_BASE, | ||
159 | .end = DK_FLASH_BASE + DK_FLASH_SIZE - 1, | ||
160 | .flags = IORESOURCE_MEM, | ||
161 | }; | ||
162 | |||
163 | static struct platform_device dk_flash = { | ||
164 | .name = "physmap-flash", | ||
165 | .id = 0, | ||
166 | .dev = { | ||
167 | .platform_data = &dk_flash_data, | ||
168 | }, | ||
169 | .resource = &dk_flash_resource, | ||
170 | .num_resources = 1, | ||
171 | }; | ||
172 | |||
173 | |||
148 | static void __init dk_board_init(void) | 174 | static void __init dk_board_init(void) |
149 | { | 175 | { |
150 | /* Serial */ | 176 | /* Serial */ |
@@ -172,6 +198,8 @@ static void __init dk_board_init(void) | |||
172 | #endif | 198 | #endif |
173 | /* NAND */ | 199 | /* NAND */ |
174 | at91_add_device_nand(&dk_nand_data); | 200 | at91_add_device_nand(&dk_nand_data); |
201 | /* NOR Flash */ | ||
202 | platform_device_register(&dk_flash); | ||
175 | /* VGA */ | 203 | /* VGA */ |
176 | // dk_add_device_video(); | 204 | // dk_add_device_video(); |
177 | } | 205 | } |
diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91rm9200/board-eb9200.c index 65e867ba2df3..80b72cf7264c 100644 --- a/arch/arm/mach-at91rm9200/board-eb9200.c +++ b/arch/arm/mach-at91rm9200/board-eb9200.c | |||
@@ -87,7 +87,7 @@ static struct at91_cf_data __initdata eb9200_cf_data = { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct at91_mmc_data __initdata eb9200_mmc_data = { | 89 | static struct at91_mmc_data __initdata eb9200_mmc_data = { |
90 | .is_b = 0, | 90 | .slot_b = 0, |
91 | .wire4 = 1, | 91 | .wire4 = 1, |
92 | }; | 92 | }; |
93 | 93 | ||
diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91rm9200/board-ek.c index 830eb7932178..c4fdb415f20e 100644 --- a/arch/arm/mach-at91rm9200/board-ek.c +++ b/arch/arm/mach-at91rm9200/board-ek.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/mtd/physmap.h> | ||
30 | 31 | ||
31 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
@@ -39,6 +40,7 @@ | |||
39 | 40 | ||
40 | #include <asm/arch/board.h> | 41 | #include <asm/arch/board.h> |
41 | #include <asm/arch/gpio.h> | 42 | #include <asm/arch/gpio.h> |
43 | #include <asm/arch/at91rm9200_mc.h> | ||
42 | 44 | ||
43 | #include "generic.h" | 45 | #include "generic.h" |
44 | 46 | ||
@@ -87,7 +89,7 @@ static struct at91_udc_data __initdata ek_udc_data = { | |||
87 | 89 | ||
88 | static struct at91_mmc_data __initdata ek_mmc_data = { | 90 | static struct at91_mmc_data __initdata ek_mmc_data = { |
89 | .det_pin = AT91_PIN_PB27, | 91 | .det_pin = AT91_PIN_PB27, |
90 | .is_b = 0, | 92 | .slot_b = 0, |
91 | .wire4 = 1, | 93 | .wire4 = 1, |
92 | .wp_pin = AT91_PIN_PA17, | 94 | .wp_pin = AT91_PIN_PA17, |
93 | }; | 95 | }; |
@@ -107,6 +109,30 @@ static struct spi_board_info ek_spi_devices[] = { | |||
107 | #endif | 109 | #endif |
108 | }; | 110 | }; |
109 | 111 | ||
112 | #define EK_FLASH_BASE AT91_CHIPSELECT_0 | ||
113 | #define EK_FLASH_SIZE 0x200000 | ||
114 | |||
115 | static struct physmap_flash_data ek_flash_data = { | ||
116 | .width = 2, | ||
117 | }; | ||
118 | |||
119 | static struct resource ek_flash_resource = { | ||
120 | .start = EK_FLASH_BASE, | ||
121 | .end = EK_FLASH_BASE + EK_FLASH_SIZE - 1, | ||
122 | .flags = IORESOURCE_MEM, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device ek_flash = { | ||
126 | .name = "physmap-flash", | ||
127 | .id = 0, | ||
128 | .dev = { | ||
129 | .platform_data = &ek_flash_data, | ||
130 | }, | ||
131 | .resource = &ek_flash_resource, | ||
132 | .num_resources = 1, | ||
133 | }; | ||
134 | |||
135 | |||
110 | static void __init ek_board_init(void) | 136 | static void __init ek_board_init(void) |
111 | { | 137 | { |
112 | /* Serial */ | 138 | /* Serial */ |
@@ -130,6 +156,8 @@ static void __init ek_board_init(void) | |||
130 | at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ | 156 | at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ |
131 | at91_add_device_mmc(&ek_mmc_data); | 157 | at91_add_device_mmc(&ek_mmc_data); |
132 | #endif | 158 | #endif |
159 | /* NOR Flash */ | ||
160 | platform_device_register(&ek_flash); | ||
133 | /* VGA */ | 161 | /* VGA */ |
134 | // ek_add_device_video(); | 162 | // ek_add_device_video(); |
135 | } | 163 | } |
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c index 35a954a44b1b..759d8191854f 100644 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ b/arch/arm/mach-at91rm9200/board-kb9202.c | |||
@@ -84,7 +84,7 @@ static struct at91_udc_data __initdata kb9202_udc_data = { | |||
84 | 84 | ||
85 | static struct at91_mmc_data __initdata kb9202_mmc_data = { | 85 | static struct at91_mmc_data __initdata kb9202_mmc_data = { |
86 | .det_pin = AT91_PIN_PB2, | 86 | .det_pin = AT91_PIN_PB2, |
87 | .is_b = 0, | 87 | .slot_b = 0, |
88 | .wire4 = 1, | 88 | .wire4 = 1, |
89 | }; | 89 | }; |
90 | 90 | ||
diff --git a/arch/arm/mach-at91rm9200/board-sam9260ek.c b/arch/arm/mach-at91rm9200/board-sam9260ek.c new file mode 100644 index 000000000000..ffca9bdec37b --- /dev/null +++ b/arch/arm/mach-at91rm9200/board-sam9260ek.c | |||
@@ -0,0 +1,201 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91rm9200/board-ek.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
5 | * Copyright (C) 2006 Atmel | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | |||
29 | #include <asm/hardware.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | #include <asm/irq.h> | ||
33 | |||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | #include <asm/mach/irq.h> | ||
37 | |||
38 | #include <asm/arch/board.h> | ||
39 | #include <asm/arch/gpio.h> | ||
40 | #include <asm/arch/at91sam926x_mc.h> | ||
41 | |||
42 | #include "generic.h" | ||
43 | |||
44 | |||
45 | /* | ||
46 | * Serial port configuration. | ||
47 | * 0 .. 5 = USART0 .. USART5 | ||
48 | * 6 = DBGU | ||
49 | */ | ||
50 | static struct at91_uart_config __initdata ek_uart_config = { | ||
51 | .console_tty = 0, /* ttyS0 */ | ||
52 | .nr_tty = 3, | ||
53 | .tty_map = { 6, 0, 1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */ | ||
54 | }; | ||
55 | |||
56 | static void __init ek_map_io(void) | ||
57 | { | ||
58 | /* Initialize processor: 18.432 MHz crystal */ | ||
59 | at91sam9260_initialize(18432000); | ||
60 | |||
61 | /* Setup the serial ports and console */ | ||
62 | at91_init_serial(&ek_uart_config); | ||
63 | } | ||
64 | |||
65 | static void __init ek_init_irq(void) | ||
66 | { | ||
67 | at91sam9260_init_interrupts(NULL); | ||
68 | } | ||
69 | |||
70 | |||
71 | /* | ||
72 | * USB Host port | ||
73 | */ | ||
74 | static struct at91_usbh_data __initdata ek_usbh_data = { | ||
75 | .ports = 2, | ||
76 | }; | ||
77 | |||
78 | /* | ||
79 | * USB Device port | ||
80 | */ | ||
81 | static struct at91_udc_data __initdata ek_udc_data = { | ||
82 | .vbus_pin = AT91_PIN_PC5, | ||
83 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
84 | }; | ||
85 | |||
86 | |||
87 | /* | ||
88 | * SPI devices. | ||
89 | */ | ||
90 | static struct spi_board_info ek_spi_devices[] = { | ||
91 | #if !defined(CONFIG_MMC_AT91) | ||
92 | { /* DataFlash chip */ | ||
93 | .modalias = "mtd_dataflash", | ||
94 | .chip_select = 1, | ||
95 | .max_speed_hz = 15 * 1000 * 1000, | ||
96 | .bus_num = 0, | ||
97 | }, | ||
98 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
99 | { /* DataFlash card */ | ||
100 | .modalias = "mtd_dataflash", | ||
101 | .chip_select = 0, | ||
102 | .max_speed_hz = 15 * 1000 * 1000, | ||
103 | .bus_num = 0, | ||
104 | }, | ||
105 | #endif | ||
106 | #endif | ||
107 | #if defined(CONFIG_SND_AT73C213) | ||
108 | { /* AT73C213 DAC */ | ||
109 | .modalias = "snd_at73c213", | ||
110 | .chip_select = 0, | ||
111 | .max_speed_hz = 10 * 1000 * 1000, | ||
112 | .bus_num = 1, | ||
113 | }, | ||
114 | #endif | ||
115 | }; | ||
116 | |||
117 | |||
118 | /* | ||
119 | * MACB Ethernet device | ||
120 | */ | ||
121 | static struct __initdata eth_platform_data ek_macb_data = { | ||
122 | .is_rmii = 1, | ||
123 | }; | ||
124 | |||
125 | |||
126 | /* | ||
127 | * NAND flash | ||
128 | */ | ||
129 | static struct mtd_partition __initdata ek_nand_partition[] = { | ||
130 | { | ||
131 | .name = "Partition 1", | ||
132 | .offset = 0, | ||
133 | .size = 256 * 1024, | ||
134 | }, | ||
135 | { | ||
136 | .name = "Partition 2", | ||
137 | .offset = 256 * 1024, | ||
138 | .size = MTDPART_SIZ_FULL, | ||
139 | }, | ||
140 | }; | ||
141 | |||
142 | static struct mtd_partition *nand_partitions(int size, int *num_partitions) | ||
143 | { | ||
144 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
145 | return ek_nand_partition; | ||
146 | } | ||
147 | |||
148 | static struct at91_nand_data __initdata ek_nand_data = { | ||
149 | .ale = 21, | ||
150 | .cle = 22, | ||
151 | // .det_pin = ... not connected | ||
152 | .rdy_pin = AT91_PIN_PC13, | ||
153 | .enable_pin = AT91_PIN_PC14, | ||
154 | .partition_info = nand_partitions, | ||
155 | #if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16) | ||
156 | .bus_width_16 = 1, | ||
157 | #else | ||
158 | .bus_width_16 = 0, | ||
159 | #endif | ||
160 | }; | ||
161 | |||
162 | |||
163 | /* | ||
164 | * MCI (SD/MMC) | ||
165 | */ | ||
166 | static struct at91_mmc_data __initdata ek_mmc_data = { | ||
167 | .slot_b = 1, | ||
168 | .wire4 = 1, | ||
169 | // .det_pin = ... not connected | ||
170 | // .wp_pin = ... not connected | ||
171 | // .vcc_pin = ... not connected | ||
172 | }; | ||
173 | |||
174 | static void __init ek_board_init(void) | ||
175 | { | ||
176 | /* Serial */ | ||
177 | at91_add_device_serial(); | ||
178 | /* USB Host */ | ||
179 | at91_add_device_usbh(&ek_usbh_data); | ||
180 | /* USB Device */ | ||
181 | at91_add_device_udc(&ek_udc_data); | ||
182 | /* SPI */ | ||
183 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | ||
184 | /* NAND */ | ||
185 | at91_add_device_nand(&ek_nand_data); | ||
186 | /* Ethernet */ | ||
187 | at91_add_device_eth(&ek_macb_data); | ||
188 | /* MMC */ | ||
189 | at91_add_device_mmc(&ek_mmc_data); | ||
190 | } | ||
191 | |||
192 | MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") | ||
193 | /* Maintainer: Atmel */ | ||
194 | .phys_io = AT91_BASE_SYS, | ||
195 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
196 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
197 | .timer = &at91sam926x_timer, | ||
198 | .map_io = ek_map_io, | ||
199 | .init_irq = ek_init_irq, | ||
200 | .init_machine = ek_board_init, | ||
201 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91rm9200/board-sam9261ek.c b/arch/arm/mach-at91rm9200/board-sam9261ek.c new file mode 100644 index 000000000000..30b490d8886b --- /dev/null +++ b/arch/arm/mach-at91rm9200/board-sam9261ek.c | |||
@@ -0,0 +1,259 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91rm9200/board-ek.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
5 | * Copyright (C) 2006 Atmel | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/dm9000.h> | ||
29 | |||
30 | #include <asm/hardware.h> | ||
31 | #include <asm/setup.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/irq.h> | ||
34 | |||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | |||
39 | #include <asm/arch/board.h> | ||
40 | #include <asm/arch/gpio.h> | ||
41 | #include <asm/arch/at91sam926x_mc.h> | ||
42 | |||
43 | #include "generic.h" | ||
44 | |||
45 | |||
46 | /* | ||
47 | * Serial port configuration. | ||
48 | * 0 .. 2 = USART0 .. USART2 | ||
49 | * 3 = DBGU | ||
50 | */ | ||
51 | static struct at91_uart_config __initdata ek_uart_config = { | ||
52 | .console_tty = 0, /* ttyS0 */ | ||
53 | .nr_tty = 1, | ||
54 | .tty_map = { 3, -1, -1, -1 } /* ttyS0, ..., ttyS3 */ | ||
55 | }; | ||
56 | |||
57 | static void __init ek_map_io(void) | ||
58 | { | ||
59 | /* Initialize processor: 18.432 MHz crystal */ | ||
60 | at91sam9261_initialize(18432000); | ||
61 | |||
62 | /* Setup the serial ports and console */ | ||
63 | at91_init_serial(&ek_uart_config); | ||
64 | } | ||
65 | |||
66 | static void __init ek_init_irq(void) | ||
67 | { | ||
68 | at91sam9261_init_interrupts(NULL); | ||
69 | } | ||
70 | |||
71 | |||
72 | /* | ||
73 | * DM9000 ethernet device | ||
74 | */ | ||
75 | #if defined(CONFIG_DM9000) | ||
76 | static struct resource at91sam9261_dm9000_resource[] = { | ||
77 | [0] = { | ||
78 | .start = AT91_CHIPSELECT_2, | ||
79 | .end = AT91_CHIPSELECT_2 + 3, | ||
80 | .flags = IORESOURCE_MEM | ||
81 | }, | ||
82 | [1] = { | ||
83 | .start = AT91_CHIPSELECT_2 + 0x44, | ||
84 | .end = AT91_CHIPSELECT_2 + 0xFF, | ||
85 | .flags = IORESOURCE_MEM | ||
86 | }, | ||
87 | [2] = { | ||
88 | .start = AT91_PIN_PC11, | ||
89 | .end = AT91_PIN_PC11, | ||
90 | .flags = IORESOURCE_IRQ | ||
91 | } | ||
92 | }; | ||
93 | |||
94 | static struct dm9000_plat_data dm9000_platdata = { | ||
95 | .flags = DM9000_PLATF_16BITONLY, | ||
96 | }; | ||
97 | |||
98 | static struct platform_device at91sam9261_dm9000_device = { | ||
99 | .name = "dm9000", | ||
100 | .id = 0, | ||
101 | .num_resources = ARRAY_SIZE(at91sam9261_dm9000_resource), | ||
102 | .resource = at91sam9261_dm9000_resource, | ||
103 | .dev = { | ||
104 | .platform_data = &dm9000_platdata, | ||
105 | } | ||
106 | }; | ||
107 | |||
108 | static void __init ek_add_device_dm9000(void) | ||
109 | { | ||
110 | /* | ||
111 | * Configure Chip-Select 2 on SMC for the DM9000. | ||
112 | * Note: These timings were calculated for MASTER_CLOCK = 100000000 | ||
113 | * according to the DM9000 timings. | ||
114 | */ | ||
115 | at91_sys_write(AT91_SMC_SETUP(2), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0)); | ||
116 | at91_sys_write(AT91_SMC_PULSE(2), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(8) | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(8)); | ||
117 | at91_sys_write(AT91_SMC_CYCLE(2), AT91_SMC_NWECYCLE_(16) | AT91_SMC_NRDCYCLE_(16)); | ||
118 | at91_sys_write(AT91_SMC_MODE(2), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16 | AT91_SMC_TDF_(1)); | ||
119 | |||
120 | /* Configure Reset signal as output */ | ||
121 | at91_set_gpio_output(AT91_PIN_PC10, 0); | ||
122 | |||
123 | /* Configure Interrupt pin as input, no pull-up */ | ||
124 | at91_set_gpio_input(AT91_PIN_PC11, 0); | ||
125 | |||
126 | platform_device_register(&at91sam9261_dm9000_device); | ||
127 | } | ||
128 | #else | ||
129 | static void __init ek_add_device_dm9000(void) {} | ||
130 | #endif /* CONFIG_DM9000 */ | ||
131 | |||
132 | |||
133 | /* | ||
134 | * USB Host Port | ||
135 | */ | ||
136 | static struct at91_usbh_data __initdata ek_usbh_data = { | ||
137 | .ports = 2, | ||
138 | }; | ||
139 | |||
140 | |||
141 | /* | ||
142 | * USB Device Port | ||
143 | */ | ||
144 | static struct at91_udc_data __initdata ek_udc_data = { | ||
145 | .vbus_pin = AT91_PIN_PB29, | ||
146 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
147 | }; | ||
148 | |||
149 | |||
150 | /* | ||
151 | * MCI (SD/MMC) | ||
152 | */ | ||
153 | static struct at91_mmc_data __initdata ek_mmc_data = { | ||
154 | .wire4 = 1, | ||
155 | // .det_pin = ... not connected | ||
156 | // .wp_pin = ... not connected | ||
157 | // .vcc_pin = ... not connected | ||
158 | }; | ||
159 | |||
160 | |||
161 | /* | ||
162 | * NAND flash | ||
163 | */ | ||
164 | static struct mtd_partition __initdata ek_nand_partition[] = { | ||
165 | { | ||
166 | .name = "Partition 1", | ||
167 | .offset = 0, | ||
168 | .size = 256 * 1024, | ||
169 | }, | ||
170 | { | ||
171 | .name = "Partition 2", | ||
172 | .offset = 256 * 1024 , | ||
173 | .size = MTDPART_SIZ_FULL, | ||
174 | }, | ||
175 | }; | ||
176 | |||
177 | static struct mtd_partition *nand_partitions(int size, int *num_partitions) | ||
178 | { | ||
179 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
180 | return ek_nand_partition; | ||
181 | } | ||
182 | |||
183 | static struct at91_nand_data __initdata ek_nand_data = { | ||
184 | .ale = 22, | ||
185 | .cle = 21, | ||
186 | // .det_pin = ... not connected | ||
187 | .rdy_pin = AT91_PIN_PC15, | ||
188 | .enable_pin = AT91_PIN_PC14, | ||
189 | .partition_info = nand_partitions, | ||
190 | #if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16) | ||
191 | .bus_width_16 = 1, | ||
192 | #else | ||
193 | .bus_width_16 = 0, | ||
194 | #endif | ||
195 | }; | ||
196 | |||
197 | /* | ||
198 | * SPI devices | ||
199 | */ | ||
200 | static struct spi_board_info ek_spi_devices[] = { | ||
201 | { /* DataFlash chip */ | ||
202 | .modalias = "mtd_dataflash", | ||
203 | .chip_select = 0, | ||
204 | .max_speed_hz = 15 * 1000 * 1000, | ||
205 | .bus_num = 0, | ||
206 | }, | ||
207 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
208 | { /* DataFlash card - jumper (J12) configurable to CS3 or CS0 */ | ||
209 | .modalias = "mtd_dataflash", | ||
210 | .chip_select = 3, | ||
211 | .max_speed_hz = 15 * 1000 * 1000, | ||
212 | .bus_num = 0, | ||
213 | }, | ||
214 | #elif defined(CONFIG_SND_AT73C213) | ||
215 | { /* AT73C213 DAC */ | ||
216 | .modalias = "snd_at73c213", | ||
217 | .chip_select = 3, | ||
218 | .max_speed_hz = 10 * 1000 * 1000, | ||
219 | .bus_num = 0, | ||
220 | }, | ||
221 | #endif | ||
222 | }; | ||
223 | |||
224 | |||
225 | static void __init ek_board_init(void) | ||
226 | { | ||
227 | /* Serial */ | ||
228 | at91_add_device_serial(); | ||
229 | /* USB Host */ | ||
230 | at91_add_device_usbh(&ek_usbh_data); | ||
231 | /* USB Device */ | ||
232 | at91_add_device_udc(&ek_udc_data); | ||
233 | /* I2C */ | ||
234 | at91_add_device_i2c(); | ||
235 | /* NAND */ | ||
236 | at91_add_device_nand(&ek_nand_data); | ||
237 | /* DM9000 ethernet */ | ||
238 | ek_add_device_dm9000(); | ||
239 | |||
240 | /* spi0 and mmc/sd share the same PIO pins */ | ||
241 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
242 | /* SPI */ | ||
243 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | ||
244 | #else | ||
245 | /* MMC */ | ||
246 | at91_add_device_mmc(&ek_mmc_data); | ||
247 | #endif | ||
248 | } | ||
249 | |||
250 | MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") | ||
251 | /* Maintainer: Atmel */ | ||
252 | .phys_io = AT91_BASE_SYS, | ||
253 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
254 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
255 | .timer = &at91sam926x_timer, | ||
256 | .map_io = ek_map_io, | ||
257 | .init_irq = ek_init_irq, | ||
258 | .init_machine = ek_board_init, | ||
259 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c index a43b061a7c85..4dee21fefe5a 100644 --- a/arch/arm/mach-at91rm9200/clock.c +++ b/arch/arm/mach-at91rm9200/clock.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | 29 | ||
30 | #include <asm/hardware.h> | 30 | #include <asm/hardware.h> |
31 | #include <asm/arch/at91_pmc.h> | ||
32 | #include <asm/arch/cpu.h> | ||
31 | 33 | ||
32 | #include "clock.h" | 34 | #include "clock.h" |
33 | 35 | ||
@@ -41,6 +43,7 @@ | |||
41 | #define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY) | 43 | #define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY) |
42 | #define clk_is_programmable(x) ((x)->type & CLK_TYPE_PROGRAMMABLE) | 44 | #define clk_is_programmable(x) ((x)->type & CLK_TYPE_PROGRAMMABLE) |
43 | #define clk_is_peripheral(x) ((x)->type & CLK_TYPE_PERIPHERAL) | 45 | #define clk_is_peripheral(x) ((x)->type & CLK_TYPE_PERIPHERAL) |
46 | #define clk_is_sys(x) ((x)->type & CLK_TYPE_SYSTEM) | ||
44 | 47 | ||
45 | 48 | ||
46 | static LIST_HEAD(clocks); | 49 | static LIST_HEAD(clocks); |
@@ -114,13 +117,11 @@ static void pmc_sys_mode(struct clk *clk, int is_on) | |||
114 | static struct clk udpck = { | 117 | static struct clk udpck = { |
115 | .name = "udpck", | 118 | .name = "udpck", |
116 | .parent = &pllb, | 119 | .parent = &pllb, |
117 | .pmc_mask = AT91_PMC_UDP, | ||
118 | .mode = pmc_sys_mode, | 120 | .mode = pmc_sys_mode, |
119 | }; | 121 | }; |
120 | static struct clk uhpck = { | 122 | static struct clk uhpck = { |
121 | .name = "uhpck", | 123 | .name = "uhpck", |
122 | .parent = &pllb, | 124 | .parent = &pllb, |
123 | .pmc_mask = AT91_PMC_UHP, | ||
124 | .mode = pmc_sys_mode, | 125 | .mode = pmc_sys_mode, |
125 | }; | 126 | }; |
126 | 127 | ||
@@ -434,6 +435,12 @@ int __init clk_register(struct clk *clk) | |||
434 | clk->mode = pmc_periph_mode; | 435 | clk->mode = pmc_periph_mode; |
435 | list_add_tail(&clk->node, &clocks); | 436 | list_add_tail(&clk->node, &clocks); |
436 | } | 437 | } |
438 | else if (clk_is_sys(clk)) { | ||
439 | clk->parent = &mck; | ||
440 | clk->mode = pmc_sys_mode; | ||
441 | |||
442 | list_add_tail(&clk->node, &clocks); | ||
443 | } | ||
437 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS | 444 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS |
438 | else if (clk_is_programmable(clk)) { | 445 | else if (clk_is_programmable(clk)) { |
439 | clk->mode = pmc_sys_mode; | 446 | clk->mode = pmc_sys_mode; |
@@ -586,9 +593,21 @@ int __init at91_clock_init(unsigned long main_clock) | |||
586 | */ | 593 | */ |
587 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; | 594 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; |
588 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); | 595 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); |
589 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP); | 596 | if (cpu_is_at91rm9200()) { |
597 | uhpck.pmc_mask = AT91RM9200_PMC_UHP; | ||
598 | udpck.pmc_mask = AT91RM9200_PMC_UDP; | ||
599 | at91_sys_write(AT91_PMC_SCDR, AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP); | ||
600 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); | ||
601 | } else if (cpu_is_at91sam9260()) { | ||
602 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | ||
603 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | ||
604 | at91_sys_write(AT91_PMC_SCDR, AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP); | ||
605 | } else if (cpu_is_at91sam9261()) { | ||
606 | uhpck.pmc_mask = (AT91SAM926x_PMC_UHP | AT91_PMC_HCK0); | ||
607 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | ||
608 | at91_sys_write(AT91_PMC_SCDR, AT91SAM926x_PMC_UHP | AT91_PMC_HCK0 | AT91SAM926x_PMC_UDP); | ||
609 | } | ||
590 | at91_sys_write(AT91_CKGR_PLLBR, 0); | 610 | at91_sys_write(AT91_CKGR_PLLBR, 0); |
591 | at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); | ||
592 | 611 | ||
593 | udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | 612 | udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); |
594 | uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | 613 | uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); |
diff --git a/arch/arm/mach-at91rm9200/clock.h b/arch/arm/mach-at91rm9200/clock.h index 0592e662ab37..b5c7a2eb2d1d 100644 --- a/arch/arm/mach-at91rm9200/clock.h +++ b/arch/arm/mach-at91rm9200/clock.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define CLK_TYPE_PLL 0x2 | 10 | #define CLK_TYPE_PLL 0x2 |
11 | #define CLK_TYPE_PROGRAMMABLE 0x4 | 11 | #define CLK_TYPE_PROGRAMMABLE 0x4 |
12 | #define CLK_TYPE_PERIPHERAL 0x8 | 12 | #define CLK_TYPE_PERIPHERAL 0x8 |
13 | #define CLK_TYPE_SYSTEM 0x10 | ||
13 | 14 | ||
14 | 15 | ||
15 | struct clk { | 16 | struct clk { |
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h index 694e411e285f..8c4d5a77d485 100644 --- a/arch/arm/mach-at91rm9200/generic.h +++ b/arch/arm/mach-at91rm9200/generic.h | |||
@@ -10,14 +10,19 @@ | |||
10 | 10 | ||
11 | /* Processors */ | 11 | /* Processors */ |
12 | extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks); | 12 | extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks); |
13 | extern void __init at91sam9260_initialize(unsigned long main_clock); | ||
14 | extern void __init at91sam9261_initialize(unsigned long main_clock); | ||
13 | 15 | ||
14 | /* Interrupts */ | 16 | /* Interrupts */ |
15 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); | 17 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); |
18 | extern void __init at91sam9260_init_interrupts(unsigned int priority[]); | ||
19 | extern void __init at91sam9261_init_interrupts(unsigned int priority[]); | ||
16 | extern void __init at91_aic_init(unsigned int priority[]); | 20 | extern void __init at91_aic_init(unsigned int priority[]); |
17 | 21 | ||
18 | /* Timer */ | 22 | /* Timer */ |
19 | struct sys_timer; | 23 | struct sys_timer; |
20 | extern struct sys_timer at91rm9200_timer; | 24 | extern struct sys_timer at91rm9200_timer; |
25 | extern struct sys_timer at91sam926x_timer; | ||
21 | 26 | ||
22 | /* Clocks */ | 27 | /* Clocks */ |
23 | extern int __init at91_clock_init(unsigned long main_clock); | 28 | extern int __init at91_clock_init(unsigned long main_clock); |
@@ -39,3 +44,6 @@ struct at91_gpio_bank { | |||
39 | }; | 44 | }; |
40 | extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks); | 45 | extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks); |
41 | extern void __init at91_gpio_irq_setup(void); | 46 | extern void __init at91_gpio_irq_setup(void); |
47 | |||
48 | extern void (*at91_arch_reset)(void); | ||
49 | extern int at91_extern_irq; | ||
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index cec3862651d0..3f188508c391 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
22 | #include <asm/arch/at91_pio.h> | ||
23 | #include <asm/arch/at91_pmc.h> | ||
22 | #include <asm/arch/gpio.h> | 24 | #include <asm/arch/gpio.h> |
23 | 25 | ||
24 | #include "generic.h" | 26 | #include "generic.h" |
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c index cab0de9b8fa0..2148daafd29c 100644 --- a/arch/arm/mach-at91rm9200/irq.c +++ b/arch/arm/mach-at91rm9200/irq.c | |||
@@ -47,6 +47,10 @@ static void at91_aic_unmask_irq(unsigned int irq) | |||
47 | at91_sys_write(AT91_AIC_IECR, 1 << irq); | 47 | at91_sys_write(AT91_AIC_IECR, 1 << irq); |
48 | } | 48 | } |
49 | 49 | ||
50 | unsigned int at91_extern_irq; | ||
51 | |||
52 | #define is_extern_irq(irq) ((1 << (irq)) & at91_extern_irq) | ||
53 | |||
50 | static int at91_aic_set_type(unsigned irq, unsigned type) | 54 | static int at91_aic_set_type(unsigned irq, unsigned type) |
51 | { | 55 | { |
52 | unsigned int smr, srctype; | 56 | unsigned int smr, srctype; |
@@ -59,14 +63,16 @@ static int at91_aic_set_type(unsigned irq, unsigned type) | |||
59 | srctype = AT91_AIC_SRCTYPE_RISING; | 63 | srctype = AT91_AIC_SRCTYPE_RISING; |
60 | break; | 64 | break; |
61 | case IRQT_LOW: | 65 | case IRQT_LOW: |
62 | if ((irq > AT91_ID_FIQ) && (irq < AT91RM9200_ID_IRQ0)) /* only supported on external interrupts */ | 66 | if ((irq == AT91_ID_FIQ) || is_extern_irq(irq)) /* only supported on external interrupts */ |
67 | srctype = AT91_AIC_SRCTYPE_LOW; | ||
68 | else | ||
63 | return -EINVAL; | 69 | return -EINVAL; |
64 | srctype = AT91_AIC_SRCTYPE_LOW; | ||
65 | break; | 70 | break; |
66 | case IRQT_FALLING: | 71 | case IRQT_FALLING: |
67 | if ((irq > AT91_ID_FIQ) && (irq < AT91RM9200_ID_IRQ0)) /* only supported on external interrupts */ | 72 | if ((irq == AT91_ID_FIQ) || is_extern_irq(irq)) /* only supported on external interrupts */ |
73 | srctype = AT91_AIC_SRCTYPE_FALLING; | ||
74 | else | ||
68 | return -EINVAL; | 75 | return -EINVAL; |
69 | srctype = AT91_AIC_SRCTYPE_FALLING; | ||
70 | break; | 76 | break; |
71 | default: | 77 | default: |
72 | return -EINVAL; | 78 | return -EINVAL; |
diff --git a/arch/arm/mach-at91rm9200/pm.c b/arch/arm/mach-at91rm9200/pm.c index 32c95d8eaacf..67aa5572a3ea 100644 --- a/arch/arm/mach-at91rm9200/pm.c +++ b/arch/arm/mach-at91rm9200/pm.c | |||
@@ -26,7 +26,10 @@ | |||
26 | #include <asm/mach/irq.h> | 26 | #include <asm/mach/irq.h> |
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | 28 | ||
29 | #include <asm/arch/at91_pmc.h> | ||
30 | #include <asm/arch/at91rm9200_mc.h> | ||
29 | #include <asm/arch/gpio.h> | 31 | #include <asm/arch/gpio.h> |
32 | #include <asm/arch/cpu.h> | ||
30 | 33 | ||
31 | #include "generic.h" | 34 | #include "generic.h" |
32 | 35 | ||
@@ -68,9 +71,15 @@ static int at91_pm_verify_clocks(void) | |||
68 | scsr = at91_sys_read(AT91_PMC_SCSR); | 71 | scsr = at91_sys_read(AT91_PMC_SCSR); |
69 | 72 | ||
70 | /* USB must not be using PLLB */ | 73 | /* USB must not be using PLLB */ |
71 | if ((scsr & (AT91_PMC_UHP | AT91_PMC_UDP)) != 0) { | 74 | if (cpu_is_at91rm9200()) { |
72 | pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); | 75 | if ((scsr & (AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP)) != 0) { |
73 | return 0; | 76 | pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); |
77 | return 0; | ||
78 | } | ||
79 | } else if (cpu_is_at91sam9260()) { | ||
80 | #warning "Check SAM9260 USB clocks" | ||
81 | } else if (cpu_is_at91sam9261()) { | ||
82 | #warning "Check SAM9261 USB clocks" | ||
74 | } | 83 | } |
75 | 84 | ||
76 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS | 85 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS |
@@ -112,7 +121,6 @@ EXPORT_SYMBOL(at91_suspend_entering_slow_clock); | |||
112 | static void (*slow_clock)(void); | 121 | static void (*slow_clock)(void); |
113 | 122 | ||
114 | 123 | ||
115 | |||
116 | static int at91_pm_enter(suspend_state_t state) | 124 | static int at91_pm_enter(suspend_state_t state) |
117 | { | 125 | { |
118 | at91_gpio_suspend(); | 126 | at91_gpio_suspend(); |
@@ -123,13 +131,7 @@ static int at91_pm_enter(suspend_state_t state) | |||
123 | (at91_sys_read(AT91_PMC_PCSR) | 131 | (at91_sys_read(AT91_PMC_PCSR) |
124 | | (1 << AT91_ID_FIQ) | 132 | | (1 << AT91_ID_FIQ) |
125 | | (1 << AT91_ID_SYS) | 133 | | (1 << AT91_ID_SYS) |
126 | | (1 << AT91RM9200_ID_IRQ0) | 134 | | (at91_extern_irq)) |
127 | | (1 << AT91RM9200_ID_IRQ1) | ||
128 | | (1 << AT91RM9200_ID_IRQ2) | ||
129 | | (1 << AT91RM9200_ID_IRQ3) | ||
130 | | (1 << AT91RM9200_ID_IRQ4) | ||
131 | | (1 << AT91RM9200_ID_IRQ5) | ||
132 | | (1 << AT91RM9200_ID_IRQ6)) | ||
133 | & at91_sys_read(AT91_AIC_IMR), | 135 | & at91_sys_read(AT91_AIC_IMR), |
134 | state); | 136 | state); |
135 | 137 | ||
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index e346b03cd921..af7904b3d0a8 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -9,12 +9,24 @@ config CRUNCH | |||
9 | 9 | ||
10 | comment "EP93xx Platforms" | 10 | comment "EP93xx Platforms" |
11 | 11 | ||
12 | config MACH_ADSSPHERE | ||
13 | bool "Support ADS Sphere" | ||
14 | help | ||
15 | Say 'Y' here if you want your kernel to support the ADS | ||
16 | Sphere board. | ||
17 | |||
12 | config MACH_EDB9302 | 18 | config MACH_EDB9302 |
13 | bool "Support Cirrus Logic EDB9302" | 19 | bool "Support Cirrus Logic EDB9302" |
14 | help | 20 | help |
15 | Say 'Y' here if you want your kernel to support the Cirrus | 21 | Say 'Y' here if you want your kernel to support the Cirrus |
16 | Logic EDB9302 Evaluation Board. | 22 | Logic EDB9302 Evaluation Board. |
17 | 23 | ||
24 | config MACH_EDB9302A | ||
25 | bool "Support Cirrus Logic EDB9302A" | ||
26 | help | ||
27 | Say 'Y' here if you want your kernel to support the Cirrus | ||
28 | Logic EDB9302A Evaluation Board. | ||
29 | |||
18 | config MACH_EDB9312 | 30 | config MACH_EDB9312 |
19 | bool "Support Cirrus Logic EDB9312" | 31 | bool "Support Cirrus Logic EDB9312" |
20 | help | 32 | help |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index c2eb18b530c2..b06641dd450d 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -6,7 +6,9 @@ obj-m := | |||
6 | obj-n := | 6 | obj-n := |
7 | obj- := | 7 | obj- := |
8 | 8 | ||
9 | obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | ||
9 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o | 10 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o |
11 | obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o | ||
10 | obj-$(CONFIG_MACH_EDB9312) += edb9312.o | 12 | obj-$(CONFIG_MACH_EDB9312) += edb9312.o |
11 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o | 13 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o |
12 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o | 14 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o |
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c new file mode 100644 index 000000000000..ac5d5818eb7b --- /dev/null +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/adssphere.c | ||
3 | * ADS Sphere support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | |||
26 | static struct physmap_flash_data adssphere_flash_data = { | ||
27 | .width = 4, | ||
28 | }; | ||
29 | |||
30 | static struct resource adssphere_flash_resource = { | ||
31 | .start = 0x60000000, | ||
32 | .end = 0x61ffffff, | ||
33 | .flags = IORESOURCE_MEM, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device adssphere_flash = { | ||
37 | .name = "physmap-flash", | ||
38 | .id = 0, | ||
39 | .dev = { | ||
40 | .platform_data = &adssphere_flash_data, | ||
41 | }, | ||
42 | .num_resources = 1, | ||
43 | .resource = &adssphere_flash_resource, | ||
44 | }; | ||
45 | |||
46 | static struct ep93xx_eth_data adssphere_eth_data = { | ||
47 | .phy_id = 1, | ||
48 | }; | ||
49 | |||
50 | static struct resource adssphere_eth_resource[] = { | ||
51 | { | ||
52 | .start = EP93XX_ETHERNET_PHYS_BASE, | ||
53 | .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff, | ||
54 | .flags = IORESOURCE_MEM, | ||
55 | }, { | ||
56 | .start = IRQ_EP93XX_ETHERNET, | ||
57 | .end = IRQ_EP93XX_ETHERNET, | ||
58 | .flags = IORESOURCE_IRQ, | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static struct platform_device adssphere_eth_device = { | ||
63 | .name = "ep93xx-eth", | ||
64 | .id = -1, | ||
65 | .dev = { | ||
66 | .platform_data = &adssphere_eth_data, | ||
67 | }, | ||
68 | .num_resources = 2, | ||
69 | .resource = adssphere_eth_resource, | ||
70 | }; | ||
71 | |||
72 | static void __init adssphere_init_machine(void) | ||
73 | { | ||
74 | ep93xx_init_devices(); | ||
75 | platform_device_register(&adssphere_flash); | ||
76 | |||
77 | memcpy(adssphere_eth_data.dev_addr, | ||
78 | (void *)(EP93XX_ETHERNET_BASE + 0x50), 6); | ||
79 | platform_device_register(&adssphere_eth_device); | ||
80 | } | ||
81 | |||
82 | MACHINE_START(ADSSPHERE, "ADS Sphere board") | ||
83 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
84 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
85 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
86 | .boot_params = 0x00000100, | ||
87 | .map_io = ep93xx_map_io, | ||
88 | .init_irq = ep93xx_init_irq, | ||
89 | .timer = &ep93xx_timer, | ||
90 | .init_machine = adssphere_init_machine, | ||
91 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c new file mode 100644 index 000000000000..62e064bab1d2 --- /dev/null +++ b/arch/arm/mach-ep93xx/edb9302a.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9302a.c | ||
3 | * Cirrus Logic EDB9302A support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | |||
26 | static struct physmap_flash_data edb9302a_flash_data = { | ||
27 | .width = 2, | ||
28 | }; | ||
29 | |||
30 | static struct resource edb9302a_flash_resource = { | ||
31 | .start = 0x60000000, | ||
32 | .end = 0x60ffffff, | ||
33 | .flags = IORESOURCE_MEM, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device edb9302a_flash = { | ||
37 | .name = "physmap-flash", | ||
38 | .id = 0, | ||
39 | .dev = { | ||
40 | .platform_data = &edb9302a_flash_data, | ||
41 | }, | ||
42 | .num_resources = 1, | ||
43 | .resource = &edb9302a_flash_resource, | ||
44 | }; | ||
45 | |||
46 | static struct ep93xx_eth_data edb9302a_eth_data = { | ||
47 | .phy_id = 1, | ||
48 | }; | ||
49 | |||
50 | static struct resource edb9302a_eth_resource[] = { | ||
51 | { | ||
52 | .start = EP93XX_ETHERNET_PHYS_BASE, | ||
53 | .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff, | ||
54 | .flags = IORESOURCE_MEM, | ||
55 | }, { | ||
56 | .start = IRQ_EP93XX_ETHERNET, | ||
57 | .end = IRQ_EP93XX_ETHERNET, | ||
58 | .flags = IORESOURCE_IRQ, | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static struct platform_device edb9302a_eth_device = { | ||
63 | .name = "ep93xx-eth", | ||
64 | .id = -1, | ||
65 | .dev = { | ||
66 | .platform_data = &edb9302a_eth_data, | ||
67 | }, | ||
68 | .num_resources = 2, | ||
69 | .resource = edb9302a_eth_resource, | ||
70 | }; | ||
71 | |||
72 | static void __init edb9302a_init_machine(void) | ||
73 | { | ||
74 | ep93xx_init_devices(); | ||
75 | platform_device_register(&edb9302a_flash); | ||
76 | |||
77 | memcpy(edb9302a_eth_data.dev_addr, | ||
78 | (void *)(EP93XX_ETHERNET_BASE + 0x50), 6); | ||
79 | platform_device_register(&edb9302a_eth_device); | ||
80 | } | ||
81 | |||
82 | MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | ||
83 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
84 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
85 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
86 | .boot_params = 0xc0000100, | ||
87 | .map_io = ep93xx_map_io, | ||
88 | .init_irq = ep93xx_init_irq, | ||
89 | .timer = &ep93xx_timer, | ||
90 | .init_machine = edb9302a_init_machine, | ||
91 | MACHINE_END | ||
diff --git a/arch/arm/mach-iop13xx/Kconfig b/arch/arm/mach-iop13xx/Kconfig new file mode 100644 index 000000000000..40c2d689f2eb --- /dev/null +++ b/arch/arm/mach-iop13xx/Kconfig | |||
@@ -0,0 +1,20 @@ | |||
1 | if ARCH_IOP13XX | ||
2 | |||
3 | menu "IOP13XX Implementation Options" | ||
4 | |||
5 | comment "IOP13XX Platform Support" | ||
6 | |||
7 | config MACH_IQ81340SC | ||
8 | bool "Enable IQ81340SC Hardware Support" | ||
9 | help | ||
10 | Say Y here if you want to support running on the Intel IQ81340SC | ||
11 | evaluation kit. | ||
12 | |||
13 | config MACH_IQ81340MC | ||
14 | bool "Enable IQ81340MC Hardware Support" | ||
15 | help | ||
16 | Say Y here if you want to support running on the Intel IQ81340MC | ||
17 | evaluation kit. | ||
18 | |||
19 | endmenu | ||
20 | endif | ||
diff --git a/arch/arm/mach-iop13xx/Makefile b/arch/arm/mach-iop13xx/Makefile new file mode 100644 index 000000000000..c3d6c08f2d4c --- /dev/null +++ b/arch/arm/mach-iop13xx/Makefile | |||
@@ -0,0 +1,12 @@ | |||
1 | obj-y := | ||
2 | obj-m := | ||
3 | obj-n := | ||
4 | obj- := | ||
5 | |||
6 | obj-$(CONFIG_ARCH_IOP13XX) += setup.o | ||
7 | obj-$(CONFIG_ARCH_IOP13XX) += irq.o | ||
8 | obj-$(CONFIG_ARCH_IOP13XX) += time.o | ||
9 | obj-$(CONFIG_ARCH_IOP13XX) += pci.o | ||
10 | obj-$(CONFIG_ARCH_IOP13XX) += io.o | ||
11 | obj-$(CONFIG_MACH_IQ81340SC) += iq81340sc.o | ||
12 | obj-$(CONFIG_MACH_IQ81340MC) += iq81340mc.o | ||
diff --git a/arch/arm/mach-iop13xx/Makefile.boot b/arch/arm/mach-iop13xx/Makefile.boot new file mode 100644 index 000000000000..0b0e19fdfe6c --- /dev/null +++ b/arch/arm/mach-iop13xx/Makefile.boot | |||
@@ -0,0 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | initrd_phys-y := 0x00800000 | ||
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c new file mode 100644 index 000000000000..fbf9f88e46ea --- /dev/null +++ b/arch/arm/mach-iop13xx/io.c | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * iop13xx custom ioremap implementation | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/module.h> | ||
21 | #include <asm/hardware.h> | ||
22 | #include <asm/io.h> | ||
23 | |||
24 | void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, | ||
25 | unsigned long flags) | ||
26 | { | ||
27 | void __iomem * retval; | ||
28 | |||
29 | switch (cookie) { | ||
30 | case IOP13XX_PCIX_LOWER_MEM_RA ... IOP13XX_PCIX_UPPER_MEM_RA: | ||
31 | if (unlikely(!iop13xx_atux_mem_base)) | ||
32 | retval = NULL; | ||
33 | else | ||
34 | retval = (void *)(iop13xx_atux_mem_base + | ||
35 | (cookie - IOP13XX_PCIX_LOWER_MEM_RA)); | ||
36 | break; | ||
37 | case IOP13XX_PCIE_LOWER_MEM_RA ... IOP13XX_PCIE_UPPER_MEM_RA: | ||
38 | if (unlikely(!iop13xx_atue_mem_base)) | ||
39 | retval = NULL; | ||
40 | else | ||
41 | retval = (void *)(iop13xx_atue_mem_base + | ||
42 | (cookie - IOP13XX_PCIE_LOWER_MEM_RA)); | ||
43 | break; | ||
44 | case IOP13XX_PBI_LOWER_MEM_RA ... IOP13XX_PBI_UPPER_MEM_RA: | ||
45 | retval = __ioremap(IOP13XX_PBI_LOWER_MEM_PA + | ||
46 | (cookie - IOP13XX_PBI_LOWER_MEM_RA), | ||
47 | size, flags); | ||
48 | break; | ||
49 | case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA: | ||
50 | retval = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(cookie); | ||
51 | break; | ||
52 | case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA: | ||
53 | retval = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(cookie); | ||
54 | break; | ||
55 | case IOP13XX_PMMR_PHYS_MEM_BASE ... IOP13XX_PMMR_UPPER_MEM_PA: | ||
56 | retval = (void *) IOP13XX_PMMR_PHYS_TO_VIRT(cookie); | ||
57 | break; | ||
58 | default: | ||
59 | retval = __ioremap(cookie, size, flags); | ||
60 | } | ||
61 | |||
62 | return retval; | ||
63 | } | ||
64 | EXPORT_SYMBOL(__iop13xx_ioremap); | ||
65 | |||
66 | void __iop13xx_iounmap(void __iomem *addr) | ||
67 | { | ||
68 | extern void __iounmap(volatile void __iomem *addr); | ||
69 | |||
70 | if (iop13xx_atue_mem_base) | ||
71 | if (addr >= (void __iomem *) iop13xx_atue_mem_base && | ||
72 | addr < (void __iomem *) (iop13xx_atue_mem_base + | ||
73 | iop13xx_atue_mem_size)) | ||
74 | goto skip; | ||
75 | |||
76 | if (iop13xx_atux_mem_base) | ||
77 | if (addr >= (void __iomem *) iop13xx_atux_mem_base && | ||
78 | addr < (void __iomem *) (iop13xx_atux_mem_base + | ||
79 | iop13xx_atux_mem_size)) | ||
80 | goto skip; | ||
81 | |||
82 | switch ((u32) addr) { | ||
83 | case IOP13XX_PCIE_LOWER_IO_VA ... IOP13XX_PCIE_UPPER_IO_VA: | ||
84 | case IOP13XX_PCIX_LOWER_IO_VA ... IOP13XX_PCIX_UPPER_IO_VA: | ||
85 | case IOP13XX_PMMR_VIRT_MEM_BASE ... IOP13XX_PMMR_UPPER_MEM_VA: | ||
86 | goto skip; | ||
87 | } | ||
88 | __iounmap(addr); | ||
89 | |||
90 | skip: | ||
91 | return; | ||
92 | } | ||
93 | EXPORT_SYMBOL(__iop13xx_iounmap); | ||
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c new file mode 100644 index 000000000000..ee595786cd22 --- /dev/null +++ b/arch/arm/mach-iop13xx/iq81340mc.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * iq81340mc board support | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/pci.h> | ||
20 | |||
21 | #include <asm/hardware.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/mach/pci.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/arch/pci.h> | ||
27 | #include <asm/mach/time.h> | ||
28 | |||
29 | extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ | ||
30 | |||
31 | static int __init | ||
32 | iq81340mc_pcix_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | ||
33 | { | ||
34 | switch (idsel) { | ||
35 | case 1: | ||
36 | switch (pin) { | ||
37 | case 1: return ATUX_INTB; | ||
38 | case 2: return ATUX_INTC; | ||
39 | case 3: return ATUX_INTD; | ||
40 | case 4: return ATUX_INTA; | ||
41 | default: return -1; | ||
42 | } | ||
43 | case 2: | ||
44 | switch (pin) { | ||
45 | case 1: return ATUX_INTC; | ||
46 | case 2: return ATUX_INTD; | ||
47 | case 3: return ATUX_INTC; | ||
48 | case 4: return ATUX_INTD; | ||
49 | default: return -1; | ||
50 | } | ||
51 | default: return -1; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | static struct hw_pci iq81340mc_pci __initdata = { | ||
56 | .swizzle = pci_std_swizzle, | ||
57 | .nr_controllers = 0, | ||
58 | .setup = iop13xx_pci_setup, | ||
59 | .map_irq = iq81340mc_pcix_map_irq, | ||
60 | .scan = iop13xx_scan_bus, | ||
61 | .preinit = iop13xx_pci_init, | ||
62 | }; | ||
63 | |||
64 | static int __init iq81340mc_pci_init(void) | ||
65 | { | ||
66 | iop13xx_atu_select(&iq81340mc_pci); | ||
67 | pci_common_init(&iq81340mc_pci); | ||
68 | iop13xx_map_pci_memory(); | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static void __init iq81340mc_init(void) | ||
74 | { | ||
75 | iop13xx_platform_init(); | ||
76 | iq81340mc_pci_init(); | ||
77 | } | ||
78 | |||
79 | static void __init iq81340mc_timer_init(void) | ||
80 | { | ||
81 | iop13xx_init_time(400000000); | ||
82 | } | ||
83 | |||
84 | static struct sys_timer iq81340mc_timer = { | ||
85 | .init = iq81340mc_timer_init, | ||
86 | .offset = iop13xx_gettimeoffset, | ||
87 | }; | ||
88 | |||
89 | MACHINE_START(IQ81340MC, "Intel IQ81340MC") | ||
90 | /* Maintainer: Dan Williams <dan.j.williams@intel.com> */ | ||
91 | .phys_io = PHYS_IO, | ||
92 | .io_pg_offst = IO_PG_OFFSET, | ||
93 | .map_io = iop13xx_map_io, | ||
94 | .init_irq = iop13xx_init_irq, | ||
95 | .timer = &iq81340mc_timer, | ||
96 | .boot_params = BOOT_PARAM_OFFSET, | ||
97 | .init_machine = iq81340mc_init, | ||
98 | MACHINE_END | ||
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c new file mode 100644 index 000000000000..6677e14b61bf --- /dev/null +++ b/arch/arm/mach-iop13xx/iq81340sc.c | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * iq81340sc board support | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/pci.h> | ||
20 | |||
21 | #include <asm/hardware.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/mach/pci.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/arch/pci.h> | ||
27 | #include <asm/mach/time.h> | ||
28 | |||
29 | extern int init_atu; | ||
30 | |||
31 | static int __init | ||
32 | iq81340sc_atux_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | ||
33 | { | ||
34 | WARN_ON(idsel < 1 || idsel > 2); | ||
35 | |||
36 | switch (idsel) { | ||
37 | case 1: | ||
38 | switch (pin) { | ||
39 | case 1: return ATUX_INTB; | ||
40 | case 2: return ATUX_INTC; | ||
41 | case 3: return ATUX_INTD; | ||
42 | case 4: return ATUX_INTA; | ||
43 | default: return -1; | ||
44 | } | ||
45 | case 2: | ||
46 | switch (pin) { | ||
47 | case 1: return ATUX_INTC; | ||
48 | case 2: return ATUX_INTC; | ||
49 | case 3: return ATUX_INTC; | ||
50 | case 4: return ATUX_INTC; | ||
51 | default: return -1; | ||
52 | } | ||
53 | default: return -1; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | static struct hw_pci iq81340sc_pci __initdata = { | ||
58 | .swizzle = pci_std_swizzle, | ||
59 | .nr_controllers = 0, | ||
60 | .setup = iop13xx_pci_setup, | ||
61 | .scan = iop13xx_scan_bus, | ||
62 | .map_irq = iq81340sc_atux_map_irq, | ||
63 | .preinit = iop13xx_pci_init | ||
64 | }; | ||
65 | |||
66 | static int __init iq81340sc_pci_init(void) | ||
67 | { | ||
68 | iop13xx_atu_select(&iq81340sc_pci); | ||
69 | pci_common_init(&iq81340sc_pci); | ||
70 | iop13xx_map_pci_memory(); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static void __init iq81340sc_init(void) | ||
76 | { | ||
77 | iop13xx_platform_init(); | ||
78 | iq81340sc_pci_init(); | ||
79 | } | ||
80 | |||
81 | static void __init iq81340sc_timer_init(void) | ||
82 | { | ||
83 | iop13xx_init_time(400000000); | ||
84 | } | ||
85 | |||
86 | static struct sys_timer iq81340sc_timer = { | ||
87 | .init = iq81340sc_timer_init, | ||
88 | .offset = iop13xx_gettimeoffset, | ||
89 | }; | ||
90 | |||
91 | MACHINE_START(IQ81340SC, "Intel IQ81340SC") | ||
92 | /* Maintainer: Dan Williams <dan.j.williams@intel.com> */ | ||
93 | .phys_io = PHYS_IO, | ||
94 | .io_pg_offst = IO_PG_OFFSET, | ||
95 | .map_io = iop13xx_map_io, | ||
96 | .init_irq = iop13xx_init_irq, | ||
97 | .timer = &iq81340sc_timer, | ||
98 | .boot_params = BOOT_PARAM_OFFSET, | ||
99 | .init_machine = iq81340sc_init, | ||
100 | MACHINE_END | ||
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c new file mode 100644 index 000000000000..c4d9c8c5579c --- /dev/null +++ b/arch/arm/mach-iop13xx/irq.c | |||
@@ -0,0 +1,286 @@ | |||
1 | /* | ||
2 | * iop13xx IRQ handling / support functions | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/list.h> | ||
22 | #include <linux/sysctl.h> | ||
23 | #include <asm/uaccess.h> | ||
24 | #include <asm/mach/irq.h> | ||
25 | #include <asm/irq.h> | ||
26 | #include <asm/hardware.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/arch/irqs.h> | ||
29 | |||
30 | /* INTCTL0 CP6 R0 Page 4 | ||
31 | */ | ||
32 | static inline u32 read_intctl_0(void) | ||
33 | { | ||
34 | u32 val; | ||
35 | asm volatile("mrc p6, 0, %0, c0, c4, 0":"=r" (val)); | ||
36 | return val; | ||
37 | } | ||
38 | static inline void write_intctl_0(u32 val) | ||
39 | { | ||
40 | asm volatile("mcr p6, 0, %0, c0, c4, 0"::"r" (val)); | ||
41 | } | ||
42 | |||
43 | /* INTCTL1 CP6 R1 Page 4 | ||
44 | */ | ||
45 | static inline u32 read_intctl_1(void) | ||
46 | { | ||
47 | u32 val; | ||
48 | asm volatile("mrc p6, 0, %0, c1, c4, 0":"=r" (val)); | ||
49 | return val; | ||
50 | } | ||
51 | static inline void write_intctl_1(u32 val) | ||
52 | { | ||
53 | asm volatile("mcr p6, 0, %0, c1, c4, 0"::"r" (val)); | ||
54 | } | ||
55 | |||
56 | /* INTCTL2 CP6 R2 Page 4 | ||
57 | */ | ||
58 | static inline u32 read_intctl_2(void) | ||
59 | { | ||
60 | u32 val; | ||
61 | asm volatile("mrc p6, 0, %0, c2, c4, 0":"=r" (val)); | ||
62 | return val; | ||
63 | } | ||
64 | static inline void write_intctl_2(u32 val) | ||
65 | { | ||
66 | asm volatile("mcr p6, 0, %0, c2, c4, 0"::"r" (val)); | ||
67 | } | ||
68 | |||
69 | /* INTCTL3 CP6 R3 Page 4 | ||
70 | */ | ||
71 | static inline u32 read_intctl_3(void) | ||
72 | { | ||
73 | u32 val; | ||
74 | asm volatile("mrc p6, 0, %0, c3, c4, 0":"=r" (val)); | ||
75 | return val; | ||
76 | } | ||
77 | static inline void write_intctl_3(u32 val) | ||
78 | { | ||
79 | asm volatile("mcr p6, 0, %0, c3, c4, 0"::"r" (val)); | ||
80 | } | ||
81 | |||
82 | /* INTSTR0 CP6 R0 Page 5 | ||
83 | */ | ||
84 | static inline u32 read_intstr_0(void) | ||
85 | { | ||
86 | u32 val; | ||
87 | asm volatile("mrc p6, 0, %0, c0, c5, 0":"=r" (val)); | ||
88 | return val; | ||
89 | } | ||
90 | static inline void write_intstr_0(u32 val) | ||
91 | { | ||
92 | asm volatile("mcr p6, 0, %0, c0, c5, 0"::"r" (val)); | ||
93 | } | ||
94 | |||
95 | /* INTSTR1 CP6 R1 Page 5 | ||
96 | */ | ||
97 | static inline u32 read_intstr_1(void) | ||
98 | { | ||
99 | u32 val; | ||
100 | asm volatile("mrc p6, 0, %0, c1, c5, 0":"=r" (val)); | ||
101 | return val; | ||
102 | } | ||
103 | static void write_intstr_1(u32 val) | ||
104 | { | ||
105 | asm volatile("mcr p6, 0, %0, c1, c5, 0"::"r" (val)); | ||
106 | } | ||
107 | |||
108 | /* INTSTR2 CP6 R2 Page 5 | ||
109 | */ | ||
110 | static inline u32 read_intstr_2(void) | ||
111 | { | ||
112 | u32 val; | ||
113 | asm volatile("mrc p6, 0, %0, c2, c5, 0":"=r" (val)); | ||
114 | return val; | ||
115 | } | ||
116 | static void write_intstr_2(u32 val) | ||
117 | { | ||
118 | asm volatile("mcr p6, 0, %0, c2, c5, 0"::"r" (val)); | ||
119 | } | ||
120 | |||
121 | /* INTSTR3 CP6 R3 Page 5 | ||
122 | */ | ||
123 | static inline u32 read_intstr_3(void) | ||
124 | { | ||
125 | u32 val; | ||
126 | asm volatile("mrc p6, 0, %0, c3, c5, 0":"=r" (val)); | ||
127 | return val; | ||
128 | } | ||
129 | static void write_intstr_3(u32 val) | ||
130 | { | ||
131 | asm volatile("mcr p6, 0, %0, c3, c5, 0"::"r" (val)); | ||
132 | } | ||
133 | |||
134 | /* INTBASE CP6 R0 Page 2 | ||
135 | */ | ||
136 | static inline u32 read_intbase(void) | ||
137 | { | ||
138 | u32 val; | ||
139 | asm volatile("mrc p6, 0, %0, c0, c2, 0":"=r" (val)); | ||
140 | return val; | ||
141 | } | ||
142 | static void write_intbase(u32 val) | ||
143 | { | ||
144 | asm volatile("mcr p6, 0, %0, c0, c2, 0"::"r" (val)); | ||
145 | } | ||
146 | |||
147 | /* INTSIZE CP6 R2 Page 2 | ||
148 | */ | ||
149 | static inline u32 read_intsize(void) | ||
150 | { | ||
151 | u32 val; | ||
152 | asm volatile("mrc p6, 0, %0, c2, c2, 0":"=r" (val)); | ||
153 | return val; | ||
154 | } | ||
155 | static void write_intsize(u32 val) | ||
156 | { | ||
157 | asm volatile("mcr p6, 0, %0, c2, c2, 0"::"r" (val)); | ||
158 | } | ||
159 | |||
160 | /* 0 = Interrupt Masked and 1 = Interrupt not masked */ | ||
161 | static void | ||
162 | iop13xx_irq_mask0 (unsigned int irq) | ||
163 | { | ||
164 | u32 cp_flags = iop13xx_cp6_save(); | ||
165 | write_intctl_0(read_intctl_0() & ~(1 << (irq - 0))); | ||
166 | iop13xx_cp6_restore(cp_flags); | ||
167 | } | ||
168 | |||
169 | static void | ||
170 | iop13xx_irq_mask1 (unsigned int irq) | ||
171 | { | ||
172 | u32 cp_flags = iop13xx_cp6_save(); | ||
173 | write_intctl_1(read_intctl_1() & ~(1 << (irq - 32))); | ||
174 | iop13xx_cp6_restore(cp_flags); | ||
175 | } | ||
176 | |||
177 | static void | ||
178 | iop13xx_irq_mask2 (unsigned int irq) | ||
179 | { | ||
180 | u32 cp_flags = iop13xx_cp6_save(); | ||
181 | write_intctl_2(read_intctl_2() & ~(1 << (irq - 64))); | ||
182 | iop13xx_cp6_restore(cp_flags); | ||
183 | } | ||
184 | |||
185 | static void | ||
186 | iop13xx_irq_mask3 (unsigned int irq) | ||
187 | { | ||
188 | u32 cp_flags = iop13xx_cp6_save(); | ||
189 | write_intctl_3(read_intctl_3() & ~(1 << (irq - 96))); | ||
190 | iop13xx_cp6_restore(cp_flags); | ||
191 | } | ||
192 | |||
193 | static void | ||
194 | iop13xx_irq_unmask0(unsigned int irq) | ||
195 | { | ||
196 | u32 cp_flags = iop13xx_cp6_save(); | ||
197 | write_intctl_0(read_intctl_0() | (1 << (irq - 0))); | ||
198 | iop13xx_cp6_restore(cp_flags); | ||
199 | } | ||
200 | |||
201 | static void | ||
202 | iop13xx_irq_unmask1(unsigned int irq) | ||
203 | { | ||
204 | u32 cp_flags = iop13xx_cp6_save(); | ||
205 | write_intctl_1(read_intctl_1() | (1 << (irq - 32))); | ||
206 | iop13xx_cp6_restore(cp_flags); | ||
207 | } | ||
208 | |||
209 | static void | ||
210 | iop13xx_irq_unmask2(unsigned int irq) | ||
211 | { | ||
212 | u32 cp_flags = iop13xx_cp6_save(); | ||
213 | write_intctl_2(read_intctl_2() | (1 << (irq - 64))); | ||
214 | iop13xx_cp6_restore(cp_flags); | ||
215 | } | ||
216 | |||
217 | static void | ||
218 | iop13xx_irq_unmask3(unsigned int irq) | ||
219 | { | ||
220 | u32 cp_flags = iop13xx_cp6_save(); | ||
221 | write_intctl_3(read_intctl_3() | (1 << (irq - 96))); | ||
222 | iop13xx_cp6_restore(cp_flags); | ||
223 | } | ||
224 | |||
225 | static struct irqchip iop13xx_irqchip0 = { | ||
226 | .ack = iop13xx_irq_mask0, | ||
227 | .mask = iop13xx_irq_mask0, | ||
228 | .unmask = iop13xx_irq_unmask0, | ||
229 | }; | ||
230 | |||
231 | static struct irqchip iop13xx_irqchip1 = { | ||
232 | .ack = iop13xx_irq_mask1, | ||
233 | .mask = iop13xx_irq_mask1, | ||
234 | .unmask = iop13xx_irq_unmask1, | ||
235 | }; | ||
236 | |||
237 | static struct irqchip iop13xx_irqchip2 = { | ||
238 | .ack = iop13xx_irq_mask2, | ||
239 | .mask = iop13xx_irq_mask2, | ||
240 | .unmask = iop13xx_irq_unmask2, | ||
241 | }; | ||
242 | |||
243 | static struct irqchip iop13xx_irqchip3 = { | ||
244 | .ack = iop13xx_irq_mask3, | ||
245 | .mask = iop13xx_irq_mask3, | ||
246 | .unmask = iop13xx_irq_unmask3, | ||
247 | }; | ||
248 | |||
249 | void __init iop13xx_init_irq(void) | ||
250 | { | ||
251 | unsigned int i; | ||
252 | |||
253 | u32 cp_flags = iop13xx_cp6_save(); | ||
254 | |||
255 | /* disable all interrupts */ | ||
256 | write_intctl_0(0); | ||
257 | write_intctl_1(0); | ||
258 | write_intctl_2(0); | ||
259 | write_intctl_3(0); | ||
260 | |||
261 | /* treat all as IRQ */ | ||
262 | write_intstr_0(0); | ||
263 | write_intstr_1(0); | ||
264 | write_intstr_2(0); | ||
265 | write_intstr_3(0); | ||
266 | |||
267 | /* initialize the interrupt vector generator */ | ||
268 | write_intbase(INTBASE); | ||
269 | write_intsize(INTSIZE_4); | ||
270 | |||
271 | for(i = 0; i < NR_IOP13XX_IRQS; i++) { | ||
272 | if (i < 32) | ||
273 | set_irq_chip(i, &iop13xx_irqchip0); | ||
274 | else if (i < 64) | ||
275 | set_irq_chip(i, &iop13xx_irqchip1); | ||
276 | else if (i < 96) | ||
277 | set_irq_chip(i, &iop13xx_irqchip2); | ||
278 | else | ||
279 | set_irq_chip(i, &iop13xx_irqchip3); | ||
280 | |||
281 | set_irq_handler(i, do_level_IRQ); | ||
282 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | ||
283 | } | ||
284 | |||
285 | iop13xx_cp6_restore(cp_flags); | ||
286 | } | ||
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c new file mode 100644 index 000000000000..89ec70ea3187 --- /dev/null +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -0,0 +1,1113 @@ | |||
1 | /* | ||
2 | * iop13xx PCI support | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #include <linux/pci.h> | ||
21 | #include <linux/delay.h> | ||
22 | |||
23 | #include <asm/irq.h> | ||
24 | #include <asm/hardware.h> | ||
25 | #include <asm/sizes.h> | ||
26 | #include <asm/mach/pci.h> | ||
27 | #include <asm/arch/pci.h> | ||
28 | |||
29 | #define IOP13XX_PCI_DEBUG 0 | ||
30 | #define PRINTK(x...) ((void)(IOP13XX_PCI_DEBUG && printk(x))) | ||
31 | |||
32 | u32 iop13xx_atux_pmmr_offset; /* This offset can change based on strapping */ | ||
33 | u32 iop13xx_atue_pmmr_offset; /* This offset can change based on strapping */ | ||
34 | static struct pci_bus *pci_bus_atux = 0; | ||
35 | static struct pci_bus *pci_bus_atue = 0; | ||
36 | u32 iop13xx_atue_mem_base; | ||
37 | u32 iop13xx_atux_mem_base; | ||
38 | size_t iop13xx_atue_mem_size; | ||
39 | size_t iop13xx_atux_mem_size; | ||
40 | unsigned long iop13xx_pcibios_min_io = 0; | ||
41 | unsigned long iop13xx_pcibios_min_mem = 0; | ||
42 | |||
43 | EXPORT_SYMBOL(iop13xx_atue_mem_base); | ||
44 | EXPORT_SYMBOL(iop13xx_atux_mem_base); | ||
45 | EXPORT_SYMBOL(iop13xx_atue_mem_size); | ||
46 | EXPORT_SYMBOL(iop13xx_atux_mem_size); | ||
47 | |||
48 | int init_atu = 0; /* Flag to select which ATU(s) to initialize / disable */ | ||
49 | static unsigned long atux_trhfa_timeout = 0; /* Trhfa = RST# high to first | ||
50 | access */ | ||
51 | |||
52 | /* Scan the initialized busses and ioremap the requested memory range | ||
53 | */ | ||
54 | void iop13xx_map_pci_memory(void) | ||
55 | { | ||
56 | int atu; | ||
57 | struct pci_bus *bus; | ||
58 | struct pci_dev *dev; | ||
59 | resource_size_t end = 0; | ||
60 | |||
61 | for (atu = 0; atu < 2; atu++) { | ||
62 | bus = atu ? pci_bus_atue : pci_bus_atux; | ||
63 | if (bus) { | ||
64 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
65 | int i; | ||
66 | int max = 7; | ||
67 | |||
68 | if (dev->subordinate) | ||
69 | max = DEVICE_COUNT_RESOURCE; | ||
70 | |||
71 | for (i = 0; i < max; i++) { | ||
72 | struct resource *res = &dev->resource[i]; | ||
73 | if (res->flags & IORESOURCE_MEM) | ||
74 | end = max(res->end, end); | ||
75 | } | ||
76 | } | ||
77 | |||
78 | switch(atu) { | ||
79 | case 0: | ||
80 | iop13xx_atux_mem_size = | ||
81 | (end - IOP13XX_PCIX_LOWER_MEM_RA) + 1; | ||
82 | |||
83 | /* 16MB align the request */ | ||
84 | if (iop13xx_atux_mem_size & (SZ_16M - 1)) { | ||
85 | iop13xx_atux_mem_size &= ~(SZ_16M - 1); | ||
86 | iop13xx_atux_mem_size += SZ_16M; | ||
87 | } | ||
88 | |||
89 | if (end) { | ||
90 | iop13xx_atux_mem_base = | ||
91 | (u32) __ioremap_pfn( | ||
92 | __phys_to_pfn(IOP13XX_PCIX_LOWER_MEM_PA) | ||
93 | , 0, iop13xx_atux_mem_size, 0); | ||
94 | if (!iop13xx_atux_mem_base) { | ||
95 | printk("%s: atux allocation " | ||
96 | "failed\n", __FUNCTION__); | ||
97 | BUG(); | ||
98 | } | ||
99 | } else | ||
100 | iop13xx_atux_mem_size = 0; | ||
101 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", | ||
102 | __FUNCTION__, atu, iop13xx_atux_mem_size, | ||
103 | iop13xx_atux_mem_base); | ||
104 | break; | ||
105 | case 1: | ||
106 | iop13xx_atue_mem_size = | ||
107 | (end - IOP13XX_PCIE_LOWER_MEM_RA) + 1; | ||
108 | |||
109 | /* 16MB align the request */ | ||
110 | if (iop13xx_atue_mem_size & (SZ_16M - 1)) { | ||
111 | iop13xx_atue_mem_size &= ~(SZ_16M - 1); | ||
112 | iop13xx_atue_mem_size += SZ_16M; | ||
113 | } | ||
114 | |||
115 | if (end) { | ||
116 | iop13xx_atue_mem_base = | ||
117 | (u32) __ioremap_pfn( | ||
118 | __phys_to_pfn(IOP13XX_PCIE_LOWER_MEM_PA) | ||
119 | , 0, iop13xx_atue_mem_size, 0); | ||
120 | if (!iop13xx_atue_mem_base) { | ||
121 | printk("%s: atue allocation " | ||
122 | "failed\n", __FUNCTION__); | ||
123 | BUG(); | ||
124 | } | ||
125 | } else | ||
126 | iop13xx_atue_mem_size = 0; | ||
127 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", | ||
128 | __FUNCTION__, atu, iop13xx_atue_mem_size, | ||
129 | iop13xx_atue_mem_base); | ||
130 | break; | ||
131 | } | ||
132 | |||
133 | printk("%s: Initialized (%uM @ resource/virtual: %08lx/%08x)\n", | ||
134 | atu ? "ATUE" : "ATUX", | ||
135 | (atu ? iop13xx_atue_mem_size : iop13xx_atux_mem_size) / | ||
136 | SZ_1M, | ||
137 | atu ? IOP13XX_PCIE_LOWER_MEM_RA : | ||
138 | IOP13XX_PCIX_LOWER_MEM_RA, | ||
139 | atu ? iop13xx_atue_mem_base : | ||
140 | iop13xx_atux_mem_base); | ||
141 | end = 0; | ||
142 | } | ||
143 | |||
144 | } | ||
145 | } | ||
146 | |||
147 | static inline int iop13xx_atu_function(int atu) | ||
148 | { | ||
149 | int func = 0; | ||
150 | /* the function number depends on the value of the | ||
151 | * IOP13XX_INTERFACE_SEL_PCIX reset strap | ||
152 | * see C-Spec section 3.17 | ||
153 | */ | ||
154 | switch(atu) { | ||
155 | case IOP13XX_INIT_ATU_ATUX: | ||
156 | if (__raw_readl(IOP13XX_ESSR0) & IOP13XX_INTERFACE_SEL_PCIX) | ||
157 | func = 5; | ||
158 | else | ||
159 | func = 0; | ||
160 | break; | ||
161 | case IOP13XX_INIT_ATU_ATUE: | ||
162 | if (__raw_readl(IOP13XX_ESSR0) & IOP13XX_INTERFACE_SEL_PCIX) | ||
163 | func = 0; | ||
164 | else | ||
165 | func = 5; | ||
166 | break; | ||
167 | default: | ||
168 | BUG(); | ||
169 | } | ||
170 | |||
171 | return func; | ||
172 | } | ||
173 | |||
174 | /* iop13xx_atux_cfg_address - format a configuration address for atux | ||
175 | * @bus: Target bus to access | ||
176 | * @devfn: Combined device number and function number | ||
177 | * @where: Desired register's address offset | ||
178 | * | ||
179 | * Convert the parameters to a configuration address formatted | ||
180 | * according the PCI-X 2.0 specification | ||
181 | */ | ||
182 | static u32 iop13xx_atux_cfg_address(struct pci_bus *bus, int devfn, int where) | ||
183 | { | ||
184 | struct pci_sys_data *sys = bus->sysdata; | ||
185 | u32 addr; | ||
186 | |||
187 | if (sys->busnr == bus->number) | ||
188 | addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); | ||
189 | else | ||
190 | addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; | ||
191 | |||
192 | addr |= PCI_FUNC(devfn) << 8 | ((where & 0xff) & ~3); | ||
193 | addr |= ((where & 0xf00) >> 8) << 24; /* upper register number */ | ||
194 | |||
195 | return addr; | ||
196 | } | ||
197 | |||
198 | /* iop13xx_atue_cfg_address - format a configuration address for atue | ||
199 | * @bus: Target bus to access | ||
200 | * @devfn: Combined device number and function number | ||
201 | * @where: Desired register's address offset | ||
202 | * | ||
203 | * Convert the parameters to an address usable by the ATUE_OCCAR | ||
204 | */ | ||
205 | static u32 iop13xx_atue_cfg_address(struct pci_bus *bus, int devfn, int where) | ||
206 | { | ||
207 | struct pci_sys_data *sys = bus->sysdata; | ||
208 | u32 addr; | ||
209 | |||
210 | PRINTK("iop13xx_atue_cfg_address: bus: %d dev: %d func: %d", | ||
211 | bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
212 | addr = ((u32) bus->number) << IOP13XX_ATUE_OCCAR_BUS_NUM | | ||
213 | ((u32) PCI_SLOT(devfn)) << IOP13XX_ATUE_OCCAR_DEV_NUM | | ||
214 | ((u32) PCI_FUNC(devfn)) << IOP13XX_ATUE_OCCAR_FUNC_NUM | | ||
215 | (where & ~0x3); | ||
216 | |||
217 | if (sys->busnr != bus->number) | ||
218 | addr |= 1; /* type 1 access */ | ||
219 | |||
220 | return addr; | ||
221 | } | ||
222 | |||
223 | /* This routine checks the status of the last configuration cycle. If an error | ||
224 | * was detected it returns >0, else it returns a 0. The errors being checked | ||
225 | * are parity, master abort, target abort (master and target). These types of | ||
226 | * errors occure during a config cycle where there is no device, like during | ||
227 | * the discovery stage. | ||
228 | */ | ||
229 | static int iop13xx_atux_pci_status(int clear) | ||
230 | { | ||
231 | unsigned int status; | ||
232 | int err = 0; | ||
233 | |||
234 | /* | ||
235 | * Check the status registers. | ||
236 | */ | ||
237 | status = __raw_readw(IOP13XX_ATUX_ATUSR); | ||
238 | if (status & IOP_PCI_STATUS_ERROR) | ||
239 | { | ||
240 | PRINTK("\t\t\tPCI error: ATUSR %#08x", status); | ||
241 | if(clear) | ||
242 | __raw_writew(status & IOP_PCI_STATUS_ERROR, | ||
243 | IOP13XX_ATUX_ATUSR); | ||
244 | err = 1; | ||
245 | } | ||
246 | status = __raw_readl(IOP13XX_ATUX_ATUISR); | ||
247 | if (status & IOP13XX_ATUX_ATUISR_ERROR) | ||
248 | { | ||
249 | PRINTK("\t\t\tPCI error interrupt: ATUISR %#08x", status); | ||
250 | if(clear) | ||
251 | __raw_writel(status & IOP13XX_ATUX_ATUISR_ERROR, | ||
252 | IOP13XX_ATUX_ATUISR); | ||
253 | err = 1; | ||
254 | } | ||
255 | return err; | ||
256 | } | ||
257 | |||
258 | /* Simply write the address register and read the configuration | ||
259 | * data. Note that the data dependency on %0 encourages an abort | ||
260 | * to be detected before we return. | ||
261 | */ | ||
262 | static inline u32 iop13xx_atux_read(unsigned long addr) | ||
263 | { | ||
264 | u32 val; | ||
265 | |||
266 | __asm__ __volatile__( | ||
267 | "str %1, [%2]\n\t" | ||
268 | "ldr %0, [%3]\n\t" | ||
269 | "mov %0, %0\n\t" | ||
270 | : "=r" (val) | ||
271 | : "r" (addr), "r" (IOP13XX_ATUX_OCCAR), "r" (IOP13XX_ATUX_OCCDR)); | ||
272 | |||
273 | return val; | ||
274 | } | ||
275 | |||
276 | /* The read routines must check the error status of the last configuration | ||
277 | * cycle. If there was an error, the routine returns all hex f's. | ||
278 | */ | ||
279 | static int | ||
280 | iop13xx_atux_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
281 | int size, u32 *value) | ||
282 | { | ||
283 | unsigned long addr = iop13xx_atux_cfg_address(bus, devfn, where); | ||
284 | u32 val = iop13xx_atux_read(addr) >> ((where & 3) * 8); | ||
285 | |||
286 | if (iop13xx_atux_pci_status(1) || is_atux_occdr_error()) { | ||
287 | __raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, | ||
288 | IOP13XX_XBG_BECSR); | ||
289 | val = 0xffffffff; | ||
290 | } | ||
291 | |||
292 | *value = val; | ||
293 | |||
294 | return PCIBIOS_SUCCESSFUL; | ||
295 | } | ||
296 | |||
297 | static int | ||
298 | iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
299 | int size, u32 value) | ||
300 | { | ||
301 | unsigned long addr = iop13xx_atux_cfg_address(bus, devfn, where); | ||
302 | u32 val; | ||
303 | |||
304 | if (size != 4) { | ||
305 | val = iop13xx_atux_read(addr); | ||
306 | if (!iop13xx_atux_pci_status(1) == 0) | ||
307 | return PCIBIOS_SUCCESSFUL; | ||
308 | |||
309 | where = (where & 3) * 8; | ||
310 | |||
311 | if (size == 1) | ||
312 | val &= ~(0xff << where); | ||
313 | else | ||
314 | val &= ~(0xffff << where); | ||
315 | |||
316 | __raw_writel(val | value << where, IOP13XX_ATUX_OCCDR); | ||
317 | } else { | ||
318 | __raw_writel(addr, IOP13XX_ATUX_OCCAR); | ||
319 | __raw_writel(value, IOP13XX_ATUX_OCCDR); | ||
320 | } | ||
321 | |||
322 | return PCIBIOS_SUCCESSFUL; | ||
323 | } | ||
324 | |||
325 | static struct pci_ops iop13xx_atux_ops = { | ||
326 | .read = iop13xx_atux_read_config, | ||
327 | .write = iop13xx_atux_write_config, | ||
328 | }; | ||
329 | |||
330 | /* This routine checks the status of the last configuration cycle. If an error | ||
331 | * was detected it returns >0, else it returns a 0. The errors being checked | ||
332 | * are parity, master abort, target abort (master and target). These types of | ||
333 | * errors occure during a config cycle where there is no device, like during | ||
334 | * the discovery stage. | ||
335 | */ | ||
336 | static int iop13xx_atue_pci_status(int clear) | ||
337 | { | ||
338 | unsigned int status; | ||
339 | int err = 0; | ||
340 | |||
341 | /* | ||
342 | * Check the status registers. | ||
343 | */ | ||
344 | |||
345 | /* standard pci status register */ | ||
346 | status = __raw_readw(IOP13XX_ATUE_ATUSR); | ||
347 | if (status & IOP_PCI_STATUS_ERROR) { | ||
348 | PRINTK("\t\t\tPCI error: ATUSR %#08x", status); | ||
349 | if(clear) | ||
350 | __raw_writew(status & IOP_PCI_STATUS_ERROR, | ||
351 | IOP13XX_ATUE_ATUSR); | ||
352 | err++; | ||
353 | } | ||
354 | |||
355 | /* check the normal status bits in the ATUISR */ | ||
356 | status = __raw_readl(IOP13XX_ATUE_ATUISR); | ||
357 | if (status & IOP13XX_ATUE_ATUISR_ERROR) { | ||
358 | PRINTK("\t\t\tPCI error: ATUISR %#08x", status); | ||
359 | if (clear) | ||
360 | __raw_writew(status & IOP13XX_ATUE_ATUISR_ERROR, | ||
361 | IOP13XX_ATUE_ATUISR); | ||
362 | err++; | ||
363 | |||
364 | /* check the PCI-E status if the ATUISR reports an interface error */ | ||
365 | if (status & IOP13XX_ATUE_STAT_PCI_IFACE_ERR) { | ||
366 | /* get the unmasked errors */ | ||
367 | status = __raw_readl(IOP13XX_ATUE_PIE_STS) & | ||
368 | ~(__raw_readl(IOP13XX_ATUE_PIE_MSK)); | ||
369 | |||
370 | if (status) { | ||
371 | PRINTK("\t\t\tPCI-E error: ATUE_PIE_STS %#08x", | ||
372 | __raw_readl(IOP13XX_ATUE_PIE_STS)); | ||
373 | err++; | ||
374 | } else { | ||
375 | PRINTK("\t\t\tPCI-E error: ATUE_PIE_STS %#08x", | ||
376 | __raw_readl(IOP13XX_ATUE_PIE_STS)); | ||
377 | PRINTK("\t\t\tPCI-E error: ATUE_PIE_MSK %#08x", | ||
378 | __raw_readl(IOP13XX_ATUE_PIE_MSK)); | ||
379 | BUG(); | ||
380 | } | ||
381 | |||
382 | if(clear) | ||
383 | __raw_writel(status, IOP13XX_ATUE_PIE_STS); | ||
384 | } | ||
385 | } | ||
386 | |||
387 | return err; | ||
388 | } | ||
389 | |||
390 | static inline int __init | ||
391 | iop13xx_pcie_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | ||
392 | { | ||
393 | WARN_ON(idsel != 0); | ||
394 | |||
395 | switch (pin) { | ||
396 | case 1: return ATUE_INTA; | ||
397 | case 2: return ATUE_INTB; | ||
398 | case 3: return ATUE_INTC; | ||
399 | case 4: return ATUE_INTD; | ||
400 | default: return -1; | ||
401 | } | ||
402 | } | ||
403 | |||
404 | static inline u32 iop13xx_atue_read(unsigned long addr) | ||
405 | { | ||
406 | u32 val; | ||
407 | |||
408 | __raw_writel(addr, IOP13XX_ATUE_OCCAR); | ||
409 | val = __raw_readl(IOP13XX_ATUE_OCCDR); | ||
410 | |||
411 | rmb(); | ||
412 | |||
413 | return val; | ||
414 | } | ||
415 | |||
416 | /* The read routines must check the error status of the last configuration | ||
417 | * cycle. If there was an error, the routine returns all hex f's. | ||
418 | */ | ||
419 | static int | ||
420 | iop13xx_atue_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
421 | int size, u32 *value) | ||
422 | { | ||
423 | u32 val; | ||
424 | unsigned long addr = iop13xx_atue_cfg_address(bus, devfn, where); | ||
425 | |||
426 | /* Hide device numbers > 0 on the local PCI-E bus (Type 0 access) */ | ||
427 | if (!PCI_SLOT(devfn) || (addr & 1)) { | ||
428 | val = iop13xx_atue_read(addr) >> ((where & 3) * 8); | ||
429 | if( iop13xx_atue_pci_status(1) || is_atue_occdr_error() ) { | ||
430 | __raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, | ||
431 | IOP13XX_XBG_BECSR); | ||
432 | val = 0xffffffff; | ||
433 | } | ||
434 | |||
435 | PRINTK("addr=%#0lx, val=%#010x", addr, val); | ||
436 | } else | ||
437 | val = 0xffffffff; | ||
438 | |||
439 | *value = val; | ||
440 | |||
441 | return PCIBIOS_SUCCESSFUL; | ||
442 | } | ||
443 | |||
444 | static int | ||
445 | iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
446 | int size, u32 value) | ||
447 | { | ||
448 | unsigned long addr = iop13xx_atue_cfg_address(bus, devfn, where); | ||
449 | u32 val; | ||
450 | |||
451 | if (size != 4) { | ||
452 | val = iop13xx_atue_read(addr); | ||
453 | if (!iop13xx_atue_pci_status(1) == 0) | ||
454 | return PCIBIOS_SUCCESSFUL; | ||
455 | |||
456 | where = (where & 3) * 8; | ||
457 | |||
458 | if (size == 1) | ||
459 | val &= ~(0xff << where); | ||
460 | else | ||
461 | val &= ~(0xffff << where); | ||
462 | |||
463 | __raw_writel(val | value << where, IOP13XX_ATUE_OCCDR); | ||
464 | } else { | ||
465 | __raw_writel(addr, IOP13XX_ATUE_OCCAR); | ||
466 | __raw_writel(value, IOP13XX_ATUE_OCCDR); | ||
467 | } | ||
468 | |||
469 | return PCIBIOS_SUCCESSFUL; | ||
470 | } | ||
471 | |||
472 | static struct pci_ops iop13xx_atue_ops = { | ||
473 | .read = iop13xx_atue_read_config, | ||
474 | .write = iop13xx_atue_write_config, | ||
475 | }; | ||
476 | |||
477 | /* When a PCI device does not exist during config cycles, the XScale gets a | ||
478 | * bus error instead of returning 0xffffffff. We can't rely on the ATU status | ||
479 | * bits to tell us that it was indeed a configuration cycle that caused this | ||
480 | * error especially in the case when the ATUE link is down. Instead we rely | ||
481 | * on data from the south XSI bridge to validate the abort | ||
482 | */ | ||
483 | int | ||
484 | iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
485 | { | ||
486 | PRINTK("Data abort: address = 0x%08lx " | ||
487 | "fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx", | ||
488 | addr, fsr, regs->ARM_pc, regs->ARM_lr); | ||
489 | |||
490 | PRINTK("IOP13XX_XBG_BECSR: %#10x", __raw_readl(IOP13XX_XBG_BECSR)); | ||
491 | PRINTK("IOP13XX_XBG_BERAR: %#10x", __raw_readl(IOP13XX_XBG_BERAR)); | ||
492 | PRINTK("IOP13XX_XBG_BERUAR: %#10x", __raw_readl(IOP13XX_XBG_BERUAR)); | ||
493 | |||
494 | /* If it was an imprecise abort, then we need to correct the | ||
495 | * return address to be _after_ the instruction. | ||
496 | */ | ||
497 | if (fsr & (1 << 10)) | ||
498 | regs->ARM_pc += 4; | ||
499 | |||
500 | if (is_atue_occdr_error() || is_atux_occdr_error()) | ||
501 | return 0; | ||
502 | else | ||
503 | return 1; | ||
504 | } | ||
505 | |||
506 | /* Scan an IOP13XX PCI bus. nr selects which ATU we use. | ||
507 | */ | ||
508 | struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys) | ||
509 | { | ||
510 | int which_atu; | ||
511 | struct pci_bus *bus = NULL; | ||
512 | |||
513 | switch (init_atu) { | ||
514 | case IOP13XX_INIT_ATU_ATUX: | ||
515 | which_atu = nr ? 0 : IOP13XX_INIT_ATU_ATUX; | ||
516 | break; | ||
517 | case IOP13XX_INIT_ATU_ATUE: | ||
518 | which_atu = nr ? 0 : IOP13XX_INIT_ATU_ATUE; | ||
519 | break; | ||
520 | case (IOP13XX_INIT_ATU_ATUX | IOP13XX_INIT_ATU_ATUE): | ||
521 | which_atu = nr ? IOP13XX_INIT_ATU_ATUE : IOP13XX_INIT_ATU_ATUX; | ||
522 | break; | ||
523 | default: | ||
524 | which_atu = 0; | ||
525 | } | ||
526 | |||
527 | if (!which_atu) { | ||
528 | BUG(); | ||
529 | return NULL; | ||
530 | } | ||
531 | |||
532 | switch (which_atu) { | ||
533 | case IOP13XX_INIT_ATU_ATUX: | ||
534 | if (time_after_eq(jiffies + msecs_to_jiffies(1000), | ||
535 | atux_trhfa_timeout)) /* ensure not wrap */ | ||
536 | while(time_before(jiffies, atux_trhfa_timeout)) | ||
537 | udelay(100); | ||
538 | |||
539 | bus = pci_bus_atux = pci_scan_bus(sys->busnr, | ||
540 | &iop13xx_atux_ops, | ||
541 | sys); | ||
542 | break; | ||
543 | case IOP13XX_INIT_ATU_ATUE: | ||
544 | bus = pci_bus_atue = pci_scan_bus(sys->busnr, | ||
545 | &iop13xx_atue_ops, | ||
546 | sys); | ||
547 | break; | ||
548 | } | ||
549 | |||
550 | return bus; | ||
551 | } | ||
552 | |||
553 | /* This function is called from iop13xx_pci_init() after assigning valid | ||
554 | * values to iop13xx_atue_pmmr_offset. This is the location for common | ||
555 | * setup of ATUE for all IOP13XX implementations. | ||
556 | */ | ||
557 | void __init iop13xx_atue_setup(void) | ||
558 | { | ||
559 | int func = iop13xx_atu_function(IOP13XX_INIT_ATU_ATUE); | ||
560 | u32 reg_val; | ||
561 | |||
562 | /* BAR 1 (1:1 mapping with Physical RAM) */ | ||
563 | /* Set limit and enable */ | ||
564 | __raw_writel(~(IOP13XX_MAX_RAM_SIZE - PHYS_OFFSET - 1) & ~0x1, | ||
565 | IOP13XX_ATUE_IALR1); | ||
566 | __raw_writel(0x0, IOP13XX_ATUE_IAUBAR1); | ||
567 | |||
568 | /* Set base at the top of the reserved address space */ | ||
569 | __raw_writel(PHYS_OFFSET | PCI_BASE_ADDRESS_MEM_TYPE_64 | | ||
570 | PCI_BASE_ADDRESS_MEM_PREFETCH, IOP13XX_ATUE_IABAR1); | ||
571 | |||
572 | /* 1:1 mapping with physical ram | ||
573 | * (leave big endian byte swap disabled) | ||
574 | */ | ||
575 | __raw_writel(0x0, IOP13XX_ATUE_IAUTVR1); | ||
576 | __raw_writel(PHYS_OFFSET, IOP13XX_ATUE_IATVR1); | ||
577 | |||
578 | /* Outbound window 1 (PCIX/PCIE memory window) */ | ||
579 | /* 32 bit Address Space */ | ||
580 | __raw_writel(0x0, IOP13XX_ATUE_OUMWTVR1); | ||
581 | /* PA[35:32] */ | ||
582 | __raw_writel(IOP13XX_ATUE_OUMBAR_ENABLE | | ||
583 | (IOP13XX_PCIE_MEM_PHYS_OFFSET >> 32), | ||
584 | IOP13XX_ATUE_OUMBAR1); | ||
585 | |||
586 | /* Setup the I/O Bar | ||
587 | * A[35-16] in 31-12 | ||
588 | */ | ||
589 | __raw_writel(((IOP13XX_PCIE_LOWER_IO_PA >> 0x4) & 0xfffff000), | ||
590 | IOP13XX_ATUE_OIOBAR); | ||
591 | __raw_writel(IOP13XX_PCIE_LOWER_IO_BA, IOP13XX_ATUE_OIOWTVR); | ||
592 | |||
593 | /* clear startup errors */ | ||
594 | iop13xx_atue_pci_status(1); | ||
595 | |||
596 | /* OIOBAR function number | ||
597 | */ | ||
598 | reg_val = __raw_readl(IOP13XX_ATUE_OIOBAR); | ||
599 | reg_val &= ~0x7; | ||
600 | reg_val |= func; | ||
601 | __raw_writel(reg_val, IOP13XX_ATUE_OIOBAR); | ||
602 | |||
603 | /* OUMBAR function numbers | ||
604 | */ | ||
605 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR0); | ||
606 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
607 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
608 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
609 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR0); | ||
610 | |||
611 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR1); | ||
612 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
613 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
614 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
615 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR1); | ||
616 | |||
617 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR2); | ||
618 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
619 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
620 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
621 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR2); | ||
622 | |||
623 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR3); | ||
624 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
625 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
626 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
627 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR3); | ||
628 | |||
629 | /* Enable inbound and outbound cycles | ||
630 | */ | ||
631 | reg_val = __raw_readw(IOP13XX_ATUE_ATUCMD); | ||
632 | reg_val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | | ||
633 | PCI_COMMAND_PARITY | PCI_COMMAND_SERR; | ||
634 | __raw_writew(reg_val, IOP13XX_ATUE_ATUCMD); | ||
635 | |||
636 | reg_val = __raw_readl(IOP13XX_ATUE_ATUCR); | ||
637 | reg_val |= IOP13XX_ATUE_ATUCR_OUT_EN | | ||
638 | IOP13XX_ATUE_ATUCR_IVM; | ||
639 | __raw_writel(reg_val, IOP13XX_ATUE_ATUCR); | ||
640 | } | ||
641 | |||
642 | void __init iop13xx_atue_disable(void) | ||
643 | { | ||
644 | u32 reg_val; | ||
645 | |||
646 | __raw_writew(0x0, IOP13XX_ATUE_ATUCMD); | ||
647 | __raw_writel(IOP13XX_ATUE_ATUCR_IVM, IOP13XX_ATUE_ATUCR); | ||
648 | |||
649 | /* wait for cycles to quiesce */ | ||
650 | while (__raw_readl(IOP13XX_ATUE_PCSR) & (IOP13XX_ATUE_PCSR_OUT_Q_BUSY | | ||
651 | IOP13XX_ATUE_PCSR_IN_Q_BUSY | | ||
652 | IOP13XX_ATUE_PCSR_LLRB_BUSY)) | ||
653 | cpu_relax(); | ||
654 | |||
655 | /* BAR 0 ( Disabled ) */ | ||
656 | __raw_writel(0x0, IOP13XX_ATUE_IAUBAR0); | ||
657 | __raw_writel(0x0, IOP13XX_ATUE_IABAR0); | ||
658 | __raw_writel(0x0, IOP13XX_ATUE_IAUTVR0); | ||
659 | __raw_writel(0x0, IOP13XX_ATUE_IATVR0); | ||
660 | __raw_writel(0x0, IOP13XX_ATUE_IALR0); | ||
661 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR0); | ||
662 | reg_val &= ~IOP13XX_ATUE_OUMBAR_ENABLE; | ||
663 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR0); | ||
664 | |||
665 | /* BAR 1 ( Disabled ) */ | ||
666 | __raw_writel(0x0, IOP13XX_ATUE_IAUBAR1); | ||
667 | __raw_writel(0x0, IOP13XX_ATUE_IABAR1); | ||
668 | __raw_writel(0x0, IOP13XX_ATUE_IAUTVR1); | ||
669 | __raw_writel(0x0, IOP13XX_ATUE_IATVR1); | ||
670 | __raw_writel(0x0, IOP13XX_ATUE_IALR1); | ||
671 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR1); | ||
672 | reg_val &= ~IOP13XX_ATUE_OUMBAR_ENABLE; | ||
673 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR1); | ||
674 | |||
675 | /* BAR 2 ( Disabled ) */ | ||
676 | __raw_writel(0x0, IOP13XX_ATUE_IAUBAR2); | ||
677 | __raw_writel(0x0, IOP13XX_ATUE_IABAR2); | ||
678 | __raw_writel(0x0, IOP13XX_ATUE_IAUTVR2); | ||
679 | __raw_writel(0x0, IOP13XX_ATUE_IATVR2); | ||
680 | __raw_writel(0x0, IOP13XX_ATUE_IALR2); | ||
681 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR2); | ||
682 | reg_val &= ~IOP13XX_ATUE_OUMBAR_ENABLE; | ||
683 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR2); | ||
684 | |||
685 | /* BAR 3 ( Disabled ) */ | ||
686 | reg_val = __raw_readl(IOP13XX_ATUE_OUMBAR3); | ||
687 | reg_val &= ~IOP13XX_ATUE_OUMBAR_ENABLE; | ||
688 | __raw_writel(reg_val, IOP13XX_ATUE_OUMBAR3); | ||
689 | |||
690 | /* Setup the I/O Bar | ||
691 | * A[35-16] in 31-12 | ||
692 | */ | ||
693 | __raw_writel((IOP13XX_PCIE_LOWER_IO_PA >> 0x4) & 0xfffff000, | ||
694 | IOP13XX_ATUE_OIOBAR); | ||
695 | __raw_writel(IOP13XX_PCIE_LOWER_IO_BA, IOP13XX_ATUE_OIOWTVR); | ||
696 | } | ||
697 | |||
698 | /* This function is called from iop13xx_pci_init() after assigning valid | ||
699 | * values to iop13xx_atux_pmmr_offset. This is the location for common | ||
700 | * setup of ATUX for all IOP13XX implementations. | ||
701 | */ | ||
702 | void __init iop13xx_atux_setup(void) | ||
703 | { | ||
704 | u32 reg_val; | ||
705 | int func = iop13xx_atu_function(IOP13XX_INIT_ATU_ATUX); | ||
706 | |||
707 | /* Take PCI-X bus out of reset if bootloader hasn't already. | ||
708 | * According to spec, we should wait for 2^25 PCI clocks to meet | ||
709 | * the PCI timing parameter Trhfa (RST# high to first access). | ||
710 | * This is rarely necessary and often ignored. | ||
711 | */ | ||
712 | reg_val = __raw_readl(IOP13XX_ATUX_PCSR); | ||
713 | if (reg_val & IOP13XX_ATUX_PCSR_P_RSTOUT) { | ||
714 | int msec = (reg_val >> IOP13XX_ATUX_PCSR_FREQ_OFFSET) & 0x7; | ||
715 | msec = 1000 / (8-msec); /* bits 100=133MHz, 111=>33MHz */ | ||
716 | __raw_writel(reg_val & ~IOP13XX_ATUX_PCSR_P_RSTOUT, | ||
717 | IOP13XX_ATUX_PCSR); | ||
718 | atux_trhfa_timeout = jiffies + msecs_to_jiffies(msec); | ||
719 | } | ||
720 | else | ||
721 | atux_trhfa_timeout = jiffies; | ||
722 | |||
723 | /* BAR 1 (1:1 mapping with Physical RAM) */ | ||
724 | /* Set limit and enable */ | ||
725 | __raw_writel(~(IOP13XX_MAX_RAM_SIZE - PHYS_OFFSET - 1) & ~0x1, | ||
726 | IOP13XX_ATUX_IALR1); | ||
727 | __raw_writel(0x0, IOP13XX_ATUX_IAUBAR1); | ||
728 | |||
729 | /* Set base at the top of the reserved address space */ | ||
730 | __raw_writel(PHYS_OFFSET | PCI_BASE_ADDRESS_MEM_TYPE_64 | | ||
731 | PCI_BASE_ADDRESS_MEM_PREFETCH, IOP13XX_ATUX_IABAR1); | ||
732 | |||
733 | /* 1:1 mapping with physical ram | ||
734 | * (leave big endian byte swap disabled) | ||
735 | */ | ||
736 | __raw_writel(0x0, IOP13XX_ATUX_IAUTVR1); | ||
737 | __raw_writel(PHYS_OFFSET, IOP13XX_ATUX_IATVR1); | ||
738 | |||
739 | /* Outbound window 1 (PCIX/PCIE memory window) */ | ||
740 | /* 32 bit Address Space */ | ||
741 | __raw_writel(0x0, IOP13XX_ATUX_OUMWTVR1); | ||
742 | /* PA[35:32] */ | ||
743 | __raw_writel(IOP13XX_ATUX_OUMBAR_ENABLE | | ||
744 | IOP13XX_PCIX_MEM_PHYS_OFFSET >> 32, | ||
745 | IOP13XX_ATUX_OUMBAR1); | ||
746 | |||
747 | /* Setup the I/O Bar | ||
748 | * A[35-16] in 31-12 | ||
749 | */ | ||
750 | __raw_writel((IOP13XX_PCIX_LOWER_IO_PA >> 0x4) & 0xfffff000, | ||
751 | IOP13XX_ATUX_OIOBAR); | ||
752 | __raw_writel(IOP13XX_PCIX_LOWER_IO_BA, IOP13XX_ATUX_OIOWTVR); | ||
753 | |||
754 | /* clear startup errors */ | ||
755 | iop13xx_atux_pci_status(1); | ||
756 | |||
757 | /* OIOBAR function number | ||
758 | */ | ||
759 | reg_val = __raw_readl(IOP13XX_ATUX_OIOBAR); | ||
760 | reg_val &= ~0x7; | ||
761 | reg_val |= func; | ||
762 | __raw_writel(reg_val, IOP13XX_ATUX_OIOBAR); | ||
763 | |||
764 | /* OUMBAR function numbers | ||
765 | */ | ||
766 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR0); | ||
767 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
768 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
769 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
770 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR0); | ||
771 | |||
772 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR1); | ||
773 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
774 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
775 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
776 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR1); | ||
777 | |||
778 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR2); | ||
779 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
780 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
781 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
782 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR2); | ||
783 | |||
784 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR3); | ||
785 | reg_val &= ~(IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK << | ||
786 | IOP13XX_ATU_OUMBAR_FUNC_NUM); | ||
787 | reg_val |= func << IOP13XX_ATU_OUMBAR_FUNC_NUM; | ||
788 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR3); | ||
789 | |||
790 | /* Enable inbound and outbound cycles | ||
791 | */ | ||
792 | reg_val = __raw_readw(IOP13XX_ATUX_ATUCMD); | ||
793 | reg_val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | | ||
794 | PCI_COMMAND_PARITY | PCI_COMMAND_SERR; | ||
795 | __raw_writew(reg_val, IOP13XX_ATUX_ATUCMD); | ||
796 | |||
797 | reg_val = __raw_readl(IOP13XX_ATUX_ATUCR); | ||
798 | reg_val |= IOP13XX_ATUX_ATUCR_OUT_EN; | ||
799 | __raw_writel(reg_val, IOP13XX_ATUX_ATUCR); | ||
800 | } | ||
801 | |||
802 | void __init iop13xx_atux_disable(void) | ||
803 | { | ||
804 | u32 reg_val; | ||
805 | |||
806 | __raw_writew(0x0, IOP13XX_ATUX_ATUCMD); | ||
807 | __raw_writel(0x0, IOP13XX_ATUX_ATUCR); | ||
808 | |||
809 | /* wait for cycles to quiesce */ | ||
810 | while (__raw_readl(IOP13XX_ATUX_PCSR) & (IOP13XX_ATUX_PCSR_OUT_Q_BUSY | | ||
811 | IOP13XX_ATUX_PCSR_IN_Q_BUSY)) | ||
812 | cpu_relax(); | ||
813 | |||
814 | /* BAR 0 ( Disabled ) */ | ||
815 | __raw_writel(0x0, IOP13XX_ATUX_IAUBAR0); | ||
816 | __raw_writel(0x0, IOP13XX_ATUX_IABAR0); | ||
817 | __raw_writel(0x0, IOP13XX_ATUX_IAUTVR0); | ||
818 | __raw_writel(0x0, IOP13XX_ATUX_IATVR0); | ||
819 | __raw_writel(0x0, IOP13XX_ATUX_IALR0); | ||
820 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR0); | ||
821 | reg_val &= ~IOP13XX_ATUX_OUMBAR_ENABLE; | ||
822 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR0); | ||
823 | |||
824 | /* BAR 1 ( Disabled ) */ | ||
825 | __raw_writel(0x0, IOP13XX_ATUX_IAUBAR1); | ||
826 | __raw_writel(0x0, IOP13XX_ATUX_IABAR1); | ||
827 | __raw_writel(0x0, IOP13XX_ATUX_IAUTVR1); | ||
828 | __raw_writel(0x0, IOP13XX_ATUX_IATVR1); | ||
829 | __raw_writel(0x0, IOP13XX_ATUX_IALR1); | ||
830 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR1); | ||
831 | reg_val &= ~IOP13XX_ATUX_OUMBAR_ENABLE; | ||
832 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR1); | ||
833 | |||
834 | /* BAR 2 ( Disabled ) */ | ||
835 | __raw_writel(0x0, IOP13XX_ATUX_IAUBAR2); | ||
836 | __raw_writel(0x0, IOP13XX_ATUX_IABAR2); | ||
837 | __raw_writel(0x0, IOP13XX_ATUX_IAUTVR2); | ||
838 | __raw_writel(0x0, IOP13XX_ATUX_IATVR2); | ||
839 | __raw_writel(0x0, IOP13XX_ATUX_IALR2); | ||
840 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR2); | ||
841 | reg_val &= ~IOP13XX_ATUX_OUMBAR_ENABLE; | ||
842 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR2); | ||
843 | |||
844 | /* BAR 3 ( Disabled ) */ | ||
845 | __raw_writel(0x0, IOP13XX_ATUX_IAUBAR3); | ||
846 | __raw_writel(0x0, IOP13XX_ATUX_IABAR3); | ||
847 | __raw_writel(0x0, IOP13XX_ATUX_IAUTVR3); | ||
848 | __raw_writel(0x0, IOP13XX_ATUX_IATVR3); | ||
849 | __raw_writel(0x0, IOP13XX_ATUX_IALR3); | ||
850 | reg_val = __raw_readl(IOP13XX_ATUX_OUMBAR3); | ||
851 | reg_val &= ~IOP13XX_ATUX_OUMBAR_ENABLE; | ||
852 | __raw_writel(reg_val, IOP13XX_ATUX_OUMBAR3); | ||
853 | |||
854 | /* Setup the I/O Bar | ||
855 | * A[35-16] in 31-12 | ||
856 | */ | ||
857 | __raw_writel((IOP13XX_PCIX_LOWER_IO_PA >> 0x4) & 0xfffff000, | ||
858 | IOP13XX_ATUX_OIOBAR); | ||
859 | __raw_writel(IOP13XX_PCIX_LOWER_IO_BA, IOP13XX_ATUX_OIOWTVR); | ||
860 | } | ||
861 | |||
862 | void __init iop13xx_set_atu_mmr_bases(void) | ||
863 | { | ||
864 | /* Based on ESSR0, determine the ATU X/E offsets */ | ||
865 | switch(__raw_readl(IOP13XX_ESSR0) & | ||
866 | (IOP13XX_CONTROLLER_ONLY | IOP13XX_INTERFACE_SEL_PCIX)) { | ||
867 | /* both asserted */ | ||
868 | case 0: | ||
869 | iop13xx_atux_pmmr_offset = IOP13XX_ATU1_PMMR_OFFSET; | ||
870 | iop13xx_atue_pmmr_offset = IOP13XX_ATU2_PMMR_OFFSET; | ||
871 | break; | ||
872 | /* IOP13XX_CONTROLLER_ONLY = deasserted | ||
873 | * IOP13XX_INTERFACE_SEL_PCIX = asserted | ||
874 | */ | ||
875 | case IOP13XX_CONTROLLER_ONLY: | ||
876 | iop13xx_atux_pmmr_offset = IOP13XX_ATU0_PMMR_OFFSET; | ||
877 | iop13xx_atue_pmmr_offset = IOP13XX_ATU2_PMMR_OFFSET; | ||
878 | break; | ||
879 | /* IOP13XX_CONTROLLER_ONLY = asserted | ||
880 | * IOP13XX_INTERFACE_SEL_PCIX = deasserted | ||
881 | */ | ||
882 | case IOP13XX_INTERFACE_SEL_PCIX: | ||
883 | iop13xx_atux_pmmr_offset = IOP13XX_ATU1_PMMR_OFFSET; | ||
884 | iop13xx_atue_pmmr_offset = IOP13XX_ATU2_PMMR_OFFSET; | ||
885 | break; | ||
886 | /* both deasserted */ | ||
887 | case IOP13XX_CONTROLLER_ONLY | IOP13XX_INTERFACE_SEL_PCIX: | ||
888 | iop13xx_atux_pmmr_offset = IOP13XX_ATU2_PMMR_OFFSET; | ||
889 | iop13xx_atue_pmmr_offset = IOP13XX_ATU0_PMMR_OFFSET; | ||
890 | break; | ||
891 | default: | ||
892 | BUG(); | ||
893 | } | ||
894 | } | ||
895 | |||
896 | void __init iop13xx_atu_select(struct hw_pci *plat_pci) | ||
897 | { | ||
898 | int i; | ||
899 | |||
900 | /* set system defaults | ||
901 | * note: if "iop13xx_init_atu=" is specified this autodetect | ||
902 | * sequence will be bypassed | ||
903 | */ | ||
904 | if (init_atu == IOP13XX_INIT_ATU_DEFAULT) { | ||
905 | /* check for single/dual interface */ | ||
906 | if (__raw_readl(IOP13XX_ESSR0) & IOP13XX_INTERFACE_SEL_PCIX) { | ||
907 | /* ATUE must be present check the device id | ||
908 | * to see if ATUX is present. | ||
909 | */ | ||
910 | init_atu |= IOP13XX_INIT_ATU_ATUE; | ||
911 | switch (__raw_readw(IOP13XX_ATUE_DID) & 0xf0) { | ||
912 | case 0x70: | ||
913 | case 0x80: | ||
914 | case 0xc0: | ||
915 | init_atu |= IOP13XX_INIT_ATU_ATUX; | ||
916 | break; | ||
917 | } | ||
918 | } else { | ||
919 | /* ATUX must be present check the device id | ||
920 | * to see if ATUE is present. | ||
921 | */ | ||
922 | init_atu |= IOP13XX_INIT_ATU_ATUX; | ||
923 | switch (__raw_readw(IOP13XX_ATUX_DID) & 0xf0) { | ||
924 | case 0x70: | ||
925 | case 0x80: | ||
926 | case 0xc0: | ||
927 | init_atu |= IOP13XX_INIT_ATU_ATUE; | ||
928 | break; | ||
929 | } | ||
930 | } | ||
931 | |||
932 | /* check central resource and root complex capability */ | ||
933 | if (init_atu & IOP13XX_INIT_ATU_ATUX) | ||
934 | if (!(__raw_readl(IOP13XX_ATUX_PCSR) & | ||
935 | IOP13XX_ATUX_PCSR_CENTRAL_RES)) | ||
936 | init_atu &= ~IOP13XX_INIT_ATU_ATUX; | ||
937 | |||
938 | if (init_atu & IOP13XX_INIT_ATU_ATUE) | ||
939 | if (__raw_readl(IOP13XX_ATUE_PCSR) & | ||
940 | IOP13XX_ATUE_PCSR_END_POINT) | ||
941 | init_atu &= ~IOP13XX_INIT_ATU_ATUE; | ||
942 | } | ||
943 | |||
944 | for (i = 0; i < 2; i++) { | ||
945 | if((init_atu & (1 << i)) == (1 << i)) | ||
946 | plat_pci->nr_controllers++; | ||
947 | } | ||
948 | } | ||
949 | |||
950 | void __init iop13xx_pci_init(void) | ||
951 | { | ||
952 | /* clear pre-existing south bridge errors */ | ||
953 | __raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, IOP13XX_XBG_BECSR); | ||
954 | |||
955 | /* Setup the Min Address for PCI memory... */ | ||
956 | iop13xx_pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA; | ||
957 | |||
958 | /* if Linux is given control of an ATU | ||
959 | * clear out its prior configuration, | ||
960 | * otherwise do not touch the registers | ||
961 | */ | ||
962 | if (init_atu & IOP13XX_INIT_ATU_ATUE) { | ||
963 | iop13xx_atue_disable(); | ||
964 | iop13xx_atue_setup(); | ||
965 | } | ||
966 | |||
967 | if (init_atu & IOP13XX_INIT_ATU_ATUX) { | ||
968 | iop13xx_atux_disable(); | ||
969 | iop13xx_atux_setup(); | ||
970 | } | ||
971 | |||
972 | hook_fault_code(16+6, iop13xx_pci_abort, SIGBUS, | ||
973 | "imprecise external abort"); | ||
974 | } | ||
975 | |||
976 | /* intialize the pci memory space. handle any combination of | ||
977 | * atue and atux enabled/disabled | ||
978 | */ | ||
979 | int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) | ||
980 | { | ||
981 | struct resource *res; | ||
982 | int which_atu; | ||
983 | u32 pcixsr, pcsr; | ||
984 | |||
985 | if (nr > 1) | ||
986 | return 0; | ||
987 | |||
988 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | ||
989 | if (!res) | ||
990 | panic("PCI: unable to alloc resources"); | ||
991 | |||
992 | memset(res, 0, sizeof(struct resource) * 2); | ||
993 | |||
994 | /* 'nr' assumptions: | ||
995 | * ATUX is always 0 | ||
996 | * ATUE is 1 when ATUX is also enabled | ||
997 | * ATUE is 0 when ATUX is disabled | ||
998 | */ | ||
999 | switch(init_atu) { | ||
1000 | case IOP13XX_INIT_ATU_ATUX: | ||
1001 | which_atu = nr ? 0 : IOP13XX_INIT_ATU_ATUX; | ||
1002 | break; | ||
1003 | case IOP13XX_INIT_ATU_ATUE: | ||
1004 | which_atu = nr ? 0 : IOP13XX_INIT_ATU_ATUE; | ||
1005 | break; | ||
1006 | case (IOP13XX_INIT_ATU_ATUX | IOP13XX_INIT_ATU_ATUE): | ||
1007 | which_atu = nr ? IOP13XX_INIT_ATU_ATUE : IOP13XX_INIT_ATU_ATUX; | ||
1008 | break; | ||
1009 | default: | ||
1010 | which_atu = 0; | ||
1011 | } | ||
1012 | |||
1013 | if (!which_atu) | ||
1014 | return 0; | ||
1015 | |||
1016 | switch(which_atu) { | ||
1017 | case IOP13XX_INIT_ATU_ATUX: | ||
1018 | pcixsr = __raw_readl(IOP13XX_ATUX_PCIXSR); | ||
1019 | pcixsr &= ~0xffff; | ||
1020 | pcixsr |= sys->busnr << IOP13XX_ATUX_PCIXSR_BUS_NUM | | ||
1021 | 0 << IOP13XX_ATUX_PCIXSR_DEV_NUM | | ||
1022 | iop13xx_atu_function(IOP13XX_INIT_ATU_ATUX) | ||
1023 | << IOP13XX_ATUX_PCIXSR_FUNC_NUM; | ||
1024 | __raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR); | ||
1025 | |||
1026 | res[0].start = IOP13XX_PCIX_LOWER_IO_PA; | ||
1027 | res[0].end = IOP13XX_PCIX_UPPER_IO_PA; | ||
1028 | res[0].name = "IQ81340 ATUX PCI I/O Space"; | ||
1029 | res[0].flags = IORESOURCE_IO; | ||
1030 | |||
1031 | res[1].start = IOP13XX_PCIX_LOWER_MEM_RA; | ||
1032 | res[1].end = IOP13XX_PCIX_UPPER_MEM_RA; | ||
1033 | res[1].name = "IQ81340 ATUX PCI Memory Space"; | ||
1034 | res[1].flags = IORESOURCE_MEM; | ||
1035 | sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET; | ||
1036 | sys->io_offset = IOP13XX_PCIX_IO_OFFSET; | ||
1037 | break; | ||
1038 | case IOP13XX_INIT_ATU_ATUE: | ||
1039 | /* Note: the function number field in the PCSR is ro */ | ||
1040 | pcsr = __raw_readl(IOP13XX_ATUE_PCSR); | ||
1041 | pcsr &= ~(0xfff8 << 16); | ||
1042 | pcsr |= sys->busnr << IOP13XX_ATUE_PCSR_BUS_NUM | | ||
1043 | 0 << IOP13XX_ATUE_PCSR_DEV_NUM; | ||
1044 | |||
1045 | __raw_writel(pcsr, IOP13XX_ATUE_PCSR); | ||
1046 | |||
1047 | res[0].start = IOP13XX_PCIE_LOWER_IO_PA; | ||
1048 | res[0].end = IOP13XX_PCIE_UPPER_IO_PA; | ||
1049 | res[0].name = "IQ81340 ATUE PCI I/O Space"; | ||
1050 | res[0].flags = IORESOURCE_IO; | ||
1051 | |||
1052 | res[1].start = IOP13XX_PCIE_LOWER_MEM_RA; | ||
1053 | res[1].end = IOP13XX_PCIE_UPPER_MEM_RA; | ||
1054 | res[1].name = "IQ81340 ATUE PCI Memory Space"; | ||
1055 | res[1].flags = IORESOURCE_MEM; | ||
1056 | sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET; | ||
1057 | sys->io_offset = IOP13XX_PCIE_IO_OFFSET; | ||
1058 | sys->map_irq = iop13xx_pcie_map_irq; | ||
1059 | break; | ||
1060 | default: | ||
1061 | return 0; | ||
1062 | } | ||
1063 | |||
1064 | request_resource(&ioport_resource, &res[0]); | ||
1065 | request_resource(&iomem_resource, &res[1]); | ||
1066 | |||
1067 | sys->resource[0] = &res[0]; | ||
1068 | sys->resource[1] = &res[1]; | ||
1069 | sys->resource[2] = NULL; | ||
1070 | |||
1071 | return 1; | ||
1072 | } | ||
1073 | |||
1074 | u16 iop13xx_dev_id(void) | ||
1075 | { | ||
1076 | if (__raw_readl(IOP13XX_ESSR0) & IOP13XX_INTERFACE_SEL_PCIX) | ||
1077 | return __raw_readw(IOP13XX_ATUE_DID); | ||
1078 | else | ||
1079 | return __raw_readw(IOP13XX_ATUX_DID); | ||
1080 | } | ||
1081 | |||
1082 | static int __init iop13xx_init_atu_setup(char *str) | ||
1083 | { | ||
1084 | init_atu = IOP13XX_INIT_ATU_NONE; | ||
1085 | if (str) { | ||
1086 | while (*str != '\0') { | ||
1087 | switch (*str) { | ||
1088 | case 'x': | ||
1089 | case 'X': | ||
1090 | init_atu |= IOP13XX_INIT_ATU_ATUX; | ||
1091 | init_atu &= ~IOP13XX_INIT_ATU_NONE; | ||
1092 | break; | ||
1093 | case 'e': | ||
1094 | case 'E': | ||
1095 | init_atu |= IOP13XX_INIT_ATU_ATUE; | ||
1096 | init_atu &= ~IOP13XX_INIT_ATU_NONE; | ||
1097 | break; | ||
1098 | case ',': | ||
1099 | case '=': | ||
1100 | break; | ||
1101 | default: | ||
1102 | PRINTK("\"iop13xx_init_atu\" malformed at " | ||
1103 | "character: \'%c\'", *str); | ||
1104 | *(str + 1) = '\0'; | ||
1105 | init_atu = IOP13XX_INIT_ATU_DEFAULT; | ||
1106 | } | ||
1107 | str++; | ||
1108 | } | ||
1109 | } | ||
1110 | return 1; | ||
1111 | } | ||
1112 | |||
1113 | __setup("iop13xx_init_atu", iop13xx_init_atu_setup); | ||
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c new file mode 100644 index 000000000000..3756d2ccb1a7 --- /dev/null +++ b/arch/arm/mach-iop13xx/setup.c | |||
@@ -0,0 +1,406 @@ | |||
1 | /* | ||
2 | * iop13xx platform Initialization | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #include <linux/serial_8250.h> | ||
21 | #ifdef CONFIG_MTD_PHYSMAP | ||
22 | #include <linux/mtd/physmap.h> | ||
23 | #endif | ||
24 | #include <asm/mach/map.h> | ||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/irq.h> | ||
27 | |||
28 | #define IOP13XX_UART_XTAL 33334000 | ||
29 | #define IOP13XX_SETUP_DEBUG 0 | ||
30 | #define PRINTK(x...) ((void)(IOP13XX_SETUP_DEBUG && printk(x))) | ||
31 | |||
32 | /* Standard IO mapping for all IOP13XX based systems | ||
33 | */ | ||
34 | static struct map_desc iop13xx_std_desc[] __initdata = { | ||
35 | { /* mem mapped registers */ | ||
36 | .virtual = IOP13XX_PMMR_VIRT_MEM_BASE, | ||
37 | .pfn = __phys_to_pfn(IOP13XX_PMMR_PHYS_MEM_BASE), | ||
38 | .length = IOP13XX_PMMR_SIZE, | ||
39 | .type = MT_DEVICE, | ||
40 | }, { /* PCIE IO space */ | ||
41 | .virtual = IOP13XX_PCIE_LOWER_IO_VA, | ||
42 | .pfn = __phys_to_pfn(IOP13XX_PCIE_LOWER_IO_PA), | ||
43 | .length = IOP13XX_PCIX_IO_WINDOW_SIZE, | ||
44 | .type = MT_DEVICE, | ||
45 | }, { /* PCIX IO space */ | ||
46 | .virtual = IOP13XX_PCIX_LOWER_IO_VA, | ||
47 | .pfn = __phys_to_pfn(IOP13XX_PCIX_LOWER_IO_PA), | ||
48 | .length = IOP13XX_PCIX_IO_WINDOW_SIZE, | ||
49 | .type = MT_DEVICE, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static struct resource iop13xx_uart0_resources[] = { | ||
54 | [0] = { | ||
55 | .start = IOP13XX_UART0_PHYS, | ||
56 | .end = IOP13XX_UART0_PHYS + 0x3f, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | [1] = { | ||
60 | .start = IRQ_IOP13XX_UART0, | ||
61 | .end = IRQ_IOP13XX_UART0, | ||
62 | .flags = IORESOURCE_IRQ | ||
63 | } | ||
64 | }; | ||
65 | |||
66 | static struct resource iop13xx_uart1_resources[] = { | ||
67 | [0] = { | ||
68 | .start = IOP13XX_UART1_PHYS, | ||
69 | .end = IOP13XX_UART1_PHYS + 0x3f, | ||
70 | .flags = IORESOURCE_MEM, | ||
71 | }, | ||
72 | [1] = { | ||
73 | .start = IRQ_IOP13XX_UART1, | ||
74 | .end = IRQ_IOP13XX_UART1, | ||
75 | .flags = IORESOURCE_IRQ | ||
76 | } | ||
77 | }; | ||
78 | |||
79 | static struct plat_serial8250_port iop13xx_uart0_data[] = { | ||
80 | { | ||
81 | .membase = (char*)(IOP13XX_UART0_VIRT), | ||
82 | .mapbase = (IOP13XX_UART0_PHYS), | ||
83 | .irq = IRQ_IOP13XX_UART0, | ||
84 | .uartclk = IOP13XX_UART_XTAL, | ||
85 | .regshift = 2, | ||
86 | .iotype = UPIO_MEM, | ||
87 | .flags = UPF_SKIP_TEST, | ||
88 | }, | ||
89 | { }, | ||
90 | }; | ||
91 | |||
92 | static struct plat_serial8250_port iop13xx_uart1_data[] = { | ||
93 | { | ||
94 | .membase = (char*)(IOP13XX_UART1_VIRT), | ||
95 | .mapbase = (IOP13XX_UART1_PHYS), | ||
96 | .irq = IRQ_IOP13XX_UART1, | ||
97 | .uartclk = IOP13XX_UART_XTAL, | ||
98 | .regshift = 2, | ||
99 | .iotype = UPIO_MEM, | ||
100 | .flags = UPF_SKIP_TEST, | ||
101 | }, | ||
102 | { }, | ||
103 | }; | ||
104 | |||
105 | /* The ids are fixed up later in iop13xx_platform_init */ | ||
106 | static struct platform_device iop13xx_uart0 = { | ||
107 | .name = "serial8250", | ||
108 | .id = 0, | ||
109 | .dev.platform_data = iop13xx_uart0_data, | ||
110 | .num_resources = 2, | ||
111 | .resource = iop13xx_uart0_resources, | ||
112 | }; | ||
113 | |||
114 | static struct platform_device iop13xx_uart1 = { | ||
115 | .name = "serial8250", | ||
116 | .id = 0, | ||
117 | .dev.platform_data = iop13xx_uart1_data, | ||
118 | .num_resources = 2, | ||
119 | .resource = iop13xx_uart1_resources | ||
120 | }; | ||
121 | |||
122 | static struct resource iop13xx_i2c_0_resources[] = { | ||
123 | [0] = { | ||
124 | .start = IOP13XX_I2C0_PHYS, | ||
125 | .end = IOP13XX_I2C0_PHYS + 0x18, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }, | ||
128 | [1] = { | ||
129 | .start = IRQ_IOP13XX_I2C_0, | ||
130 | .end = IRQ_IOP13XX_I2C_0, | ||
131 | .flags = IORESOURCE_IRQ | ||
132 | } | ||
133 | }; | ||
134 | |||
135 | static struct resource iop13xx_i2c_1_resources[] = { | ||
136 | [0] = { | ||
137 | .start = IOP13XX_I2C1_PHYS, | ||
138 | .end = IOP13XX_I2C1_PHYS + 0x18, | ||
139 | .flags = IORESOURCE_MEM, | ||
140 | }, | ||
141 | [1] = { | ||
142 | .start = IRQ_IOP13XX_I2C_1, | ||
143 | .end = IRQ_IOP13XX_I2C_1, | ||
144 | .flags = IORESOURCE_IRQ | ||
145 | } | ||
146 | }; | ||
147 | |||
148 | static struct resource iop13xx_i2c_2_resources[] = { | ||
149 | [0] = { | ||
150 | .start = IOP13XX_I2C2_PHYS, | ||
151 | .end = IOP13XX_I2C2_PHYS + 0x18, | ||
152 | .flags = IORESOURCE_MEM, | ||
153 | }, | ||
154 | [1] = { | ||
155 | .start = IRQ_IOP13XX_I2C_2, | ||
156 | .end = IRQ_IOP13XX_I2C_2, | ||
157 | .flags = IORESOURCE_IRQ | ||
158 | } | ||
159 | }; | ||
160 | |||
161 | /* I2C controllers. The IOP13XX uses the same block as the IOP3xx, so | ||
162 | * we just use the same device name. | ||
163 | */ | ||
164 | |||
165 | /* The ids are fixed up later in iop13xx_platform_init */ | ||
166 | static struct platform_device iop13xx_i2c_0_controller = { | ||
167 | .name = "IOP3xx-I2C", | ||
168 | .id = 0, | ||
169 | .num_resources = 2, | ||
170 | .resource = iop13xx_i2c_0_resources | ||
171 | }; | ||
172 | |||
173 | static struct platform_device iop13xx_i2c_1_controller = { | ||
174 | .name = "IOP3xx-I2C", | ||
175 | .id = 0, | ||
176 | .num_resources = 2, | ||
177 | .resource = iop13xx_i2c_1_resources | ||
178 | }; | ||
179 | |||
180 | static struct platform_device iop13xx_i2c_2_controller = { | ||
181 | .name = "IOP3xx-I2C", | ||
182 | .id = 0, | ||
183 | .num_resources = 2, | ||
184 | .resource = iop13xx_i2c_2_resources | ||
185 | }; | ||
186 | |||
187 | #ifdef CONFIG_MTD_PHYSMAP | ||
188 | /* PBI Flash Device | ||
189 | */ | ||
190 | static struct physmap_flash_data iq8134x_flash_data = { | ||
191 | .width = 2, | ||
192 | }; | ||
193 | |||
194 | static struct resource iq8134x_flash_resource = { | ||
195 | .start = IQ81340_FLASHBASE, | ||
196 | .end = 0, | ||
197 | .flags = IORESOURCE_MEM, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device iq8134x_flash = { | ||
201 | .name = "physmap-flash", | ||
202 | .id = 0, | ||
203 | .dev = { .platform_data = &iq8134x_flash_data, }, | ||
204 | .num_resources = 1, | ||
205 | .resource = &iq8134x_flash_resource, | ||
206 | }; | ||
207 | |||
208 | static unsigned long iq8134x_probe_flash_size(void) | ||
209 | { | ||
210 | uint8_t __iomem *flash_addr = ioremap(IQ81340_FLASHBASE, PAGE_SIZE); | ||
211 | int i; | ||
212 | char query[3]; | ||
213 | unsigned long size = 0; | ||
214 | int width = iq8134x_flash_data.width; | ||
215 | |||
216 | if (flash_addr) { | ||
217 | /* send CFI 'query' command */ | ||
218 | writew(0x98, flash_addr); | ||
219 | |||
220 | /* check for CFI compliance */ | ||
221 | for (i = 0; i < 3 * width; i += width) | ||
222 | query[i / width] = readb(flash_addr + (0x10 * width) + i); | ||
223 | |||
224 | /* read the size */ | ||
225 | if (memcmp(query, "QRY", 3) == 0) | ||
226 | size = 1 << readb(flash_addr + (0x27 * width)); | ||
227 | |||
228 | /* send CFI 'read array' command */ | ||
229 | writew(0xff, flash_addr); | ||
230 | |||
231 | iounmap(flash_addr); | ||
232 | } | ||
233 | |||
234 | return size; | ||
235 | } | ||
236 | #endif | ||
237 | |||
238 | void __init iop13xx_map_io(void) | ||
239 | { | ||
240 | /* Initialize the Static Page Table maps */ | ||
241 | iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc)); | ||
242 | } | ||
243 | |||
244 | static int init_uart = 0; | ||
245 | static int init_i2c = 0; | ||
246 | |||
247 | void __init iop13xx_platform_init(void) | ||
248 | { | ||
249 | int i; | ||
250 | u32 uart_idx, i2c_idx, plat_idx; | ||
251 | struct platform_device *iop13xx_devices[IQ81340_MAX_PLAT_DEVICES]; | ||
252 | |||
253 | /* set the bases so we can read the device id */ | ||
254 | iop13xx_set_atu_mmr_bases(); | ||
255 | |||
256 | memset(iop13xx_devices, 0, sizeof(iop13xx_devices)); | ||
257 | |||
258 | if (init_uart == IOP13XX_INIT_UART_DEFAULT) { | ||
259 | switch (iop13xx_dev_id()) { | ||
260 | /* enable both uarts on iop341 and iop342 */ | ||
261 | case 0x3380: | ||
262 | case 0x3384: | ||
263 | case 0x3388: | ||
264 | case 0x338c: | ||
265 | case 0x3382: | ||
266 | case 0x3386: | ||
267 | case 0x338a: | ||
268 | case 0x338e: | ||
269 | init_uart |= IOP13XX_INIT_UART_0; | ||
270 | init_uart |= IOP13XX_INIT_UART_1; | ||
271 | break; | ||
272 | /* only enable uart 1 */ | ||
273 | default: | ||
274 | init_uart |= IOP13XX_INIT_UART_1; | ||
275 | } | ||
276 | } | ||
277 | |||
278 | if (init_i2c == IOP13XX_INIT_I2C_DEFAULT) { | ||
279 | switch (iop13xx_dev_id()) { | ||
280 | /* enable all i2c units on iop341 and iop342 */ | ||
281 | case 0x3380: | ||
282 | case 0x3384: | ||
283 | case 0x3388: | ||
284 | case 0x338c: | ||
285 | case 0x3382: | ||
286 | case 0x3386: | ||
287 | case 0x338a: | ||
288 | case 0x338e: | ||
289 | init_i2c |= IOP13XX_INIT_I2C_0; | ||
290 | init_i2c |= IOP13XX_INIT_I2C_1; | ||
291 | init_i2c |= IOP13XX_INIT_I2C_2; | ||
292 | break; | ||
293 | /* only enable i2c 1 and 2 */ | ||
294 | default: | ||
295 | init_i2c |= IOP13XX_INIT_I2C_1; | ||
296 | init_i2c |= IOP13XX_INIT_I2C_2; | ||
297 | } | ||
298 | } | ||
299 | |||
300 | plat_idx = 0; | ||
301 | uart_idx = 0; | ||
302 | i2c_idx = 0; | ||
303 | |||
304 | /* uart 1 (if enabled) is ttyS0 */ | ||
305 | if (init_uart & IOP13XX_INIT_UART_1) { | ||
306 | PRINTK("Adding uart1 to platform device list\n"); | ||
307 | iop13xx_uart1.id = uart_idx++; | ||
308 | iop13xx_devices[plat_idx++] = &iop13xx_uart1; | ||
309 | } | ||
310 | if (init_uart & IOP13XX_INIT_UART_0) { | ||
311 | PRINTK("Adding uart0 to platform device list\n"); | ||
312 | iop13xx_uart0.id = uart_idx++; | ||
313 | iop13xx_devices[plat_idx++] = &iop13xx_uart0; | ||
314 | } | ||
315 | |||
316 | for(i = 0; i < IQ81340_NUM_I2C; i++) { | ||
317 | if ((init_i2c & (1 << i)) && IOP13XX_SETUP_DEBUG) | ||
318 | printk("Adding i2c%d to platform device list\n", i); | ||
319 | switch(init_i2c & (1 << i)) { | ||
320 | case IOP13XX_INIT_I2C_0: | ||
321 | iop13xx_i2c_0_controller.id = i2c_idx++; | ||
322 | iop13xx_devices[plat_idx++] = | ||
323 | &iop13xx_i2c_0_controller; | ||
324 | break; | ||
325 | case IOP13XX_INIT_I2C_1: | ||
326 | iop13xx_i2c_1_controller.id = i2c_idx++; | ||
327 | iop13xx_devices[plat_idx++] = | ||
328 | &iop13xx_i2c_1_controller; | ||
329 | break; | ||
330 | case IOP13XX_INIT_I2C_2: | ||
331 | iop13xx_i2c_2_controller.id = i2c_idx++; | ||
332 | iop13xx_devices[plat_idx++] = | ||
333 | &iop13xx_i2c_2_controller; | ||
334 | break; | ||
335 | } | ||
336 | } | ||
337 | |||
338 | #ifdef CONFIG_MTD_PHYSMAP | ||
339 | iq8134x_flash_resource.end = iq8134x_flash_resource.start + | ||
340 | iq8134x_probe_flash_size(); | ||
341 | if (iq8134x_flash_resource.end > iq8134x_flash_resource.start) | ||
342 | iop13xx_devices[plat_idx++] = &iq8134x_flash; | ||
343 | else | ||
344 | printk(KERN_ERR "%s: Failed to probe flash size\n", __FUNCTION__); | ||
345 | #endif | ||
346 | |||
347 | platform_add_devices(iop13xx_devices, plat_idx); | ||
348 | } | ||
349 | |||
350 | static int __init iop13xx_init_uart_setup(char *str) | ||
351 | { | ||
352 | if (str) { | ||
353 | while (*str != '\0') { | ||
354 | switch(*str) { | ||
355 | case '0': | ||
356 | init_uart |= IOP13XX_INIT_UART_0; | ||
357 | break; | ||
358 | case '1': | ||
359 | init_uart |= IOP13XX_INIT_UART_1; | ||
360 | break; | ||
361 | case ',': | ||
362 | case '=': | ||
363 | break; | ||
364 | default: | ||
365 | PRINTK("\"iop13xx_init_uart\" malformed" | ||
366 | " at character: \'%c\'", *str); | ||
367 | *(str + 1) = '\0'; | ||
368 | init_uart = IOP13XX_INIT_UART_DEFAULT; | ||
369 | } | ||
370 | str++; | ||
371 | } | ||
372 | } | ||
373 | return 1; | ||
374 | } | ||
375 | |||
376 | static int __init iop13xx_init_i2c_setup(char *str) | ||
377 | { | ||
378 | if (str) { | ||
379 | while (*str != '\0') { | ||
380 | switch(*str) { | ||
381 | case '0': | ||
382 | init_i2c |= IOP13XX_INIT_I2C_0; | ||
383 | break; | ||
384 | case '1': | ||
385 | init_i2c |= IOP13XX_INIT_I2C_1; | ||
386 | break; | ||
387 | case '2': | ||
388 | init_i2c |= IOP13XX_INIT_I2C_2; | ||
389 | break; | ||
390 | case ',': | ||
391 | case '=': | ||
392 | break; | ||
393 | default: | ||
394 | PRINTK("\"iop13xx_init_i2c\" malformed" | ||
395 | " at character: \'%c\'", *str); | ||
396 | *(str + 1) = '\0'; | ||
397 | init_i2c = IOP13XX_INIT_I2C_DEFAULT; | ||
398 | } | ||
399 | str++; | ||
400 | } | ||
401 | } | ||
402 | return 1; | ||
403 | } | ||
404 | |||
405 | __setup("iop13xx_init_uart", iop13xx_init_uart_setup); | ||
406 | __setup("iop13xx_init_i2c", iop13xx_init_i2c_setup); | ||
diff --git a/arch/arm/mach-iop13xx/time.c b/arch/arm/mach-iop13xx/time.c new file mode 100644 index 000000000000..8b21365f653f --- /dev/null +++ b/arch/arm/mach-iop13xx/time.c | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop13xx/time.c | ||
3 | * | ||
4 | * Timer code for IOP13xx (copied from IOP32x/IOP33x implementation) | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@mvista.com> | ||
7 | * | ||
8 | * Copyright 2002-2003 MontaVista Software Inc. | ||
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 | #include <linux/kernel.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/time.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/timex.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/irq.h> | ||
23 | #include <asm/uaccess.h> | ||
24 | #include <asm/mach/irq.h> | ||
25 | #include <asm/mach/time.h> | ||
26 | |||
27 | static unsigned long ticks_per_jiffy; | ||
28 | static unsigned long ticks_per_usec; | ||
29 | static unsigned long next_jiffy_time; | ||
30 | |||
31 | static inline u32 read_tcr1(void) | ||
32 | { | ||
33 | u32 val; | ||
34 | asm volatile("mrc p6, 0, %0, c3, c9, 0" : "=r" (val)); | ||
35 | return val; | ||
36 | } | ||
37 | |||
38 | unsigned long iop13xx_gettimeoffset(void) | ||
39 | { | ||
40 | unsigned long offset; | ||
41 | u32 cp_flags; | ||
42 | |||
43 | cp_flags = iop13xx_cp6_save(); | ||
44 | offset = next_jiffy_time - read_tcr1(); | ||
45 | iop13xx_cp6_restore(cp_flags); | ||
46 | |||
47 | return offset / ticks_per_usec; | ||
48 | } | ||
49 | |||
50 | static irqreturn_t | ||
51 | iop13xx_timer_interrupt(int irq, void *dev_id) | ||
52 | { | ||
53 | u32 cp_flags = iop13xx_cp6_save(); | ||
54 | |||
55 | write_seqlock(&xtime_lock); | ||
56 | |||
57 | asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (1)); | ||
58 | |||
59 | while ((signed long)(next_jiffy_time - read_tcr1()) | ||
60 | >= ticks_per_jiffy) { | ||
61 | timer_tick(); | ||
62 | next_jiffy_time -= ticks_per_jiffy; | ||
63 | } | ||
64 | |||
65 | write_sequnlock(&xtime_lock); | ||
66 | |||
67 | iop13xx_cp6_restore(cp_flags); | ||
68 | |||
69 | return IRQ_HANDLED; | ||
70 | } | ||
71 | |||
72 | static struct irqaction iop13xx_timer_irq = { | ||
73 | .name = "IOP13XX Timer Tick", | ||
74 | .handler = iop13xx_timer_interrupt, | ||
75 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
76 | }; | ||
77 | |||
78 | void __init iop13xx_init_time(unsigned long tick_rate) | ||
79 | { | ||
80 | u32 timer_ctl; | ||
81 | u32 cp_flags; | ||
82 | |||
83 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; | ||
84 | ticks_per_usec = tick_rate / 1000000; | ||
85 | next_jiffy_time = 0xffffffff; | ||
86 | |||
87 | timer_ctl = IOP13XX_TMR_EN | IOP13XX_TMR_PRIVILEGED | | ||
88 | IOP13XX_TMR_RELOAD | IOP13XX_TMR_RATIO_1_1; | ||
89 | |||
90 | /* | ||
91 | * We use timer 0 for our timer interrupt, and timer 1 as | ||
92 | * monotonic counter for tracking missed jiffies. | ||
93 | */ | ||
94 | cp_flags = iop13xx_cp6_save(); | ||
95 | asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (ticks_per_jiffy - 1)); | ||
96 | asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (timer_ctl)); | ||
97 | asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (0xffffffff)); | ||
98 | asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (timer_ctl)); | ||
99 | iop13xx_cp6_restore(cp_flags); | ||
100 | |||
101 | setup_irq(IRQ_IOP13XX_TIMER0, &iop13xx_timer_irq); | ||
102 | } | ||
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 45fb2c3bcf82..6ae605857ca9 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -25,6 +25,10 @@ | |||
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | 27 | ||
28 | #include <linux/sched.h> | ||
29 | #include <asm/cnt32_to_63.h> | ||
30 | #include <asm/div64.h> | ||
31 | |||
28 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
29 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
30 | #include <asm/system.h> | 34 | #include <asm/system.h> |
@@ -41,6 +45,62 @@ | |||
41 | #include "generic.h" | 45 | #include "generic.h" |
42 | 46 | ||
43 | /* | 47 | /* |
48 | * This is the PXA2xx sched_clock implementation. This has a resolution | ||
49 | * of at least 308ns and a maximum value that depends on the value of | ||
50 | * CLOCK_TICK_RATE. | ||
51 | * | ||
52 | * The return value is guaranteed to be monotonic in that range as | ||
53 | * long as there is always less than 582 seconds between successive | ||
54 | * calls to this function. | ||
55 | */ | ||
56 | unsigned long long sched_clock(void) | ||
57 | { | ||
58 | unsigned long long v = cnt32_to_63(OSCR); | ||
59 | /* Note: top bit ov v needs cleared unless multiplier is even. */ | ||
60 | |||
61 | #if CLOCK_TICK_RATE == 3686400 | ||
62 | /* 1E9 / 3686400 => 78125 / 288, max value = 32025597s (370 days). */ | ||
63 | /* The <<1 is used to get rid of tick.hi top bit */ | ||
64 | v *= 78125<<1; | ||
65 | do_div(v, 288<<1); | ||
66 | #elif CLOCK_TICK_RATE == 3250000 | ||
67 | /* 1E9 / 3250000 => 4000 / 13, max value = 709490156s (8211 days) */ | ||
68 | v *= 4000; | ||
69 | do_div(v, 13); | ||
70 | #elif CLOCK_TICK_RATE == 3249600 | ||
71 | /* 1E9 / 3249600 => 625000 / 2031, max value = 4541295s (52 days) */ | ||
72 | v *= 625000; | ||
73 | do_div(v, 2031); | ||
74 | #else | ||
75 | #warning "consider fixing sched_clock for your value of CLOCK_TICK_RATE" | ||
76 | /* | ||
77 | * 96-bit math to perform tick * NSEC_PER_SEC / CLOCK_TICK_RATE for | ||
78 | * any value of CLOCK_TICK_RATE. Max value is in the 80 thousand | ||
79 | * years range which is nice, but with higher computation cost. | ||
80 | */ | ||
81 | { | ||
82 | union { | ||
83 | unsigned long long val; | ||
84 | struct { unsigned long lo, hi; }; | ||
85 | } x; | ||
86 | unsigned long long y; | ||
87 | |||
88 | x.val = v; | ||
89 | x.hi &= 0x7fffffff; | ||
90 | y = (unsigned long long)x.lo * NSEC_PER_SEC; | ||
91 | x.lo = y; | ||
92 | y = (y >> 32) + (unsigned long long)x.hi * NSEC_PER_SEC; | ||
93 | x.hi = do_div(y, CLOCK_TICK_RATE); | ||
94 | do_div(x.val, CLOCK_TICK_RATE); | ||
95 | x.hi += y; | ||
96 | v = x.val; | ||
97 | } | ||
98 | #endif | ||
99 | |||
100 | return v; | ||
101 | } | ||
102 | |||
103 | /* | ||
44 | * Handy function to set GPIO alternate functions | 104 | * Handy function to set GPIO alternate functions |
45 | */ | 105 | */ |
46 | 106 | ||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 4575f316e141..e510295c2580 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | 21 | ||
22 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
23 | #include <asm/cnt32_to_63.h> | ||
23 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
@@ -118,15 +119,21 @@ EXPORT_SYMBOL(cpufreq_get); | |||
118 | 119 | ||
119 | /* | 120 | /* |
120 | * This is the SA11x0 sched_clock implementation. This has | 121 | * This is the SA11x0 sched_clock implementation. This has |
121 | * a resolution of 271ns, and a maximum value of 1165s. | 122 | * a resolution of 271ns, and a maximum value of 32025597s (370 days). |
123 | * | ||
124 | * The return value is guaranteed to be monotonic in that range as | ||
125 | * long as there is always less than 582 seconds between successive | ||
126 | * calls to this function. | ||
127 | * | ||
122 | * ( * 1E9 / 3686400 => * 78125 / 288) | 128 | * ( * 1E9 / 3686400 => * 78125 / 288) |
123 | */ | 129 | */ |
124 | unsigned long long sched_clock(void) | 130 | unsigned long long sched_clock(void) |
125 | { | 131 | { |
126 | unsigned long long v; | 132 | unsigned long long v = cnt32_to_63(OSCR); |
127 | 133 | ||
128 | v = (unsigned long long)OSCR * 78125; | 134 | /* the <<1 gets rid of the cnt_32_to_63 top bit saving on a bic insn */ |
129 | do_div(v, 288); | 135 | v *= 78125<<1; |
136 | do_div(v, 288<<1); | ||
130 | 137 | ||
131 | return v; | 138 | return v; |
132 | } | 139 | } |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index dcc2ca3dcde9..57196947559f 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/amba/bus.h> | 27 | #include <linux/amba/bus.h> |
28 | #include <linux/amba/clcd.h> | 28 | #include <linux/amba/clcd.h> |
29 | 29 | ||
30 | #include <asm/cnt32_to_63.h> | ||
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
@@ -228,14 +229,19 @@ void __init versatile_map_io(void) | |||
228 | 229 | ||
229 | /* | 230 | /* |
230 | * This is the Versatile sched_clock implementation. This has | 231 | * This is the Versatile sched_clock implementation. This has |
231 | * a resolution of 41.7ns, and a maximum value of about 179s. | 232 | * a resolution of 41.7ns, and a maximum value of about 35583 days. |
233 | * | ||
234 | * The return value is guaranteed to be monotonic in that range as | ||
235 | * long as there is always less than 89 seconds between successive | ||
236 | * calls to this function. | ||
232 | */ | 237 | */ |
233 | unsigned long long sched_clock(void) | 238 | unsigned long long sched_clock(void) |
234 | { | 239 | { |
235 | unsigned long long v; | 240 | unsigned long long v = cnt32_to_63(readl(VERSATILE_REFCOUNTER)); |
236 | 241 | ||
237 | v = (unsigned long long)readl(VERSATILE_REFCOUNTER) * 125; | 242 | /* the <<1 gets rid of the cnt_32_to_63 top bit saving on a bic insn */ |
238 | do_div(v, 3); | 243 | v *= 125<<1; |
244 | do_div(v, 3<<1); | ||
239 | 245 | ||
240 | return v; | 246 | return v; |
241 | } | 247 | } |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index efebd6050285..125cb3ff5589 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -333,7 +333,7 @@ config CPU_XSCALE | |||
333 | # XScale Core Version 3 | 333 | # XScale Core Version 3 |
334 | config CPU_XSC3 | 334 | config CPU_XSC3 |
335 | bool | 335 | bool |
336 | depends on ARCH_IXP23XX | 336 | depends on ARCH_IXP23XX || ARCH_IOP13XX |
337 | default y | 337 | default y |
338 | select CPU_32v5 | 338 | select CPU_32v5 |
339 | select CPU_ABRT_EV5T | 339 | select CPU_ABRT_EV5T |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 579c69ae9ff7..8bcb838e5444 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Mon Oct 16 21:13:36 2006 | 15 | # Last update: Thu Dec 7 17:19:20 2006 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -79,7 +79,7 @@ psionw ARCH_PSIONW PSIONW 60 | |||
79 | aln SA1100_ALN ALN 61 | 79 | aln SA1100_ALN ALN 61 |
80 | epxa ARCH_CAMELOT CAMELOT 62 | 80 | epxa ARCH_CAMELOT CAMELOT 62 |
81 | gds2200 SA1100_GDS2200 GDS2200 63 | 81 | gds2200 SA1100_GDS2200 GDS2200 63 |
82 | psion_series7 SA1100_PSION_SERIES7 PSION_SERIES7 64 | 82 | netbook SA1100_PSION_SERIES7 PSION_SERIES7 64 |
83 | xfile SA1100_XFILE XFILE 65 | 83 | xfile SA1100_XFILE XFILE 65 |
84 | accelent_ep9312 ARCH_ACCELENT_EP9312 ACCELENT_EP9312 66 | 84 | accelent_ep9312 ARCH_ACCELENT_EP9312 ACCELENT_EP9312 66 |
85 | ic200 ARCH_IC200 IC200 67 | 85 | ic200 ARCH_IC200 IC200 67 |
@@ -810,9 +810,9 @@ sb3010 MACH_SB3010 SB3010 795 | |||
810 | rm9200 MACH_RM9200 RM9200 796 | 810 | rm9200 MACH_RM9200 RM9200 796 |
811 | dma03 MACH_DMA03 DMA03 797 | 811 | dma03 MACH_DMA03 DMA03 797 |
812 | road_s101 MACH_ROAD_S101 ROAD_S101 798 | 812 | road_s101 MACH_ROAD_S101 ROAD_S101 798 |
813 | iq_nextgen_a MACH_IQ_NEXTGEN_A IQ_NEXTGEN_A 799 | 813 | iq81340sc MACH_IQ81340SC IQ81340SC 799 |
814 | iq_nextgen_b MACH_IQ_NEXTGEN_B IQ_NEXTGEN_B 800 | 814 | iq_nextgen_b MACH_IQ_NEXTGEN_B IQ_NEXTGEN_B 800 |
815 | iq_nextgen_c MACH_IQ_NEXTGEN_C IQ_NEXTGEN_C 801 | 815 | iq81340mc MACH_IQ81340MC IQ81340MC 801 |
816 | iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802 | 816 | iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802 |
817 | iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803 | 817 | iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803 |
818 | mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804 | 818 | mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804 |
@@ -1165,9 +1165,57 @@ pnx4010 MACH_PNX4010 PNX4010 1151 | |||
1165 | oxnas MACH_OXNAS OXNAS 1152 | 1165 | oxnas MACH_OXNAS OXNAS 1152 |
1166 | fiori MACH_FIORI FIORI 1153 | 1166 | fiori MACH_FIORI FIORI 1153 |
1167 | ml1200 MACH_ML1200 ML1200 1154 | 1167 | ml1200 MACH_ML1200 ML1200 1154 |
1168 | cactus MACH_CACTUS CACTUS 1155 | 1168 | pecos MACH_PECOS PECOS 1155 |
1169 | nb2xxx MACH_NB2XXX NB2XXX 1156 | 1169 | nb2xxx MACH_NB2XXX NB2XXX 1156 |
1170 | hw6900 MACH_HW6900 HW6900 1157 | 1170 | hw6900 MACH_HW6900 HW6900 1157 |
1171 | cdcs_quoll MACH_CDCS_QUOLL CDCS_QUOLL 1158 | 1171 | cdcs_quoll MACH_CDCS_QUOLL CDCS_QUOLL 1158 |
1172 | quicksilver MACH_QUICKSILVER QUICKSILVER 1159 | 1172 | quicksilver MACH_QUICKSILVER QUICKSILVER 1159 |
1173 | uplat926 MACH_UPLAT926 UPLAT926 1160 | 1173 | uplat926 MACH_UPLAT926 UPLAT926 1160 |
1174 | dep2410_dep2410 MACH_DEP2410_THOMAS DEP2410_THOMAS 1161 | ||
1175 | dtk2410 MACH_DTK2410 DTK2410 1162 | ||
1176 | chili MACH_CHILI CHILI 1163 | ||
1177 | demeter MACH_DEMETER DEMETER 1164 | ||
1178 | dionysus MACH_DIONYSUS DIONYSUS 1165 | ||
1179 | as352x MACH_AS352X AS352X 1166 | ||
1180 | service MACH_SERVICE SERVICE 1167 | ||
1181 | cs_e9301 MACH_CS_E9301 CS_E9301 1168 | ||
1182 | micro9m MACH_MICRO9M MICRO9M 1169 | ||
1183 | ia_mospck MACH_IA_MOSPCK IA_MOSPCK 1170 | ||
1184 | ql201b MACH_QL201B QL201B 1171 | ||
1185 | bbm MACH_BBM BBM 1174 | ||
1186 | exxx MACH_EXXX EXXX 1175 | ||
1187 | wma11b MACH_WMA11B WMA11B 1176 | ||
1188 | pelco_atlas MACH_PELCO_ATLAS PELCO_ATLAS 1177 | ||
1189 | g500 MACH_G500 G500 1178 | ||
1190 | bug MACH_BUG BUG 1179 | ||
1191 | mx33ads MACH_MX33ADS MX33ADS 1180 | ||
1192 | chub MACH_CHUB CHUB 1181 | ||
1193 | gta01 MACH_GTA01 GTA01 1182 | ||
1194 | w90n740 MACH_W90N740 W90N740 1183 | ||
1195 | medallion_sa2410 MACH_MEDALLION_SA2410 MEDALLION_SA2410 1184 | ||
1196 | ia_cpu_9200_2 MACH_IA_CPU_9200_2 IA_CPU_9200_2 1185 | ||
1197 | dimmrm9200 MACH_DIMMRM9200 DIMMRM9200 1186 | ||
1198 | pm9261 MACH_PM9261 PM9261 1187 | ||
1199 | mx21 MACH_MX21 MX21 1188 | ||
1200 | ml7304 MACH_ML7304 ML7304 1189 | ||
1201 | ucp250 MACH_UCP250 UCP250 1190 | ||
1202 | intboard MACH_INTBOARD INTBOARD 1191 | ||
1203 | gulfstream MACH_GULFSTREAM GULFSTREAM 1192 | ||
1204 | labquest MACH_LABQUEST LABQUEST 1193 | ||
1205 | vcmx313 MACH_VCMX313 VCMX313 1194 | ||
1206 | urg200 MACH_URG200 URG200 1195 | ||
1207 | cpux255lcdnet MACH_CPUX255LCDNET CPUX255LCDNET 1196 | ||
1208 | netdcu9 MACH_NETDCU9 NETDCU9 1197 | ||
1209 | netdcu10 MACH_NETDCU10 NETDCU10 1198 | ||
1210 | dspg_dga MACH_DSPG_DGA DSPG_DGA 1199 | ||
1211 | dspg_dvw MACH_DSPG_DVW DSPG_DVW 1200 | ||
1212 | solos MACH_SOLOS SOLOS 1201 | ||
1213 | at91sam9263ek MACH_AT91SAM9263EK AT91SAM9263EK 1202 | ||
1214 | osstbox MACH_OSSTBOX OSSTBOX 1203 | ||
1215 | kbat9261 MACH_KBAT9261 KBAT9261 1204 | ||
1216 | ct1100 MACH_CT1100 CT1100 1205 | ||
1217 | akcppxa MACH_AKCPPXA AKCPPXA 1206 | ||
1218 | zevio_1020 MACH_ZEVIO_1020 ZEVIO_1020 1207 | ||
1219 | hitrack MACH_HITRACK HITRACK 1208 | ||
1220 | syme1 MACH_SYME1 SYME1 1209 | ||
1221 | syhl1 MACH_SYHL1 SYHL1 1210 | ||
diff --git a/drivers/char/watchdog/at91rm9200_wdt.c b/drivers/char/watchdog/at91rm9200_wdt.c index 4e7a1145e78f..cb86967e2c5f 100644 --- a/drivers/char/watchdog/at91rm9200_wdt.c +++ b/drivers/char/watchdog/at91rm9200_wdt.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/watchdog.h> | 21 | #include <linux/watchdog.h> |
22 | #include <asm/bitops.h> | 22 | #include <asm/bitops.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <asm/arch/at91_st.h> | ||
24 | 25 | ||
25 | 26 | ||
26 | #define WDT_DEFAULT_TIME 5 /* seconds */ | 27 | #define WDT_DEFAULT_TIME 5 /* seconds */ |
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 510816c16da3..5cbf8b9d5141 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -195,11 +195,11 @@ config I2C_IBM_IIC | |||
195 | will be called i2c-ibm_iic. | 195 | will be called i2c-ibm_iic. |
196 | 196 | ||
197 | config I2C_IOP3XX | 197 | config I2C_IOP3XX |
198 | tristate "Intel IOP3xx and IXP4xx on-chip I2C interface" | 198 | tristate "Intel IOPx3xx and IXP4xx on-chip I2C interface" |
199 | depends on (ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX) && I2C | 199 | depends on (ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || ARCH_IOP13XX) && I2C |
200 | help | 200 | help |
201 | Say Y here if you want to use the IIC bus controller on | 201 | Say Y here if you want to use the IIC bus controller on |
202 | the Intel IOP3xx I/O Processors or IXP4xx Network Processors. | 202 | the Intel IOPx3xx I/O Processors or IXP4xx Network Processors. |
203 | 203 | ||
204 | This driver can also be built as a module. If so, the module | 204 | This driver can also be built as a module. If so, the module |
205 | will be called i2c-iop3xx. | 205 | will be called i2c-iop3xx. |
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index ea41852ec8cd..fbef8da60043 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig | |||
@@ -91,11 +91,11 @@ config MMC_AU1X | |||
91 | 91 | ||
92 | If unsure, say N. | 92 | If unsure, say N. |
93 | 93 | ||
94 | config MMC_AT91RM9200 | 94 | config MMC_AT91 |
95 | tristate "AT91RM9200 SD/MMC Card Interface support" | 95 | tristate "AT91 SD/MMC Card Interface support" |
96 | depends on ARCH_AT91RM9200 && MMC | 96 | depends on ARCH_AT91 && MMC |
97 | help | 97 | help |
98 | This selects the AT91RM9200 MCI controller. | 98 | This selects the AT91 MCI controller. |
99 | 99 | ||
100 | If unsure, say N. | 100 | If unsure, say N. |
101 | 101 | ||
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index acfd4de0aba5..83ffb9326a54 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile | |||
@@ -22,7 +22,7 @@ obj-$(CONFIG_MMC_SDHCI) += sdhci.o | |||
22 | obj-$(CONFIG_MMC_WBSD) += wbsd.o | 22 | obj-$(CONFIG_MMC_WBSD) += wbsd.o |
23 | obj-$(CONFIG_MMC_AU1X) += au1xmmc.o | 23 | obj-$(CONFIG_MMC_AU1X) += au1xmmc.o |
24 | obj-$(CONFIG_MMC_OMAP) += omap.o | 24 | obj-$(CONFIG_MMC_OMAP) += omap.o |
25 | obj-$(CONFIG_MMC_AT91RM9200) += at91_mci.o | 25 | obj-$(CONFIG_MMC_AT91) += at91_mci.o |
26 | obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o | 26 | obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o |
27 | 27 | ||
28 | mmc_core-y := mmc.o mmc_sysfs.o | 28 | mmc_core-y := mmc.o mmc_sysfs.o |
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 494b23fb0a01..41761f7189a6 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -73,8 +73,8 @@ | |||
73 | #include <asm/mach/mmc.h> | 73 | #include <asm/mach/mmc.h> |
74 | #include <asm/arch/board.h> | 74 | #include <asm/arch/board.h> |
75 | #include <asm/arch/gpio.h> | 75 | #include <asm/arch/gpio.h> |
76 | #include <asm/arch/at91rm9200_mci.h> | 76 | #include <asm/arch/at91_mci.h> |
77 | #include <asm/arch/at91rm9200_pdc.h> | 77 | #include <asm/arch/at91_pdc.h> |
78 | 78 | ||
79 | #define DRIVER_NAME "at91_mci" | 79 | #define DRIVER_NAME "at91_mci" |
80 | 80 | ||
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 3bcb7dc32995..697966703512 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/sizes.h> | 24 | #include <asm/sizes.h> |
25 | 25 | ||
26 | #include <asm/arch/at91rm9200.h> | ||
27 | #include <asm/arch/board.h> | 26 | #include <asm/arch/board.h> |
28 | #include <asm/arch/gpio.h> | 27 | #include <asm/arch/gpio.h> |
28 | #include <asm/arch/at91rm9200_mc.h> | ||
29 | 29 | ||
30 | 30 | ||
31 | /* | 31 | /* |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 391a1f4167a4..9217ee6c7865 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/char/at91_serial.c | 2 | * linux/drivers/char/atmel_serial.c |
3 | * | 3 | * |
4 | * Driver for Atmel AT91 / AT32 Serial ports | 4 | * Driver for Atmel AT91 / AT32 Serial ports |
5 | * Copyright (C) 2003 Rick Bronson | 5 | * Copyright (C) 2003 Rick Bronson |
@@ -36,11 +36,11 @@ | |||
36 | 36 | ||
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | 38 | ||
39 | #include <asm/arch/at91rm9200_pdc.h> | ||
40 | #include <asm/mach/serial_at91.h> | 39 | #include <asm/mach/serial_at91.h> |
41 | #include <asm/arch/board.h> | 40 | #include <asm/arch/board.h> |
41 | #include <asm/arch/at91_pdc.h> | ||
42 | #ifdef CONFIG_ARM | 42 | #ifdef CONFIG_ARM |
43 | #include <asm/arch/system.h> | 43 | #include <asm/arch/cpu.h> |
44 | #include <asm/arch/gpio.h> | 44 | #include <asm/arch/gpio.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
@@ -137,8 +137,8 @@ static void atmel_set_mctrl(struct uart_port *port, u_int mctrl) | |||
137 | unsigned int control = 0; | 137 | unsigned int control = 0; |
138 | unsigned int mode; | 138 | unsigned int mode; |
139 | 139 | ||
140 | #ifdef CONFIG_ARM | 140 | #ifdef CONFIG_ARCH_AT91RM9200 |
141 | if (arch_identify() == ARCH_ID_AT91RM9200) { | 141 | if (cpu_is_at91rm9200()) { |
142 | /* | 142 | /* |
143 | * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. | 143 | * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. |
144 | * We need to drive the pin manually. | 144 | * We need to drive the pin manually. |
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h index eced2ad1a8d9..fe1763b2a6d5 100644 --- a/drivers/serial/atmel_serial.h +++ b/drivers/serial/atmel_serial.h | |||
@@ -31,8 +31,8 @@ | |||
31 | #define ATMEL_US_RSTIT (1 << 13) /* Reset Iterations */ | 31 | #define ATMEL_US_RSTIT (1 << 13) /* Reset Iterations */ |
32 | #define ATMEL_US_RSTNACK (1 << 14) /* Reset Non Acknowledge */ | 32 | #define ATMEL_US_RSTNACK (1 << 14) /* Reset Non Acknowledge */ |
33 | #define ATMEL_US_RETTO (1 << 15) /* Rearm Time-out */ | 33 | #define ATMEL_US_RETTO (1 << 15) /* Rearm Time-out */ |
34 | #define ATMEL_US_DTREN (1 << 16) /* Data Terminal Ready Enable */ | 34 | #define ATMEL_US_DTREN (1 << 16) /* Data Terminal Ready Enable [AT91RM9200 only] */ |
35 | #define ATMEL_US_DTRDIS (1 << 17) /* Data Terminal Ready Disable */ | 35 | #define ATMEL_US_DTRDIS (1 << 17) /* Data Terminal Ready Disable [AT91RM9200 only] */ |
36 | #define ATMEL_US_RTSEN (1 << 18) /* Request To Send Enable */ | 36 | #define ATMEL_US_RTSEN (1 << 18) /* Request To Send Enable */ |
37 | #define ATMEL_US_RTSDIS (1 << 19) /* Request To Send Disable */ | 37 | #define ATMEL_US_RTSDIS (1 << 19) /* Request To Send Disable */ |
38 | 38 | ||
@@ -92,9 +92,9 @@ | |||
92 | #define ATMEL_US_TXBUFE (1 << 11) /* Transmission Buffer Empty */ | 92 | #define ATMEL_US_TXBUFE (1 << 11) /* Transmission Buffer Empty */ |
93 | #define ATMEL_US_RXBUFF (1 << 12) /* Reception Buffer Full */ | 93 | #define ATMEL_US_RXBUFF (1 << 12) /* Reception Buffer Full */ |
94 | #define ATMEL_US_NACK (1 << 13) /* Non Acknowledge */ | 94 | #define ATMEL_US_NACK (1 << 13) /* Non Acknowledge */ |
95 | #define ATMEL_US_RIIC (1 << 16) /* Ring Indicator Input Change */ | 95 | #define ATMEL_US_RIIC (1 << 16) /* Ring Indicator Input Change [AT91RM9200 only] */ |
96 | #define ATMEL_US_DSRIC (1 << 17) /* Data Set Ready Input Change */ | 96 | #define ATMEL_US_DSRIC (1 << 17) /* Data Set Ready Input Change [AT91RM9200 only] */ |
97 | #define ATMEL_US_DCDIC (1 << 18) /* Data Carrier Detect Input Change */ | 97 | #define ATMEL_US_DCDIC (1 << 18) /* Data Carrier Detect Input Change [AT91RM9200 only] */ |
98 | #define ATMEL_US_CTSIC (1 << 19) /* Clear to Send Input Change */ | 98 | #define ATMEL_US_CTSIC (1 << 19) /* Clear to Send Input Change */ |
99 | #define ATMEL_US_RI (1 << 20) /* RI */ | 99 | #define ATMEL_US_RI (1 << 20) /* RI */ |
100 | #define ATMEL_US_DSR (1 << 21) /* DSR */ | 100 | #define ATMEL_US_DSR (1 << 21) /* DSR */ |
@@ -106,6 +106,7 @@ | |||
106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ | 106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ |
107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ | 107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ |
108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ | 108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ |
109 | #define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [SAM9 only] */ | ||
109 | 110 | ||
110 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ | 111 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ |
111 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ | 112 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ |
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index f9b1719b9a37..9980a4ddfed9 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig | |||
@@ -24,7 +24,7 @@ config USB_ARCH_HAS_OHCI | |||
24 | default y if ARCH_S3C2410 | 24 | default y if ARCH_S3C2410 |
25 | default y if PXA27x | 25 | default y if PXA27x |
26 | default y if ARCH_EP93XX | 26 | default y if ARCH_EP93XX |
27 | default y if (ARCH_AT91RM9200 || ARCH_AT91SAM9261) | 27 | default y if ARCH_AT91 |
28 | default y if ARCH_PNX4008 | 28 | default y if ARCH_PNX4008 |
29 | # PPC: | 29 | # PPC: |
30 | default y if STB03xxx | 30 | default y if STB03xxx |
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index bbbc82a8336a..4097a86c4b5e 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -189,7 +189,7 @@ config USB_OTG | |||
189 | 189 | ||
190 | config USB_GADGET_AT91 | 190 | config USB_GADGET_AT91 |
191 | boolean "AT91 USB Device Port" | 191 | boolean "AT91 USB Device Port" |
192 | depends on ARCH_AT91RM9200 | 192 | depends on ARCH_AT91 |
193 | select USB_GADGET_SELECTED | 193 | select USB_GADGET_SELECTED |
194 | help | 194 | help |
195 | Many Atmel AT91 processors (such as the AT91RM2000) have a | 195 | Many Atmel AT91 processors (such as the AT91RM2000) have a |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index ea4714e557e4..4776b3bdf9c8 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -935,7 +935,7 @@ MODULE_LICENSE ("GPL"); | |||
935 | #include "ohci-ppc-soc.c" | 935 | #include "ohci-ppc-soc.c" |
936 | #endif | 936 | #endif |
937 | 937 | ||
938 | #if defined(CONFIG_ARCH_AT91RM9200) || defined(CONFIG_ARCH_AT91SAM9261) | 938 | #ifdef CONFIG_ARCH_AT91 |
939 | #include "ohci-at91.c" | 939 | #include "ohci-at91.c" |
940 | #endif | 940 | #endif |
941 | 941 | ||
@@ -952,8 +952,7 @@ MODULE_LICENSE ("GPL"); | |||
952 | || defined (CONFIG_ARCH_EP93XX) \ | 952 | || defined (CONFIG_ARCH_EP93XX) \ |
953 | || defined (CONFIG_SOC_AU1X00) \ | 953 | || defined (CONFIG_SOC_AU1X00) \ |
954 | || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \ | 954 | || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \ |
955 | || defined (CONFIG_ARCH_AT91RM9200) \ | 955 | || defined (CONFIG_ARCH_AT91) \ |
956 | || defined (CONFIG_ARCH_AT91SAM9261) \ | ||
957 | || defined (CONFIG_ARCH_PNX4008) \ | 956 | || defined (CONFIG_ARCH_PNX4008) \ |
958 | ) | 957 | ) |
959 | #error "missing bus glue for ohci-hcd" | 958 | #error "missing bus glue for ohci-hcd" |
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h index 24b51cccde8f..9eceb4148922 100644 --- a/include/asm-arm/arch-aaec2000/memory.h +++ b/include/asm-arm/arch-aaec2000/memory.h | |||
@@ -17,8 +17,6 @@ | |||
17 | #define __virt_to_bus(x) __virt_to_phys(x) | 17 | #define __virt_to_bus(x) __virt_to_phys(x) |
18 | #define __bus_to_virt(x) __phys_to_virt(x) | 18 | #define __bus_to_virt(x) __phys_to_virt(x) |
19 | 19 | ||
20 | #ifdef CONFIG_DISCONTIGMEM | ||
21 | |||
22 | /* | 20 | /* |
23 | * The nodes are the followings: | 21 | * The nodes are the followings: |
24 | * | 22 | * |
@@ -27,42 +25,6 @@ | |||
27 | * node 2: 0xf800.0000 - 0xfbff.ffff | 25 | * node 2: 0xf800.0000 - 0xfbff.ffff |
28 | * node 3: 0xfc00.0000 - 0xffff.ffff | 26 | * node 3: 0xfc00.0000 - 0xffff.ffff |
29 | */ | 27 | */ |
30 | 28 | #define NODE_MEM_SIZE_BITS 26 | |
31 | /* | ||
32 | * Given a kernel address, find the home node of the underlying memory. | ||
33 | */ | ||
34 | #define KVADDR_TO_NID(addr) \ | ||
35 | (((unsigned long)(addr) - PAGE_OFFSET) >> NODE_MAX_MEM_SHIFT) | ||
36 | |||
37 | /* | ||
38 | * Given a page frame number, convert it to a node id. | ||
39 | */ | ||
40 | #define PFN_TO_NID(pfn) \ | ||
41 | (((pfn) - PHYS_PFN_OFFSET) >> (NODE_MAX_MEM_SHIFT - PAGE_SHIFT)) | ||
42 | |||
43 | /* | ||
44 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
45 | * and return the mem_map of that node. | ||
46 | */ | ||
47 | #define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
48 | |||
49 | /* | ||
50 | * Given a page frame number, find the owning node of the memory | ||
51 | * and return the mem_map of that node. | ||
52 | */ | ||
53 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
54 | |||
55 | /* | ||
56 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | ||
57 | * and returns the index corresponding to the appropriate page in the | ||
58 | * node's mem_map. | ||
59 | */ | ||
60 | #define LOCAL_MAP_NR(addr) \ | ||
61 | (((unsigned long)(addr) & (NODE_MAX_MEM_SIZE - 1)) >> PAGE_SHIFT) | ||
62 | |||
63 | #define NODE_MAX_MEM_SHIFT 26 | ||
64 | #define NODE_MAX_MEM_SIZE (1 << NODE_MAX_MEM_SHIFT) | ||
65 | |||
66 | #endif /* CONFIG_DISCONTIGMEM */ | ||
67 | 29 | ||
68 | #endif /* __ASM_ARCH_MEMORY_H */ | 30 | #endif /* __ASM_ARCH_MEMORY_H */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_aic.h b/include/asm-arm/arch-at91rm9200/at91_aic.h new file mode 100644 index 000000000000..267e69812e26 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_aic.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_aic.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Advanced Interrupt Controller (AIC) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_AIC_H | ||
17 | #define AT91_AIC_H | ||
18 | |||
19 | #define AT91_AIC_SMR(n) (AT91_AIC + ((n) * 4)) /* Source Mode Registers 0-31 */ | ||
20 | #define AT91_AIC_PRIOR (7 << 0) /* Priority Level */ | ||
21 | #define AT91_AIC_SRCTYPE (3 << 5) /* Interrupt Source Type */ | ||
22 | #define AT91_AIC_SRCTYPE_LOW (0 << 5) | ||
23 | #define AT91_AIC_SRCTYPE_FALLING (1 << 5) | ||
24 | #define AT91_AIC_SRCTYPE_HIGH (2 << 5) | ||
25 | #define AT91_AIC_SRCTYPE_RISING (3 << 5) | ||
26 | |||
27 | #define AT91_AIC_SVR(n) (AT91_AIC + 0x80 + ((n) * 4)) /* Source Vector Registers 0-31 */ | ||
28 | #define AT91_AIC_IVR (AT91_AIC + 0x100) /* Interrupt Vector Register */ | ||
29 | #define AT91_AIC_FVR (AT91_AIC + 0x104) /* Fast Interrupt Vector Register */ | ||
30 | #define AT91_AIC_ISR (AT91_AIC + 0x108) /* Interrupt Status Register */ | ||
31 | #define AT91_AIC_IRQID (0x1f << 0) /* Current Interrupt Identifier */ | ||
32 | |||
33 | #define AT91_AIC_IPR (AT91_AIC + 0x10c) /* Interrupt Pending Register */ | ||
34 | #define AT91_AIC_IMR (AT91_AIC + 0x110) /* Interrupt Mask Register */ | ||
35 | #define AT91_AIC_CISR (AT91_AIC + 0x114) /* Core Interrupt Status Register */ | ||
36 | #define AT91_AIC_NFIQ (1 << 0) /* nFIQ Status */ | ||
37 | #define AT91_AIC_NIRQ (1 << 1) /* nIRQ Status */ | ||
38 | |||
39 | #define AT91_AIC_IECR (AT91_AIC + 0x120) /* Interrupt Enable Command Register */ | ||
40 | #define AT91_AIC_IDCR (AT91_AIC + 0x124) /* Interrupt Disable Command Register */ | ||
41 | #define AT91_AIC_ICCR (AT91_AIC + 0x128) /* Interrupt Clear Command Register */ | ||
42 | #define AT91_AIC_ISCR (AT91_AIC + 0x12c) /* Interrupt Set Command Register */ | ||
43 | #define AT91_AIC_EOICR (AT91_AIC + 0x130) /* End of Interrupt Command Register */ | ||
44 | #define AT91_AIC_SPU (AT91_AIC + 0x134) /* Spurious Interrupt Vector Register */ | ||
45 | #define AT91_AIC_DCR (AT91_AIC + 0x138) /* Debug Control Register */ | ||
46 | #define AT91_AIC_DCR_PROT (1 << 0) /* Protection Mode */ | ||
47 | #define AT91_AIC_DCR_GMSK (1 << 1) /* General Mask */ | ||
48 | |||
49 | #define AT91_AIC_FFER (AT91_AIC + 0x140) /* Fast Forcing Enable Register [SAM9 only] */ | ||
50 | #define AT91_AIC_FFDR (AT91_AIC + 0x144) /* Fast Forcing Disable Register [SAM9 only] */ | ||
51 | #define AT91_AIC_FFSR (AT91_AIC + 0x148) /* Fast Forcing Status Register [SAM9 only] */ | ||
52 | |||
53 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_dbgu.h b/include/asm-arm/arch-at91rm9200/at91_dbgu.h new file mode 100644 index 000000000000..e4b8b27acfca --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_dbgu.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_dbgu.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Debug Unit (DBGU) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_DBGU_H | ||
17 | #define AT91_DBGU_H | ||
18 | |||
19 | #define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */ | ||
20 | #define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */ | ||
21 | #define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */ | ||
22 | #define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */ | ||
23 | #define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */ | ||
24 | #define AT91_DBGU_IDR (AT91_DBGU + 0x0c) /* Interrupt Disable Register */ | ||
25 | #define AT91_DBGU_IMR (AT91_DBGU + 0x10) /* Interrupt Mask Register */ | ||
26 | #define AT91_DBGU_SR (AT91_DBGU + 0x14) /* Status Register */ | ||
27 | #define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ | ||
28 | #define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ | ||
29 | #define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ | ||
30 | |||
31 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ | ||
32 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ | ||
33 | #define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ | ||
34 | #define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ | ||
35 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ | ||
36 | #define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ | ||
37 | #define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ | ||
38 | #define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ | ||
39 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ | ||
40 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ | ||
41 | |||
42 | #define AT91_DBGU_FNR (AT91_DBGU + 0x48) /* Force NTRST Register [SAM9 only] */ | ||
43 | #define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */ | ||
44 | |||
45 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_ecc.h b/include/asm-arm/arch-at91rm9200/at91_ecc.h new file mode 100644 index 000000000000..fddf256a98d3 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_ecc.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_ecc.h | ||
3 | * | ||
4 | * Error Corrected Code Controller (ECC) - System peripherals regsters. | ||
5 | * Based on AT91SAM9260 datasheet revision B. | ||
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 AT91_ECC_H | ||
14 | #define AT91_ECC_H | ||
15 | |||
16 | #define AT91_ECC_CR (AT91_ECC + 0x00) /* Control register */ | ||
17 | #define AT91_ECC_RST (1 << 0) /* Reset parity */ | ||
18 | |||
19 | #define AT91_ECC_MR (AT91_ECC + 0x04) /* Mode register */ | ||
20 | #define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */ | ||
21 | #define AT91_ECC_PAGESIZE_528 (0) | ||
22 | #define AT91_ECC_PAGESIZE_1056 (1) | ||
23 | #define AT91_ECC_PAGESIZE_2112 (2) | ||
24 | #define AT91_ECC_PAGESIZE_4224 (3) | ||
25 | |||
26 | #define AT91_ECC_SR (AT91_ECC + 0x08) /* Status register */ | ||
27 | #define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */ | ||
28 | #define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */ | ||
29 | #define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */ | ||
30 | |||
31 | #define AT91_ECC_PR (AT91_ECC + 0x0c) /* Parity register */ | ||
32 | #define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */ | ||
33 | #define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */ | ||
34 | |||
35 | #define AT91_ECC_NPR (AT91_ECC + 0x10) /* NParity register */ | ||
36 | #define AT91_ECC_NPARITY (0xffff << 0) /* NParity */ | ||
37 | |||
38 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_lcdc.h b/include/asm-arm/arch-at91rm9200/at91_lcdc.h new file mode 100644 index 000000000000..9cbfcdd3c471 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_lcdc.h | |||
@@ -0,0 +1,148 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_lcdc.h | ||
3 | * | ||
4 | * LCD Controller (LCDC). | ||
5 | * Based on AT91SAM9261 datasheet revision E. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_LCDC_H | ||
14 | #define AT91_LCDC_H | ||
15 | |||
16 | #define AT91_LCDC_DMABADDR1 0x00 /* DMA Base Address Register 1 */ | ||
17 | #define AT91_LCDC_DMABADDR2 0x04 /* DMA Base Address Register 2 */ | ||
18 | #define AT91_LCDC_DMAFRMPT1 0x08 /* DMA Frame Pointer Register 1 */ | ||
19 | #define AT91_LCDC_DMAFRMPT2 0x0c /* DMA Frame Pointer Register 2 */ | ||
20 | #define AT91_LCDC_DMAFRMADD1 0x10 /* DMA Frame Address Register 1 */ | ||
21 | #define AT91_LCDC_DMAFRMADD2 0x14 /* DMA Frame Address Register 2 */ | ||
22 | |||
23 | #define AT91_LCDC_DMAFRMCFG 0x18 /* DMA Frame Configuration Register */ | ||
24 | #define AT91_LCDC_FRSIZE (0x7fffff << 0) /* Frame Size */ | ||
25 | #define AT91_LCDC_BLENGTH (0x7f << 24) /* Burst Length */ | ||
26 | |||
27 | #define AT91_LCDC_DMACON 0x1c /* DMA Control Register */ | ||
28 | #define AT91_LCDC_DMAEN (0x1 << 0) /* DMA Enable */ | ||
29 | #define AT91_LCDC_DMARST (0x1 << 1) /* DMA Reset */ | ||
30 | #define AT91_LCDC_DMABUSY (0x1 << 2) /* DMA Busy */ | ||
31 | |||
32 | #define AT91_LCDC_LCDCON1 0x0800 /* LCD Control Register 1 */ | ||
33 | #define AT91_LCDC_BYPASS (1 << 0) /* Bypass lcd_dotck divider */ | ||
34 | #define AT91_LCDC_CLKVAL (0x1ff << 12) /* Clock Divider */ | ||
35 | #define AT91_LCDC_LINCNT (0x7ff << 21) /* Line Counter */ | ||
36 | |||
37 | #define AT91_LCDC_LCDCON2 0x0804 /* LCD Control Register 2 */ | ||
38 | #define AT91_LCDC_DISTYPE (3 << 0) /* Display Type */ | ||
39 | #define AT91_LCDC_DISTYPE_STNMONO (0 << 0) | ||
40 | #define AT91_LCDC_DISTYPE_STNCOLOR (1 << 0) | ||
41 | #define AT91_LCDC_DISTYPE_TFT (2 << 0) | ||
42 | #define AT91_LCDC_SCANMOD (1 << 2) /* Scan Mode */ | ||
43 | #define AT91_LCDC_SCANMOD_SINGLE (0 << 2) | ||
44 | #define AT91_LCDC_SCANMOD_DUAL (1 << 2) | ||
45 | #define AT91_LCDC_IFWIDTH (3 << 3) /*Interface Width */ | ||
46 | #define AT91_LCDC_IFWIDTH_4 (0 << 3) | ||
47 | #define AT91_LCDC_IFWIDTH_8 (1 << 3) | ||
48 | #define AT91_LCDC_IFWIDTH_16 (2 << 3) | ||
49 | #define AT91_LCDC_PIXELSIZE (7 << 5) /* Bits per pixel */ | ||
50 | #define AT91_LCDC_PIXELSIZE_1 (0 << 5) | ||
51 | #define AT91_LCDC_PIXELSIZE_2 (1 << 5) | ||
52 | #define AT91_LCDC_PIXELSIZE_4 (2 << 5) | ||
53 | #define AT91_LCDC_PIXELSIZE_8 (3 << 5) | ||
54 | #define AT91_LCDC_PIXELSIZE_16 (4 << 5) | ||
55 | #define AT91_LCDC_PIXELSIZE_24 (5 << 5) | ||
56 | #define AT91_LCDC_INVVD (1 << 8) /* LCD Data polarity */ | ||
57 | #define AT91_LCDC_INVVD_NORMAL (0 << 8) | ||
58 | #define AT91_LCDC_INVVD_INVERTED (1 << 8) | ||
59 | #define AT91_LCDC_INVFRAME (1 << 9 ) /* LCD VSync polarity */ | ||
60 | #define AT91_LCDC_INVFRAME_NORMAL (0 << 9) | ||
61 | #define AT91_LCDC_INVFRAME_INVERTED (1 << 9) | ||
62 | #define AT91_LCDC_INVLINE (1 << 10) /* LCD HSync polarity */ | ||
63 | #define AT91_LCDC_INVLINE_NORMAL (0 << 10) | ||
64 | #define AT91_LCDC_INVLINE_INVERTED (1 << 10) | ||
65 | #define AT91_LCDC_INVCLK (1 << 11) /* LCD dotclk polarity */ | ||
66 | #define AT91_LCDC_INVCLK_NORMAL (0 << 11) | ||
67 | #define AT91_LCDC_INVCLK_INVERTED (1 << 11) | ||
68 | #define AT91_LCDC_INVDVAL (1 << 12) /* LCD dval polarity */ | ||
69 | #define AT91_LCDC_INVDVAL_NORMAL (0 << 12) | ||
70 | #define AT91_LCDC_INVDVAL_INVERTED (1 << 12) | ||
71 | #define AT91_LCDC_CLKMOD (1 << 15) /* LCD dotclk mode */ | ||
72 | #define AT91_LCDC_CLKMOD_ACTIVEDISPLAY (0 << 15) | ||
73 | #define AT91_LCDC_CLKMOD_ALWAYSACTIVE (1 << 15) | ||
74 | #define AT91_LCDC_MEMOR (1 << 31) /* Memory Ordering Format */ | ||
75 | #define AT91_LCDC_MEMOR_BIG (0 << 31) | ||
76 | #define AT91_LCDC_MEMOR_LITTLE (1 << 31) | ||
77 | |||
78 | #define AT91_LCDC_TIM1 0x0808 /* LCD Timing Register 1 */ | ||
79 | #define AT91_LCDC_VFP (0xff << 0) /* Vertical Front Porch */ | ||
80 | #define AT91_LCDC_VBP (0xff << 8) /* Vertical Back Porch */ | ||
81 | #define AT91_LCDC_VPW (0x3f << 16) /* Vertical Synchronization Pulse Width */ | ||
82 | #define AT91_LCDC_VHDLY (0xf << 24) /* Vertical to Horizontal Delay */ | ||
83 | |||
84 | #define AT91_LCDC_TIM2 0x080c /* LCD Timing Register 2 */ | ||
85 | #define AT91_LCDC_HBP (0xff << 0) /* Horizontal Back Porch */ | ||
86 | #define AT91_LCDC_HPW (0x3f << 8) /* Horizontal Synchronization Pulse Width */ | ||
87 | #define AT91_LCDC_HFP (0x7ff << 21) /* Horizontal Front Porch */ | ||
88 | |||
89 | #define AT91_LCDC_LCDFRMCFG 0x0810 /* LCD Frame Configuration Register */ | ||
90 | #define AT91_LCDC_LINEVAL (0x7ff << 0) /* Vertical Size of LCD Module */ | ||
91 | #define AT91_LCDC_HOZVAL (0x7ff << 21) /* Horizontal Size of LCD Module */ | ||
92 | |||
93 | #define AT91_LCDC_FIFO 0x0814 /* LCD FIFO Register */ | ||
94 | #define AT91_LCDC_FIFOTH (0xffff) /* FIFO Threshold */ | ||
95 | |||
96 | #define AT91_LCDC_DP1_2 0x081c /* Dithering Pattern DP1_2 Register */ | ||
97 | #define AT91_LCDC_DP4_7 0x0820 /* Dithering Pattern DP4_7 Register */ | ||
98 | #define AT91_LCDC_DP3_5 0x0824 /* Dithering Pattern DP3_5 Register */ | ||
99 | #define AT91_LCDC_DP2_3 0x0828 /* Dithering Pattern DP2_3 Register */ | ||
100 | #define AT91_LCDC_DP5_7 0x082c /* Dithering Pattern DP5_7 Register */ | ||
101 | #define AT91_LCDC_DP3_4 0x0830 /* Dithering Pattern DP3_4 Register */ | ||
102 | #define AT91_LCDC_DP4_5 0x0834 /* Dithering Pattern DP4_5 Register */ | ||
103 | #define AT91_LCDC_DP6_7 0x0838 /* Dithering Pattern DP6_7 Register */ | ||
104 | #define AT91_LCDC_DP1_2_VAL (0xff) | ||
105 | #define AT91_LCDC_DP4_7_VAL (0xfffffff) | ||
106 | #define AT91_LCDC_DP3_5_VAL (0xfffff) | ||
107 | #define AT91_LCDC_DP2_3_VAL (0xfff) | ||
108 | #define AT91_LCDC_DP5_7_VAL (0xfffffff) | ||
109 | #define AT91_LCDC_DP3_4_VAL (0xffff) | ||
110 | #define AT91_LCDC_DP4_5_VAL (0xfffff) | ||
111 | #define AT91_LCDC_DP6_7_VAL (0xfffffff) | ||
112 | |||
113 | #define AT91_LCDC_PWRCON 0x083c /* Power Control Register */ | ||
114 | #define AT91_LCDC_PWR (1 << 0) /* LCD Module Power Control */ | ||
115 | #define AT91_LCDC_GUARDT (0x7f << 1) /* Delay in Frame Period */ | ||
116 | #define AT91_LCDC_BUSY (1 << 31) /* LCD Busy */ | ||
117 | |||
118 | #define AT91_LCDC_CONTRAST_CTR 0x0840 /* Contrast Control Register */ | ||
119 | #define AT91_LCDC_PS (3 << 0) /* Contrast Counter Prescaler */ | ||
120 | #define AT91_LCDC_PS_DIV1 (0 << 0) | ||
121 | #define AT91_LCDC_PS_DIV2 (1 << 0) | ||
122 | #define AT91_LCDC_PS_DIV4 (2 << 0) | ||
123 | #define AT91_LCDC_PS_DIV8 (3 << 0) | ||
124 | #define AT91_LCDC_POL (1 << 2) /* Polarity of output Pulse */ | ||
125 | #define AT91_LCDC_POL_NEGATIVE (0 << 2) | ||
126 | #define AT91_LCDC_POL_POSITIVE (1 << 2) | ||
127 | #define AT91_LCDC_ENA (1 << 3) /* PWM generator Control */ | ||
128 | #define AT91_LCDC_ENA_PWMDISABLE (0 << 3) | ||
129 | #define AT91_LCDC_ENA_PWMENABLE (1 << 3) | ||
130 | |||
131 | #define AT91_LCDC_CONTRAST_VAL 0x0844 /* Contrast Value Register */ | ||
132 | #define AT91_LCDC_CVAL (0xff) /* PWM compare value */ | ||
133 | |||
134 | #define AT91_LCDC_IER 0x0848 /* Interrupt Enable Register */ | ||
135 | #define AT91_LCDC_IDR 0x084c /* Interrupt Disable Register */ | ||
136 | #define AT91_LCDC_IMR 0x0850 /* Interrupt Mask Register */ | ||
137 | #define AT91_LCDC_ISR 0x0854 /* Interrupt Enable Register */ | ||
138 | #define AT91_LCDC_ICR 0x0858 /* Interrupt Clear Register */ | ||
139 | #define AT91_LCDC_LNI (1 << 0) /* Line Interrupt */ | ||
140 | #define AT91_LCDC_LSTLNI (1 << 1) /* Last Line Interrupt */ | ||
141 | #define AT91_LCDC_EOFI (1 << 2) /* DMA End Of Frame Interrupt */ | ||
142 | #define AT91_LCDC_UFLWI (1 << 4) /* FIFO Underflow Interrupt */ | ||
143 | #define AT91_LCDC_OWRI (1 << 5) /* FIFO Overwrite Interrupt */ | ||
144 | #define AT91_LCDC_MERI (1 << 6) /* DMA Memory Error Interrupt */ | ||
145 | |||
146 | #define AT91_LCDC_LUT_(n) (0x0c00 + ((n)*4)) /* Palette Entry 0..255 */ | ||
147 | |||
148 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h b/include/asm-arm/arch-at91rm9200/at91_mci.h index f28636d61e39..9a552cb743c0 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h +++ b/include/asm-arm/arch-at91rm9200/at91_mci.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_mci.h | 2 | * include/asm-arm/arch-at91rm9200/at91_mci.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
6 | * | 6 | * |
7 | * MultiMedia Card Interface (MCI) registers. | 7 | * MultiMedia Card Interface (MCI) registers. |
8 | * Based on AT91RM9200 datasheet revision E. | 8 | * Based on AT91RM9200 datasheet revision F. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_MCI_H | 16 | #ifndef AT91_MCI_H |
17 | #define AT91RM9200_MCI_H | 17 | #define AT91_MCI_H |
18 | 18 | ||
19 | #define AT91_MCI_CR 0x00 /* Control Register */ | 19 | #define AT91_MCI_CR 0x00 /* Control Register */ |
20 | #define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */ | 20 | #define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */ |
@@ -25,10 +25,10 @@ | |||
25 | 25 | ||
26 | #define AT91_MCI_MR 0x04 /* Mode Register */ | 26 | #define AT91_MCI_MR 0x04 /* Mode Register */ |
27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ | 27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ |
28 | #define AT91_MCI_PWSDIV (3 << 8) /* Power Saving Divider */ | 28 | #define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */ |
29 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ | 29 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ |
30 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ | 30 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ |
31 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ | 31 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ |
32 | 32 | ||
33 | #define AT91_MCI_DTOR 0x08 /* Data Timeout Register */ | 33 | #define AT91_MCI_DTOR 0x08 /* Data Timeout Register */ |
34 | #define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */ | 34 | #define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */ |
@@ -43,8 +43,8 @@ | |||
43 | #define AT91_MCI_DTOMUL_1M (7 << 4) | 43 | #define AT91_MCI_DTOMUL_1M (7 << 4) |
44 | 44 | ||
45 | #define AT91_MCI_SDCR 0x0c /* SD Card Register */ | 45 | #define AT91_MCI_SDCR 0x0c /* SD Card Register */ |
46 | #define AT91_MCI_SDCSEL (0xf << 0) /* SD Card Selector */ | 46 | #define AT91_MCI_SDCSEL (3 << 0) /* SD Card Selector */ |
47 | #define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */ | 47 | #define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */ |
48 | 48 | ||
49 | #define AT91_MCI_ARGR 0x10 /* Argument Register */ | 49 | #define AT91_MCI_ARGR 0x10 /* Argument Register */ |
50 | 50 | ||
@@ -78,18 +78,20 @@ | |||
78 | 78 | ||
79 | #define AT91_MCI_SR 0x40 /* Status Register */ | 79 | #define AT91_MCI_SR 0x40 /* Status Register */ |
80 | #define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */ | 80 | #define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */ |
81 | #define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */ | 81 | #define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */ |
82 | #define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */ | 82 | #define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */ |
83 | #define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */ | 83 | #define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */ |
84 | #define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */ | 84 | #define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */ |
85 | #define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */ | 85 | #define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */ |
86 | #define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */ | 86 | #define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */ |
87 | #define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */ | 87 | #define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */ |
88 | #define AT91_MCI_SDIOIRQA (1 << 8) /* SDIO Interrupt for Slot A */ | ||
89 | #define At91_MCI_SDIOIRQB (1 << 9) /* SDIO Interrupt for Slot B [AT91RM9200 only] */ | ||
88 | #define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */ | 90 | #define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */ |
89 | #define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */ | 91 | #define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */ |
90 | #define AT91_MCI_RINDE (1 << 16) /* Response Index Error */ | 92 | #define AT91_MCI_RINDE (1 << 16) /* Response Index Error */ |
91 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ | 93 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ |
92 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ | 94 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ |
93 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ | 95 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ |
94 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ | 96 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ |
95 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ | 97 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ |
diff --git a/include/asm-avr32/arch-at32ap/at91rm9200_pdc.h b/include/asm-arm/arch-at91rm9200/at91_pdc.h index ce1150d4438d..79d6e02fa45e 100644 --- a/include/asm-avr32/arch-at32ap/at91rm9200_pdc.h +++ b/include/asm-arm/arch-at91rm9200/at91_pdc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_pdc.h | 2 | * include/asm-arm/arch-at91rm9200/at91_pdc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_PDC_H | 16 | #ifndef AT91_PDC_H |
17 | #define AT91RM9200_PDC_H | 17 | #define AT91_PDC_H |
18 | 18 | ||
19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ | 19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ |
20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ | 20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pio.h b/include/asm-arm/arch-at91rm9200/at91_pio.h new file mode 100644 index 000000000000..680eaa1f5915 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_pio.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_pio.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Parallel I/O Controller (PIO) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_PIO_H | ||
17 | #define AT91_PIO_H | ||
18 | |||
19 | #define PIO_PER 0x00 /* Enable Register */ | ||
20 | #define PIO_PDR 0x04 /* Disable Register */ | ||
21 | #define PIO_PSR 0x08 /* Status Register */ | ||
22 | #define PIO_OER 0x10 /* Output Enable Register */ | ||
23 | #define PIO_ODR 0x14 /* Output Disable Register */ | ||
24 | #define PIO_OSR 0x18 /* Output Status Register */ | ||
25 | #define PIO_IFER 0x20 /* Glitch Input Filter Enable */ | ||
26 | #define PIO_IFDR 0x24 /* Glitch Input Filter Disable */ | ||
27 | #define PIO_IFSR 0x28 /* Glitch Input Filter Status */ | ||
28 | #define PIO_SODR 0x30 /* Set Output Data Register */ | ||
29 | #define PIO_CODR 0x34 /* Clear Output Data Register */ | ||
30 | #define PIO_ODSR 0x38 /* Output Data Status Register */ | ||
31 | #define PIO_PDSR 0x3c /* Pin Data Status Register */ | ||
32 | #define PIO_IER 0x40 /* Interrupt Enable Register */ | ||
33 | #define PIO_IDR 0x44 /* Interrupt Disable Register */ | ||
34 | #define PIO_IMR 0x48 /* Interrupt Mask Register */ | ||
35 | #define PIO_ISR 0x4c /* Interrupt Status Register */ | ||
36 | #define PIO_MDER 0x50 /* Multi-driver Enable Register */ | ||
37 | #define PIO_MDDR 0x54 /* Multi-driver Disable Register */ | ||
38 | #define PIO_MDSR 0x58 /* Multi-driver Status Register */ | ||
39 | #define PIO_PUDR 0x60 /* Pull-up Disable Register */ | ||
40 | #define PIO_PUER 0x64 /* Pull-up Enable Register */ | ||
41 | #define PIO_PUSR 0x68 /* Pull-up Status Register */ | ||
42 | #define PIO_ASR 0x70 /* Peripheral A Select Register */ | ||
43 | #define PIO_BSR 0x74 /* Peripheral B Select Register */ | ||
44 | #define PIO_ABSR 0x78 /* AB Status Register */ | ||
45 | #define PIO_OWER 0xa0 /* Output Write Enable Register */ | ||
46 | #define PIO_OWDR 0xa4 /* Output Write Disable Register */ | ||
47 | #define PIO_OWSR 0xa8 /* Output Write Status Register */ | ||
48 | |||
49 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_pit.h b/include/asm-arm/arch-at91rm9200/at91_pit.h new file mode 100644 index 000000000000..4a30d009c588 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_pit.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_pit.h | ||
3 | * | ||
4 | * Periodic Interval Timer (PIT) - System peripherals regsters. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_PIT_H | ||
14 | #define AT91_PIT_H | ||
15 | |||
16 | #define AT91_PIT_MR (AT91_PIT + 0x00) /* Mode Register */ | ||
17 | #define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */ | ||
18 | #define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */ | ||
19 | #define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */ | ||
20 | |||
21 | #define AT91_PIT_SR (AT91_PIT + 0x04) /* Status Register */ | ||
22 | #define AT91_PIT_PITS (1 << 0) /* Timer Status */ | ||
23 | |||
24 | #define AT91_PIT_PIVR (AT91_PIT + 0x08) /* Periodic Interval Value Register */ | ||
25 | #define AT91_PIT_PIIR (AT91_PIT + 0x0c) /* Periodic Interval Image Register */ | ||
26 | #define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */ | ||
27 | #define AT91_PIT_CPIV (0xfffff) /* Inverval Value */ | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_pmc.h b/include/asm-arm/arch-at91rm9200/at91_pmc.h new file mode 100644 index 000000000000..de8c3da74a01 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_pmc.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_pmc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Power Management Controller (PMC) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_PMC_H | ||
17 | #define AT91_PMC_H | ||
18 | |||
19 | #define AT91_PMC_SCER (AT91_PMC + 0x00) /* System Clock Enable Register */ | ||
20 | #define AT91_PMC_SCDR (AT91_PMC + 0x04) /* System Clock Disable Register */ | ||
21 | |||
22 | #define AT91_PMC_SCSR (AT91_PMC + 0x08) /* System Clock Status Register */ | ||
23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ | ||
24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ | ||
25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ | ||
26 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ | ||
27 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ | ||
28 | #define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */ | ||
29 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ | ||
30 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ | ||
31 | #define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */ | ||
32 | #define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */ | ||
33 | #define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */ | ||
34 | #define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */ | ||
35 | |||
36 | #define AT91_PMC_PCER (AT91_PMC + 0x10) /* Peripheral Clock Enable Register */ | ||
37 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ | ||
38 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | ||
39 | |||
40 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */ | ||
41 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | ||
42 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */ | ||
43 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ | ||
44 | |||
45 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ | ||
46 | #define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */ | ||
47 | #define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */ | ||
48 | |||
49 | #define AT91_CKGR_PLLAR (AT91_PMC + 0x28) /* PLL A Register */ | ||
50 | #define AT91_CKGR_PLLBR (AT91_PMC + 0x2c) /* PLL B Register */ | ||
51 | #define AT91_PMC_DIV (0xff << 0) /* Divider */ | ||
52 | #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ | ||
53 | #define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */ | ||
54 | #define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */ | ||
55 | #define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */ | ||
56 | |||
57 | #define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */ | ||
58 | #define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */ | ||
59 | #define AT91_PMC_CSS_SLOW (0 << 0) | ||
60 | #define AT91_PMC_CSS_MAIN (1 << 0) | ||
61 | #define AT91_PMC_CSS_PLLA (2 << 0) | ||
62 | #define AT91_PMC_CSS_PLLB (3 << 0) | ||
63 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ | ||
64 | #define AT91_PMC_PRES_1 (0 << 2) | ||
65 | #define AT91_PMC_PRES_2 (1 << 2) | ||
66 | #define AT91_PMC_PRES_4 (2 << 2) | ||
67 | #define AT91_PMC_PRES_8 (3 << 2) | ||
68 | #define AT91_PMC_PRES_16 (4 << 2) | ||
69 | #define AT91_PMC_PRES_32 (5 << 2) | ||
70 | #define AT91_PMC_PRES_64 (6 << 2) | ||
71 | #define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */ | ||
72 | #define AT91_PMC_MDIV_1 (0 << 8) | ||
73 | #define AT91_PMC_MDIV_2 (1 << 8) | ||
74 | #define AT91_PMC_MDIV_3 (2 << 8) | ||
75 | #define AT91_PMC_MDIV_4 (3 << 8) | ||
76 | |||
77 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ | ||
78 | |||
79 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ | ||
80 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ | ||
81 | #define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */ | ||
82 | #define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */ | ||
83 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ | ||
84 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | ||
85 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | ||
86 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | ||
87 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | ||
88 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ | ||
89 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ | ||
90 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ | ||
91 | |||
92 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_rstc.h b/include/asm-arm/arch-at91rm9200/at91_rstc.h new file mode 100644 index 000000000000..ccdc52da973d --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_rstc.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_rstc.h | ||
3 | * | ||
4 | * Reset Controller (RSTC) - System peripherals regsters. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_RSTC_H | ||
14 | #define AT91_RSTC_H | ||
15 | |||
16 | #define AT91_RSTC_CR (AT91_RSTC + 0x00) /* Reset Controller Control Register */ | ||
17 | #define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */ | ||
18 | #define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */ | ||
19 | #define AT91_RSTC_EXTRST (1 << 3) /* External Reset */ | ||
20 | #define AT01_RSTC_KEY (0xff << 24) /* KEY Password */ | ||
21 | |||
22 | #define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */ | ||
23 | #define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */ | ||
24 | #define AT91_RSTC_RSTTYP (7 << 8) /* Reset Type */ | ||
25 | #define AT91_RSTC_RSTTYP_GENERAL (0 << 8) | ||
26 | #define AT91_RSTC_RSTTYP_WAKEUP (1 << 8) | ||
27 | #define AT91_RSTC_RSTTYP_WATCHDOG (2 << 8) | ||
28 | #define AT91_RSTC_RSTTYP_SOFTWARE (3 << 8) | ||
29 | #define AT91_RSTC_RSTTYP_USER (4 << 8) | ||
30 | #define AT91_RSTC_NRSTL (1 << 16) /* NRST Pin Level */ | ||
31 | #define AT91_RSTC_SRCMP (1 << 17) /* Software Reset Command in Progress */ | ||
32 | |||
33 | #define AT91_RSTC_MR (AT91_RSTC + 0x08) /* Reset Controller Mode Register */ | ||
34 | #define AT91_RSTC_URSTEN (1 << 0) /* User Reset Enable */ | ||
35 | #define AT91_RSTC_URSTIEN (1 << 4) /* User Reset Interrupt Enable */ | ||
36 | #define AT91_RSTC_ERSTL (0xf << 8) /* External Reset Length */ | ||
37 | #define AT91_RSTC_KEY (0xff << 24) /* KEY Password */ | ||
38 | |||
39 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_rtc.h b/include/asm-arm/arch-at91rm9200/at91_rtc.h new file mode 100644 index 000000000000..6e5065d56260 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_rtc.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_rtc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Real Time Clock (RTC) - System peripheral registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_RTC_H | ||
17 | #define AT91_RTC_H | ||
18 | |||
19 | #define AT91_RTC_CR (AT91_RTC + 0x00) /* Control Register */ | ||
20 | #define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */ | ||
21 | #define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */ | ||
22 | #define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */ | ||
23 | #define AT91_RTC_TIMEVSEL_MINUTE (0 << 8) | ||
24 | #define AT91_RTC_TIMEVSEL_HOUR (1 << 8) | ||
25 | #define AT91_RTC_TIMEVSEL_DAY24 (2 << 8) | ||
26 | #define AT91_RTC_TIMEVSEL_DAY12 (3 << 8) | ||
27 | #define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */ | ||
28 | #define AT91_RTC_CALEVSEL_WEEK (0 << 16) | ||
29 | #define AT91_RTC_CALEVSEL_MONTH (1 << 16) | ||
30 | #define AT91_RTC_CALEVSEL_YEAR (2 << 16) | ||
31 | |||
32 | #define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */ | ||
33 | #define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */ | ||
34 | |||
35 | #define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */ | ||
36 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ | ||
37 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ | ||
38 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ | ||
39 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ | ||
40 | |||
41 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ | ||
42 | #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ | ||
43 | #define AT91_RTC_YEAR (0xff << 8) /* Current Year */ | ||
44 | #define AT91_RTC_MONTH (0x1f << 16) /* Current Month */ | ||
45 | #define AT91_RTC_DAY (7 << 21) /* Current Day */ | ||
46 | #define AT91_RTC_DATE (0x3f << 24) /* Current Date */ | ||
47 | |||
48 | #define AT91_RTC_TIMALR (AT91_RTC + 0x10) /* Time Alarm Register */ | ||
49 | #define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */ | ||
50 | #define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */ | ||
51 | #define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */ | ||
52 | |||
53 | #define AT91_RTC_CALALR (AT91_RTC + 0x14) /* Calendar Alarm Register */ | ||
54 | #define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */ | ||
55 | #define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */ | ||
56 | |||
57 | #define AT91_RTC_SR (AT91_RTC + 0x18) /* Status Register */ | ||
58 | #define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */ | ||
59 | #define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */ | ||
60 | #define AT91_RTC_SECEV (1 << 2) /* Second Event */ | ||
61 | #define AT91_RTC_TIMEV (1 << 3) /* Time Event */ | ||
62 | #define AT91_RTC_CALEV (1 << 4) /* Calendar Event */ | ||
63 | |||
64 | #define AT91_RTC_SCCR (AT91_RTC + 0x1c) /* Status Clear Command Register */ | ||
65 | #define AT91_RTC_IER (AT91_RTC + 0x20) /* Interrupt Enable Register */ | ||
66 | #define AT91_RTC_IDR (AT91_RTC + 0x24) /* Interrupt Disable Register */ | ||
67 | #define AT91_RTC_IMR (AT91_RTC + 0x28) /* Interrupt Mask Register */ | ||
68 | |||
69 | #define AT91_RTC_VER (AT91_RTC + 0x2c) /* Valid Entry Register */ | ||
70 | #define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */ | ||
71 | #define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */ | ||
72 | #define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */ | ||
73 | #define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */ | ||
74 | |||
75 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_rtt.h b/include/asm-arm/arch-at91rm9200/at91_rtt.h new file mode 100644 index 000000000000..c6751ba3cccc --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_rtt.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_rtt.h | ||
3 | * | ||
4 | * Real-time Timer (RTT) - System peripherals regsters. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_RTT_H | ||
14 | #define AT91_RTT_H | ||
15 | |||
16 | #define AT91_RTT_MR (AT91_RTT + 0x00) /* Real-time Mode Register */ | ||
17 | #define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */ | ||
18 | #define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ | ||
19 | #define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ | ||
20 | #define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */ | ||
21 | |||
22 | #define AT91_RTT_AR (AT91_RTT + 0x04) /* Real-time Alarm Register */ | ||
23 | #define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */ | ||
24 | |||
25 | #define AT91_RTT_VR (AT91_RTT + 0x08) /* Real-time Value Register */ | ||
26 | #define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */ | ||
27 | |||
28 | #define AT91_RTT_SR (AT91_RTT + 0x0c) /* Real-time Status Register */ | ||
29 | #define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */ | ||
30 | #define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */ | ||
31 | |||
32 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91_shdwc.h b/include/asm-arm/arch-at91rm9200/at91_shdwc.h new file mode 100644 index 000000000000..0439250553c9 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_shdwc.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_shdwc.h | ||
3 | * | ||
4 | * Shutdown Controller (SHDWC) - System peripherals regsters. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_SHDWC_H | ||
14 | #define AT91_SHDWC_H | ||
15 | |||
16 | #define AT91_SHDW_CR (AT91_SHDWC + 0x00) /* Shut Down Control Register */ | ||
17 | #define AT91_SHDW_SHDW (1 << 0) /* Processor Reset */ | ||
18 | #define AT91_SHDW_KEY (0xff << 24) /* KEY Password */ | ||
19 | |||
20 | #define AT91_SHDW_MR (AT91_SHDWC + 0x04) /* Shut Down Mode Register */ | ||
21 | #define AT91_SHDW_WKMODE0 (3 << 0) /* Wake-up 0 Mode Selection */ | ||
22 | #define AT91_SHDW_WKMODE0_NONE 0 | ||
23 | #define AT91_SHDW_WKMODE0_HIGH 1 | ||
24 | #define AT91_SHDW_WKMODE0_LOW 2 | ||
25 | #define AT91_SHDW_WKMODE0_ANYLEVEL 3 | ||
26 | #define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */ | ||
27 | #define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */ | ||
28 | |||
29 | #define AT91_SHDW_SR (AT91_SHDWC + 0x08) /* Shut Down Status Register */ | ||
30 | #define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */ | ||
31 | #define AT91_SHDW_RTTWK (1 << 16) /* Real-time Timer Wake-up */ | ||
32 | |||
33 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h b/include/asm-arm/arch-at91rm9200/at91_spi.h index bff5ea45f604..bec48ca89bba 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h +++ b/include/asm-arm/arch-at91rm9200/at91_spi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_spi.h | 2 | * include/asm-arm/arch-at91rm9200/at91_spi.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_SPI_H | 16 | #ifndef AT91_SPI_H |
17 | #define AT91RM9200_SPI_H | 17 | #define AT91_SPI_H |
18 | 18 | ||
19 | #define AT91_SPI_CR 0x00 /* Control Register */ | 19 | #define AT91_SPI_CR 0x00 /* Control Register */ |
20 | #define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */ | 20 | #define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */ |
@@ -28,7 +28,7 @@ | |||
28 | #define AT91_SPI_PS_FIXED (0 << 1) | 28 | #define AT91_SPI_PS_FIXED (0 << 1) |
29 | #define AT91_SPI_PS_VARIABLE (1 << 1) | 29 | #define AT91_SPI_PS_VARIABLE (1 << 1) |
30 | #define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */ | 30 | #define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */ |
31 | #define AT91_SPI_DIV32 (1 << 3) /* Clock Selection */ | 31 | #define AT91_SPI_DIV32 (1 << 3) /* Clock Selection [AT91RM9200 only] */ |
32 | #define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */ | 32 | #define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */ |
33 | #define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */ | 33 | #define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */ |
34 | #define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ | 34 | #define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h b/include/asm-arm/arch-at91rm9200/at91_ssc.h index ac880227147f..694bcaa8f7c2 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h +++ b/include/asm-arm/arch-at91rm9200/at91_ssc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h | 2 | * include/asm-arm/arch-at91rm9200/at91_ssc.h |
3 | * | 3 | * |
4 | * Copyright (C) SAN People | 4 | * Copyright (C) SAN People |
5 | * | 5 | * |
@@ -12,8 +12,8 @@ | |||
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef AT91RM9200_SSC_H | 15 | #ifndef AT91_SSC_H |
16 | #define AT91RM9200_SSC_H | 16 | #define AT91_SSC_H |
17 | 17 | ||
18 | #define AT91_SSC_CR 0x00 /* Control Register */ | 18 | #define AT91_SSC_CR 0x00 /* Control Register */ |
19 | #define AT91_SSC_RXEN (1 << 0) /* Receive Enable */ | 19 | #define AT91_SSC_RXEN (1 << 0) /* Receive Enable */ |
@@ -36,6 +36,10 @@ | |||
36 | #define AT91_SSC_CKI (1 << 5) /* Clock Inversion */ | 36 | #define AT91_SSC_CKI (1 << 5) /* Clock Inversion */ |
37 | #define AT91_SSC_CKI_FALLING (0 << 5) | 37 | #define AT91_SSC_CKI_FALLING (0 << 5) |
38 | #define AT91_SSC_CK_RISING (1 << 5) | 38 | #define AT91_SSC_CK_RISING (1 << 5) |
39 | #define AT91_SSC_CKG (1 << 6) /* Receive Clock Gating Selection [AT91SAM9261 only] */ | ||
40 | #define AT91_SSC_CKG_NONE (0 << 6) | ||
41 | #define AT91_SSC_CKG_RFLOW (1 << 6) | ||
42 | #define AT91_SSC_CKG_RFHIGH (2 << 6) | ||
39 | #define AT91_SSC_START (0xf << 8) /* Start Selection */ | 43 | #define AT91_SSC_START (0xf << 8) /* Start Selection */ |
40 | #define AT91_SSC_START_CONTINUOUS (0 << 8) | 44 | #define AT91_SSC_START_CONTINUOUS (0 << 8) |
41 | #define AT91_SSC_START_TX_RX (1 << 8) | 45 | #define AT91_SSC_START_TX_RX (1 << 8) |
@@ -45,6 +49,7 @@ | |||
45 | #define AT91_SSC_START_RISING_RF (5 << 8) | 49 | #define AT91_SSC_START_RISING_RF (5 << 8) |
46 | #define AT91_SSC_START_LEVEL_RF (6 << 8) | 50 | #define AT91_SSC_START_LEVEL_RF (6 << 8) |
47 | #define AT91_SSC_START_EDGE_RF (7 << 8) | 51 | #define AT91_SSC_START_EDGE_RF (7 << 8) |
52 | #define AT91_SSC_STOP (1 << 12) /* Receive Stop Selection [AT91SAM9261 only] */ | ||
48 | #define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */ | 53 | #define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */ |
49 | #define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */ | 54 | #define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */ |
50 | 55 | ||
@@ -75,6 +80,9 @@ | |||
75 | #define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */ | 80 | #define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */ |
76 | #define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */ | 81 | #define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */ |
77 | 82 | ||
83 | #define AT91_SSC_RC0R 0x38 /* Receive Compare 0 Register [AT91SAM9261 only] */ | ||
84 | #define AT91_SSC_RC1R 0x3c /* Receive Compare 1 Register [AT91SAM9261 only] */ | ||
85 | |||
78 | #define AT91_SSC_SR 0x40 /* Status Register */ | 86 | #define AT91_SSC_SR 0x40 /* Status Register */ |
79 | #define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */ | 87 | #define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */ |
80 | #define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */ | 88 | #define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */ |
@@ -84,6 +92,8 @@ | |||
84 | #define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */ | 92 | #define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */ |
85 | #define AT91_SSC_ENDRX (1 << 6) /* End of Reception */ | 93 | #define AT91_SSC_ENDRX (1 << 6) /* End of Reception */ |
86 | #define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */ | 94 | #define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */ |
95 | #define AT91_SSC_CP0 (1 << 8) /* Compare 0 [AT91SAM9261 only] */ | ||
96 | #define AT91_SSC_CP1 (1 << 9) /* Compare 1 [AT91SAM9261 only] */ | ||
87 | #define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */ | 97 | #define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */ |
88 | #define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */ | 98 | #define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */ |
89 | #define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */ | 99 | #define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_st.h b/include/asm-arm/arch-at91rm9200/at91_st.h new file mode 100644 index 000000000000..2432ddfc6c47 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_st.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_st.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * System Timer (ST) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_ST_H | ||
17 | #define AT91_ST_H | ||
18 | |||
19 | #define AT91_ST_CR (AT91_ST + 0x00) /* Control Register */ | ||
20 | #define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */ | ||
21 | |||
22 | #define AT91_ST_PIMR (AT91_ST + 0x04) /* Period Interval Mode Register */ | ||
23 | #define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */ | ||
24 | |||
25 | #define AT91_ST_WDMR (AT91_ST + 0x08) /* Watchdog Mode Register */ | ||
26 | #define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */ | ||
27 | #define AT91_ST_RSTEN (1 << 16) /* Reset Enable */ | ||
28 | #define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */ | ||
29 | |||
30 | #define AT91_ST_RTMR (AT91_ST + 0x0c) /* Real-time Mode Register */ | ||
31 | #define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */ | ||
32 | |||
33 | #define AT91_ST_SR (AT91_ST + 0x10) /* Status Register */ | ||
34 | #define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */ | ||
35 | #define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */ | ||
36 | #define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */ | ||
37 | #define AT91_ST_ALMS (1 << 3) /* Alarm Status */ | ||
38 | |||
39 | #define AT91_ST_IER (AT91_ST + 0x14) /* Interrupt Enable Register */ | ||
40 | #define AT91_ST_IDR (AT91_ST + 0x18) /* Interrupt Disable Register */ | ||
41 | #define AT91_ST_IMR (AT91_ST + 0x1c) /* Interrupt Mask Register */ | ||
42 | |||
43 | #define AT91_ST_RTAR (AT91_ST + 0x20) /* Real-time Alarm Register */ | ||
44 | #define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */ | ||
45 | |||
46 | #define AT91_ST_CRTR (AT91_ST + 0x24) /* Current Real-time Register */ | ||
47 | #define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */ | ||
48 | |||
49 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h b/include/asm-arm/arch-at91rm9200/at91_tc.h index f4da752bb0c8..8d06eb078e1d 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h +++ b/include/asm-arm/arch-at91rm9200/at91_tc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_tc.h | 2 | * include/asm-arm/arch-at91rm9200/at91_tc.h |
3 | * | 3 | * |
4 | * Copyright (C) SAN People | 4 | * Copyright (C) SAN People |
5 | * | 5 | * |
@@ -12,8 +12,8 @@ | |||
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef AT91RM9200_TC_H | 15 | #ifndef AT91_TC_H |
16 | #define AT91RM9200_TC_H | 16 | #define AT91_TC_H |
17 | 17 | ||
18 | #define AT91_TC_BCR 0xc0 /* TC Block Control Register */ | 18 | #define AT91_TC_BCR 0xc0 /* TC Block Control Register */ |
19 | #define AT91_TC_SYNC (1 << 0) /* Synchro Command */ | 19 | #define AT91_TC_SYNC (1 << 0) /* Synchro Command */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_twi.h b/include/asm-arm/arch-at91rm9200/at91_twi.h index 93547d7482bd..cda914f1e740 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_twi.h +++ b/include/asm-arm/arch-at91rm9200/at91_twi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_twi.h | 2 | * include/asm-arm/arch-at91rm9200/at91_twi.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_TWI_H | 16 | #ifndef AT91_TWI_H |
17 | #define AT91RM9200_TWI_H | 17 | #define AT91_TWI_H |
18 | 18 | ||
19 | #define AT91_TWI_CR 0x00 /* Control Register */ | 19 | #define AT91_TWI_CR 0x00 /* Control Register */ |
20 | #define AT91_TWI_START (1 << 0) /* Send a Start Condition */ | 20 | #define AT91_TWI_START (1 << 0) /* Send a Start Condition */ |
@@ -43,8 +43,8 @@ | |||
43 | #define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */ | 43 | #define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */ |
44 | #define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */ | 44 | #define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */ |
45 | #define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */ | 45 | #define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */ |
46 | #define AT91_TWI_OVRE (1 << 6) /* Overrun Error */ | 46 | #define AT91_TWI_OVRE (1 << 6) /* Overrun Error [AT91RM9200 only] */ |
47 | #define AT91_TWI_UNRE (1 << 7) /* Underrun Error */ | 47 | #define AT91_TWI_UNRE (1 << 7) /* Underrun Error [AT91RM9200 only] */ |
48 | #define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */ | 48 | #define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */ |
49 | 49 | ||
50 | #define AT91_TWI_IER 0x24 /* Interrupt Enable Register */ | 50 | #define AT91_TWI_IER 0x24 /* Interrupt Enable Register */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_wdt.h b/include/asm-arm/arch-at91rm9200/at91_wdt.h new file mode 100644 index 000000000000..ac63e775772c --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91_wdt.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_wdt.h | ||
3 | * | ||
4 | * Watchdog Timer (WDT) - System peripherals regsters. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_WDT_H | ||
14 | #define AT91_WDT_H | ||
15 | |||
16 | #define AT91_WDT_CR (AT91_WDT + 0x00) /* Watchdog Control Register */ | ||
17 | #define AT91_WDT_WDRSTT (1 << 0) /* Restart */ | ||
18 | #define AT91_WDT_KEY (0xff << 24) /* KEY Password */ | ||
19 | |||
20 | #define AT91_WDT_MR (AT91_WDT + 0x04) /* Watchdog Mode Register */ | ||
21 | #define AT91_WDT_WDV (0xfff << 0) /* Counter Value */ | ||
22 | #define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */ | ||
23 | #define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */ | ||
24 | #define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */ | ||
25 | #define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */ | ||
26 | #define AT91_WDT_WDD (0xfff << 16) /* Delta Value */ | ||
27 | #define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */ | ||
28 | #define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */ | ||
29 | |||
30 | #define AT91_WDT_SR (AT91_WDT + 0x08) /* Watchdog Status Register */ | ||
31 | #define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */ | ||
32 | #define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */ | ||
33 | |||
34 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200.h b/include/asm-arm/arch-at91rm9200/at91rm9200.h index a5a86b1ff886..4d51177efddd 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200.h +++ b/include/asm-arm/arch-at91rm9200/at91rm9200.h | |||
@@ -80,6 +80,22 @@ | |||
80 | 80 | ||
81 | 81 | ||
82 | /* | 82 | /* |
83 | * System Peripherals (offset from AT91_BASE_SYS) | ||
84 | */ | ||
85 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */ | ||
86 | #define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) /* Debug Unit */ | ||
87 | #define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) /* PIO Controller A */ | ||
88 | #define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) /* PIO Controller B */ | ||
89 | #define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) /* PIO Controller C */ | ||
90 | #define AT91_PIOD (0xfffffa00 - AT91_BASE_SYS) /* PIO Controller D */ | ||
91 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) /* Power Management Controller */ | ||
92 | #define AT91_ST (0xfffffd00 - AT91_BASE_SYS) /* System Timer */ | ||
93 | #define AT91_RTC (0xfffffe00 - AT91_BASE_SYS) /* Real-Time Clock */ | ||
94 | #define AT91_MC (0xffffff00 - AT91_BASE_SYS) /* Memory Controllers */ | ||
95 | |||
96 | #define AT91_MATRIX 0 /* not supported */ | ||
97 | |||
98 | /* | ||
83 | * Internal Memory. | 99 | * Internal Memory. |
84 | */ | 100 | */ |
85 | #define AT91RM9200_ROM_BASE 0x00100000 /* Internal ROM base address */ | 101 | #define AT91RM9200_ROM_BASE 0x00100000 /* Internal ROM base address */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_mc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_mc.h new file mode 100644 index 000000000000..0c0d81480b3a --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_mc.h | |||
@@ -0,0 +1,160 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_mc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Memory Controllers (MC, EBI, SMC, SDRAMC, BFC) - System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_MC_H | ||
17 | #define AT91RM9200_MC_H | ||
18 | |||
19 | /* Memory Controller */ | ||
20 | #define AT91_MC_RCR (AT91_MC + 0x00) /* MC Remap Control Register */ | ||
21 | #define AT91_MC_RCB (1 << 0) /* Remap Command Bit */ | ||
22 | |||
23 | #define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */ | ||
24 | #define AT91_MC_UNADD (1 << 0) /* Undefined Address Abort Status */ | ||
25 | #define AT91_MC_MISADD (1 << 1) /* Misaligned Address Abort Status */ | ||
26 | #define AT91_MC_ABTSZ (3 << 8) /* Abort Size Status */ | ||
27 | #define AT91_MC_ABTSZ_BYTE (0 << 8) | ||
28 | #define AT91_MC_ABTSZ_HALFWORD (1 << 8) | ||
29 | #define AT91_MC_ABTSZ_WORD (2 << 8) | ||
30 | #define AT91_MC_ABTTYP (3 << 10) /* Abort Type Status */ | ||
31 | #define AT91_MC_ABTTYP_DATAREAD (0 << 10) | ||
32 | #define AT91_MC_ABTTYP_DATAWRITE (1 << 10) | ||
33 | #define AT91_MC_ABTTYP_FETCH (2 << 10) | ||
34 | #define AT91_MC_MST0 (1 << 16) /* ARM920T Abort Source */ | ||
35 | #define AT91_MC_MST1 (1 << 17) /* PDC Abort Source */ | ||
36 | #define AT91_MC_MST2 (1 << 18) /* UHP Abort Source */ | ||
37 | #define AT91_MC_MST3 (1 << 19) /* EMAC Abort Source */ | ||
38 | #define AT91_MC_SVMST0 (1 << 24) /* Saved ARM920T Abort Source */ | ||
39 | #define AT91_MC_SVMST1 (1 << 25) /* Saved PDC Abort Source */ | ||
40 | #define AT91_MC_SVMST2 (1 << 26) /* Saved UHP Abort Source */ | ||
41 | #define AT91_MC_SVMST3 (1 << 27) /* Saved EMAC Abort Source */ | ||
42 | |||
43 | #define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */ | ||
44 | |||
45 | #define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */ | ||
46 | #define AT91_MPR_MSTP0 (7 << 0) /* ARM920T Priority */ | ||
47 | #define AT91_MPR_MSTP1 (7 << 4) /* PDC Priority */ | ||
48 | #define AT91_MPR_MSTP2 (7 << 8) /* UHP Priority */ | ||
49 | #define AT91_MPR_MSTP3 (7 << 12) /* EMAC Priority */ | ||
50 | |||
51 | /* External Bus Interface (EBI) registers */ | ||
52 | #define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */ | ||
53 | #define AT91_EBI_CS0A (1 << 0) /* Chip Select 0 Assignment */ | ||
54 | #define AT91_EBI_CS0A_SMC (0 << 0) | ||
55 | #define AT91_EBI_CS0A_BFC (1 << 0) | ||
56 | #define AT91_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
57 | #define AT91_EBI_CS1A_SMC (0 << 1) | ||
58 | #define AT91_EBI_CS1A_SDRAMC (1 << 1) | ||
59 | #define AT91_EBI_CS3A (1 << 3) /* Chip Select 2 Assignment */ | ||
60 | #define AT91_EBI_CS3A_SMC (0 << 3) | ||
61 | #define AT91_EBI_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
62 | #define AT91_EBI_CS4A (1 << 4) /* Chip Select 3 Assignment */ | ||
63 | #define AT91_EBI_CS4A_SMC (0 << 4) | ||
64 | #define AT91_EBI_CS4A_SMC_COMPACTFLASH (1 << 4) | ||
65 | #define AT91_EBI_CFGR (AT91_MC + 0x64) /* Configuration Register */ | ||
66 | #define AT91_EBI_DBPUC (1 << 0) /* Data Bus Pull-Up Configuration */ | ||
67 | |||
68 | /* Static Memory Controller (SMC) registers */ | ||
69 | #define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */ | ||
70 | #define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */ | ||
71 | #define AT91_SMC_NWS_(x) ((x) << 0) | ||
72 | #define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */ | ||
73 | #define AT91_SMC_TDF (0xf << 8) /* Data Float Time */ | ||
74 | #define AT91_SMC_TDF_(x) ((x) << 8) | ||
75 | #define AT91_SMC_BAT (1 << 12) /* Byte Access Type */ | ||
76 | #define AT91_SMC_DBW (3 << 13) /* Data Bus Width */ | ||
77 | #define AT91_SMC_DBW_16 (1 << 13) | ||
78 | #define AT91_SMC_DBW_8 (2 << 13) | ||
79 | #define AT91_SMC_DPR (1 << 15) /* Data Read Protocol */ | ||
80 | #define AT91_SMC_ACSS (3 << 16) /* Address to Chip Select Setup */ | ||
81 | #define AT91_SMC_ACSS_STD (0 << 16) | ||
82 | #define AT91_SMC_ACSS_1 (1 << 16) | ||
83 | #define AT91_SMC_ACSS_2 (2 << 16) | ||
84 | #define AT91_SMC_ACSS_3 (3 << 16) | ||
85 | #define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */ | ||
86 | #define AT91_SMC_RWSETUP_(x) ((x) << 24) | ||
87 | #define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */ | ||
88 | #define AT91_SMC_RWHOLD_(x) ((x) << 28) | ||
89 | |||
90 | /* SDRAM Controller registers */ | ||
91 | #define AT91_SDRAMC_MR (AT91_MC + 0x90) /* Mode Register */ | ||
92 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
93 | #define AT91_SDRAMC_MODE_NORMAL (0 << 0) | ||
94 | #define AT91_SDRAMC_MODE_NOP (1 << 0) | ||
95 | #define AT91_SDRAMC_MODE_PRECHARGE (2 << 0) | ||
96 | #define AT91_SDRAMC_MODE_LMR (3 << 0) | ||
97 | #define AT91_SDRAMC_MODE_REFRESH (4 << 0) | ||
98 | #define AT91_SDRAMC_DBW (1 << 4) /* Data Bus Width */ | ||
99 | #define AT91_SDRAMC_DBW_32 (0 << 4) | ||
100 | #define AT91_SDRAMC_DBW_16 (1 << 4) | ||
101 | |||
102 | #define AT91_SDRAMC_TR (AT91_MC + 0x94) /* Refresh Timer Register */ | ||
103 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */ | ||
104 | |||
105 | #define AT91_SDRAMC_CR (AT91_MC + 0x98) /* Configuration Register */ | ||
106 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
107 | #define AT91_SDRAMC_NC_8 (0 << 0) | ||
108 | #define AT91_SDRAMC_NC_9 (1 << 0) | ||
109 | #define AT91_SDRAMC_NC_10 (2 << 0) | ||
110 | #define AT91_SDRAMC_NC_11 (3 << 0) | ||
111 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
112 | #define AT91_SDRAMC_NR_11 (0 << 2) | ||
113 | #define AT91_SDRAMC_NR_12 (1 << 2) | ||
114 | #define AT91_SDRAMC_NR_13 (2 << 2) | ||
115 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
116 | #define AT91_SDRAMC_NB_2 (0 << 4) | ||
117 | #define AT91_SDRAMC_NB_4 (1 << 4) | ||
118 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
119 | #define AT91_SDRAMC_CAS_2 (2 << 5) | ||
120 | #define AT91_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */ | ||
121 | #define AT91_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */ | ||
122 | #define AT91_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */ | ||
123 | #define AT91_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */ | ||
124 | #define AT91_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */ | ||
125 | #define AT91_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */ | ||
126 | |||
127 | #define AT91_SDRAMC_SRR (AT91_MC + 0x9c) /* Self Refresh Register */ | ||
128 | #define AT91_SDRAMC_LPR (AT91_MC + 0xa0) /* Low Power Register */ | ||
129 | #define AT91_SDRAMC_IER (AT91_MC + 0xa4) /* Interrupt Enable Register */ | ||
130 | #define AT91_SDRAMC_IDR (AT91_MC + 0xa8) /* Interrupt Disable Register */ | ||
131 | #define AT91_SDRAMC_IMR (AT91_MC + 0xac) /* Interrupt Mask Register */ | ||
132 | #define AT91_SDRAMC_ISR (AT91_MC + 0xb0) /* Interrupt Status Register */ | ||
133 | |||
134 | /* Burst Flash Controller register */ | ||
135 | #define AT91_BFC_MR (AT91_MC + 0xc0) /* Mode Register */ | ||
136 | #define AT91_BFC_BFCOM (3 << 0) /* Burst Flash Controller Operating Mode */ | ||
137 | #define AT91_BFC_BFCOM_DISABLED (0 << 0) | ||
138 | #define AT91_BFC_BFCOM_ASYNC (1 << 0) | ||
139 | #define AT91_BFC_BFCOM_BURST (2 << 0) | ||
140 | #define AT91_BFC_BFCC (3 << 2) /* Burst Flash Controller Clock */ | ||
141 | #define AT91_BFC_BFCC_MCK (1 << 2) | ||
142 | #define AT91_BFC_BFCC_DIV2 (2 << 2) | ||
143 | #define AT91_BFC_BFCC_DIV4 (3 << 2) | ||
144 | #define AT91_BFC_AVL (0xf << 4) /* Address Valid Latency */ | ||
145 | #define AT91_BFC_PAGES (7 << 8) /* Page Size */ | ||
146 | #define AT91_BFC_PAGES_NO_PAGE (0 << 8) | ||
147 | #define AT91_BFC_PAGES_16 (1 << 8) | ||
148 | #define AT91_BFC_PAGES_32 (2 << 8) | ||
149 | #define AT91_BFC_PAGES_64 (3 << 8) | ||
150 | #define AT91_BFC_PAGES_128 (4 << 8) | ||
151 | #define AT91_BFC_PAGES_256 (5 << 8) | ||
152 | #define AT91_BFC_PAGES_512 (6 << 8) | ||
153 | #define AT91_BFC_PAGES_1024 (7 << 8) | ||
154 | #define AT91_BFC_OEL (3 << 12) /* Output Enable Latency */ | ||
155 | #define AT91_BFC_BAAEN (1 << 16) /* Burst Address Advance Enable */ | ||
156 | #define AT91_BFC_BFOEH (1 << 17) /* Burst Flash Output Enable Handling */ | ||
157 | #define AT91_BFC_MUXEN (1 << 18) /* Multiplexed Bus Enable */ | ||
158 | #define AT91_BFC_RDYEN (1 << 19) /* Ready Enable Mode */ | ||
159 | |||
160 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h deleted file mode 100644 index 73693fea76a2..000000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h +++ /dev/null | |||
@@ -1,438 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_sys.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * System peripherals registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_SYS_H | ||
17 | #define AT91RM9200_SYS_H | ||
18 | |||
19 | /* | ||
20 | * Advanced Interrupt Controller. | ||
21 | */ | ||
22 | #define AT91_AIC 0x000 | ||
23 | |||
24 | #define AT91_AIC_SMR(n) (AT91_AIC + ((n) * 4)) /* Source Mode Registers 0-31 */ | ||
25 | #define AT91_AIC_PRIOR (7 << 0) /* Priority Level */ | ||
26 | #define AT91_AIC_SRCTYPE (3 << 5) /* Interrupt Source Type */ | ||
27 | #define AT91_AIC_SRCTYPE_LOW (0 << 5) | ||
28 | #define AT91_AIC_SRCTYPE_FALLING (1 << 5) | ||
29 | #define AT91_AIC_SRCTYPE_HIGH (2 << 5) | ||
30 | #define AT91_AIC_SRCTYPE_RISING (3 << 5) | ||
31 | |||
32 | #define AT91_AIC_SVR(n) (AT91_AIC + 0x80 + ((n) * 4)) /* Source Vector Registers 0-31 */ | ||
33 | #define AT91_AIC_IVR (AT91_AIC + 0x100) /* Interrupt Vector Register */ | ||
34 | #define AT91_AIC_FVR (AT91_AIC + 0x104) /* Fast Interrupt Vector Register */ | ||
35 | #define AT91_AIC_ISR (AT91_AIC + 0x108) /* Interrupt Status Register */ | ||
36 | #define AT91_AIC_IRQID (0x1f << 0) /* Current Interrupt Identifier */ | ||
37 | |||
38 | #define AT91_AIC_IPR (AT91_AIC + 0x10c) /* Interrupt Pending Register */ | ||
39 | #define AT91_AIC_IMR (AT91_AIC + 0x110) /* Interrupt Mask Register */ | ||
40 | #define AT91_AIC_CISR (AT91_AIC + 0x114) /* Core Interrupt Status Register */ | ||
41 | #define AT91_AIC_NFIQ (1 << 0) /* nFIQ Status */ | ||
42 | #define AT91_AIC_NIRQ (1 << 1) /* nIRQ Status */ | ||
43 | |||
44 | #define AT91_AIC_IECR (AT91_AIC + 0x120) /* Interrupt Enable Command Register */ | ||
45 | #define AT91_AIC_IDCR (AT91_AIC + 0x124) /* Interrupt Disable Command Register */ | ||
46 | #define AT91_AIC_ICCR (AT91_AIC + 0x128) /* Interrupt Clear Command Register */ | ||
47 | #define AT91_AIC_ISCR (AT91_AIC + 0x12c) /* Interrupt Set Command Register */ | ||
48 | #define AT91_AIC_EOICR (AT91_AIC + 0x130) /* End of Interrupt Command Register */ | ||
49 | #define AT91_AIC_SPU (AT91_AIC + 0x134) /* Spurious Interrupt Vector Register */ | ||
50 | #define AT91_AIC_DCR (AT91_AIC + 0x138) /* Debug Control Register */ | ||
51 | #define AT91_AIC_DCR_PROT (1 << 0) /* Protection Mode */ | ||
52 | #define AT91_AIC_DCR_GMSK (1 << 1) /* General Mask */ | ||
53 | |||
54 | |||
55 | /* | ||
56 | * Debug Unit. | ||
57 | */ | ||
58 | #define AT91_DBGU 0x200 | ||
59 | |||
60 | #define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */ | ||
61 | #define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */ | ||
62 | #define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */ | ||
63 | #define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */ | ||
64 | #define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */ | ||
65 | #define AT91_DBGU_IDR (AT91_DBGU + 0x0c) /* Interrupt Disable Register */ | ||
66 | #define AT91_DBGU_IMR (AT91_DBGU + 0x10) /* Interrupt Mask Register */ | ||
67 | #define AT91_DBGU_SR (AT91_DBGU + 0x14) /* Status Register */ | ||
68 | #define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ | ||
69 | #define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ | ||
70 | #define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ | ||
71 | |||
72 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ | ||
73 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ | ||
74 | #define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ | ||
75 | #define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ | ||
76 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ | ||
77 | #define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ | ||
78 | #define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ | ||
79 | #define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ | ||
80 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ | ||
81 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ | ||
82 | |||
83 | #define AT91_AIC_FFER (AT91_AIC + 0x140) /* Fast Forcing Enable Register [SAM9 only] */ | ||
84 | #define AT91_AIC_FFDR (AT91_AIC + 0x144) /* Fast Forcing Disable Register [SAM9 only] */ | ||
85 | #define AT91_AIC_FFSR (AT91_AIC + 0x148) /* Fast Forcing Status Register [SAM9 only] */ | ||
86 | |||
87 | /* | ||
88 | * PIO Controllers. | ||
89 | */ | ||
90 | #define AT91_PIOA 0x400 | ||
91 | #define AT91_PIOB 0x600 | ||
92 | #define AT91_PIOC 0x800 | ||
93 | #define AT91_PIOD 0xa00 | ||
94 | |||
95 | #define PIO_PER 0x00 /* Enable Register */ | ||
96 | #define PIO_PDR 0x04 /* Disable Register */ | ||
97 | #define PIO_PSR 0x08 /* Status Register */ | ||
98 | #define PIO_OER 0x10 /* Output Enable Register */ | ||
99 | #define PIO_ODR 0x14 /* Output Disable Register */ | ||
100 | #define PIO_OSR 0x18 /* Output Status Register */ | ||
101 | #define PIO_IFER 0x20 /* Glitch Input Filter Enable */ | ||
102 | #define PIO_IFDR 0x24 /* Glitch Input Filter Disable */ | ||
103 | #define PIO_IFSR 0x28 /* Glitch Input Filter Status */ | ||
104 | #define PIO_SODR 0x30 /* Set Output Data Register */ | ||
105 | #define PIO_CODR 0x34 /* Clear Output Data Register */ | ||
106 | #define PIO_ODSR 0x38 /* Output Data Status Register */ | ||
107 | #define PIO_PDSR 0x3c /* Pin Data Status Register */ | ||
108 | #define PIO_IER 0x40 /* Interrupt Enable Register */ | ||
109 | #define PIO_IDR 0x44 /* Interrupt Disable Register */ | ||
110 | #define PIO_IMR 0x48 /* Interrupt Mask Register */ | ||
111 | #define PIO_ISR 0x4c /* Interrupt Status Register */ | ||
112 | #define PIO_MDER 0x50 /* Multi-driver Enable Register */ | ||
113 | #define PIO_MDDR 0x54 /* Multi-driver Disable Register */ | ||
114 | #define PIO_MDSR 0x58 /* Multi-driver Status Register */ | ||
115 | #define PIO_PUDR 0x60 /* Pull-up Disable Register */ | ||
116 | #define PIO_PUER 0x64 /* Pull-up Enable Register */ | ||
117 | #define PIO_PUSR 0x68 /* Pull-up Status Register */ | ||
118 | #define PIO_ASR 0x70 /* Peripheral A Select Register */ | ||
119 | #define PIO_BSR 0x74 /* Peripheral B Select Register */ | ||
120 | #define PIO_ABSR 0x78 /* AB Status Register */ | ||
121 | #define PIO_OWER 0xa0 /* Output Write Enable Register */ | ||
122 | #define PIO_OWDR 0xa4 /* Output Write Disable Register */ | ||
123 | #define PIO_OWSR 0xa8 /* Output Write Status Register */ | ||
124 | |||
125 | #define AT91_PIO_P(n) (1 << (n)) | ||
126 | |||
127 | |||
128 | /* | ||
129 | * Power Management Controller. | ||
130 | */ | ||
131 | #define AT91_PMC 0xc00 | ||
132 | |||
133 | #define AT91_PMC_SCER (AT91_PMC + 0x00) /* System Clock Enable Register */ | ||
134 | #define AT91_PMC_SCDR (AT91_PMC + 0x04) /* System Clock Disable Register */ | ||
135 | |||
136 | #define AT91_PMC_SCSR (AT91_PMC + 0x08) /* System Clock Status Register */ | ||
137 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ | ||
138 | #define AT91_PMC_UDP (1 << 1) /* USB Devcice Port Clock */ | ||
139 | #define AT91_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend */ | ||
140 | #define AT91_PMC_UHP (1 << 4) /* USB Host Port Clock */ | ||
141 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ | ||
142 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ | ||
143 | #define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */ | ||
144 | #define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */ | ||
145 | |||
146 | #define AT91_PMC_PCER (AT91_PMC + 0x10) /* Peripheral Clock Enable Register */ | ||
147 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ | ||
148 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | ||
149 | |||
150 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */ | ||
151 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | ||
152 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ | ||
153 | |||
154 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ | ||
155 | #define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */ | ||
156 | #define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */ | ||
157 | |||
158 | #define AT91_CKGR_PLLAR (AT91_PMC + 0x28) /* PLL A Register */ | ||
159 | #define AT91_CKGR_PLLBR (AT91_PMC + 0x2c) /* PLL B Register */ | ||
160 | #define AT91_PMC_DIV (0xff << 0) /* Divider */ | ||
161 | #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ | ||
162 | #define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */ | ||
163 | #define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */ | ||
164 | #define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */ | ||
165 | |||
166 | #define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */ | ||
167 | #define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */ | ||
168 | #define AT91_PMC_CSS_SLOW (0 << 0) | ||
169 | #define AT91_PMC_CSS_MAIN (1 << 0) | ||
170 | #define AT91_PMC_CSS_PLLA (2 << 0) | ||
171 | #define AT91_PMC_CSS_PLLB (3 << 0) | ||
172 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ | ||
173 | #define AT91_PMC_PRES_1 (0 << 2) | ||
174 | #define AT91_PMC_PRES_2 (1 << 2) | ||
175 | #define AT91_PMC_PRES_4 (2 << 2) | ||
176 | #define AT91_PMC_PRES_8 (3 << 2) | ||
177 | #define AT91_PMC_PRES_16 (4 << 2) | ||
178 | #define AT91_PMC_PRES_32 (5 << 2) | ||
179 | #define AT91_PMC_PRES_64 (6 << 2) | ||
180 | #define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */ | ||
181 | #define AT91_PMC_MDIV_1 (0 << 8) | ||
182 | #define AT91_PMC_MDIV_2 (1 << 8) | ||
183 | #define AT91_PMC_MDIV_3 (2 << 8) | ||
184 | #define AT91_PMC_MDIV_4 (3 << 8) | ||
185 | |||
186 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ | ||
187 | |||
188 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ | ||
189 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ | ||
190 | #define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */ | ||
191 | #define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */ | ||
192 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ | ||
193 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | ||
194 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | ||
195 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | ||
196 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | ||
197 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ | ||
198 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ | ||
199 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ | ||
200 | |||
201 | |||
202 | /* | ||
203 | * System Timer. | ||
204 | */ | ||
205 | #define AT91_ST 0xd00 | ||
206 | |||
207 | #define AT91_ST_CR (AT91_ST + 0x00) /* Control Register */ | ||
208 | #define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */ | ||
209 | #define AT91_ST_PIMR (AT91_ST + 0x04) /* Period Interval Mode Register */ | ||
210 | #define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */ | ||
211 | #define AT91_ST_WDMR (AT91_ST + 0x08) /* Watchdog Mode Register */ | ||
212 | #define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */ | ||
213 | #define AT91_ST_RSTEN (1 << 16) /* Reset Enable */ | ||
214 | #define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */ | ||
215 | #define AT91_ST_RTMR (AT91_ST + 0x0c) /* Real-time Mode Register */ | ||
216 | #define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */ | ||
217 | #define AT91_ST_SR (AT91_ST + 0x10) /* Status Register */ | ||
218 | #define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */ | ||
219 | #define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */ | ||
220 | #define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */ | ||
221 | #define AT91_ST_ALMS (1 << 3) /* Alarm Status */ | ||
222 | #define AT91_ST_IER (AT91_ST + 0x14) /* Interrupt Enable Register */ | ||
223 | #define AT91_ST_IDR (AT91_ST + 0x18) /* Interrupt Disable Register */ | ||
224 | #define AT91_ST_IMR (AT91_ST + 0x1c) /* Interrupt Mask Register */ | ||
225 | #define AT91_ST_RTAR (AT91_ST + 0x20) /* Real-time Alarm Register */ | ||
226 | #define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */ | ||
227 | #define AT91_ST_CRTR (AT91_ST + 0x24) /* Current Real-time Register */ | ||
228 | #define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */ | ||
229 | |||
230 | |||
231 | /* | ||
232 | * Real-time Clock. | ||
233 | */ | ||
234 | #define AT91_RTC 0xe00 | ||
235 | |||
236 | #define AT91_RTC_CR (AT91_RTC + 0x00) /* Control Register */ | ||
237 | #define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */ | ||
238 | #define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */ | ||
239 | #define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */ | ||
240 | #define AT91_RTC_TIMEVSEL_MINUTE (0 << 8) | ||
241 | #define AT91_RTC_TIMEVSEL_HOUR (1 << 8) | ||
242 | #define AT91_RTC_TIMEVSEL_DAY24 (2 << 8) | ||
243 | #define AT91_RTC_TIMEVSEL_DAY12 (3 << 8) | ||
244 | #define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */ | ||
245 | #define AT91_RTC_CALEVSEL_WEEK (0 << 16) | ||
246 | #define AT91_RTC_CALEVSEL_MONTH (1 << 16) | ||
247 | #define AT91_RTC_CALEVSEL_YEAR (2 << 16) | ||
248 | |||
249 | #define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */ | ||
250 | #define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */ | ||
251 | |||
252 | #define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */ | ||
253 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ | ||
254 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ | ||
255 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ | ||
256 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ | ||
257 | |||
258 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ | ||
259 | #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ | ||
260 | #define AT91_RTC_YEAR (0xff << 8) /* Current Year */ | ||
261 | #define AT91_RTC_MONTH (0x1f << 16) /* Current Month */ | ||
262 | #define AT91_RTC_DAY (7 << 21) /* Current Day */ | ||
263 | #define AT91_RTC_DATE (0x3f << 24) /* Current Date */ | ||
264 | |||
265 | #define AT91_RTC_TIMALR (AT91_RTC + 0x10) /* Time Alarm Register */ | ||
266 | #define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */ | ||
267 | #define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */ | ||
268 | #define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */ | ||
269 | |||
270 | #define AT91_RTC_CALALR (AT91_RTC + 0x14) /* Calendar Alarm Register */ | ||
271 | #define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */ | ||
272 | #define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */ | ||
273 | |||
274 | #define AT91_RTC_SR (AT91_RTC + 0x18) /* Status Register */ | ||
275 | #define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */ | ||
276 | #define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */ | ||
277 | #define AT91_RTC_SECEV (1 << 2) /* Second Event */ | ||
278 | #define AT91_RTC_TIMEV (1 << 3) /* Time Event */ | ||
279 | #define AT91_RTC_CALEV (1 << 4) /* Calendar Event */ | ||
280 | |||
281 | #define AT91_RTC_SCCR (AT91_RTC + 0x1c) /* Status Clear Command Register */ | ||
282 | #define AT91_RTC_IER (AT91_RTC + 0x20) /* Interrupt Enable Register */ | ||
283 | #define AT91_RTC_IDR (AT91_RTC + 0x24) /* Interrupt Disable Register */ | ||
284 | #define AT91_RTC_IMR (AT91_RTC + 0x28) /* Interrupt Mask Register */ | ||
285 | |||
286 | #define AT91_RTC_VER (AT91_RTC + 0x2c) /* Valid Entry Register */ | ||
287 | #define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */ | ||
288 | #define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */ | ||
289 | #define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */ | ||
290 | #define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */ | ||
291 | |||
292 | |||
293 | /* | ||
294 | * Memory Controller. | ||
295 | */ | ||
296 | #define AT91_MC 0xf00 | ||
297 | |||
298 | #define AT91_MC_RCR (AT91_MC + 0x00) /* MC Remap Control Register */ | ||
299 | #define AT91_MC_RCB (1 << 0) /* Remap Command Bit */ | ||
300 | |||
301 | #define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */ | ||
302 | #define AT91_MC_UNADD (1 << 0) /* Undefined Address Abort Status */ | ||
303 | #define AT91_MC_MISADD (1 << 1) /* Misaligned Address Abort Status */ | ||
304 | #define AT91_MC_ABTSZ (3 << 8) /* Abort Size Status */ | ||
305 | #define AT91_MC_ABTSZ_BYTE (0 << 8) | ||
306 | #define AT91_MC_ABTSZ_HALFWORD (1 << 8) | ||
307 | #define AT91_MC_ABTSZ_WORD (2 << 8) | ||
308 | #define AT91_MC_ABTTYP (3 << 10) /* Abort Type Status */ | ||
309 | #define AT91_MC_ABTTYP_DATAREAD (0 << 10) | ||
310 | #define AT91_MC_ABTTYP_DATAWRITE (1 << 10) | ||
311 | #define AT91_MC_ABTTYP_FETCH (2 << 10) | ||
312 | #define AT91_MC_MST0 (1 << 16) /* ARM920T Abort Source */ | ||
313 | #define AT91_MC_MST1 (1 << 17) /* PDC Abort Source */ | ||
314 | #define AT91_MC_MST2 (1 << 18) /* UHP Abort Source */ | ||
315 | #define AT91_MC_MST3 (1 << 19) /* EMAC Abort Source */ | ||
316 | #define AT91_MC_SVMST0 (1 << 24) /* Saved ARM920T Abort Source */ | ||
317 | #define AT91_MC_SVMST1 (1 << 25) /* Saved PDC Abort Source */ | ||
318 | #define AT91_MC_SVMST2 (1 << 26) /* Saved UHP Abort Source */ | ||
319 | #define AT91_MC_SVMST3 (1 << 27) /* Saved EMAC Abort Source */ | ||
320 | |||
321 | #define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */ | ||
322 | |||
323 | #define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */ | ||
324 | #define AT91_MPR_MSTP0 (7 << 0) /* ARM920T Priority */ | ||
325 | #define AT91_MPR_MSTP1 (7 << 4) /* PDC Priority */ | ||
326 | #define AT91_MPR_MSTP2 (7 << 8) /* UHP Priority */ | ||
327 | #define AT91_MPR_MSTP3 (7 << 12) /* EMAC Priority */ | ||
328 | |||
329 | /* External Bus Interface (EBI) registers */ | ||
330 | #define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */ | ||
331 | #define AT91_EBI_CS0A (1 << 0) /* Chip Select 0 Assignment */ | ||
332 | #define AT91_EBI_CS0A_SMC (0 << 0) | ||
333 | #define AT91_EBI_CS0A_BFC (1 << 0) | ||
334 | #define AT91_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
335 | #define AT91_EBI_CS1A_SMC (0 << 1) | ||
336 | #define AT91_EBI_CS1A_SDRAMC (1 << 1) | ||
337 | #define AT91_EBI_CS3A (1 << 3) /* Chip Select 2 Assignment */ | ||
338 | #define AT91_EBI_CS3A_SMC (0 << 3) | ||
339 | #define AT91_EBI_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
340 | #define AT91_EBI_CS4A (1 << 4) /* Chip Select 3 Assignment */ | ||
341 | #define AT91_EBI_CS4A_SMC (0 << 4) | ||
342 | #define AT91_EBI_CS4A_SMC_COMPACTFLASH (1 << 4) | ||
343 | #define AT91_EBI_CFGR (AT91_MC + 0x64) /* Configuration Register */ | ||
344 | #define AT91_EBI_DBPUC (1 << 0) /* Data Bus Pull-Up Configuration */ | ||
345 | |||
346 | /* Static Memory Controller (SMC) registers */ | ||
347 | #define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */ | ||
348 | #define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */ | ||
349 | #define AT91_SMC_NWS_(x) ((x) << 0) | ||
350 | #define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */ | ||
351 | #define AT91_SMC_TDF (0xf << 8) /* Data Float Time */ | ||
352 | #define AT91_SMC_TDF_(x) ((x) << 8) | ||
353 | #define AT91_SMC_BAT (1 << 12) /* Byte Access Type */ | ||
354 | #define AT91_SMC_DBW (3 << 13) /* Data Bus Width */ | ||
355 | #define AT91_SMC_DBW_16 (1 << 13) | ||
356 | #define AT91_SMC_DBW_8 (2 << 13) | ||
357 | #define AT91_SMC_DPR (1 << 15) /* Data Read Protocol */ | ||
358 | #define AT91_SMC_ACSS (3 << 16) /* Address to Chip Select Setup */ | ||
359 | #define AT91_SMC_ACSS_STD (0 << 16) | ||
360 | #define AT91_SMC_ACSS_1 (1 << 16) | ||
361 | #define AT91_SMC_ACSS_2 (2 << 16) | ||
362 | #define AT91_SMC_ACSS_3 (3 << 16) | ||
363 | #define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */ | ||
364 | #define AT91_SMC_RWSETUP_(x) ((x) << 24) | ||
365 | #define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */ | ||
366 | #define AT91_SMC_RWHOLD_(x) ((x) << 28) | ||
367 | |||
368 | /* SDRAM Controller registers */ | ||
369 | #define AT91_SDRAMC_MR (AT91_MC + 0x90) /* Mode Register */ | ||
370 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
371 | #define AT91_SDRAMC_MODE_NORMAL (0 << 0) | ||
372 | #define AT91_SDRAMC_MODE_NOP (1 << 0) | ||
373 | #define AT91_SDRAMC_MODE_PRECHARGE (2 << 0) | ||
374 | #define AT91_SDRAMC_MODE_LMR (3 << 0) | ||
375 | #define AT91_SDRAMC_MODE_REFRESH (4 << 0) | ||
376 | #define AT91_SDRAMC_DBW (1 << 4) /* Data Bus Width */ | ||
377 | #define AT91_SDRAMC_DBW_32 (0 << 4) | ||
378 | #define AT91_SDRAMC_DBW_16 (1 << 4) | ||
379 | |||
380 | #define AT91_SDRAMC_TR (AT91_MC + 0x94) /* Refresh Timer Register */ | ||
381 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */ | ||
382 | |||
383 | #define AT91_SDRAMC_CR (AT91_MC + 0x98) /* Configuration Register */ | ||
384 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
385 | #define AT91_SDRAMC_NC_8 (0 << 0) | ||
386 | #define AT91_SDRAMC_NC_9 (1 << 0) | ||
387 | #define AT91_SDRAMC_NC_10 (2 << 0) | ||
388 | #define AT91_SDRAMC_NC_11 (3 << 0) | ||
389 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
390 | #define AT91_SDRAMC_NR_11 (0 << 2) | ||
391 | #define AT91_SDRAMC_NR_12 (1 << 2) | ||
392 | #define AT91_SDRAMC_NR_13 (2 << 2) | ||
393 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
394 | #define AT91_SDRAMC_NB_2 (0 << 4) | ||
395 | #define AT91_SDRAMC_NB_4 (1 << 4) | ||
396 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
397 | #define AT91_SDRAMC_CAS_2 (2 << 5) | ||
398 | #define AT91_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */ | ||
399 | #define AT91_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */ | ||
400 | #define AT91_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */ | ||
401 | #define AT91_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */ | ||
402 | #define AT91_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */ | ||
403 | #define AT91_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */ | ||
404 | |||
405 | #define AT91_SDRAMC_SRR (AT91_MC + 0x9c) /* Self Refresh Register */ | ||
406 | #define AT91_SDRAMC_LPR (AT91_MC + 0xa0) /* Low Power Register */ | ||
407 | #define AT91_SDRAMC_IER (AT91_MC + 0xa4) /* Interrupt Enable Register */ | ||
408 | #define AT91_SDRAMC_IDR (AT91_MC + 0xa8) /* Interrupt Disable Register */ | ||
409 | #define AT91_SDRAMC_IMR (AT91_MC + 0xac) /* Interrupt Mask Register */ | ||
410 | #define AT91_SDRAMC_ISR (AT91_MC + 0xb0) /* Interrupt Status Register */ | ||
411 | |||
412 | /* Burst Flash Controller register */ | ||
413 | #define AT91_BFC_MR (AT91_MC + 0xc0) /* Mode Register */ | ||
414 | #define AT91_BFC_BFCOM (3 << 0) /* Burst Flash Controller Operating Mode */ | ||
415 | #define AT91_BFC_BFCOM_DISABLED (0 << 0) | ||
416 | #define AT91_BFC_BFCOM_ASYNC (1 << 0) | ||
417 | #define AT91_BFC_BFCOM_BURST (2 << 0) | ||
418 | #define AT91_BFC_BFCC (3 << 2) /* Burst Flash Controller Clock */ | ||
419 | #define AT91_BFC_BFCC_MCK (1 << 2) | ||
420 | #define AT91_BFC_BFCC_DIV2 (2 << 2) | ||
421 | #define AT91_BFC_BFCC_DIV4 (3 << 2) | ||
422 | #define AT91_BFC_AVL (0xf << 4) /* Address Valid Latency */ | ||
423 | #define AT91_BFC_PAGES (7 << 8) /* Page Size */ | ||
424 | #define AT91_BFC_PAGES_NO_PAGE (0 << 8) | ||
425 | #define AT91_BFC_PAGES_16 (1 << 8) | ||
426 | #define AT91_BFC_PAGES_32 (2 << 8) | ||
427 | #define AT91_BFC_PAGES_64 (3 << 8) | ||
428 | #define AT91_BFC_PAGES_128 (4 << 8) | ||
429 | #define AT91_BFC_PAGES_256 (5 << 8) | ||
430 | #define AT91_BFC_PAGES_512 (6 << 8) | ||
431 | #define AT91_BFC_PAGES_1024 (7 << 8) | ||
432 | #define AT91_BFC_OEL (3 << 12) /* Output Enable Latency */ | ||
433 | #define AT91_BFC_BAAEN (1 << 16) /* Burst Address Advance Enable */ | ||
434 | #define AT91_BFC_BFOEH (1 << 17) /* Burst Flash Output Enable Handling */ | ||
435 | #define AT91_BFC_MUXEN (1 << 18) /* Multiplexed Bus Enable */ | ||
436 | #define AT91_BFC_RDYEN (1 << 19) /* Ready Enable Mode */ | ||
437 | |||
438 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h deleted file mode 100644 index 951e3f61cef4..000000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_udp.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * USB Device Port (UDP) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_UDP_H | ||
17 | #define AT91RM9200_UDP_H | ||
18 | |||
19 | #define AT91_UDP_FRM_NUM 0x00 /* Frame Number Register */ | ||
20 | #define AT91_UDP_NUM (0x7ff << 0) /* Frame Number */ | ||
21 | #define AT91_UDP_FRM_ERR (1 << 16) /* Frame Error */ | ||
22 | #define AT91_UDP_FRM_OK (1 << 17) /* Frame OK */ | ||
23 | |||
24 | #define AT91_UDP_GLB_STAT 0x04 /* Global State Register */ | ||
25 | #define AT91_UDP_FADDEN (1 << 0) /* Function Address Enable */ | ||
26 | #define AT91_UDP_CONFG (1 << 1) /* Configured */ | ||
27 | #define AT91_UDP_ESR (1 << 2) /* Enable Send Resume */ | ||
28 | #define AT91_UDP_RSMINPR (1 << 3) /* Resume has been sent */ | ||
29 | #define AT91_UDP_RMWUPE (1 << 4) /* Remote Wake Up Enable */ | ||
30 | |||
31 | #define AT91_UDP_FADDR 0x08 /* Function Address Register */ | ||
32 | #define AT91_UDP_FADD (0x7f << 0) /* Function Address Value */ | ||
33 | #define AT91_UDP_FEN (1 << 8) /* Function Enable */ | ||
34 | |||
35 | #define AT91_UDP_IER 0x10 /* Interrupt Enable Register */ | ||
36 | #define AT91_UDP_IDR 0x14 /* Interrupt Disable Register */ | ||
37 | #define AT91_UDP_IMR 0x18 /* Interrupt Mask Register */ | ||
38 | |||
39 | #define AT91_UDP_ISR 0x1c /* Interrupt Status Register */ | ||
40 | #define AT91_UDP_EP(n) (1 << (n)) /* Endpoint Interrupt Status */ | ||
41 | #define AT91_UDP_RXSUSP (1 << 8) /* USB Suspend Interrupt Status */ | ||
42 | #define AT91_UDP_RXRSM (1 << 9) /* USB Resume Interrupt Status */ | ||
43 | #define AT91_UDP_EXTRSM (1 << 10) /* External Resume Interrupt Status */ | ||
44 | #define AT91_UDP_SOFINT (1 << 11) /* Start of Frame Interrupt Status */ | ||
45 | #define AT91_UDP_ENDBUSRES (1 << 12) /* End of Bus Reset Interrpt Status */ | ||
46 | #define AT91_UDP_WAKEUP (1 << 13) /* USB Wakeup Interrupt Status */ | ||
47 | |||
48 | #define AT91_UDP_ICR 0x20 /* Interrupt Clear Register */ | ||
49 | #define AT91_UDP_RST_EP 0x28 /* Reset Endpoint Register */ | ||
50 | |||
51 | #define AT91_UDP_CSR(n) (0x30 + ((n) * 4)) /* Endpoint Control/Status Registers 0-7 */ | ||
52 | #define AT91_UDP_TXCOMP (1 << 0) /* Generates IN packet with data previously written in DPR */ | ||
53 | #define AT91_UDP_RX_DATA_BK0 (1 << 1) /* Receive Data Bank 0 */ | ||
54 | #define AT91_UDP_RXSETUP (1 << 2) /* Send STALL to the host */ | ||
55 | #define AT91_UDP_STALLSENT (1 << 3) /* Stall Sent / Isochronous error (Isochronous endpoints) */ | ||
56 | #define AT91_UDP_TXPKTRDY (1 << 4) /* Transmit Packet Ready */ | ||
57 | #define AT91_UDP_FORCESTALL (1 << 5) /* Force Stall */ | ||
58 | #define AT91_UDP_RX_DATA_BK1 (1 << 6) /* Receive Data Bank 1 */ | ||
59 | #define AT91_UDP_DIR (1 << 7) /* Transfer Direction */ | ||
60 | #define AT91_UDP_EPTYPE (7 << 8) /* Endpoint Type */ | ||
61 | #define AT91_UDP_EPTYPE_CTRL (0 << 8) | ||
62 | #define AT91_UDP_EPTYPE_ISO_OUT (1 << 8) | ||
63 | #define AT91_UDP_EPTYPE_BULK_OUT (2 << 8) | ||
64 | #define AT91_UDP_EPTYPE_INT_OUT (3 << 8) | ||
65 | #define AT91_UDP_EPTYPE_ISO_IN (5 << 8) | ||
66 | #define AT91_UDP_EPTYPE_BULK_IN (6 << 8) | ||
67 | #define AT91_UDP_EPTYPE_INT_IN (7 << 8) | ||
68 | #define AT91_UDP_DTGLE (1 << 11) /* Data Toggle */ | ||
69 | #define AT91_UDP_EPEDS (1 << 15) /* Endpoint Enable/Disable */ | ||
70 | #define AT91_UDP_RXBYTECNT (0x7ff << 16) /* Number of bytes in FIFO */ | ||
71 | |||
72 | #define AT91_UDP_FDR(n) (0x50 + ((n) * 4)) /* Endpoint FIFO Data Registers 0-7 */ | ||
73 | |||
74 | #define AT91_UDP_TXVC 0x74 /* Transceiver Control Register */ | ||
75 | #define AT91_UDP_TXVC_TXVDIS (1 << 8) /* Transceiver Disable */ | ||
76 | |||
77 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9260.h b/include/asm-arm/arch-at91rm9200/at91sam9260.h new file mode 100644 index 000000000000..46f4dd65c035 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91sam9260.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91sam9260.h | ||
3 | * | ||
4 | * (C) 2006 Andrew Victor | ||
5 | * | ||
6 | * Common definitions. | ||
7 | * Based on AT91SAM9260 datasheet revision A (Preliminary). | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91SAM9260_H | ||
16 | #define AT91SAM9260_H | ||
17 | |||
18 | /* | ||
19 | * Peripheral identifiers/interrupts. | ||
20 | */ | ||
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
23 | #define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */ | ||
24 | #define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */ | ||
25 | #define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */ | ||
26 | #define AT91SAM9260_ID_ADC 5 /* Analog-to-Digital Converter */ | ||
27 | #define AT91SAM9260_ID_US0 6 /* USART 0 */ | ||
28 | #define AT91SAM9260_ID_US1 7 /* USART 1 */ | ||
29 | #define AT91SAM9260_ID_US2 8 /* USART 2 */ | ||
30 | #define AT91SAM9260_ID_MCI 9 /* Multimedia Card Interface */ | ||
31 | #define AT91SAM9260_ID_UDP 10 /* USB Device Port */ | ||
32 | #define AT91SAM9260_ID_TWI 11 /* Two-Wire Interface */ | ||
33 | #define AT91SAM9260_ID_SPI0 12 /* Serial Peripheral Interface 0 */ | ||
34 | #define AT91SAM9260_ID_SPI1 13 /* Serial Peripheral Interface 1 */ | ||
35 | #define AT91SAM9260_ID_SSC 14 /* Serial Synchronous Controller */ | ||
36 | #define AT91SAM9260_ID_TC0 17 /* Timer Counter 0 */ | ||
37 | #define AT91SAM9260_ID_TC1 18 /* Timer Counter 1 */ | ||
38 | #define AT91SAM9260_ID_TC2 19 /* Timer Counter 2 */ | ||
39 | #define AT91SAM9260_ID_UHP 20 /* USB Host port */ | ||
40 | #define AT91SAM9260_ID_EMAC 21 /* Ethernet */ | ||
41 | #define AT91SAM9260_ID_ISI 22 /* Image Sensor Interface */ | ||
42 | #define AT91SAM9260_ID_US3 23 /* USART 3 */ | ||
43 | #define AT91SAM9260_ID_US4 24 /* USART 4 */ | ||
44 | #define AT91SAM9260_ID_US5 25 /* USART 5 */ | ||
45 | #define AT91SAM9260_ID_TC3 26 /* Timer Counter 3 */ | ||
46 | #define AT91SAM9260_ID_TC4 27 /* Timer Counter 4 */ | ||
47 | #define AT91SAM9260_ID_TC5 28 /* Timer Counter 5 */ | ||
48 | #define AT91SAM9260_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */ | ||
49 | #define AT91SAM9260_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */ | ||
50 | #define AT91SAM9260_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */ | ||
51 | |||
52 | |||
53 | /* | ||
54 | * User Peripheral physical base addresses. | ||
55 | */ | ||
56 | #define AT91SAM9260_BASE_TCB0 0xfffa0000 | ||
57 | #define AT91SAM9260_BASE_TC0 0xfffa0000 | ||
58 | #define AT91SAM9260_BASE_TC1 0xfffa0040 | ||
59 | #define AT91SAM9260_BASE_TC2 0xfffa0080 | ||
60 | #define AT91SAM9260_BASE_UDP 0xfffa4000 | ||
61 | #define AT91SAM9260_BASE_MCI 0xfffa8000 | ||
62 | #define AT91SAM9260_BASE_TWI 0xfffac000 | ||
63 | #define AT91SAM9260_BASE_US0 0xfffb0000 | ||
64 | #define AT91SAM9260_BASE_US1 0xfffb4000 | ||
65 | #define AT91SAM9260_BASE_US2 0xfffb8000 | ||
66 | #define AT91SAM9260_BASE_SSC 0xfffbc000 | ||
67 | #define AT91SAM9260_BASE_ISI 0xfffc0000 | ||
68 | #define AT91SAM9260_BASE_EMAC 0xfffc4000 | ||
69 | #define AT91SAM9260_BASE_SPI0 0xfffc8000 | ||
70 | #define AT91SAM9260_BASE_SPI1 0xfffcc000 | ||
71 | #define AT91SAM9260_BASE_US3 0xfffd0000 | ||
72 | #define AT91SAM9260_BASE_US4 0xfffd4000 | ||
73 | #define AT91SAM9260_BASE_US5 0xfffd8000 | ||
74 | #define AT91SAM9260_BASE_TCB1 0xfffdc000 | ||
75 | #define AT91SAM9260_BASE_TC3 0xfffdc000 | ||
76 | #define AT91SAM9260_BASE_TC4 0xfffdc040 | ||
77 | #define AT91SAM9260_BASE_TC5 0xfffdc080 | ||
78 | #define AT91SAM9260_BASE_ADC 0xfffe0000 | ||
79 | #define AT91_BASE_SYS 0xffffe800 | ||
80 | |||
81 | /* | ||
82 | * System Peripherals (offset from AT91_BASE_SYS) | ||
83 | */ | ||
84 | #define AT91_ECC (0xffffe800 - AT91_BASE_SYS) | ||
85 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | ||
86 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | ||
87 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | ||
88 | #define AT91_CCFG (0xffffef10 - AT91_BASE_SYS) | ||
89 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
90 | #define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) | ||
91 | #define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) | ||
92 | #define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) | ||
93 | #define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) | ||
94 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
95 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
96 | #define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS) | ||
97 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | ||
98 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
99 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
100 | #define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) | ||
101 | |||
102 | |||
103 | /* | ||
104 | * Internal Memory. | ||
105 | */ | ||
106 | #define AT91SAM9260_ROM_BASE 0x00100000 /* Internal ROM base address */ | ||
107 | #define AT91SAM9260_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */ | ||
108 | |||
109 | #define AT91SAM9260_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */ | ||
110 | #define AT91SAM9260_SRAM0_SIZE SZ_4K /* Internal SRAM 0 size (4Kb) */ | ||
111 | #define AT91SAM9260_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */ | ||
112 | #define AT91SAM9260_SRAM1_SIZE SZ_4K /* Internal SRAM 1 size (4Kb) */ | ||
113 | |||
114 | #define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */ | ||
115 | |||
116 | #if 0 | ||
117 | /* | ||
118 | * PIO pin definitions (peripheral A/B multiplexing). | ||
119 | */ | ||
120 | |||
121 | // TODO: Add | ||
122 | |||
123 | #endif | ||
124 | |||
125 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h b/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h new file mode 100644 index 000000000000..746d973705bf --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h | ||
3 | * | ||
4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | ||
5 | * Based on AT91SAM9260 datasheet revision B. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91SAM9260_MATRIX_H | ||
14 | #define AT91SAM9260_MATRIX_H | ||
15 | |||
16 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
17 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
18 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
19 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
20 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
21 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x04) /* Master Configuration Register 5 */ | ||
22 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
23 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
24 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
25 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
26 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
27 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
28 | |||
29 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
30 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
31 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
32 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
33 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
34 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
35 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
36 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
37 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
38 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
39 | #define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */ | ||
40 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
41 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
42 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
43 | |||
44 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
45 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
46 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
47 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
48 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
49 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
50 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
51 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
52 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
53 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
54 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
55 | |||
56 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
57 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
58 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
59 | |||
60 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */ | ||
61 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
62 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | ||
63 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | ||
64 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
65 | #define AT91_MATRIX_CS3A_SMC (0 << 3) | ||
66 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
67 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
68 | #define AT91_MATRIX_CS4A_SMC (0 << 4) | ||
69 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) | ||
70 | #define AT91_MATRIX_CS5A (1 << 5 ) /* Chip Select 5 Assignment */ | ||
71 | #define AT91_MATRIX_CS5A_SMC (0 << 5) | ||
72 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) | ||
73 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
74 | #define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */ | ||
75 | #define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16) | ||
76 | #define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16) | ||
77 | |||
78 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9261.h b/include/asm-arm/arch-at91rm9200/at91sam9261.h new file mode 100644 index 000000000000..8d39672d5b82 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91sam9261.h | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91sam9261.h | ||
3 | * | ||
4 | * Copyright (C) SAN People | ||
5 | * | ||
6 | * Common definitions. | ||
7 | * Based on AT91SAM9261 datasheet revision E. (Preliminary) | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91SAM9261_H | ||
16 | #define AT91SAM9261_H | ||
17 | |||
18 | /* | ||
19 | * Peripheral identifiers/interrupts. | ||
20 | */ | ||
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
23 | #define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */ | ||
24 | #define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */ | ||
25 | #define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */ | ||
26 | #define AT91SAM9261_ID_US0 6 /* USART 0 */ | ||
27 | #define AT91SAM9261_ID_US1 7 /* USART 1 */ | ||
28 | #define AT91SAM9261_ID_US2 8 /* USART 2 */ | ||
29 | #define AT91SAM9261_ID_MCI 9 /* Multimedia Card Interface */ | ||
30 | #define AT91SAM9261_ID_UDP 10 /* USB Device Port */ | ||
31 | #define AT91SAM9261_ID_TWI 11 /* Two-Wire Interface */ | ||
32 | #define AT91SAM9261_ID_SPI0 12 /* Serial Peripheral Interface 0 */ | ||
33 | #define AT91SAM9261_ID_SPI1 13 /* Serial Peripheral Interface 1 */ | ||
34 | #define AT91SAM9261_ID_SSC0 14 /* Serial Synchronous Controller 0 */ | ||
35 | #define AT91SAM9261_ID_SSC1 15 /* Serial Synchronous Controller 1 */ | ||
36 | #define AT91SAM9261_ID_SSC2 16 /* Serial Synchronous Controller 2 */ | ||
37 | #define AT91SAM9261_ID_TC0 17 /* Timer Counter 0 */ | ||
38 | #define AT91SAM9261_ID_TC1 18 /* Timer Counter 1 */ | ||
39 | #define AT91SAM9261_ID_TC2 19 /* Timer Counter 2 */ | ||
40 | #define AT91SAM9261_ID_UHP 20 /* USB Host port */ | ||
41 | #define AT91SAM9261_ID_LCDC 21 /* LDC Controller */ | ||
42 | #define AT91SAM9261_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */ | ||
43 | #define AT91SAM9261_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */ | ||
44 | #define AT91SAM9261_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */ | ||
45 | |||
46 | |||
47 | /* | ||
48 | * User Peripheral physical base addresses. | ||
49 | */ | ||
50 | #define AT91SAM9261_BASE_TCB0 0xfffa0000 | ||
51 | #define AT91SAM9261_BASE_TC0 0xfffa0000 | ||
52 | #define AT91SAM9261_BASE_TC1 0xfffa0040 | ||
53 | #define AT91SAM9261_BASE_TC2 0xfffa0080 | ||
54 | #define AT91SAM9261_BASE_UDP 0xfffa4000 | ||
55 | #define AT91SAM9261_BASE_MCI 0xfffa8000 | ||
56 | #define AT91SAM9261_BASE_TWI 0xfffac000 | ||
57 | #define AT91SAM9261_BASE_US0 0xfffb0000 | ||
58 | #define AT91SAM9261_BASE_US1 0xfffb4000 | ||
59 | #define AT91SAM9261_BASE_US2 0xfffb8000 | ||
60 | #define AT91SAM9261_BASE_SSC0 0xfffbc000 | ||
61 | #define AT91SAM9261_BASE_SSC1 0xfffc0000 | ||
62 | #define AT91SAM9261_BASE_SSC2 0xfffc4000 | ||
63 | #define AT91SAM9261_BASE_SPI0 0xfffc8000 | ||
64 | #define AT91SAM9261_BASE_SPI1 0xfffcc000 | ||
65 | #define AT91_BASE_SYS 0xffffea00 | ||
66 | |||
67 | |||
68 | /* | ||
69 | * System Peripherals (offset from AT91_BASE_SYS) | ||
70 | */ | ||
71 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | ||
72 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | ||
73 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | ||
74 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
75 | #define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) | ||
76 | #define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) | ||
77 | #define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) | ||
78 | #define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) | ||
79 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
80 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
81 | #define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS) | ||
82 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | ||
83 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
84 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
85 | #define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) | ||
86 | |||
87 | |||
88 | /* | ||
89 | * Internal Memory. | ||
90 | */ | ||
91 | #define AT91SAM9261_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | ||
92 | #define AT91SAM9261_SRAM_SIZE 0x00028000 /* Internal SRAM size (160Kb) */ | ||
93 | |||
94 | #define AT91SAM9261_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
95 | #define AT91SAM9261_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */ | ||
96 | |||
97 | #define AT91SAM9261_UHP_BASE 0x00500000 /* USB Host controller */ | ||
98 | #define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */ | ||
99 | |||
100 | |||
101 | #if 0 | ||
102 | /* | ||
103 | * PIO pin definitions (peripheral A/B multiplexing). | ||
104 | */ | ||
105 | #define AT91_PA0_SPI0_MISO (1 << 0) /* A: SPI0 Master In Slave */ | ||
106 | #define AT91_PA0_MCDA0 (1 << 0) /* B: Multimedia Card A Data 0 */ | ||
107 | #define AT91_PA1_SPI0_MOSI (1 << 1) /* A: SPI0 Master Out Slave */ | ||
108 | #define AT91_PA1_MCCDA (1 << 1) /* B: Multimedia Card A Command */ | ||
109 | #define AT91_PA2_SPI0_SPCK (1 << 2) /* A: SPI0 Serial Clock */ | ||
110 | #define AT91_PA2_MCCK (1 << 2) /* B: Multimedia Card Clock */ | ||
111 | #define AT91_PA3_SPI0_NPCS0 (1 << 3) /* A: SPI0 Peripheral Chip Select 0 */ | ||
112 | #define AT91_PA4_SPI0_NPCS1 (1 << 4) /* A: SPI0 Peripheral Chip Select 1 */ | ||
113 | #define AT91_PA4_MCDA1 (1 << 4) /* B: Multimedia Card A Data 1 */ | ||
114 | #define AT91_PA5_SPI0_NPCS2 (1 << 5) /* A: SPI0 Peripheral Chip Select 2 */ | ||
115 | #define AT91_PA5_MCDA2 (1 << 5) /* B: Multimedia Card A Data 2 */ | ||
116 | #define AT91_PA6_SPI0_NPCS3 (1 << 6) /* A: SPI0 Peripheral Chip Select 3 */ | ||
117 | #define AT91_PA6_MCDA3 (1 << 6) /* B: Multimedia Card A Data 3 */ | ||
118 | #define AT91_PA7_TWD (1 << 7) /* A: TWI Two-wire Serial Data */ | ||
119 | #define AT91_PA7_PCK0 (1 << 7) /* B: PMC Programmable clock Output 0 */ | ||
120 | #define AT91_PA8_TWCK (1 << 8) /* A: TWI Two-wire Serial Clock */ | ||
121 | #define AT91_PA8_PCK1 (1 << 8) /* B: PMC Programmable clock Output 1 */ | ||
122 | #define AT91_PA9_DRXD (1 << 9) /* A: DBGU Debug Receive Data */ | ||
123 | #define AT91_PA9_PCK2 (1 << 9) /* B: PMC Programmable clock Output 2 */ | ||
124 | #define AT91_PA10_DTXD (1 << 10) /* A: DBGU Debug Transmit Data */ | ||
125 | #define AT91_PA10_PCK3 (1 << 10) /* B: PMC Programmable clock Output 3 */ | ||
126 | #define AT91_PA11_TSYNC (1 << 11) /* A: Trace Synchronization Signal */ | ||
127 | #define AT91_PA11_SCK1 (1 << 11) /* B: USART1 Serial Clock */ | ||
128 | #define AT91_PA12_TCLK (1 << 12) /* A: Trace Clock */ | ||
129 | #define AT91_PA12_RTS1 (1 << 12) /* B: USART1 Ready To Send */ | ||
130 | #define AT91_PA13_TPS0 (1 << 13) /* A: Trace ARM Pipeline Status 0 */ | ||
131 | #define AT91_PA13_CTS1 (1 << 13) /* B: USART1 Clear To Send */ | ||
132 | #define AT91_PA14_TPS1 (1 << 14) /* A: Trace ARM Pipeline Status 1 */ | ||
133 | #define AT91_PA14_SCK2 (1 << 14) /* B: USART2 Serial Clock */ | ||
134 | #define AT91_PA15_TPS2 (1 << 15) /* A: Trace ARM Pipeline Status 2 */ | ||
135 | #define AT91_PA15_RTS2 (1 << 15) /* B: USART2 Ready To Send */ | ||
136 | #define AT91_PA16_TPK0 (1 << 16) /* A: Trace Packet Port 0 */ | ||
137 | #define AT91_PA16_CTS2 (1 << 16) /* B: USART2 Clear To Send */ | ||
138 | #define AT91_PA17_TPK1 (1 << 17) /* A: Trace Packet Port 1 */ | ||
139 | #define AT91_PA17_TF1 (1 << 17) /* B: SSC1 Transmit Frame Sync */ | ||
140 | #define AT91_PA18_TPK2 (1 << 18) /* A: Trace Packet Port 2 */ | ||
141 | #define AT91_PA18_TK1 (1 << 18) /* B: SSC1 Transmit Clock */ | ||
142 | #define AT91_PA19_TPK3 (1 << 19) /* A: Trace Packet Port 3 */ | ||
143 | #define AT91_PA19_TD1 (1 << 19) /* B: SSC1 Transmit Data */ | ||
144 | #define AT91_PA20_TPK4 (1 << 20) /* A: Trace Packet Port 4 */ | ||
145 | #define AT91_PA20_RD1 (1 << 20) /* B: SSC1 Receive Data */ | ||
146 | #define AT91_PA21_TPK5 (1 << 21) /* A: Trace Packet Port 5 */ | ||
147 | #define AT91_PA21_RK1 (1 << 21) /* B: SSC1 Receive Clock */ | ||
148 | #define AT91_PA22_TPK6 (1 << 22) /* A: Trace Packet Port 6 */ | ||
149 | #define AT91_PA22_RF1 (1 << 22) /* B: SSC1 Receive Frame Sync */ | ||
150 | #define AT91_PA23_TPK7 (1 << 23) /* A: Trace Packet Port 7 */ | ||
151 | #define AT91_PA23_RTS0 (1 << 23) /* B: USART0 Ready To Send */ | ||
152 | #define AT91_PA24_TPK8 (1 << 24) /* A: Trace Packet Port 8 */ | ||
153 | #define AT91_PA24_SPI1_NPCS1 (1 << 24) /* B: SPI1 Peripheral Chip Select 1 */ | ||
154 | #define AT91_PA25_TPK9 (1 << 25) /* A: Trace Packet Port 9 */ | ||
155 | #define AT91_PA25_SPI1_NPCS2 (1 << 25) /* B: SPI1 Peripheral Chip Select 2 */ | ||
156 | #define AT91_PA26_TPK10 (1 << 26) /* A: Trace Packet Port 10 */ | ||
157 | #define AT91_PA26_SPI1_NPCS3 (1 << 26) /* B: SPI1 Peripheral Chip Select 3 */ | ||
158 | #define AT91_PA27_TPK11 (1 << 27) /* A: Trace Packet Port 11 */ | ||
159 | #define AT91_PA27_SPI0_NPCS1 (1 << 27) /* B: SPI0 Peripheral Chip Select 1 */ | ||
160 | #define AT91_PA28_TPK12 (1 << 28) /* A: Trace Packet Port 12 */ | ||
161 | #define AT91_PA28_SPI0_NPCS2 (1 << 28) /* B: SPI0 Peripheral Chip Select 2 */ | ||
162 | #define AT91_PA29_TPK13 (1 << 29) /* A: Trace Packet Port 13 */ | ||
163 | #define AT91_PA29_SPI0_NPCS3 (1 << 29) /* B: SPI0 Peripheral Chip Select 3 */ | ||
164 | #define AT91_PA30_TPK14 (1 << 30) /* A: Trace Packet Port 14 */ | ||
165 | #define AT91_PA30_A23 (1 << 30) /* B: Address Bus bit 23 */ | ||
166 | #define AT91_PA31_TPK15 (1 << 31) /* A: Trace Packet Port 15 */ | ||
167 | #define AT91_PA31_A24 (1 << 31) /* B: Address Bus bit 24 */ | ||
168 | |||
169 | #define AT91_PB0_LCDVSYNC (1 << 0) /* A: LCD Vertical Synchronization */ | ||
170 | #define AT91_PB1_LCDHSYNC (1 << 1) /* A: LCD Horizontal Synchronization */ | ||
171 | #define AT91_PB2_LCDDOTCK (1 << 2) /* A: LCD Dot Clock */ | ||
172 | #define AT91_PB2_PCK0 (1 << 2) /* B: PMC Programmable clock Output 0 */ | ||
173 | #define AT91_PB3_LCDDEN (1 << 3) /* A: LCD Data Enable */ | ||
174 | #define AT91_PB4_LCDCC (1 << 4) /* A: LCD Contrast Control */ | ||
175 | #define AT91_PB4_LCDD2 (1 << 4) /* B: LCD Data Bus Bit 2 */ | ||
176 | #define AT91_PB5_LCDD0 (1 << 5) /* A: LCD Data Bus Bit 0 */ | ||
177 | #define AT91_PB5_LCDD3 (1 << 5) /* B: LCD Data Bus Bit 3 */ | ||
178 | #define AT91_PB6_LCDD1 (1 << 6) /* A: LCD Data Bus Bit 1 */ | ||
179 | #define AT91_PB6_LCDD4 (1 << 6) /* B: LCD Data Bus Bit 4 */ | ||
180 | #define AT91_PB7_LCDD2 (1 << 7) /* A: LCD Data Bus Bit 2 */ | ||
181 | #define AT91_PB7_LCDD5 (1 << 7) /* B: LCD Data Bus Bit 5 */ | ||
182 | #define AT91_PB8_LCDD3 (1 << 8) /* A: LCD Data Bus Bit 3 */ | ||
183 | #define AT91_PB8_LCDD6 (1 << 8) /* B: LCD Data Bus Bit 6 */ | ||
184 | #define AT91_PB9_LCDD4 (1 << 9) /* A: LCD Data Bus Bit 4 */ | ||
185 | #define AT91_PB9_LCDD7 (1 << 9) /* B: LCD Data Bus Bit 7 */ | ||
186 | #define AT91_PB10_LCDD5 (1 << 10) /* A: LCD Data Bus Bit 5 */ | ||
187 | #define AT91_PB10_LCDD10 (1 << 10) /* B: LCD Data Bus Bit 10 */ | ||
188 | #define AT91_PB11_LCDD6 (1 << 11) /* A: LCD Data Bus Bit 6 */ | ||
189 | #define AT91_PB11_LCDD11 (1 << 11) /* B: LCD Data Bus Bit 11 */ | ||
190 | #define AT91_PB12_LCDD7 (1 << 12) /* A: LCD Data Bus Bit 7 */ | ||
191 | #define AT91_PB12_LCDD12 (1 << 12) /* B: LCD Data Bus Bit 12 */ | ||
192 | #define AT91_PB13_LCDD8 (1 << 13) /* A: LCD Data Bus Bit 8 */ | ||
193 | #define AT91_PB13_LCDD13 (1 << 13) /* B: LCD Data Bus Bit 13 */ | ||
194 | #define AT91_PB14_LCDD9 (1 << 14) /* A: LCD Data Bus Bit 9 */ | ||
195 | #define AT91_PB14_LCDD14 (1 << 14) /* B: LCD Data Bus Bit 14 */ | ||
196 | #define AT91_PB15_LCDD10 (1 << 15) /* A: LCD Data Bus Bit 10 */ | ||
197 | #define AT91_PB15_LCDD15 (1 << 15) /* B: LCD Data Bus Bit 15 */ | ||
198 | #define AT91_PB16_LCDD11 (1 << 16) /* A: LCD Data Bus Bit 11 */ | ||
199 | #define AT91_PB16_LCDD19 (1 << 16) /* B: LCD Data Bus Bit 19 */ | ||
200 | #define AT91_PB17_LCDD12 (1 << 17) /* A: LCD Data Bus Bit 12 */ | ||
201 | #define AT91_PB17_LCDD20 (1 << 17) /* B: LCD Data Bus Bit 20 */ | ||
202 | #define AT91_PB18_LCDD13 (1 << 18) /* A: LCD Data Bus Bit 13 */ | ||
203 | #define AT91_PB18_LCDD21 (1 << 18) /* B: LCD Data Bus Bit 21 */ | ||
204 | #define AT91_PB19_LCDD14 (1 << 19) /* A: LCD Data Bus Bit 14 */ | ||
205 | #define AT91_PB19_LCDD22 (1 << 19) /* B: LCD Data Bus Bit 22 */ | ||
206 | #define AT91_PB20_LCDD15 (1 << 20) /* A: LCD Data Bus Bit 15 */ | ||
207 | #define AT91_PB20_LCDD23 (1 << 20) /* B: LCD Data Bus Bit 23 */ | ||
208 | #define AT91_PB21_TF0 (1 << 21) /* A: SSC0 Transmit Frame Sync */ | ||
209 | #define AT91_PB21_LCDD16 (1 << 21) /* B: LCD Data Bus Bit 16 */ | ||
210 | #define AT91_PB22_TK0 (1 << 22) /* A: SSC0 Transmit Clock */ | ||
211 | #define AT91_PB22_LCDD17 (1 << 22) /* B: LCD Data Bus Bit 17 */ | ||
212 | #define AT91_PB23_TD0 (1 << 23) /* A: SSC0 Transmit Data */ | ||
213 | #define AT91_PB23_LCDD18 (1 << 23) /* B: LCD Data Bus Bit 18 */ | ||
214 | #define AT91_PB24_RD0 (1 << 24) /* A: SSC0 Receive Data */ | ||
215 | #define AT91_PB24_LCDD19 (1 << 24) /* B: LCD Data Bus Bit 19 */ | ||
216 | #define AT91_PB25_RK0 (1 << 25) /* A: SSC0 Receive Clock */ | ||
217 | #define AT91_PB25_LCDD20 (1 << 25) /* B: LCD Data Bus Bit 20 */ | ||
218 | #define AT91_PB26_RF0 (1 << 26) /* A: SSC0 Receive Frame Sync */ | ||
219 | #define AT91_PB26_LCDD21 (1 << 26) /* B: LCD Data Bus Bit 21 */ | ||
220 | #define AT91_PB27_SPI1_NPCS1 (1 << 27) /* A: SPI1 Peripheral Chip Select 1 */ | ||
221 | #define AT91_PB27_LCDD22 (1 << 27) /* B: LCD Data Bus Bit 22 */ | ||
222 | #define AT91_PB28_SPI1_NPCS0 (1 << 28) /* A: SPI1 Peripheral Chip Select 0 */ | ||
223 | #define AT91_PB28_LCDD23 (1 << 28) /* B: LCD Data Bus Bit 23 */ | ||
224 | #define AT91_PB29_SPI1_SPCK (1 << 29) /* A: SPI1 Serial Clock */ | ||
225 | #define AT91_PB29_IRQ2 (1 << 29) /* B: Interrupt input 2 */ | ||
226 | #define AT91_PB30_SPI1_MISO (1 << 30) /* A: SPI1 Master In Slave */ | ||
227 | #define AT91_PB30_IRQ1 (1 << 30) /* B: Interrupt input 1 */ | ||
228 | #define AT91_PB31_SPI1_MOSI (1 << 31) /* A: SPI1 Master Out Slave */ | ||
229 | #define AT91_PB31_PCK2 (1 << 31) /* B: PMC Programmable clock Output 2 */ | ||
230 | |||
231 | #define AT91_PC0_SMOE (1 << 0) /* A: SmartMedia Output Enable */ | ||
232 | #define AT91_PC0_NCS6 (1 << 0) /* B: Chip Select 6 */ | ||
233 | #define AT91_PC1_SMWE (1 << 1) /* A: SmartMedia Write Enable */ | ||
234 | #define AT91_PC1_NCS7 (1 << 1) /* B: Chip Select 7 */ | ||
235 | #define AT91_PC2_NWAIT (1 << 2) /* A: NWAIT */ | ||
236 | #define AT91_PC2_IRQ0 (1 << 2) /* B: Interrupt input 0 */ | ||
237 | #define AT91_PC3_A25_CFRNW (1 << 3) /* A: Address Bus[25] / Compact Flash Read Not Write */ | ||
238 | #define AT91_PC4_NCS4_CFCS0 (1 << 4) /* A: Chip Select 4 / CompactFlash Chip Select 0 */ | ||
239 | #define AT91_PC5_NCS5_CFCS1 (1 << 5) /* A: Chip Select 5 / CompactFlash Chip Select 1 */ | ||
240 | #define AT91_PC6_CFCE1 (1 << 6) /* A: CompactFlash Chip Enable 1 */ | ||
241 | #define AT91_PC7_CFCE2 (1 << 7) /* A: CompactFlash Chip Enable 2 */ | ||
242 | #define AT91_PC8_TXD0 (1 << 8) /* A: USART0 Transmit Data */ | ||
243 | #define AT91_PC8_PCK2 (1 << 8) /* B: PMC Programmable clock Output 2 */ | ||
244 | #define AT91_PC9_RXD0 (1 << 9) /* A: USART0 Receive Data */ | ||
245 | #define AT91_PC9_PCK3 (1 << 9) /* B: PMC Programmable clock Output 3 */ | ||
246 | #define AT91_PC10_RTS0 (1 << 10) /* A: USART0 Ready To Send */ | ||
247 | #define AT91_PC10_SCK0 (1 << 10) /* B: USART0 Serial Clock */ | ||
248 | #define AT91_PC11_CTS0 (1 << 11) /* A: USART0 Clear To Send */ | ||
249 | #define AT91_PC11_FIQ (1 << 11) /* B: AIC Fast Interrupt Input */ | ||
250 | #define AT91_PC12_TXD1 (1 << 12) /* A: USART1 Transmit Data */ | ||
251 | #define AT91_PC12_NCS6 (1 << 12) /* B: Chip Select 6 */ | ||
252 | #define AT91_PC13_RXD1 (1 << 13) /* A: USART1 Receive Data */ | ||
253 | #define AT91_PC13_NCS7 (1 << 13) /* B: Chip Select 7 */ | ||
254 | #define AT91_PC14_TXD2 (1 << 14) /* A: USART2 Transmit Data */ | ||
255 | #define AT91_PC14_SPI1_NPCS2 (1 << 14) /* B: SPI1 Peripheral Chip Select 2 */ | ||
256 | #define AT91_PC15_RXD2 (1 << 15) /* A: USART2 Receive Data */ | ||
257 | #define AT91_PC15_SPI1_NPCS3 (1 << 15) /* B: SPI1 Peripheral Chip Select 3 */ | ||
258 | #define AT91_PC16_D16 (1 << 16) /* A: Data Bus [16] */ | ||
259 | #define AT91_PC16_TCLK0 (1 << 16) /* B: Timer Counter 0 external clock input */ | ||
260 | #define AT91_PC17_D17 (1 << 17) /* A: Data Bus [17] */ | ||
261 | #define AT91_PC17_TCLK1 (1 << 17) /* B: Timer Counter 1 external clock input */ | ||
262 | #define AT91_PC18_D18 (1 << 18) /* A: Data Bus [18] */ | ||
263 | #define AT91_PC18_TCLK2 (1 << 18) /* B: Timer Counter 2 external clock input */ | ||
264 | #define AT91_PC19_D19 (1 << 19) /* A: Data Bus [19] */ | ||
265 | #define AT91_PC19_TIOA0 (1 << 19) /* B: Timer Counter 0 Multipurpose Timer I/O Pin A */ | ||
266 | #define AT91_PC20_D20 (1 << 20) /* A: Data Bus [20] */ | ||
267 | #define AT91_PC20_TIOB0 (1 << 20) /* B: Timer Counter 0 Multipurpose Timer I/O Pin B */ | ||
268 | #define AT91_PC21_D21 (1 << 21) /* A: Data Bus [21] */ | ||
269 | #define AT91_PC21_TIOA1 (1 << 21) /* B: Timer Counter 1 Multipurpose Timer I/O Pin A */ | ||
270 | #define AT91_PC22_D22 (1 << 22) /* A: Data Bus [22] */ | ||
271 | #define AT91_PC22_TIOB1 (1 << 22) /* B: Timer Counter 1 Multipurpose Timer I/O Pin B */ | ||
272 | #define AT91_PC23_D23 (1 << 23) /* A: Data Bus [23] */ | ||
273 | #define AT91_PC23_TIOA2 (1 << 23) /* B: Timer Counter 2 Multipurpose Timer I/O Pin A */ | ||
274 | #define AT91_PC24_D24 (1 << 24) /* A: Data Bus [24] */ | ||
275 | #define AT91_PC24_TIOB2 (1 << 24) /* B: Timer Counter 2 Multipurpose Timer I/O Pin B */ | ||
276 | #define AT91_PC25_D25 (1 << 25) /* A: Data Bus [25] */ | ||
277 | #define AT91_PC25_TF2 (1 << 25) /* B: SSC2 Transmit Frame Sync */ | ||
278 | #define AT91_PC26_D26 (1 << 26) /* A: Data Bus [26] */ | ||
279 | #define AT91_PC26_TK2 (1 << 26) /* B: SSC2 Transmit Clock */ | ||
280 | #define AT91_PC27_D27 (1 << 27) /* A: Data Bus [27] */ | ||
281 | #define AT91_PC27_TD2 (1 << 27) /* B: SSC2 Transmit Data */ | ||
282 | #define AT91_PC28_D28 (1 << 28) /* A: Data Bus [28] */ | ||
283 | #define AT91_PC28_RD2 (1 << 28) /* B: SSC2 Receive Data */ | ||
284 | #define AT91_PC29_D29 (1 << 29) /* A: Data Bus [29] */ | ||
285 | #define AT91_PC29_RK2 (1 << 29) /* B: SSC2 Receive Clock */ | ||
286 | #define AT91_PC30_D30 (1 << 30) /* A: Data Bus [30] */ | ||
287 | #define AT91_PC30_RF2 (1 << 30) /* B: SSC2 Receive Frame Sync */ | ||
288 | #define AT91_PC31_D31 (1 << 31) /* A: Data Bus [31] */ | ||
289 | #define AT91_PC31_PCK1 (1 << 31) /* B: PMC Programmable clock Output 1 */ | ||
290 | #endif | ||
291 | |||
292 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h b/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h new file mode 100644 index 000000000000..270a5dcdf1cd --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h | ||
3 | * | ||
4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91SAM9261_MATRIX_H | ||
14 | #define AT91SAM9261_MATRIX_H | ||
15 | |||
16 | #define AT91_MATRIX_MCFG (AT91_MATRIX + 0x00) /* Master Configuration Register */ | ||
17 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
18 | #define AT01_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
19 | |||
20 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x04) /* Slave Configuration Register 0 */ | ||
21 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x08) /* Slave Configuration Register 1 */ | ||
22 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x0C) /* Slave Configuration Register 2 */ | ||
23 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x10) /* Slave Configuration Register 3 */ | ||
24 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x14) /* Slave Configuration Register 4 */ | ||
25 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
26 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
27 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
28 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
29 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
30 | #define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */ | ||
31 | |||
32 | #define AT91_MATRIX_TCR (AT91_MATRIX + 0x24) /* TCM Configuration Register */ | ||
33 | #define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */ | ||
34 | #define AT91_MATRIX_ITCM_0 (0 << 0) | ||
35 | #define AT91_MATRIX_ITCM_16 (5 << 0) | ||
36 | #define AT91_MATRIX_ITCM_32 (6 << 0) | ||
37 | #define AT91_MATRIX_ITCM_64 (7 << 0) | ||
38 | #define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */ | ||
39 | #define AT91_MATRIX_DTCM_0 (0 << 4) | ||
40 | #define AT91_MATRIX_DTCM_16 (5 << 4) | ||
41 | #define AT91_MATRIX_DTCM_32 (6 << 4) | ||
42 | #define AT91_MATRIX_DTCM_64 (7 << 4) | ||
43 | |||
44 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x30) /* EBI Chip Select Assignment Register */ | ||
45 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
46 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | ||
47 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | ||
48 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
49 | #define AT91_MATRIX_CS3A_SMC (0 << 3) | ||
50 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
51 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
52 | #define AT91_MATRIX_CS4A_SMC (0 << 4) | ||
53 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) | ||
54 | #define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
55 | #define AT91_MATRIX_CS5A_SMC (0 << 5) | ||
56 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) | ||
57 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
58 | |||
59 | #define AT91_MATRIX_USBPUCR (AT91_MATRIX + 0x34) /* USB Pad Pull-Up Control Register */ | ||
60 | #define AT91_MATRIX_USBPUCR_PUON (1 << 30) /* USB Device PAD Pull-up Enable */ | ||
61 | |||
62 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h b/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h new file mode 100644 index 000000000000..7d94968b5d57 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91sam926x_mc.h | ||
3 | * | ||
4 | * Memory Controllers (SMC, SDRAMC) - System peripherals registers. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91SAM926x_MC_H | ||
14 | #define AT91SAM926x_MC_H | ||
15 | |||
16 | /* SDRAM Controller (SDRAMC) registers */ | ||
17 | #define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */ | ||
18 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
19 | #define AT91_SDRAMC_MODE_NORMAL 0 | ||
20 | #define AT91_SDRAMC_MODE_NOP 1 | ||
21 | #define AT91_SDRAMC_MODE_PRECHARGE 2 | ||
22 | #define AT91_SDRAMC_MODE_LMR 3 | ||
23 | #define AT91_SDRAMC_MODE_REFRESH 4 | ||
24 | #define AT91_SDRAMC_MODE_EXT_LMR 5 | ||
25 | #define AT91_SDRAMC_MODE_DEEP 6 | ||
26 | |||
27 | #define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */ | ||
28 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | ||
29 | |||
30 | #define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */ | ||
31 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
32 | #define AT91_SDRAMC_NC_8 (0 << 0) | ||
33 | #define AT91_SDRAMC_NC_9 (1 << 0) | ||
34 | #define AT91_SDRAMC_NC_10 (2 << 0) | ||
35 | #define AT91_SDRAMC_NC_11 (3 << 0) | ||
36 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
37 | #define AT91_SDRAMC_NR_11 (0 << 2) | ||
38 | #define AT91_SDRAMC_NR_12 (1 << 2) | ||
39 | #define AT91_SDRAMC_NR_13 (2 << 2) | ||
40 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
41 | #define AT91_SDRAMC_NB_2 (0 << 4) | ||
42 | #define AT91_SDRAMC_NB_4 (1 << 4) | ||
43 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
44 | #define AT91_SDRAMC_CAS_1 (1 << 5) | ||
45 | #define AT91_SDRAMC_CAS_2 (2 << 5) | ||
46 | #define AT91_SDRAMC_CAS_3 (3 << 5) | ||
47 | #define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */ | ||
48 | #define AT91_SDRAMC_DBW_32 (0 << 7) | ||
49 | #define AT91_SDRAMC_DBW_16 (1 << 7) | ||
50 | #define AT91_SDRAMC_TWR (0xf << 8) /* Write Recovery Delay */ | ||
51 | #define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle Delay */ | ||
52 | #define AT91_SDRAMC_TRP (0xf << 16) /* Row Precharge Delay */ | ||
53 | #define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column Delay */ | ||
54 | #define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */ | ||
55 | #define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */ | ||
56 | |||
57 | #define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */ | ||
58 | #define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */ | ||
59 | #define AT91_SDRAMC_LPCB_DISABLE 0 | ||
60 | #define AT91_SDRAMC_LPCB_SELF_REFRESH 1 | ||
61 | #define AT91_SDRAMC_LPCB_POWER_DOWN 2 | ||
62 | #define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3 | ||
63 | #define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */ | ||
64 | #define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | ||
65 | #define AT91_SDRAMC_DS (3 << 10) /* Drive Strenght */ | ||
66 | #define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | ||
67 | #define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12) | ||
68 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) | ||
69 | #define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12) | ||
70 | |||
71 | #define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */ | ||
72 | #define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */ | ||
73 | #define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */ | ||
74 | #define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */ | ||
75 | #define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */ | ||
76 | |||
77 | #define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */ | ||
78 | #define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */ | ||
79 | #define AT91_SDRAMC_MD_SDRAM 0 | ||
80 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 | ||
81 | |||
82 | |||
83 | /* Static Memory Controller (SMC) registers */ | ||
84 | #define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
85 | #define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */ | ||
86 | #define AT91_SMC_NWESETUP_(x) ((x) << 0) | ||
87 | #define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */ | ||
88 | #define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8) | ||
89 | #define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */ | ||
90 | #define AT91_SMC_NRDSETUP_(x) ((x) << 16) | ||
91 | #define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */ | ||
92 | #define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24) | ||
93 | |||
94 | #define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
95 | #define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */ | ||
96 | #define AT91_SMC_NWEPULSE_(x) ((x) << 0) | ||
97 | #define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */ | ||
98 | #define AT91_SMC_NCS_WRPULSE_(x)((x) << 8) | ||
99 | #define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */ | ||
100 | #define AT91_SMC_NRDPULSE_(x) ((x) << 16) | ||
101 | #define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */ | ||
102 | #define AT91_SMC_NCS_RDPULSE_(x)((x) << 24) | ||
103 | |||
104 | #define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
105 | #define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */ | ||
106 | #define AT91_SMC_NWECYCLE_(x) ((x) << 0) | ||
107 | #define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */ | ||
108 | #define AT91_SMC_NRDCYCLE_(x) ((x) << 16) | ||
109 | |||
110 | #define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
111 | #define AT91_SMC_READMODE (1 << 0) /* Read Mode */ | ||
112 | #define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */ | ||
113 | #define AT91_SMC_EXNWMODE (3 << 5) /* NWAIT Mode */ | ||
114 | #define AT91_SMC_EXNWMODE_DISABLE (0 << 5) | ||
115 | #define AT91_SMC_EXNWMODE_FROZEN (2 << 5) | ||
116 | #define AT91_SMC_EXNWMODE_READY (3 << 5) | ||
117 | #define AT91_SMC_BAT (1 << 8) /* Byte Access Type */ | ||
118 | #define AT91_SMC_BAT_SELECT (0 << 8) | ||
119 | #define AT91_SMC_BAT_WRITE (1 << 8) | ||
120 | #define AT91_SMC_DBW (3 << 12) /* Data Bus Width */ | ||
121 | #define AT91_SMC_DBW_8 (0 << 12) | ||
122 | #define AT91_SMC_DBW_16 (1 << 12) | ||
123 | #define AT91_SMC_DBW_32 (2 << 12) | ||
124 | #define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */ | ||
125 | #define AT91_SMC_TDF_(x) ((x) << 16) | ||
126 | #define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */ | ||
127 | #define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */ | ||
128 | #define AT91_SMC_PS (3 << 28) /* Page Size */ | ||
129 | #define AT91_SMC_PS_4 (0 << 28) | ||
130 | #define AT91_SMC_PS_8 (1 << 28) | ||
131 | #define AT91_SMC_PS_16 (2 << 28) | ||
132 | #define AT91_SMC_PS_32 (3 << 28) | ||
133 | |||
134 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h index 3cc9aec80f9d..768e0fc6aa2f 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h | |||
@@ -48,13 +48,14 @@ struct at91_cf_data { | |||
48 | u8 det_pin; /* Card detect */ | 48 | u8 det_pin; /* Card detect */ |
49 | u8 vcc_pin; /* power switching */ | 49 | u8 vcc_pin; /* power switching */ |
50 | u8 rst_pin; /* card reset */ | 50 | u8 rst_pin; /* card reset */ |
51 | u8 chipselect; /* EBI Chip Select number */ | ||
51 | }; | 52 | }; |
52 | extern void __init at91_add_device_cf(struct at91_cf_data *data); | 53 | extern void __init at91_add_device_cf(struct at91_cf_data *data); |
53 | 54 | ||
54 | /* MMC / SD */ | 55 | /* MMC / SD */ |
55 | struct at91_mmc_data { | 56 | struct at91_mmc_data { |
56 | u8 det_pin; /* card detect IRQ */ | 57 | u8 det_pin; /* card detect IRQ */ |
57 | unsigned is_b:1; /* uses B side (vs A) */ | 58 | unsigned slot_b:1; /* uses Slot B */ |
58 | unsigned wire4:1; /* (SD) supports DAT0..DAT3 */ | 59 | unsigned wire4:1; /* (SD) supports DAT0..DAT3 */ |
59 | u8 wp_pin; /* (SD) writeprotect detect */ | 60 | u8 wp_pin; /* (SD) writeprotect detect */ |
60 | u8 vcc_pin; /* power switching (high == on) */ | 61 | u8 vcc_pin; /* power switching (high == on) */ |
@@ -81,7 +82,8 @@ struct at91_nand_data { | |||
81 | u8 rdy_pin; /* ready/busy */ | 82 | u8 rdy_pin; /* ready/busy */ |
82 | u8 ale; /* address line number connected to ALE */ | 83 | u8 ale; /* address line number connected to ALE */ |
83 | u8 cle; /* address line number connected to CLE */ | 84 | u8 cle; /* address line number connected to CLE */ |
84 | struct mtd_partition* (*partition_info)(int, int*); | 85 | u8 bus_width_16; /* buswidth is 16 bit */ |
86 | struct mtd_partition* (*partition_info)(int, int*); | ||
85 | }; | 87 | }; |
86 | extern void __init at91_add_device_nand(struct at91_nand_data *data); | 88 | extern void __init at91_add_device_nand(struct at91_nand_data *data); |
87 | 89 | ||
diff --git a/include/asm-arm/arch-at91rm9200/cpu.h b/include/asm-arm/arch-at91rm9200/cpu.h new file mode 100644 index 000000000000..6f8d09b08692 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/cpu.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/cpu.h | ||
3 | * | ||
4 | * Copyright (C) 2006 SAN People | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_CPU_H | ||
14 | #define __ASM_ARCH_CPU_H | ||
15 | |||
16 | #include <asm/hardware.h> | ||
17 | #include <asm/arch/at91_dbgu.h> | ||
18 | |||
19 | |||
20 | #define ARCH_ID_AT91RM9200 0x09290780 | ||
21 | #define ARCH_ID_AT91SAM9260 0x019803a0 | ||
22 | #define ARCH_ID_AT91SAM9261 0x019703a0 | ||
23 | |||
24 | |||
25 | static inline unsigned long at91_cpu_identify(void) | ||
26 | { | ||
27 | return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION); | ||
28 | } | ||
29 | |||
30 | |||
31 | #ifdef CONFIG_ARCH_AT91RM9200 | ||
32 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) | ||
33 | #else | ||
34 | #define cpu_is_at91rm9200() (0) | ||
35 | #endif | ||
36 | |||
37 | #ifdef CONFIG_ARCH_AT91SAM9260 | ||
38 | #define cpu_is_at91sam9260() (at91_cpu_identify() == ARCH_ID_AT91SAM9260) | ||
39 | #else | ||
40 | #define cpu_is_at91sam9260() (0) | ||
41 | #endif | ||
42 | |||
43 | #ifdef CONFIG_ARCH_AT91SAM9261 | ||
44 | #define cpu_is_at91sam9261() (at91_cpu_identify() == ARCH_ID_AT91SAM9261) | ||
45 | #else | ||
46 | #define cpu_is_at91sam9261() (0) | ||
47 | #endif | ||
48 | |||
49 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/debug-macro.S b/include/asm-arm/arch-at91rm9200/debug-macro.S index f496b54c4c3e..85cdadf26634 100644 --- a/include/asm-arm/arch-at91rm9200/debug-macro.S +++ b/include/asm-arm/arch-at91rm9200/debug-macro.S | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | #include <asm/arch/at91_dbgu.h> | ||
15 | 16 | ||
16 | .macro addruart,rx | 17 | .macro addruart,rx |
17 | mrc p15, 0, \rx, c1, c0 | 18 | mrc p15, 0, \rx, c1, c0 |
diff --git a/include/asm-arm/arch-at91rm9200/entry-macro.S b/include/asm-arm/arch-at91rm9200/entry-macro.S index 61a326e94909..57248a796472 100644 --- a/include/asm-arm/arch-at91rm9200/entry-macro.S +++ b/include/asm-arm/arch-at91rm9200/entry-macro.S | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/hardware.h> | 13 | #include <asm/hardware.h> |
14 | #include <asm/arch/at91_aic.h> | ||
14 | 15 | ||
15 | .macro disable_fiq | 16 | .macro disable_fiq |
16 | .endm | 17 | .endm |
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 9ca4cc9c0b2e..9ea5bfe06320 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h | |||
@@ -16,8 +16,16 @@ | |||
16 | 16 | ||
17 | #include <asm/sizes.h> | 17 | #include <asm/sizes.h> |
18 | 18 | ||
19 | #if defined(CONFIG_ARCH_AT91RM9200) | ||
19 | #include <asm/arch/at91rm9200.h> | 20 | #include <asm/arch/at91rm9200.h> |
20 | #include <asm/arch/at91rm9200_sys.h> | 21 | #elif defined(CONFIG_ARCH_AT91SAM9260) |
22 | #include <asm/arch/at91sam9260.h> | ||
23 | #elif defined(CONFIG_ARCH_AT91SAM9261) | ||
24 | #include <asm/arch/at91sam9261.h> | ||
25 | #else | ||
26 | #error "Unsupported AT91 processor" | ||
27 | #endif | ||
28 | |||
21 | 29 | ||
22 | /* | 30 | /* |
23 | * Remap the peripherals from address 0xFFFA0000 .. 0xFFFFFFFF | 31 | * Remap the peripherals from address 0xFFFA0000 .. 0xFFFFFFFF |
@@ -34,29 +42,27 @@ | |||
34 | * Virtual to Physical Address mapping for IO devices. | 42 | * Virtual to Physical Address mapping for IO devices. |
35 | */ | 43 | */ |
36 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) | 44 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) |
37 | #define AT91_VA_BASE_SPI AT91_IO_P2V(AT91RM9200_BASE_SPI) | ||
38 | #define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC) | 45 | #define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC) |
39 | #define AT91_VA_BASE_TWI AT91_IO_P2V(AT91RM9200_BASE_TWI) | ||
40 | #define AT91_VA_BASE_MCI AT91_IO_P2V(AT91RM9200_BASE_MCI) | ||
41 | #define AT91_VA_BASE_UDP AT91_IO_P2V(AT91RM9200_BASE_UDP) | ||
42 | 46 | ||
43 | /* Internal SRAM is mapped below the IO devices */ | 47 | /* Internal SRAM is mapped below the IO devices */ |
44 | #define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE) | 48 | #define AT91_SRAM_MAX SZ_1M |
49 | #define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX) | ||
45 | 50 | ||
46 | /* Serial ports */ | 51 | /* Serial ports */ |
47 | #define ATMEL_MAX_UART 5 /* 4 USART3's and one DBGU port */ | 52 | #define ATMEL_MAX_UART 7 /* 6 USART3's and one DBGU port (SAM9260) */ |
48 | 53 | ||
49 | /* FLASH */ | 54 | /* External Memory Map */ |
50 | #define AT91_FLASH_BASE 0x10000000 /* NCS0: Flash physical base address */ | 55 | #define AT91_CHIPSELECT_0 0x10000000 |
56 | #define AT91_CHIPSELECT_1 0x20000000 | ||
57 | #define AT91_CHIPSELECT_2 0x30000000 | ||
58 | #define AT91_CHIPSELECT_3 0x40000000 | ||
59 | #define AT91_CHIPSELECT_4 0x50000000 | ||
60 | #define AT91_CHIPSELECT_5 0x60000000 | ||
61 | #define AT91_CHIPSELECT_6 0x70000000 | ||
62 | #define AT91_CHIPSELECT_7 0x80000000 | ||
51 | 63 | ||
52 | /* SDRAM */ | 64 | /* SDRAM */ |
53 | #define AT91_SDRAM_BASE 0x20000000 /* NCS1: SDRAM physical base address */ | 65 | #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 |
54 | |||
55 | /* SmartMedia */ | ||
56 | #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ | ||
57 | |||
58 | /* Compact Flash */ | ||
59 | #define AT91_CF_BASE 0x50000000 /* NCS4-NCS6: Compact Flash physical base address */ | ||
60 | 66 | ||
61 | /* Clocks */ | 67 | /* Clocks */ |
62 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | 68 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ |
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h index 763cb96c418b..c0679eaefaf2 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91rm9200/irqs.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef __ASM_ARCH_IRQS_H | 21 | #ifndef __ASM_ARCH_IRQS_H |
22 | #define __ASM_ARCH_IRQS_H | 22 | #define __ASM_ARCH_IRQS_H |
23 | 23 | ||
24 | #include <asm/arch/at91_aic.h> | ||
25 | |||
24 | #define NR_AIC_IRQS 32 | 26 | #define NR_AIC_IRQS 32 |
25 | 27 | ||
26 | 28 | ||
diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91rm9200/system.h index 8a2ff472e4cf..9c67130603b2 100644 --- a/include/asm-arm/arch-at91rm9200/system.h +++ b/include/asm-arm/arch-at91rm9200/system.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #define __ASM_ARCH_SYSTEM_H | 22 | #define __ASM_ARCH_SYSTEM_H |
23 | 23 | ||
24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
25 | #include <asm/arch/at91_st.h> | ||
26 | #include <asm/arch/at91_dbgu.h> | ||
25 | 27 | ||
26 | static inline void arch_idle(void) | 28 | static inline void arch_idle(void) |
27 | { | 29 | { |
@@ -39,21 +41,13 @@ static inline void arch_idle(void) | |||
39 | cpu_do_idle(); | 41 | cpu_do_idle(); |
40 | } | 42 | } |
41 | 43 | ||
42 | static inline void arch_reset(char mode) | 44 | void (*at91_arch_reset)(void); |
43 | { | ||
44 | /* | ||
45 | * Perform a hardware reset with the use of the Watchdog timer. | ||
46 | */ | ||
47 | at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); | ||
48 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | ||
49 | } | ||
50 | |||
51 | #define ARCH_ID_AT91RM9200 0x09200080 | ||
52 | #define ARCH_ID_AT91SAM9261 0x019000a0 | ||
53 | 45 | ||
54 | static inline unsigned long arch_identify(void) | 46 | static inline void arch_reset(char mode) |
55 | { | 47 | { |
56 | return at91_sys_read(AT91_DBGU_CIDR) & (AT91_CIDR_EPROC | AT91_CIDR_ARCH); | 48 | /* call the CPU-specific reset function */ |
49 | if (at91_arch_reset) | ||
50 | (at91_arch_reset)(); | ||
57 | } | 51 | } |
58 | 52 | ||
59 | #endif | 53 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/timex.h b/include/asm-arm/arch-at91rm9200/timex.h index 88687cefe6eb..faeca45a8d44 100644 --- a/include/asm-arm/arch-at91rm9200/timex.h +++ b/include/asm-arm/arch-at91rm9200/timex.h | |||
@@ -23,6 +23,15 @@ | |||
23 | 23 | ||
24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
25 | 25 | ||
26 | #if defined(CONFIG_ARCH_AT91RM9200) | ||
27 | |||
26 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) | 28 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) |
27 | 29 | ||
30 | #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) | ||
31 | |||
32 | #define AT91SAM9_MASTER_CLOCK 99300000 | ||
33 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | ||
34 | |||
35 | #endif | ||
36 | |||
28 | #endif | 37 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h index ec7811ab0a52..34b4b93fa015 100644 --- a/include/asm-arm/arch-at91rm9200/uncompress.h +++ b/include/asm-arm/arch-at91rm9200/uncompress.h | |||
@@ -22,11 +22,11 @@ | |||
22 | #define __ASM_ARCH_UNCOMPRESS_H | 22 | #define __ASM_ARCH_UNCOMPRESS_H |
23 | 23 | ||
24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
25 | #include <asm/arch/at91_dbgu.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * The following code assumes the serial port has already been | 28 | * The following code assumes the serial port has already been |
28 | * initialized by the bootloader. We search for the first enabled | 29 | * initialized by the bootloader. If you didn't setup a port in |
29 | * port in the most probable order. If you didn't setup a port in | ||
30 | * your bootloader then nothing will appear (which might be desired). | 30 | * your bootloader then nothing will appear (which might be desired). |
31 | * | 31 | * |
32 | * This does not append a newline | 32 | * This does not append a newline |
diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91rm9200/vmalloc.h index 4c367eb57f47..0a23b8c562b9 100644 --- a/include/asm-arm/arch-at91rm9200/vmalloc.h +++ b/include/asm-arm/arch-at91rm9200/vmalloc.h | |||
@@ -21,6 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_VMALLOC_H | 21 | #ifndef __ASM_ARCH_VMALLOC_H |
22 | #define __ASM_ARCH_VMALLOC_H | 22 | #define __ASM_ARCH_VMALLOC_H |
23 | 23 | ||
24 | #define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK) | 24 | #define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK) |
25 | 25 | ||
26 | #endif | 26 | #endif |
diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h index c6e8dcf674de..42768cc8bfb4 100644 --- a/include/asm-arm/arch-clps711x/memory.h +++ b/include/asm-arm/arch-clps711x/memory.h | |||
@@ -62,7 +62,15 @@ | |||
62 | * memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM. | 62 | * memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM. |
63 | */ | 63 | */ |
64 | 64 | ||
65 | #ifdef CONFIG_DISCONTIGMEM | 65 | /* |
66 | * The PS7211 allows up to 256MB max per DRAM bank, but the EDB7211 | ||
67 | * uses only one of the two banks (bank #1). However, even within | ||
68 | * bank #1, memory is discontiguous. | ||
69 | * | ||
70 | * The EDB7211 has two 8MB DRAM areas with 8MB of empty space between | ||
71 | * them, so we use 24 for the node max shift to get 16MB node sizes. | ||
72 | */ | ||
73 | |||
66 | /* | 74 | /* |
67 | * Because of the wide memory address space between physical RAM banks on the | 75 | * Because of the wide memory address space between physical RAM banks on the |
68 | * SA1100, it's much more convenient to use Linux's NUMA support to implement | 76 | * SA1100, it's much more convenient to use Linux's NUMA support to implement |
@@ -80,48 +88,7 @@ | |||
80 | * node 2: 0xd0000000 - 0xd7ffffff | 88 | * node 2: 0xd0000000 - 0xd7ffffff |
81 | * node 3: 0xd8000000 - 0xdfffffff | 89 | * node 3: 0xd8000000 - 0xdfffffff |
82 | */ | 90 | */ |
83 | 91 | #define NODE_MEM_SIZE_BITS 24 | |
84 | /* | ||
85 | * Given a kernel address, find the home node of the underlying memory. | ||
86 | */ | ||
87 | #define KVADDR_TO_NID(addr) \ | ||
88 | (((unsigned long)(addr) - PAGE_OFFSET) >> NODE_MAX_MEM_SHIFT) | ||
89 | |||
90 | /* | ||
91 | * Given a page frame number, convert it to a node id. | ||
92 | */ | ||
93 | #define PFN_TO_NID(pfn) \ | ||
94 | (((pfn) - PHYS_PFN_OFFSET) >> (NODE_MAX_MEM_SHIFT - PAGE_SHIFT)) | ||
95 | |||
96 | /* | ||
97 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
98 | * and returns the mem_map of that node. | ||
99 | */ | ||
100 | #define ADDR_TO_MAPBASE(kaddr) \ | ||
101 | NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(kaddr))) | ||
102 | |||
103 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
104 | |||
105 | /* | ||
106 | * Given a kaddr, LOCAL_MAR_NR finds the owning node of the memory | ||
107 | * and returns the index corresponding to the appropriate page in the | ||
108 | * node's mem_map. | ||
109 | */ | ||
110 | #define LOCAL_MAP_NR(addr) \ | ||
111 | (((unsigned long)(addr) & (NODE_MAX_MEM_SIZE - 1)) >> PAGE_SHIFT) | ||
112 | |||
113 | /* | ||
114 | * The PS7211 allows up to 256MB max per DRAM bank, but the EDB7211 | ||
115 | * uses only one of the two banks (bank #1). However, even within | ||
116 | * bank #1, memory is discontiguous. | ||
117 | * | ||
118 | * The EDB7211 has two 8MB DRAM areas with 8MB of empty space between | ||
119 | * them, so we use 24 for the node max shift to get 16MB node sizes. | ||
120 | */ | ||
121 | #define NODE_MAX_MEM_SHIFT 24 | ||
122 | #define NODE_MAX_MEM_SIZE (1<<NODE_MAX_MEM_SHIFT) | ||
123 | |||
124 | #endif /* CONFIG_DISCONTIGMEM */ | ||
125 | 92 | ||
126 | #endif | 93 | #endif |
127 | 94 | ||
diff --git a/include/asm-arm/arch-iop13xx/debug-macro.S b/include/asm-arm/arch-iop13xx/debug-macro.S new file mode 100644 index 000000000000..788b4e386c16 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/debug-macro.S | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-iop13xx/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 | |||
14 | .macro addruart, rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ mmu enabled? | ||
17 | moveq \rx, #0xff000000 @ physical | ||
18 | orreq \rx, \rx, #0x00d80000 | ||
19 | movne \rx, #0xfe000000 @ virtual | ||
20 | orrne \rx, \rx, #0x00e80000 | ||
21 | orr \rx, \rx, #0x00002300 | ||
22 | orr \rx, \rx, #0x00000040 | ||
23 | .endm | ||
24 | |||
25 | #define UART_SHIFT 2 | ||
26 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-iop13xx/dma.h b/include/asm-arm/arch-iop13xx/dma.h new file mode 100644 index 000000000000..2e15da53ff79 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/dma.h | |||
@@ -0,0 +1,3 @@ | |||
1 | #ifndef _IOP13XX_DMA_H | ||
2 | #define _IOP13XX_DMA_H_ | ||
3 | #endif | ||
diff --git a/include/asm-arm/arch-iop13xx/entry-macro.S b/include/asm-arm/arch-iop13xx/entry-macro.S new file mode 100644 index 000000000000..94c50283dc56 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/entry-macro.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * iop13xx low level irq macros | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | /* | ||
23 | * Note: a 1-cycle window exists where iintvec will return the value | ||
24 | * of iintbase, so we explicitly check for "bad zeros" | ||
25 | */ | ||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | mrc p15, 0, \tmp, c15, c1, 0 | ||
28 | orr \tmp, \tmp, #(1 << 6) | ||
29 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access | ||
30 | |||
31 | mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC | ||
32 | cmp \irqnr, #0 | ||
33 | mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero | ||
34 | adds \irqstat, \irqnr, #1 @ Check for 0xffffffff | ||
35 | movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr | ||
36 | |||
37 | biceq \tmp, \tmp, #(1 << 6) | ||
38 | mcreq p15, 0, \tmp, c15, c1, 0 @ Disable cp6 access if no more interrupts | ||
39 | .endm | ||
diff --git a/include/asm-arm/arch-iop13xx/hardware.h b/include/asm-arm/arch-iop13xx/hardware.h new file mode 100644 index 000000000000..8e1d56289846 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/hardware.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __ASM_ARCH_HARDWARE_H | ||
2 | #define __ASM_ARCH_HARDWARE_H | ||
3 | #include <asm/types.h> | ||
4 | |||
5 | #define pcibios_assign_all_busses() 1 | ||
6 | |||
7 | #ifndef __ASSEMBLY__ | ||
8 | extern unsigned long iop13xx_pcibios_min_io; | ||
9 | extern unsigned long iop13xx_pcibios_min_mem; | ||
10 | extern u16 iop13xx_dev_id(void); | ||
11 | extern void iop13xx_set_atu_mmr_bases(void); | ||
12 | #endif | ||
13 | |||
14 | #define PCIBIOS_MIN_IO (iop13xx_pcibios_min_io) | ||
15 | #define PCIBIOS_MIN_MEM (iop13xx_pcibios_min_mem) | ||
16 | |||
17 | /* | ||
18 | * Generic chipset bits | ||
19 | * | ||
20 | */ | ||
21 | #include "iop13xx.h" | ||
22 | |||
23 | /* | ||
24 | * Board specific bits | ||
25 | */ | ||
26 | #include "iq81340.h" | ||
27 | |||
28 | #endif /* _ASM_ARCH_HARDWARE_H */ | ||
diff --git a/include/asm-arm/arch-iop13xx/io.h b/include/asm-arm/arch-iop13xx/io.h new file mode 100644 index 000000000000..db6de2480a24 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/io.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * iop13xx custom ioremap implementation | ||
3 | * Copyright (c) 2005-2006, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
17 | * | ||
18 | */ | ||
19 | #ifndef __ASM_ARM_ARCH_IO_H | ||
20 | #define __ASM_ARM_ARCH_IO_H | ||
21 | |||
22 | #define IO_SPACE_LIMIT 0xffffffff | ||
23 | |||
24 | #define __io(a) (a) | ||
25 | #define __mem_pci(a) (a) | ||
26 | #define __mem_isa(a) (a) | ||
27 | |||
28 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); | ||
29 | extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size, | ||
30 | unsigned long flags); | ||
31 | extern void __iop13xx_iounmap(void __iomem *addr); | ||
32 | |||
33 | extern u32 iop13xx_atue_mem_base; | ||
34 | extern u32 iop13xx_atux_mem_base; | ||
35 | extern size_t iop13xx_atue_mem_size; | ||
36 | extern size_t iop13xx_atux_mem_size; | ||
37 | |||
38 | #define __arch_ioremap(a, s, f) __iop13xx_ioremap(a, s, f) | ||
39 | #define __arch_iounmap(a) __iop13xx_iounmap(a) | ||
40 | |||
41 | #endif | ||
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h new file mode 100644 index 000000000000..a88522a0ff8e --- /dev/null +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -0,0 +1,492 @@ | |||
1 | #ifndef _IOP13XX_HW_H_ | ||
2 | #define _IOP13XX_HW_H_ | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | /* The ATU offsets can change based on the strapping */ | ||
6 | extern u32 iop13xx_atux_pmmr_offset; | ||
7 | extern u32 iop13xx_atue_pmmr_offset; | ||
8 | void iop13xx_init_irq(void); | ||
9 | void iop13xx_map_io(void); | ||
10 | void iop13xx_platform_init(void); | ||
11 | void iop13xx_init_irq(void); | ||
12 | void iop13xx_init_time(unsigned long tickrate); | ||
13 | unsigned long iop13xx_gettimeoffset(void); | ||
14 | |||
15 | /* handle cp6 access | ||
16 | * to do: handle access in entry-armv5.S and unify with | ||
17 | * the iop3xx implementation | ||
18 | * note: use iop13xx_cp6_enable_irq_save and iop13xx_cp6_irq_restore (irq.h) | ||
19 | * when interrupts are enabled | ||
20 | */ | ||
21 | static inline unsigned long iop13xx_cp6_save(void) | ||
22 | { | ||
23 | u32 temp, cp_flags; | ||
24 | |||
25 | asm volatile ( | ||
26 | "mrc p15, 0, %1, c15, c1, 0\n\t" | ||
27 | "orr %0, %1, #(1 << 6)\n\t" | ||
28 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
29 | : "=r" (temp), "=r"(cp_flags)); | ||
30 | |||
31 | return cp_flags; | ||
32 | } | ||
33 | |||
34 | static inline void iop13xx_cp6_restore(unsigned long cp_flags) | ||
35 | { | ||
36 | asm volatile ( | ||
37 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
38 | : : "r" (cp_flags) ); | ||
39 | } | ||
40 | |||
41 | /* CPUID CP6 R0 Page 0 */ | ||
42 | static inline int iop13xx_cpu_id(void) | ||
43 | { | ||
44 | int id; | ||
45 | asm volatile("mrc p6, 0, %0, c0, c0, 0":"=r" (id)); | ||
46 | return id; | ||
47 | } | ||
48 | |||
49 | #endif | ||
50 | |||
51 | /* | ||
52 | * IOP13XX I/O and Mem space regions for PCI autoconfiguration | ||
53 | */ | ||
54 | #define IOP13XX_MAX_RAM_SIZE 0x80000000UL /* 2GB */ | ||
55 | #define IOP13XX_PCI_OFFSET IOP13XX_MAX_RAM_SIZE | ||
56 | |||
57 | /* PCI MAP | ||
58 | * 0x0000.0000 - 0x8000.0000 1:1 mapping with Physical RAM | ||
59 | * 0x8000.0000 - 0x8800.0000 PCIX/PCIE memory window (128MB) | ||
60 | */ | ||
61 | #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL | ||
62 | #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL | ||
63 | #define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL | ||
64 | #define IOP13XX_PCIX_LOWER_IO_BA 0x0fff0000UL | ||
65 | #define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\ | ||
66 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | ||
67 | #define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\ | ||
68 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | ||
69 | #define IOP13XX_PCIX_IO_OFFSET (IOP13XX_PCIX_LOWER_IO_VA -\ | ||
70 | IOP13XX_PCIX_LOWER_IO_BA) | ||
71 | #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | ||
72 | (IOP13XX_PCIX_LOWER_IO_PA\ | ||
73 | - IOP13XX_PCIX_LOWER_IO_VA)) | ||
74 | |||
75 | #define IOP13XX_PCIX_MEM_PHYS_OFFSET 0x100000000ULL | ||
76 | #define IOP13XX_PCIX_MEM_WINDOW_SIZE 0x3a000000UL | ||
77 | #define IOP13XX_PCIX_LOWER_MEM_BA (PHYS_OFFSET + IOP13XX_PCI_OFFSET) | ||
78 | #define IOP13XX_PCIX_LOWER_MEM_PA (IOP13XX_PCIX_MEM_PHYS_OFFSET +\ | ||
79 | IOP13XX_PCIX_LOWER_MEM_BA) | ||
80 | #define IOP13XX_PCIX_UPPER_MEM_PA (IOP13XX_PCIX_LOWER_MEM_PA +\ | ||
81 | IOP13XX_PCIX_MEM_WINDOW_SIZE - 1) | ||
82 | #define IOP13XX_PCIX_UPPER_MEM_BA (IOP13XX_PCIX_LOWER_MEM_BA +\ | ||
83 | IOP13XX_PCIX_MEM_WINDOW_SIZE - 1) | ||
84 | |||
85 | #define IOP13XX_PCIX_MEM_COOKIE 0x80000000UL | ||
86 | #define IOP13XX_PCIX_LOWER_MEM_RA IOP13XX_PCIX_MEM_COOKIE | ||
87 | #define IOP13XX_PCIX_UPPER_MEM_RA (IOP13XX_PCIX_LOWER_MEM_RA +\ | ||
88 | IOP13XX_PCIX_MEM_WINDOW_SIZE - 1) | ||
89 | #define IOP13XX_PCIX_MEM_OFFSET (IOP13XX_PCIX_MEM_COOKIE -\ | ||
90 | IOP13XX_PCIX_LOWER_MEM_BA) | ||
91 | |||
92 | /* PCI-E ranges */ | ||
93 | #define IOP13XX_PCIE_IO_WINDOW_SIZE 0x10000UL | ||
94 | #define IOP13XX_PCIE_LOWER_IO_PA 0xfffd0000UL | ||
95 | #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL | ||
96 | #define IOP13XX_PCIE_LOWER_IO_BA 0x0fff0000UL | ||
97 | #define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\ | ||
98 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | ||
99 | #define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\ | ||
100 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | ||
101 | #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ | ||
102 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | ||
103 | #define IOP13XX_PCIE_IO_OFFSET (IOP13XX_PCIE_LOWER_IO_VA -\ | ||
104 | IOP13XX_PCIE_LOWER_IO_BA) | ||
105 | #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | ||
106 | (IOP13XX_PCIE_LOWER_IO_PA\ | ||
107 | - IOP13XX_PCIE_LOWER_IO_VA)) | ||
108 | |||
109 | #define IOP13XX_PCIE_MEM_PHYS_OFFSET 0x200000000ULL | ||
110 | #define IOP13XX_PCIE_MEM_WINDOW_SIZE 0x3a000000UL | ||
111 | #define IOP13XX_PCIE_LOWER_MEM_BA (PHYS_OFFSET + IOP13XX_PCI_OFFSET) | ||
112 | #define IOP13XX_PCIE_LOWER_MEM_PA (IOP13XX_PCIE_MEM_PHYS_OFFSET +\ | ||
113 | IOP13XX_PCIE_LOWER_MEM_BA) | ||
114 | #define IOP13XX_PCIE_UPPER_MEM_PA (IOP13XX_PCIE_LOWER_MEM_PA +\ | ||
115 | IOP13XX_PCIE_MEM_WINDOW_SIZE - 1) | ||
116 | #define IOP13XX_PCIE_UPPER_MEM_BA (IOP13XX_PCIE_LOWER_MEM_BA +\ | ||
117 | IOP13XX_PCIE_MEM_WINDOW_SIZE - 1) | ||
118 | |||
119 | /* All 0xc000.0000 - 0xfdff.ffff addresses belong to PCIe */ | ||
120 | #define IOP13XX_PCIE_MEM_COOKIE 0xc0000000UL | ||
121 | #define IOP13XX_PCIE_LOWER_MEM_RA IOP13XX_PCIE_MEM_COOKIE | ||
122 | #define IOP13XX_PCIE_UPPER_MEM_RA (IOP13XX_PCIE_LOWER_MEM_RA +\ | ||
123 | IOP13XX_PCIE_MEM_WINDOW_SIZE - 1) | ||
124 | #define IOP13XX_PCIE_MEM_OFFSET (IOP13XX_PCIE_MEM_COOKIE -\ | ||
125 | IOP13XX_PCIE_LOWER_MEM_BA) | ||
126 | |||
127 | /* PBI Ranges */ | ||
128 | #define IOP13XX_PBI_LOWER_MEM_PA 0xf0000000UL | ||
129 | #define IOP13XX_PBI_MEM_WINDOW_SIZE 0x04000000UL | ||
130 | #define IOP13XX_PBI_MEM_COOKIE 0xfa000000UL | ||
131 | #define IOP13XX_PBI_LOWER_MEM_RA IOP13XX_PBI_MEM_COOKIE | ||
132 | #define IOP13XX_PBI_UPPER_MEM_RA (IOP13XX_PBI_LOWER_MEM_RA +\ | ||
133 | IOP13XX_PBI_MEM_WINDOW_SIZE - 1) | ||
134 | |||
135 | /* | ||
136 | * IOP13XX chipset registers | ||
137 | */ | ||
138 | #define IOP13XX_PMMR_PHYS_MEM_BASE 0xffd80000UL /* PMMR phys. address */ | ||
139 | #define IOP13XX_PMMR_VIRT_MEM_BASE 0xfee80000UL /* PMMR phys. address */ | ||
140 | #define IOP13XX_PMMR_MEM_WINDOW_SIZE 0x80000 | ||
141 | #define IOP13XX_PMMR_UPPER_MEM_VA (IOP13XX_PMMR_VIRT_MEM_BASE +\ | ||
142 | IOP13XX_PMMR_MEM_WINDOW_SIZE - 1) | ||
143 | #define IOP13XX_PMMR_UPPER_MEM_PA (IOP13XX_PMMR_PHYS_MEM_BASE +\ | ||
144 | IOP13XX_PMMR_MEM_WINDOW_SIZE - 1) | ||
145 | #define IOP13XX_PMMR_VIRT_TO_PHYS(addr) (u32) ((u32) addr +\ | ||
146 | (IOP13XX_PMMR_PHYS_MEM_BASE\ | ||
147 | - IOP13XX_PMMR_VIRT_MEM_BASE)) | ||
148 | #define IOP13XX_PMMR_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | ||
149 | (IOP13XX_PMMR_PHYS_MEM_BASE\ | ||
150 | - IOP13XX_PMMR_VIRT_MEM_BASE)) | ||
151 | #define IOP13XX_REG_ADDR32(reg) (IOP13XX_PMMR_VIRT_MEM_BASE + (reg)) | ||
152 | #define IOP13XX_REG_ADDR16(reg) (IOP13XX_PMMR_VIRT_MEM_BASE + (reg)) | ||
153 | #define IOP13XX_REG_ADDR8(reg) (IOP13XX_PMMR_VIRT_MEM_BASE + (reg)) | ||
154 | #define IOP13XX_REG_ADDR32_PHYS(reg) (IOP13XX_PMMR_PHYS_MEM_BASE + (reg)) | ||
155 | #define IOP13XX_REG_ADDR16_PHYS(reg) (IOP13XX_PMMR_PHYS_MEM_BASE + (reg)) | ||
156 | #define IOP13XX_REG_ADDR8_PHYS(reg) (IOP13XX_PMMR_PHYS_MEM_BASE + (reg)) | ||
157 | #define IOP13XX_PMMR_SIZE 0x00080000 | ||
158 | |||
159 | /*=================== Defines for Platform Devices =====================*/ | ||
160 | #define IOP13XX_UART0_PHYS (IOP13XX_PMMR_PHYS_MEM_BASE | 0x00002300) | ||
161 | #define IOP13XX_UART1_PHYS (IOP13XX_PMMR_PHYS_MEM_BASE | 0x00002340) | ||
162 | #define IOP13XX_UART0_VIRT (IOP13XX_PMMR_VIRT_MEM_BASE | 0x00002300) | ||
163 | #define IOP13XX_UART1_VIRT (IOP13XX_PMMR_VIRT_MEM_BASE | 0x00002340) | ||
164 | |||
165 | #define IOP13XX_I2C0_PHYS (IOP13XX_PMMR_PHYS_MEM_BASE | 0x00002500) | ||
166 | #define IOP13XX_I2C1_PHYS (IOP13XX_PMMR_PHYS_MEM_BASE | 0x00002520) | ||
167 | #define IOP13XX_I2C2_PHYS (IOP13XX_PMMR_PHYS_MEM_BASE | 0x00002540) | ||
168 | #define IOP13XX_I2C0_VIRT (IOP13XX_PMMR_VIRT_MEM_BASE | 0x00002500) | ||
169 | #define IOP13XX_I2C1_VIRT (IOP13XX_PMMR_VIRT_MEM_BASE | 0x00002520) | ||
170 | #define IOP13XX_I2C2_VIRT (IOP13XX_PMMR_VIRT_MEM_BASE | 0x00002540) | ||
171 | |||
172 | /* ATU selection flags */ | ||
173 | /* IOP13XX_INIT_ATU_DEFAULT = Rely on CONFIG_IOP13XX_ATU* */ | ||
174 | #define IOP13XX_INIT_ATU_DEFAULT (0) | ||
175 | #define IOP13XX_INIT_ATU_ATUX (1 << 0) | ||
176 | #define IOP13XX_INIT_ATU_ATUE (1 << 1) | ||
177 | #define IOP13XX_INIT_ATU_NONE (1 << 2) | ||
178 | |||
179 | /* UART selection flags */ | ||
180 | /* IOP13XX_INIT_UART_DEFAULT = Rely on CONFIG_IOP13XX_UART* */ | ||
181 | #define IOP13XX_INIT_UART_DEFAULT (0) | ||
182 | #define IOP13XX_INIT_UART_0 (1 << 0) | ||
183 | #define IOP13XX_INIT_UART_1 (1 << 1) | ||
184 | |||
185 | /* I2C selection flags */ | ||
186 | /* IOP13XX_INIT_I2C_DEFAULT = Rely on CONFIG_IOP13XX_I2C* */ | ||
187 | #define IOP13XX_INIT_I2C_DEFAULT (0) | ||
188 | #define IOP13XX_INIT_I2C_0 (1 << 0) | ||
189 | #define IOP13XX_INIT_I2C_1 (1 << 1) | ||
190 | #define IOP13XX_INIT_I2C_2 (1 << 2) | ||
191 | |||
192 | #define IQ81340_NUM_UART 2 | ||
193 | #define IQ81340_NUM_I2C 3 | ||
194 | #define IQ81340_NUM_PHYS_MAP_FLASH 1 | ||
195 | #define IQ81340_MAX_PLAT_DEVICES (IQ81340_NUM_UART +\ | ||
196 | IQ81340_NUM_I2C +\ | ||
197 | IQ81340_NUM_PHYS_MAP_FLASH) | ||
198 | |||
199 | /*========================== PMMR offsets for key registers ============*/ | ||
200 | #define IOP13XX_ATU0_PMMR_OFFSET 0x00048000 | ||
201 | #define IOP13XX_ATU1_PMMR_OFFSET 0x0004c000 | ||
202 | #define IOP13XX_ATU2_PMMR_OFFSET 0x0004d000 | ||
203 | #define IOP13XX_ADMA0_PMMR_OFFSET 0x00000000 | ||
204 | #define IOP13XX_ADMA1_PMMR_OFFSET 0x00000200 | ||
205 | #define IOP13XX_ADMA2_PMMR_OFFSET 0x00000400 | ||
206 | #define IOP13XX_PBI_PMMR_OFFSET 0x00001580 | ||
207 | #define IOP13XX_ESSR0_PMMR_OFFSET 0x00002188 | ||
208 | #define IOP13XX_ESSR0 IOP13XX_REG_ADDR32(0x00002188) | ||
209 | |||
210 | #define IOP13XX_ESSR0_IFACE_MASK 0x00004000 /* Interface PCI-X / PCI-E */ | ||
211 | #define IOP13XX_CONTROLLER_ONLY (1 << 14) | ||
212 | #define IOP13XX_INTERFACE_SEL_PCIX (1 << 15) | ||
213 | |||
214 | #define IOP13XX_PMON_PMMR_OFFSET 0x0001A000 | ||
215 | #define IOP13XX_PMON_BASE (IOP13XX_PMMR_VIRT_MEM_BASE +\ | ||
216 | IOP13XX_PMON_PMMR_OFFSET) | ||
217 | #define IOP13XX_PMON_PHYSBASE (IOP13XX_PMMR_PHYS_MEM_BASE +\ | ||
218 | IOP13XX_PMON_PMMR_OFFSET) | ||
219 | |||
220 | #define IOP13XX_PMON_CMD0 (IOP13XX_PMON_BASE + 0x0) | ||
221 | #define IOP13XX_PMON_EVR0 (IOP13XX_PMON_BASE + 0x4) | ||
222 | #define IOP13XX_PMON_STS0 (IOP13XX_PMON_BASE + 0x8) | ||
223 | #define IOP13XX_PMON_DATA0 (IOP13XX_PMON_BASE + 0xC) | ||
224 | |||
225 | #define IOP13XX_PMON_CMD3 (IOP13XX_PMON_BASE + 0x30) | ||
226 | #define IOP13XX_PMON_EVR3 (IOP13XX_PMON_BASE + 0x34) | ||
227 | #define IOP13XX_PMON_STS3 (IOP13XX_PMON_BASE + 0x38) | ||
228 | #define IOP13XX_PMON_DATA3 (IOP13XX_PMON_BASE + 0x3C) | ||
229 | |||
230 | #define IOP13XX_PMON_CMD7 (IOP13XX_PMON_BASE + 0x70) | ||
231 | #define IOP13XX_PMON_EVR7 (IOP13XX_PMON_BASE + 0x74) | ||
232 | #define IOP13XX_PMON_STS7 (IOP13XX_PMON_BASE + 0x78) | ||
233 | #define IOP13XX_PMON_DATA7 (IOP13XX_PMON_BASE + 0x7C) | ||
234 | |||
235 | #define IOP13XX_PMONEN (IOP13XX_PMMR_VIRT_MEM_BASE + 0x4E040) | ||
236 | #define IOP13XX_PMONSTAT (IOP13XX_PMMR_VIRT_MEM_BASE + 0x4E044) | ||
237 | |||
238 | /*================================ATU===================================*/ | ||
239 | #define IOP13XX_ATUX_OFFSET(ofs) IOP13XX_REG_ADDR32(\ | ||
240 | iop13xx_atux_pmmr_offset + (ofs)) | ||
241 | |||
242 | #define IOP13XX_ATUX_DID IOP13XX_REG_ADDR16(\ | ||
243 | iop13xx_atux_pmmr_offset + 0x2) | ||
244 | |||
245 | #define IOP13XX_ATUX_ATUCMD IOP13XX_REG_ADDR16(\ | ||
246 | iop13xx_atux_pmmr_offset + 0x4) | ||
247 | #define IOP13XX_ATUX_ATUSR IOP13XX_REG_ADDR16(\ | ||
248 | iop13xx_atux_pmmr_offset + 0x6) | ||
249 | |||
250 | #define IOP13XX_ATUX_IABAR0 IOP13XX_ATUX_OFFSET(0x10) | ||
251 | #define IOP13XX_ATUX_IAUBAR0 IOP13XX_ATUX_OFFSET(0x14) | ||
252 | #define IOP13XX_ATUX_IABAR1 IOP13XX_ATUX_OFFSET(0x18) | ||
253 | #define IOP13XX_ATUX_IAUBAR1 IOP13XX_ATUX_OFFSET(0x1c) | ||
254 | #define IOP13XX_ATUX_IABAR2 IOP13XX_ATUX_OFFSET(0x20) | ||
255 | #define IOP13XX_ATUX_IAUBAR2 IOP13XX_ATUX_OFFSET(0x24) | ||
256 | #define IOP13XX_ATUX_IALR0 IOP13XX_ATUX_OFFSET(0x40) | ||
257 | #define IOP13XX_ATUX_IATVR0 IOP13XX_ATUX_OFFSET(0x44) | ||
258 | #define IOP13XX_ATUX_IAUTVR0 IOP13XX_ATUX_OFFSET(0x48) | ||
259 | #define IOP13XX_ATUX_IALR1 IOP13XX_ATUX_OFFSET(0x4c) | ||
260 | #define IOP13XX_ATUX_IATVR1 IOP13XX_ATUX_OFFSET(0x50) | ||
261 | #define IOP13XX_ATUX_IAUTVR1 IOP13XX_ATUX_OFFSET(0x54) | ||
262 | #define IOP13XX_ATUX_IALR2 IOP13XX_ATUX_OFFSET(0x58) | ||
263 | #define IOP13XX_ATUX_IATVR2 IOP13XX_ATUX_OFFSET(0x5c) | ||
264 | #define IOP13XX_ATUX_IAUTVR2 IOP13XX_ATUX_OFFSET(0x60) | ||
265 | #define IOP13XX_ATUX_ATUCR IOP13XX_ATUX_OFFSET(0x70) | ||
266 | #define IOP13XX_ATUX_PCSR IOP13XX_ATUX_OFFSET(0x74) | ||
267 | #define IOP13XX_ATUX_ATUISR IOP13XX_ATUX_OFFSET(0x78) | ||
268 | #define IOP13XX_ATUX_PCIXSR IOP13XX_ATUX_OFFSET(0xD4) | ||
269 | #define IOP13XX_ATUX_IABAR3 IOP13XX_ATUX_OFFSET(0x200) | ||
270 | #define IOP13XX_ATUX_IAUBAR3 IOP13XX_ATUX_OFFSET(0x204) | ||
271 | #define IOP13XX_ATUX_IALR3 IOP13XX_ATUX_OFFSET(0x208) | ||
272 | #define IOP13XX_ATUX_IATVR3 IOP13XX_ATUX_OFFSET(0x20c) | ||
273 | #define IOP13XX_ATUX_IAUTVR3 IOP13XX_ATUX_OFFSET(0x210) | ||
274 | |||
275 | #define IOP13XX_ATUX_OIOBAR IOP13XX_ATUX_OFFSET(0x300) | ||
276 | #define IOP13XX_ATUX_OIOWTVR IOP13XX_ATUX_OFFSET(0x304) | ||
277 | #define IOP13XX_ATUX_OUMBAR0 IOP13XX_ATUX_OFFSET(0x308) | ||
278 | #define IOP13XX_ATUX_OUMWTVR0 IOP13XX_ATUX_OFFSET(0x30c) | ||
279 | #define IOP13XX_ATUX_OUMBAR1 IOP13XX_ATUX_OFFSET(0x310) | ||
280 | #define IOP13XX_ATUX_OUMWTVR1 IOP13XX_ATUX_OFFSET(0x314) | ||
281 | #define IOP13XX_ATUX_OUMBAR2 IOP13XX_ATUX_OFFSET(0x318) | ||
282 | #define IOP13XX_ATUX_OUMWTVR2 IOP13XX_ATUX_OFFSET(0x31c) | ||
283 | #define IOP13XX_ATUX_OUMBAR3 IOP13XX_ATUX_OFFSET(0x320) | ||
284 | #define IOP13XX_ATUX_OUMWTVR3 IOP13XX_ATUX_OFFSET(0x324) | ||
285 | #define IOP13XX_ATUX_OUDMABAR IOP13XX_ATUX_OFFSET(0x328) | ||
286 | #define IOP13XX_ATUX_OUMSIBAR IOP13XX_ATUX_OFFSET(0x32c) | ||
287 | #define IOP13XX_ATUX_OCCAR IOP13XX_ATUX_OFFSET(0x330) | ||
288 | #define IOP13XX_ATUX_OCCDR IOP13XX_ATUX_OFFSET(0x334) | ||
289 | |||
290 | #define IOP13XX_ATUX_ATUCR_OUT_EN (1 << 1) | ||
291 | #define IOP13XX_ATUX_PCSR_CENTRAL_RES (1 << 25) | ||
292 | #define IOP13XX_ATUX_PCSR_P_RSTOUT (1 << 21) | ||
293 | #define IOP13XX_ATUX_PCSR_OUT_Q_BUSY (1 << 15) | ||
294 | #define IOP13XX_ATUX_PCSR_IN_Q_BUSY (1 << 14) | ||
295 | #define IOP13XX_ATUX_PCSR_FREQ_OFFSET (16) | ||
296 | |||
297 | #define IOP13XX_ATUX_STAT_PCI_IFACE_ERR (1 << 18) | ||
298 | #define IOP13XX_ATUX_STAT_VPD_ADDR (1 << 17) | ||
299 | #define IOP13XX_ATUX_STAT_INT_PAR_ERR (1 << 16) | ||
300 | #define IOP13XX_ATUX_STAT_CFG_WRITE (1 << 15) | ||
301 | #define IOP13XX_ATUX_STAT_ERR_COR (1 << 14) | ||
302 | #define IOP13XX_ATUX_STAT_TX_SCEM (1 << 13) | ||
303 | #define IOP13XX_ATUX_STAT_REC_SCEM (1 << 12) | ||
304 | #define IOP13XX_ATUX_STAT_POWER_TRAN (1 << 11) | ||
305 | #define IOP13XX_ATUX_STAT_TX_SERR (1 << 10) | ||
306 | #define IOP13XX_ATUX_STAT_DET_PAR_ERR (1 << 9 ) | ||
307 | #define IOP13XX_ATUX_STAT_BIST (1 << 8 ) | ||
308 | #define IOP13XX_ATUX_STAT_INT_REC_MABORT (1 << 7 ) | ||
309 | #define IOP13XX_ATUX_STAT_REC_SERR (1 << 4 ) | ||
310 | #define IOP13XX_ATUX_STAT_EXT_REC_MABORT (1 << 3 ) | ||
311 | #define IOP13XX_ATUX_STAT_EXT_REC_TABORT (1 << 2 ) | ||
312 | #define IOP13XX_ATUX_STAT_EXT_SIG_TABORT (1 << 1 ) | ||
313 | #define IOP13XX_ATUX_STAT_MASTER_DATA_PAR (1 << 0 ) | ||
314 | |||
315 | #define IOP13XX_ATUX_PCIXSR_BUS_NUM (8) | ||
316 | #define IOP13XX_ATUX_PCIXSR_DEV_NUM (3) | ||
317 | #define IOP13XX_ATUX_PCIXSR_FUNC_NUM (0) | ||
318 | |||
319 | #define IOP13XX_ATUX_IALR_DISABLE 0x00000001 | ||
320 | #define IOP13XX_ATUX_OUMBAR_ENABLE 0x80000000 | ||
321 | |||
322 | #define IOP13XX_ATUE_OFFSET(ofs) IOP13XX_REG_ADDR32(\ | ||
323 | iop13xx_atue_pmmr_offset + (ofs)) | ||
324 | |||
325 | #define IOP13XX_ATUE_DID IOP13XX_REG_ADDR16(\ | ||
326 | iop13xx_atue_pmmr_offset + 0x2) | ||
327 | #define IOP13XX_ATUE_ATUCMD IOP13XX_REG_ADDR16(\ | ||
328 | iop13xx_atue_pmmr_offset + 0x4) | ||
329 | #define IOP13XX_ATUE_ATUSR IOP13XX_REG_ADDR16(\ | ||
330 | iop13xx_atue_pmmr_offset + 0x6) | ||
331 | |||
332 | #define IOP13XX_ATUE_IABAR0 IOP13XX_ATUE_OFFSET(0x10) | ||
333 | #define IOP13XX_ATUE_IAUBAR0 IOP13XX_ATUE_OFFSET(0x14) | ||
334 | #define IOP13XX_ATUE_IABAR1 IOP13XX_ATUE_OFFSET(0x18) | ||
335 | #define IOP13XX_ATUE_IAUBAR1 IOP13XX_ATUE_OFFSET(0x1c) | ||
336 | #define IOP13XX_ATUE_IABAR2 IOP13XX_ATUE_OFFSET(0x20) | ||
337 | #define IOP13XX_ATUE_IAUBAR2 IOP13XX_ATUE_OFFSET(0x24) | ||
338 | #define IOP13XX_ATUE_IALR0 IOP13XX_ATUE_OFFSET(0x40) | ||
339 | #define IOP13XX_ATUE_IATVR0 IOP13XX_ATUE_OFFSET(0x44) | ||
340 | #define IOP13XX_ATUE_IAUTVR0 IOP13XX_ATUE_OFFSET(0x48) | ||
341 | #define IOP13XX_ATUE_IALR1 IOP13XX_ATUE_OFFSET(0x4c) | ||
342 | #define IOP13XX_ATUE_IATVR1 IOP13XX_ATUE_OFFSET(0x50) | ||
343 | #define IOP13XX_ATUE_IAUTVR1 IOP13XX_ATUE_OFFSET(0x54) | ||
344 | #define IOP13XX_ATUE_IALR2 IOP13XX_ATUE_OFFSET(0x58) | ||
345 | #define IOP13XX_ATUE_IATVR2 IOP13XX_ATUE_OFFSET(0x5c) | ||
346 | #define IOP13XX_ATUE_IAUTVR2 IOP13XX_ATUE_OFFSET(0x60) | ||
347 | #define IOP13XX_ATUE_PE_LSTS IOP13XX_REG_ADDR16(\ | ||
348 | iop13xx_atue_pmmr_offset + 0xe2) | ||
349 | #define IOP13XX_ATUE_OIOWTVR IOP13XX_ATUE_OFFSET(0x304) | ||
350 | #define IOP13XX_ATUE_OUMBAR0 IOP13XX_ATUE_OFFSET(0x308) | ||
351 | #define IOP13XX_ATUE_OUMWTVR0 IOP13XX_ATUE_OFFSET(0x30c) | ||
352 | #define IOP13XX_ATUE_OUMBAR1 IOP13XX_ATUE_OFFSET(0x310) | ||
353 | #define IOP13XX_ATUE_OUMWTVR1 IOP13XX_ATUE_OFFSET(0x314) | ||
354 | #define IOP13XX_ATUE_OUMBAR2 IOP13XX_ATUE_OFFSET(0x318) | ||
355 | #define IOP13XX_ATUE_OUMWTVR2 IOP13XX_ATUE_OFFSET(0x31c) | ||
356 | #define IOP13XX_ATUE_OUMBAR3 IOP13XX_ATUE_OFFSET(0x320) | ||
357 | #define IOP13XX_ATUE_OUMWTVR3 IOP13XX_ATUE_OFFSET(0x324) | ||
358 | |||
359 | #define IOP13XX_ATUE_ATUCR IOP13XX_ATUE_OFFSET(0x70) | ||
360 | #define IOP13XX_ATUE_PCSR IOP13XX_ATUE_OFFSET(0x74) | ||
361 | #define IOP13XX_ATUE_ATUISR IOP13XX_ATUE_OFFSET(0x78) | ||
362 | #define IOP13XX_ATUE_OIOBAR IOP13XX_ATUE_OFFSET(0x300) | ||
363 | #define IOP13XX_ATUE_OCCAR IOP13XX_ATUE_OFFSET(0x32c) | ||
364 | #define IOP13XX_ATUE_OCCDR IOP13XX_ATUE_OFFSET(0x330) | ||
365 | |||
366 | #define IOP13XX_ATUE_PIE_STS IOP13XX_ATUE_OFFSET(0x384) | ||
367 | #define IOP13XX_ATUE_PIE_MSK IOP13XX_ATUE_OFFSET(0x388) | ||
368 | |||
369 | #define IOP13XX_ATUE_ATUCR_IVM (1 << 6) | ||
370 | #define IOP13XX_ATUE_ATUCR_OUT_EN (1 << 1) | ||
371 | #define IOP13XX_ATUE_OCCAR_BUS_NUM (24) | ||
372 | #define IOP13XX_ATUE_OCCAR_DEV_NUM (19) | ||
373 | #define IOP13XX_ATUE_OCCAR_FUNC_NUM (16) | ||
374 | #define IOP13XX_ATUE_OCCAR_EXT_REG (8) | ||
375 | #define IOP13XX_ATUE_OCCAR_REG (2) | ||
376 | |||
377 | #define IOP13XX_ATUE_PCSR_BUS_NUM (24) | ||
378 | #define IOP13XX_ATUE_PCSR_DEV_NUM (19) | ||
379 | #define IOP13XX_ATUE_PCSR_FUNC_NUM (16) | ||
380 | #define IOP13XX_ATUE_PCSR_OUT_Q_BUSY (1 << 15) | ||
381 | #define IOP13XX_ATUE_PCSR_IN_Q_BUSY (1 << 14) | ||
382 | #define IOP13XX_ATUE_PCSR_END_POINT (1 << 13) | ||
383 | #define IOP13XX_ATUE_PCSR_LLRB_BUSY (1 << 12) | ||
384 | |||
385 | #define IOP13XX_ATUE_PCSR_BUS_NUM_MASK (0xff) | ||
386 | #define IOP13XX_ATUE_PCSR_DEV_NUM_MASK (0x1f) | ||
387 | #define IOP13XX_ATUE_PCSR_FUNC_NUM_MASK (0x7) | ||
388 | |||
389 | #define IOP13XX_ATUE_PCSR_CORE_RESET (8) | ||
390 | #define IOP13XX_ATUE_PCSR_FUNC_NUM (16) | ||
391 | |||
392 | #define IOP13XX_ATUE_LSTS_TRAINING (1 << 11) | ||
393 | #define IOP13XX_ATUE_STAT_SLOT_PWR_MSG (1 << 28) | ||
394 | #define IOP13XX_ATUE_STAT_PME (1 << 27) | ||
395 | #define IOP13XX_ATUE_STAT_HOT_PLUG_MSG (1 << 26) | ||
396 | #define IOP13XX_ATUE_STAT_IVM (1 << 25) | ||
397 | #define IOP13XX_ATUE_STAT_BIST (1 << 24) | ||
398 | #define IOP13XX_ATUE_STAT_CFG_WRITE (1 << 18) | ||
399 | #define IOP13XX_ATUE_STAT_VPD_ADDR (1 << 17) | ||
400 | #define IOP13XX_ATUE_STAT_POWER_TRAN (1 << 16) | ||
401 | #define IOP13XX_ATUE_STAT_HALT_ON_ERROR (1 << 13) | ||
402 | #define IOP13XX_ATUE_STAT_ROOT_SYS_ERR (1 << 12) | ||
403 | #define IOP13XX_ATUE_STAT_ROOT_ERR_MSG (1 << 11) | ||
404 | #define IOP13XX_ATUE_STAT_PCI_IFACE_ERR (1 << 10) | ||
405 | #define IOP13XX_ATUE_STAT_ERR_COR (1 << 9 ) | ||
406 | #define IOP13XX_ATUE_STAT_ERR_UNCOR (1 << 8 ) | ||
407 | #define IOP13XX_ATUE_STAT_CRS (1 << 7 ) | ||
408 | #define IOP13XX_ATUE_STAT_LNK_DWN (1 << 6 ) | ||
409 | #define IOP13XX_ATUE_STAT_INT_REC_MABORT (1 << 5 ) | ||
410 | #define IOP13XX_ATUE_STAT_DET_PAR_ERR (1 << 4 ) | ||
411 | #define IOP13XX_ATUE_STAT_EXT_REC_MABORT (1 << 3 ) | ||
412 | #define IOP13XX_ATUE_STAT_SIG_TABORT (1 << 2 ) | ||
413 | #define IOP13XX_ATUE_STAT_EXT_REC_TABORT (1 << 1 ) | ||
414 | #define IOP13XX_ATUE_STAT_MASTER_DATA_PAR (1 << 0 ) | ||
415 | |||
416 | #define IOP13XX_ATUE_ESTAT_REC_UNSUPPORTED_COMP_REQ (1 << 31) | ||
417 | #define IOP13XX_ATUE_ESTAT_REC_COMPLETER_ABORT (1 << 30) | ||
418 | #define IOP13XX_ATUE_ESTAT_TX_POISONED_TLP (1 << 29) | ||
419 | #define IOP13XX_ATUE_ESTAT_TX_PAR_ERR (1 << 28) | ||
420 | #define IOP13XX_ATUE_ESTAT_REC_UNSUPPORTED_REQ (1 << 20) | ||
421 | #define IOP13XX_ATUE_ESTAT_REC_ECRC_ERR (1 << 19) | ||
422 | #define IOP13XX_ATUE_ESTAT_REC_MALFORMED_TLP (1 << 18) | ||
423 | #define IOP13XX_ATUE_ESTAT_TX_RECEIVER_OVERFLOW (1 << 17) | ||
424 | #define IOP13XX_ATUE_ESTAT_REC_UNEXPECTED_COMP (1 << 16) | ||
425 | #define IOP13XX_ATUE_ESTAT_INT_COMP_ABORT (1 << 15) | ||
426 | #define IOP13XX_ATUE_ESTAT_COMP_TIMEOUT (1 << 14) | ||
427 | #define IOP13XX_ATUE_ESTAT_FLOW_CONTROL_ERR (1 << 13) | ||
428 | #define IOP13XX_ATUE_ESTAT_REC_POISONED_TLP (1 << 12) | ||
429 | #define IOP13XX_ATUE_ESTAT_DATA_LNK_ERR (1 << 4 ) | ||
430 | #define IOP13XX_ATUE_ESTAT_TRAINING_ERR (1 << 0 ) | ||
431 | |||
432 | #define IOP13XX_ATUE_IALR_DISABLE (0x00000001) | ||
433 | #define IOP13XX_ATUE_OUMBAR_ENABLE (0x80000000) | ||
434 | #define IOP13XX_ATU_OUMBAR_FUNC_NUM (28) | ||
435 | #define IOP13XX_ATU_OUMBAR_FUNC_NUM_MASK (0x7) | ||
436 | /*=======================================================================*/ | ||
437 | |||
438 | /*==============================ADMA UNITS===============================*/ | ||
439 | #define IOP13XX_ADMA_PHYS_BASE(chan) IOP13XX_REG_ADDR32_PHYS((chan << 9)) | ||
440 | #define IOP13XX_ADMA_UPPER_PA(chan) (IOP13XX_ADMA_PHYS_BASE(chan) + 0xc0) | ||
441 | #define IOP13XX_ADMA_OFFSET(chan, ofs) IOP13XX_REG_ADDR32((chan << 9) + (ofs)) | ||
442 | |||
443 | #define IOP13XX_ADMA_ACCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x0) | ||
444 | #define IOP13XX_ADMA_ACSR(chan) IOP13XX_ADMA_OFFSET(chan, 0x4) | ||
445 | #define IOP13XX_ADMA_ADAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x8) | ||
446 | #define IOP13XX_ADMA_IIPCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x18) | ||
447 | #define IOP13XX_ADMA_IIPAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x1c) | ||
448 | #define IOP13XX_ADMA_IIPUAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x20) | ||
449 | #define IOP13XX_ADMA_ANDAR(chan) IOP13XX_ADMA_OFFSET(chan, 0x24) | ||
450 | #define IOP13XX_ADMA_ADCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x28) | ||
451 | #define IOP13XX_ADMA_CARMD(chan) IOP13XX_ADMA_OFFSET(chan, 0x2c) | ||
452 | #define IOP13XX_ADMA_ABCR(chan) IOP13XX_ADMA_OFFSET(chan, 0x30) | ||
453 | #define IOP13XX_ADMA_DLADR(chan) IOP13XX_ADMA_OFFSET(chan, 0x34) | ||
454 | #define IOP13XX_ADMA_DUADR(chan) IOP13XX_ADMA_OFFSET(chan, 0x38) | ||
455 | #define IOP13XX_ADMA_SLAR(src, chan) IOP13XX_ADMA_OFFSET(chan, 0x3c + (src <<3)) | ||
456 | #define IOP13XX_ADMA_SUAR(src, chan) IOP13XX_ADMA_OFFSET(chan, 0x40 + (src <<3)) | ||
457 | |||
458 | /*==============================XSI BRIDGE===============================*/ | ||
459 | #define IOP13XX_XBG_BECSR IOP13XX_REG_ADDR32(0x178c) | ||
460 | #define IOP13XX_XBG_BERAR IOP13XX_REG_ADDR32(0x1790) | ||
461 | #define IOP13XX_XBG_BERUAR IOP13XX_REG_ADDR32(0x1794) | ||
462 | #define is_atue_occdr_error(x) ((__raw_readl(IOP13XX_XBG_BERAR) == \ | ||
463 | IOP13XX_PMMR_VIRT_TO_PHYS(\ | ||
464 | IOP13XX_ATUE_OCCDR))\ | ||
465 | && (__raw_readl(IOP13XX_XBG_BECSR) & 1)) | ||
466 | #define is_atux_occdr_error(x) ((__raw_readl(IOP13XX_XBG_BERAR) == \ | ||
467 | IOP13XX_PMMR_VIRT_TO_PHYS(\ | ||
468 | IOP13XX_ATUX_OCCDR))\ | ||
469 | && (__raw_readl(IOP13XX_XBG_BECSR) & 1)) | ||
470 | /*=======================================================================*/ | ||
471 | |||
472 | #define IOP13XX_PBI_OFFSET(ofs) IOP13XX_REG_ADDR32(IOP13XX_PBI_PMMR_OFFSET +\ | ||
473 | (ofs)) | ||
474 | |||
475 | #define IOP13XX_PBI_CR IOP13XX_PBI_OFFSET(0x0) | ||
476 | #define IOP13XX_PBI_SR IOP13XX_PBI_OFFSET(0x4) | ||
477 | #define IOP13XX_PBI_BAR0 IOP13XX_PBI_OFFSET(0x8) | ||
478 | #define IOP13XX_PBI_LR0 IOP13XX_PBI_OFFSET(0xc) | ||
479 | #define IOP13XX_PBI_BAR1 IOP13XX_PBI_OFFSET(0x10) | ||
480 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) | ||
481 | |||
482 | #define IOP13XX_TMR_TC 0x01 | ||
483 | #define IOP13XX_TMR_EN 0x02 | ||
484 | #define IOP13XX_TMR_RELOAD 0x04 | ||
485 | #define IOP13XX_TMR_PRIVILEGED 0x08 | ||
486 | |||
487 | #define IOP13XX_TMR_RATIO_1_1 0x00 | ||
488 | #define IOP13XX_TMR_RATIO_4_1 0x10 | ||
489 | #define IOP13XX_TMR_RATIO_8_1 0x20 | ||
490 | #define IOP13XX_TMR_RATIO_16_1 0x30 | ||
491 | |||
492 | #endif /* _IOP13XX_HW_H_ */ | ||
diff --git a/include/asm-arm/arch-iop13xx/iq81340.h b/include/asm-arm/arch-iop13xx/iq81340.h new file mode 100644 index 000000000000..b98f8f109c22 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/iq81340.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _IQ81340_H_ | ||
2 | #define _IQ81340_H_ | ||
3 | |||
4 | #define IQ81340_PCE_BAR0 IOP13XX_PBI_LOWER_MEM_RA | ||
5 | #define IQ81340_PCE_BAR1 (IQ81340_PCE_BAR0 + 0x02000000) | ||
6 | |||
7 | #define IQ81340_FLASHBASE IQ81340_PCE_BAR0 /* Flash */ | ||
8 | |||
9 | #define IQ81340_PCE_BAR1_OFFSET(a) (IQ81340_PCE_BAR1 + (a)) | ||
10 | |||
11 | #define IQ81340_PRD_CODE IQ81340_PCE_BAR1_OFFSET(0) | ||
12 | #define IQ81340_BRD_STEP IQ81340_PCE_BAR1_OFFSET(0x10000) | ||
13 | #define IQ81340_CPLD_REV IQ81340_PCE_BAR1_OFFSET(0x20000) | ||
14 | #define IQ81340_LED IQ81340_PCE_BAR1_OFFSET(0x30000) | ||
15 | #define IQ81340_LHEX IQ81340_PCE_BAR1_OFFSET(0x40000) | ||
16 | #define IQ81340_RHEX IQ81340_PCE_BAR1_OFFSET(0x50000) | ||
17 | #define IQ81340_BUZZER IQ81340_PCE_BAR1_OFFSET(0x60000) | ||
18 | #define IQ81340_32K_NVRAM IQ81340_PCE_BAR1_OFFSET(0x70000) | ||
19 | #define IQ81340_256K_NVRAM IQ81340_PCE_BAR1_OFFSET(0x80000) | ||
20 | #define IQ81340_ROTARY_SW IQ81340_PCE_BAR1_OFFSET(0xd0000) | ||
21 | #define IQ81340_BATT_STAT IQ81340_PCE_BAR1_OFFSET(0xf0000) | ||
22 | #define IQ81340_CMP_FLSH IQ81340_PCE_BAR1_OFFSET(0x1000000) /* 16MB */ | ||
23 | |||
24 | #define PBI_CF_IDE_BASE (IQ81340_CMP_FLSH) | ||
25 | #define PBI_CF_BAR_ADDR (IOP13XX_PBI_BAR1) | ||
26 | |||
27 | /* These are the values used in the Machine description */ | ||
28 | #define PHYS_IO 0xfeffff00 | ||
29 | #define IO_PG_OFFSET 0xffffff00 | ||
30 | #define BOOT_PARAM_OFFSET 0x00000100 | ||
31 | #endif /* _IQ81340_H_ */ | ||
diff --git a/include/asm-arm/arch-iop13xx/irqs.h b/include/asm-arm/arch-iop13xx/irqs.h new file mode 100644 index 000000000000..442e35a40359 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/irqs.h | |||
@@ -0,0 +1,207 @@ | |||
1 | #ifndef _IOP13XX_IRQS_H_ | ||
2 | #define _IOP13XX_IRQS_H_ | ||
3 | |||
4 | #ifndef __ASSEMBLER__ | ||
5 | #include <linux/types.h> | ||
6 | #include <asm/system.h> /* local_irq_save */ | ||
7 | #include <asm/arch/iop13xx.h> /* iop13xx_cp6_* */ | ||
8 | |||
9 | /* INTPND0 CP6 R0 Page 3 | ||
10 | */ | ||
11 | static inline u32 read_intpnd_0(void) | ||
12 | { | ||
13 | u32 val; | ||
14 | asm volatile("mrc p6, 0, %0, c0, c3, 0":"=r" (val)); | ||
15 | return val; | ||
16 | } | ||
17 | |||
18 | /* INTPND1 CP6 R1 Page 3 | ||
19 | */ | ||
20 | static inline u32 read_intpnd_1(void) | ||
21 | { | ||
22 | u32 val; | ||
23 | asm volatile("mrc p6, 0, %0, c1, c3, 0":"=r" (val)); | ||
24 | return val; | ||
25 | } | ||
26 | |||
27 | /* INTPND2 CP6 R2 Page 3 | ||
28 | */ | ||
29 | static inline u32 read_intpnd_2(void) | ||
30 | { | ||
31 | u32 val; | ||
32 | asm volatile("mrc p6, 0, %0, c2, c3, 0":"=r" (val)); | ||
33 | return val; | ||
34 | } | ||
35 | |||
36 | /* INTPND3 CP6 R3 Page 3 | ||
37 | */ | ||
38 | static inline u32 read_intpnd_3(void) | ||
39 | { | ||
40 | u32 val; | ||
41 | asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val)); | ||
42 | return val; | ||
43 | } | ||
44 | |||
45 | static inline void | ||
46 | iop13xx_cp6_enable_irq_save(unsigned long *cp_flags, unsigned long *irq_flags) | ||
47 | { | ||
48 | local_irq_save(*irq_flags); | ||
49 | *cp_flags = iop13xx_cp6_save(); | ||
50 | } | ||
51 | |||
52 | static inline void | ||
53 | iop13xx_cp6_irq_restore(unsigned long *cp_flags, | ||
54 | unsigned long *irq_flags) | ||
55 | { | ||
56 | iop13xx_cp6_restore(*cp_flags); | ||
57 | local_irq_restore(*irq_flags); | ||
58 | } | ||
59 | #endif | ||
60 | |||
61 | #define INTBASE 0 | ||
62 | #define INTSIZE_4 1 | ||
63 | |||
64 | /* | ||
65 | * iop34x chipset interrupts | ||
66 | */ | ||
67 | #define IOP13XX_IRQ(x) (IOP13XX_IRQ_OFS + (x)) | ||
68 | |||
69 | /* | ||
70 | * On IRQ or FIQ register | ||
71 | */ | ||
72 | #define IRQ_IOP13XX_ADMA0_EOT (0) | ||
73 | #define IRQ_IOP13XX_ADMA0_EOC (1) | ||
74 | #define IRQ_IOP13XX_ADMA1_EOT (2) | ||
75 | #define IRQ_IOP13XX_ADMA1_EOC (3) | ||
76 | #define IRQ_IOP13XX_ADMA2_EOT (4) | ||
77 | #define IRQ_IOP13XX_ADMA2_EOC (5) | ||
78 | #define IRQ_IOP134_WATCHDOG (6) | ||
79 | #define IRQ_IOP13XX_RSVD_7 (7) | ||
80 | #define IRQ_IOP13XX_TIMER0 (8) | ||
81 | #define IRQ_IOP13XX_TIMER1 (9) | ||
82 | #define IRQ_IOP13XX_I2C_0 (10) | ||
83 | #define IRQ_IOP13XX_I2C_1 (11) | ||
84 | #define IRQ_IOP13XX_MSG (12) | ||
85 | #define IRQ_IOP13XX_MSGIBQ (13) | ||
86 | #define IRQ_IOP13XX_ATU_IM (14) | ||
87 | #define IRQ_IOP13XX_ATU_BIST (15) | ||
88 | #define IRQ_IOP13XX_PPMU (16) | ||
89 | #define IRQ_IOP13XX_COREPMU (17) | ||
90 | #define IRQ_IOP13XX_CORECACHE (18) | ||
91 | #define IRQ_IOP13XX_RSVD_19 (19) | ||
92 | #define IRQ_IOP13XX_RSVD_20 (20) | ||
93 | #define IRQ_IOP13XX_RSVD_21 (21) | ||
94 | #define IRQ_IOP13XX_RSVD_22 (22) | ||
95 | #define IRQ_IOP13XX_RSVD_23 (23) | ||
96 | #define IRQ_IOP13XX_XINT0 (24) | ||
97 | #define IRQ_IOP13XX_XINT1 (25) | ||
98 | #define IRQ_IOP13XX_XINT2 (26) | ||
99 | #define IRQ_IOP13XX_XINT3 (27) | ||
100 | #define IRQ_IOP13XX_XINT4 (28) | ||
101 | #define IRQ_IOP13XX_XINT5 (29) | ||
102 | #define IRQ_IOP13XX_XINT6 (30) | ||
103 | #define IRQ_IOP13XX_XINT7 (31) | ||
104 | /* IINTSRC1 bit */ | ||
105 | #define IRQ_IOP13XX_XINT8 (32) /* 0 */ | ||
106 | #define IRQ_IOP13XX_XINT9 (33) /* 1 */ | ||
107 | #define IRQ_IOP13XX_XINT10 (34) /* 2 */ | ||
108 | #define IRQ_IOP13XX_XINT11 (35) /* 3 */ | ||
109 | #define IRQ_IOP13XX_XINT12 (36) /* 4 */ | ||
110 | #define IRQ_IOP13XX_XINT13 (37) /* 5 */ | ||
111 | #define IRQ_IOP13XX_XINT14 (38) /* 6 */ | ||
112 | #define IRQ_IOP13XX_XINT15 (39) /* 7 */ | ||
113 | #define IRQ_IOP13XX_RSVD_40 (40) /* 8 */ | ||
114 | #define IRQ_IOP13XX_RSVD_41 (41) /* 9 */ | ||
115 | #define IRQ_IOP13XX_RSVD_42 (42) /* 10 */ | ||
116 | #define IRQ_IOP13XX_RSVD_43 (43) /* 11 */ | ||
117 | #define IRQ_IOP13XX_RSVD_44 (44) /* 12 */ | ||
118 | #define IRQ_IOP13XX_RSVD_45 (45) /* 13 */ | ||
119 | #define IRQ_IOP13XX_RSVD_46 (46) /* 14 */ | ||
120 | #define IRQ_IOP13XX_RSVD_47 (47) /* 15 */ | ||
121 | #define IRQ_IOP13XX_RSVD_48 (48) /* 16 */ | ||
122 | #define IRQ_IOP13XX_RSVD_49 (49) /* 17 */ | ||
123 | #define IRQ_IOP13XX_RSVD_50 (50) /* 18 */ | ||
124 | #define IRQ_IOP13XX_UART0 (51) /* 19 */ | ||
125 | #define IRQ_IOP13XX_UART1 (52) /* 20 */ | ||
126 | #define IRQ_IOP13XX_PBIE (53) /* 21 */ | ||
127 | #define IRQ_IOP13XX_ATU_CRW (54) /* 22 */ | ||
128 | #define IRQ_IOP13XX_ATU_ERR (55) /* 23 */ | ||
129 | #define IRQ_IOP13XX_MCU_ERR (56) /* 24 */ | ||
130 | #define IRQ_IOP13XX_ADMA0_ERR (57) /* 25 */ | ||
131 | #define IRQ_IOP13XX_ADMA1_ERR (58) /* 26 */ | ||
132 | #define IRQ_IOP13XX_ADMA2_ERR (59) /* 27 */ | ||
133 | #define IRQ_IOP13XX_RSVD_60 (60) /* 28 */ | ||
134 | #define IRQ_IOP13XX_RSVD_61 (61) /* 29 */ | ||
135 | #define IRQ_IOP13XX_MSG_ERR (62) /* 30 */ | ||
136 | #define IRQ_IOP13XX_RSVD_63 (63) /* 31 */ | ||
137 | /* IINTSRC2 bit */ | ||
138 | #define IRQ_IOP13XX_INTERPROC (64) /* 0 */ | ||
139 | #define IRQ_IOP13XX_RSVD_65 (65) /* 1 */ | ||
140 | #define IRQ_IOP13XX_RSVD_66 (66) /* 2 */ | ||
141 | #define IRQ_IOP13XX_RSVD_67 (67) /* 3 */ | ||
142 | #define IRQ_IOP13XX_RSVD_68 (68) /* 4 */ | ||
143 | #define IRQ_IOP13XX_RSVD_69 (69) /* 5 */ | ||
144 | #define IRQ_IOP13XX_RSVD_70 (70) /* 6 */ | ||
145 | #define IRQ_IOP13XX_RSVD_71 (71) /* 7 */ | ||
146 | #define IRQ_IOP13XX_RSVD_72 (72) /* 8 */ | ||
147 | #define IRQ_IOP13XX_RSVD_73 (73) /* 9 */ | ||
148 | #define IRQ_IOP13XX_RSVD_74 (74) /* 10 */ | ||
149 | #define IRQ_IOP13XX_RSVD_75 (75) /* 11 */ | ||
150 | #define IRQ_IOP13XX_RSVD_76 (76) /* 12 */ | ||
151 | #define IRQ_IOP13XX_RSVD_77 (77) /* 13 */ | ||
152 | #define IRQ_IOP13XX_RSVD_78 (78) /* 14 */ | ||
153 | #define IRQ_IOP13XX_RSVD_79 (79) /* 15 */ | ||
154 | #define IRQ_IOP13XX_RSVD_80 (80) /* 16 */ | ||
155 | #define IRQ_IOP13XX_RSVD_81 (81) /* 17 */ | ||
156 | #define IRQ_IOP13XX_RSVD_82 (82) /* 18 */ | ||
157 | #define IRQ_IOP13XX_RSVD_83 (83) /* 19 */ | ||
158 | #define IRQ_IOP13XX_RSVD_84 (84) /* 20 */ | ||
159 | #define IRQ_IOP13XX_RSVD_85 (85) /* 21 */ | ||
160 | #define IRQ_IOP13XX_RSVD_86 (86) /* 22 */ | ||
161 | #define IRQ_IOP13XX_RSVD_87 (87) /* 23 */ | ||
162 | #define IRQ_IOP13XX_RSVD_88 (88) /* 24 */ | ||
163 | #define IRQ_IOP13XX_RSVD_89 (89) /* 25 */ | ||
164 | #define IRQ_IOP13XX_RSVD_90 (90) /* 26 */ | ||
165 | #define IRQ_IOP13XX_RSVD_91 (91) /* 27 */ | ||
166 | #define IRQ_IOP13XX_RSVD_92 (92) /* 28 */ | ||
167 | #define IRQ_IOP13XX_RSVD_93 (93) /* 29 */ | ||
168 | #define IRQ_IOP13XX_SIB_ERR (94) /* 30 */ | ||
169 | #define IRQ_IOP13XX_SRAM_ERR (95) /* 31 */ | ||
170 | /* IINTSRC3 bit */ | ||
171 | #define IRQ_IOP13XX_I2C_2 (96) /* 0 */ | ||
172 | #define IRQ_IOP13XX_ATUE_BIST (97) /* 1 */ | ||
173 | #define IRQ_IOP13XX_ATUE_CRW (98) /* 2 */ | ||
174 | #define IRQ_IOP13XX_ATUE_ERR (99) /* 3 */ | ||
175 | #define IRQ_IOP13XX_IMU (100) /* 4 */ | ||
176 | #define IRQ_IOP13XX_RSVD_101 (101) /* 5 */ | ||
177 | #define IRQ_IOP13XX_RSVD_102 (102) /* 6 */ | ||
178 | #define IRQ_IOP13XX_TPMI0_OUT (103) /* 7 */ | ||
179 | #define IRQ_IOP13XX_TPMI1_OUT (104) /* 8 */ | ||
180 | #define IRQ_IOP13XX_TPMI2_OUT (105) /* 9 */ | ||
181 | #define IRQ_IOP13XX_TPMI3_OUT (106) /* 10 */ | ||
182 | #define IRQ_IOP13XX_ATUE_IMA (107) /* 11 */ | ||
183 | #define IRQ_IOP13XX_ATUE_IMB (108) /* 12 */ | ||
184 | #define IRQ_IOP13XX_ATUE_IMC (109) /* 13 */ | ||
185 | #define IRQ_IOP13XX_ATUE_IMD (110) /* 14 */ | ||
186 | #define IRQ_IOP13XX_MU_MSI_TB (111) /* 15 */ | ||
187 | #define IRQ_IOP13XX_RSVD_112 (112) /* 16 */ | ||
188 | #define IRQ_IOP13XX_RSVD_113 (113) /* 17 */ | ||
189 | #define IRQ_IOP13XX_RSVD_114 (114) /* 18 */ | ||
190 | #define IRQ_IOP13XX_RSVD_115 (115) /* 19 */ | ||
191 | #define IRQ_IOP13XX_RSVD_116 (116) /* 20 */ | ||
192 | #define IRQ_IOP13XX_RSVD_117 (117) /* 21 */ | ||
193 | #define IRQ_IOP13XX_RSVD_118 (118) /* 22 */ | ||
194 | #define IRQ_IOP13XX_RSVD_119 (119) /* 23 */ | ||
195 | #define IRQ_IOP13XX_RSVD_120 (120) /* 24 */ | ||
196 | #define IRQ_IOP13XX_RSVD_121 (121) /* 25 */ | ||
197 | #define IRQ_IOP13XX_RSVD_122 (122) /* 26 */ | ||
198 | #define IRQ_IOP13XX_RSVD_123 (123) /* 27 */ | ||
199 | #define IRQ_IOP13XX_RSVD_124 (124) /* 28 */ | ||
200 | #define IRQ_IOP13XX_RSVD_125 (125) /* 29 */ | ||
201 | #define IRQ_IOP13XX_RSVD_126 (126) /* 30 */ | ||
202 | #define IRQ_IOP13XX_HPI (127) /* 31 */ | ||
203 | |||
204 | #define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1) | ||
205 | #define NR_IRQS NR_IOP13XX_IRQS | ||
206 | |||
207 | #endif /* _IOP13XX_IRQ_H_ */ | ||
diff --git a/include/asm-arm/arch-iop13xx/memory.h b/include/asm-arm/arch-iop13xx/memory.h new file mode 100644 index 000000000000..031a0fa78eff --- /dev/null +++ b/include/asm-arm/arch-iop13xx/memory.h | |||
@@ -0,0 +1,64 @@ | |||
1 | #ifndef __ASM_ARCH_MEMORY_H | ||
2 | #define __ASM_ARCH_MEMORY_H | ||
3 | |||
4 | #include <asm/arch/hardware.h> | ||
5 | |||
6 | /* | ||
7 | * Physical DRAM offset. | ||
8 | */ | ||
9 | #define PHYS_OFFSET UL(0x00000000) | ||
10 | #define TASK_SIZE UL(0x3f000000) | ||
11 | #define PAGE_OFFSET UL(0x40000000) | ||
12 | #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
16 | #if defined(CONFIG_ARCH_IOP13XX) | ||
17 | #define IOP13XX_PMMR_V_START (IOP13XX_PMMR_VIRT_MEM_BASE) | ||
18 | #define IOP13XX_PMMR_V_END (IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_SIZE) | ||
19 | #define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE) | ||
20 | #define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE) | ||
21 | |||
22 | /* | ||
23 | * Virtual view <-> PCI DMA view memory address translations | ||
24 | * virt_to_bus: Used to translate the virtual address to an | ||
25 | * address suitable to be passed to set_dma_addr | ||
26 | * bus_to_virt: Used to convert an address for DMA operations | ||
27 | * to an address that the kernel can use. | ||
28 | */ | ||
29 | |||
30 | /* RAM has 1:1 mapping on the PCIe/x Busses */ | ||
31 | #define __virt_to_bus(x) (__virt_to_phys(x)) | ||
32 | #define __bus_to_virt(x) (__phys_to_virt(x)) | ||
33 | |||
34 | #define virt_to_lbus(x) \ | ||
35 | (( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) && \ | ||
36 | ((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ? \ | ||
37 | ((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \ | ||
38 | ((x) - PAGE_OFFSET + PHYS_OFFSET)) | ||
39 | |||
40 | #define lbus_to_virt(x) \ | ||
41 | (( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \ | ||
42 | ((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \ | ||
43 | ((x) - PHYS_OFFSET + PAGE_OFFSET)) | ||
44 | |||
45 | /* Device is an lbus device if it is on the platform bus of the IOP13XX */ | ||
46 | #define is_lbus_device(dev) (dev &&\ | ||
47 | (strncmp(dev->bus->name, "platform", 8) == 0)) | ||
48 | |||
49 | #define __arch_page_to_dma(dev, page) \ | ||
50 | ({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \ | ||
51 | (dma_addr_t)__virt_to_bus(page_address(page));}) | ||
52 | |||
53 | #define __arch_dma_to_virt(dev, addr) \ | ||
54 | ({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);}) | ||
55 | |||
56 | #define __arch_virt_to_dma(dev, addr) \ | ||
57 | ({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);}) | ||
58 | |||
59 | #endif /* CONFIG_ARCH_IOP13XX */ | ||
60 | #endif /* !ASSEMBLY */ | ||
61 | |||
62 | #define PFN_TO_NID(addr) (0) | ||
63 | |||
64 | #endif | ||
diff --git a/include/asm-arm/arch-iop13xx/pci.h b/include/asm-arm/arch-iop13xx/pci.h new file mode 100644 index 000000000000..4041f30d4cd3 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/pci.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef _IOP13XX_PCI_H_ | ||
2 | #define _IOP13XX_PCI_H_ | ||
3 | #include <asm/arch/irqs.h> | ||
4 | #include <asm/io.h> | ||
5 | |||
6 | struct pci_sys_data; | ||
7 | struct hw_pci; | ||
8 | int iop13xx_pci_setup(int nr, struct pci_sys_data *sys); | ||
9 | struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *); | ||
10 | void iop13xx_atu_select(struct hw_pci *plat_pci); | ||
11 | void iop13xx_pci_init(void); | ||
12 | void iop13xx_map_pci_memory(void); | ||
13 | |||
14 | #define IOP_PCI_STATUS_ERROR (PCI_STATUS_PARITY | \ | ||
15 | PCI_STATUS_SIG_TARGET_ABORT | \ | ||
16 | PCI_STATUS_REC_TARGET_ABORT | \ | ||
17 | PCI_STATUS_REC_TARGET_ABORT | \ | ||
18 | PCI_STATUS_REC_MASTER_ABORT | \ | ||
19 | PCI_STATUS_SIG_SYSTEM_ERROR | \ | ||
20 | PCI_STATUS_DETECTED_PARITY) | ||
21 | |||
22 | #define IOP13XX_ATUE_ATUISR_ERROR (IOP13XX_ATUE_STAT_HALT_ON_ERROR | \ | ||
23 | IOP13XX_ATUE_STAT_ROOT_SYS_ERR | \ | ||
24 | IOP13XX_ATUE_STAT_PCI_IFACE_ERR | \ | ||
25 | IOP13XX_ATUE_STAT_ERR_COR | \ | ||
26 | IOP13XX_ATUE_STAT_ERR_UNCOR | \ | ||
27 | IOP13XX_ATUE_STAT_CRS | \ | ||
28 | IOP13XX_ATUE_STAT_DET_PAR_ERR | \ | ||
29 | IOP13XX_ATUE_STAT_EXT_REC_MABORT | \ | ||
30 | IOP13XX_ATUE_STAT_SIG_TABORT | \ | ||
31 | IOP13XX_ATUE_STAT_EXT_REC_TABORT | \ | ||
32 | IOP13XX_ATUE_STAT_MASTER_DATA_PAR) | ||
33 | |||
34 | #define IOP13XX_ATUX_ATUISR_ERROR (IOP13XX_ATUX_STAT_TX_SCEM | \ | ||
35 | IOP13XX_ATUX_STAT_REC_SCEM | \ | ||
36 | IOP13XX_ATUX_STAT_TX_SERR | \ | ||
37 | IOP13XX_ATUX_STAT_DET_PAR_ERR | \ | ||
38 | IOP13XX_ATUX_STAT_INT_REC_MABORT | \ | ||
39 | IOP13XX_ATUX_STAT_REC_SERR | \ | ||
40 | IOP13XX_ATUX_STAT_EXT_REC_MABORT | \ | ||
41 | IOP13XX_ATUX_STAT_EXT_REC_TABORT | \ | ||
42 | IOP13XX_ATUX_STAT_EXT_SIG_TABORT | \ | ||
43 | IOP13XX_ATUX_STAT_MASTER_DATA_PAR) | ||
44 | |||
45 | /* PCI interrupts | ||
46 | */ | ||
47 | #define ATUX_INTA IRQ_IOP13XX_XINT0 | ||
48 | #define ATUX_INTB IRQ_IOP13XX_XINT1 | ||
49 | #define ATUX_INTC IRQ_IOP13XX_XINT2 | ||
50 | #define ATUX_INTD IRQ_IOP13XX_XINT3 | ||
51 | |||
52 | #define ATUE_INTA IRQ_IOP13XX_ATUE_IMA | ||
53 | #define ATUE_INTB IRQ_IOP13XX_ATUE_IMB | ||
54 | #define ATUE_INTC IRQ_IOP13XX_ATUE_IMC | ||
55 | #define ATUE_INTD IRQ_IOP13XX_ATUE_IMD | ||
56 | |||
57 | #endif /* _IOP13XX_PCI_H_ */ | ||
diff --git a/include/asm-arm/arch-iop13xx/system.h b/include/asm-arm/arch-iop13xx/system.h new file mode 100644 index 000000000000..ee3a62530af2 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/system.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop13xx/system.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <asm/arch/iop13xx.h> | ||
11 | static inline void arch_idle(void) | ||
12 | { | ||
13 | cpu_do_idle(); | ||
14 | } | ||
15 | |||
16 | /* WDTCR CP6 R7 Page 9 */ | ||
17 | static inline u32 read_wdtcr(void) | ||
18 | { | ||
19 | u32 val; | ||
20 | asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); | ||
21 | return val; | ||
22 | } | ||
23 | static inline void write_wdtcr(u32 val) | ||
24 | { | ||
25 | asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); | ||
26 | } | ||
27 | |||
28 | /* WDTSR CP6 R8 Page 9 */ | ||
29 | static inline u32 read_wdtsr(void) | ||
30 | { | ||
31 | u32 val; | ||
32 | asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); | ||
33 | return val; | ||
34 | } | ||
35 | static inline void write_wdtsr(u32 val) | ||
36 | { | ||
37 | asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); | ||
38 | } | ||
39 | |||
40 | #define IOP13XX_WDTCR_EN_ARM 0x1e1e1e1e | ||
41 | #define IOP13XX_WDTCR_EN 0xe1e1e1e1 | ||
42 | #define IOP13XX_WDTCR_DIS_ARM 0x1f1f1f1f | ||
43 | #define IOP13XX_WDTCR_DIS 0xf1f1f1f1 | ||
44 | #define IOP13XX_WDTSR_WRITE_EN (1 << 31) | ||
45 | #define IOP13XX_WDTCR_IB_RESET (1 << 0) | ||
46 | static inline void arch_reset(char mode) | ||
47 | { | ||
48 | /* | ||
49 | * Reset the internal bus (warning both cores are reset) | ||
50 | */ | ||
51 | u32 cp_flags = iop13xx_cp6_save(); | ||
52 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); | ||
53 | write_wdtcr(IOP13XX_WDTCR_EN); | ||
54 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); | ||
55 | write_wdtcr(0x1000); | ||
56 | iop13xx_cp6_restore(cp_flags); | ||
57 | |||
58 | for(;;); | ||
59 | } | ||
diff --git a/include/asm-arm/arch-iop13xx/timex.h b/include/asm-arm/arch-iop13xx/timex.h new file mode 100644 index 000000000000..f0c51dd97ed8 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/timex.h | |||
@@ -0,0 +1,3 @@ | |||
1 | #include <asm/hardware.h> | ||
2 | |||
3 | #define CLOCK_TICK_RATE (100 * HZ) | ||
diff --git a/include/asm-arm/arch-iop13xx/uncompress.h b/include/asm-arm/arch-iop13xx/uncompress.h new file mode 100644 index 000000000000..b9525d59b7ad --- /dev/null +++ b/include/asm-arm/arch-iop13xx/uncompress.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #include <asm/types.h> | ||
2 | #include <linux/serial_reg.h> | ||
3 | #include <asm/hardware.h> | ||
4 | #include <asm/processor.h> | ||
5 | |||
6 | #define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS) | ||
7 | #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) | ||
8 | |||
9 | static inline void putc(char c) | ||
10 | { | ||
11 | while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE) | ||
12 | cpu_relax(); | ||
13 | UART_BASE[UART_TX] = c; | ||
14 | } | ||
15 | |||
16 | static inline void flush(void) | ||
17 | { | ||
18 | } | ||
19 | |||
20 | /* | ||
21 | * nothing to do | ||
22 | */ | ||
23 | #define arch_decomp_setup() | ||
24 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-iop13xx/vmalloc.h b/include/asm-arm/arch-iop13xx/vmalloc.h new file mode 100644 index 000000000000..c53456740345 --- /dev/null +++ b/include/asm-arm/arch-iop13xx/vmalloc.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _VMALLOC_H_ | ||
2 | #define _VMALLOC_H_ | ||
3 | #define VMALLOC_END 0xfa000000UL | ||
4 | #endif | ||
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h index 9f1a58cbf407..9b0c8012e713 100644 --- a/include/asm-arm/arch-lh7a40x/memory.h +++ b/include/asm-arm/arch-lh7a40x/memory.h | |||
@@ -58,18 +58,6 @@ | |||
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
62 | * and return the mem_map of that node. | ||
63 | */ | ||
64 | # define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
65 | |||
66 | /* | ||
67 | * Given a page frame number, find the owning node of the memory | ||
68 | * and return the mem_map of that node. | ||
69 | */ | ||
70 | # define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
71 | |||
72 | /* | ||
73 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | 61 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory |
74 | * and returns the index corresponding to the appropriate page in the | 62 | * and returns the index corresponding to the appropriate page in the |
75 | * node's mem_map. | 63 | * node's mem_map. |
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h index eaf6d43939e9..e17f9881faf0 100644 --- a/include/asm-arm/arch-pxa/memory.h +++ b/include/asm-arm/arch-pxa/memory.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #define __virt_to_bus(x) __virt_to_phys(x) | 27 | #define __virt_to_bus(x) __virt_to_phys(x) |
28 | #define __bus_to_virt(x) __phys_to_virt(x) | 28 | #define __bus_to_virt(x) __phys_to_virt(x) |
29 | 29 | ||
30 | #ifdef CONFIG_DISCONTIGMEM | ||
31 | /* | 30 | /* |
32 | * The nodes are matched with the physical SDRAM banks as follows: | 31 | * The nodes are matched with the physical SDRAM banks as follows: |
33 | * | 32 | * |
@@ -35,38 +34,9 @@ | |||
35 | * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff | 34 | * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff |
36 | * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff | 35 | * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff |
37 | * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff | 36 | * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff |
37 | * | ||
38 | * This needs a node mem size of 26 bits. | ||
38 | */ | 39 | */ |
39 | 40 | #define NODE_MEM_SIZE_BITS 26 | |
40 | /* | ||
41 | * Given a kernel address, find the home node of the underlying memory. | ||
42 | */ | ||
43 | #define KVADDR_TO_NID(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> 26) | ||
44 | |||
45 | /* | ||
46 | * Given a page frame number, convert it to a node id. | ||
47 | */ | ||
48 | #define PFN_TO_NID(pfn) (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT)) | ||
49 | |||
50 | /* | ||
51 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
52 | * and returns the mem_map of that node. | ||
53 | */ | ||
54 | #define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
55 | |||
56 | /* | ||
57 | * Given a page frame number, find the owning node of the memory | ||
58 | * and returns the mem_map of that node. | ||
59 | */ | ||
60 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
61 | |||
62 | /* | ||
63 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | ||
64 | * and returns the index corresponding to the appropriate page in the | ||
65 | * node's mem_map. | ||
66 | */ | ||
67 | #define LOCAL_MAP_NR(addr) \ | ||
68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) | ||
69 | |||
70 | #endif | ||
71 | 41 | ||
72 | #endif | 42 | #endif |
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 1ff172dc8e33..0e907fc6d42a 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h | |||
@@ -39,7 +39,6 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); | |||
39 | #define __virt_to_bus(x) __virt_to_phys(x) | 39 | #define __virt_to_bus(x) __virt_to_phys(x) |
40 | #define __bus_to_virt(x) __phys_to_virt(x) | 40 | #define __bus_to_virt(x) __phys_to_virt(x) |
41 | 41 | ||
42 | #ifdef CONFIG_DISCONTIGMEM | ||
43 | /* | 42 | /* |
44 | * Because of the wide memory address space between physical RAM banks on the | 43 | * Because of the wide memory address space between physical RAM banks on the |
45 | * SA1100, it's much convenient to use Linux's NUMA support to implement our | 44 | * SA1100, it's much convenient to use Linux's NUMA support to implement our |
@@ -57,38 +56,7 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); | |||
57 | * node 2: 0xd0000000 - 0xd7ffffff | 56 | * node 2: 0xd0000000 - 0xd7ffffff |
58 | * node 3: 0xd8000000 - 0xdfffffff | 57 | * node 3: 0xd8000000 - 0xdfffffff |
59 | */ | 58 | */ |
60 | 59 | #define NODE_MEM_SIZE_BITS 27 | |
61 | /* | ||
62 | * Given a kernel address, find the home node of the underlying memory. | ||
63 | */ | ||
64 | #define KVADDR_TO_NID(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> 27) | ||
65 | |||
66 | /* | ||
67 | * Given a page frame number, convert it to a node id. | ||
68 | */ | ||
69 | #define PFN_TO_NID(pfn) (((pfn) - PHYS_PFN_OFFSET) >> (27 - PAGE_SHIFT)) | ||
70 | |||
71 | /* | ||
72 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
73 | * and return the mem_map of that node. | ||
74 | */ | ||
75 | #define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
76 | |||
77 | /* | ||
78 | * Given a page frame number, find the owning node of the memory | ||
79 | * and return the mem_map of that node. | ||
80 | */ | ||
81 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
82 | |||
83 | /* | ||
84 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | ||
85 | * and returns the index corresponding to the appropriate page in the | ||
86 | * node's mem_map. | ||
87 | */ | ||
88 | #define LOCAL_MAP_NR(addr) \ | ||
89 | (((unsigned long)(addr) & 0x07ffffff) >> PAGE_SHIFT) | ||
90 | |||
91 | #endif | ||
92 | 60 | ||
93 | /* | 61 | /* |
94 | * Cache flushing area - SA1100 zero bank | 62 | * Cache flushing area - SA1100 zero bank |
diff --git a/include/asm-arm/cnt32_to_63.h b/include/asm-arm/cnt32_to_63.h new file mode 100644 index 000000000000..480c873fa746 --- /dev/null +++ b/include/asm-arm/cnt32_to_63.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * include/asm/cnt32_to_63.h -- extend a 32-bit counter to 63 bits | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: December 3, 2006 | ||
6 | * Copyright: MontaVista Software, Inc. | ||
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 | ||
10 | * as published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __INCLUDE_CNT32_TO_63_H__ | ||
14 | #define __INCLUDE_CNT32_TO_63_H__ | ||
15 | |||
16 | #include <linux/compiler.h> | ||
17 | #include <asm/types.h> | ||
18 | #include <asm/byteorder.h> | ||
19 | |||
20 | /* | ||
21 | * Prototype: u64 cnt32_to_63(u32 cnt) | ||
22 | * Many hardware clock counters are only 32 bits wide and therefore have | ||
23 | * a relatively short period making wrap-arounds rather frequent. This | ||
24 | * is a problem when implementing sched_clock() for example, where a 64-bit | ||
25 | * non-wrapping monotonic value is expected to be returned. | ||
26 | * | ||
27 | * To overcome that limitation, let's extend a 32-bit counter to 63 bits | ||
28 | * in a completely lock free fashion. Bits 0 to 31 of the clock are provided | ||
29 | * by the hardware while bits 32 to 62 are stored in memory. The top bit in | ||
30 | * memory is used to synchronize with the hardware clock half-period. When | ||
31 | * the top bit of both counters (hardware and in memory) differ then the | ||
32 | * memory is updated with a new value, incrementing it when the hardware | ||
33 | * counter wraps around. | ||
34 | * | ||
35 | * Because a word store in memory is atomic then the incremented value will | ||
36 | * always be in synch with the top bit indicating to any potential concurrent | ||
37 | * reader if the value in memory is up to date or not with regards to the | ||
38 | * needed increment. And any race in updating the value in memory is harmless | ||
39 | * as the same value would simply be stored more than once. | ||
40 | * | ||
41 | * The only restriction for the algorithm to work properly is that this | ||
42 | * code must be executed at least once per each half period of the 32-bit | ||
43 | * counter to properly update the state bit in memory. This is usually not a | ||
44 | * problem in practice, but if it is then a kernel timer could be scheduled | ||
45 | * to manage for this code to be executed often enough. | ||
46 | * | ||
47 | * Note that the top bit (bit 63) in the returned value should be considered | ||
48 | * as garbage. It is not cleared here because callers are likely to use a | ||
49 | * multiplier on the returned value which can get rid of the top bit | ||
50 | * implicitly by making the multiplier even, therefore saving on a runtime | ||
51 | * clear-bit instruction. Otherwise caller must remember to clear the top | ||
52 | * bit explicitly. | ||
53 | */ | ||
54 | |||
55 | /* this is used only to give gcc a clue about good code generation */ | ||
56 | typedef union { | ||
57 | struct { | ||
58 | #if defined(__LITTLE_ENDIAN) | ||
59 | u32 lo, hi; | ||
60 | #elif defined(__BIG_ENDIAN) | ||
61 | u32 hi, lo; | ||
62 | #endif | ||
63 | }; | ||
64 | u64 val; | ||
65 | } cnt32_to_63_t; | ||
66 | |||
67 | #define cnt32_to_63(cnt_lo) \ | ||
68 | ({ \ | ||
69 | static volatile u32 __m_cnt_hi = 0; \ | ||
70 | cnt32_to_63_t __x; \ | ||
71 | __x.hi = __m_cnt_hi; \ | ||
72 | __x.lo = (cnt_lo); \ | ||
73 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | ||
74 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | ||
75 | __x.val; \ | ||
76 | }) | ||
77 | |||
78 | #endif | ||
diff --git a/include/asm-arm/div64.h b/include/asm-arm/div64.h index 3682616804ca..37e0a96e8789 100644 --- a/include/asm-arm/div64.h +++ b/include/asm-arm/div64.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define __xh "r1" | 27 | #define __xh "r1" |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define do_div(n,base) \ | 30 | #define __do_div_asm(n, base) \ |
31 | ({ \ | 31 | ({ \ |
32 | register unsigned int __base asm("r4") = base; \ | 32 | register unsigned int __base asm("r4") = base; \ |
33 | register unsigned long long __n asm("r0") = n; \ | 33 | register unsigned long long __n asm("r0") = n; \ |
@@ -45,4 +45,182 @@ | |||
45 | __rem; \ | 45 | __rem; \ |
46 | }) | 46 | }) |
47 | 47 | ||
48 | #if __GNUC__ < 4 | ||
49 | |||
50 | /* | ||
51 | * gcc versions earlier than 4.0 are simply too problematic for the | ||
52 | * optimized implementation below. First there is gcc PR 15089 that | ||
53 | * tend to trig on more complex constructs, spurious .global __udivsi3 | ||
54 | * are inserted even if none of those symbols are referenced in the | ||
55 | * generated code, and those gcc versions are not able to do constant | ||
56 | * propagation on long long values anyway. | ||
57 | */ | ||
58 | #define do_div(n, base) __do_div_asm(n, base) | ||
59 | |||
60 | #elif __GNUC__ >= 4 | ||
61 | |||
62 | #include <asm/bug.h> | ||
63 | |||
64 | /* | ||
65 | * If the divisor happens to be constant, we determine the appropriate | ||
66 | * inverse at compile time to turn the division into a few inline | ||
67 | * multiplications instead which is much faster. And yet only if compiling | ||
68 | * for ARMv4 or higher (we need umull/umlal) and if the gcc version is | ||
69 | * sufficiently recent to perform proper long long constant propagation. | ||
70 | * (It is unfortunate that gcc doesn't perform all this internally.) | ||
71 | */ | ||
72 | #define do_div(n, base) \ | ||
73 | ({ \ | ||
74 | unsigned int __r, __b = (base); \ | ||
75 | if (!__builtin_constant_p(__b) || __b == 0 || \ | ||
76 | (__LINUX_ARM_ARCH__ < 4 && (__b & (__b - 1)) != 0)) { \ | ||
77 | /* non-constant divisor (or zero): slow path */ \ | ||
78 | __r = __do_div_asm(n, __b); \ | ||
79 | } else if ((__b & (__b - 1)) == 0) { \ | ||
80 | /* Trivial: __b is constant and a power of 2 */ \ | ||
81 | /* gcc does the right thing with this code. */ \ | ||
82 | __r = n; \ | ||
83 | __r &= (__b - 1); \ | ||
84 | n /= __b; \ | ||
85 | } else { \ | ||
86 | /* Multiply by inverse of __b: n/b = n*(p/b)/p */ \ | ||
87 | /* We rely on the fact that most of this code gets */ \ | ||
88 | /* optimized away at compile time due to constant */ \ | ||
89 | /* propagation and only a couple inline assembly */ \ | ||
90 | /* instructions should remain. Better avoid any */ \ | ||
91 | /* code construct that might prevent that. */ \ | ||
92 | unsigned long long __res, __x, __t, __m, __n = n; \ | ||
93 | unsigned int __c, __p, __z = 0; \ | ||
94 | /* preserve low part of n for reminder computation */ \ | ||
95 | __r = __n; \ | ||
96 | /* determine number of bits to represent __b */ \ | ||
97 | __p = 1 << __div64_fls(__b); \ | ||
98 | /* compute __m = ((__p << 64) + __b - 1) / __b */ \ | ||
99 | __m = (~0ULL / __b) * __p; \ | ||
100 | __m += (((~0ULL % __b + 1) * __p) + __b - 1) / __b; \ | ||
101 | /* compute __res = __m*(~0ULL/__b*__b-1)/(__p << 64) */ \ | ||
102 | __x = ~0ULL / __b * __b - 1; \ | ||
103 | __res = (__m & 0xffffffff) * (__x & 0xffffffff); \ | ||
104 | __res >>= 32; \ | ||
105 | __res += (__m & 0xffffffff) * (__x >> 32); \ | ||
106 | __t = __res; \ | ||
107 | __res += (__x & 0xffffffff) * (__m >> 32); \ | ||
108 | __t = (__res < __t) ? (1ULL << 32) : 0; \ | ||
109 | __res = (__res >> 32) + __t; \ | ||
110 | __res += (__m >> 32) * (__x >> 32); \ | ||
111 | __res /= __p; \ | ||
112 | /* Now sanitize and optimize what we've got. */ \ | ||
113 | if (~0ULL % (__b / (__b & -__b)) == 0) { \ | ||
114 | /* those cases can be simplified with: */ \ | ||
115 | __n /= (__b & -__b); \ | ||
116 | __m = ~0ULL / (__b / (__b & -__b)); \ | ||
117 | __p = 1; \ | ||
118 | __c = 1; \ | ||
119 | } else if (__res != __x / __b) { \ | ||
120 | /* We can't get away without a correction */ \ | ||
121 | /* to compensate for bit truncation errors. */ \ | ||
122 | /* To avoid it we'd need an additional bit */ \ | ||
123 | /* to represent __m which would overflow it. */ \ | ||
124 | /* Instead we do m=p/b and n/b=(n*m+m)/p. */ \ | ||
125 | __c = 1; \ | ||
126 | /* Compute __m = (__p << 64) / __b */ \ | ||
127 | __m = (~0ULL / __b) * __p; \ | ||
128 | __m += ((~0ULL % __b + 1) * __p) / __b; \ | ||
129 | } else { \ | ||
130 | /* Reduce __m/__p, and try to clear bit 31 */ \ | ||
131 | /* of __m when possible otherwise that'll */ \ | ||
132 | /* need extra overflow handling later. */ \ | ||
133 | unsigned int __bits = -(__m & -__m); \ | ||
134 | __bits |= __m >> 32; \ | ||
135 | __bits = (~__bits) << 1; \ | ||
136 | /* If __bits == 0 then setting bit 31 is */ \ | ||
137 | /* unavoidable. Simply apply the maximum */ \ | ||
138 | /* possible reduction in that case. */ \ | ||
139 | /* Otherwise the MSB of __bits indicates the */ \ | ||
140 | /* best reduction we should apply. */ \ | ||
141 | if (!__bits) { \ | ||
142 | __p /= (__m & -__m); \ | ||
143 | __m /= (__m & -__m); \ | ||
144 | } else { \ | ||
145 | __p >>= __div64_fls(__bits); \ | ||
146 | __m >>= __div64_fls(__bits); \ | ||
147 | } \ | ||
148 | /* No correction needed. */ \ | ||
149 | __c = 0; \ | ||
150 | } \ | ||
151 | /* Now we have a combination of 2 conditions: */ \ | ||
152 | /* 1) whether or not we need a correction (__c), and */ \ | ||
153 | /* 2) whether or not there might be an overflow in */ \ | ||
154 | /* the cross product (__m & ((1<<63) | (1<<31))) */ \ | ||
155 | /* Select the best insn combination to perform the */ \ | ||
156 | /* actual __m * __n / (__p << 64) operation. */ \ | ||
157 | if (!__c) { \ | ||
158 | asm ( "umull %Q0, %R0, %1, %Q2\n\t" \ | ||
159 | "mov %Q0, #0" \ | ||
160 | : "=&r" (__res) \ | ||
161 | : "r" (__m), "r" (__n) \ | ||
162 | : "cc" ); \ | ||
163 | } else if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { \ | ||
164 | __res = __m; \ | ||
165 | asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" \ | ||
166 | "mov %Q0, #0" \ | ||
167 | : "+r" (__res) \ | ||
168 | : "r" (__m), "r" (__n) \ | ||
169 | : "cc" ); \ | ||
170 | } else { \ | ||
171 | asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" \ | ||
172 | "cmn %Q0, %Q1\n\t" \ | ||
173 | "adcs %R0, %R0, %R1\n\t" \ | ||
174 | "adc %Q0, %3, #0" \ | ||
175 | : "=&r" (__res) \ | ||
176 | : "r" (__m), "r" (__n), "r" (__z) \ | ||
177 | : "cc" ); \ | ||
178 | } \ | ||
179 | if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { \ | ||
180 | asm ( "umlal %R0, %Q0, %R1, %Q2\n\t" \ | ||
181 | "umlal %R0, %Q0, %Q1, %R2\n\t" \ | ||
182 | "mov %R0, #0\n\t" \ | ||
183 | "umlal %Q0, %R0, %R1, %R2" \ | ||
184 | : "+r" (__res) \ | ||
185 | : "r" (__m), "r" (__n) \ | ||
186 | : "cc" ); \ | ||
187 | } else { \ | ||
188 | asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" \ | ||
189 | "umlal %R0, %1, %Q2, %R3\n\t" \ | ||
190 | "mov %R0, #0\n\t" \ | ||
191 | "adds %Q0, %1, %Q0\n\t" \ | ||
192 | "adc %R0, %R0, #0\n\t" \ | ||
193 | "umlal %Q0, %R0, %R2, %R3" \ | ||
194 | : "+r" (__res), "+r" (__z) \ | ||
195 | : "r" (__m), "r" (__n) \ | ||
196 | : "cc" ); \ | ||
197 | } \ | ||
198 | __res /= __p; \ | ||
199 | /* The reminder can be computed with 32-bit regs */ \ | ||
200 | /* only, and gcc is good at that. */ \ | ||
201 | { \ | ||
202 | unsigned int __res0 = __res; \ | ||
203 | unsigned int __b0 = __b; \ | ||
204 | __r -= __res0 * __b0; \ | ||
205 | } \ | ||
206 | /* BUG_ON(__r >= __b || __res * __b + __r != n); */ \ | ||
207 | n = __res; \ | ||
208 | } \ | ||
209 | __r; \ | ||
210 | }) | ||
211 | |||
212 | /* our own fls implementation to make sure constant propagation is fine */ | ||
213 | #define __div64_fls(bits) \ | ||
214 | ({ \ | ||
215 | unsigned int __left = (bits), __nr = 0; \ | ||
216 | if (__left & 0xffff0000) __nr += 16, __left >>= 16; \ | ||
217 | if (__left & 0x0000ff00) __nr += 8, __left >>= 8; \ | ||
218 | if (__left & 0x000000f0) __nr += 4, __left >>= 4; \ | ||
219 | if (__left & 0x0000000c) __nr += 2, __left >>= 2; \ | ||
220 | if (__left & 0x00000002) __nr += 1; \ | ||
221 | __nr; \ | ||
222 | }) | ||
223 | |||
224 | #endif | ||
225 | |||
48 | #endif | 226 | #endif |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 91d536c215d7..d9bfb39adabf 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -215,6 +215,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
215 | * virt_addr_valid(k) indicates whether a virtual address is valid | 215 | * virt_addr_valid(k) indicates whether a virtual address is valid |
216 | */ | 216 | */ |
217 | #ifndef CONFIG_DISCONTIGMEM | 217 | #ifndef CONFIG_DISCONTIGMEM |
218 | |||
218 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET | 219 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET |
219 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | 220 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) |
220 | 221 | ||
@@ -230,6 +231,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
230 | * around in memory. | 231 | * around in memory. |
231 | */ | 232 | */ |
232 | #include <linux/numa.h> | 233 | #include <linux/numa.h> |
234 | |||
233 | #define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) | 235 | #define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) |
234 | #define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) | 236 | #define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) |
235 | 237 | ||
@@ -256,6 +258,43 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
256 | */ | 258 | */ |
257 | #define PHYS_TO_NID(addr) PFN_TO_NID((addr) >> PAGE_SHIFT) | 259 | #define PHYS_TO_NID(addr) PFN_TO_NID((addr) >> PAGE_SHIFT) |
258 | 260 | ||
261 | /* | ||
262 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
263 | * and returns the mem_map of that node. | ||
264 | */ | ||
265 | #define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
266 | |||
267 | /* | ||
268 | * Given a page frame number, find the owning node of the memory | ||
269 | * and returns the mem_map of that node. | ||
270 | */ | ||
271 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
272 | |||
273 | #ifdef NODE_MEM_SIZE_BITS | ||
274 | #define NODE_MEM_SIZE_MASK ((1 << NODE_MEM_SIZE_BITS) - 1) | ||
275 | |||
276 | /* | ||
277 | * Given a kernel address, find the home node of the underlying memory. | ||
278 | */ | ||
279 | #define KVADDR_TO_NID(addr) \ | ||
280 | (((unsigned long)(addr) - PAGE_OFFSET) >> NODE_MEM_SIZE_BITS) | ||
281 | |||
282 | /* | ||
283 | * Given a page frame number, convert it to a node id. | ||
284 | */ | ||
285 | #define PFN_TO_NID(pfn) \ | ||
286 | (((pfn) - PHYS_PFN_OFFSET) >> (NODE_MEM_SIZE_BITS - PAGE_SHIFT)) | ||
287 | |||
288 | /* | ||
289 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | ||
290 | * and returns the index corresponding to the appropriate page in the | ||
291 | * node's mem_map. | ||
292 | */ | ||
293 | #define LOCAL_MAP_NR(addr) \ | ||
294 | (((unsigned long)(addr) & NODE_MEM_SIZE_MASK) >> PAGE_SHIFT) | ||
295 | |||
296 | #endif /* NODE_MEM_SIZE_BITS */ | ||
297 | |||
259 | #endif /* !CONFIG_DISCONTIGMEM */ | 298 | #endif /* !CONFIG_DISCONTIGMEM */ |
260 | 299 | ||
261 | /* | 300 | /* |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_pdc.h b/include/asm-avr32/arch-at32ap/at91_pdc.h index ce1150d4438d..79d6e02fa45e 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_pdc.h +++ b/include/asm-avr32/arch-at32ap/at91_pdc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_pdc.h | 2 | * include/asm-arm/arch-at91rm9200/at91_pdc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -13,8 +13,8 @@ | |||
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef AT91RM9200_PDC_H | 16 | #ifndef AT91_PDC_H |
17 | #define AT91RM9200_PDC_H | 17 | #define AT91_PDC_H |
18 | 18 | ||
19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ | 19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ |
20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ | 20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ |