added dmabounce debug code to ixp4xx
[openwrt.git] / target / linux / at91 / patches-2.6.22 / 000-at91.patch
1 diff -urN linux-2.6.22-rc5/arch/arm/boot/compressed/head-at91rm9200.S linux-2.6.22-rc5.new/arch/arm/boot/compressed/head-at91rm9200.S
2 --- linux-2.6.22-rc5/arch/arm/boot/compressed/head-at91rm9200.S 2007-06-17 04:09:12.000000000 +0200
3 +++ linux-2.6.22-rc5.new/arch/arm/boot/compressed/head-at91rm9200.S 2007-07-29 05:23:04.000000000 +0200
4 @@ -73,6 +73,12 @@
5 cmp r7, r3
6 beq 99f
7
8 + @ Promwad Chub : 1181
9 + mov r3, #(MACH_TYPE_CHUB & 0xff)
10 + orr r3, r3, #(MACH_TYPE_CHUB & 0xff00)
11 + cmp r7, r3
12 + beq 99f
13 +
14 @ Unknown board, use the AT91RM9200DK board
15 @ mov r7, #MACH_TYPE_AT91RM9200
16 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff)
17 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9260ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9260ek_defconfig
18 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9260ek_defconfig 2007-06-17 04:09:12.000000000 +0200
19 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9260ek_defconfig 2007-07-29 05:23:04.000000000 +0200
20 @@ -1,18 +1,24 @@
21 #
22 # Automatically generated make config: don't edit
23 -# Linux kernel version: 2.6.19-rc6
24 -# Fri Nov 17 18:42:21 2006
25 +# Linux kernel version: 2.6.21
26 +# Mon May 7 11:42:02 2007
27 #
28 CONFIG_ARM=y
29 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
30 +CONFIG_GENERIC_GPIO=y
31 # CONFIG_GENERIC_TIME is not set
32 CONFIG_MMU=y
33 +# CONFIG_NO_IOPORT is not set
34 CONFIG_GENERIC_HARDIRQS=y
35 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
36 CONFIG_HARDIRQS_SW_RESEND=y
37 CONFIG_GENERIC_IRQ_PROBE=y
38 CONFIG_RWSEM_GENERIC_SPINLOCK=y
39 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
40 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
41 CONFIG_GENERIC_HWEIGHT=y
42 CONFIG_GENERIC_CALIBRATE_DELAY=y
43 +CONFIG_ZONE_DMA=y
44 CONFIG_VECTORS_BASE=0xffff0000
45 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46
47 @@ -31,13 +37,16 @@
48 # CONFIG_SWAP is not set
49 CONFIG_SYSVIPC=y
50 # CONFIG_IPC_NS is not set
51 +CONFIG_SYSVIPC_SYSCTL=y
52 # CONFIG_POSIX_MQUEUE is not set
53 # CONFIG_BSD_PROCESS_ACCT is not set
54 # CONFIG_TASKSTATS is not set
55 # CONFIG_UTS_NS is not set
56 # CONFIG_AUDIT is not set
57 # CONFIG_IKCONFIG is not set
58 +CONFIG_SYSFS_DEPRECATED=y
59 # CONFIG_RELAY is not set
60 +CONFIG_BLK_DEV_INITRD=y
61 CONFIG_INITRAMFS_SOURCE=""
62 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
63 CONFIG_SYSCTL=y
64 @@ -76,7 +85,9 @@
65 # Block layer
66 #
67 CONFIG_BLOCK=y
68 +# CONFIG_LBD is not set
69 # CONFIG_BLK_DEV_IO_TRACE is not set
70 +# CONFIG_LSF is not set
71
72 #
73 # IO Schedulers
74 @@ -110,10 +121,12 @@
75 # CONFIG_ARCH_IMX is not set
76 # CONFIG_ARCH_IOP32X is not set
77 # CONFIG_ARCH_IOP33X is not set
78 +# CONFIG_ARCH_IOP13XX is not set
79 # CONFIG_ARCH_IXP4XX is not set
80 # CONFIG_ARCH_IXP2000 is not set
81 # CONFIG_ARCH_IXP23XX is not set
82 # CONFIG_ARCH_L7200 is not set
83 +# CONFIG_ARCH_NS9XXX is not set
84 # CONFIG_ARCH_PNX4008 is not set
85 # CONFIG_ARCH_PXA is not set
86 # CONFIG_ARCH_RPC is not set
87 @@ -129,21 +142,29 @@
88 # CONFIG_ARCH_AT91RM9200 is not set
89 CONFIG_ARCH_AT91SAM9260=y
90 # CONFIG_ARCH_AT91SAM9261 is not set
91 +# CONFIG_ARCH_AT91SAM9263 is not set
92 +
93 +#
94 +# AT91SAM9260 Variants
95 +#
96 +# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
97
98 #
99 -# AT91SAM9260 Board Type
100 +# AT91SAM9260 / AT91SAM9XE Board Type
101 #
102 CONFIG_MACH_AT91SAM9260EK=y
103
104 #
105 # AT91 Board Options
106 #
107 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
108 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
109
110 #
111 # AT91 Feature Selections
112 #
113 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
114 +# CONFIG_ATMEL_TCLIB is not set
115
116 #
117 # Processor Type
118 @@ -166,6 +187,7 @@
119 # CONFIG_CPU_DCACHE_DISABLE is not set
120 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
121 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
122 +# CONFIG_OUTER_CACHE is not set
123
124 #
125 # Bus support
126 @@ -193,6 +215,7 @@
127 # CONFIG_SPARSEMEM_STATIC is not set
128 CONFIG_SPLIT_PTLOCK_CPUS=4096
129 # CONFIG_RESOURCES_64BIT is not set
130 +CONFIG_ZONE_DMA_FLAG=1
131 # CONFIG_LEDS is not set
132 CONFIG_ALIGNMENT_TRAP=y
133
134 @@ -203,6 +226,7 @@
135 CONFIG_ZBOOT_ROM_BSS=0x0
136 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
137 # CONFIG_XIP_KERNEL is not set
138 +# CONFIG_KEXEC is not set
139
140 #
141 # Floating point emulation
142 @@ -228,7 +252,6 @@
143 # Power management options
144 #
145 # CONFIG_PM is not set
146 -# CONFIG_APM is not set
147
148 #
149 # Networking
150 @@ -242,9 +265,6 @@
151 CONFIG_PACKET=y
152 # CONFIG_PACKET_MMAP is not set
153 CONFIG_UNIX=y
154 -CONFIG_XFRM=y
155 -# CONFIG_XFRM_USER is not set
156 -# CONFIG_XFRM_SUB_POLICY is not set
157 # CONFIG_NET_KEY is not set
158 CONFIG_INET=y
159 # CONFIG_IP_MULTICAST is not set
160 @@ -263,14 +283,15 @@
161 # CONFIG_INET_IPCOMP is not set
162 # CONFIG_INET_XFRM_TUNNEL is not set
163 # CONFIG_INET_TUNNEL is not set
164 -CONFIG_INET_XFRM_MODE_TRANSPORT=y
165 -CONFIG_INET_XFRM_MODE_TUNNEL=y
166 -CONFIG_INET_XFRM_MODE_BEET=y
167 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
168 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
169 +# CONFIG_INET_XFRM_MODE_BEET is not set
170 CONFIG_INET_DIAG=y
171 CONFIG_INET_TCP_DIAG=y
172 # CONFIG_TCP_CONG_ADVANCED is not set
173 CONFIG_TCP_CONG_CUBIC=y
174 CONFIG_DEFAULT_TCP_CONG="cubic"
175 +# CONFIG_TCP_MD5SIG is not set
176 # CONFIG_IPV6 is not set
177 # CONFIG_INET6_XFRM_TUNNEL is not set
178 # CONFIG_INET6_TUNNEL is not set
179 @@ -328,6 +349,7 @@
180 CONFIG_PREVENT_FIRMWARE_BUILD=y
181 # CONFIG_FW_LOADER is not set
182 # CONFIG_DEBUG_DRIVER is not set
183 +# CONFIG_DEBUG_DEVRES is not set
184 # CONFIG_SYS_HYPERVISOR is not set
185
186 #
187 @@ -348,6 +370,7 @@
188 #
189 # Plug and Play support
190 #
191 +# CONFIG_PNPACPI is not set
192
193 #
194 # Block devices
195 @@ -360,7 +383,6 @@
196 CONFIG_BLK_DEV_RAM_COUNT=16
197 CONFIG_BLK_DEV_RAM_SIZE=8192
198 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
199 -CONFIG_BLK_DEV_INITRD=y
200 # CONFIG_CDROM_PKTCDVD is not set
201 # CONFIG_ATA_OVER_ETH is not set
202
203 @@ -369,6 +391,7 @@
204 #
205 # CONFIG_RAID_ATTRS is not set
206 CONFIG_SCSI=y
207 +# CONFIG_SCSI_TGT is not set
208 # CONFIG_SCSI_NETLINK is not set
209 CONFIG_SCSI_PROC_FS=y
210
211 @@ -388,6 +411,7 @@
212 CONFIG_SCSI_MULTI_LUN=y
213 # CONFIG_SCSI_CONSTANTS is not set
214 # CONFIG_SCSI_LOGGING is not set
215 +# CONFIG_SCSI_SCAN_ASYNC is not set
216
217 #
218 # SCSI Transports
219 @@ -405,6 +429,11 @@
220 # CONFIG_SCSI_DEBUG is not set
221
222 #
223 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
224 +#
225 +# CONFIG_ATA is not set
226 +
227 +#
228 # Multi-device support (RAID and LVM)
229 #
230 # CONFIG_MD is not set
231 @@ -425,7 +454,51 @@
232 #
233 # Network device support
234 #
235 -# CONFIG_NETDEVICES is not set
236 +CONFIG_NETDEVICES=y
237 +# CONFIG_DUMMY is not set
238 +# CONFIG_BONDING is not set
239 +# CONFIG_EQUALIZER is not set
240 +# CONFIG_TUN is not set
241 +
242 +#
243 +# PHY device support
244 +#
245 +# CONFIG_PHYLIB is not set
246 +
247 +#
248 +# Ethernet (10 or 100Mbit)
249 +#
250 +CONFIG_NET_ETHERNET=y
251 +CONFIG_MII=y
252 +CONFIG_MACB=y
253 +# CONFIG_SMC91X is not set
254 +# CONFIG_DM9000 is not set
255 +
256 +#
257 +# Ethernet (1000 Mbit)
258 +#
259 +
260 +#
261 +# Ethernet (10000 Mbit)
262 +#
263 +
264 +#
265 +# Token Ring devices
266 +#
267 +
268 +#
269 +# Wireless LAN (non-hamradio)
270 +#
271 +# CONFIG_NET_RADIO is not set
272 +
273 +#
274 +# Wan interfaces
275 +#
276 +# CONFIG_WAN is not set
277 +# CONFIG_PPP is not set
278 +# CONFIG_SLIP is not set
279 +# CONFIG_SHAPER is not set
280 +# CONFIG_NETCONSOLE is not set
281 # CONFIG_NETPOLL is not set
282 # CONFIG_NET_POLL_CONTROLLER is not set
283
284 @@ -517,10 +590,6 @@
285 # CONFIG_NVRAM is not set
286 # CONFIG_DTLK is not set
287 # CONFIG_R3964 is not set
288 -
289 -#
290 -# Ftape, the floppy tape device driver
291 -#
292 # CONFIG_RAW_DRIVER is not set
293
294 #
295 @@ -553,7 +622,11 @@
296 #
297 # Misc devices
298 #
299 -# CONFIG_TIFM_CORE is not set
300 +
301 +#
302 +# Multifunction device drivers
303 +#
304 +# CONFIG_MFD_SM501 is not set
305
306 #
307 # LED devices
308 @@ -582,7 +655,7 @@
309 #
310 # Graphics support
311 #
312 -# CONFIG_FIRMWARE_EDID is not set
313 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
314 # CONFIG_FB is not set
315
316 #
317 @@ -590,7 +663,6 @@
318 #
319 # CONFIG_VGA_CONSOLE is not set
320 CONFIG_DUMMY_CONSOLE=y
321 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
322
323 #
324 # Sound
325 @@ -598,6 +670,12 @@
326 # CONFIG_SOUND is not set
327
328 #
329 +# HID Devices
330 +#
331 +CONFIG_HID=y
332 +# CONFIG_HID_DEBUG is not set
333 +
334 +#
335 # USB support
336 #
337 CONFIG_USB_ARCH_HAS_HCD=y
338 @@ -610,7 +688,6 @@
339 # Miscellaneous USB options
340 #
341 CONFIG_USB_DEVICEFS=y
342 -# CONFIG_USB_BANDWIDTH is not set
343 # CONFIG_USB_DYNAMIC_MINORS is not set
344 # CONFIG_USB_OTG is not set
345
346 @@ -619,7 +696,8 @@
347 #
348 # CONFIG_USB_ISP116X_HCD is not set
349 CONFIG_USB_OHCI_HCD=y
350 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
351 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
352 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
353 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
354 # CONFIG_USB_SL811_HCD is not set
355
356 @@ -671,6 +749,7 @@
357 # CONFIG_USB_ATI_REMOTE2 is not set
358 # CONFIG_USB_KEYSPAN_REMOTE is not set
359 # CONFIG_USB_APPLETOUCH is not set
360 +# CONFIG_USB_GTCO is not set
361
362 #
363 # USB Imaging devices
364 @@ -708,6 +787,7 @@
365 # CONFIG_USB_RIO500 is not set
366 # CONFIG_USB_LEGOTOWER is not set
367 # CONFIG_USB_LCD is not set
368 +# CONFIG_USB_BERRY_CHARGE is not set
369 # CONFIG_USB_LED is not set
370 # CONFIG_USB_CYPRESS_CY7C63 is not set
371 # CONFIG_USB_CYTHERM is not set
372 @@ -717,6 +797,7 @@
373 # CONFIG_USB_APPLEDISPLAY is not set
374 # CONFIG_USB_LD is not set
375 # CONFIG_USB_TRANCEVIBRATOR is not set
376 +# CONFIG_USB_IOWARRIOR is not set
377 # CONFIG_USB_TEST is not set
378
379 #
380 @@ -889,6 +970,11 @@
381 # CONFIG_NLS_UTF8 is not set
382
383 #
384 +# Distributed Lock Manager
385 +#
386 +# CONFIG_DLM is not set
387 +
388 +#
389 # Profiling support
390 #
391 # CONFIG_PROFILING is not set
392 @@ -900,28 +986,30 @@
393 CONFIG_ENABLE_MUST_CHECK=y
394 # CONFIG_MAGIC_SYSRQ is not set
395 # CONFIG_UNUSED_SYMBOLS is not set
396 +# CONFIG_DEBUG_FS is not set
397 +# CONFIG_HEADERS_CHECK is not set
398 CONFIG_DEBUG_KERNEL=y
399 +# CONFIG_DEBUG_SHIRQ is not set
400 CONFIG_LOG_BUF_SHIFT=14
401 CONFIG_DETECT_SOFTLOCKUP=y
402 # CONFIG_SCHEDSTATS is not set
403 +# CONFIG_TIMER_STATS is not set
404 # CONFIG_DEBUG_SLAB is not set
405 # CONFIG_DEBUG_RT_MUTEXES is not set
406 # CONFIG_RT_MUTEX_TESTER is not set
407 # CONFIG_DEBUG_SPINLOCK is not set
408 # CONFIG_DEBUG_MUTEXES is not set
409 -# CONFIG_DEBUG_RWSEMS is not set
410 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
411 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
412 # CONFIG_DEBUG_KOBJECT is not set
413 CONFIG_DEBUG_BUGVERBOSE=y
414 # CONFIG_DEBUG_INFO is not set
415 -# CONFIG_DEBUG_FS is not set
416 # CONFIG_DEBUG_VM is not set
417 # CONFIG_DEBUG_LIST is not set
418 CONFIG_FRAME_POINTER=y
419 CONFIG_FORCED_INLINING=y
420 -# CONFIG_HEADERS_CHECK is not set
421 # CONFIG_RCU_TORTURE_TEST is not set
422 +# CONFIG_FAULT_INJECTION is not set
423 CONFIG_DEBUG_USER=y
424 # CONFIG_DEBUG_ERRORS is not set
425 CONFIG_DEBUG_LL=y
426 @@ -941,9 +1029,12 @@
427 #
428 # Library routines
429 #
430 +CONFIG_BITREVERSE=y
431 # CONFIG_CRC_CCITT is not set
432 # CONFIG_CRC16 is not set
433 CONFIG_CRC32=y
434 # CONFIG_LIBCRC32C is not set
435 CONFIG_ZLIB_INFLATE=y
436 CONFIG_PLIST=y
437 +CONFIG_HAS_IOMEM=y
438 +CONFIG_HAS_IOPORT=y
439 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9261ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9261ek_defconfig
440 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9261ek_defconfig 2007-06-17 04:09:12.000000000 +0200
441 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9261ek_defconfig 2007-07-29 05:23:04.000000000 +0200
442 @@ -1,18 +1,24 @@
443 #
444 # Automatically generated make config: don't edit
445 -# Linux kernel version: 2.6.19-rc6
446 -# Fri Nov 17 18:00:38 2006
447 +# Linux kernel version: 2.6.21
448 +# Mon May 7 11:42:30 2007
449 #
450 CONFIG_ARM=y
451 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
452 +CONFIG_GENERIC_GPIO=y
453 # CONFIG_GENERIC_TIME is not set
454 CONFIG_MMU=y
455 +# CONFIG_NO_IOPORT is not set
456 CONFIG_GENERIC_HARDIRQS=y
457 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
458 CONFIG_HARDIRQS_SW_RESEND=y
459 CONFIG_GENERIC_IRQ_PROBE=y
460 CONFIG_RWSEM_GENERIC_SPINLOCK=y
461 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
462 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
463 CONFIG_GENERIC_HWEIGHT=y
464 CONFIG_GENERIC_CALIBRATE_DELAY=y
465 +CONFIG_ZONE_DMA=y
466 CONFIG_VECTORS_BASE=0xffff0000
467 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
468
469 @@ -31,13 +37,16 @@
470 # CONFIG_SWAP is not set
471 CONFIG_SYSVIPC=y
472 # CONFIG_IPC_NS is not set
473 +CONFIG_SYSVIPC_SYSCTL=y
474 # CONFIG_POSIX_MQUEUE is not set
475 # CONFIG_BSD_PROCESS_ACCT is not set
476 # CONFIG_TASKSTATS is not set
477 # CONFIG_UTS_NS is not set
478 # CONFIG_AUDIT is not set
479 # CONFIG_IKCONFIG is not set
480 +CONFIG_SYSFS_DEPRECATED=y
481 # CONFIG_RELAY is not set
482 +CONFIG_BLK_DEV_INITRD=y
483 CONFIG_INITRAMFS_SOURCE=""
484 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
485 CONFIG_SYSCTL=y
486 @@ -76,7 +85,9 @@
487 # Block layer
488 #
489 CONFIG_BLOCK=y
490 +# CONFIG_LBD is not set
491 # CONFIG_BLK_DEV_IO_TRACE is not set
492 +# CONFIG_LSF is not set
493
494 #
495 # IO Schedulers
496 @@ -110,10 +121,12 @@
497 # CONFIG_ARCH_IMX is not set
498 # CONFIG_ARCH_IOP32X is not set
499 # CONFIG_ARCH_IOP33X is not set
500 +# CONFIG_ARCH_IOP13XX is not set
501 # CONFIG_ARCH_IXP4XX is not set
502 # CONFIG_ARCH_IXP2000 is not set
503 # CONFIG_ARCH_IXP23XX is not set
504 # CONFIG_ARCH_L7200 is not set
505 +# CONFIG_ARCH_NS9XXX is not set
506 # CONFIG_ARCH_PNX4008 is not set
507 # CONFIG_ARCH_PXA is not set
508 # CONFIG_ARCH_RPC is not set
509 @@ -129,6 +142,7 @@
510 # CONFIG_ARCH_AT91RM9200 is not set
511 # CONFIG_ARCH_AT91SAM9260 is not set
512 CONFIG_ARCH_AT91SAM9261=y
513 +# CONFIG_ARCH_AT91SAM9263 is not set
514
515 #
516 # AT91SAM9261 Board Type
517 @@ -138,12 +152,14 @@
518 #
519 # AT91 Board Options
520 #
521 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
522 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
523
524 #
525 # AT91 Feature Selections
526 #
527 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
528 +# CONFIG_ATMEL_TCLIB is not set
529
530 #
531 # Processor Type
532 @@ -166,6 +182,7 @@
533 # CONFIG_CPU_DCACHE_DISABLE is not set
534 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
535 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
536 +# CONFIG_OUTER_CACHE is not set
537
538 #
539 # Bus support
540 @@ -193,6 +210,7 @@
541 # CONFIG_SPARSEMEM_STATIC is not set
542 CONFIG_SPLIT_PTLOCK_CPUS=4096
543 # CONFIG_RESOURCES_64BIT is not set
544 +CONFIG_ZONE_DMA_FLAG=1
545 # CONFIG_LEDS is not set
546 CONFIG_ALIGNMENT_TRAP=y
547
548 @@ -203,6 +221,7 @@
549 CONFIG_ZBOOT_ROM_BSS=0x0
550 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
551 # CONFIG_XIP_KERNEL is not set
552 +# CONFIG_KEXEC is not set
553
554 #
555 # Floating point emulation
556 @@ -228,7 +247,6 @@
557 # Power management options
558 #
559 # CONFIG_PM is not set
560 -# CONFIG_APM is not set
561
562 #
563 # Networking
564 @@ -245,6 +263,7 @@
565 CONFIG_XFRM=y
566 # CONFIG_XFRM_USER is not set
567 # CONFIG_XFRM_SUB_POLICY is not set
568 +# CONFIG_XFRM_MIGRATE is not set
569 # CONFIG_NET_KEY is not set
570 CONFIG_INET=y
571 # CONFIG_IP_MULTICAST is not set
572 @@ -271,6 +290,7 @@
573 # CONFIG_TCP_CONG_ADVANCED is not set
574 CONFIG_TCP_CONG_CUBIC=y
575 CONFIG_DEFAULT_TCP_CONG="cubic"
576 +# CONFIG_TCP_MD5SIG is not set
577 # CONFIG_IPV6 is not set
578 # CONFIG_INET6_XFRM_TUNNEL is not set
579 # CONFIG_INET6_TUNNEL is not set
580 @@ -328,6 +348,7 @@
581 CONFIG_PREVENT_FIRMWARE_BUILD=y
582 # CONFIG_FW_LOADER is not set
583 # CONFIG_DEBUG_DRIVER is not set
584 +# CONFIG_DEBUG_DEVRES is not set
585 # CONFIG_SYS_HYPERVISOR is not set
586
587 #
588 @@ -350,6 +371,7 @@
589 # User Modules And Translation Layers
590 #
591 # CONFIG_MTD_CHAR is not set
592 +CONFIG_MTD_BLKDEVS=y
593 CONFIG_MTD_BLOCK=y
594 # CONFIG_FTL is not set
595 # CONFIG_NFTL is not set
596 @@ -386,6 +408,8 @@
597 #
598 # Self-contained MTD device drivers
599 #
600 +# CONFIG_MTD_DATAFLASH is not set
601 +# CONFIG_MTD_M25P80 is not set
602 # CONFIG_MTD_SLRAM is not set
603 # CONFIG_MTD_PHRAM is not set
604 # CONFIG_MTD_MTDRAM is not set
605 @@ -422,6 +446,7 @@
606 #
607 # Plug and Play support
608 #
609 +# CONFIG_PNPACPI is not set
610
611 #
612 # Block devices
613 @@ -434,7 +459,6 @@
614 CONFIG_BLK_DEV_RAM_COUNT=16
615 CONFIG_BLK_DEV_RAM_SIZE=8192
616 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
617 -CONFIG_BLK_DEV_INITRD=y
618 # CONFIG_CDROM_PKTCDVD is not set
619 # CONFIG_ATA_OVER_ETH is not set
620
621 @@ -443,6 +467,7 @@
622 #
623 # CONFIG_RAID_ATTRS is not set
624 CONFIG_SCSI=y
625 +# CONFIG_SCSI_TGT is not set
626 # CONFIG_SCSI_NETLINK is not set
627 CONFIG_SCSI_PROC_FS=y
628
629 @@ -462,6 +487,7 @@
630 CONFIG_SCSI_MULTI_LUN=y
631 # CONFIG_SCSI_CONSTANTS is not set
632 # CONFIG_SCSI_LOGGING is not set
633 +# CONFIG_SCSI_SCAN_ASYNC is not set
634
635 #
636 # SCSI Transports
637 @@ -479,6 +505,11 @@
638 # CONFIG_SCSI_DEBUG is not set
639
640 #
641 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
642 +#
643 +# CONFIG_ATA is not set
644 +
645 +#
646 # Multi-device support (RAID and LVM)
647 #
648 # CONFIG_MD is not set
649 @@ -575,7 +606,16 @@
650 # CONFIG_INPUT_KEYBOARD is not set
651 # CONFIG_INPUT_MOUSE is not set
652 # CONFIG_INPUT_JOYSTICK is not set
653 -# CONFIG_INPUT_TOUCHSCREEN is not set
654 +CONFIG_INPUT_TOUCHSCREEN=y
655 +CONFIG_TOUCHSCREEN_ADS7846=y
656 +# CONFIG_TOUCHSCREEN_GUNZE is not set
657 +# CONFIG_TOUCHSCREEN_ELO is not set
658 +# CONFIG_TOUCHSCREEN_MTOUCH is not set
659 +# CONFIG_TOUCHSCREEN_MK712 is not set
660 +# CONFIG_TOUCHSCREEN_PENMOUNT is not set
661 +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
662 +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
663 +# CONFIG_TOUCHSCREEN_UCB1400 is not set
664 # CONFIG_INPUT_MISC is not set
665
666 #
667 @@ -634,10 +674,6 @@
668 # CONFIG_NVRAM is not set
669 # CONFIG_DTLK is not set
670 # CONFIG_R3964 is not set
671 -
672 -#
673 -# Ftape, the floppy tape device driver
674 -#
675 # CONFIG_RAW_DRIVER is not set
676
677 #
678 @@ -662,6 +698,7 @@
679 # I2C Hardware Bus support
680 #
681 CONFIG_I2C_AT91=y
682 +CONFIG_I2C_AT91_CLOCKRATE=100000
683 # CONFIG_I2C_OCORES is not set
684 # CONFIG_I2C_PARPORT_LIGHT is not set
685 # CONFIG_I2C_STUB is not set
686 @@ -686,8 +723,20 @@
687 #
688 # SPI support
689 #
690 -# CONFIG_SPI is not set
691 -# CONFIG_SPI_MASTER is not set
692 +CONFIG_SPI=y
693 +# CONFIG_SPI_DEBUG is not set
694 +CONFIG_SPI_MASTER=y
695 +
696 +#
697 +# SPI Master Controller Drivers
698 +#
699 +CONFIG_SPI_ATMEL=y
700 +# CONFIG_SPI_BITBANG is not set
701 +
702 +#
703 +# SPI Protocol Masters
704 +#
705 +# CONFIG_SPI_AT25 is not set
706
707 #
708 # Dallas's 1-wire bus
709 @@ -703,7 +752,11 @@
710 #
711 # Misc devices
712 #
713 -# CONFIG_TIFM_CORE is not set
714 +
715 +#
716 +# Multifunction device drivers
717 +#
718 +# CONFIG_MFD_SM501 is not set
719
720 #
721 # LED devices
722 @@ -732,7 +785,7 @@
723 #
724 # Graphics support
725 #
726 -# CONFIG_FIRMWARE_EDID is not set
727 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
728 # CONFIG_FB is not set
729
730 #
731 @@ -740,7 +793,6 @@
732 #
733 # CONFIG_VGA_CONSOLE is not set
734 CONFIG_DUMMY_CONSOLE=y
735 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
736
737 #
738 # Sound
739 @@ -748,6 +800,12 @@
740 # CONFIG_SOUND is not set
741
742 #
743 +# HID Devices
744 +#
745 +CONFIG_HID=y
746 +# CONFIG_HID_DEBUG is not set
747 +
748 +#
749 # USB support
750 #
751 CONFIG_USB_ARCH_HAS_HCD=y
752 @@ -760,7 +818,6 @@
753 # Miscellaneous USB options
754 #
755 CONFIG_USB_DEVICEFS=y
756 -# CONFIG_USB_BANDWIDTH is not set
757 # CONFIG_USB_DYNAMIC_MINORS is not set
758 # CONFIG_USB_OTG is not set
759
760 @@ -769,7 +826,8 @@
761 #
762 # CONFIG_USB_ISP116X_HCD is not set
763 CONFIG_USB_OHCI_HCD=y
764 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
765 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
766 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
767 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
768 # CONFIG_USB_SL811_HCD is not set
769
770 @@ -821,6 +879,7 @@
771 # CONFIG_USB_ATI_REMOTE2 is not set
772 # CONFIG_USB_KEYSPAN_REMOTE is not set
773 # CONFIG_USB_APPLETOUCH is not set
774 +# CONFIG_USB_GTCO is not set
775
776 #
777 # USB Imaging devices
778 @@ -858,6 +917,7 @@
779 # CONFIG_USB_RIO500 is not set
780 # CONFIG_USB_LEGOTOWER is not set
781 # CONFIG_USB_LCD is not set
782 +# CONFIG_USB_BERRY_CHARGE is not set
783 # CONFIG_USB_LED is not set
784 # CONFIG_USB_CYPRESS_CY7C63 is not set
785 # CONFIG_USB_CYTHERM is not set
786 @@ -867,6 +927,7 @@
787 # CONFIG_USB_APPLEDISPLAY is not set
788 # CONFIG_USB_LD is not set
789 # CONFIG_USB_TRANCEVIBRATOR is not set
790 +# CONFIG_USB_IOWARRIOR is not set
791 # CONFIG_USB_TEST is not set
792
793 #
794 @@ -903,7 +964,6 @@
795 # CONFIG_MMC_DEBUG is not set
796 CONFIG_MMC_BLOCK=y
797 CONFIG_MMC_AT91=m
798 -# CONFIG_MMC_TIFM_SD is not set
799
800 #
801 # Real Time Clock
802 @@ -973,7 +1033,6 @@
803 # CONFIG_BEFS_FS is not set
804 # CONFIG_BFS_FS is not set
805 # CONFIG_EFS_FS is not set
806 -# CONFIG_JFFS_FS is not set
807 # CONFIG_JFFS2_FS is not set
808 CONFIG_CRAMFS=y
809 # CONFIG_VXFS_FS is not set
810 @@ -1045,6 +1104,11 @@
811 # CONFIG_NLS_UTF8 is not set
812
813 #
814 +# Distributed Lock Manager
815 +#
816 +# CONFIG_DLM is not set
817 +
818 +#
819 # Profiling support
820 #
821 # CONFIG_PROFILING is not set
822 @@ -1056,28 +1120,30 @@
823 CONFIG_ENABLE_MUST_CHECK=y
824 # CONFIG_MAGIC_SYSRQ is not set
825 # CONFIG_UNUSED_SYMBOLS is not set
826 +# CONFIG_DEBUG_FS is not set
827 +# CONFIG_HEADERS_CHECK is not set
828 CONFIG_DEBUG_KERNEL=y
829 +# CONFIG_DEBUG_SHIRQ is not set
830 CONFIG_LOG_BUF_SHIFT=14
831 CONFIG_DETECT_SOFTLOCKUP=y
832 # CONFIG_SCHEDSTATS is not set
833 +# CONFIG_TIMER_STATS is not set
834 # CONFIG_DEBUG_SLAB is not set
835 # CONFIG_DEBUG_RT_MUTEXES is not set
836 # CONFIG_RT_MUTEX_TESTER is not set
837 # CONFIG_DEBUG_SPINLOCK is not set
838 # CONFIG_DEBUG_MUTEXES is not set
839 -# CONFIG_DEBUG_RWSEMS is not set
840 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
841 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
842 # CONFIG_DEBUG_KOBJECT is not set
843 CONFIG_DEBUG_BUGVERBOSE=y
844 # CONFIG_DEBUG_INFO is not set
845 -# CONFIG_DEBUG_FS is not set
846 # CONFIG_DEBUG_VM is not set
847 # CONFIG_DEBUG_LIST is not set
848 CONFIG_FRAME_POINTER=y
849 CONFIG_FORCED_INLINING=y
850 -# CONFIG_HEADERS_CHECK is not set
851 # CONFIG_RCU_TORTURE_TEST is not set
852 +# CONFIG_FAULT_INJECTION is not set
853 CONFIG_DEBUG_USER=y
854 # CONFIG_DEBUG_ERRORS is not set
855 CONFIG_DEBUG_LL=y
856 @@ -1097,9 +1163,12 @@
857 #
858 # Library routines
859 #
860 +CONFIG_BITREVERSE=y
861 # CONFIG_CRC_CCITT is not set
862 # CONFIG_CRC16 is not set
863 CONFIG_CRC32=y
864 # CONFIG_LIBCRC32C is not set
865 CONFIG_ZLIB_INFLATE=y
866 CONFIG_PLIST=y
867 +CONFIG_HAS_IOMEM=y
868 +CONFIG_HAS_IOPORT=y
869 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9263ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9263ek_defconfig
870 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9263ek_defconfig 2007-06-17 04:09:12.000000000 +0200
871 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9263ek_defconfig 2007-07-29 05:23:04.000000000 +0200
872 @@ -1,11 +1,14 @@
873 #
874 # Automatically generated make config: don't edit
875 -# Linux kernel version: 2.6.20-rc1
876 -# Mon Jan 8 16:06:54 2007
877 +# Linux kernel version: 2.6.21
878 +# Mon May 7 11:42:49 2007
879 #
880 CONFIG_ARM=y
881 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
882 +CONFIG_GENERIC_GPIO=y
883 # CONFIG_GENERIC_TIME is not set
884 CONFIG_MMU=y
885 +# CONFIG_NO_IOPORT is not set
886 CONFIG_GENERIC_HARDIRQS=y
887 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
888 CONFIG_HARDIRQS_SW_RESEND=y
889 @@ -15,6 +18,7 @@
890 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
891 CONFIG_GENERIC_HWEIGHT=y
892 CONFIG_GENERIC_CALIBRATE_DELAY=y
893 +CONFIG_ZONE_DMA=y
894 CONFIG_VECTORS_BASE=0xffff0000
895 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
896
897 @@ -33,6 +37,7 @@
898 # CONFIG_SWAP is not set
899 CONFIG_SYSVIPC=y
900 # CONFIG_IPC_NS is not set
901 +CONFIG_SYSVIPC_SYSCTL=y
902 # CONFIG_POSIX_MQUEUE is not set
903 # CONFIG_BSD_PROCESS_ACCT is not set
904 # CONFIG_TASKSTATS is not set
905 @@ -41,6 +46,7 @@
906 # CONFIG_IKCONFIG is not set
907 CONFIG_SYSFS_DEPRECATED=y
908 # CONFIG_RELAY is not set
909 +CONFIG_BLK_DEV_INITRD=y
910 CONFIG_INITRAMFS_SOURCE=""
911 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
912 CONFIG_SYSCTL=y
913 @@ -120,6 +126,7 @@
914 # CONFIG_ARCH_IXP2000 is not set
915 # CONFIG_ARCH_IXP23XX is not set
916 # CONFIG_ARCH_L7200 is not set
917 +# CONFIG_ARCH_NS9XXX is not set
918 # CONFIG_ARCH_PNX4008 is not set
919 # CONFIG_ARCH_PXA is not set
920 # CONFIG_ARCH_RPC is not set
921 @@ -152,6 +159,7 @@
922 # AT91 Feature Selections
923 #
924 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
925 +# CONFIG_ATMEL_TCLIB is not set
926
927 #
928 # Processor Type
929 @@ -174,6 +182,7 @@
930 # CONFIG_CPU_DCACHE_DISABLE is not set
931 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
932 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
933 +# CONFIG_OUTER_CACHE is not set
934
935 #
936 # Bus support
937 @@ -201,6 +210,7 @@
938 # CONFIG_SPARSEMEM_STATIC is not set
939 CONFIG_SPLIT_PTLOCK_CPUS=4096
940 # CONFIG_RESOURCES_64BIT is not set
941 +CONFIG_ZONE_DMA_FLAG=1
942 # CONFIG_LEDS is not set
943 CONFIG_ALIGNMENT_TRAP=y
944
945 @@ -211,6 +221,7 @@
946 CONFIG_ZBOOT_ROM_BSS=0x0
947 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
948 # CONFIG_XIP_KERNEL is not set
949 +# CONFIG_KEXEC is not set
950
951 #
952 # Floating point emulation
953 @@ -236,7 +247,6 @@
954 # Power management options
955 #
956 # CONFIG_PM is not set
957 -# CONFIG_APM is not set
958
959 #
960 # Networking
961 @@ -333,6 +343,7 @@
962 CONFIG_PREVENT_FIRMWARE_BUILD=y
963 # CONFIG_FW_LOADER is not set
964 # CONFIG_DEBUG_DRIVER is not set
965 +# CONFIG_DEBUG_DEVRES is not set
966 # CONFIG_SYS_HYPERVISOR is not set
967
968 #
969 @@ -430,6 +441,7 @@
970 #
971 # Plug and Play support
972 #
973 +# CONFIG_PNPACPI is not set
974
975 #
976 # Block devices
977 @@ -443,7 +455,6 @@
978 CONFIG_BLK_DEV_RAM_COUNT=16
979 CONFIG_BLK_DEV_RAM_SIZE=8192
980 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
981 -CONFIG_BLK_DEV_INITRD=y
982 # CONFIG_CDROM_PKTCDVD is not set
983 # CONFIG_ATA_OVER_ETH is not set
984
985 @@ -531,6 +542,7 @@
986 #
987 CONFIG_NET_ETHERNET=y
988 CONFIG_MII=y
989 +CONFIG_MACB=y
990 # CONFIG_SMC91X is not set
991 # CONFIG_DM9000 is not set
992
993 @@ -685,6 +697,7 @@
994 # I2C Hardware Bus support
995 #
996 CONFIG_I2C_AT91=y
997 +CONFIG_I2C_AT91_CLOCKRATE=100000
998 # CONFIG_I2C_OCORES is not set
999 # CONFIG_I2C_PARPORT_LIGHT is not set
1000 # CONFIG_I2C_STUB is not set
1001 @@ -722,6 +735,7 @@
1002 #
1003 # SPI Protocol Masters
1004 #
1005 +# CONFIG_SPI_AT25 is not set
1006
1007 #
1008 # Dallas's 1-wire bus
1009 @@ -737,7 +751,11 @@
1010 #
1011 # Misc devices
1012 #
1013 -# CONFIG_TIFM_CORE is not set
1014 +
1015 +#
1016 +# Multifunction device drivers
1017 +#
1018 +# CONFIG_MFD_SM501 is not set
1019
1020 #
1021 # LED devices
1022 @@ -766,15 +784,23 @@
1023 #
1024 # Graphics support
1025 #
1026 -# CONFIG_FIRMWARE_EDID is not set
1027 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1028 CONFIG_FB=y
1029 +# CONFIG_FIRMWARE_EDID is not set
1030 +# CONFIG_FB_DDC is not set
1031 # CONFIG_FB_CFB_FILLRECT is not set
1032 # CONFIG_FB_CFB_COPYAREA is not set
1033 # CONFIG_FB_CFB_IMAGEBLIT is not set
1034 +# CONFIG_FB_SVGALIB is not set
1035 # CONFIG_FB_MACMODES is not set
1036 # CONFIG_FB_BACKLIGHT is not set
1037 # CONFIG_FB_MODE_HELPERS is not set
1038 # CONFIG_FB_TILEBLITTING is not set
1039 +
1040 +#
1041 +# Frame buffer hardware drivers
1042 +#
1043 +# CONFIG_FB_S1D15605 is not set
1044 # CONFIG_FB_S1D13XXX is not set
1045 # CONFIG_FB_VIRTUAL is not set
1046
1047 @@ -789,7 +815,6 @@
1048 # Logo configuration
1049 #
1050 # CONFIG_LOGO is not set
1051 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1052
1053 #
1054 # Sound
1055 @@ -800,6 +825,7 @@
1056 # HID Devices
1057 #
1058 CONFIG_HID=y
1059 +# CONFIG_HID_DEBUG is not set
1060
1061 #
1062 # USB support
1063 @@ -814,9 +840,7 @@
1064 # Miscellaneous USB options
1065 #
1066 CONFIG_USB_DEVICEFS=y
1067 -# CONFIG_USB_BANDWIDTH is not set
1068 # CONFIG_USB_DYNAMIC_MINORS is not set
1069 -# CONFIG_USB_MULTITHREAD_PROBE is not set
1070 # CONFIG_USB_OTG is not set
1071
1072 #
1073 @@ -824,7 +848,8 @@
1074 #
1075 # CONFIG_USB_ISP116X_HCD is not set
1076 CONFIG_USB_OHCI_HCD=y
1077 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
1078 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1079 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1080 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1081 # CONFIG_USB_SL811_HCD is not set
1082
1083 @@ -877,6 +902,7 @@
1084 # CONFIG_USB_ATI_REMOTE2 is not set
1085 # CONFIG_USB_KEYSPAN_REMOTE is not set
1086 # CONFIG_USB_APPLETOUCH is not set
1087 +# CONFIG_USB_GTCO is not set
1088
1089 #
1090 # USB Imaging devices
1091 @@ -914,6 +940,7 @@
1092 # CONFIG_USB_RIO500 is not set
1093 # CONFIG_USB_LEGOTOWER is not set
1094 # CONFIG_USB_LCD is not set
1095 +# CONFIG_USB_BERRY_CHARGE is not set
1096 # CONFIG_USB_LED is not set
1097 # CONFIG_USB_CYPRESS_CY7C63 is not set
1098 # CONFIG_USB_CYTHERM is not set
1099 @@ -923,6 +950,7 @@
1100 # CONFIG_USB_APPLEDISPLAY is not set
1101 # CONFIG_USB_LD is not set
1102 # CONFIG_USB_TRANCEVIBRATOR is not set
1103 +# CONFIG_USB_IOWARRIOR is not set
1104 # CONFIG_USB_TEST is not set
1105
1106 #
1107 @@ -959,7 +987,6 @@
1108 # CONFIG_MMC_DEBUG is not set
1109 CONFIG_MMC_BLOCK=y
1110 CONFIG_MMC_AT91=m
1111 -# CONFIG_MMC_TIFM_SD is not set
1112
1113 #
1114 # Real Time Clock
1115 @@ -1136,15 +1163,16 @@
1116 # CONFIG_DEBUG_FS is not set
1117 # CONFIG_HEADERS_CHECK is not set
1118 CONFIG_DEBUG_KERNEL=y
1119 +# CONFIG_DEBUG_SHIRQ is not set
1120 CONFIG_LOG_BUF_SHIFT=14
1121 CONFIG_DETECT_SOFTLOCKUP=y
1122 # CONFIG_SCHEDSTATS is not set
1123 +# CONFIG_TIMER_STATS is not set
1124 # CONFIG_DEBUG_SLAB is not set
1125 # CONFIG_DEBUG_RT_MUTEXES is not set
1126 # CONFIG_RT_MUTEX_TESTER is not set
1127 # CONFIG_DEBUG_SPINLOCK is not set
1128 # CONFIG_DEBUG_MUTEXES is not set
1129 -# CONFIG_DEBUG_RWSEMS is not set
1130 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1131 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1132 # CONFIG_DEBUG_KOBJECT is not set
1133 @@ -1155,6 +1183,7 @@
1134 CONFIG_FRAME_POINTER=y
1135 CONFIG_FORCED_INLINING=y
1136 # CONFIG_RCU_TORTURE_TEST is not set
1137 +# CONFIG_FAULT_INJECTION is not set
1138 CONFIG_DEBUG_USER=y
1139 # CONFIG_DEBUG_ERRORS is not set
1140 CONFIG_DEBUG_LL=y
1141 @@ -1180,5 +1209,7 @@
1142 CONFIG_CRC32=y
1143 # CONFIG_LIBCRC32C is not set
1144 CONFIG_ZLIB_INFLATE=y
1145 +CONFIG_ZLIB_DEFLATE=y
1146 CONFIG_PLIST=y
1147 -CONFIG_IOMAP_COPY=y
1148 +CONFIG_HAS_IOMEM=y
1149 +CONFIG_HAS_IOPORT=y
1150 diff -urN linux-2.6.22-rc5/arch/arm/configs/cam60_defconfig linux-2.6.22-rc5.new/arch/arm/configs/cam60_defconfig
1151 --- linux-2.6.22-rc5/arch/arm/configs/cam60_defconfig 1970-01-01 01:00:00.000000000 +0100
1152 +++ linux-2.6.22-rc5.new/arch/arm/configs/cam60_defconfig 2007-07-29 05:23:04.000000000 +0200
1153 @@ -0,0 +1,954 @@
1154 +#
1155 +# Automatically generated make config: don't edit
1156 +# Linux kernel version: 2.6.20
1157 +# Tue May 1 21:06:33 2007
1158 +#
1159 +CONFIG_ARM=y
1160 +# CONFIG_GENERIC_TIME is not set
1161 +CONFIG_MMU=y
1162 +CONFIG_GENERIC_HARDIRQS=y
1163 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1164 +CONFIG_HARDIRQS_SW_RESEND=y
1165 +CONFIG_GENERIC_IRQ_PROBE=y
1166 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
1167 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
1168 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
1169 +CONFIG_GENERIC_HWEIGHT=y
1170 +CONFIG_GENERIC_CALIBRATE_DELAY=y
1171 +CONFIG_VECTORS_BASE=0xffff0000
1172 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
1173 +
1174 +#
1175 +# Code maturity level options
1176 +#
1177 +CONFIG_EXPERIMENTAL=y
1178 +CONFIG_BROKEN_ON_SMP=y
1179 +CONFIG_INIT_ENV_ARG_LIMIT=32
1180 +
1181 +#
1182 +# General setup
1183 +#
1184 +CONFIG_LOCALVERSION=""
1185 +# CONFIG_LOCALVERSION_AUTO is not set
1186 +# CONFIG_SWAP is not set
1187 +CONFIG_SYSVIPC=y
1188 +# CONFIG_IPC_NS is not set
1189 +# CONFIG_POSIX_MQUEUE is not set
1190 +# CONFIG_BSD_PROCESS_ACCT is not set
1191 +# CONFIG_TASKSTATS is not set
1192 +# CONFIG_UTS_NS is not set
1193 +# CONFIG_AUDIT is not set
1194 +CONFIG_IKCONFIG=y
1195 +CONFIG_IKCONFIG_PROC=y
1196 +CONFIG_SYSFS_DEPRECATED=y
1197 +# CONFIG_RELAY is not set
1198 +CONFIG_INITRAMFS_SOURCE=""
1199 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
1200 +CONFIG_SYSCTL=y
1201 +# CONFIG_EMBEDDED is not set
1202 +CONFIG_UID16=y
1203 +CONFIG_SYSCTL_SYSCALL=y
1204 +CONFIG_KALLSYMS=y
1205 +# CONFIG_KALLSYMS_ALL is not set
1206 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
1207 +CONFIG_HOTPLUG=y
1208 +CONFIG_PRINTK=y
1209 +CONFIG_BUG=y
1210 +CONFIG_ELF_CORE=y
1211 +CONFIG_BASE_FULL=y
1212 +CONFIG_FUTEX=y
1213 +CONFIG_EPOLL=y
1214 +CONFIG_SHMEM=y
1215 +CONFIG_SLAB=y
1216 +CONFIG_VM_EVENT_COUNTERS=y
1217 +CONFIG_RT_MUTEXES=y
1218 +# CONFIG_TINY_SHMEM is not set
1219 +CONFIG_BASE_SMALL=0
1220 +# CONFIG_SLOB is not set
1221 +
1222 +#
1223 +# Loadable module support
1224 +#
1225 +CONFIG_MODULES=y
1226 +CONFIG_MODULE_UNLOAD=y
1227 +CONFIG_MODULE_FORCE_UNLOAD=y
1228 +# CONFIG_MODVERSIONS is not set
1229 +# CONFIG_MODULE_SRCVERSION_ALL is not set
1230 +# CONFIG_KMOD is not set
1231 +
1232 +#
1233 +# Block layer
1234 +#
1235 +CONFIG_BLOCK=y
1236 +# CONFIG_LBD is not set
1237 +# CONFIG_BLK_DEV_IO_TRACE is not set
1238 +# CONFIG_LSF is not set
1239 +
1240 +#
1241 +# IO Schedulers
1242 +#
1243 +CONFIG_IOSCHED_NOOP=y
1244 +CONFIG_IOSCHED_AS=y
1245 +# CONFIG_IOSCHED_DEADLINE is not set
1246 +# CONFIG_IOSCHED_CFQ is not set
1247 +CONFIG_DEFAULT_AS=y
1248 +# CONFIG_DEFAULT_DEADLINE is not set
1249 +# CONFIG_DEFAULT_CFQ is not set
1250 +# CONFIG_DEFAULT_NOOP is not set
1251 +CONFIG_DEFAULT_IOSCHED="anticipatory"
1252 +
1253 +#
1254 +# System Type
1255 +#
1256 +# CONFIG_ARCH_AAEC2000 is not set
1257 +# CONFIG_ARCH_INTEGRATOR is not set
1258 +# CONFIG_ARCH_REALVIEW is not set
1259 +# CONFIG_ARCH_VERSATILE is not set
1260 +CONFIG_ARCH_AT91=y
1261 +# CONFIG_ARCH_CLPS7500 is not set
1262 +# CONFIG_ARCH_CLPS711X is not set
1263 +# CONFIG_ARCH_CO285 is not set
1264 +# CONFIG_ARCH_EBSA110 is not set
1265 +# CONFIG_ARCH_EP93XX is not set
1266 +# CONFIG_ARCH_FOOTBRIDGE is not set
1267 +# CONFIG_ARCH_NETX is not set
1268 +# CONFIG_ARCH_H720X is not set
1269 +# CONFIG_ARCH_IMX is not set
1270 +# CONFIG_ARCH_IOP32X is not set
1271 +# CONFIG_ARCH_IOP33X is not set
1272 +# CONFIG_ARCH_IOP13XX is not set
1273 +# CONFIG_ARCH_IXP4XX is not set
1274 +# CONFIG_ARCH_IXP2000 is not set
1275 +# CONFIG_ARCH_IXP23XX is not set
1276 +# CONFIG_ARCH_L7200 is not set
1277 +# CONFIG_ARCH_PNX4008 is not set
1278 +# CONFIG_ARCH_PXA is not set
1279 +# CONFIG_ARCH_RPC is not set
1280 +# CONFIG_ARCH_SA1100 is not set
1281 +# CONFIG_ARCH_S3C2410 is not set
1282 +# CONFIG_ARCH_SHARK is not set
1283 +# CONFIG_ARCH_LH7A40X is not set
1284 +# CONFIG_ARCH_OMAP is not set
1285 +
1286 +#
1287 +# Atmel AT91 System-on-Chip
1288 +#
1289 +# CONFIG_ARCH_AT91RM9200 is not set
1290 +CONFIG_ARCH_AT91SAM9260=y
1291 +# CONFIG_ARCH_AT91SAM9261 is not set
1292 +# CONFIG_ARCH_AT91SAM9263 is not set
1293 +
1294 +#
1295 +# AT91SAM9260 Board Type
1296 +#
1297 +# CONFIG_MACH_AT91SAM9260EK is not set
1298 +CONFIG_MACH_CAM60=y
1299 +
1300 +#
1301 +# AT91 Board Options
1302 +#
1303 +
1304 +#
1305 +# AT91 Feature Selections
1306 +#
1307 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
1308 +
1309 +#
1310 +# Processor Type
1311 +#
1312 +CONFIG_CPU_32=y
1313 +CONFIG_CPU_ARM926T=y
1314 +CONFIG_CPU_32v5=y
1315 +CONFIG_CPU_ABRT_EV5TJ=y
1316 +CONFIG_CPU_CACHE_VIVT=y
1317 +CONFIG_CPU_COPY_V4WB=y
1318 +CONFIG_CPU_TLB_V4WBI=y
1319 +CONFIG_CPU_CP15=y
1320 +CONFIG_CPU_CP15_MMU=y
1321 +
1322 +#
1323 +# Processor Features
1324 +#
1325 +# CONFIG_ARM_THUMB is not set
1326 +# CONFIG_CPU_ICACHE_DISABLE is not set
1327 +# CONFIG_CPU_DCACHE_DISABLE is not set
1328 +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
1329 +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
1330 +
1331 +#
1332 +# Bus support
1333 +#
1334 +
1335 +#
1336 +# PCCARD (PCMCIA/CardBus) support
1337 +#
1338 +# CONFIG_PCCARD is not set
1339 +
1340 +#
1341 +# Kernel Features
1342 +#
1343 +# CONFIG_PREEMPT is not set
1344 +# CONFIG_NO_IDLE_HZ is not set
1345 +CONFIG_HZ=100
1346 +# CONFIG_AEABI is not set
1347 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
1348 +CONFIG_SELECT_MEMORY_MODEL=y
1349 +CONFIG_FLATMEM_MANUAL=y
1350 +# CONFIG_DISCONTIGMEM_MANUAL is not set
1351 +# CONFIG_SPARSEMEM_MANUAL is not set
1352 +CONFIG_FLATMEM=y
1353 +CONFIG_FLAT_NODE_MEM_MAP=y
1354 +# CONFIG_SPARSEMEM_STATIC is not set
1355 +CONFIG_SPLIT_PTLOCK_CPUS=4096
1356 +# CONFIG_RESOURCES_64BIT is not set
1357 +# CONFIG_LEDS is not set
1358 +CONFIG_ALIGNMENT_TRAP=y
1359 +
1360 +#
1361 +# Boot options
1362 +#
1363 +CONFIG_ZBOOT_ROM_TEXT=0x22000000
1364 +CONFIG_ZBOOT_ROM_BSS=0x20004000
1365 +# CONFIG_ZBOOT_ROM is not set
1366 +CONFIG_CMDLINE="console=ttyS0,115200 noinitrd root=/dev/mtdblock3 rootfstype=jffs2 mem=64M"
1367 +# CONFIG_XIP_KERNEL is not set
1368 +
1369 +#
1370 +# Floating point emulation
1371 +#
1372 +
1373 +#
1374 +# At least one emulation must be selected
1375 +#
1376 +CONFIG_FPE_NWFPE=y
1377 +# CONFIG_FPE_NWFPE_XP is not set
1378 +# CONFIG_FPE_FASTFPE is not set
1379 +# CONFIG_VFP is not set
1380 +
1381 +#
1382 +# Userspace binary formats
1383 +#
1384 +CONFIG_BINFMT_ELF=y
1385 +# CONFIG_BINFMT_AOUT is not set
1386 +# CONFIG_BINFMT_MISC is not set
1387 +# CONFIG_ARTHUR is not set
1388 +
1389 +#
1390 +# Power management options
1391 +#
1392 +# CONFIG_PM is not set
1393 +# CONFIG_APM is not set
1394 +
1395 +#
1396 +# Networking
1397 +#
1398 +CONFIG_NET=y
1399 +
1400 +#
1401 +# Networking options
1402 +#
1403 +# CONFIG_NETDEBUG is not set
1404 +CONFIG_PACKET=y
1405 +# CONFIG_PACKET_MMAP is not set
1406 +CONFIG_UNIX=y
1407 +CONFIG_XFRM=y
1408 +# CONFIG_XFRM_USER is not set
1409 +# CONFIG_XFRM_SUB_POLICY is not set
1410 +# CONFIG_NET_KEY is not set
1411 +CONFIG_INET=y
1412 +# CONFIG_IP_MULTICAST is not set
1413 +# CONFIG_IP_ADVANCED_ROUTER is not set
1414 +CONFIG_IP_FIB_HASH=y
1415 +CONFIG_IP_PNP=y
1416 +# CONFIG_IP_PNP_DHCP is not set
1417 +CONFIG_IP_PNP_BOOTP=y
1418 +# CONFIG_IP_PNP_RARP is not set
1419 +# CONFIG_NET_IPIP is not set
1420 +# CONFIG_NET_IPGRE is not set
1421 +# CONFIG_ARPD is not set
1422 +# CONFIG_SYN_COOKIES is not set
1423 +# CONFIG_INET_AH is not set
1424 +# CONFIG_INET_ESP is not set
1425 +# CONFIG_INET_IPCOMP is not set
1426 +# CONFIG_INET_XFRM_TUNNEL is not set
1427 +# CONFIG_INET_TUNNEL is not set
1428 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
1429 +CONFIG_INET_XFRM_MODE_TUNNEL=y
1430 +CONFIG_INET_XFRM_MODE_BEET=y
1431 +CONFIG_INET_DIAG=y
1432 +CONFIG_INET_TCP_DIAG=y
1433 +# CONFIG_TCP_CONG_ADVANCED is not set
1434 +CONFIG_TCP_CONG_CUBIC=y
1435 +CONFIG_DEFAULT_TCP_CONG="cubic"
1436 +# CONFIG_TCP_MD5SIG is not set
1437 +# CONFIG_IPV6 is not set
1438 +# CONFIG_INET6_XFRM_TUNNEL is not set
1439 +# CONFIG_INET6_TUNNEL is not set
1440 +# CONFIG_NETWORK_SECMARK is not set
1441 +# CONFIG_NETFILTER is not set
1442 +
1443 +#
1444 +# DCCP Configuration (EXPERIMENTAL)
1445 +#
1446 +# CONFIG_IP_DCCP is not set
1447 +
1448 +#
1449 +# SCTP Configuration (EXPERIMENTAL)
1450 +#
1451 +# CONFIG_IP_SCTP is not set
1452 +
1453 +#
1454 +# TIPC Configuration (EXPERIMENTAL)
1455 +#
1456 +# CONFIG_TIPC is not set
1457 +# CONFIG_ATM is not set
1458 +# CONFIG_BRIDGE is not set
1459 +# CONFIG_VLAN_8021Q is not set
1460 +# CONFIG_DECNET is not set
1461 +# CONFIG_LLC2 is not set
1462 +# CONFIG_IPX is not set
1463 +# CONFIG_ATALK is not set
1464 +# CONFIG_X25 is not set
1465 +# CONFIG_LAPB is not set
1466 +# CONFIG_ECONET is not set
1467 +# CONFIG_WAN_ROUTER is not set
1468 +
1469 +#
1470 +# QoS and/or fair queueing
1471 +#
1472 +# CONFIG_NET_SCHED is not set
1473 +
1474 +#
1475 +# Network testing
1476 +#
1477 +# CONFIG_NET_PKTGEN is not set
1478 +# CONFIG_HAMRADIO is not set
1479 +# CONFIG_IRDA is not set
1480 +# CONFIG_BT is not set
1481 +# CONFIG_IEEE80211 is not set
1482 +
1483 +#
1484 +# Device Drivers
1485 +#
1486 +
1487 +#
1488 +# Generic Driver Options
1489 +#
1490 +CONFIG_STANDALONE=y
1491 +CONFIG_PREVENT_FIRMWARE_BUILD=y
1492 +# CONFIG_FW_LOADER is not set
1493 +# CONFIG_DEBUG_DRIVER is not set
1494 +# CONFIG_SYS_HYPERVISOR is not set
1495 +
1496 +#
1497 +# Connector - unified userspace <-> kernelspace linker
1498 +#
1499 +# CONFIG_CONNECTOR is not set
1500 +
1501 +#
1502 +# Memory Technology Devices (MTD)
1503 +#
1504 +CONFIG_MTD=y
1505 +# CONFIG_MTD_DEBUG is not set
1506 +CONFIG_MTD_CONCAT=y
1507 +CONFIG_MTD_PARTITIONS=y
1508 +# CONFIG_MTD_REDBOOT_PARTS is not set
1509 +CONFIG_MTD_CMDLINE_PARTS=y
1510 +# CONFIG_MTD_AFS_PARTS is not set
1511 +
1512 +#
1513 +# User Modules And Translation Layers
1514 +#
1515 +CONFIG_MTD_CHAR=y
1516 +CONFIG_MTD_BLKDEVS=y
1517 +CONFIG_MTD_BLOCK=y
1518 +# CONFIG_FTL is not set
1519 +# CONFIG_NFTL is not set
1520 +# CONFIG_INFTL is not set
1521 +# CONFIG_RFD_FTL is not set
1522 +# CONFIG_SSFDC is not set
1523 +
1524 +#
1525 +# RAM/ROM/Flash chip drivers
1526 +#
1527 +CONFIG_MTD_CFI=y
1528 +# CONFIG_MTD_JEDECPROBE is not set
1529 +CONFIG_MTD_GEN_PROBE=y
1530 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
1531 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
1532 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
1533 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
1534 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
1535 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
1536 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
1537 +CONFIG_MTD_CFI_I1=y
1538 +CONFIG_MTD_CFI_I2=y
1539 +# CONFIG_MTD_CFI_I4 is not set
1540 +# CONFIG_MTD_CFI_I8 is not set
1541 +# CONFIG_MTD_CFI_INTELEXT is not set
1542 +# CONFIG_MTD_CFI_AMDSTD is not set
1543 +# CONFIG_MTD_CFI_STAA is not set
1544 +# CONFIG_MTD_RAM is not set
1545 +# CONFIG_MTD_ROM is not set
1546 +# CONFIG_MTD_ABSENT is not set
1547 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
1548 +
1549 +#
1550 +# Mapping drivers for chip access
1551 +#
1552 +CONFIG_MTD_COMPLEX_MAPPINGS=y
1553 +# CONFIG_MTD_PHYSMAP is not set
1554 +# CONFIG_MTD_ARM_INTEGRATOR is not set
1555 +# CONFIG_MTD_PLATRAM is not set
1556 +
1557 +#
1558 +# Self-contained MTD device drivers
1559 +#
1560 +CONFIG_MTD_DATAFLASH=y
1561 +# CONFIG_MTD_M25P80 is not set
1562 +# CONFIG_MTD_SLRAM is not set
1563 +# CONFIG_MTD_PHRAM is not set
1564 +# CONFIG_MTD_MTDRAM is not set
1565 +# CONFIG_MTD_BLOCK2MTD is not set
1566 +
1567 +#
1568 +# Disk-On-Chip Device Drivers
1569 +#
1570 +# CONFIG_MTD_DOC2000 is not set
1571 +# CONFIG_MTD_DOC2001 is not set
1572 +# CONFIG_MTD_DOC2001PLUS is not set
1573 +
1574 +#
1575 +# NAND Flash Device Drivers
1576 +#
1577 +# CONFIG_MTD_NAND is not set
1578 +
1579 +#
1580 +# OneNAND Flash Device Drivers
1581 +#
1582 +# CONFIG_MTD_ONENAND is not set
1583 +
1584 +#
1585 +# Parallel port support
1586 +#
1587 +# CONFIG_PARPORT is not set
1588 +
1589 +#
1590 +# Plug and Play support
1591 +#
1592 +
1593 +#
1594 +# Block devices
1595 +#
1596 +# CONFIG_BLK_DEV_COW_COMMON is not set
1597 +# CONFIG_BLK_DEV_LOOP is not set
1598 +# CONFIG_BLK_DEV_NBD is not set
1599 +CONFIG_BLK_DEV_RAM=y
1600 +CONFIG_BLK_DEV_RAM_COUNT=16
1601 +CONFIG_BLK_DEV_RAM_SIZE=8192
1602 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
1603 +CONFIG_BLK_DEV_INITRD=y
1604 +# CONFIG_CDROM_PKTCDVD is not set
1605 +# CONFIG_ATA_OVER_ETH is not set
1606 +
1607 +#
1608 +# SCSI device support
1609 +#
1610 +# CONFIG_RAID_ATTRS is not set
1611 +# CONFIG_SCSI is not set
1612 +# CONFIG_SCSI_NETLINK is not set
1613 +
1614 +#
1615 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
1616 +#
1617 +# CONFIG_ATA is not set
1618 +
1619 +#
1620 +# Multi-device support (RAID and LVM)
1621 +#
1622 +# CONFIG_MD is not set
1623 +
1624 +#
1625 +# Fusion MPT device support
1626 +#
1627 +# CONFIG_FUSION is not set
1628 +
1629 +#
1630 +# IEEE 1394 (FireWire) support
1631 +#
1632 +
1633 +#
1634 +# I2O device support
1635 +#
1636 +
1637 +#
1638 +# Network device support
1639 +#
1640 +CONFIG_NETDEVICES=y
1641 +# CONFIG_DUMMY is not set
1642 +# CONFIG_BONDING is not set
1643 +# CONFIG_EQUALIZER is not set
1644 +# CONFIG_TUN is not set
1645 +
1646 +#
1647 +# PHY device support
1648 +#
1649 +# CONFIG_PHYLIB is not set
1650 +
1651 +#
1652 +# Ethernet (10 or 100Mbit)
1653 +#
1654 +CONFIG_NET_ETHERNET=y
1655 +CONFIG_MII=y
1656 +CONFIG_MACB=y
1657 +# CONFIG_SMC91X is not set
1658 +# CONFIG_DM9000 is not set
1659 +
1660 +#
1661 +# Ethernet (1000 Mbit)
1662 +#
1663 +
1664 +#
1665 +# Ethernet (10000 Mbit)
1666 +#
1667 +
1668 +#
1669 +# Token Ring devices
1670 +#
1671 +
1672 +#
1673 +# Wireless LAN (non-hamradio)
1674 +#
1675 +# CONFIG_NET_RADIO is not set
1676 +
1677 +#
1678 +# Wan interfaces
1679 +#
1680 +# CONFIG_WAN is not set
1681 +# CONFIG_PPP is not set
1682 +# CONFIG_SLIP is not set
1683 +# CONFIG_SHAPER is not set
1684 +# CONFIG_NETCONSOLE is not set
1685 +# CONFIG_NETPOLL is not set
1686 +# CONFIG_NET_POLL_CONTROLLER is not set
1687 +
1688 +#
1689 +# ISDN subsystem
1690 +#
1691 +# CONFIG_ISDN is not set
1692 +
1693 +#
1694 +# Input device support
1695 +#
1696 +CONFIG_INPUT=y
1697 +# CONFIG_INPUT_FF_MEMLESS is not set
1698 +
1699 +#
1700 +# Userland interfaces
1701 +#
1702 +CONFIG_INPUT_MOUSEDEV=y
1703 +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
1704 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1705 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1706 +# CONFIG_INPUT_JOYDEV is not set
1707 +# CONFIG_INPUT_TSDEV is not set
1708 +# CONFIG_INPUT_EVDEV is not set
1709 +# CONFIG_INPUT_EVBUG is not set
1710 +
1711 +#
1712 +# Input Device Drivers
1713 +#
1714 +# CONFIG_INPUT_KEYBOARD is not set
1715 +# CONFIG_INPUT_MOUSE is not set
1716 +# CONFIG_INPUT_JOYSTICK is not set
1717 +# CONFIG_INPUT_TOUCHSCREEN is not set
1718 +# CONFIG_INPUT_MISC is not set
1719 +
1720 +#
1721 +# Hardware I/O ports
1722 +#
1723 +# CONFIG_SERIO is not set
1724 +# CONFIG_GAMEPORT is not set
1725 +
1726 +#
1727 +# Character devices
1728 +#
1729 +CONFIG_VT=y
1730 +CONFIG_VT_CONSOLE=y
1731 +CONFIG_HW_CONSOLE=y
1732 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
1733 +# CONFIG_SERIAL_NONSTANDARD is not set
1734 +
1735 +#
1736 +# Serial drivers
1737 +#
1738 +# CONFIG_SERIAL_8250 is not set
1739 +
1740 +#
1741 +# Non-8250 serial port support
1742 +#
1743 +CONFIG_SERIAL_ATMEL=y
1744 +CONFIG_SERIAL_ATMEL_CONSOLE=y
1745 +# CONFIG_SERIAL_ATMEL_TTYAT is not set
1746 +CONFIG_SERIAL_CORE=y
1747 +CONFIG_SERIAL_CORE_CONSOLE=y
1748 +CONFIG_UNIX98_PTYS=y
1749 +CONFIG_LEGACY_PTYS=y
1750 +CONFIG_LEGACY_PTY_COUNT=256
1751 +
1752 +#
1753 +# IPMI
1754 +#
1755 +# CONFIG_IPMI_HANDLER is not set
1756 +
1757 +#
1758 +# Watchdog Cards
1759 +#
1760 +# CONFIG_WATCHDOG is not set
1761 +# CONFIG_HW_RANDOM is not set
1762 +# CONFIG_NVRAM is not set
1763 +# CONFIG_DTLK is not set
1764 +# CONFIG_R3964 is not set
1765 +# CONFIG_RAW_DRIVER is not set
1766 +
1767 +#
1768 +# TPM devices
1769 +#
1770 +# CONFIG_TCG_TPM is not set
1771 +
1772 +#
1773 +# I2C support
1774 +#
1775 +# CONFIG_I2C is not set
1776 +
1777 +#
1778 +# SPI support
1779 +#
1780 +CONFIG_SPI=y
1781 +# CONFIG_SPI_DEBUG is not set
1782 +CONFIG_SPI_MASTER=y
1783 +
1784 +#
1785 +# SPI Master Controller Drivers
1786 +#
1787 +CONFIG_SPI_ATMEL=y
1788 +# CONFIG_SPI_BITBANG is not set
1789 +
1790 +#
1791 +# SPI Protocol Masters
1792 +#
1793 +
1794 +#
1795 +# Dallas's 1-wire bus
1796 +#
1797 +# CONFIG_W1 is not set
1798 +
1799 +#
1800 +# Hardware Monitoring support
1801 +#
1802 +# CONFIG_HWMON is not set
1803 +# CONFIG_HWMON_VID is not set
1804 +
1805 +#
1806 +# Misc devices
1807 +#
1808 +# CONFIG_TIFM_CORE is not set
1809 +
1810 +#
1811 +# LED devices
1812 +#
1813 +# CONFIG_NEW_LEDS is not set
1814 +
1815 +#
1816 +# LED drivers
1817 +#
1818 +
1819 +#
1820 +# LED Triggers
1821 +#
1822 +
1823 +#
1824 +# Multimedia devices
1825 +#
1826 +# CONFIG_VIDEO_DEV is not set
1827 +
1828 +#
1829 +# Digital Video Broadcasting Devices
1830 +#
1831 +# CONFIG_DVB is not set
1832 +
1833 +#
1834 +# Graphics support
1835 +#
1836 +# CONFIG_FIRMWARE_EDID is not set
1837 +# CONFIG_FB is not set
1838 +
1839 +#
1840 +# Console display driver support
1841 +#
1842 +# CONFIG_VGA_CONSOLE is not set
1843 +CONFIG_DUMMY_CONSOLE=y
1844 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1845 +
1846 +#
1847 +# Sound
1848 +#
1849 +# CONFIG_SOUND is not set
1850 +
1851 +#
1852 +# HID Devices
1853 +#
1854 +# CONFIG_HID is not set
1855 +
1856 +#
1857 +# USB support
1858 +#
1859 +CONFIG_USB_ARCH_HAS_HCD=y
1860 +CONFIG_USB_ARCH_HAS_OHCI=y
1861 +# CONFIG_USB_ARCH_HAS_EHCI is not set
1862 +# CONFIG_USB is not set
1863 +
1864 +#
1865 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1866 +#
1867 +
1868 +#
1869 +# USB Gadget Support
1870 +#
1871 +# CONFIG_USB_GADGET is not set
1872 +
1873 +#
1874 +# MMC/SD Card support
1875 +#
1876 +# CONFIG_MMC is not set
1877 +
1878 +#
1879 +# Real Time Clock
1880 +#
1881 +CONFIG_RTC_LIB=y
1882 +# CONFIG_RTC_CLASS is not set
1883 +
1884 +#
1885 +# File systems
1886 +#
1887 +CONFIG_EXT2_FS=y
1888 +# CONFIG_EXT2_FS_XATTR is not set
1889 +# CONFIG_EXT2_FS_XIP is not set
1890 +CONFIG_EXT3_FS=y
1891 +CONFIG_EXT3_FS_XATTR=y
1892 +# CONFIG_EXT3_FS_POSIX_ACL is not set
1893 +# CONFIG_EXT3_FS_SECURITY is not set
1894 +# CONFIG_EXT4DEV_FS is not set
1895 +CONFIG_JBD=y
1896 +# CONFIG_JBD_DEBUG is not set
1897 +CONFIG_FS_MBCACHE=y
1898 +# CONFIG_REISERFS_FS is not set
1899 +# CONFIG_JFS_FS is not set
1900 +# CONFIG_FS_POSIX_ACL is not set
1901 +# CONFIG_XFS_FS is not set
1902 +# CONFIG_GFS2_FS is not set
1903 +# CONFIG_OCFS2_FS is not set
1904 +# CONFIG_MINIX_FS is not set
1905 +# CONFIG_ROMFS_FS is not set
1906 +CONFIG_INOTIFY=y
1907 +CONFIG_INOTIFY_USER=y
1908 +# CONFIG_QUOTA is not set
1909 +CONFIG_DNOTIFY=y
1910 +# CONFIG_AUTOFS_FS is not set
1911 +CONFIG_AUTOFS4_FS=y
1912 +# CONFIG_FUSE_FS is not set
1913 +
1914 +#
1915 +# CD-ROM/DVD Filesystems
1916 +#
1917 +# CONFIG_ISO9660_FS is not set
1918 +# CONFIG_UDF_FS is not set
1919 +
1920 +#
1921 +# DOS/FAT/NT Filesystems
1922 +#
1923 +CONFIG_FAT_FS=y
1924 +# CONFIG_MSDOS_FS is not set
1925 +CONFIG_VFAT_FS=y
1926 +CONFIG_FAT_DEFAULT_CODEPAGE=437
1927 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1928 +# CONFIG_NTFS_FS is not set
1929 +
1930 +#
1931 +# Pseudo filesystems
1932 +#
1933 +CONFIG_PROC_FS=y
1934 +CONFIG_PROC_SYSCTL=y
1935 +CONFIG_SYSFS=y
1936 +CONFIG_TMPFS=y
1937 +# CONFIG_TMPFS_POSIX_ACL is not set
1938 +# CONFIG_HUGETLB_PAGE is not set
1939 +CONFIG_RAMFS=y
1940 +# CONFIG_CONFIGFS_FS is not set
1941 +
1942 +#
1943 +# Miscellaneous filesystems
1944 +#
1945 +# CONFIG_ADFS_FS is not set
1946 +# CONFIG_AFFS_FS is not set
1947 +# CONFIG_HFS_FS is not set
1948 +# CONFIG_HFSPLUS_FS is not set
1949 +# CONFIG_BEFS_FS is not set
1950 +# CONFIG_BFS_FS is not set
1951 +# CONFIG_EFS_FS is not set
1952 +CONFIG_JFFS2_FS=y
1953 +CONFIG_JFFS2_FS_DEBUG=0
1954 +CONFIG_JFFS2_FS_WRITEBUFFER=y
1955 +# CONFIG_JFFS2_SUMMARY is not set
1956 +# CONFIG_JFFS2_FS_XATTR is not set
1957 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1958 +CONFIG_JFFS2_ZLIB=y
1959 +CONFIG_JFFS2_RTIME=y
1960 +# CONFIG_JFFS2_RUBIN is not set
1961 +CONFIG_CRAMFS=y
1962 +# CONFIG_VXFS_FS is not set
1963 +# CONFIG_HPFS_FS is not set
1964 +# CONFIG_QNX4FS_FS is not set
1965 +# CONFIG_SYSV_FS is not set
1966 +# CONFIG_UFS_FS is not set
1967 +
1968 +#
1969 +# Network File Systems
1970 +#
1971 +CONFIG_NFS_FS=y
1972 +CONFIG_NFS_V3=y
1973 +# CONFIG_NFS_V3_ACL is not set
1974 +# CONFIG_NFS_V4 is not set
1975 +# CONFIG_NFS_DIRECTIO is not set
1976 +# CONFIG_NFSD is not set
1977 +CONFIG_ROOT_NFS=y
1978 +CONFIG_LOCKD=y
1979 +CONFIG_LOCKD_V4=y
1980 +CONFIG_NFS_COMMON=y
1981 +CONFIG_SUNRPC=y
1982 +# CONFIG_RPCSEC_GSS_KRB5 is not set
1983 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
1984 +# CONFIG_SMB_FS is not set
1985 +# CONFIG_CIFS is not set
1986 +# CONFIG_NCP_FS is not set
1987 +# CONFIG_CODA_FS is not set
1988 +# CONFIG_AFS_FS is not set
1989 +# CONFIG_9P_FS is not set
1990 +
1991 +#
1992 +# Partition Types
1993 +#
1994 +# CONFIG_PARTITION_ADVANCED is not set
1995 +CONFIG_MSDOS_PARTITION=y
1996 +
1997 +#
1998 +# Native Language Support
1999 +#
2000 +CONFIG_NLS=y
2001 +CONFIG_NLS_DEFAULT="iso8859-1"
2002 +CONFIG_NLS_CODEPAGE_437=y
2003 +# CONFIG_NLS_CODEPAGE_737 is not set
2004 +# CONFIG_NLS_CODEPAGE_775 is not set
2005 +CONFIG_NLS_CODEPAGE_850=y
2006 +# CONFIG_NLS_CODEPAGE_852 is not set
2007 +# CONFIG_NLS_CODEPAGE_855 is not set
2008 +# CONFIG_NLS_CODEPAGE_857 is not set
2009 +# CONFIG_NLS_CODEPAGE_860 is not set
2010 +# CONFIG_NLS_CODEPAGE_861 is not set
2011 +# CONFIG_NLS_CODEPAGE_862 is not set
2012 +# CONFIG_NLS_CODEPAGE_863 is not set
2013 +# CONFIG_NLS_CODEPAGE_864 is not set
2014 +# CONFIG_NLS_CODEPAGE_865 is not set
2015 +# CONFIG_NLS_CODEPAGE_866 is not set
2016 +# CONFIG_NLS_CODEPAGE_869 is not set
2017 +# CONFIG_NLS_CODEPAGE_936 is not set
2018 +# CONFIG_NLS_CODEPAGE_950 is not set
2019 +# CONFIG_NLS_CODEPAGE_932 is not set
2020 +# CONFIG_NLS_CODEPAGE_949 is not set
2021 +# CONFIG_NLS_CODEPAGE_874 is not set
2022 +# CONFIG_NLS_ISO8859_8 is not set
2023 +# CONFIG_NLS_CODEPAGE_1250 is not set
2024 +# CONFIG_NLS_CODEPAGE_1251 is not set
2025 +# CONFIG_NLS_ASCII is not set
2026 +CONFIG_NLS_ISO8859_1=y
2027 +# CONFIG_NLS_ISO8859_2 is not set
2028 +# CONFIG_NLS_ISO8859_3 is not set
2029 +# CONFIG_NLS_ISO8859_4 is not set
2030 +# CONFIG_NLS_ISO8859_5 is not set
2031 +# CONFIG_NLS_ISO8859_6 is not set
2032 +# CONFIG_NLS_ISO8859_7 is not set
2033 +# CONFIG_NLS_ISO8859_9 is not set
2034 +# CONFIG_NLS_ISO8859_13 is not set
2035 +# CONFIG_NLS_ISO8859_14 is not set
2036 +# CONFIG_NLS_ISO8859_15 is not set
2037 +# CONFIG_NLS_KOI8_R is not set
2038 +# CONFIG_NLS_KOI8_U is not set
2039 +# CONFIG_NLS_UTF8 is not set
2040 +
2041 +#
2042 +# Distributed Lock Manager
2043 +#
2044 +# CONFIG_DLM is not set
2045 +
2046 +#
2047 +# Profiling support
2048 +#
2049 +# CONFIG_PROFILING is not set
2050 +
2051 +#
2052 +# Kernel hacking
2053 +#
2054 +# CONFIG_PRINTK_TIME is not set
2055 +CONFIG_ENABLE_MUST_CHECK=y
2056 +# CONFIG_MAGIC_SYSRQ is not set
2057 +# CONFIG_UNUSED_SYMBOLS is not set
2058 +# CONFIG_DEBUG_FS is not set
2059 +# CONFIG_HEADERS_CHECK is not set
2060 +CONFIG_DEBUG_KERNEL=y
2061 +CONFIG_LOG_BUF_SHIFT=14
2062 +CONFIG_DETECT_SOFTLOCKUP=y
2063 +# CONFIG_SCHEDSTATS is not set
2064 +# CONFIG_DEBUG_SLAB is not set
2065 +# CONFIG_DEBUG_RT_MUTEXES is not set
2066 +# CONFIG_RT_MUTEX_TESTER is not set
2067 +# CONFIG_DEBUG_SPINLOCK is not set
2068 +# CONFIG_DEBUG_MUTEXES is not set
2069 +# CONFIG_DEBUG_RWSEMS is not set
2070 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
2071 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
2072 +# CONFIG_DEBUG_KOBJECT is not set
2073 +CONFIG_DEBUG_BUGVERBOSE=y
2074 +# CONFIG_DEBUG_INFO is not set
2075 +# CONFIG_DEBUG_VM is not set
2076 +# CONFIG_DEBUG_LIST is not set
2077 +CONFIG_FRAME_POINTER=y
2078 +CONFIG_FORCED_INLINING=y
2079 +# CONFIG_RCU_TORTURE_TEST is not set
2080 +CONFIG_DEBUG_USER=y
2081 +# CONFIG_DEBUG_ERRORS is not set
2082 +CONFIG_DEBUG_LL=y
2083 +# CONFIG_DEBUG_ICEDCC is not set
2084 +
2085 +#
2086 +# Security options
2087 +#
2088 +# CONFIG_KEYS is not set
2089 +# CONFIG_SECURITY is not set
2090 +
2091 +#
2092 +# Cryptographic options
2093 +#
2094 +# CONFIG_CRYPTO is not set
2095 +
2096 +#
2097 +# Library routines
2098 +#
2099 +CONFIG_BITREVERSE=y
2100 +# CONFIG_CRC_CCITT is not set
2101 +# CONFIG_CRC16 is not set
2102 +CONFIG_CRC32=y
2103 +# CONFIG_LIBCRC32C is not set
2104 +CONFIG_ZLIB_INFLATE=y
2105 +CONFIG_ZLIB_DEFLATE=y
2106 +CONFIG_PLIST=y
2107 +CONFIG_IOMAP_COPY=y
2108 diff -urN linux-2.6.22-rc5/arch/arm/configs/kb9202_defconfig linux-2.6.22-rc5.new/arch/arm/configs/kb9202_defconfig
2109 --- linux-2.6.22-rc5/arch/arm/configs/kb9202_defconfig 2007-06-17 04:09:12.000000000 +0200
2110 +++ linux-2.6.22-rc5.new/arch/arm/configs/kb9202_defconfig 2007-07-29 05:23:04.000000000 +0200
2111 @@ -1,19 +1,31 @@
2112 #
2113 # Automatically generated make config: don't edit
2114 -# Linux kernel version: 2.6.13-rc2
2115 -# Sun Aug 14 19:26:59 2005
2116 +# Linux kernel version: 2.6.21
2117 +# Mon May 7 11:43:14 2007
2118 #
2119 CONFIG_ARM=y
2120 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
2121 +CONFIG_GENERIC_GPIO=y
2122 +# CONFIG_GENERIC_TIME is not set
2123 CONFIG_MMU=y
2124 -CONFIG_UID16=y
2125 +# CONFIG_NO_IOPORT is not set
2126 +CONFIG_GENERIC_HARDIRQS=y
2127 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
2128 +CONFIG_HARDIRQS_SW_RESEND=y
2129 +CONFIG_GENERIC_IRQ_PROBE=y
2130 CONFIG_RWSEM_GENERIC_SPINLOCK=y
2131 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
2132 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
2133 +CONFIG_GENERIC_HWEIGHT=y
2134 CONFIG_GENERIC_CALIBRATE_DELAY=y
2135 +CONFIG_ZONE_DMA=y
2136 +CONFIG_VECTORS_BASE=0xffff0000
2137 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
2138
2139 #
2140 # Code maturity level options
2141 #
2142 -# CONFIG_EXPERIMENTAL is not set
2143 -CONFIG_CLEAN_COMPILE=y
2144 +CONFIG_EXPERIMENTAL=y
2145 CONFIG_BROKEN_ON_SMP=y
2146 CONFIG_INIT_ENV_ARG_LIMIT=32
2147
2148 @@ -21,54 +33,103 @@
2149 # General setup
2150 #
2151 CONFIG_LOCALVERSION=""
2152 -# CONFIG_SWAP is not set
2153 -# CONFIG_SYSVIPC is not set
2154 -# CONFIG_BSD_PROCESS_ACCT is not set
2155 +CONFIG_LOCALVERSION_AUTO=y
2156 +CONFIG_SWAP=y
2157 +CONFIG_SYSVIPC=y
2158 +# CONFIG_IPC_NS is not set
2159 +CONFIG_SYSVIPC_SYSCTL=y
2160 +CONFIG_POSIX_MQUEUE=y
2161 +CONFIG_BSD_PROCESS_ACCT=y
2162 +# CONFIG_BSD_PROCESS_ACCT_V3 is not set
2163 +# CONFIG_TASKSTATS is not set
2164 +# CONFIG_UTS_NS is not set
2165 +CONFIG_AUDIT=y
2166 +CONFIG_IKCONFIG=y
2167 +CONFIG_IKCONFIG_PROC=y
2168 +CONFIG_SYSFS_DEPRECATED=y
2169 +# CONFIG_RELAY is not set
2170 +CONFIG_BLK_DEV_INITRD=y
2171 +CONFIG_INITRAMFS_SOURCE=""
2172 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
2173 CONFIG_SYSCTL=y
2174 -# CONFIG_AUDIT is not set
2175 -CONFIG_HOTPLUG=y
2176 -# CONFIG_KOBJECT_UEVENT is not set
2177 -# CONFIG_IKCONFIG is not set
2178 # CONFIG_EMBEDDED is not set
2179 +CONFIG_UID16=y
2180 +CONFIG_SYSCTL_SYSCALL=y
2181 CONFIG_KALLSYMS=y
2182 # CONFIG_KALLSYMS_ALL is not set
2183 -# CONFIG_KALLSYMS_EXTRA_PASS is not set
2184 +CONFIG_KALLSYMS_EXTRA_PASS=y
2185 +CONFIG_HOTPLUG=y
2186 CONFIG_PRINTK=y
2187 CONFIG_BUG=y
2188 +CONFIG_ELF_CORE=y
2189 CONFIG_BASE_FULL=y
2190 CONFIG_FUTEX=y
2191 CONFIG_EPOLL=y
2192 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y
2193 CONFIG_SHMEM=y
2194 -CONFIG_CC_ALIGN_FUNCTIONS=0
2195 -CONFIG_CC_ALIGN_LABELS=0
2196 -CONFIG_CC_ALIGN_LOOPS=0
2197 -CONFIG_CC_ALIGN_JUMPS=0
2198 +CONFIG_SLAB=y
2199 +CONFIG_VM_EVENT_COUNTERS=y
2200 +CONFIG_RT_MUTEXES=y
2201 # CONFIG_TINY_SHMEM is not set
2202 CONFIG_BASE_SMALL=0
2203 +# CONFIG_SLOB is not set
2204
2205 #
2206 # Loadable module support
2207 #
2208 CONFIG_MODULES=y
2209 CONFIG_MODULE_UNLOAD=y
2210 -CONFIG_OBSOLETE_MODPARM=y
2211 -# CONFIG_MODULE_SRCVERSION_ALL is not set
2212 +# CONFIG_MODULE_FORCE_UNLOAD is not set
2213 +CONFIG_MODVERSIONS=y
2214 +CONFIG_MODULE_SRCVERSION_ALL=y
2215 CONFIG_KMOD=y
2216
2217 #
2218 +# Block layer
2219 +#
2220 +CONFIG_BLOCK=y
2221 +CONFIG_LBD=y
2222 +# CONFIG_BLK_DEV_IO_TRACE is not set
2223 +# CONFIG_LSF is not set
2224 +
2225 +#
2226 +# IO Schedulers
2227 +#
2228 +CONFIG_IOSCHED_NOOP=y
2229 +CONFIG_IOSCHED_AS=y
2230 +CONFIG_IOSCHED_DEADLINE=y
2231 +CONFIG_IOSCHED_CFQ=y
2232 +# CONFIG_DEFAULT_AS is not set
2233 +# CONFIG_DEFAULT_DEADLINE is not set
2234 +CONFIG_DEFAULT_CFQ=y
2235 +# CONFIG_DEFAULT_NOOP is not set
2236 +CONFIG_DEFAULT_IOSCHED="cfq"
2237 +
2238 +#
2239 # System Type
2240 #
2241 +# CONFIG_ARCH_AAEC2000 is not set
2242 +# CONFIG_ARCH_INTEGRATOR is not set
2243 +# CONFIG_ARCH_REALVIEW is not set
2244 +# CONFIG_ARCH_VERSATILE is not set
2245 +CONFIG_ARCH_AT91=y
2246 # CONFIG_ARCH_CLPS7500 is not set
2247 # CONFIG_ARCH_CLPS711X is not set
2248 # CONFIG_ARCH_CO285 is not set
2249 # CONFIG_ARCH_EBSA110 is not set
2250 +# CONFIG_ARCH_EP93XX is not set
2251 # CONFIG_ARCH_FOOTBRIDGE is not set
2252 -# CONFIG_ARCH_INTEGRATOR is not set
2253 -# CONFIG_ARCH_IOP3XX is not set
2254 +# CONFIG_ARCH_NETX is not set
2255 +# CONFIG_ARCH_H720X is not set
2256 +# CONFIG_ARCH_IMX is not set
2257 +# CONFIG_ARCH_IOP32X is not set
2258 +# CONFIG_ARCH_IOP33X is not set
2259 +# CONFIG_ARCH_IOP13XX is not set
2260 # CONFIG_ARCH_IXP4XX is not set
2261 # CONFIG_ARCH_IXP2000 is not set
2262 +# CONFIG_ARCH_IXP23XX is not set
2263 # CONFIG_ARCH_L7200 is not set
2264 +# CONFIG_ARCH_NS9XXX is not set
2265 +# CONFIG_ARCH_PNX4008 is not set
2266 # CONFIG_ARCH_PXA is not set
2267 # CONFIG_ARCH_RPC is not set
2268 # CONFIG_ARCH_SA1100 is not set
2269 @@ -76,34 +137,52 @@
2270 # CONFIG_ARCH_SHARK is not set
2271 # CONFIG_ARCH_LH7A40X is not set
2272 # CONFIG_ARCH_OMAP is not set
2273 -# CONFIG_ARCH_VERSATILE is not set
2274 -# CONFIG_ARCH_IMX is not set
2275 -# CONFIG_ARCH_H720X is not set
2276 -# CONFIG_ARCH_AAEC2000 is not set
2277 -CONFIG_ARCH_AT91=y
2278 +
2279 +#
2280 +# Atmel AT91 System-on-Chip
2281 +#
2282 CONFIG_ARCH_AT91RM9200=y
2283 +# CONFIG_ARCH_AT91SAM9260 is not set
2284 +# CONFIG_ARCH_AT91SAM9261 is not set
2285 +# CONFIG_ARCH_AT91SAM9263 is not set
2286
2287 #
2288 -# AT91RM9200 Implementations
2289 +# AT91RM9200 Board Type
2290 #
2291 +# CONFIG_MACH_ONEARM is not set
2292 # CONFIG_ARCH_AT91RM9200DK is not set
2293 # CONFIG_MACH_AT91RM9200EK is not set
2294 # CONFIG_MACH_CSB337 is not set
2295 # CONFIG_MACH_CSB637 is not set
2296 # CONFIG_MACH_CARMEVA is not set
2297 +# CONFIG_MACH_ATEB9200 is not set
2298 CONFIG_MACH_KB9200=y
2299 +# CONFIG_MACH_KAFA is not set
2300 +# CONFIG_MACH_CHUB is not set
2301 +
2302 +#
2303 +# AT91 Board Options
2304 +#
2305 +
2306 +#
2307 +# AT91 Feature Selections
2308 +#
2309 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
2310 +# CONFIG_ATMEL_TCLIB is not set
2311
2312 #
2313 # Processor Type
2314 #
2315 CONFIG_CPU_32=y
2316 CONFIG_CPU_ARM920T=y
2317 -CONFIG_CPU_32v4=y
2318 +CONFIG_CPU_32v4T=y
2319 CONFIG_CPU_ABRT_EV4T=y
2320 CONFIG_CPU_CACHE_V4WT=y
2321 CONFIG_CPU_CACHE_VIVT=y
2322 CONFIG_CPU_COPY_V4WB=y
2323 CONFIG_CPU_TLB_V4WBI=y
2324 +CONFIG_CPU_CP15=y
2325 +CONFIG_CPU_CP15_MMU=y
2326
2327 #
2328 # Processor Features
2329 @@ -112,24 +191,44 @@
2330 # CONFIG_CPU_ICACHE_DISABLE is not set
2331 # CONFIG_CPU_DCACHE_DISABLE is not set
2332 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
2333 +# CONFIG_OUTER_CACHE is not set
2334
2335 #
2336 # Bus support
2337 #
2338 -CONFIG_ISA_DMA_API=y
2339
2340 #
2341 # PCCARD (PCMCIA/CardBus) support
2342 #
2343 -# CONFIG_PCCARD is not set
2344 +CONFIG_PCCARD=m
2345 +# CONFIG_PCMCIA_DEBUG is not set
2346 +CONFIG_PCMCIA=m
2347 +CONFIG_PCMCIA_LOAD_CIS=y
2348 +CONFIG_PCMCIA_IOCTL=y
2349 +
2350 +#
2351 +# PC-card bridges
2352 +#
2353 +# CONFIG_AT91_CF is not set
2354
2355 #
2356 # Kernel Features
2357 #
2358 +# CONFIG_PREEMPT is not set
2359 # CONFIG_NO_IDLE_HZ is not set
2360 +CONFIG_HZ=100
2361 +# CONFIG_AEABI is not set
2362 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
2363 +CONFIG_SELECT_MEMORY_MODEL=y
2364 +CONFIG_FLATMEM_MANUAL=y
2365 +# CONFIG_DISCONTIGMEM_MANUAL is not set
2366 +# CONFIG_SPARSEMEM_MANUAL is not set
2367 CONFIG_FLATMEM=y
2368 CONFIG_FLAT_NODE_MEM_MAP=y
2369 +# CONFIG_SPARSEMEM_STATIC is not set
2370 +CONFIG_SPLIT_PTLOCK_CPUS=4096
2371 +# CONFIG_RESOURCES_64BIT is not set
2372 +CONFIG_ZONE_DMA_FLAG=1
2373 # CONFIG_LEDS is not set
2374 CONFIG_ALIGNMENT_TRAP=y
2375
2376 @@ -138,8 +237,10 @@
2377 #
2378 CONFIG_ZBOOT_ROM_TEXT=0x10000000
2379 CONFIG_ZBOOT_ROM_BSS=0x20040000
2380 -CONFIG_ZBOOT_ROM=y
2381 -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933"
2382 +# CONFIG_ZBOOT_ROM is not set
2383 +CONFIG_CMDLINE="noinitrd root=/dev/mtdblock0 rootfstype=jffs2 mem=64M"
2384 +# CONFIG_XIP_KERNEL is not set
2385 +# CONFIG_KEXEC is not set
2386
2387 #
2388 # Floating point emulation
2389 @@ -150,6 +251,7 @@
2390 #
2391 CONFIG_FPE_NWFPE=y
2392 # CONFIG_FPE_NWFPE_XP is not set
2393 +# CONFIG_FPE_FASTFPE is not set
2394
2395 #
2396 # Userspace binary formats
2397 @@ -165,6 +267,96 @@
2398 # CONFIG_PM is not set
2399
2400 #
2401 +# Networking
2402 +#
2403 +CONFIG_NET=y
2404 +
2405 +#
2406 +# Networking options
2407 +#
2408 +# CONFIG_NETDEBUG is not set
2409 +CONFIG_PACKET=y
2410 +# CONFIG_PACKET_MMAP is not set
2411 +CONFIG_UNIX=y
2412 +# CONFIG_NET_KEY is not set
2413 +CONFIG_INET=y
2414 +CONFIG_IP_MULTICAST=y
2415 +# CONFIG_IP_ADVANCED_ROUTER is not set
2416 +CONFIG_IP_FIB_HASH=y
2417 +CONFIG_IP_PNP=y
2418 +# CONFIG_IP_PNP_DHCP is not set
2419 +# CONFIG_IP_PNP_BOOTP is not set
2420 +# CONFIG_IP_PNP_RARP is not set
2421 +# CONFIG_NET_IPIP is not set
2422 +# CONFIG_NET_IPGRE is not set
2423 +# CONFIG_IP_MROUTE is not set
2424 +# CONFIG_ARPD is not set
2425 +# CONFIG_SYN_COOKIES is not set
2426 +# CONFIG_INET_AH is not set
2427 +# CONFIG_INET_ESP is not set
2428 +# CONFIG_INET_IPCOMP is not set
2429 +# CONFIG_INET_XFRM_TUNNEL is not set
2430 +# CONFIG_INET_TUNNEL is not set
2431 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
2432 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
2433 +# CONFIG_INET_XFRM_MODE_BEET is not set
2434 +# CONFIG_INET_DIAG is not set
2435 +# CONFIG_TCP_CONG_ADVANCED is not set
2436 +CONFIG_TCP_CONG_CUBIC=y
2437 +CONFIG_DEFAULT_TCP_CONG="cubic"
2438 +# CONFIG_TCP_MD5SIG is not set
2439 +# CONFIG_IPV6 is not set
2440 +# CONFIG_INET6_XFRM_TUNNEL is not set
2441 +# CONFIG_INET6_TUNNEL is not set
2442 +# CONFIG_NETWORK_SECMARK is not set
2443 +# CONFIG_NETFILTER is not set
2444 +
2445 +#
2446 +# DCCP Configuration (EXPERIMENTAL)
2447 +#
2448 +# CONFIG_IP_DCCP is not set
2449 +
2450 +#
2451 +# SCTP Configuration (EXPERIMENTAL)
2452 +#
2453 +CONFIG_IP_SCTP=m
2454 +# CONFIG_SCTP_DBG_MSG is not set
2455 +# CONFIG_SCTP_DBG_OBJCNT is not set
2456 +# CONFIG_SCTP_HMAC_NONE is not set
2457 +# CONFIG_SCTP_HMAC_SHA1 is not set
2458 +CONFIG_SCTP_HMAC_MD5=y
2459 +
2460 +#
2461 +# TIPC Configuration (EXPERIMENTAL)
2462 +#
2463 +# CONFIG_TIPC is not set
2464 +# CONFIG_ATM is not set
2465 +# CONFIG_BRIDGE is not set
2466 +# CONFIG_VLAN_8021Q is not set
2467 +# CONFIG_DECNET is not set
2468 +# CONFIG_LLC2 is not set
2469 +# CONFIG_IPX is not set
2470 +# CONFIG_ATALK is not set
2471 +# CONFIG_X25 is not set
2472 +# CONFIG_LAPB is not set
2473 +# CONFIG_ECONET is not set
2474 +# CONFIG_WAN_ROUTER is not set
2475 +
2476 +#
2477 +# QoS and/or fair queueing
2478 +#
2479 +# CONFIG_NET_SCHED is not set
2480 +
2481 +#
2482 +# Network testing
2483 +#
2484 +# CONFIG_NET_PKTGEN is not set
2485 +# CONFIG_HAMRADIO is not set
2486 +# CONFIG_IRDA is not set
2487 +# CONFIG_BT is not set
2488 +# CONFIG_IEEE80211 is not set
2489 +
2490 +#
2491 # Device Drivers
2492 #
2493
2494 @@ -173,13 +365,95 @@
2495 #
2496 CONFIG_STANDALONE=y
2497 CONFIG_PREVENT_FIRMWARE_BUILD=y
2498 -# CONFIG_FW_LOADER is not set
2499 -CONFIG_DEBUG_DRIVER=y
2500 +CONFIG_FW_LOADER=y
2501 +# CONFIG_DEBUG_DRIVER is not set
2502 +# CONFIG_DEBUG_DEVRES is not set
2503 +# CONFIG_SYS_HYPERVISOR is not set
2504 +
2505 +#
2506 +# Connector - unified userspace <-> kernelspace linker
2507 +#
2508 +# CONFIG_CONNECTOR is not set
2509
2510 #
2511 # Memory Technology Devices (MTD)
2512 #
2513 -# CONFIG_MTD is not set
2514 +CONFIG_MTD=y
2515 +# CONFIG_MTD_DEBUG is not set
2516 +CONFIG_MTD_CONCAT=y
2517 +CONFIG_MTD_PARTITIONS=y
2518 +# CONFIG_MTD_REDBOOT_PARTS is not set
2519 +CONFIG_MTD_CMDLINE_PARTS=y
2520 +# CONFIG_MTD_AFS_PARTS is not set
2521 +
2522 +#
2523 +# User Modules And Translation Layers
2524 +#
2525 +CONFIG_MTD_CHAR=y
2526 +CONFIG_MTD_BLKDEVS=y
2527 +CONFIG_MTD_BLOCK=y
2528 +# CONFIG_FTL is not set
2529 +# CONFIG_NFTL is not set
2530 +# CONFIG_INFTL is not set
2531 +# CONFIG_RFD_FTL is not set
2532 +# CONFIG_SSFDC is not set
2533 +
2534 +#
2535 +# RAM/ROM/Flash chip drivers
2536 +#
2537 +# CONFIG_MTD_CFI is not set
2538 +# CONFIG_MTD_JEDECPROBE is not set
2539 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
2540 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
2541 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
2542 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
2543 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
2544 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
2545 +CONFIG_MTD_CFI_I1=y
2546 +CONFIG_MTD_CFI_I2=y
2547 +# CONFIG_MTD_CFI_I4 is not set
2548 +# CONFIG_MTD_CFI_I8 is not set
2549 +# CONFIG_MTD_RAM is not set
2550 +# CONFIG_MTD_ROM is not set
2551 +# CONFIG_MTD_ABSENT is not set
2552 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
2553 +
2554 +#
2555 +# Mapping drivers for chip access
2556 +#
2557 +CONFIG_MTD_COMPLEX_MAPPINGS=y
2558 +# CONFIG_MTD_PLATRAM is not set
2559 +
2560 +#
2561 +# Self-contained MTD device drivers
2562 +#
2563 +# CONFIG_MTD_SLRAM is not set
2564 +# CONFIG_MTD_PHRAM is not set
2565 +# CONFIG_MTD_MTDRAM is not set
2566 +# CONFIG_MTD_BLOCK2MTD is not set
2567 +
2568 +#
2569 +# Disk-On-Chip Device Drivers
2570 +#
2571 +# CONFIG_MTD_DOC2000 is not set
2572 +# CONFIG_MTD_DOC2001 is not set
2573 +# CONFIG_MTD_DOC2001PLUS is not set
2574 +
2575 +#
2576 +# NAND Flash Device Drivers
2577 +#
2578 +CONFIG_MTD_NAND=y
2579 +# CONFIG_MTD_NAND_VERIFY_WRITE is not set
2580 +# CONFIG_MTD_NAND_ECC_SMC is not set
2581 +CONFIG_MTD_NAND_IDS=y
2582 +# CONFIG_MTD_NAND_DISKONCHIP is not set
2583 +CONFIG_MTD_NAND_AT91=y
2584 +# CONFIG_MTD_NAND_NANDSIM is not set
2585 +
2586 +#
2587 +# OneNAND Flash Device Drivers
2588 +#
2589 +# CONFIG_MTD_ONENAND is not set
2590
2591 #
2592 # Parallel port support
2593 @@ -189,6 +463,7 @@
2594 #
2595 # Plug and Play support
2596 #
2597 +# CONFIG_PNPACPI is not set
2598
2599 #
2600 # Block devices
2601 @@ -196,28 +471,27 @@
2602 # CONFIG_BLK_DEV_COW_COMMON is not set
2603 CONFIG_BLK_DEV_LOOP=y
2604 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
2605 -CONFIG_BLK_DEV_NBD=y
2606 +# CONFIG_BLK_DEV_NBD is not set
2607 # CONFIG_BLK_DEV_UB is not set
2608 CONFIG_BLK_DEV_RAM=y
2609 CONFIG_BLK_DEV_RAM_COUNT=16
2610 -CONFIG_BLK_DEV_RAM_SIZE=4096
2611 -CONFIG_BLK_DEV_INITRD=y
2612 -CONFIG_INITRAMFS_SOURCE=""
2613 +CONFIG_BLK_DEV_RAM_SIZE=16384
2614 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
2615 # CONFIG_CDROM_PKTCDVD is not set
2616 +# CONFIG_ATA_OVER_ETH is not set
2617
2618 #
2619 -# IO Schedulers
2620 +# ATA/ATAPI/MFM/RLL support
2621 #
2622 -CONFIG_IOSCHED_NOOP=y
2623 -CONFIG_IOSCHED_AS=y
2624 -CONFIG_IOSCHED_DEADLINE=y
2625 -CONFIG_IOSCHED_CFQ=y
2626 -# CONFIG_ATA_OVER_ETH is not set
2627 +# CONFIG_IDE is not set
2628
2629 #
2630 # SCSI device support
2631 #
2632 +# CONFIG_RAID_ATTRS is not set
2633 CONFIG_SCSI=y
2634 +# CONFIG_SCSI_TGT is not set
2635 +# CONFIG_SCSI_NETLINK is not set
2636 CONFIG_SCSI_PROC_FS=y
2637
2638 #
2639 @@ -233,97 +507,61 @@
2640 #
2641 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
2642 #
2643 -# CONFIG_SCSI_MULTI_LUN is not set
2644 -# CONFIG_SCSI_CONSTANTS is not set
2645 -# CONFIG_SCSI_LOGGING is not set
2646 +CONFIG_SCSI_MULTI_LUN=y
2647 +CONFIG_SCSI_CONSTANTS=y
2648 +CONFIG_SCSI_LOGGING=y
2649 +# CONFIG_SCSI_SCAN_ASYNC is not set
2650
2651 #
2652 -# SCSI Transport Attributes
2653 +# SCSI Transports
2654 #
2655 -# CONFIG_SCSI_SPI_ATTRS is not set
2656 +CONFIG_SCSI_SPI_ATTRS=m
2657 # CONFIG_SCSI_FC_ATTRS is not set
2658 # CONFIG_SCSI_ISCSI_ATTRS is not set
2659 +# CONFIG_SCSI_SAS_ATTRS is not set
2660 +# CONFIG_SCSI_SAS_LIBSAS is not set
2661
2662 #
2663 # SCSI low-level drivers
2664 #
2665 -# CONFIG_SCSI_SATA is not set
2666 +# CONFIG_ISCSI_TCP is not set
2667 # CONFIG_SCSI_DEBUG is not set
2668
2669 #
2670 -# Multi-device support (RAID and LVM)
2671 -#
2672 -# CONFIG_MD is not set
2673 -
2674 -#
2675 -# Fusion MPT device support
2676 +# PCMCIA SCSI adapter support
2677 #
2678 -# CONFIG_FUSION is not set
2679 +# CONFIG_PCMCIA_AHA152X is not set
2680 +# CONFIG_PCMCIA_FDOMAIN is not set
2681 +# CONFIG_PCMCIA_NINJA_SCSI is not set
2682 +# CONFIG_PCMCIA_QLOGIC is not set
2683 +# CONFIG_PCMCIA_SYM53C500 is not set
2684
2685 #
2686 -# IEEE 1394 (FireWire) support
2687 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
2688 #
2689 +# CONFIG_ATA is not set
2690
2691 #
2692 -# I2O device support
2693 +# Multi-device support (RAID and LVM)
2694 #
2695 +# CONFIG_MD is not set
2696
2697 #
2698 -# Networking support
2699 +# Fusion MPT device support
2700 #
2701 -CONFIG_NET=y
2702 +# CONFIG_FUSION is not set
2703
2704 #
2705 -# Networking options
2706 +# IEEE 1394 (FireWire) support
2707 #
2708 -CONFIG_PACKET=y
2709 -# CONFIG_PACKET_MMAP is not set
2710 -CONFIG_UNIX=y
2711 -# CONFIG_NET_KEY is not set
2712 -CONFIG_INET=y
2713 -CONFIG_IP_MULTICAST=y
2714 -# CONFIG_IP_ADVANCED_ROUTER is not set
2715 -CONFIG_IP_FIB_HASH=y
2716 -CONFIG_IP_PNP=y
2717 -CONFIG_IP_PNP_DHCP=y
2718 -# CONFIG_IP_PNP_BOOTP is not set
2719 -# CONFIG_IP_PNP_RARP is not set
2720 -# CONFIG_NET_IPIP is not set
2721 -# CONFIG_NET_IPGRE is not set
2722 -# CONFIG_IP_MROUTE is not set
2723 -# CONFIG_SYN_COOKIES is not set
2724 -# CONFIG_INET_AH is not set
2725 -# CONFIG_INET_ESP is not set
2726 -# CONFIG_INET_IPCOMP is not set
2727 -# CONFIG_INET_TUNNEL is not set
2728 -# CONFIG_IP_TCPDIAG is not set
2729 -# CONFIG_IP_TCPDIAG_IPV6 is not set
2730 -# CONFIG_TCP_CONG_ADVANCED is not set
2731 -CONFIG_TCP_CONG_BIC=y
2732 -# CONFIG_IPV6 is not set
2733 -# CONFIG_NETFILTER is not set
2734 -# CONFIG_BRIDGE is not set
2735 -# CONFIG_VLAN_8021Q is not set
2736 -# CONFIG_DECNET is not set
2737 -# CONFIG_LLC2 is not set
2738 -# CONFIG_IPX is not set
2739 -# CONFIG_ATALK is not set
2740
2741 #
2742 -# QoS and/or fair queueing
2743 +# I2O device support
2744 #
2745 -# CONFIG_NET_SCHED is not set
2746 -# CONFIG_NET_CLS_ROUTE is not set
2747
2748 #
2749 -# Network testing
2750 +# Network device support
2751 #
2752 -# CONFIG_NET_PKTGEN is not set
2753 -# CONFIG_NETPOLL is not set
2754 -# CONFIG_NET_POLL_CONTROLLER is not set
2755 -# CONFIG_HAMRADIO is not set
2756 -# CONFIG_IRDA is not set
2757 -# CONFIG_BT is not set
2758 CONFIG_NETDEVICES=y
2759 # CONFIG_DUMMY is not set
2760 # CONFIG_BONDING is not set
2761 @@ -331,6 +569,11 @@
2762 # CONFIG_TUN is not set
2763
2764 #
2765 +# PHY device support
2766 +#
2767 +# CONFIG_PHYLIB is not set
2768 +
2769 +#
2770 # Ethernet (10 or 100Mbit)
2771 #
2772 CONFIG_NET_ETHERNET=y
2773 @@ -357,11 +600,20 @@
2774 # CONFIG_NET_RADIO is not set
2775
2776 #
2777 +# PCMCIA network device support
2778 +#
2779 +# CONFIG_NET_PCMCIA is not set
2780 +
2781 +#
2782 # Wan interfaces
2783 #
2784 # CONFIG_WAN is not set
2785 # CONFIG_PPP is not set
2786 # CONFIG_SLIP is not set
2787 +# CONFIG_SHAPER is not set
2788 +# CONFIG_NETCONSOLE is not set
2789 +# CONFIG_NETPOLL is not set
2790 +# CONFIG_NET_POLL_CONTROLLER is not set
2791
2792 #
2793 # ISDN subsystem
2794 @@ -372,6 +624,7 @@
2795 # Input device support
2796 #
2797 CONFIG_INPUT=y
2798 +# CONFIG_INPUT_FF_MEMLESS is not set
2799
2800 #
2801 # Userland interfaces
2802 @@ -397,9 +650,7 @@
2803 #
2804 # Hardware I/O ports
2805 #
2806 -CONFIG_SERIO=y
2807 -# CONFIG_SERIO_SERPORT is not set
2808 -# CONFIG_SERIO_RAW is not set
2809 +# CONFIG_SERIO is not set
2810 # CONFIG_GAMEPORT is not set
2811
2812 #
2813 @@ -408,6 +659,7 @@
2814 CONFIG_VT=y
2815 CONFIG_VT_CONSOLE=y
2816 CONFIG_HW_CONSOLE=y
2817 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
2818 # CONFIG_SERIAL_NONSTANDARD is not set
2819
2820 #
2821 @@ -420,11 +672,11 @@
2822 #
2823 CONFIG_SERIAL_ATMEL=y
2824 CONFIG_SERIAL_ATMEL_CONSOLE=y
2825 +# CONFIG_SERIAL_ATMEL_TTYAT is not set
2826 CONFIG_SERIAL_CORE=y
2827 CONFIG_SERIAL_CORE_CONSOLE=y
2828 CONFIG_UNIX98_PTYS=y
2829 -CONFIG_LEGACY_PTYS=y
2830 -CONFIG_LEGACY_PTY_COUNT=256
2831 +# CONFIG_LEGACY_PTYS is not set
2832
2833 #
2834 # IPMI
2835 @@ -435,21 +687,23 @@
2836 # Watchdog Cards
2837 #
2838 # CONFIG_WATCHDOG is not set
2839 +# CONFIG_HW_RANDOM is not set
2840 # CONFIG_NVRAM is not set
2841 -# CONFIG_RTC is not set
2842 -# CONFIG_AT91RM9200_RTC is not set
2843 # CONFIG_DTLK is not set
2844 # CONFIG_R3964 is not set
2845
2846 #
2847 -# Ftape, the floppy tape device driver
2848 +# PCMCIA character devices
2849 #
2850 +# CONFIG_SYNCLINK_CS is not set
2851 +# CONFIG_CARDMAN_4000 is not set
2852 +# CONFIG_CARDMAN_4040 is not set
2853 # CONFIG_RAW_DRIVER is not set
2854
2855 #
2856 # TPM devices
2857 #
2858 -# CONFIG_AT91_SPI is not set
2859 +# CONFIG_TCG_TPM is not set
2860
2861 #
2862 # I2C support
2863 @@ -457,10 +711,50 @@
2864 # CONFIG_I2C is not set
2865
2866 #
2867 +# SPI support
2868 +#
2869 +# CONFIG_SPI is not set
2870 +# CONFIG_SPI_MASTER is not set
2871 +
2872 +#
2873 +# Dallas's 1-wire bus
2874 +#
2875 +# CONFIG_W1 is not set
2876 +
2877 +#
2878 +# Hardware Monitoring support
2879 +#
2880 +CONFIG_HWMON=y
2881 +# CONFIG_HWMON_VID is not set
2882 +# CONFIG_SENSORS_ABITUGURU is not set
2883 +# CONFIG_SENSORS_F71805F is not set
2884 +# CONFIG_SENSORS_PC87427 is not set
2885 +# CONFIG_SENSORS_VT1211 is not set
2886 +CONFIG_HWMON_DEBUG_CHIP=y
2887 +
2888 +#
2889 # Misc devices
2890 #
2891
2892 #
2893 +# Multifunction device drivers
2894 +#
2895 +# CONFIG_MFD_SM501 is not set
2896 +
2897 +#
2898 +# LED devices
2899 +#
2900 +# CONFIG_NEW_LEDS is not set
2901 +
2902 +#
2903 +# LED drivers
2904 +#
2905 +
2906 +#
2907 +# LED Triggers
2908 +#
2909 +
2910 +#
2911 # Multimedia devices
2912 #
2913 # CONFIG_VIDEO_DEV is not set
2914 @@ -469,17 +763,57 @@
2915 # Digital Video Broadcasting Devices
2916 #
2917 # CONFIG_DVB is not set
2918 +# CONFIG_USB_DABUSB is not set
2919
2920 #
2921 # Graphics support
2922 #
2923 -# CONFIG_FB is not set
2924 +CONFIG_BACKLIGHT_LCD_SUPPORT=y
2925 +CONFIG_BACKLIGHT_CLASS_DEVICE=y
2926 +# CONFIG_LCD_CLASS_DEVICE is not set
2927 +CONFIG_BACKLIGHT_KB920x=y
2928 +CONFIG_FB=y
2929 +# CONFIG_FIRMWARE_EDID is not set
2930 +# CONFIG_FB_DDC is not set
2931 +CONFIG_FB_CFB_FILLRECT=y
2932 +CONFIG_FB_CFB_COPYAREA=y
2933 +CONFIG_FB_CFB_IMAGEBLIT=y
2934 +# CONFIG_FB_SVGALIB is not set
2935 +# CONFIG_FB_MACMODES is not set
2936 +# CONFIG_FB_BACKLIGHT is not set
2937 +CONFIG_FB_MODE_HELPERS=y
2938 +CONFIG_FB_TILEBLITTING=y
2939 +
2940 +#
2941 +# Frame buffer hardware drivers
2942 +#
2943 +CONFIG_FB_S1D15605=y
2944 +# CONFIG_FB_S1D13XXX is not set
2945 +# CONFIG_FB_VIRTUAL is not set
2946
2947 #
2948 # Console display driver support
2949 #
2950 # CONFIG_VGA_CONSOLE is not set
2951 CONFIG_DUMMY_CONSOLE=y
2952 +CONFIG_FRAMEBUFFER_CONSOLE=y
2953 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
2954 +CONFIG_FONTS=y
2955 +# CONFIG_FONT_8x8 is not set
2956 +# CONFIG_FONT_8x16 is not set
2957 +# CONFIG_FONT_6x11 is not set
2958 +# CONFIG_FONT_7x14 is not set
2959 +# CONFIG_FONT_PEARL_8x8 is not set
2960 +# CONFIG_FONT_ACORN_8x8 is not set
2961 +CONFIG_FONT_MINI_4x6=y
2962 +# CONFIG_FONT_SUN8x16 is not set
2963 +# CONFIG_FONT_SUN12x22 is not set
2964 +# CONFIG_FONT_10x18 is not set
2965 +
2966 +#
2967 +# Logo configuration
2968 +#
2969 +# CONFIG_LOGO is not set
2970
2971 #
2972 # Sound
2973 @@ -487,82 +821,98 @@
2974 # CONFIG_SOUND is not set
2975
2976 #
2977 +# HID Devices
2978 +#
2979 +CONFIG_HID=y
2980 +# CONFIG_HID_DEBUG is not set
2981 +
2982 +#
2983 # USB support
2984 #
2985 CONFIG_USB_ARCH_HAS_HCD=y
2986 CONFIG_USB_ARCH_HAS_OHCI=y
2987 +# CONFIG_USB_ARCH_HAS_EHCI is not set
2988 CONFIG_USB=y
2989 -CONFIG_USB_DEBUG=y
2990 +# CONFIG_USB_DEBUG is not set
2991
2992 #
2993 # Miscellaneous USB options
2994 #
2995 CONFIG_USB_DEVICEFS=y
2996 +# CONFIG_USB_DYNAMIC_MINORS is not set
2997 +# CONFIG_USB_OTG is not set
2998
2999 #
3000 # USB Host Controller Drivers
3001 #
3002 # CONFIG_USB_ISP116X_HCD is not set
3003 CONFIG_USB_OHCI_HCD=y
3004 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
3005 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
3006 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
3007 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
3008 # CONFIG_USB_SL811_HCD is not set
3009
3010 #
3011 # USB Device Class drivers
3012 #
3013 -# CONFIG_USB_BLUETOOTH_TTY is not set
3014 # CONFIG_USB_ACM is not set
3015 # CONFIG_USB_PRINTER is not set
3016
3017 #
3018 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
3019 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
3020 +#
3021 +
3022 +#
3023 +# may also be needed; see USB_STORAGE Help for more information
3024 #
3025 CONFIG_USB_STORAGE=y
3026 -CONFIG_USB_STORAGE_DEBUG=y
3027 +# CONFIG_USB_STORAGE_DEBUG is not set
3028 +# CONFIG_USB_STORAGE_DATAFAB is not set
3029 # CONFIG_USB_STORAGE_FREECOM is not set
3030 # CONFIG_USB_STORAGE_DPCM is not set
3031 +# CONFIG_USB_STORAGE_USBAT is not set
3032 +# CONFIG_USB_STORAGE_SDDR09 is not set
3033 +# CONFIG_USB_STORAGE_SDDR55 is not set
3034 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
3035 +# CONFIG_USB_STORAGE_ALAUDA is not set
3036 +# CONFIG_USB_STORAGE_KARMA is not set
3037 +CONFIG_USB_LIBUSUAL=y
3038
3039 #
3040 # USB Input Devices
3041 #
3042 -# CONFIG_USB_HID is not set
3043 -
3044 -#
3045 -# USB HID Boot Protocol drivers
3046 -#
3047 -# CONFIG_USB_KBD is not set
3048 -# CONFIG_USB_MOUSE is not set
3049 +CONFIG_USB_HID=y
3050 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
3051 +# CONFIG_HID_FF is not set
3052 +# CONFIG_USB_HIDDEV is not set
3053 # CONFIG_USB_AIPTEK is not set
3054 # CONFIG_USB_WACOM is not set
3055 # CONFIG_USB_ACECAD is not set
3056 # CONFIG_USB_KBTAB is not set
3057 # CONFIG_USB_POWERMATE is not set
3058 -# CONFIG_USB_MTOUCH is not set
3059 -# CONFIG_USB_ITMTOUCH is not set
3060 -# CONFIG_USB_EGALAX is not set
3061 +# CONFIG_USB_TOUCHSCREEN is not set
3062 +# CONFIG_USB_YEALINK is not set
3063 # CONFIG_USB_XPAD is not set
3064 # CONFIG_USB_ATI_REMOTE is not set
3065 +# CONFIG_USB_ATI_REMOTE2 is not set
3066 +# CONFIG_USB_KEYSPAN_REMOTE is not set
3067 +# CONFIG_USB_APPLETOUCH is not set
3068 +# CONFIG_USB_GTCO is not set
3069
3070 #
3071 # USB Imaging devices
3072 #
3073 +# CONFIG_USB_MDC800 is not set
3074 # CONFIG_USB_MICROTEK is not set
3075
3076 #
3077 -# USB Multimedia devices
3078 -#
3079 -# CONFIG_USB_DABUSB is not set
3080 -
3081 -#
3082 -# Video4Linux support is needed for USB Multimedia device support
3083 -#
3084 -
3085 -#
3086 # USB Network Adapters
3087 #
3088 +# CONFIG_USB_CATC is not set
3089 # CONFIG_USB_KAWETH is not set
3090 # CONFIG_USB_PEGASUS is not set
3091 +# CONFIG_USB_RTL8150 is not set
3092 +# CONFIG_USB_USBNET_MII is not set
3093 # CONFIG_USB_USBNET is not set
3094 # CONFIG_USB_MON is not set
3095
3096 @@ -580,12 +930,23 @@
3097 #
3098 # CONFIG_USB_EMI62 is not set
3099 # CONFIG_USB_EMI26 is not set
3100 +# CONFIG_USB_ADUTUX is not set
3101 +# CONFIG_USB_AUERSWALD is not set
3102 +# CONFIG_USB_RIO500 is not set
3103 +# CONFIG_USB_LEGOTOWER is not set
3104 # CONFIG_USB_LCD is not set
3105 +# CONFIG_USB_BERRY_CHARGE is not set
3106 # CONFIG_USB_LED is not set
3107 +# CONFIG_USB_CYPRESS_CY7C63 is not set
3108 # CONFIG_USB_CYTHERM is not set
3109 -# CONFIG_USB_PHIDGETKIT is not set
3110 -# CONFIG_USB_PHIDGETSERVO is not set
3111 +# CONFIG_USB_PHIDGET is not set
3112 # CONFIG_USB_IDMOUSE is not set
3113 +# CONFIG_USB_FTDI_ELAN is not set
3114 +# CONFIG_USB_APPLEDISPLAY is not set
3115 +# CONFIG_USB_LD is not set
3116 +# CONFIG_USB_TRANCEVIBRATOR is not set
3117 +# CONFIG_USB_IOWARRIOR is not set
3118 +# CONFIG_USB_TEST is not set
3119
3120 #
3121 # USB DSL modem support
3122 @@ -599,36 +960,51 @@
3123 #
3124 # MMC/SD Card support
3125 #
3126 -# CONFIG_MMC is not set
3127 +CONFIG_MMC=y
3128 +# CONFIG_MMC_DEBUG is not set
3129 +CONFIG_MMC_BLOCK=y
3130 +CONFIG_MMC_AT91=y
3131 +
3132 +#
3133 +# Real Time Clock
3134 +#
3135 +CONFIG_RTC_LIB=y
3136 +# CONFIG_RTC_CLASS is not set
3137
3138 #
3139 # File systems
3140 #
3141 CONFIG_EXT2_FS=y
3142 CONFIG_EXT2_FS_XATTR=y
3143 -# CONFIG_EXT2_FS_POSIX_ACL is not set
3144 -# CONFIG_EXT2_FS_SECURITY is not set
3145 +CONFIG_EXT2_FS_POSIX_ACL=y
3146 +CONFIG_EXT2_FS_SECURITY=y
3147 # CONFIG_EXT2_FS_XIP is not set
3148 CONFIG_EXT3_FS=y
3149 CONFIG_EXT3_FS_XATTR=y
3150 -# CONFIG_EXT3_FS_POSIX_ACL is not set
3151 -# CONFIG_EXT3_FS_SECURITY is not set
3152 +CONFIG_EXT3_FS_POSIX_ACL=y
3153 +CONFIG_EXT3_FS_SECURITY=y
3154 +# CONFIG_EXT4DEV_FS is not set
3155 CONFIG_JBD=y
3156 # CONFIG_JBD_DEBUG is not set
3157 CONFIG_FS_MBCACHE=y
3158 # CONFIG_REISERFS_FS is not set
3159 # CONFIG_JFS_FS is not set
3160 -
3161 -#
3162 -# XFS support
3163 -#
3164 +CONFIG_FS_POSIX_ACL=y
3165 # CONFIG_XFS_FS is not set
3166 +# CONFIG_GFS2_FS is not set
3167 +# CONFIG_OCFS2_FS is not set
3168 # CONFIG_MINIX_FS is not set
3169 # CONFIG_ROMFS_FS is not set
3170 -# CONFIG_QUOTA is not set
3171 +CONFIG_INOTIFY=y
3172 +CONFIG_INOTIFY_USER=y
3173 +CONFIG_QUOTA=y
3174 +# CONFIG_QFMT_V1 is not set
3175 +CONFIG_QFMT_V2=y
3176 +CONFIG_QUOTACTL=y
3177 CONFIG_DNOTIFY=y
3178 -CONFIG_AUTOFS_FS=y
3179 +# CONFIG_AUTOFS_FS is not set
3180 CONFIG_AUTOFS4_FS=y
3181 +# CONFIG_FUSE_FS is not set
3182
3183 #
3184 # CD-ROM/DVD Filesystems
3185 @@ -643,25 +1019,40 @@
3186 CONFIG_MSDOS_FS=y
3187 CONFIG_VFAT_FS=y
3188 CONFIG_FAT_DEFAULT_CODEPAGE=437
3189 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
3190 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
3191 # CONFIG_NTFS_FS is not set
3192
3193 #
3194 # Pseudo filesystems
3195 #
3196 CONFIG_PROC_FS=y
3197 +CONFIG_PROC_SYSCTL=y
3198 CONFIG_SYSFS=y
3199 -CONFIG_DEVPTS_FS_XATTR=y
3200 -# CONFIG_DEVPTS_FS_SECURITY is not set
3201 CONFIG_TMPFS=y
3202 -# CONFIG_TMPFS_XATTR is not set
3203 +# CONFIG_TMPFS_POSIX_ACL is not set
3204 # CONFIG_HUGETLB_PAGE is not set
3205 CONFIG_RAMFS=y
3206 +CONFIG_CONFIGFS_FS=y
3207
3208 #
3209 # Miscellaneous filesystems
3210 #
3211 +# CONFIG_ADFS_FS is not set
3212 +# CONFIG_AFFS_FS is not set
3213 +# CONFIG_HFS_FS is not set
3214 # CONFIG_HFSPLUS_FS is not set
3215 +# CONFIG_BEFS_FS is not set
3216 +# CONFIG_BFS_FS is not set
3217 +# CONFIG_EFS_FS is not set
3218 +CONFIG_JFFS2_FS=y
3219 +CONFIG_JFFS2_FS_DEBUG=0
3220 +CONFIG_JFFS2_FS_WRITEBUFFER=y
3221 +# CONFIG_JFFS2_SUMMARY is not set
3222 +# CONFIG_JFFS2_FS_XATTR is not set
3223 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
3224 +CONFIG_JFFS2_ZLIB=y
3225 +CONFIG_JFFS2_RTIME=y
3226 +# CONFIG_JFFS2_RUBIN is not set
3227 # CONFIG_CRAMFS is not set
3228 # CONFIG_VXFS_FS is not set
3229 # CONFIG_HPFS_FS is not set
3230 @@ -675,16 +1066,23 @@
3231 CONFIG_NFS_FS=y
3232 CONFIG_NFS_V3=y
3233 # CONFIG_NFS_V3_ACL is not set
3234 +CONFIG_NFS_V4=y
3235 +# CONFIG_NFS_DIRECTIO is not set
3236 # CONFIG_NFSD is not set
3237 CONFIG_ROOT_NFS=y
3238 CONFIG_LOCKD=y
3239 CONFIG_LOCKD_V4=y
3240 CONFIG_NFS_COMMON=y
3241 CONFIG_SUNRPC=y
3242 +CONFIG_SUNRPC_GSS=y
3243 +CONFIG_RPCSEC_GSS_KRB5=y
3244 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
3245 # CONFIG_SMB_FS is not set
3246 # CONFIG_CIFS is not set
3247 # CONFIG_NCP_FS is not set
3248 # CONFIG_CODA_FS is not set
3249 +# CONFIG_AFS_FS is not set
3250 +# CONFIG_9P_FS is not set
3251
3252 #
3253 # Partition Types
3254 @@ -734,26 +1132,51 @@
3255 # CONFIG_NLS_ISO8859_15 is not set
3256 # CONFIG_NLS_KOI8_R is not set
3257 # CONFIG_NLS_KOI8_U is not set
3258 -# CONFIG_NLS_UTF8 is not set
3259 +CONFIG_NLS_UTF8=y
3260 +
3261 +#
3262 +# Distributed Lock Manager
3263 +#
3264 +# CONFIG_DLM is not set
3265 +
3266 +#
3267 +# Profiling support
3268 +#
3269 +# CONFIG_PROFILING is not set
3270
3271 #
3272 # Kernel hacking
3273 #
3274 # CONFIG_PRINTK_TIME is not set
3275 +CONFIG_ENABLE_MUST_CHECK=y
3276 +CONFIG_MAGIC_SYSRQ=y
3277 +# CONFIG_UNUSED_SYMBOLS is not set
3278 +# CONFIG_DEBUG_FS is not set
3279 +# CONFIG_HEADERS_CHECK is not set
3280 CONFIG_DEBUG_KERNEL=y
3281 -# CONFIG_MAGIC_SYSRQ is not set
3282 -CONFIG_LOG_BUF_SHIFT=14
3283 +# CONFIG_DEBUG_SHIRQ is not set
3284 +CONFIG_LOG_BUF_SHIFT=17
3285 +CONFIG_DETECT_SOFTLOCKUP=y
3286 # CONFIG_SCHEDSTATS is not set
3287 +# CONFIG_TIMER_STATS is not set
3288 # CONFIG_DEBUG_SLAB is not set
3289 -# CONFIG_DEBUG_SPINLOCK is not set
3290 -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
3291 +# CONFIG_DEBUG_RT_MUTEXES is not set
3292 +# CONFIG_RT_MUTEX_TESTER is not set
3293 +CONFIG_DEBUG_SPINLOCK=y
3294 +# CONFIG_DEBUG_MUTEXES is not set
3295 +CONFIG_DEBUG_SPINLOCK_SLEEP=y
3296 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
3297 # CONFIG_DEBUG_KOBJECT is not set
3298 CONFIG_DEBUG_BUGVERBOSE=y
3299 # CONFIG_DEBUG_INFO is not set
3300 -# CONFIG_DEBUG_FS is not set
3301 +# CONFIG_DEBUG_VM is not set
3302 +# CONFIG_DEBUG_LIST is not set
3303 CONFIG_FRAME_POINTER=y
3304 -CONFIG_DEBUG_USER=y
3305 -CONFIG_DEBUG_ERRORS=y
3306 +CONFIG_FORCED_INLINING=y
3307 +# CONFIG_RCU_TORTURE_TEST is not set
3308 +# CONFIG_FAULT_INJECTION is not set
3309 +# CONFIG_DEBUG_USER is not set
3310 +# CONFIG_DEBUG_ERRORS is not set
3311 CONFIG_DEBUG_LL=y
3312 # CONFIG_DEBUG_ICEDCC is not set
3313
3314 @@ -766,7 +1189,43 @@
3315 #
3316 # Cryptographic options
3317 #
3318 -# CONFIG_CRYPTO is not set
3319 +CONFIG_CRYPTO=y
3320 +CONFIG_CRYPTO_ALGAPI=y
3321 +CONFIG_CRYPTO_BLKCIPHER=y
3322 +CONFIG_CRYPTO_HASH=m
3323 +CONFIG_CRYPTO_MANAGER=y
3324 +CONFIG_CRYPTO_HMAC=m
3325 +# CONFIG_CRYPTO_XCBC is not set
3326 +# CONFIG_CRYPTO_NULL is not set
3327 +# CONFIG_CRYPTO_MD4 is not set
3328 +CONFIG_CRYPTO_MD5=y
3329 +# CONFIG_CRYPTO_SHA1 is not set
3330 +# CONFIG_CRYPTO_SHA256 is not set
3331 +# CONFIG_CRYPTO_SHA512 is not set
3332 +# CONFIG_CRYPTO_WP512 is not set
3333 +# CONFIG_CRYPTO_TGR192 is not set
3334 +# CONFIG_CRYPTO_GF128MUL is not set
3335 +# CONFIG_CRYPTO_ECB is not set
3336 +CONFIG_CRYPTO_CBC=y
3337 +CONFIG_CRYPTO_PCBC=m
3338 +# CONFIG_CRYPTO_LRW is not set
3339 +CONFIG_CRYPTO_DES=y
3340 +# CONFIG_CRYPTO_FCRYPT is not set
3341 +# CONFIG_CRYPTO_BLOWFISH is not set
3342 +# CONFIG_CRYPTO_TWOFISH is not set
3343 +# CONFIG_CRYPTO_SERPENT is not set
3344 +# CONFIG_CRYPTO_AES is not set
3345 +# CONFIG_CRYPTO_CAST5 is not set
3346 +# CONFIG_CRYPTO_CAST6 is not set
3347 +# CONFIG_CRYPTO_TEA is not set
3348 +# CONFIG_CRYPTO_ARC4 is not set
3349 +# CONFIG_CRYPTO_KHAZAD is not set
3350 +# CONFIG_CRYPTO_ANUBIS is not set
3351 +# CONFIG_CRYPTO_DEFLATE is not set
3352 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
3353 +# CONFIG_CRYPTO_CRC32C is not set
3354 +# CONFIG_CRYPTO_CAMELLIA is not set
3355 +# CONFIG_CRYPTO_TEST is not set
3356
3357 #
3358 # Hardware crypto devices
3359 @@ -775,6 +1234,14 @@
3360 #
3361 # Library routines
3362 #
3363 +CONFIG_BITREVERSE=y
3364 # CONFIG_CRC_CCITT is not set
3365 +# CONFIG_CRC16 is not set
3366 CONFIG_CRC32=y
3367 # CONFIG_LIBCRC32C is not set
3368 +CONFIG_AUDIT_GENERIC=y
3369 +CONFIG_ZLIB_INFLATE=y
3370 +CONFIG_ZLIB_DEFLATE=y
3371 +CONFIG_PLIST=y
3372 +CONFIG_HAS_IOMEM=y
3373 +CONFIG_HAS_IOPORT=y
3374 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200.c
3375 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200.c 2007-06-17 04:09:12.000000000 +0200
3376 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200.c 2007-07-29 05:23:04.000000000 +0200
3377 @@ -267,6 +267,33 @@
3378
3379
3380 /* --------------------------------------------------------------------
3381 + * Timer/Counter library initialization
3382 + * -------------------------------------------------------------------- */
3383 +#ifdef CONFIG_ATMEL_TCLIB
3384 +
3385 +#include "tclib.h"
3386 +
3387 +static struct atmel_tcblock at91rm9200_tcblocks[] = {
3388 + [0] = {
3389 + .physaddr = AT91RM9200_BASE_TCB0,
3390 + .irq = { AT91RM9200_ID_TC0, AT91RM9200_ID_TC1, AT91RM9200_ID_TC2 },
3391 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3392 + },
3393 + [1] = {
3394 + .physaddr = AT91RM9200_BASE_TCB1,
3395 + .irq = { AT91RM9200_ID_TC3, AT91RM9200_ID_TC4, AT91RM9200_ID_TC5 },
3396 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3397 + },
3398 +};
3399 +
3400 +#define at91rm9200_tc_init() atmel_tc_init(at91rm9200_tcblocks, ARRAY_SIZE(at91rm9200_tcblocks))
3401 +
3402 +#else
3403 +#define at91rm9200_tc_init() do {} while(0)
3404 +#endif
3405 +
3406 +
3407 +/* --------------------------------------------------------------------
3408 * AT91RM9200 processor initialization
3409 * -------------------------------------------------------------------- */
3410 void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks)
3411 @@ -288,6 +315,9 @@
3412
3413 /* Initialize GPIO subsystem */
3414 at91_gpio_init(at91rm9200_gpio, banks);
3415 +
3416 + /* Initialize the Timer/Counter blocks */
3417 + at91rm9200_tc_init();
3418 }
3419
3420
3421 @@ -301,28 +331,28 @@
3422 static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
3423 7, /* Advanced Interrupt Controller (FIQ) */
3424 7, /* System Peripherals */
3425 - 0, /* Parallel IO Controller A */
3426 - 0, /* Parallel IO Controller B */
3427 - 0, /* Parallel IO Controller C */
3428 - 0, /* Parallel IO Controller D */
3429 - 6, /* USART 0 */
3430 - 6, /* USART 1 */
3431 - 6, /* USART 2 */
3432 - 6, /* USART 3 */
3433 + 1, /* Parallel IO Controller A */
3434 + 1, /* Parallel IO Controller B */
3435 + 1, /* Parallel IO Controller C */
3436 + 1, /* Parallel IO Controller D */
3437 + 5, /* USART 0 */
3438 + 5, /* USART 1 */
3439 + 5, /* USART 2 */
3440 + 5, /* USART 3 */
3441 0, /* Multimedia Card Interface */
3442 - 4, /* USB Device Port */
3443 - 0, /* Two-Wire Interface */
3444 - 6, /* Serial Peripheral Interface */
3445 - 5, /* Serial Synchronous Controller 0 */
3446 - 5, /* Serial Synchronous Controller 1 */
3447 - 5, /* Serial Synchronous Controller 2 */
3448 + 2, /* USB Device Port */
3449 + 6, /* Two-Wire Interface */
3450 + 5, /* Serial Peripheral Interface */
3451 + 4, /* Serial Synchronous Controller 0 */
3452 + 4, /* Serial Synchronous Controller 1 */
3453 + 4, /* Serial Synchronous Controller 2 */
3454 0, /* Timer Counter 0 */
3455 0, /* Timer Counter 1 */
3456 0, /* Timer Counter 2 */
3457 0, /* Timer Counter 3 */
3458 0, /* Timer Counter 4 */
3459 0, /* Timer Counter 5 */
3460 - 3, /* USB Host port */
3461 + 2, /* USB Host port */
3462 3, /* Ethernet MAC */
3463 0, /* Advanced Interrupt Controller (IRQ0) */
3464 0, /* Advanced Interrupt Controller (IRQ1) */
3465 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200_devices.c
3466 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200_devices.c 2007-06-17 04:09:12.000000000 +0200
3467 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200_devices.c 2007-07-29 05:23:04.000000000 +0200
3468 @@ -477,7 +477,18 @@
3469 * SPI
3470 * -------------------------------------------------------------------- */
3471
3472 -#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
3473 +#if defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) /* legacy SPI driver */
3474 +#define SPI_DEVNAME "at91_spi"
3475 +
3476 +#elif defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) /* SPI bitbanging driver */
3477 +#define SPI_DEVNAME "at91_spi"
3478 +
3479 +#elif defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) /* new SPI driver */
3480 +#define SPI_DEVNAME "atmel_spi"
3481 +
3482 +#endif
3483 +
3484 +#ifdef SPI_DEVNAME
3485 static u64 spi_dmamask = 0xffffffffUL;
3486
3487 static struct resource spi_resources[] = {
3488 @@ -494,7 +505,7 @@
3489 };
3490
3491 static struct platform_device at91rm9200_spi_device = {
3492 - .name = "at91_spi",
3493 + .name = SPI_DEVNAME,
3494 .id = 0,
3495 .dev = {
3496 .dma_mask = &spi_dmamask,
3497 @@ -603,6 +614,32 @@
3498 #endif
3499
3500
3501 +#if defined(CONFIG_NEW_LEDS)
3502 +
3503 +static struct platform_device at91_leds = {
3504 + .name = "at91_leds",
3505 + .id = -1,
3506 +};
3507 +
3508 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3509 +{
3510 + if (!nr)
3511 + return;
3512 +
3513 + at91_leds.dev.platform_data = leds;
3514 +
3515 + for ( ; nr; nr--, leds++) {
3516 + leds->index = nr; /* first record stores number of leds */
3517 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3518 + }
3519 +
3520 + platform_device_register(&at91_leds);
3521 +}
3522 +#else
3523 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3524 +#endif
3525 +
3526 +
3527 /* --------------------------------------------------------------------
3528 * UART
3529 * -------------------------------------------------------------------- */
3530 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260.c
3531 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260.c 2007-06-17 04:09:12.000000000 +0200
3532 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260.c 2007-07-29 05:23:04.000000000 +0200
3533 @@ -269,6 +269,33 @@
3534
3535
3536 /* --------------------------------------------------------------------
3537 + * Timer/Counter library initialization
3538 + * -------------------------------------------------------------------- */
3539 +#ifdef CONFIG_ATMEL_TCLIB
3540 +
3541 +#include "tclib.h"
3542 +
3543 +static struct atmel_tcblock at91sam9260_tcblocks[] = {
3544 + [0] = {
3545 + .physaddr = AT91SAM9260_BASE_TCB0,
3546 + .irq = { AT91SAM9260_ID_TC0, AT91SAM9260_ID_TC1, AT91SAM9260_ID_TC2 },
3547 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3548 + },
3549 + [1] = {
3550 + .physaddr = AT91SAM9260_BASE_TCB1,
3551 + .irq = { AT91SAM9260_ID_TC3, AT91SAM9260_ID_TC4, AT91SAM9260_ID_TC5 },
3552 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3553 + },
3554 +};
3555 +
3556 +#define at91sam9260_tc_init() atmel_tc_init(at91sam9260_tcblocks, ARRAY_SIZE(at91sam9260_tcblocks))
3557 +
3558 +#else
3559 +#define at91sam9260_tc_init() do {} while(0)
3560 +#endif
3561 +
3562 +
3563 +/* --------------------------------------------------------------------
3564 * AT91SAM9260 processor initialization
3565 * -------------------------------------------------------------------- */
3566
3567 @@ -315,6 +342,9 @@
3568
3569 /* Register GPIO subsystem */
3570 at91_gpio_init(at91sam9260_gpio, 3);
3571 +
3572 + /* Initialize the Timer/Counter blocks */
3573 + at91sam9260_tc_init();
3574 }
3575
3576 /* --------------------------------------------------------------------
3577 @@ -327,30 +357,30 @@
3578 static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
3579 7, /* Advanced Interrupt Controller */
3580 7, /* System Peripherals */
3581 - 0, /* Parallel IO Controller A */
3582 - 0, /* Parallel IO Controller B */
3583 - 0, /* Parallel IO Controller C */
3584 + 1, /* Parallel IO Controller A */
3585 + 1, /* Parallel IO Controller B */
3586 + 1, /* Parallel IO Controller C */
3587 0, /* Analog-to-Digital Converter */
3588 - 6, /* USART 0 */
3589 - 6, /* USART 1 */
3590 - 6, /* USART 2 */
3591 + 5, /* USART 0 */
3592 + 5, /* USART 1 */
3593 + 5, /* USART 2 */
3594 0, /* Multimedia Card Interface */
3595 - 4, /* USB Device Port */
3596 - 0, /* Two-Wire Interface */
3597 - 6, /* Serial Peripheral Interface 0 */
3598 - 6, /* Serial Peripheral Interface 1 */
3599 + 2, /* USB Device Port */
3600 + 6, /* Two-Wire Interface */
3601 + 5, /* Serial Peripheral Interface 0 */
3602 + 5, /* Serial Peripheral Interface 1 */
3603 5, /* Serial Synchronous Controller */
3604 0,
3605 0,
3606 0, /* Timer Counter 0 */
3607 0, /* Timer Counter 1 */
3608 0, /* Timer Counter 2 */
3609 - 3, /* USB Host port */
3610 + 2, /* USB Host port */
3611 3, /* Ethernet */
3612 0, /* Image Sensor Interface */
3613 - 6, /* USART 3 */
3614 - 6, /* USART 4 */
3615 - 6, /* USART 5 */
3616 + 5, /* USART 3 */
3617 + 5, /* USART 4 */
3618 + 5, /* USART 5 */
3619 0, /* Timer Counter 3 */
3620 0, /* Timer Counter 4 */
3621 0, /* Timer Counter 5 */
3622 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260_devices.c
3623 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260_devices.c 2007-06-17 04:09:12.000000000 +0200
3624 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260_devices.c 2007-07-29 05:23:04.000000000 +0200
3625 @@ -524,6 +524,32 @@
3626 #endif
3627
3628
3629 +#if defined(CONFIG_NEW_LEDS)
3630 +
3631 +static struct platform_device at91_leds = {
3632 + .name = "at91_leds",
3633 + .id = -1,
3634 +};
3635 +
3636 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3637 +{
3638 + if (!nr)
3639 + return;
3640 +
3641 + at91_leds.dev.platform_data = leds;
3642 +
3643 + for ( ; nr; nr--, leds++) {
3644 + leds->index = nr; /* first record stores number of leds */
3645 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3646 + }
3647 +
3648 + platform_device_register(&at91_leds);
3649 +}
3650 +#else
3651 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3652 +#endif
3653 +
3654 +
3655 /* --------------------------------------------------------------------
3656 * UART
3657 * -------------------------------------------------------------------- */
3658 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261.c
3659 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261.c 2007-06-17 04:09:12.000000000 +0200
3660 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261.c 2007-07-29 05:23:04.000000000 +0200
3661 @@ -247,6 +247,28 @@
3662
3663
3664 /* --------------------------------------------------------------------
3665 + * Timer/Counter library initialization
3666 + * -------------------------------------------------------------------- */
3667 +#ifdef CONFIG_ATMEL_TCLIB
3668 +
3669 +#include "tclib.h"
3670 +
3671 +static struct atmel_tcblock at91sam9261_tcblocks[] = {
3672 + [0] = {
3673 + .physaddr = AT91SAM9261_BASE_TCB0,
3674 + .irq = { AT91SAM9261_ID_TC0, AT91SAM9261_ID_TC1, AT91SAM9261_ID_TC2 },
3675 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3676 + }
3677 +};
3678 +
3679 +#define at91sam9261_tc_init() atmel_tc_init(at91sam9261_tcblocks, ARRAY_SIZE(at91sam9261_tcblocks))
3680 +
3681 +#else
3682 +#define at91sam9261_tc_init() do {} while(0)
3683 +#endif
3684 +
3685 +
3686 +/* --------------------------------------------------------------------
3687 * AT91SAM9261 processor initialization
3688 * -------------------------------------------------------------------- */
3689
3690 @@ -267,6 +289,9 @@
3691
3692 /* Register GPIO subsystem */
3693 at91_gpio_init(at91sam9261_gpio, 3);
3694 +
3695 + /* Initialize the Timer/Counter blocks */
3696 + at91sam9261_tc_init();
3697 }
3698
3699 /* --------------------------------------------------------------------
3700 @@ -279,25 +304,25 @@
3701 static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
3702 7, /* Advanced Interrupt Controller */
3703 7, /* System Peripherals */
3704 - 0, /* Parallel IO Controller A */
3705 - 0, /* Parallel IO Controller B */
3706 - 0, /* Parallel IO Controller C */
3707 - 0,
3708 - 6, /* USART 0 */
3709 - 6, /* USART 1 */
3710 - 6, /* USART 2 */
3711 + 1, /* Parallel IO Controller A */
3712 + 1, /* Parallel IO Controller B */
3713 + 1, /* Parallel IO Controller C */
3714 + 0,
3715 + 5, /* USART 0 */
3716 + 5, /* USART 1 */
3717 + 5, /* USART 2 */
3718 0, /* Multimedia Card Interface */
3719 - 4, /* USB Device Port */
3720 - 0, /* Two-Wire Interface */
3721 - 6, /* Serial Peripheral Interface 0 */
3722 - 6, /* Serial Peripheral Interface 1 */
3723 - 5, /* Serial Synchronous Controller 0 */
3724 - 5, /* Serial Synchronous Controller 1 */
3725 - 5, /* Serial Synchronous Controller 2 */
3726 + 2, /* USB Device Port */
3727 + 6, /* Two-Wire Interface */
3728 + 5, /* Serial Peripheral Interface 0 */
3729 + 5, /* Serial Peripheral Interface 1 */
3730 + 4, /* Serial Synchronous Controller 0 */
3731 + 4, /* Serial Synchronous Controller 1 */
3732 + 4, /* Serial Synchronous Controller 2 */
3733 0, /* Timer Counter 0 */
3734 0, /* Timer Counter 1 */
3735 0, /* Timer Counter 2 */
3736 - 3, /* USB Host port */
3737 + 2, /* USB Host port */
3738 3, /* LCD Controller */
3739 0,
3740 0,
3741 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261_devices.c
3742 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261_devices.c 2007-06-17 04:09:12.000000000 +0200
3743 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261_devices.c 2007-07-29 05:23:04.000000000 +0200
3744 @@ -14,6 +14,9 @@
3745 #include <asm/mach/map.h>
3746
3747 #include <linux/platform_device.h>
3748 +#include <linux/fb.h>
3749 +
3750 +#include <video/atmel_lcdc.h>
3751
3752 #include <asm/arch/board.h>
3753 #include <asm/arch/gpio.h>
3754 @@ -522,6 +525,32 @@
3755 #endif
3756
3757
3758 +#if defined(CONFIG_NEW_LEDS)
3759 +
3760 +static struct platform_device at91_leds = {
3761 + .name = "at91_leds",
3762 + .id = -1,
3763 +};
3764 +
3765 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3766 +{
3767 + if (!nr)
3768 + return;
3769 +
3770 + at91_leds.dev.platform_data = leds;
3771 +
3772 + for ( ; nr; nr--, leds++) {
3773 + leds->index = nr; /* first record stores number of leds */
3774 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3775 + }
3776 +
3777 + platform_device_register(&at91_leds);
3778 +}
3779 +#else
3780 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3781 +#endif
3782 +
3783 +
3784 /* --------------------------------------------------------------------
3785 * UART
3786 * -------------------------------------------------------------------- */
3787 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263.c
3788 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263.c 2007-06-17 04:09:12.000000000 +0200
3789 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263.c 2007-07-29 05:23:04.000000000 +0200
3790 @@ -273,6 +273,28 @@
3791
3792
3793 /* --------------------------------------------------------------------
3794 + * Timer/Counter library initialization
3795 + * -------------------------------------------------------------------- */
3796 +#ifdef CONFIG_ATMEL_TCLIB
3797 +
3798 +#include "tclib.h"
3799 +
3800 +static struct atmel_tcblock at91sam9263_tcblocks[] = {
3801 + [0] = {
3802 + .physaddr = AT91SAM9263_BASE_TCB0,
3803 + .irq = { AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB },
3804 + .clk = { &tcb_clk, &tcb_clk, &tcb_clk },
3805 + }
3806 +};
3807 +
3808 +#define at91sam9263_tc_init() atmel_tc_init(at91sam9263_tcblocks, ARRAY_SIZE(at91sam9263_tcblocks))
3809 +
3810 +#else
3811 +#define at91sam9263_tc_init() do {} while(0)
3812 +#endif
3813 +
3814 +
3815 +/* --------------------------------------------------------------------
3816 * AT91SAM9263 processor initialization
3817 * -------------------------------------------------------------------- */
3818
3819 @@ -292,6 +314,9 @@
3820
3821 /* Register GPIO subsystem */
3822 at91_gpio_init(at91sam9263_gpio, 5);
3823 +
3824 + /* Initialize the Timer/Counter blocks */
3825 + at91sam9263_tc_init();
3826 }
3827
3828 /* --------------------------------------------------------------------
3829 @@ -304,34 +329,34 @@
3830 static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
3831 7, /* Advanced Interrupt Controller (FIQ) */
3832 7, /* System Peripherals */
3833 - 0, /* Parallel IO Controller A */
3834 - 0, /* Parallel IO Controller B */
3835 - 0, /* Parallel IO Controller C, D and E */
3836 + 1, /* Parallel IO Controller A */
3837 + 1, /* Parallel IO Controller B */
3838 + 1, /* Parallel IO Controller C, D and E */
3839 0,
3840 0,
3841 - 6, /* USART 0 */
3842 - 6, /* USART 1 */
3843 - 6, /* USART 2 */
3844 + 5, /* USART 0 */
3845 + 5, /* USART 1 */
3846 + 5, /* USART 2 */
3847 0, /* Multimedia Card Interface 0 */
3848 0, /* Multimedia Card Interface 1 */
3849 - 4, /* CAN */
3850 - 0, /* Two-Wire Interface */
3851 - 6, /* Serial Peripheral Interface 0 */
3852 - 6, /* Serial Peripheral Interface 1 */
3853 - 5, /* Serial Synchronous Controller 0 */
3854 - 5, /* Serial Synchronous Controller 1 */
3855 - 6, /* AC97 Controller */
3856 + 3, /* CAN */
3857 + 6, /* Two-Wire Interface */
3858 + 5, /* Serial Peripheral Interface 0 */
3859 + 5, /* Serial Peripheral Interface 1 */
3860 + 4, /* Serial Synchronous Controller 0 */
3861 + 4, /* Serial Synchronous Controller 1 */
3862 + 5, /* AC97 Controller */
3863 0, /* Timer Counter 0, 1 and 2 */
3864 0, /* Pulse Width Modulation Controller */
3865 3, /* Ethernet */
3866 0,
3867 0, /* 2D Graphic Engine */
3868 - 3, /* USB Device Port */
3869 + 2, /* USB Device Port */
3870 0, /* Image Sensor Interface */
3871 3, /* LDC Controller */
3872 0, /* DMA Controller */
3873 0,
3874 - 3, /* USB Host port */
3875 + 2, /* USB Host port */
3876 0, /* Advanced Interrupt Controller (IRQ0) */
3877 0, /* Advanced Interrupt Controller (IRQ1) */
3878 };
3879 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263_devices.c
3880 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263_devices.c 2007-06-17 04:09:12.000000000 +0200
3881 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263_devices.c 2007-07-29 05:23:04.000000000 +0200
3882 @@ -13,6 +13,9 @@
3883 #include <asm/mach/map.h>
3884
3885 #include <linux/platform_device.h>
3886 +#include <linux/fb.h>
3887 +
3888 +#include <video/atmel_lcdc.h>
3889
3890 #include <asm/arch/board.h>
3891 #include <asm/arch/gpio.h>
3892 @@ -625,6 +628,56 @@
3893
3894
3895 /* --------------------------------------------------------------------
3896 + * Image Sensor Interface
3897 + * -------------------------------------------------------------------- */
3898 +
3899 +#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
3900 +
3901 +struct resource isi_resources[] = {
3902 + [0] = {
3903 + .start = AT91SAM9263_BASE_ISI,
3904 + .end = AT91SAM9263_BASE_ISI + SZ_16K - 1,
3905 + .flags = IORESOURCE_MEM,
3906 + },
3907 + [1] = {
3908 + .start = AT91SAM9263_ID_ISI,
3909 + .end = AT91SAM9263_ID_ISI,
3910 + .flags = IORESOURCE_IRQ,
3911 + },
3912 +};
3913 +
3914 +static struct platform_device at91sam9263_isi_device = {
3915 + .name = "at91_isi",
3916 + .id = -1,
3917 + .resource = isi_resources,
3918 + .num_resources = ARRAY_SIZE(isi_resources),
3919 +};
3920 +
3921 +void __init at91_add_device_isi(void)
3922 +{
3923 + at91_set_A_periph(AT91_PIN_PE0, 0); /* ISI_D0 */
3924 + at91_set_A_periph(AT91_PIN_PE1, 0); /* ISI_D1 */
3925 + at91_set_A_periph(AT91_PIN_PE2, 0); /* ISI_D2 */
3926 + at91_set_A_periph(AT91_PIN_PE3, 0); /* ISI_D3 */
3927 + at91_set_A_periph(AT91_PIN_PE4, 0); /* ISI_D4 */
3928 + at91_set_A_periph(AT91_PIN_PE5, 0); /* ISI_D5 */
3929 + at91_set_A_periph(AT91_PIN_PE6, 0); /* ISI_D6 */
3930 + at91_set_A_periph(AT91_PIN_PE7, 0); /* ISI_D7 */
3931 + at91_set_A_periph(AT91_PIN_PE8, 0); /* ISI_PCK */
3932 + at91_set_A_periph(AT91_PIN_PE9, 0); /* ISI_HSYNC */
3933 + at91_set_A_periph(AT91_PIN_PE10, 0); /* ISI_VSYNC */
3934 + at91_set_B_periph(AT91_PIN_PE11, 0); /* ISI_MCK (PCK3) */
3935 + at91_set_B_periph(AT91_PIN_PE12, 0); /* ISI_PD8 */
3936 + at91_set_B_periph(AT91_PIN_PE13, 0); /* ISI_PD9 */
3937 + at91_set_B_periph(AT91_PIN_PE14, 0); /* ISI_PD10 */
3938 + at91_set_B_periph(AT91_PIN_PE15, 0); /* ISI_PD11 */
3939 +}
3940 +#else
3941 +void __init at91_add_device_isi(void) {}
3942 +#endif
3943 +
3944 +
3945 +/* --------------------------------------------------------------------
3946 * LCD Controller
3947 * -------------------------------------------------------------------- */
3948
3949 @@ -715,6 +768,32 @@
3950 #endif
3951
3952
3953 +#if defined(CONFIG_NEW_LEDS)
3954 +
3955 +static struct platform_device at91_leds = {
3956 + .name = "at91_leds",
3957 + .id = -1,
3958 +};
3959 +
3960 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3961 +{
3962 + if (!nr)
3963 + return;
3964 +
3965 + at91_leds.dev.platform_data = leds;
3966 +
3967 + for ( ; nr; nr--, leds++) {
3968 + leds->index = nr; /* first record stores number of leds */
3969 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3970 + }
3971 +
3972 + platform_device_register(&at91_leds);
3973 +}
3974 +#else
3975 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3976 +#endif
3977 +
3978 +
3979 /* --------------------------------------------------------------------
3980 * UART
3981 * -------------------------------------------------------------------- */
3982 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl.c
3983 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl.c 2007-06-17 04:09:12.000000000 +0200
3984 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl.c 2007-07-29 05:23:04.000000000 +0200
3985 @@ -246,6 +246,28 @@
3986
3987
3988 /* --------------------------------------------------------------------
3989 + * Timer/Counter library initialization
3990 + * -------------------------------------------------------------------- */
3991 +#ifdef CONFIG_ATMEL_TCLIB
3992 +
3993 +#include "tclib.h"
3994 +
3995 +static struct atmel_tcblock at91sam9rl_tcblocks[] = {
3996 + [0] = {
3997 + .physaddr = AT91SAM9RL_BASE_TCB0,
3998 + .irq = { AT91SAM9RL_ID_TC0, AT91SAM9RL_ID_TC1, AT91SAM9RL_ID_TC2 },
3999 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
4000 + }
4001 +};
4002 +
4003 +#define at91sam9rl_tc_init() atmel_tc_init(at91sam9rl_tcblocks, ARRAY_SIZE(at91sam9rl_tcblocks))
4004 +
4005 +#else
4006 +#define at91sam9rl_tc_init() do {} while(0)
4007 +#endif
4008 +
4009 +
4010 +/* --------------------------------------------------------------------
4011 * AT91SAM9RL processor initialization
4012 * -------------------------------------------------------------------- */
4013
4014 @@ -284,6 +306,9 @@
4015
4016 /* Register GPIO subsystem */
4017 at91_gpio_init(at91sam9rl_gpio, 4);
4018 +
4019 + /* Initialize the Timer/Counter blocks */
4020 + at91sam9rl_tc_init();
4021 }
4022
4023 /* --------------------------------------------------------------------
4024 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl_devices.c
4025 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl_devices.c 2007-06-17 04:09:12.000000000 +0200
4026 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl_devices.c 2007-07-29 05:23:04.000000000 +0200
4027 @@ -370,6 +370,32 @@
4028 #endif
4029
4030
4031 +#if defined(CONFIG_NEW_LEDS)
4032 +
4033 +static struct platform_device at91_leds = {
4034 + .name = "at91_leds",
4035 + .id = -1,
4036 +};
4037 +
4038 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
4039 +{
4040 + if (!nr)
4041 + return;
4042 +
4043 + at91_leds.dev.platform_data = leds;
4044 +
4045 + for ( ; nr; nr--, leds++) {
4046 + leds->index = nr; /* first record stores number of leds */
4047 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
4048 + }
4049 +
4050 + platform_device_register(&at91_leds);
4051 +}
4052 +#else
4053 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
4054 +#endif
4055 +
4056 +
4057 /* --------------------------------------------------------------------
4058 * UART
4059 * -------------------------------------------------------------------- */
4060 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-cam60.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-cam60.c
4061 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-cam60.c 1970-01-01 01:00:00.000000000 +0100
4062 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-cam60.c 2007-07-29 05:23:04.000000000 +0200
4063 @@ -0,0 +1,148 @@
4064 +/*
4065 + * KwikByte CAM60
4066 + *
4067 + * based on board-sam9260ek.c
4068 + * Copyright (C) 2005 SAN People
4069 + * Copyright (C) 2006 Atmel
4070 + *
4071 + * This program is free software; you can redistribute it and/or modify
4072 + * it under the terms of the GNU General Public License as published by
4073 + * the Free Software Foundation; either version 2 of the License, or
4074 + * (at your option) any later version.
4075 + *
4076 + * This program is distributed in the hope that it will be useful,
4077 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4078 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4079 + * GNU General Public License for more details.
4080 + *
4081 + * You should have received a copy of the GNU General Public License
4082 + * along with this program; if not, write to the Free Software
4083 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4084 + */
4085 +
4086 +#include <linux/types.h>
4087 +#include <linux/init.h>
4088 +#include <linux/mm.h>
4089 +#include <linux/module.h>
4090 +#include <linux/platform_device.h>
4091 +#include <linux/spi/spi.h>
4092 +#include <linux/spi/flash.h>
4093 +
4094 +#include <asm/hardware.h>
4095 +#include <asm/setup.h>
4096 +#include <asm/mach-types.h>
4097 +#include <asm/irq.h>
4098 +
4099 +#include <asm/mach/arch.h>
4100 +#include <asm/mach/map.h>
4101 +#include <asm/mach/irq.h>
4102 +
4103 +#include <asm/arch/board.h>
4104 +#include <asm/arch/gpio.h>
4105 +#include <asm/arch/at91sam926x_mc.h>
4106 +
4107 +#include "generic.h"
4108 +
4109 +
4110 +/*
4111 + * Serial port configuration.
4112 + * 0 .. 5 = USART0 .. USART5
4113 + * 6 = DBGU
4114 + */
4115 +static struct at91_uart_config __initdata cam60_uart_config = {
4116 + .console_tty = 0, /* ttyS0 */
4117 + .nr_tty = 1,
4118 + .tty_map = { 6, -1, -1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
4119 +};
4120 +
4121 +static void __init cam60_map_io(void)
4122 +{
4123 + /* Initialize processor: 10 MHz crystal */
4124 + at91sam9260_initialize(10000000);
4125 +
4126 + /* Setup the serial ports and console */
4127 + at91_init_serial(&cam60_uart_config);
4128 +}
4129 +
4130 +static void __init cam60_init_irq(void)
4131 +{
4132 + at91sam9260_init_interrupts(NULL);
4133 +}
4134 +
4135 +
4136 +/*
4137 + * SPI devices.
4138 + */
4139 +#if defined(CONFIG_MTD_DATAFLASH)
4140 +static struct mtd_partition __initdata cam60_spi_partitions[] = {
4141 + {
4142 + .name = "BOOT1",
4143 + .offset = 0,
4144 + .size = 4 * 1056,
4145 + },
4146 + {
4147 + .name = "BOOT2",
4148 + .offset = MTDPART_OFS_NXTBLK,
4149 + .size = 256 * 1056,
4150 + },
4151 + {
4152 + .name = "kernel",
4153 + .offset = MTDPART_OFS_NXTBLK,
4154 + .size = 2222 * 1056,
4155 + },
4156 + {
4157 + .name = "file system",
4158 + .offset = MTDPART_OFS_NXTBLK,
4159 + .size = MTDPART_SIZ_FULL,
4160 + },
4161 +};
4162 +
4163 +static struct flash_platform_data __initdata cam60_spi_flash_platform_data = {
4164 + .name = "spi_flash",
4165 + .parts = cam60_spi_partitions,
4166 + .nr_parts = ARRAY_SIZE(cam60_spi_partitions)
4167 +};
4168 +#endif
4169 +
4170 +static struct spi_board_info cam60_spi_devices[] = {
4171 +#if defined(CONFIG_MTD_DATAFLASH)
4172 + { /* DataFlash chip */
4173 + .modalias = "mtd_dataflash",
4174 + .chip_select = 0,
4175 + .max_speed_hz = 15 * 1000 * 1000,
4176 + .bus_num = 0,
4177 + .platform_data = &cam60_spi_flash_platform_data
4178 + },
4179 +#endif
4180 +};
4181 +
4182 +
4183 +/*
4184 + * MACB Ethernet device
4185 + */
4186 +static struct __initdata at91_eth_data cam60_macb_data = {
4187 + .phy_irq_pin = AT91_PIN_PB5,
4188 + .is_rmii = 0,
4189 +};
4190 +
4191 +
4192 +static void __init cam60_board_init(void)
4193 +{
4194 + /* Serial */
4195 + at91_add_device_serial();
4196 + /* SPI */
4197 + at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
4198 + /* Ethernet */
4199 + at91_add_device_eth(&cam60_macb_data);
4200 +}
4201 +
4202 +MACHINE_START(CAM60, "KwikByte CAM60")
4203 + /* Maintainer: KwikByte */
4204 + .phys_io = AT91_BASE_SYS,
4205 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
4206 + .boot_params = AT91_SDRAM_BASE + 0x100,
4207 + .timer = &at91sam926x_timer,
4208 + .map_io = cam60_map_io,
4209 + .init_irq = cam60_init_irq,
4210 + .init_machine = cam60_board_init,
4211 +MACHINE_END
4212 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-chub.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-chub.c
4213 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-chub.c 1970-01-01 01:00:00.000000000 +0100
4214 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-chub.c 2007-07-29 05:23:04.000000000 +0200
4215 @@ -0,0 +1,132 @@
4216 +/*
4217 + * linux/arch/arm/mach-at91/board-chub.c
4218 + *
4219 + * Copyright (C) 2005 SAN People, adapted for Promwad Chub board
4220 + * by Kuten Ivan
4221 + *
4222 + * This program is free software; you can redistribute it and/or modify
4223 + * it under the terms of the GNU General Public License as published by
4224 + * the Free Software Foundation; either version 2 of the License, or
4225 + * (at your option) any later version.
4226 + *
4227 + * This program is distributed in the hope that it will be useful,
4228 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4229 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4230 + * GNU General Public License for more details.
4231 + *
4232 + * You should have received a copy of the GNU General Public License
4233 + * along with this program; if not, write to the Free Software
4234 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4235 + */
4236 +
4237 +#include <linux/types.h>
4238 +#include <linux/init.h>
4239 +#include <linux/mm.h>
4240 +#include <linux/module.h>
4241 +#include <linux/platform_device.h>
4242 +
4243 +#include <asm/hardware.h>
4244 +#include <asm/setup.h>
4245 +#include <asm/mach-types.h>
4246 +#include <asm/irq.h>
4247 +
4248 +#include <asm/mach/arch.h>
4249 +#include <asm/mach/map.h>
4250 +#include <asm/mach/irq.h>
4251 +
4252 +#include <asm/arch/board.h>
4253 +#include <asm/arch/gpio.h>
4254 +
4255 +#include "generic.h"
4256 +
4257 +/*
4258 + * Serial port configuration.
4259 + * 0 .. 3 = USART0 .. USART3
4260 + * 4 = DBGU
4261 + */
4262 +static struct at91_uart_config __initdata chub_uart_config = {
4263 + .console_tty = 0, /* ttyS0 */
4264 + .nr_tty = 5,
4265 + .tty_map = { 4, 0, 1, 2, 3 } /* ttyS0, ..., ttyS4 */
4266 +};
4267 +
4268 +static void __init chub_init_irq(void)
4269 +{
4270 + at91rm9200_init_interrupts(NULL);
4271 +}
4272 +
4273 +static void __init chub_map_io(void)
4274 +{
4275 + /* Initialize clocks: 18.432 MHz crystal */
4276 + at91rm9200_initialize(18432000, AT91RM9200_PQFP);
4277 +
4278 + /* Setup the serial ports and console */
4279 + at91_init_serial(&chub_uart_config);
4280 +}
4281 +
4282 +static struct at91_eth_data __initdata chub_eth_data = {
4283 + .phy_irq_pin = AT91_PIN_PB29,
4284 + .is_rmii = 0,
4285 +};
4286 +
4287 +static struct mtd_partition __initdata chub_nand_partition[] = {
4288 + {
4289 + .name = "NAND Partition 1",
4290 + .offset = 0,
4291 + .size = MTDPART_SIZ_FULL,
4292 + },
4293 +};
4294 +
4295 +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
4296 +{
4297 + *num_partitions = ARRAY_SIZE(chub_nand_partition);
4298 + return chub_nand_partition;
4299 +}
4300 +
4301 +static struct at91_nand_data __initdata chub_nand_data = {
4302 + .ale = 22,
4303 + .cle = 21,
4304 + .enable_pin = AT91_PIN_PA27,
4305 + .partition_info = nand_partitions,
4306 +};
4307 +
4308 +static struct spi_board_info chub_spi_devices[] = {
4309 + { /* DataFlash chip */
4310 + .modalias = "mtd_dataflash",
4311 + .chip_select = 0,
4312 + .max_speed_hz = 15 * 1000 * 1000,
4313 + },
4314 +};
4315 +
4316 +static void __init chub_board_init(void)
4317 +{
4318 + /* Serial */
4319 + at91_add_device_serial();
4320 + /* I2C */
4321 + at91_add_device_i2c();
4322 + /* Ethernet */
4323 + at91_add_device_eth(&chub_eth_data);
4324 + /* SPI */
4325 + at91_add_device_spi(chub_spi_devices, ARRAY_SIZE(chub_spi_devices));
4326 + /* NAND Flash */
4327 + at91_add_device_nand(&chub_nand_data);
4328 + /* Disable write protect for NAND */
4329 + at91_set_gpio_output(AT91_PIN_PB7, 1);
4330 + /* Power enable for 3x RS-232 and 1x RS-485 */
4331 + at91_set_gpio_output(AT91_PIN_PB9, 1);
4332 + /* Disable write protect for FRAM */
4333 + at91_set_gpio_output(AT91_PIN_PA21, 1);
4334 + /* Disable write protect for Dataflash */
4335 + at91_set_gpio_output(AT91_PIN_PA19, 1);
4336 +}
4337 +
4338 +MACHINE_START(CHUB, "Promwad Chub")
4339 + /* Maintainer: Ivan Kuten AT Promwad DOT com */
4340 + .phys_io = AT91_BASE_SYS,
4341 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
4342 + .boot_params = AT91_SDRAM_BASE + 0x100,
4343 + .timer = &at91rm9200_timer,
4344 + .map_io = chub_map_io,
4345 + .init_irq = chub_init_irq,
4346 + .init_machine = chub_board_init,
4347 +MACHINE_END
4348 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-csb337.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-csb337.c
4349 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-csb337.c 2007-06-17 04:09:12.000000000 +0200
4350 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-csb337.c 2007-07-29 05:23:04.000000000 +0200
4351 @@ -24,6 +24,7 @@
4352 #include <linux/module.h>
4353 #include <linux/platform_device.h>
4354 #include <linux/spi/spi.h>
4355 +#include <linux/interrupt.h>
4356 #include <linux/mtd/physmap.h>
4357
4358 #include <asm/hardware.h>
4359 @@ -59,6 +60,7 @@
4360
4361 /* Setup the LEDs */
4362 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
4363 + at91_set_gpio_output(AT91_PIN_PB2, 1); /* third (unused) LED */
4364
4365 /* Setup the serial ports and console */
4366 at91_init_serial(&csb337_uart_config);
4367 @@ -149,6 +151,55 @@
4368 .num_resources = ARRAY_SIZE(csb_flash_resources),
4369 };
4370
4371 +static struct at91_gpio_led csb337_leds[] = {
4372 + {
4373 + .name = "led0",
4374 + .gpio = AT91_PIN_PB0,
4375 + .trigger = "heartbeat",
4376 + },
4377 + {
4378 + .name = "led1",
4379 + .gpio = AT91_PIN_PB1,
4380 + .trigger = "timer",
4381 + },
4382 + {
4383 + .name = "led2",
4384 + .gpio = AT91_PIN_PB2,
4385 + }
4386 +};
4387 +
4388 +#if defined(CONFIG_CSB300_WAKE_SW0) || defined(CONFIG_CSB300_WAKE_SW1)
4389 +static irqreturn_t switch_irq_handler(int irq, void *context)
4390 +{
4391 + return IRQ_HANDLED;
4392 +}
4393 +
4394 +static inline void __init switch_irq_setup(int irq, char *name, unsigned long mode)
4395 +{
4396 + int res;
4397 +
4398 + res = request_irq(irq, switch_irq_handler, IRQF_SAMPLE_RANDOM | mode, name, NULL);
4399 + if (res == 0)
4400 + enable_irq_wake(irq);
4401 +}
4402 +
4403 +static void __init csb300_switches(void)
4404 +{
4405 +#ifdef CONFIG_CSB300_WAKE_SW0
4406 + at91_set_A_periph(AT91_PIN_PB29, 1); /* IRQ0 */
4407 + switch_irq_setup(AT91RM9200_ID_IRQ0, "csb300_sw0", IRQF_TRIGGER_FALLING);
4408 +#endif
4409 +#ifdef CONFIG_CSB300_WAKE_SW1
4410 + at91_set_gpio_input(AT91_PIN_PB28, 1);
4411 + at91_set_deglitch(AT91_PIN_PB28, 1);
4412 + switch_irq_setup(AT91_PIN_PB28, "csb300_sw1", IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
4413 +#endif
4414 + /* there's also SW2 at PA21, GPIO or TIOA2 */
4415 +}
4416 +#else
4417 +static void __init csb300_switches(void) {}
4418 +#endif
4419 +
4420 static void __init csb337_board_init(void)
4421 {
4422 /* Serial */
4423 @@ -168,8 +219,12 @@
4424 at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
4425 /* MMC */
4426 at91_add_device_mmc(0, &csb337_mmc_data);
4427 + /* LEDS */
4428 + at91_gpio_leds(csb337_leds, ARRAY_SIZE(csb337_leds));
4429 /* NOR flash */
4430 platform_device_register(&csb_flash);
4431 + /* Switches on CSB300 */
4432 + csb300_switches();
4433 }
4434
4435 MACHINE_START(CSB337, "Cogent CSB337")
4436 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-dk.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-dk.c
4437 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-dk.c 2007-06-17 04:09:12.000000000 +0200
4438 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-dk.c 2007-07-29 05:23:04.000000000 +0200
4439 @@ -73,6 +73,185 @@
4440 at91rm9200_init_interrupts(NULL);
4441 }
4442
4443 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4444 +#include <video/s1d13xxxfb.h>
4445 +#include <asm/arch/ics1523.h>
4446 +
4447 +/* EPSON S1D13806 FB */
4448 +#define AT91_FB_REG_BASE 0x30000000L
4449 +#define AT91_FB_REG_SIZE 0x200
4450 +#define AT91_FB_VMEM_BASE 0x30200000L
4451 +#define AT91_FB_VMEM_SIZE 0x140000L
4452 +
4453 +static void __init dk_init_video(void)
4454 +{
4455 + /* NWAIT Signal */
4456 + at91_set_A_periph(AT91_PIN_PC6, 0);
4457 +
4458 + /* Initialization of the Static Memory Controller for Chip Select 2 */
4459 + at91_sys_write(AT91_SMC_CSR(2), AT91_SMC_DBW_16 /* 16 bit */
4460 + | AT91_SMC_WSEN | AT91_SMC_NWS_(4) /* wait states */
4461 + | AT91_SMC_TDF_(1) /* float time */
4462 + );
4463 +
4464 + at91_ics1523_init();
4465 +}
4466 +
4467 +/* CRT: (active) 640x480 60Hz (PCLK=CLKI=25.175MHz)
4468 + Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
4469 +static const struct s1d13xxxfb_regval dk_s1dfb_initregs[] = {
4470 + {S1DREG_MISC, 0x00}, /* Enable Memory/Register select bit */
4471 + {S1DREG_COM_DISP_MODE, 0x00}, /* disable display output */
4472 + {S1DREG_GPIO_CNF0, 0x00},
4473 + {S1DREG_GPIO_CNF1, 0x00},
4474 + {S1DREG_GPIO_CTL0, 0x08},
4475 + {S1DREG_GPIO_CTL1, 0x00},
4476 + {S1DREG_CLK_CNF, 0x01}, /* no divide, MCLK source is CLKI3 0x02*/
4477 + {S1DREG_LCD_CLK_CNF, 0x00},
4478 + {S1DREG_CRT_CLK_CNF, 0x00},
4479 + {S1DREG_MPLUG_CLK_CNF, 0x00},
4480 + {S1DREG_CPU2MEM_WST_SEL, 0x01}, /* 2*period(MCLK) - 4ns > period(BCLK) */
4481 + {S1DREG_SDRAM_REF_RATE, 0x03}, /* 32768 <= MCLK <= 50000 (MHz) */
4482 + {S1DREG_SDRAM_TC0, 0x00}, /* MCLK source freq (MHz): */
4483 + {S1DREG_SDRAM_TC1, 0x01}, /* 42 <= MCLK <= 50 */
4484 + {S1DREG_MEM_CNF, 0x80}, /* SDRAM Initialization - needed before mem access */
4485 + {S1DREG_PANEL_TYPE, 0x25}, /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
4486 + {S1DREG_MOD_RATE, 0x00}, /* toggle every FPFRAME */
4487 + {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* 680 pix */
4488 + {S1DREG_LCD_NDISP_HPER, 0x12}, /* 152 pix */
4489 + {S1DREG_TFT_FPLINE_START, 0x01}, /* 13 pix */
4490 + {S1DREG_TFT_FPLINE_PWIDTH, 0x0B}, /* 96 pix */
4491 + {S1DREG_LCD_DISP_VHEIGHT0, 0xDF},
4492 + {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4493 + {S1DREG_LCD_NDISP_VPER, 0x2C}, /* 44 lines */
4494 + {S1DREG_TFT_FPFRAME_START, 0x0A}, /* 10 lines */
4495 + {S1DREG_TFT_FPFRAME_PWIDTH, 0x01}, /* 2 lines */
4496 + {S1DREG_LCD_DISP_MODE, 0x05}, /* 16 bpp */
4497 + {S1DREG_LCD_MISC, 0x00}, /* dithering enabled, dual panel buffer enabled */
4498 + {S1DREG_LCD_DISP_START0, 0x00},
4499 + {S1DREG_LCD_DISP_START1, 0xC8},
4500 + {S1DREG_LCD_DISP_START2, 0x00},
4501 + {S1DREG_LCD_MEM_OFF0, 0x80},
4502 + {S1DREG_LCD_MEM_OFF1, 0x02},
4503 + {S1DREG_LCD_PIX_PAN, 0x00},
4504 + {S1DREG_LCD_DISP_FIFO_HTC, 0x3B},
4505 + {S1DREG_LCD_DISP_FIFO_LTC, 0x3C},
4506 + {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* 680 pix */
4507 + {S1DREG_CRT_NDISP_HPER, 0x13}, /* 160 pix */
4508 + {S1DREG_CRT_HRTC_START, 0x01}, /* 13 pix */
4509 + {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* 96 pix */
4510 + {S1DREG_CRT_DISP_VHEIGHT0, 0xDF},
4511 + {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4512 + {S1DREG_CRT_NDISP_VPER, 0x2B}, /* 44 lines */
4513 + {S1DREG_CRT_VRTC_START, 0x09}, /* 10 lines */
4514 + {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* 2 lines */
4515 + {S1DREG_TV_OUT_CTL, 0x10},
4516 + {S1DREG_CRT_DISP_MODE, 0x05}, /* 16 bpp */
4517 + {S1DREG_CRT_DISP_START0, 0x00},
4518 + {S1DREG_CRT_DISP_START1, 0x00},
4519 + {S1DREG_CRT_DISP_START2, 0x00},
4520 + {S1DREG_CRT_MEM_OFF0, 0x80},
4521 + {S1DREG_CRT_MEM_OFF1, 0x02},
4522 + {S1DREG_CRT_PIX_PAN, 0x00},
4523 + {S1DREG_CRT_DISP_FIFO_HTC, 0x3B},
4524 + {S1DREG_CRT_DISP_FIFO_LTC, 0x3C},
4525 + {S1DREG_LCD_CUR_CTL, 0x00}, /* inactive */
4526 + {S1DREG_LCD_CUR_START, 0x01},
4527 + {S1DREG_LCD_CUR_XPOS0, 0x00},
4528 + {S1DREG_LCD_CUR_XPOS1, 0x00},
4529 + {S1DREG_LCD_CUR_YPOS0, 0x00},
4530 + {S1DREG_LCD_CUR_YPOS1, 0x00},
4531 + {S1DREG_LCD_CUR_BCTL0, 0x00},
4532 + {S1DREG_LCD_CUR_GCTL0, 0x00},
4533 + {S1DREG_LCD_CUR_RCTL0, 0x00},
4534 + {S1DREG_LCD_CUR_BCTL1, 0x1F},
4535 + {S1DREG_LCD_CUR_GCTL1, 0x3F},
4536 + {S1DREG_LCD_CUR_RCTL1, 0x1F},
4537 + {S1DREG_LCD_CUR_FIFO_HTC, 0x00},
4538 + {S1DREG_CRT_CUR_CTL, 0x00}, /* inactive */
4539 + {S1DREG_CRT_CUR_START, 0x01},
4540 + {S1DREG_CRT_CUR_XPOS0, 0x00},
4541 + {S1DREG_CRT_CUR_XPOS1, 0x00},
4542 + {S1DREG_CRT_CUR_YPOS0, 0x00},
4543 + {S1DREG_CRT_CUR_YPOS1, 0x00},
4544 + {S1DREG_CRT_CUR_BCTL0, 0x00},
4545 + {S1DREG_CRT_CUR_GCTL0, 0x00},
4546 + {S1DREG_CRT_CUR_RCTL0, 0x00},
4547 + {S1DREG_CRT_CUR_BCTL1, 0x1F},
4548 + {S1DREG_CRT_CUR_GCTL1, 0x3F},
4549 + {S1DREG_CRT_CUR_RCTL1, 0x1F},
4550 + {S1DREG_CRT_CUR_FIFO_HTC, 0x00},
4551 + {S1DREG_BBLT_CTL0, 0x00},
4552 + {S1DREG_BBLT_CTL0, 0x00},
4553 + {S1DREG_BBLT_CC_EXP, 0x00},
4554 + {S1DREG_BBLT_OP, 0x00},
4555 + {S1DREG_BBLT_SRC_START0, 0x00},
4556 + {S1DREG_BBLT_SRC_START1, 0x00},
4557 + {S1DREG_BBLT_SRC_START2, 0x00},
4558 + {S1DREG_BBLT_DST_START0, 0x00},
4559 + {S1DREG_BBLT_DST_START1, 0x00},
4560 + {S1DREG_BBLT_DST_START2, 0x00},
4561 + {S1DREG_BBLT_MEM_OFF0, 0x00},
4562 + {S1DREG_BBLT_MEM_OFF1, 0x00},
4563 + {S1DREG_BBLT_WIDTH0, 0x00},
4564 + {S1DREG_BBLT_WIDTH1, 0x00},
4565 + {S1DREG_BBLT_HEIGHT0, 0x00},
4566 + {S1DREG_BBLT_HEIGHT1, 0x00},
4567 + {S1DREG_BBLT_BGC0, 0x00},
4568 + {S1DREG_BBLT_BGC1, 0x00},
4569 + {S1DREG_BBLT_FGC0, 0x00},
4570 + {S1DREG_BBLT_FGC1, 0x00},
4571 + {S1DREG_LKUP_MODE, 0x00}, /* LCD LUT r | LCD and CRT/TV LUT w */
4572 + {S1DREG_LKUP_ADDR, 0x00},
4573 + {S1DREG_PS_CNF, 0x00}, /* Power Save disable */
4574 + {S1DREG_PS_STATUS, 0x02}, /* LCD Panel down, mem up */
4575 + {S1DREG_CPU2MEM_WDOGT, 0x00},
4576 + {S1DREG_COM_DISP_MODE, 0x02}, /* enable CRT display output */
4577 +};
4578 +
4579 +static struct s1d13xxxfb_pdata dk_s1dfb_pdata = {
4580 + .initregs = dk_s1dfb_initregs,
4581 + .initregssize = ARRAY_SIZE(dk_s1dfb_initregs),
4582 + .platform_init_video = dk_init_video,
4583 +};
4584 +
4585 +static u64 s1dfb_dmamask = 0xffffffffUL;
4586 +
4587 +static struct resource dk_s1dfb_resource[] = {
4588 + [0] = { /* video mem */
4589 + .name = "s1d13806 memory",
4590 + .start = AT91_FB_VMEM_BASE,
4591 + .end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
4592 + .flags = IORESOURCE_MEM,
4593 + },
4594 + [1] = { /* video registers */
4595 + .name = "s1d13806 registers",
4596 + .start = AT91_FB_REG_BASE,
4597 + .end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
4598 + .flags = IORESOURCE_MEM,
4599 + },
4600 +};
4601 +
4602 +static struct platform_device dk_s1dfb_device = {
4603 + .name = "s1d13806fb",
4604 + .id = -1,
4605 + .dev = {
4606 + .dma_mask = &s1dfb_dmamask,
4607 + .coherent_dma_mask = 0xffffffff,
4608 + .platform_data = &dk_s1dfb_pdata,
4609 + },
4610 + .resource = dk_s1dfb_resource,
4611 + .num_resources = ARRAY_SIZE(dk_s1dfb_resource),
4612 +};
4613 +
4614 +static void __init dk_add_device_video(void)
4615 +{
4616 + platform_device_register(&dk_s1dfb_device);
4617 +}
4618 +#else
4619 +static void __init dk_add_device_video(void) {}
4620 +#endif
4621 +
4622 static struct at91_eth_data __initdata dk_eth_data = {
4623 .phy_irq_pin = AT91_PIN_PC4,
4624 .is_rmii = 1,
4625 @@ -151,7 +330,7 @@
4626 #define DK_FLASH_SIZE 0x200000
4627
4628 static struct physmap_flash_data dk_flash_data = {
4629 - .width = 2,
4630 + .width = 2,
4631 };
4632
4633 static struct resource dk_flash_resource = {
4634 @@ -170,6 +349,13 @@
4635 .num_resources = 1,
4636 };
4637
4638 +static struct at91_gpio_led dk_leds[] = {
4639 + {
4640 + .name = "led0",
4641 + .gpio = AT91_PIN_PB2,
4642 + .trigger = "timer",
4643 + }
4644 +};
4645
4646 static void __init dk_board_init(void)
4647 {
4648 @@ -200,8 +386,10 @@
4649 at91_add_device_nand(&dk_nand_data);
4650 /* NOR Flash */
4651 platform_device_register(&dk_flash);
4652 + /* LEDs */
4653 + at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
4654 /* VGA */
4655 -// dk_add_device_video();
4656 + dk_add_device_video();
4657 }
4658
4659 MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
4660 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-ek.c
4661 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-ek.c 2007-06-17 04:09:12.000000000 +0200
4662 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-ek.c 2007-07-29 05:23:04.000000000 +0200
4663 @@ -73,6 +73,187 @@
4664 at91rm9200_init_interrupts(NULL);
4665 }
4666
4667 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4668 +#include <video/s1d13xxxfb.h>
4669 +#include <asm/arch/ics1523.h>
4670 +
4671 +/* EPSON S1D13806 FB */
4672 +#define AT91_FB_REG_BASE 0x40000000L
4673 +#define AT91_FB_REG_SIZE 0x200
4674 +#define AT91_FB_VMEM_BASE 0x40200000L
4675 +#define AT91_FB_VMEM_SIZE 0x140000L
4676 +
4677 +static void __init ek_init_video(void)
4678 +{
4679 + /* NWAIT Signal */
4680 + at91_set_A_periph(AT91_PIN_PC6, 0);
4681 +
4682 + /* Initialization of the Static Memory Controller for Chip Select 3 */
4683 + at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_DBW_16 /* 16 bit */
4684 + | AT91_SMC_WSEN | AT91_SMC_NWS_(5) /* wait states */
4685 + | AT91_SMC_TDF_(1) /* float time */
4686 + );
4687 +
4688 + at91_ics1523_init();
4689 +}
4690 +
4691 +/* CRT: (active) 640x480 60Hz (PCLK=CLKI=25.175MHz)
4692 + Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
4693 +static const struct s1d13xxxfb_regval ek_s1dfb_initregs[] = {
4694 + {S1DREG_MISC, 0x00}, /* Enable Memory/Register select bit */
4695 + {S1DREG_COM_DISP_MODE, 0x00}, /* disable display output */
4696 + {S1DREG_GPIO_CNF0, 0xFF}, // 0x00
4697 + {S1DREG_GPIO_CNF1, 0x1F}, // 0x08
4698 + {S1DREG_GPIO_CTL0, 0x00},
4699 + {S1DREG_GPIO_CTL1, 0x00},
4700 + {S1DREG_CLK_CNF, 0x01}, /* no divide, MCLK source is CLKI3 0x02*/
4701 + {S1DREG_LCD_CLK_CNF, 0x00},
4702 + {S1DREG_CRT_CLK_CNF, 0x00},
4703 + {S1DREG_MPLUG_CLK_CNF, 0x00},
4704 + {S1DREG_CPU2MEM_WST_SEL, 0x01}, /* 2*period(MCLK) - 4ns > period(BCLK) */
4705 + {S1DREG_SDRAM_REF_RATE, 0x03}, /* 32768 <= MCLK <= 50000 (MHz) */
4706 + {S1DREG_SDRAM_TC0, 0x00}, /* MCLK source freq (MHz): */
4707 + {S1DREG_SDRAM_TC1, 0x01}, /* 42 <= MCLK <= 50 */
4708 + {S1DREG_MEM_CNF, 0x80}, /* SDRAM Initialization - needed before mem access */
4709 + {S1DREG_PANEL_TYPE, 0x25}, /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
4710 + {S1DREG_MOD_RATE, 0x00}, /* toggle every FPFRAME */
4711 + {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* 680 pix */
4712 + {S1DREG_LCD_NDISP_HPER, 0x12}, /* 152 pix */
4713 + {S1DREG_TFT_FPLINE_START, 0x01}, /* 13 pix */
4714 + {S1DREG_TFT_FPLINE_PWIDTH, 0x0B}, /* 96 pix */
4715 + {S1DREG_LCD_DISP_VHEIGHT0, 0xDF},
4716 + {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4717 + {S1DREG_LCD_NDISP_VPER, 0x2C}, /* 44 lines */
4718 + {S1DREG_TFT_FPFRAME_START, 0x0A}, /* 10 lines */
4719 + {S1DREG_TFT_FPFRAME_PWIDTH, 0x01}, /* 2 lines */
4720 + {S1DREG_LCD_DISP_MODE, 0x05}, /* 16 bpp */
4721 + {S1DREG_LCD_MISC, 0x00}, /* dithering enabled, dual panel buffer enabled */
4722 + {S1DREG_LCD_DISP_START0, 0x00},
4723 + {S1DREG_LCD_DISP_START1, 0xC8},
4724 + {S1DREG_LCD_DISP_START2, 0x00},
4725 + {S1DREG_LCD_MEM_OFF0, 0x80},
4726 + {S1DREG_LCD_MEM_OFF1, 0x02},
4727 + {S1DREG_LCD_PIX_PAN, 0x00},
4728 + {S1DREG_LCD_DISP_FIFO_HTC, 0x3B},
4729 + {S1DREG_LCD_DISP_FIFO_LTC, 0x3C},
4730 + {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* 680 pix */
4731 + {S1DREG_CRT_NDISP_HPER, 0x13}, /* 160 pix */
4732 + {S1DREG_CRT_HRTC_START, 0x01}, /* 13 pix */
4733 + {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* 96 pix */
4734 + {S1DREG_CRT_DISP_VHEIGHT0, 0xDF},
4735 + {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4736 + {S1DREG_CRT_NDISP_VPER, 0x2B}, /* 44 lines */
4737 + {S1DREG_CRT_VRTC_START, 0x09}, /* 10 lines */
4738 + {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* 2 lines */
4739 + {S1DREG_TV_OUT_CTL, 0x10},
4740 + {0x005E, 0x9F},
4741 + {0x005F, 0x00},
4742 + {S1DREG_CRT_DISP_MODE, 0x05}, /* 16 bpp */
4743 + {S1DREG_CRT_DISP_START0, 0x00},
4744 + {S1DREG_CRT_DISP_START1, 0x00},
4745 + {S1DREG_CRT_DISP_START2, 0x00},
4746 + {S1DREG_CRT_MEM_OFF0, 0x80},
4747 + {S1DREG_CRT_MEM_OFF1, 0x02},
4748 + {S1DREG_CRT_PIX_PAN, 0x00},
4749 + {S1DREG_CRT_DISP_FIFO_HTC, 0x3B},
4750 + {S1DREG_CRT_DISP_FIFO_LTC, 0x3C},
4751 + {S1DREG_LCD_CUR_CTL, 0x00}, /* inactive */
4752 + {S1DREG_LCD_CUR_START, 0x01},
4753 + {S1DREG_LCD_CUR_XPOS0, 0x00},
4754 + {S1DREG_LCD_CUR_XPOS1, 0x00},
4755 + {S1DREG_LCD_CUR_YPOS0, 0x00},
4756 + {S1DREG_LCD_CUR_YPOS1, 0x00},
4757 + {S1DREG_LCD_CUR_BCTL0, 0x00},
4758 + {S1DREG_LCD_CUR_GCTL0, 0x00},
4759 + {S1DREG_LCD_CUR_RCTL0, 0x00},
4760 + {S1DREG_LCD_CUR_BCTL1, 0x1F},
4761 + {S1DREG_LCD_CUR_GCTL1, 0x3F},
4762 + {S1DREG_LCD_CUR_RCTL1, 0x1F},
4763 + {S1DREG_LCD_CUR_FIFO_HTC, 0x00},
4764 + {S1DREG_CRT_CUR_CTL, 0x00}, /* inactive */
4765 + {S1DREG_CRT_CUR_START, 0x01},
4766 + {S1DREG_CRT_CUR_XPOS0, 0x00},
4767 + {S1DREG_CRT_CUR_XPOS1, 0x00},
4768 + {S1DREG_CRT_CUR_YPOS0, 0x00},
4769 + {S1DREG_CRT_CUR_YPOS1, 0x00},
4770 + {S1DREG_CRT_CUR_BCTL0, 0x00},
4771 + {S1DREG_CRT_CUR_GCTL0, 0x00},
4772 + {S1DREG_CRT_CUR_RCTL0, 0x00},
4773 + {S1DREG_CRT_CUR_BCTL1, 0x1F},
4774 + {S1DREG_CRT_CUR_GCTL1, 0x3F},
4775 + {S1DREG_CRT_CUR_RCTL1, 0x1F},
4776 + {S1DREG_CRT_CUR_FIFO_HTC, 0x00},
4777 + {S1DREG_BBLT_CTL0, 0x00},
4778 + {S1DREG_BBLT_CTL0, 0x00},
4779 + {S1DREG_BBLT_CC_EXP, 0x00},
4780 + {S1DREG_BBLT_OP, 0x00},
4781 + {S1DREG_BBLT_SRC_START0, 0x00},
4782 + {S1DREG_BBLT_SRC_START1, 0x00},
4783 + {S1DREG_BBLT_SRC_START2, 0x00},
4784 + {S1DREG_BBLT_DST_START0, 0x00},
4785 + {S1DREG_BBLT_DST_START1, 0x00},
4786 + {S1DREG_BBLT_DST_START2, 0x00},
4787 + {S1DREG_BBLT_MEM_OFF0, 0x00},
4788 + {S1DREG_BBLT_MEM_OFF1, 0x00},
4789 + {S1DREG_BBLT_WIDTH0, 0x00},
4790 + {S1DREG_BBLT_WIDTH1, 0x00},
4791 + {S1DREG_BBLT_HEIGHT0, 0x00},
4792 + {S1DREG_BBLT_HEIGHT1, 0x00},
4793 + {S1DREG_BBLT_BGC0, 0x00},
4794 + {S1DREG_BBLT_BGC1, 0x00},
4795 + {S1DREG_BBLT_FGC0, 0x00},
4796 + {S1DREG_BBLT_FGC1, 0x00},
4797 + {S1DREG_LKUP_MODE, 0x00}, /* LCD LUT r | LCD and CRT/TV LUT w */
4798 + {S1DREG_LKUP_ADDR, 0x00},
4799 + {S1DREG_PS_CNF, 0x10}, /* Power Save disable */
4800 + {S1DREG_PS_STATUS, 0x02}, /* LCD Panel down, mem up */
4801 + {S1DREG_CPU2MEM_WDOGT, 0x00},
4802 + {S1DREG_COM_DISP_MODE, 0x02}, /* enable CRT display output */
4803 +};
4804 +
4805 +static struct s1d13xxxfb_pdata ek_s1dfb_pdata = {
4806 + .initregs = ek_s1dfb_initregs,
4807 + .initregssize = ARRAY_SIZE(ek_s1dfb_initregs),
4808 + .platform_init_video = ek_init_video,
4809 +};
4810 +
4811 +static u64 s1dfb_dmamask = 0xffffffffUL;
4812 +
4813 +static struct resource ek_s1dfb_resource[] = {
4814 + [0] = { /* video mem */
4815 + .name = "s1d13806 memory",
4816 + .start = AT91_FB_VMEM_BASE,
4817 + .end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
4818 + .flags = IORESOURCE_MEM,
4819 + },
4820 + [1] = { /* video registers */
4821 + .name = "s1d13806 registers",
4822 + .start = AT91_FB_REG_BASE,
4823 + .end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
4824 + .flags = IORESOURCE_MEM,
4825 + },
4826 +};
4827 +
4828 +static struct platform_device ek_s1dfb_device = {
4829 + .name = "s1d13806fb",
4830 + .id = -1,
4831 + .dev = {
4832 + .dma_mask = &s1dfb_dmamask,
4833 + .coherent_dma_mask = 0xffffffff,
4834 + .platform_data = &ek_s1dfb_pdata,
4835 + },
4836 + .resource = ek_s1dfb_resource,
4837 + .num_resources = ARRAY_SIZE(ek_s1dfb_resource),
4838 +};
4839 +
4840 +static void __init ek_add_device_video(void)
4841 +{
4842 + platform_device_register(&ek_s1dfb_device);
4843 +}
4844 +#else
4845 +static void __init ek_add_device_video(void) {}
4846 +#endif
4847 +
4848 static struct at91_eth_data __initdata ek_eth_data = {
4849 .phy_irq_pin = AT91_PIN_PC4,
4850 .is_rmii = 1,
4851 @@ -113,7 +294,7 @@
4852 #define EK_FLASH_SIZE 0x200000
4853
4854 static struct physmap_flash_data ek_flash_data = {
4855 - .width = 2,
4856 + .width = 2,
4857 };
4858
4859 static struct resource ek_flash_resource = {
4860 @@ -132,6 +313,18 @@
4861 .num_resources = 1,
4862 };
4863
4864 +static struct at91_gpio_led ek_leds[] = {
4865 + {
4866 + .name = "led0",
4867 + .gpio = AT91_PIN_PB1,
4868 + .trigger = "heartbeat",
4869 + },
4870 + {
4871 + .name = "led1",
4872 + .gpio = AT91_PIN_PB2,
4873 + .trigger = "timer",
4874 + }
4875 +};
4876
4877 static void __init ek_board_init(void)
4878 {
4879 @@ -158,8 +351,10 @@
4880 #endif
4881 /* NOR Flash */
4882 platform_device_register(&ek_flash);
4883 + /* LEDs */
4884 + at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
4885 /* VGA */
4886 -// ek_add_device_video();
4887 + ek_add_device_video();
4888 }
4889
4890 MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
4891 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-kb9202.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-kb9202.c
4892 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-kb9202.c 2007-06-17 04:09:12.000000000 +0200
4893 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-kb9202.c 2007-07-29 05:23:04.000000000 +0200
4894 @@ -37,6 +37,8 @@
4895 #include <asm/arch/board.h>
4896 #include <asm/arch/gpio.h>
4897
4898 +#include <asm/arch/at91rm9200_mc.h>
4899 +
4900 #include "generic.h"
4901
4902
4903 @@ -111,6 +113,48 @@
4904 .partition_info = nand_partitions,
4905 };
4906
4907 +
4908 +#if defined(CONFIG_FB_S1D15605)
4909 +#warning "Rather pass reset pin via platform_data"
4910 +static struct resource kb9202_lcd_resources[] = {
4911 + [0] = {
4912 + .start = AT91_CHIPSELECT_2,
4913 + .end = AT91_CHIPSELECT_2 + 0x200FF,
4914 + .flags = IORESOURCE_MEM
4915 + },
4916 + [1] = { /* reset pin */
4917 + .start = AT91_PIN_PC22,
4918 + .end = AT91_PIN_PC22,
4919 + .flags = IORESOURCE_MEM
4920 + },
4921 +};
4922 +
4923 +static struct platform_device kb9202_lcd_device = {
4924 + .name = "s1d15605fb",
4925 + .id = 0,
4926 + .num_resources = ARRAY_SIZE(kb9202_lcd_resources),
4927 + .resource = kb9202_lcd_resources,
4928 +};
4929 +
4930 +static void __init kb9202_add_device_lcd(void)
4931 +{
4932 + /* In case the boot loader did not set the chip select mode and timing */
4933 + at91_sys_write(AT91_SMC_CSR(2),
4934 + AT91_SMC_WSEN | AT91_SMC_NWS_(18) | AT91_SMC_TDF_(1) | AT91_SMC_DBW_8 |
4935 + AT91_SMC_RWSETUP_(1) | AT91_SMC_RWHOLD_(1));
4936 +
4937 + /* Backlight pin = output, off */
4938 + at91_set_gpio_output(AT91_PIN_PC23, 0);
4939 +
4940 + /* Reset pin = output, in reset */
4941 + at91_set_gpio_output(AT91_PIN_PC22, 0);
4942 +
4943 + platform_device_register(&kb9202_lcd_device);
4944 +}
4945 +#else
4946 +static void __init kb9202_add_device_lcd(void) {}
4947 +#endif
4948 +
4949 static void __init kb9202_board_init(void)
4950 {
4951 /* Serial */
4952 @@ -129,6 +173,8 @@
4953 at91_add_device_spi(NULL, 0);
4954 /* NAND */
4955 at91_add_device_nand(&kb9202_nand_data);
4956 + /* LCD */
4957 + kb9202_add_device_lcd();
4958 }
4959
4960 MACHINE_START(KB9200, "KB920x")
4961 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9261ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9261ek.c
4962 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9261ek.c 2007-06-17 04:09:12.000000000 +0200
4963 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9261ek.c 2007-07-29 05:23:04.000000000 +0200
4964 @@ -27,6 +27,9 @@
4965 #include <linux/spi/spi.h>
4966 #include <linux/spi/ads7846.h>
4967 #include <linux/dm9000.h>
4968 +#include <linux/fb.h>
4969 +
4970 +#include <video/atmel_lcdc.h>
4971
4972 #include <asm/hardware.h>
4973 #include <asm/setup.h>
4974 @@ -251,6 +254,7 @@
4975 .bus_num = 0,
4976 .platform_data = &ads_info,
4977 .irq = AT91SAM9261_ID_IRQ0,
4978 + .controller_data = AT91_PIN_PA28, /* CS pin */
4979 },
4980 #endif
4981 #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
4982 @@ -271,6 +275,65 @@
4983 };
4984
4985
4986 +/*
4987 + * LCD Controller
4988 + */
4989 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
4990 +static struct fb_videomode at91_tft_vga_modes[] = {
4991 + {
4992 + .name = "TX09D50VM1CCA @ 60",
4993 + .refresh = 60,
4994 + .xres = 240, .yres = 320,
4995 + .pixclock = KHZ2PICOS(4965),
4996 +
4997 + .left_margin = 1, .right_margin = 33,
4998 + .upper_margin = 1, .lower_margin = 0,
4999 + .hsync_len = 5, .vsync_len = 1,
5000 +
5001 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5002 + .vmode = FB_VMODE_NONINTERLACED,
5003 + },
5004 +};
5005 +
5006 +static struct fb_monspecs at91fb_default_monspecs = {
5007 + .manufacturer = "HIT",
5008 + .monitor = "TX09D50VM1CCA",
5009 +
5010 + .modedb = at91_tft_vga_modes,
5011 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5012 + .hfmin = 15000,
5013 + .hfmax = 64000,
5014 + .vfmin = 50,
5015 + .vfmax = 150,
5016 +};
5017 +
5018 +#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5019 + | ATMEL_LCDC_DISTYPE_TFT \
5020 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5021 +
5022 +static void at91_lcdc_power_control(int on)
5023 +{
5024 + if (on)
5025 + at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
5026 + else
5027 + at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
5028 +}
5029 +
5030 +/* Driver datas */
5031 +static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
5032 + .default_bpp = 16,
5033 + .default_dmacon = ATMEL_LCDC_DMAEN,
5034 + .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2,
5035 + .default_monspecs = &at91fb_default_monspecs,
5036 + .atmel_lcdfb_power_control = at91_lcdc_power_control,
5037 + .guard_time = 1,
5038 +};
5039 +
5040 +#else
5041 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
5042 +#endif
5043 +
5044 +
5045 static void __init ek_board_init(void)
5046 {
5047 /* Serial */
5048 @@ -296,6 +359,8 @@
5049 /* MMC */
5050 at91_add_device_mmc(0, &ek_mmc_data);
5051 #endif
5052 + /* LCD Controller */
5053 + at91_add_device_lcdc(&ek_lcdc_data);
5054 }
5055
5056 MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
5057 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9263ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9263ek.c
5058 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9263ek.c 2007-06-17 04:09:12.000000000 +0200
5059 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9263ek.c 2007-07-29 05:23:04.000000000 +0200
5060 @@ -26,6 +26,9 @@
5061 #include <linux/platform_device.h>
5062 #include <linux/spi/spi.h>
5063 #include <linux/spi/ads7846.h>
5064 +#include <linux/fb.h>
5065 +
5066 +#include <video/atmel_lcdc.h>
5067
5068 #include <asm/hardware.h>
5069 #include <asm/setup.h>
5070 @@ -202,6 +205,65 @@
5071
5072
5073 /*
5074 + * LCD Controller
5075 + */
5076 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
5077 +static struct fb_videomode at91_tft_vga_modes[] = {
5078 + {
5079 + .name = "TX09D50VM1CCA @ 60",
5080 + .refresh = 60,
5081 + .xres = 240, .yres = 320,
5082 + .pixclock = KHZ2PICOS(4965),
5083 +
5084 + .left_margin = 1, .right_margin = 33,
5085 + .upper_margin = 1, .lower_margin = 0,
5086 + .hsync_len = 5, .vsync_len = 1,
5087 +
5088 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5089 + .vmode = FB_VMODE_NONINTERLACED,
5090 + },
5091 +};
5092 +
5093 +static struct fb_monspecs at91fb_default_monspecs = {
5094 + .manufacturer = "HIT",
5095 + .monitor = "TX09D70VM1CCA",
5096 +
5097 + .modedb = at91_tft_vga_modes,
5098 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5099 + .hfmin = 15000,
5100 + .hfmax = 64000,
5101 + .vfmin = 50,
5102 + .vfmax = 150,
5103 +};
5104 +
5105 +#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5106 + | ATMEL_LCDC_DISTYPE_TFT \
5107 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5108 +
5109 +static void at91_lcdc_power_control(int on)
5110 +{
5111 + if (on)
5112 + at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
5113 + else
5114 + at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
5115 +}
5116 +
5117 +/* Driver datas */
5118 +static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
5119 + .default_bpp = 16,
5120 + .default_dmacon = ATMEL_LCDC_DMAEN,
5121 + .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
5122 + .default_monspecs = &at91fb_default_monspecs,
5123 + .atmel_lcdfb_power_control = at91_lcdc_power_control,
5124 + .guard_time = 1,
5125 +};
5126 +
5127 +#else
5128 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
5129 +#endif
5130 +
5131 +
5132 +/*
5133 * AC97
5134 */
5135 static struct atmel_ac97_data ek_ac97_data = {
5136 @@ -230,6 +292,8 @@
5137 at91_add_device_nand(&ek_nand_data);
5138 /* I2C */
5139 at91_add_device_i2c();
5140 + /* LCD Controller */
5141 + at91_add_device_lcdc(&ek_lcdc_data);
5142 /* AC97 */
5143 at91_add_device_ac97(&ek_ac97_data);
5144 }
5145 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/clock.c linux-2.6.22-rc5.new/arch/arm/mach-at91/clock.c
5146 --- linux-2.6.22-rc5/arch/arm/mach-at91/clock.c 2007-06-17 04:09:12.000000000 +0200
5147 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/clock.c 2007-07-29 05:23:04.000000000 +0200
5148 @@ -32,6 +32,7 @@
5149 #include <asm/arch/cpu.h>
5150
5151 #include "clock.h"
5152 +#include "generic.h"
5153
5154
5155 /*
5156 @@ -254,6 +255,23 @@
5157
5158 /*------------------------------------------------------------------------*/
5159
5160 +#ifdef CONFIG_PM
5161 +
5162 +int clk_must_disable(struct clk *clk)
5163 +{
5164 + if (!at91_suspend_entering_slow_clock())
5165 + return 0;
5166 +
5167 + while (clk->parent)
5168 + clk = clk->parent;
5169 + return clk != &clk32k;
5170 +}
5171 +EXPORT_SYMBOL(clk_must_disable);
5172 +
5173 +#endif
5174 +
5175 +/*------------------------------------------------------------------------*/
5176 +
5177 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
5178
5179 /*
5180 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/generic.h linux-2.6.22-rc5.new/arch/arm/mach-at91/generic.h
5181 --- linux-2.6.22-rc5/arch/arm/mach-at91/generic.h 2007-06-17 04:09:12.000000000 +0200
5182 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/generic.h 2007-07-29 05:23:04.000000000 +0200
5183 @@ -36,6 +36,7 @@
5184 /* Power Management */
5185 extern void at91_irq_suspend(void);
5186 extern void at91_irq_resume(void);
5187 +extern int at91_suspend_entering_slow_clock(void);
5188
5189 /* GPIO */
5190 #define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */
5191 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/ics1523.c linux-2.6.22-rc5.new/arch/arm/mach-at91/ics1523.c
5192 --- linux-2.6.22-rc5/arch/arm/mach-at91/ics1523.c 1970-01-01 01:00:00.000000000 +0100
5193 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/ics1523.c 2007-07-29 05:23:04.000000000 +0200
5194 @@ -0,0 +1,207 @@
5195 +/*
5196 + * arch/arm/mach-at91rm9200/ics1523.c
5197 + *
5198 + * Copyright (C) 2003 ATMEL Rousset
5199 + *
5200 + * This program is free software; you can redistribute it and/or modify
5201 + * it under the terms of the GNU General Public License as published by
5202 + * the Free Software Foundation; either version 2 of the License, or
5203 + * (at your option) any later version.
5204 + *
5205 + * This program is distributed in the hope that it will be useful,
5206 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5207 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5208 + * GNU General Public License for more details.
5209 + *
5210 + * You should have received a copy of the GNU General Public License
5211 + * along with this program; if not, write to the Free Software
5212 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5213 + */
5214 +
5215 +#include <asm/hardware.h>
5216 +#include <asm/io.h>
5217 +
5218 +#include <linux/clk.h>
5219 +#include <linux/delay.h>
5220 +#include <linux/err.h>
5221 +#include <linux/init.h>
5222 +
5223 +#include <asm/arch/ics1523.h>
5224 +#include <asm/arch/at91_twi.h>
5225 +#include <asm/arch/gpio.h>
5226 +
5227 +/* TWI Errors */
5228 +#define AT91_TWI_ERROR (AT91_TWI_NACK | AT91_TWI_UNRE | AT91_TWI_OVRE)
5229 +
5230 +
5231 +static void __iomem *twi_base;
5232 +
5233 +#define at91_twi_read(reg) __raw_readl(twi_base + (reg))
5234 +#define at91_twi_write(reg, val) __raw_writel((val), twi_base + (reg))
5235 +
5236 +
5237 +/* -----------------------------------------------------------------------------
5238 + * Initialization of TWI CLOCK
5239 + * ----------------------------------------------------------------------------- */
5240 +
5241 +static void at91_ics1523_SetTwiClock(unsigned int mck_khz)
5242 +{
5243 + int sclock;
5244 +
5245 + /* Here, CKDIV = 1 and CHDIV = CLDIV ==> CLDIV = CHDIV = 1/4*((Fmclk/FTWI) -6) */
5246 + sclock = (10*mck_khz / ICS_TRANSFER_RATE);
5247 + if (sclock % 10 >= 5)
5248 + sclock = (sclock /10) - 5;
5249 + else
5250 + sclock = (sclock /10)- 6;
5251 + sclock = (sclock + (4 - sclock %4)) >> 2; /* div 4 */
5252 +
5253 + at91_twi_write(AT91_TWI_CWGR, 0x00010000 | sclock | (sclock << 8));
5254 +}
5255 +
5256 +/* -----------------------------------------------------------------------------
5257 + * Read a byte with TWI Interface from the Clock Generator ICS1523
5258 + * ----------------------------------------------------------------------------- */
5259 +
5260 +static int at91_ics1523_ReadByte(unsigned char reg_address, unsigned char *data_in)
5261 +{
5262 + int Status, nb_trial;
5263 +
5264 + at91_twi_write(AT91_TWI_MMR, AT91_TWI_MREAD | AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
5265 + at91_twi_write(AT91_TWI_IADR, reg_address);
5266 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5267 +
5268 + /* Program temporizing period (300us) */
5269 + udelay(300);
5270 +
5271 + /* Wait TXcomplete ... */
5272 + nb_trial = 0;
5273 + Status = at91_twi_read(AT91_TWI_SR);
5274 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
5275 + nb_trial++;
5276 + Status = at91_twi_read(AT91_TWI_SR);
5277 + }
5278 +
5279 + if (Status & AT91_TWI_TXCOMP) {
5280 + *data_in = (unsigned char) at91_twi_read(AT91_TWI_RHR);
5281 + return ICS1523_ACCESS_OK;
5282 + }
5283 + else
5284 + return ICS1523_ACCESS_ERROR;
5285 +}
5286 +
5287 +/* -----------------------------------------------------------------------------
5288 + * Write a byte with TWI Interface to the Clock Generator ICS1523
5289 + * ----------------------------------------------------------------------------- */
5290 +
5291 +static int at91_ics1523_WriteByte(unsigned char reg_address, unsigned char data_out)
5292 +{
5293 + int Status, nb_trial;
5294 +
5295 + at91_twi_write(AT91_TWI_MMR, AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
5296 + at91_twi_write(AT91_TWI_IADR, reg_address);
5297 + at91_twi_write(AT91_TWI_THR, data_out);
5298 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5299 +
5300 + /* Program temporizing period (300us) */
5301 + udelay(300);
5302 +
5303 + nb_trial = 0;
5304 + Status = at91_twi_read(AT91_TWI_SR);
5305 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
5306 + nb_trial++;
5307 + if (Status & AT91_TWI_ERROR) {
5308 + /* If Underrun OR NACK - Start again */
5309 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5310 +
5311 + /* Program temporizing period (300us) */
5312 + udelay(300);
5313 + }
5314 + Status = at91_twi_read(AT91_TWI_SR);
5315 + };
5316 +
5317 + if (Status & AT91_TWI_TXCOMP)
5318 + return ICS1523_ACCESS_OK;
5319 + else
5320 + return ICS1523_ACCESS_ERROR;
5321 +}
5322 +
5323 +/* -----------------------------------------------------------------------------
5324 + * Initialization of the Clock Generator ICS1523
5325 + * ----------------------------------------------------------------------------- */
5326 +
5327 +int at91_ics1523_init(void)
5328 +{
5329 + int nb_trial;
5330 + int ack = ICS1523_ACCESS_OK;
5331 + unsigned int status = 0xffffffff;
5332 + struct clk *twi_clk;
5333 +
5334 + /* Map in TWI peripheral */
5335 + twi_base = ioremap(AT91RM9200_BASE_TWI, SZ_16K);
5336 + if (!twi_base)
5337 + return -ENOMEM;
5338 +
5339 + /* pins used for TWI interface */
5340 + at91_set_A_periph(AT91_PIN_PA25, 0); /* TWD */
5341 + at91_set_multi_drive(AT91_PIN_PA25, 1);
5342 + at91_set_A_periph(AT91_PIN_PA26, 0); /* TWCK */
5343 + at91_set_multi_drive(AT91_PIN_PA26, 1);
5344 +
5345 + /* Enable the TWI clock */
5346 + twi_clk = clk_get(NULL, "twi_clk");
5347 + if (IS_ERR(twi_clk))
5348 + return ICS1523_ACCESS_ERROR;
5349 + clk_enable(twi_clk);
5350 +
5351 + /* Disable interrupts */
5352 + at91_twi_write(AT91_TWI_IDR, -1);
5353 +
5354 + /* Reset peripheral */
5355 + at91_twi_write(AT91_TWI_CR, AT91_TWI_SWRST);
5356 +
5357 + /* Set Master mode */
5358 + at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN);
5359 +
5360 + /* Set TWI Clock Waveform Generator Register */
5361 + at91_ics1523_SetTwiClock(60000); /* MCK in KHz = 60000 KHz */
5362 +
5363 + /* ICS1523 Initialisation */
5364 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) 0);
5365 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OE, (unsigned char) (ICS_OEF | ICS_OET2 | ICS_OETCK));
5366 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OD, (unsigned char) (ICS_INSEL | 0x7F));
5367 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0);
5368 +
5369 + nb_trial = 0;
5370 + do {
5371 + nb_trial++;
5372 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) (ICS_ENDLS | ICS_ENPLS | ICS_PDEN /*| ICS_FUNCSEL*/));
5373 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_LCR, (unsigned char) (ICS_PSD | ICS_PFD));
5374 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD0, (unsigned char) 0x39) ; /* 0x7A */
5375 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD1, (unsigned char) 0x00);
5376 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_PLLR));
5377 +
5378 + /* Program 1ms temporizing period */
5379 + mdelay(1);
5380 +
5381 + at91_ics1523_ReadByte ((unsigned char) ICS_SR, (char *)&status);
5382 + } while (!((unsigned int) status & (unsigned int) ICS_PLLLOCK) && (nb_trial < 10));
5383 +
5384 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAC, (unsigned char) 0x03) ; /* 0x01 */
5385 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_DPAR));
5386 +
5387 + /* Program 1ms temporizing period */
5388 + mdelay(1);
5389 +
5390 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0x00);
5391 +
5392 + /* Program 1ms temporizing period */
5393 + mdelay(1);
5394 +
5395 + /* All done - cleanup */
5396 + iounmap(twi_base);
5397 + clk_disable(twi_clk);
5398 + clk_put(twi_clk);
5399 +
5400 + return ack;
5401 +}
5402 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/Kconfig linux-2.6.22-rc5.new/arch/arm/mach-at91/Kconfig
5403 --- linux-2.6.22-rc5/arch/arm/mach-at91/Kconfig 2007-06-17 04:09:12.000000000 +0200
5404 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/Kconfig 2007-07-29 05:23:04.000000000 +0200
5405 @@ -97,6 +97,12 @@
5406 help
5407 Select this if you are using Sperry-Sun's KAFA board.
5408
5409 +config MACH_CHUB
5410 + bool "Promwad Chub board"
5411 + depends on ARCH_AT91RM9200
5412 + help
5413 + Select this if you are using Promwad's Chub board.
5414 +
5415 endif
5416
5417 # ----------------------------------------------------------
5418 @@ -121,6 +127,13 @@
5419 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
5420 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
5421
5422 +config MACH_CAM60
5423 + bool "KwikByte CAM60 board"
5424 + depends on ARCH_AT91SAM9260
5425 + help
5426 + Select this if you are using KwikByte's CAM60 board based on the Atmel AT91SAM9260.
5427 + <http://www.kwikbyte.com>
5428 +
5429 endif
5430
5431 # ----------------------------------------------------------
5432 @@ -184,6 +197,20 @@
5433 On AT91SAM926x boards both types of NAND flash can be present
5434 (8 and 16 bit data bus width).
5435
5436 +config CSB300_WAKE_SW0
5437 + bool "CSB300 SW0 irq0 wakeup"
5438 + depends on MACH_CSB337 && PM
5439 + help
5440 + If you have a CSB300 connected to your CSB337, this lets
5441 + SW0 serve as a wakeup button. It uses IRQ0.
5442 +
5443 +config CSB300_WAKE_SW1
5444 + bool "CSB300 SW1 gpio wakeup"
5445 + depends on MACH_CSB337 && PM
5446 + help
5447 + If you have a CSB300 connected to your CSB337, this lets
5448 + SW1 serve as a wakeup button. It uses GPIO.
5449 +
5450 # ----------------------------------------------------------
5451
5452 comment "AT91 Feature Selections"
5453 @@ -194,6 +221,20 @@
5454 Select this if you need to program one or more of the PCK0..PCK3
5455 programmable clock outputs.
5456
5457 +config ATMEL_TCLIB
5458 + bool "Timer/Counter Library"
5459 + help
5460 + Select this if you want a library to allocate the Timer/Counter
5461 + blocks found on many Atmel processors. This facilitates using
5462 + these modules despite processor differences.
5463 +
5464 +config AT91_SLOW_CLOCK
5465 + bool "Suspend-to-RAM uses slow clock mode (EXPERIMENTAL)"
5466 + depends on PM && EXPERIMENTAL
5467 + help
5468 + Select this if you wish to put the CPU into slow clock mode
5469 + while in the "Suspend to RAM" state, to save more power.
5470 +
5471 endmenu
5472
5473 endif
5474 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/Makefile linux-2.6.22-rc5.new/arch/arm/mach-at91/Makefile
5475 --- linux-2.6.22-rc5/arch/arm/mach-at91/Makefile 2007-06-17 04:09:12.000000000 +0200
5476 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/Makefile 2007-07-29 05:23:04.000000000 +0200
5477 @@ -8,6 +8,8 @@
5478 obj- :=
5479
5480 obj-$(CONFIG_PM) += pm.o
5481 +obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o
5482 +obj-$(CONFIG_ATMEL_TCLIB) += tclib.o
5483
5484 # CPU-specific support
5485 obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
5486 @@ -26,10 +28,12 @@
5487 obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
5488 obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
5489 obj-$(CONFIG_MACH_KAFA) += board-kafa.o
5490 +obj-$(CONFIG_MACH_CHUB) += board-chub.o
5491 obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
5492
5493 # AT91SAM9260 board-specific support
5494 obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
5495 +obj-$(CONFIG_MACH_CAM60) += board-cam60.o
5496
5497 # AT91SAM9261 board-specific support
5498 obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
5499 @@ -51,7 +55,7 @@
5500 obj-$(CONFIG_LEDS) += $(led-y)
5501
5502 # VGA support
5503 -#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
5504 +obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
5505
5506
5507 ifeq ($(CONFIG_PM_DEBUG),y)
5508 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm.c linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c
5509 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm.c 2007-06-17 04:09:12.000000000 +0200
5510 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c 2007-07-29 05:23:04.000000000 +0200
5511 @@ -63,6 +63,7 @@
5512 * Verify that all the clocks are correct before entering
5513 * slow-clock mode.
5514 */
5515 +#warning "SAM9260 only has 3 programmable clocks."
5516 static int at91_pm_verify_clocks(void)
5517 {
5518 unsigned long scsr;
5519 @@ -103,20 +104,15 @@
5520 }
5521
5522 /*
5523 - * Call this from platform driver suspend() to see how deeply to suspend.
5524 + * This is called from clk_must_disable(), to see how deeply to suspend.
5525 * For example, some controllers (like OHCI) need one of the PLL clocks
5526 * in order to act as a wakeup source, and those are not available when
5527 * going into slow clock mode.
5528 - *
5529 - * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have
5530 - * the very same problem (but not using at91 main_clk), and it'd be better
5531 - * to add one generic API rather than lots of platform-specific ones.
5532 */
5533 int at91_suspend_entering_slow_clock(void)
5534 {
5535 return (target_state == PM_SUSPEND_MEM);
5536 }
5537 -EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5538
5539
5540 static void (*slow_clock)(void);
5541 @@ -205,16 +201,23 @@
5542 .enter = at91_pm_enter,
5543 };
5544
5545 +#ifdef CONFIG_AT91_SLOW_CLOCK
5546 +extern void at91rm9200_slow_clock(void);
5547 +extern u32 at91rm9200_slow_clock_sz;
5548 +#endif
5549 +
5550 static int __init at91_pm_init(void)
5551 {
5552 - printk("AT91: Power Management\n");
5553 -
5554 -#ifdef CONFIG_AT91_PM_SLOW_CLOCK
5555 - /* REVISIT allocations of SRAM should be dynamically managed.
5556 +#ifdef CONFIG_AT91_SLOW_CLOCK
5557 + /*
5558 + * REVISIT allocations of SRAM should be dynamically managed.
5559 * FIQ handlers and other components will want SRAM/TCM too...
5560 */
5561 - slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
5562 + slow_clock = (void *) (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE + (3 * SZ_4K));
5563 memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
5564 + printk("AT91: Power Management (with slow clock mode)\n");
5565 +#else
5566 + printk("AT91: Power Management\n");
5567 #endif
5568
5569 /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
5570 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm.c.orig linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c.orig
5571 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm.c.orig 1970-01-01 01:00:00.000000000 +0100
5572 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c.orig 2007-06-17 04:09:12.000000000 +0200
5573 @@ -0,0 +1,227 @@
5574 +/*
5575 + * arch/arm/mach-at91/pm.c
5576 + * AT91 Power Management
5577 + *
5578 + * Copyright (C) 2005 David Brownell
5579 + *
5580 + * This program is free software; you can redistribute it and/or modify
5581 + * it under the terms of the GNU General Public License as published by
5582 + * the Free Software Foundation; either version 2 of the License, or
5583 + * (at your option) any later version.
5584 + */
5585 +
5586 +#include <linux/pm.h>
5587 +#include <linux/sched.h>
5588 +#include <linux/proc_fs.h>
5589 +#include <linux/pm.h>
5590 +#include <linux/interrupt.h>
5591 +#include <linux/sysfs.h>
5592 +#include <linux/module.h>
5593 +#include <linux/platform_device.h>
5594 +
5595 +#include <asm/io.h>
5596 +#include <asm/irq.h>
5597 +#include <asm/atomic.h>
5598 +#include <asm/mach/time.h>
5599 +#include <asm/mach/irq.h>
5600 +#include <asm/mach-types.h>
5601 +
5602 +#include <asm/arch/at91_pmc.h>
5603 +#include <asm/arch/at91rm9200_mc.h>
5604 +#include <asm/arch/gpio.h>
5605 +#include <asm/arch/cpu.h>
5606 +
5607 +#include "generic.h"
5608 +
5609 +
5610 +static int at91_pm_valid_state(suspend_state_t state)
5611 +{
5612 + switch (state) {
5613 + case PM_SUSPEND_ON:
5614 + case PM_SUSPEND_STANDBY:
5615 + case PM_SUSPEND_MEM:
5616 + return 1;
5617 +
5618 + default:
5619 + return 0;
5620 + }
5621 +}
5622 +
5623 +
5624 +static suspend_state_t target_state;
5625 +
5626 +/*
5627 + * Called after processes are frozen, but before we shutdown devices.
5628 + */
5629 +static int at91_pm_prepare(suspend_state_t state)
5630 +{
5631 + target_state = state;
5632 + return 0;
5633 +}
5634 +
5635 +/*
5636 + * Verify that all the clocks are correct before entering
5637 + * slow-clock mode.
5638 + */
5639 +static int at91_pm_verify_clocks(void)
5640 +{
5641 + unsigned long scsr;
5642 + int i;
5643 +
5644 + scsr = at91_sys_read(AT91_PMC_SCSR);
5645 +
5646 + /* USB must not be using PLLB */
5647 + if (cpu_is_at91rm9200()) {
5648 + if ((scsr & (AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP)) != 0) {
5649 + pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
5650 + return 0;
5651 + }
5652 + } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()) {
5653 + if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
5654 + pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
5655 + return 0;
5656 + }
5657 + }
5658 +
5659 +#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
5660 + /* PCK0..PCK3 must be disabled, or configured to use clk32k */
5661 + for (i = 0; i < 4; i++) {
5662 + u32 css;
5663 +
5664 + if ((scsr & (AT91_PMC_PCK0 << i)) == 0)
5665 + continue;
5666 +
5667 + css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS;
5668 + if (css != AT91_PMC_CSS_SLOW) {
5669 + pr_debug("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css);
5670 + return 0;
5671 + }
5672 + }
5673 +#endif
5674 +
5675 + return 1;
5676 +}
5677 +
5678 +/*
5679 + * Call this from platform driver suspend() to see how deeply to suspend.
5680 + * For example, some controllers (like OHCI) need one of the PLL clocks
5681 + * in order to act as a wakeup source, and those are not available when
5682 + * going into slow clock mode.
5683 + *
5684 + * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have
5685 + * the very same problem (but not using at91 main_clk), and it'd be better
5686 + * to add one generic API rather than lots of platform-specific ones.
5687 + */
5688 +int at91_suspend_entering_slow_clock(void)
5689 +{
5690 + return (target_state == PM_SUSPEND_MEM);
5691 +}
5692 +EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5693 +
5694 +
5695 +static void (*slow_clock)(void);
5696 +
5697 +
5698 +static int at91_pm_enter(suspend_state_t state)
5699 +{
5700 + at91_gpio_suspend();
5701 + at91_irq_suspend();
5702 +
5703 + pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
5704 + /* remember all the always-wake irqs */
5705 + (at91_sys_read(AT91_PMC_PCSR)
5706 + | (1 << AT91_ID_FIQ)
5707 + | (1 << AT91_ID_SYS)
5708 + | (at91_extern_irq))
5709 + & at91_sys_read(AT91_AIC_IMR),
5710 + state);
5711 +
5712 + switch (state) {
5713 + /*
5714 + * Suspend-to-RAM is like STANDBY plus slow clock mode, so
5715 + * drivers must suspend more deeply: only the master clock
5716 + * controller may be using the main oscillator.
5717 + */
5718 + case PM_SUSPEND_MEM:
5719 + /*
5720 + * Ensure that clocks are in a valid state.
5721 + */
5722 + if (!at91_pm_verify_clocks())
5723 + goto error;
5724 +
5725 + /*
5726 + * Enter slow clock mode by switching over to clk32k and
5727 + * turning off the main oscillator; reverse on wakeup.
5728 + */
5729 + if (slow_clock) {
5730 + slow_clock();
5731 + break;
5732 + } else {
5733 + /* DEVELOPMENT ONLY */
5734 + pr_info("AT91: PM - no slow clock mode yet ...\n");
5735 + /* FALLTHROUGH leaving master clock alone */
5736 + }
5737 +
5738 + /*
5739 + * STANDBY mode has *all* drivers suspended; ignores irqs not
5740 + * marked as 'wakeup' event sources; and reduces DRAM power.
5741 + * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and
5742 + * nothing fancy done with main or cpu clocks.
5743 + */
5744 + case PM_SUSPEND_STANDBY:
5745 + /*
5746 + * NOTE: the Wait-for-Interrupt instruction needs to be
5747 + * in icache so the SDRAM stays in self-refresh mode until
5748 + * the wakeup IRQ occurs.
5749 + */
5750 + asm("b 1f; .align 5; 1:");
5751 + asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */
5752 + at91_sys_write(AT91_SDRAMC_SRR, 1); /* self-refresh mode */
5753 + /* fall though to next state */
5754 +
5755 + case PM_SUSPEND_ON:
5756 + asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
5757 + break;
5758 +
5759 + default:
5760 + pr_debug("AT91: PM - bogus suspend state %d\n", state);
5761 + goto error;
5762 + }
5763 +
5764 + pr_debug("AT91: PM - wakeup %08x\n",
5765 + at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));
5766 +
5767 +error:
5768 + target_state = PM_SUSPEND_ON;
5769 + at91_irq_resume();
5770 + at91_gpio_resume();
5771 + return 0;
5772 +}
5773 +
5774 +
5775 +static struct pm_ops at91_pm_ops ={
5776 + .valid = at91_pm_valid_state,
5777 + .prepare = at91_pm_prepare,
5778 + .enter = at91_pm_enter,
5779 +};
5780 +
5781 +static int __init at91_pm_init(void)
5782 +{
5783 + printk("AT91: Power Management\n");
5784 +
5785 +#ifdef CONFIG_AT91_PM_SLOW_CLOCK
5786 + /* REVISIT allocations of SRAM should be dynamically managed.
5787 + * FIQ handlers and other components will want SRAM/TCM too...
5788 + */
5789 + slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
5790 + memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
5791 +#endif
5792 +
5793 + /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
5794 + at91_sys_write(AT91_SDRAMC_LPR, 0);
5795 +
5796 + pm_set_ops(&at91_pm_ops);
5797 +
5798 + return 0;
5799 +}
5800 +arch_initcall(at91_pm_init);
5801 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm_slowclock.S linux-2.6.22-rc5.new/arch/arm/mach-at91/pm_slowclock.S
5802 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm_slowclock.S 1970-01-01 01:00:00.000000000 +0100
5803 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm_slowclock.S 2007-07-29 05:23:04.000000000 +0200
5804 @@ -0,0 +1,172 @@
5805 +/*
5806 + * arch/arm/mach-at91/pm_slow_clock.S
5807 + *
5808 + * Copyright (C) 2006 Savin Zlobec
5809 + *
5810 + * This program is free software; you can redistribute it and/or modify
5811 + * it under the terms of the GNU General Public License version 2 as
5812 + * published by the Free Software Foundation.
5813 + *
5814 + */
5815 +
5816 +#include <linux/linkage.h>
5817 +#include <asm/hardware.h>
5818 +#include <asm/arch/at91_pmc.h>
5819 +#include <asm/arch/at91rm9200_mc.h>
5820 +
5821 +#define MCKRDY_TIMEOUT 1000
5822 +#define MOSCRDY_TIMEOUT 1000
5823 +#define PLLALOCK_TIMEOUT 1000
5824 +
5825 + .macro wait_mckrdy
5826 + mov r2, #MCKRDY_TIMEOUT
5827 +1: sub r2, r2, #1
5828 + cmp r2, #0
5829 + beq 2f
5830 + ldr r3, [r1, #AT91_PMC_SR]
5831 + tst r3, #AT91_PMC_MCKRDY
5832 + beq 1b
5833 +2:
5834 + .endm
5835 +
5836 + .macro wait_moscrdy
5837 + mov r2, #MOSCRDY_TIMEOUT
5838 +1: sub r2, r2, #1
5839 + cmp r2, #0
5840 + beq 2f
5841 + ldr r3, [r1, #AT91_PMC_SR]
5842 + tst r3, #AT91_PMC_MOSCS
5843 + beq 1b
5844 +2:
5845 + .endm
5846 +
5847 + .macro wait_pllalock
5848 + mov r2, #PLLALOCK_TIMEOUT
5849 +1: sub r2, r2, #1
5850 + cmp r2, #0
5851 + beq 2f
5852 + ldr r3, [r1, #AT91_PMC_SR]
5853 + tst r3, #AT91_PMC_LOCKA
5854 + beq 1b
5855 +2:
5856 + .endm
5857 +
5858 + .macro wait_plladis
5859 + mov r2, #PLLALOCK_TIMEOUT
5860 +1: sub r2, r2, #1
5861 + cmp r2, #0
5862 + beq 2f
5863 + ldr r3, [r1, #AT91_PMC_SR]
5864 + tst r3, #AT91_PMC_LOCKA
5865 + bne 1b
5866 +2:
5867 + .endm
5868 +
5869 + .text
5870 +
5871 +ENTRY(at91rm9200_slow_clock)
5872 +
5873 + ldr r1, .at91_va_base_sys
5874 +
5875 + /* Put SDRAM in self refresh mode */
5876 +
5877 + b 1f
5878 + .align 5
5879 +1: mcr p15, 0, r0, c7, c10, 4
5880 + mov r2, #1
5881 + str r2, [r1, #AT91_SDRAMC_SRR]
5882 +
5883 + /* Save Master clock setting */
5884 +
5885 + ldr r2, [r1, #AT91_PMC_MCKR]
5886 + str r2, .saved_mckr
5887 +
5888 + /*
5889 + * Set the Master clock source to slow clock
5890 + *
5891 + * First set the CSS field, wait for MCKRDY
5892 + * and than set the PRES and MDIV fields.
5893 + *
5894 + * See eratta #2[78] for details.
5895 + */
5896 +
5897 + bic r2, r2, #3
5898 + str r2, [r1, #AT91_PMC_MCKR]
5899 +
5900 + wait_mckrdy
5901 +
5902 + mov r2, #0
5903 + str r2, [r1, #AT91_PMC_MCKR]
5904 +
5905 + /* Save PLLA setting and disable it */
5906 +
5907 + ldr r2, [r1, #AT91_CKGR_PLLAR]
5908 + str r2, .saved_pllar
5909 +
5910 + mov r2, #0
5911 + str r2, [r1, #AT91_CKGR_PLLAR]
5912 +
5913 + wait_plladis
5914 +
5915 + /* Turn off the main oscillator */
5916 +
5917 + ldr r2, [r1, #AT91_CKGR_MOR]
5918 + bic r2, r2, #AT91_PMC_MOSCEN
5919 + str r2, [r1, #AT91_CKGR_MOR]
5920 +
5921 + /* Wait for interrupt */
5922 +
5923 + mcr p15, 0, r0, c7, c0, 4
5924 +
5925 + /* Turn on the main oscillator */
5926 +
5927 + ldr r2, [r1, #AT91_CKGR_MOR]
5928 + orr r2, r2, #AT91_PMC_MOSCEN
5929 + str r2, [r1, #AT91_CKGR_MOR]
5930 +
5931 + wait_moscrdy
5932 +
5933 + /* Restore PLLA setting */
5934 +
5935 + ldr r2, .saved_pllar
5936 + str r2, [r1, #AT91_CKGR_PLLAR]
5937 +
5938 + wait_pllalock
5939 +
5940 + /*
5941 + * Restore master clock setting
5942 + *
5943 + * First set PRES if it was not 0,
5944 + * than set CSS and MDIV fields.
5945 + * After every change wait for
5946 + * MCKRDY.
5947 + *
5948 + * See eratta #2[78] for details.
5949 + */
5950 +
5951 + ldr r2, .saved_mckr
5952 + tst r2, #0x1C
5953 + beq 2f
5954 + and r2, r2, #0x1C
5955 + str r2, [r1, #AT91_PMC_MCKR]
5956 +
5957 + wait_mckrdy
5958 +
5959 +2: ldr r2, .saved_mckr
5960 + str r2, [r1, #AT91_PMC_MCKR]
5961 +
5962 + wait_mckrdy
5963 +
5964 + mov pc, lr
5965 +
5966 +.saved_mckr:
5967 + .word 0
5968 +
5969 +.saved_pllar:
5970 + .word 0
5971 +
5972 +.at91_va_base_sys:
5973 + .word AT91_VA_BASE_SYS
5974 +
5975 +ENTRY(at91rm9200_slow_clock_sz)
5976 + .word .-at91rm9200_slow_clock
5977 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/tclib.c linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.c
5978 --- linux-2.6.22-rc5/arch/arm/mach-at91/tclib.c 1970-01-01 01:00:00.000000000 +0100
5979 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.c 2007-07-29 05:23:04.000000000 +0200
5980 @@ -0,0 +1,17 @@
5981 +#include <linux/clk.h>
5982 +#include <linux/kernel.h>
5983 +#include <linux/module.h>
5984 +
5985 +#include "tclib.h"
5986 +
5987 +static struct atmel_tcblock *blocks;
5988 +static int nblocks;
5989 +
5990 +/*
5991 + * Called from the processor-specific init to register the TC Blocks.
5992 + */
5993 +void __init atmel_tc_init(struct atmel_tcblock *tcblocks, int n)
5994 +{
5995 + blocks = tcblocks;
5996 + nblocks = n;
5997 +}
5998 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/tclib.h linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.h
5999 --- linux-2.6.22-rc5/arch/arm/mach-at91/tclib.h 1970-01-01 01:00:00.000000000 +0100
6000 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.h 2007-07-29 05:23:04.000000000 +0200
6001 @@ -0,0 +1,11 @@
6002 +
6003 +#define TC_PER_TCB 3
6004 +
6005 +struct atmel_tcblock {
6006 + u32 physaddr;
6007 + void __iomem *ioaddr;
6008 + struct clk *clk[TC_PER_TCB];
6009 + int irq[TC_PER_TCB];
6010 +};
6011 +
6012 +extern void __init atmel_tc_init(struct atmel_tcblock *tcblocks, int n);
6013 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_mci.h linux-2.6-stable/include/asm-arm/arch-at91/at91_mci.h
6014 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_mci.h Thu Apr 26 05:08:32 2007
6015 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91_mci.h Tue May 8 12:13:31 2007
6016 @@ -26,6 +26,9 @@
6017 #define AT91_MCI_MR 0x04 /* Mode Register */
6018 #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */
6019 #define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */
6020 +#define AT91_MCI_RDPROOF (1 << 11) /* Read Proof Enable [SAM926[03] only] */
6021 +#define AT91_MCI_WRPROOF (1 << 12) /* Write Proof Enable [SAM926[03] only] */
6022 +#define AT91_MCI_PDCFBYTE (1 << 13) /* PDC Force Byte Transfer [SAM926[03] only] */
6023 #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */
6024 #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */
6025 #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */
6026 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_pmc.h linux-2.6-stable/include/asm-arm/arch-at91/at91_pmc.h
6027 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_pmc.h Thu Apr 26 05:08:32 2007
6028 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91_pmc.h Fri May 11 16:45:00 2007
6029 @@ -37,7 +37,9 @@
6030 #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
6031 #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
6032
6033 -#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */
6034 +#define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL only] */
6035 +
6036 +#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */
6037 #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
6038 #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */
6039 #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
6040 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91sam9260_matrix.h linux-2.6-stable/include/asm-arm/arch-at91/at91sam9260_matrix.h
6041 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91sam9260_matrix.h Thu Apr 26 05:08:32 2007
6042 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91sam9260_matrix.h Fri May 11 16:20:33 2007
6043 @@ -67,7 +67,7 @@
6044 #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
6045 #define AT91_MATRIX_CS4A_SMC (0 << 4)
6046 #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
6047 -#define AT91_MATRIX_CS5A (1 << 5 ) /* Chip Select 5 Assignment */
6048 +#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
6049 #define AT91_MATRIX_CS5A_SMC (0 << 5)
6050 #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
6051 #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
6052 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/board.h linux-2.6-stable/include/asm-arm/arch-at91/board.h
6053 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/board.h Thu May 17 12:13:17 2007
6054 +++ linux-2.6-stable/include/asm-arm/arch-at91/board.h Thu May 10 12:21:10 2007
6055 @@ -124,9 +124,21 @@
6056 };
6057 extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
6058
6059 + /* ISI */
6060 +extern void __init at91_add_device_isi(void);
6061 +
6062 /* LEDs */
6063 extern u8 at91_leds_cpu;
6064 extern u8 at91_leds_timer;
6065 extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
6066
6067 +struct at91_gpio_led {
6068 + u8 index; /* index of LED */
6069 + char* name; /* name of LED */
6070 + u8 gpio; /* AT91_PIN_xx */
6071 + u8 flags; /* 1=active-high */
6072 + char* trigger; /* default trigger */
6073 +};
6074 +extern void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr);
6075 +
6076 #endif
6077 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/ics1523.h linux-2.6-stable/include/asm-arm/arch-at91/ics1523.h
6078 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/ics1523.h Thu Jan 1 02:00:00 1970
6079 +++ linux-2.6-stable/include/asm-arm/arch-at91/ics1523.h Mon May 14 13:49:47 2007
6080 @@ -0,0 +1,154 @@
6081 +//*----------------------------------------------------------------------------
6082 +//* ATMEL Microcontroller Software Support - ROUSSET -
6083 +//*----------------------------------------------------------------------------
6084 +//* The software is delivered "AS IS" without warranty or condition of any
6085 +//* kind, either express, implied or statutory. This includes without
6086 +//* limitation any warranty or condition with respect to merchantability or
6087 +//* fitness for any particular purpose, or against the infringements of
6088 +//* intellectual property rights of others.
6089 +//*----------------------------------------------------------------------------
6090 +//* File Name : ics1523.h
6091 +//* Object : Clock Generator Prototyping File.
6092 +//*
6093 +//* 1.0 08/28/02 ED : Creation
6094 +//* 1.2 13/01/03 FB : Update on lib V3
6095 +//*----------------------------------------------------------------------------
6096 +
6097 +#ifndef ics1523_h
6098 +#define ics1523_h
6099 +
6100 +/*-------------------------------------------*/
6101 +/* ICS1523 TWI Serial Clock Definition */
6102 +/*-------------------------------------------*/
6103 +
6104 +#define ICS_MIN_CLOCK 100 /* Min Frequency Access Clock KHz */
6105 +#define ICS_MAX_CLOCK 400 /* Max Frequency Access Clock KHz */
6106 +#define ICS_TRANSFER_RATE ICS_MAX_CLOCK /* Transfer speed to apply */
6107 +
6108 +#define ICS_WRITE_CLK_PNB 30 /* TWCK Clock Periods required to write */
6109 +#define ICS_READ_CLK_PNB 40 /* TWCK Clock Periods required to read */
6110 +
6111 +/*-------------------------------------------*/
6112 +/* ICS1523 Write Operation Definition */
6113 +/*-------------------------------------------*/
6114 +
6115 +#define ICS1523_ACCESS_OK 0 /* OK */
6116 +#define ICS1523_ACCESS_ERROR -1 /* NOK */
6117 +
6118 +/*-------------------------------------------*/
6119 +/* ICS1523 Device Addresses Definition */
6120 +/*-------------------------------------------*/
6121 +
6122 +#define ICS_ADDR 0x26 /* Device Address */
6123 +
6124 +/*--------------------------------------------------*/
6125 +/* ICS1523 Registers Internal Addresses Definition */
6126 +/*--------------------------------------------------*/
6127 +
6128 +#define ICS_ICR 0x0 /* Input Control Register */
6129 +#define ICS_LCR 0x1 /* Loop Control Register */
6130 +#define ICS_FD0 0x2 /* PLL FeedBack Divider LSBs */
6131 +#define ICS_FD1 0x3 /* PLL FeedBack Divider MSBs */
6132 +#define ICS_DPAO 0x4 /* Dynamic Phase Aligner Offset */
6133 +#define ICS_DPAC 0x5 /* Dynamic Phase Aligner Resolution */
6134 +#define ICS_OE 0x6 /* Output Enables Register */
6135 +#define ICS_OD 0x7 /* Osc Divider Register */
6136 +#define ICS_SWRST 0x8 /* DPA & PLL Reset Register */
6137 +#define ICS_VID 0x10 /* Chip Version Register */
6138 +#define ICS_RID 0x11 /* Chip Revision Register */
6139 +#define ICS_SR 0x12 /* Status Register */
6140 +
6141 +/*------------------------------------------------------*/
6142 +/* ICS1523 Input Control Register Bits Definition */
6143 +/*------------------------------------------------------*/
6144 +
6145 +#define ICS_PDEN 0x1 /* Phase Detector Enable */
6146 +#define ICS_PDPOL 0x2 /* Phase Detector Enable Polarity */
6147 +#define ICS_REFPOL 0x4 /* External Reference Polarity */
6148 +#define ICS_FBKPOL 0x8 /* External Feedback Polarity */
6149 +#define ICS_FBKSEL 0x10 /* External Feedback Select */
6150 +#define ICS_FUNCSEL 0x20 /* Function Out Select */
6151 +#define ICS_ENPLS 0x40 /* Enable PLL Lock/Ref Status Output */
6152 +#define ICS_ENDLS 0x80 /* Enable DPA Lock/Ref Status Output */
6153 +
6154 +/*-----------------------------------------------------*/
6155 +/* ICS1523 Loop Control Register Bits Definition */
6156 +/*-----------------------------------------------------*/
6157 +
6158 +#define ICS_PFD 0x7 /* Phase Detector Gain */
6159 +#define ICS_PSD 0x30 /* Post-Scaler Divider */
6160 +
6161 +/*----------------------------------------------------*/
6162 +/* ICS1523 PLL FeedBack Divider LSBs Definition */
6163 +/*----------------------------------------------------*/
6164 +
6165 +#define ICS_FBDL 0xFF /* PLL FeedBack Divider LSBs */
6166 +
6167 +/*----------------------------------------------------*/
6168 +/* ICS1523 PLL FeedBack Divider MSBs Definition */
6169 +/*----------------------------------------------------*/
6170 +
6171 +#define ICS_FBDM 0xF /* PLL FeedBack Divider MSBs */
6172 +
6173 +/*------------------------------------------------------------*/
6174 +/* ICS1523 Dynamic Phase Aligner Offset Bits Definition */
6175 +/*------------------------------------------------------------*/
6176 +
6177 +#define ICS_DPAOS 0x2F /* Dynamic Phase Aligner Offset */
6178 +#define ICS_FILSEL 0x80 /* Loop Filter Select */
6179 +
6180 +/*----------------------------------------------------------------*/
6181 +/* ICS1523 Dynamic Phase Aligner Resolution Bits Definition */
6182 +/*----------------------------------------------------------------*/
6183 +
6184 +#define ICS_DPARES 0x3 /* Dynamic Phase Aligner Resolution */
6185 +#define ICS_MMREV 0xFC /* Metal Mask Revision Number */
6186 +
6187 +/*-------------------------------------------------------*/
6188 +/* ICS1523 Output Enables Register Bits Definition */
6189 +/*-------------------------------------------------------*/
6190 +
6191 +#define ICS_OEPCK 0x1 /* Output Enable for PECL PCLK Outputs */
6192 +#define ICS_OETCK 0x2 /* Output Enable for STTL CLK Output */
6193 +#define ICS_OEP2 0x4 /* Output Enable for PECL CLK/2 Outputs */
6194 +#define ICS_OET2 0x8 /* Output Enable for STTL CLK/2 Output */
6195 +#define ICS_OEF 0x10 /* Output Enable for STTL FUNC Output */
6196 +#define ICS_CLK2INV 0x20 /* CLK/2 Invert */
6197 +#define ICS_OSCL 0xC0 /* SSTL Clock Scaler */
6198 +
6199 +/*----------------------------------------------------*/
6200 +/* ICS1523 Osc Divider Register Bits Definition */
6201 +/*----------------------------------------------------*/
6202 +
6203 +#define ICS_OSCDIV 0x7F /* Oscillator Divider Modulus */
6204 +#define ICS_INSEL 0x80 /* Input Select */
6205 +
6206 +/*---------------------------------------------------*/
6207 +/* ICS1523 DPA & PLL Reset Register Definition */
6208 +/*---------------------------------------------------*/
6209 +
6210 +#define ICS_DPAR 0x0A /* DPA Reset Command */
6211 +#define ICS_PLLR 0x50 /* PLL Reset Command */
6212 +
6213 +/*------------------------------------------------*/
6214 +/* ICS1523 Chip Version Register Definition */
6215 +/*------------------------------------------------*/
6216 +
6217 +#define ICS_CHIPV 0xFF /* Chip Version */
6218 +
6219 +/*-------------------------------------------------*/
6220 +/* ICS1523 Chip Revision Register Definition */
6221 +/*-------------------------------------------------*/
6222 +
6223 +#define ICS_CHIPR 0xFF /* Chip Revision */
6224 +
6225 +/*------------------------------------------*/
6226 +/* ICS1523 Status Register Definition */
6227 +/*------------------------------------------*/
6228 +
6229 +#define ICS_DPALOCK 0x1 /* DPA Lock Status */
6230 +#define ICS_PLLLOCK 0x2 /* PLL Lock Status */
6231 +
6232 +int at91_ics1523_init(void);
6233 +
6234 +#endif /* ics1523_h */
6235 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/spi.h linux-2.6-stable/include/asm-arm/arch-at91/spi.h
6236 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/spi.h Thu Jan 1 02:00:00 1970
6237 +++ linux-2.6-stable/include/asm-arm/arch-at91/spi.h Mon May 14 13:49:47 2007
6238 @@ -0,0 +1,54 @@
6239 +/*
6240 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200
6241 + *
6242 + * (c) SAN People (Pty) Ltd
6243 + *
6244 + * This program is free software; you can redistribute it and/or
6245 + * modify it under the terms of the GNU General Public License
6246 + * as published by the Free Software Foundation; either version
6247 + * 2 of the License, or (at your option) any later version.
6248 + */
6249 +
6250 +#ifndef AT91_LEGACY_SPI_H
6251 +#define AT91_LEGACY_SPI_H
6252 +
6253 +#define SPI_MAJOR 153 /* registered device number */
6254 +
6255 +#define DEFAULT_SPI_CLK 6000000
6256 +
6257 +
6258 +/* Maximum number of buffers in a single SPI transfer.
6259 + * DataFlash uses maximum of 2
6260 + * spidev interface supports up to 8.
6261 + */
6262 +#define MAX_SPI_TRANSFERS 8
6263 +#define NR_SPI_DEVICES 4 /* number of devices on SPI bus */
6264 +
6265 +/*
6266 + * Describes the buffers for a SPI transfer.
6267 + * A transmit & receive buffer must be specified for each transfer
6268 + */
6269 +struct spi_transfer_list {
6270 + void* tx[MAX_SPI_TRANSFERS]; /* transmit */
6271 + int txlen[MAX_SPI_TRANSFERS];
6272 + void* rx[MAX_SPI_TRANSFERS]; /* receive */
6273 + int rxlen[MAX_SPI_TRANSFERS];
6274 + int nr_transfers; /* number of transfers */
6275 + int curr; /* current transfer */
6276 +};
6277 +
6278 +struct spi_local {
6279 + unsigned int pcs; /* Peripheral Chip Select value */
6280 +
6281 + struct spi_transfer_list *xfers; /* current transfer list */
6282 + dma_addr_t tx, rx; /* DMA address for current transfer */
6283 + dma_addr_t txnext, rxnext; /* DMA address for next transfer */
6284 +};
6285 +
6286 +
6287 +/* Exported functions */
6288 +extern void spi_access_bus(short device);
6289 +extern void spi_release_bus(short device);
6290 +extern int spi_transfer(struct spi_transfer_list* list);
6291 +
6292 +#endif
6293 diff -urN -x CVS linux-2.6.22-rc1/include/linux/clk.h linux-2.6-stable/include/linux/clk.h
6294 --- linux-2.6.22-rc1/include/linux/clk.h Thu Apr 26 05:08:32 2007
6295 +++ linux-2.6-stable/include/linux/clk.h Tue May 8 12:13:31 2007
6296 @@ -121,4 +121,24 @@
6297 */
6298 struct clk *clk_get_parent(struct clk *clk);
6299
6300 +/**
6301 + * clk_must_disable - report whether a clock's users must disable it
6302 + * @clk: one node in the clock tree
6303 + *
6304 + * This routine returns true only if the upcoming system state requires
6305 + * disabling the specified clock.
6306 + *
6307 + * It's common for platform power states to constrain certain clocks (and
6308 + * their descendants) to be unavailable, while other states allow that
6309 + * clock to be active. A platform's power states often include an "all on"
6310 + * mode; system wide sleep states like "standby" or "suspend-to-RAM"; and
6311 + * operating states which sacrifice functionality for lower power usage.
6312 + *
6313 + * The constraint value is commonly tested in device driver suspend(), to
6314 + * leave clocks active if they are needed for features like wakeup events.
6315 + * On platforms that support reduced functionality operating states, the
6316 + * constraint may also need to be tested during resume() and probe() calls.
6317 + */
6318 +int clk_must_disable(struct clk *clk);
6319 +
6320 #endif
6321 diff -urN -x CVS linux-2.6.22-rc1/include/linux/i2c-id.h linux-2.6-stable/include/linux/i2c-id.h
6322 --- linux-2.6.22-rc1/include/linux/i2c-id.h Thu May 17 12:13:23 2007
6323 +++ linux-2.6-stable/include/linux/i2c-id.h Mon May 14 10:18:35 2007
6324 @@ -203,6 +203,7 @@
6325
6326 /* --- PCA 9564 based algorithms */
6327 #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */
6328 +#define I2C_HW_A_PLAT 0x1a0001 /* generic platform_bus interface */
6329
6330 /* --- ACPI Embedded controller algorithms */
6331 #define I2C_HW_ACPI_EC 0x1f0000
6332 diff -urN -x CVS linux-2.6.22-rc1/sound/soc/at91/eti_b1_wm8731.c linux-2.6-stable/sound/soc/at91/eti_b1_wm8731.c
6333 --- linux-2.6.22-rc1/sound/soc/at91/eti_b1_wm8731.c Thu May 17 12:13:36 2007
6334 +++ linux-2.6-stable/sound/soc/at91/eti_b1_wm8731.c Mon May 14 10:19:04 2007
6335 @@ -34,8 +34,7 @@
6336 #include <sound/soc.h>
6337 #include <sound/soc-dapm.h>
6338
6339 -#include <asm/arch/hardware.h>
6340 -#include <asm/arch/at91_pio.h>
6341 +#include <asm/hardware.h>
6342 #include <asm/arch/gpio.h>
6343
6344 #include "../codecs/wm8731.h"
6345 @@ -48,13 +47,6 @@
6346 #define DBG(x...)
6347 #endif
6348
6349 -#define AT91_PIO_TF1 (1 << (AT91_PIN_PB6 - PIN_BASE) % 32)
6350 -#define AT91_PIO_TK1 (1 << (AT91_PIN_PB7 - PIN_BASE) % 32)
6351 -#define AT91_PIO_TD1 (1 << (AT91_PIN_PB8 - PIN_BASE) % 32)
6352 -#define AT91_PIO_RD1 (1 << (AT91_PIN_PB9 - PIN_BASE) % 32)
6353 -#define AT91_PIO_RK1 (1 << (AT91_PIN_PB10 - PIN_BASE) % 32)
6354 -#define AT91_PIO_RF1 (1 << (AT91_PIN_PB11 - PIN_BASE) % 32)
6355 -
6356 static struct clk *pck1_clk;
6357 static struct clk *pllb_clk;
6358
6359 @@ -277,7 +269,6 @@
6360 static int __init eti_b1_init(void)
6361 {
6362 int ret;
6363 - u32 ssc_pio_lines;
6364 struct at91_ssc_periph *ssc = eti_b1_dai.cpu_dai->private_data;
6365
6366 if (!request_mem_region(AT91RM9200_BASE_SSC1, SZ_16K, "soc-audio")) {
6367 @@ -311,19 +302,12 @@
6368 goto fail_io_unmap;
6369 }
6370
6371 - ssc_pio_lines = AT91_PIO_TF1 | AT91_PIO_TK1 | AT91_PIO_TD1
6372 - | AT91_PIO_RD1 /* | AT91_PIO_RK1 */ | AT91_PIO_RF1;
6373 -
6374 - /* Reset all PIO registers and assign lines to peripheral A */
6375 - at91_sys_write(AT91_PIOB + PIO_PDR, ssc_pio_lines);
6376 - at91_sys_write(AT91_PIOB + PIO_ODR, ssc_pio_lines);
6377 - at91_sys_write(AT91_PIOB + PIO_IFDR, ssc_pio_lines);
6378 - at91_sys_write(AT91_PIOB + PIO_CODR, ssc_pio_lines);
6379 - at91_sys_write(AT91_PIOB + PIO_IDR, ssc_pio_lines);
6380 - at91_sys_write(AT91_PIOB + PIO_MDDR, ssc_pio_lines);
6381 - at91_sys_write(AT91_PIOB + PIO_PUDR, ssc_pio_lines);
6382 - at91_sys_write(AT91_PIOB + PIO_ASR, ssc_pio_lines);
6383 - at91_sys_write(AT91_PIOB + PIO_OWDR, ssc_pio_lines);
6384 + at91_set_A_periph(AT91_PIN_PB6, 0); /* TF1 */
6385 + at91_set_A_periph(AT91_PIN_PB7, 0); /* TK1 */
6386 + at91_set_A_periph(AT91_PIN_PB8, 0); /* TD1 */
6387 + at91_set_A_periph(AT91_PIN_PB9, 0); /* RD1 */
6388 +/* at91_set_A_periph(AT91_PIN_PB10, 0);*/ /* RK1 */
6389 + at91_set_A_periph(AT91_PIN_PB11, 0); /* RF1 */
6390
6391 /*
6392 * Set PCK1 parent to PLLB and its rate to 12 Mhz.
6393 diff -urN linux-2.6.22-rc5/drivers/char/at91_spi.c linux-2.6.22-rc5.new/drivers/char/at91_spi.c
6394 --- linux-2.6.22-rc5/drivers/char/at91_spi.c 1970-01-01 01:00:00.000000000 +0100
6395 +++ linux-2.6.22-rc5.new/drivers/char/at91_spi.c 2007-07-29 05:55:39.000000000 +0200
6396 @@ -0,0 +1,336 @@
6397 +/*
6398 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200 (Thunder)
6399 + *
6400 + * Copyright (C) SAN People (Pty) Ltd
6401 + *
6402 + * This program is free software; you can redistribute it and/or
6403 + * modify it under the terms of the GNU General Public License
6404 + * as published by the Free Software Foundation; either version
6405 + * 2 of the License, or (at your option) any later version.
6406 + */
6407 +
6408 +#include <linux/init.h>
6409 +#include <linux/dma-mapping.h>
6410 +#include <linux/module.h>
6411 +#include <linux/sched.h>
6412 +#include <linux/completion.h>
6413 +#include <linux/interrupt.h>
6414 +#include <linux/clk.h>
6415 +#include <linux/platform_device.h>
6416 +#include <linux/atmel_pdc.h>
6417 +#include <asm/io.h>
6418 +#include <asm/semaphore.h>
6419 +
6420 +#include <asm/arch/at91_spi.h>
6421 +#include <asm/arch/board.h>
6422 +#include <asm/arch/spi.h>
6423 +
6424 +#undef DEBUG_SPI
6425 +
6426 +static struct spi_local spi_dev[NR_SPI_DEVICES]; /* state of the SPI devices */
6427 +static int spi_enabled = 0;
6428 +static struct semaphore spi_lock; /* protect access to SPI bus */
6429 +static int current_device = -1; /* currently selected SPI device */
6430 +static struct clk *spi_clk; /* SPI clock */
6431 +static void __iomem *spi_base; /* SPI peripheral base-address */
6432 +
6433 +DECLARE_COMPLETION(transfer_complete);
6434 +
6435 +
6436 +#define at91_spi_read(reg) __raw_readl(spi_base + (reg))
6437 +#define at91_spi_write(reg, val) __raw_writel((val), spi_base + (reg))
6438 +
6439 +
6440 +/* ......................................................................... */
6441 +
6442 +/*
6443 + * Access and enable the SPI bus.
6444 + * This MUST be called before any transfers are performed.
6445 + */
6446 +void spi_access_bus(short device)
6447 +{
6448 + /* Ensure that requested device is valid */
6449 + if ((device < 0) || (device >= NR_SPI_DEVICES))
6450 + panic("at91_spi: spi_access_bus called with invalid device");
6451 +
6452 + if (spi_enabled == 0) {
6453 + clk_enable(spi_clk); /* Enable Peripheral clock */
6454 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIEN); /* Enable SPI */
6455 +#ifdef DEBUG_SPI
6456 + printk("SPI on\n");
6457 +#endif
6458 + }
6459 + spi_enabled++;
6460 +
6461 + /* Lock the SPI bus */
6462 + down(&spi_lock);
6463 + current_device = device;
6464 +
6465 + /* Configure SPI bus for device */
6466 + at91_spi_write(AT91_SPI_MR, AT91_SPI_MSTR | AT91_SPI_MODFDIS | (spi_dev[device].pcs << 16));
6467 +}
6468 +
6469 +/*
6470 + * Relinquish control of the SPI bus.
6471 + */
6472 +void spi_release_bus(short device)
6473 +{
6474 + if (device != current_device)
6475 + panic("at91_spi: spi_release called with invalid device");
6476 +
6477 + /* Release the SPI bus */
6478 + current_device = -1;
6479 + up(&spi_lock);
6480 +
6481 + spi_enabled--;
6482 + if (spi_enabled == 0) {
6483 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIDIS); /* Disable SPI */
6484 + clk_disable(spi_clk); /* Disable Peripheral clock */
6485 +#ifdef DEBUG_SPI
6486 + printk("SPI off\n");
6487 +#endif
6488 + }
6489 +}
6490 +
6491 +/*
6492 + * Perform a data transfer over the SPI bus
6493 + */
6494 +int spi_transfer(struct spi_transfer_list* list)
6495 +{
6496 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
6497 + int tx_size;
6498 +
6499 + if (!list)
6500 + panic("at91_spi: spi_transfer called with NULL transfer list");
6501 + if (current_device == -1)
6502 + panic("at91_spi: spi_transfer called without acquiring bus");
6503 +
6504 +#ifdef DEBUG_SPI
6505 + printk("SPI transfer start [%i]\n", list->nr_transfers);
6506 +#endif
6507 +
6508 + /* If we are in 16-bit mode, we need to modify what we pass to the PDC */
6509 + tx_size = (at91_spi_read(AT91_SPI_CSR(current_device)) & AT91_SPI_BITS_16) ? 2 : 1;
6510 +
6511 + /* Store transfer list */
6512 + device->xfers = list;
6513 + list->curr = 0;
6514 +
6515 + /* Assume there must be at least one transfer */
6516 + device->tx = dma_map_single(NULL, list->tx[0], list->txlen[0], DMA_TO_DEVICE);
6517 + device->rx = dma_map_single(NULL, list->rx[0], list->rxlen[0], DMA_FROM_DEVICE);
6518 +
6519 + /* Program PDC registers */
6520 + at91_spi_write(ATMEL_PDC_TPR, device->tx);
6521 + at91_spi_write(ATMEL_PDC_RPR, device->rx);
6522 + at91_spi_write(ATMEL_PDC_TCR, list->txlen[0] / tx_size);
6523 + at91_spi_write(ATMEL_PDC_RCR, list->rxlen[0] / tx_size);
6524 +
6525 + /* Is there a second transfer? */
6526 + if (list->nr_transfers > 1) {
6527 + device->txnext = dma_map_single(NULL, list->tx[1], list->txlen[1], DMA_TO_DEVICE);
6528 + device->rxnext = dma_map_single(NULL, list->rx[1], list->rxlen[1], DMA_FROM_DEVICE);
6529 +
6530 + /* Program Next PDC registers */
6531 + at91_spi_write(ATMEL_PDC_TNPR, device->txnext);
6532 + at91_spi_write(ATMEL_PDC_RNPR, device->rxnext);
6533 + at91_spi_write(ATMEL_PDC_TNCR, list->txlen[1] / tx_size);
6534 + at91_spi_write(ATMEL_PDC_RNCR, list->rxlen[1] / tx_size);
6535 + }
6536 + else {
6537 + device->txnext = 0;
6538 + device->rxnext = 0;
6539 + at91_spi_write(ATMEL_PDC_TNCR, 0);
6540 + at91_spi_write(ATMEL_PDC_RNCR, 0);
6541 + }
6542 +
6543 + // TODO: If we are doing consecutive transfers (at high speed, or
6544 + // small buffers), then it might be worth modifying the 'Delay between
6545 + // Consecutive Transfers' in the CSR registers.
6546 + // This is an issue if we cannot chain the next buffer fast enough
6547 + // in the interrupt handler.
6548 +
6549 + /* Enable transmitter and receiver */
6550 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTEN | ATMEL_PDC_TXTEN);
6551 +
6552 + at91_spi_write(AT91_SPI_IER, AT91_SPI_ENDRX); /* enable buffer complete interrupt */
6553 + wait_for_completion(&transfer_complete);
6554 +
6555 +#ifdef DEBUG_SPI
6556 + printk("SPI transfer end\n");
6557 +#endif
6558 +
6559 + return 0;
6560 +}
6561 +
6562 +/* ......................................................................... */
6563 +
6564 +/*
6565 + * Handle interrupts from the SPI controller.
6566 + */
6567 +static irqreturn_t at91spi_interrupt(int irq, void *dev_id)
6568 +{
6569 + unsigned int status;
6570 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
6571 + struct spi_transfer_list *list = device->xfers;
6572 +
6573 +#ifdef DEBUG_SPI
6574 + printk("SPI interrupt %i\n", current_device);
6575 +#endif
6576 +
6577 + if (!list)
6578 + panic("at91_spi: spi_interrupt with a NULL transfer list");
6579 +
6580 + status = at91_spi_read(AT91_SPI_SR) & at91_spi_read(AT91_SPI_IMR); /* read status */
6581 +
6582 + dma_unmap_single(NULL, device->tx, list->txlen[list->curr], DMA_TO_DEVICE);
6583 + dma_unmap_single(NULL, device->rx, list->rxlen[list->curr], DMA_FROM_DEVICE);
6584 +
6585 + device->tx = device->txnext; /* move next transfer to current transfer */
6586 + device->rx = device->rxnext;
6587 +
6588 + list->curr = list->curr + 1;
6589 + if (list->curr == list->nr_transfers) { /* all transfers complete */
6590 + at91_spi_write(AT91_SPI_IDR, AT91_SPI_ENDRX); /* disable interrupt */
6591 +
6592 + /* Disable transmitter and receiver */
6593 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
6594 +
6595 + device->xfers = NULL;
6596 + complete(&transfer_complete);
6597 + }
6598 + else if (list->curr+1 == list->nr_transfers) { /* no more next transfers */
6599 + device->txnext = 0;
6600 + device->rxnext = 0;
6601 + at91_spi_write(ATMEL_PDC_TNCR, 0);
6602 + at91_spi_write(ATMEL_PDC_RNCR, 0);
6603 + }
6604 + else {
6605 + int i = (list->curr)+1;
6606 +
6607 + /* If we are in 16-bit mode, we need to modify what we pass to the PDC */
6608 + int tx_size = (at91_spi_read(AT91_SPI_CSR(current_device)) & AT91_SPI_BITS_16) ? 2 : 1;
6609 +
6610 + device->txnext = dma_map_single(NULL, list->tx[i], list->txlen[i], DMA_TO_DEVICE);
6611 + device->rxnext = dma_map_single(NULL, list->rx[i], list->rxlen[i], DMA_FROM_DEVICE);
6612 + at91_spi_write(ATMEL_PDC_TNPR, device->txnext);
6613 + at91_spi_write(ATMEL_PDC_RNPR, device->rxnext);
6614 + at91_spi_write(ATMEL_PDC_TNCR, list->txlen[i] / tx_size);
6615 + at91_spi_write(ATMEL_PDC_RNCR, list->rxlen[i] / tx_size);
6616 + }
6617 + return IRQ_HANDLED;
6618 +}
6619 +
6620 +/* ......................................................................... */
6621 +
6622 +/*
6623 + * Initialize the SPI controller
6624 + */
6625 +static int __init at91spi_probe(struct platform_device *pdev)
6626 +{
6627 + int i;
6628 + unsigned long scbr;
6629 + struct resource *res;
6630 +
6631 + init_MUTEX(&spi_lock);
6632 +
6633 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6634 + if (!res)
6635 + return -ENXIO;
6636 +
6637 + if (!request_mem_region(res->start, res->end - res->start + 1, "at91_spi"))
6638 + return -EBUSY;
6639 +
6640 + spi_base = ioremap(res->start, res->end - res->start + 1);
6641 + if (!spi_base) {
6642 + release_mem_region(res->start, res->end - res->start + 1);
6643 + return -ENOMEM;
6644 + }
6645 +
6646 + spi_clk = clk_get(NULL, "spi_clk");
6647 + if (IS_ERR(spi_clk)) {
6648 + printk(KERN_ERR "at91_spi: no clock defined\n");
6649 + iounmap(spi_base);
6650 + release_mem_region(res->start, res->end - res->start + 1);
6651 + return -ENODEV;
6652 + }
6653 +
6654 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SWRST); /* software reset of SPI controller */
6655 +
6656 + /*
6657 + * Calculate the correct SPI baud-rate divisor.
6658 + */
6659 + scbr = clk_get_rate(spi_clk) / (2 * DEFAULT_SPI_CLK);
6660 + scbr = scbr + 1; /* round up */
6661 +
6662 + printk(KERN_INFO "at91_spi: Baud rate set to %ld\n", clk_get_rate(spi_clk) / (2 * scbr));
6663 +
6664 + /* Set Chip Select registers to good defaults */
6665 + for (i = 0; i < 4; i++) {
6666 + at91_spi_write(AT91_SPI_CSR(i), AT91_SPI_CPOL | AT91_SPI_BITS_8 | (16 << 16) | (scbr << 8));
6667 + }
6668 +
6669 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
6670 +
6671 + memset(&spi_dev, 0, sizeof(spi_dev));
6672 + spi_dev[0].pcs = 0xE;
6673 + spi_dev[1].pcs = 0xD;
6674 + spi_dev[2].pcs = 0xB;
6675 + spi_dev[3].pcs = 0x7;
6676 +
6677 + if (request_irq(AT91RM9200_ID_SPI, at91spi_interrupt, 0, "spi", NULL)) {
6678 + clk_put(spi_clk);
6679 + iounmap(spi_base);
6680 + release_mem_region(res->start, res->end - res->start + 1);
6681 + return -EBUSY;
6682 + }
6683 +
6684 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIEN); /* Enable SPI */
6685 +
6686 + return 0;
6687 +}
6688 +
6689 +static int __devexit at91spi_remove(struct platform_device *pdev)
6690 +{
6691 + struct resource *res;
6692 +
6693 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIDIS); /* Disable SPI */
6694 + clk_put(spi_clk);
6695 +
6696 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6697 + iounmap(spi_base);
6698 + release_mem_region(res->start, res->end - res->start + 1);
6699 +
6700 + free_irq(AT91RM9200_ID_SPI, 0);
6701 + return 0;
6702 +}
6703 +
6704 +static struct platform_driver at91spi_driver = {
6705 + .probe = at91spi_probe,
6706 + .remove = __devexit_p(at91spi_remove),
6707 + .driver = {
6708 + .name = "at91_spi",
6709 + .owner = THIS_MODULE,
6710 + },
6711 +};
6712 +
6713 +static int __init at91spi_init(void)
6714 +{
6715 + return platform_driver_register(&at91spi_driver);
6716 +}
6717 +
6718 +static void __exit at91spi_exit(void)
6719 +{
6720 + platform_driver_unregister(&at91spi_driver);
6721 +}
6722 +
6723 +EXPORT_SYMBOL(spi_access_bus);
6724 +EXPORT_SYMBOL(spi_release_bus);
6725 +EXPORT_SYMBOL(spi_transfer);
6726 +
6727 +module_init(at91spi_init);
6728 +module_exit(at91spi_exit);
6729 +
6730 +MODULE_LICENSE("GPL")
6731 +MODULE_AUTHOR("Andrew Victor")
6732 +MODULE_DESCRIPTION("SPI driver for Atmel AT91RM9200")
6733 diff -urN linux-2.6.22-rc5/drivers/char/at91_spidev.c linux-2.6.22-rc5.new/drivers/char/at91_spidev.c
6734 --- linux-2.6.22-rc5/drivers/char/at91_spidev.c 1970-01-01 01:00:00.000000000 +0100
6735 +++ linux-2.6.22-rc5.new/drivers/char/at91_spidev.c 2007-07-29 05:55:39.000000000 +0200
6736 @@ -0,0 +1,236 @@
6737 +/*
6738 + * User-space interface to the SPI bus on Atmel AT91RM9200
6739 + *
6740 + * Copyright (C) 2003 SAN People (Pty) Ltd
6741 + *
6742 + * Based on SPI driver by Rick Bronson
6743 + *
6744 + * This program is free software; you can redistribute it and/or
6745 + * modify it under the terms of the GNU General Public License
6746 + * as published by the Free Software Foundation; either version
6747 + * 2 of the License, or (at your option) any later version.
6748 + */
6749 +
6750 +#include <linux/module.h>
6751 +#include <linux/init.h>
6752 +#include <linux/slab.h>
6753 +#include <linux/highmem.h>
6754 +#include <linux/pagemap.h>
6755 +#include <asm/arch/spi.h>
6756 +
6757 +#ifdef CONFIG_DEVFS_FS
6758 +#include <linux/devfs_fs_kernel.h>
6759 +#endif
6760 +
6761 +
6762 +#undef DEBUG_SPIDEV
6763 +
6764 +/* ......................................................................... */
6765 +
6766 +/*
6767 + * Read or Write to SPI bus.
6768 + */
6769 +static ssize_t spidev_rd_wr(struct file *file, char *buf, size_t count, loff_t *offset)
6770 +{
6771 + unsigned int spi_device = (unsigned int) file->private_data;
6772 +
6773 + struct mm_struct * mm;
6774 + struct page ** maplist;
6775 + struct spi_transfer_list* list;
6776 + int pgcount;
6777 +
6778 + unsigned int ofs, pagelen;
6779 + int res, i, err;
6780 +
6781 + if (!count) {
6782 + return 0;
6783 + }
6784 +
6785 + list = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
6786 + if (!list) {
6787 + return -ENOMEM;
6788 + }
6789 +
6790 + mm = current->mm;
6791 +
6792 + pgcount = ((unsigned long)buf+count+PAGE_SIZE-1)/PAGE_SIZE - (unsigned long)buf/PAGE_SIZE;
6793 +
6794 + if (pgcount >= MAX_SPI_TRANSFERS) {
6795 + kfree(list);
6796 + return -EFBIG;
6797 + }
6798 +
6799 + maplist = kmalloc (pgcount * sizeof (struct page *), GFP_KERNEL);
6800 +
6801 + if (!maplist) {
6802 + kfree(list);
6803 + return -ENOMEM;
6804 + }
6805 + flush_cache_all();
6806 + down_read(&mm->mmap_sem);
6807 + err= get_user_pages(current, mm, (unsigned long)buf, pgcount, 1, 0, maplist, NULL);
6808 + up_read(&mm->mmap_sem);
6809 +
6810 + if (err < 0) {
6811 + kfree(list);
6812 + kfree(maplist);
6813 + return err;
6814 + }
6815 + pgcount = err;
6816 +
6817 +#ifdef DEBUG_SPIDEV
6818 + printk("spidev_rd_rw: %i %i\n", count, pgcount);
6819 +#endif
6820 +
6821 + /* Set default return value = transfer length */
6822 + res = count;
6823 +
6824 + /*
6825 + * At this point, the virtual area buf[0] .. buf[count-1] will have
6826 + * corresponding pages mapped in the physical memory and locked until
6827 + * we unmap the kiobuf. The pages cannot be swapped out or moved
6828 + * around.
6829 + */
6830 + ofs = (unsigned long) buf & (PAGE_SIZE -1);
6831 + pagelen = PAGE_SIZE - ofs;
6832 + if (count < pagelen)
6833 + pagelen = count;
6834 +
6835 + for (i = 0; i < pgcount; i++) {
6836 + flush_dcache_page(maplist[i]);
6837 +
6838 + list->tx[i] = list->rx[i] = page_address(maplist[i]) + ofs;
6839 + list->txlen[i] = list->rxlen[i] = pagelen;
6840 +
6841 +#ifdef DEBUG_SPIDEV
6842 + printk(" %i: %x (%i)\n", i, list->tx[i], list->txlen[i]);
6843 +#endif
6844 +
6845 + ofs = 0; /* all subsequent transfers start at beginning of a page */
6846 + count = count - pagelen;
6847 + pagelen = (count < PAGE_SIZE) ? count : PAGE_SIZE;
6848 + }
6849 + list->nr_transfers = pgcount;
6850 +
6851 + /* Perform transfer on SPI bus */
6852 + spi_access_bus(spi_device);
6853 + spi_transfer(list);
6854 + spi_release_bus(spi_device);
6855 +
6856 + while (pgcount--) {
6857 + page_cache_release (maplist[pgcount]);
6858 + }
6859 + flush_cache_all();
6860 +
6861 + kfree(maplist);
6862 + kfree(list);
6863 +
6864 + return res;
6865 +}
6866 +
6867 +static int spidev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
6868 +{
6869 + int spi_device = MINOR(inode->i_rdev);
6870 +
6871 + if (spi_device >= NR_SPI_DEVICES)
6872 + return -ENODEV;
6873 +
6874 + // TODO: This interface can be used to configure the SPI bus.
6875 + // Configurable options could include: Speed, Clock Polarity, Clock Phase
6876 +
6877 + switch(cmd) {
6878 + default:
6879 + return -ENOIOCTLCMD;
6880 + }
6881 +}
6882 +
6883 +/*
6884 + * Open the SPI device
6885 + */
6886 +static int spidev_open(struct inode *inode, struct file *file)
6887 +{
6888 + unsigned int spi_device = MINOR(inode->i_rdev);
6889 +
6890 + if (spi_device >= NR_SPI_DEVICES)
6891 + return -ENODEV;
6892 +
6893 + /*
6894 + * 'private_data' is actually a pointer, but we overload it with the
6895 + * value we want to store.
6896 + */
6897 + file->private_data = (void *)spi_device;
6898 +
6899 + return 0;
6900 +}
6901 +
6902 +/*
6903 + * Close the SPI device
6904 + */
6905 +static int spidev_close(struct inode *inode, struct file *file)
6906 +{
6907 + return 0;
6908 +}
6909 +
6910 +/* ......................................................................... */
6911 +
6912 +static struct file_operations spidev_fops = {
6913 + .owner = THIS_MODULE,
6914 + .llseek = no_llseek,
6915 + .read = spidev_rd_wr,
6916 + .write = (int (*) (struct file *file, const char *buf, size_t count, loff_t *offset))spidev_rd_wr,
6917 + .ioctl = spidev_ioctl,
6918 + .open = spidev_open,
6919 + .release = spidev_close,
6920 +};
6921 +
6922 +/*
6923 + * Install the SPI /dev interface driver
6924 + */
6925 +static int __init at91_spidev_init(void)
6926 +{
6927 +#ifdef CONFIG_DEVFS_FS
6928 + int i;
6929 +#endif
6930 +
6931 + if (register_chrdev(SPI_MAJOR, "spi", &spidev_fops)) {
6932 + printk(KERN_ERR "at91_spidev: Unable to get major %d for SPI bus\n", SPI_MAJOR);
6933 + return -EIO;
6934 + }
6935 +
6936 +#ifdef CONFIG_DEVFS_FS
6937 + devfs_mk_dir("spi");
6938 + for (i = 0; i < NR_SPI_DEVICES; i++) {
6939 + devfs_mk_cdev(MKDEV(SPI_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "spi/%d",i);
6940 + }
6941 +#endif
6942 + printk(KERN_INFO "AT91 SPI driver loaded\n");
6943 +
6944 + return 0;
6945 +}
6946 +
6947 +/*
6948 + * Remove the SPI /dev interface driver
6949 + */
6950 +static void __exit at91_spidev_exit(void)
6951 +{
6952 +#ifdef CONFIG_DEVFS_FS
6953 + int i;
6954 + for (i = 0; i < NR_SPI_DEVICES; i++) {
6955 + devfs_remove("spi/%d", i);
6956 + }
6957 +
6958 + devfs_remove("spi");
6959 +#endif
6960 +
6961 + if (unregister_chrdev(SPI_MAJOR, "spi")) {
6962 + printk(KERN_ERR "at91_spidev: Unable to release major %d for SPI bus\n", SPI_MAJOR);
6963 + return;
6964 + }
6965 +}
6966 +
6967 +module_init(at91_spidev_init);
6968 +module_exit(at91_spidev_exit);
6969 +
6970 +MODULE_LICENSE("GPL")
6971 +MODULE_AUTHOR("Andrew Victor")
6972 +MODULE_DESCRIPTION("SPI /dev interface for Atmel AT91RM9200")
6973 diff -urN linux-2.6.22-rc5/drivers/char/Kconfig linux-2.6.22-rc5.new/drivers/char/Kconfig
6974 --- linux-2.6.22-rc5/drivers/char/Kconfig 2007-06-17 04:09:12.000000000 +0200
6975 +++ linux-2.6.22-rc5.new/drivers/char/Kconfig 2007-07-29 05:55:39.000000000 +0200
6976 @@ -1083,5 +1083,21 @@
6977
6978 source "drivers/s390/char/Kconfig"
6979
6980 +config AT91_SPI
6981 + bool "SPI driver (legacy) for AT91RM9200 processors"
6982 + depends on ARCH_AT91RM9200
6983 + default y
6984 + help
6985 + The SPI driver gives access to this serial bus on the AT91RM9200
6986 + processor.
6987 +
6988 +config AT91_SPIDEV
6989 + bool "SPI device interface (legacy) for AT91RM9200 processors"
6990 + depends on ARCH_AT91RM9200 && AT91_SPI
6991 + default n
6992 + help
6993 + The SPI driver gives user mode access to this serial
6994 + bus on the AT91RM9200 processor.
6995 +
6996 endmenu
6997
6998 diff -urN linux-2.6.22-rc5/drivers/char/Makefile linux-2.6.22-rc5.new/drivers/char/Makefile
6999 --- linux-2.6.22-rc5/drivers/char/Makefile 2007-06-17 04:09:12.000000000 +0200
7000 +++ linux-2.6.22-rc5.new/drivers/char/Makefile 2007-07-29 05:55:39.000000000 +0200
7001 @@ -93,6 +93,8 @@
7002 obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
7003 obj-$(CONFIG_GPIO_TB0219) += tb0219.o
7004 obj-$(CONFIG_TELCLOCK) += tlclk.o
7005 +obj-$(CONFIG_AT91_SPI) += at91_spi.o
7006 +obj-$(CONFIG_AT91_SPIDEV) += at91_spidev.o
7007
7008 obj-$(CONFIG_WATCHDOG) += watchdog/
7009 obj-$(CONFIG_MWAVE) += mwave/
7010 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/i2c-at91.c linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-at91.c
7011 --- linux-2.6.22-rc5/drivers/i2c/busses/i2c-at91.c 2007-06-17 04:09:12.000000000 +0200
7012 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-at91.c 2007-07-29 05:55:39.000000000 +0200
7013 @@ -31,8 +31,11 @@
7014 #include <asm/arch/board.h>
7015 #include <asm/arch/cpu.h>
7016
7017 -#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */
7018
7019 +/* Clockrate is configurable - max 400 Kbits/sec */
7020 +static unsigned int clockrate = CONFIG_I2C_AT91_CLOCKRATE;
7021 +module_param(clockrate, uint, 0);
7022 +MODULE_PARM_DESC(clockrate, "The TWI clockrate");
7023
7024 static struct clk *twi_clk;
7025 static void __iomem *twi_base;
7026 @@ -53,7 +56,7 @@
7027 at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN); /* Set Master mode */
7028
7029 /* Calcuate clock dividers */
7030 - cdiv = (clk_get_rate(twi_clk) / (2 * TWI_CLOCK)) - 3;
7031 + cdiv = (clk_get_rate(twi_clk) / (2 * clockrate)) - 3;
7032 cdiv = cdiv + 1; /* round up */
7033 ckdiv = 0;
7034 while (cdiv > 255) {
7035 @@ -61,11 +64,12 @@
7036 cdiv = cdiv >> 1;
7037 }
7038
7039 - if (cpu_is_at91rm9200()) { /* AT91RM9200 Errata #22 */
7040 - if (ckdiv > 5) {
7041 - printk(KERN_ERR "AT91 I2C: Invalid TWI_CLOCK value!\n");
7042 - ckdiv = 5;
7043 - }
7044 + if (cpu_is_at91rm9200() && (ckdiv > 5)) { /* AT91RM9200 Errata #22 */
7045 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
7046 + ckdiv = 5;
7047 + } else if (ckdiv > 7) {
7048 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
7049 + ckdiv = 7;
7050 }
7051
7052 at91_twi_write(AT91_TWI_CWGR, (ckdiv << 16) | (cdiv << 8) | cdiv);
7053 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/i2c-pca.c linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-pca.c
7054 --- linux-2.6.22-rc5/drivers/i2c/busses/i2c-pca.c 1970-01-01 01:00:00.000000000 +0100
7055 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-pca.c 2007-07-29 05:55:39.000000000 +0200
7056 @@ -0,0 +1,213 @@
7057 +/*
7058 + * Platform driver for PCA9564 I2C bus controller.
7059 + *
7060 + * (C) 2006 Andrew Victor
7061 + *
7062 + * Based on i2c-pca-isa.c driver for PCA9564 on ISA boards
7063 + * Copyright (C) 2004 Arcom Control Systems
7064 + *
7065 + * This program is free software; you can redistribute it and/or modify
7066 + * it under the terms of the GNU General Public License as published by
7067 + * the Free Software Foundation; either version 2 of the License, or
7068 + * (at your option) any later version.
7069 + *
7070 + * This program is distributed in the hope that it will be useful,
7071 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7072 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7073 + * GNU General Public License for more details.
7074 + *
7075 + * You should have received a copy of the GNU General Public License
7076 + * along with this program; if not, write to the Free Software
7077 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7078 + */
7079 +
7080 +#include <linux/kernel.h>
7081 +#include <linux/module.h>
7082 +#include <linux/moduleparam.h>
7083 +#include <linux/delay.h>
7084 +#include <linux/init.h>
7085 +#include <linux/interrupt.h>
7086 +#include <linux/wait.h>
7087 +#include <linux/platform_device.h>
7088 +
7089 +#include <linux/i2c.h>
7090 +#include <linux/i2c-algo-pca.h>
7091 +
7092 +#include <asm/io.h>
7093 +
7094 +#include "../algos/i2c-algo-pca.h"
7095 +
7096 +#define PCA_OWN_ADDRESS 0x55 /* our address for slave mode */
7097 +#define PCA_CLOCK I2C_PCA_CON_59kHz
7098 +
7099 +//#define REG_SHIFT 2
7100 +#define REG_SHIFT 0
7101 +
7102 +//#define DEBUG_IO
7103 +
7104 +#define PCA_IO_SIZE 4
7105 +
7106 +static void __iomem *base_addr;
7107 +static int irq;
7108 +static wait_queue_head_t pca_wait;
7109 +
7110 +static int pca_getown(struct i2c_algo_pca_data *adap)
7111 +{
7112 + return PCA_OWN_ADDRESS;
7113 +}
7114 +
7115 +static int pca_getclock(struct i2c_algo_pca_data *adap)
7116 +{
7117 + return PCA_CLOCK;
7118 +}
7119 +
7120 +static void pca_writebyte(struct i2c_algo_pca_data *adap, int reg, int val)
7121 +{
7122 +#ifdef DEBUG_IO
7123 + static char *names[] = { "T/O", "DAT", "ADR", "CON" };
7124 + printk("*** write %s at %#lx <= %#04x\n", names[reg], (unsigned long) base_addr+reg, val);
7125 +#endif
7126 + udelay(1);
7127 + outb(val, base_addr + (reg << REG_SHIFT));
7128 +}
7129 +
7130 +static int pca_readbyte(struct i2c_algo_pca_data *adap, int reg)
7131 +{
7132 + int res;
7133 +
7134 + udelay(1);
7135 + res = inb(base_addr + (reg << REG_SHIFT));
7136 +#ifdef DEBUG_IO
7137 + {
7138 + static char *names[] = { "STA", "DAT", "ADR", "CON" };
7139 + printk("*** read %s => %#04x\n", names[reg], res);
7140 + }
7141 +#endif
7142 + return res;
7143 +}
7144 +
7145 +static int pca_waitforinterrupt(struct i2c_algo_pca_data *adap)
7146 +{
7147 + int ret = 0;
7148 +
7149 + if (irq > -1) {
7150 + ret = wait_event_interruptible(pca_wait,
7151 + pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI);
7152 + } else {
7153 + while ((pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
7154 + udelay(100);
7155 + }
7156 + return ret;
7157 +}
7158 +
7159 +static irqreturn_t pca_handler(int this_irq, void *dev_id)
7160 +{
7161 + wake_up_interruptible(&pca_wait);
7162 + return IRQ_HANDLED;
7163 +}
7164 +
7165 +static struct i2c_algo_pca_data pca_i2c_data = {
7166 + .get_own = pca_getown,
7167 + .get_clock = pca_getclock,
7168 + .write_byte = pca_writebyte,
7169 + .read_byte = pca_readbyte,
7170 + .wait_for_interrupt = pca_waitforinterrupt,
7171 +};
7172 +
7173 +static struct i2c_adapter pca_i2c_ops = {
7174 + .owner = THIS_MODULE,
7175 + .id = I2C_HW_A_PLAT,
7176 + .algo_data = &pca_i2c_data,
7177 + .name = "PCA9564",
7178 + .class = I2C_CLASS_HWMON,
7179 +};
7180 +
7181 +static int __devinit pca_i2c_probe(struct platform_device *pdev)
7182 +{
7183 + struct resource *res;
7184 +
7185 + init_waitqueue_head(&pca_wait);
7186 +
7187 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7188 + if (!res)
7189 + return -ENODEV;
7190 +
7191 + if (!request_mem_region(res->start, PCA_IO_SIZE, "PCA9564"))
7192 + return -ENXIO;
7193 +
7194 + base_addr = ioremap(res->start, PCA_IO_SIZE);
7195 + if (base_addr == NULL)
7196 + goto out_region;
7197 +
7198 + irq = platform_get_irq(pdev, 0);
7199 + if (irq > -1) {
7200 + if (request_irq(irq, pca_handler, 0, "pca9564", NULL) < 0) {
7201 + printk(KERN_ERR "i2c-pca: Request irq%d failed\n", irq);
7202 + goto out_remap;
7203 + }
7204 + }
7205 +
7206 + /* set up the driverfs linkage to our parent device */
7207 + pca_i2c_ops.dev.parent = &pdev->dev;
7208 +
7209 + if (i2c_pca_add_bus(&pca_i2c_ops) < 0) {
7210 + printk(KERN_ERR "i2c-pca: Failed to add i2c bus\n");
7211 + goto out_irq;
7212 + }
7213 +
7214 + return 0;
7215 +
7216 + out_irq:
7217 + if (irq > -1)
7218 + free_irq(irq, &pca_i2c_ops);
7219 +
7220 + out_remap:
7221 + iounmap(base_addr);
7222 +
7223 + out_region:
7224 + release_mem_region(res->start, PCA_IO_SIZE);
7225 + return -ENODEV;
7226 +}
7227 +
7228 +static int __devexit pca_i2c_remove(struct platform_device *pdev)
7229 +{
7230 + struct resource *res;
7231 +
7232 + i2c_del_adapter(&pca_i2c_ops);
7233 +
7234 + if (irq > 0)
7235 + free_irq(irq, NULL);
7236 +
7237 + iounmap(base_addr);
7238 +
7239 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7240 + release_mem_region(res->start, PCA_IO_SIZE);
7241 +
7242 + return 0;
7243 +}
7244 +
7245 +static struct platform_driver pca_i2c_driver = {
7246 + .probe = pca_i2c_probe,
7247 + .remove = __devexit_p(pca_i2c_remove),
7248 + .driver = {
7249 + .name = "pca9564",
7250 + .owner = THIS_MODULE,
7251 + },
7252 +};
7253 +
7254 +static int __init pca_i2c_init(void)
7255 +{
7256 + return platform_driver_register(&pca_i2c_driver);
7257 +}
7258 +
7259 +static void __exit pca_i2c_exit(void)
7260 +{
7261 + platform_driver_unregister(&pca_i2c_driver);
7262 +}
7263 +
7264 +module_init(pca_i2c_init);
7265 +module_exit(pca_i2c_exit);
7266 +
7267 +MODULE_AUTHOR("Andrew Victor");
7268 +MODULE_DESCRIPTION("PCA9564 platform driver");
7269 +MODULE_LICENSE("GPL");
7270 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/Kconfig linux-2.6.22-rc5.new/drivers/i2c/busses/Kconfig
7271 --- linux-2.6.22-rc5/drivers/i2c/busses/Kconfig 2007-06-17 04:09:12.000000000 +0200
7272 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/Kconfig 2007-07-29 05:55:39.000000000 +0200
7273 @@ -80,6 +80,14 @@
7274 This supports the use of the I2C interface on Atmel AT91
7275 processors.
7276
7277 +config I2C_AT91_CLOCKRATE
7278 + prompt "Atmel AT91 I2C/TWI clock-rate"
7279 + depends on I2C_AT91
7280 + int
7281 + default 100000
7282 + help
7283 + Set the AT91 I2C/TWI clock-rate.
7284 +
7285 config I2C_AU1550
7286 tristate "Au1550/Au1200 SMBus interface"
7287 depends on SOC_AU1550 || SOC_AU1200
7288 @@ -598,6 +606,14 @@
7289 This driver can also be built as a module. If so, the module
7290 will be called i2c-voodoo3.
7291
7292 +config I2C_PCA
7293 + tristate "PCA9564"
7294 + depends on I2C
7295 + select I2C_ALGOPCA
7296 + help
7297 + This driver support the Philips PCA 9564 Parallel bus to I2C
7298 + bus controller.
7299 +
7300 config I2C_PCA_ISA
7301 tristate "PCA9564 on an ISA bus"
7302 depends on ISA
7303 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/Makefile linux-2.6.22-rc5.new/drivers/i2c/busses/Makefile
7304 --- linux-2.6.22-rc5/drivers/i2c/busses/Makefile 2007-06-17 04:09:12.000000000 +0200
7305 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/Makefile 2007-07-29 05:55:39.000000000 +0200
7306 @@ -30,6 +30,7 @@
7307 obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o
7308 obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o
7309 obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o
7310 +obj-$(CONFIG_I2C_PCA) += i2c-pca.o
7311 obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o
7312 obj-$(CONFIG_I2C_PIIX4) += i2c-piix4.o
7313 obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
7314 diff -urN linux-2.6.22-rc5/drivers/leds/Kconfig linux-2.6.22-rc5.new/drivers/leds/Kconfig
7315 --- linux-2.6.22-rc5/drivers/leds/Kconfig 2007-06-17 04:09:12.000000000 +0200
7316 +++ linux-2.6.22-rc5.new/drivers/leds/Kconfig 2007-07-29 05:55:39.000000000 +0200
7317 @@ -77,6 +77,13 @@
7318 This option enables support for the Soekris net4801 and net4826 error
7319 LED.
7320
7321 +config LEDS_AT91
7322 + tristate "LED support using AT91 GPIOs"
7323 + depends on LEDS_CLASS && ARCH_AT91 && !LEDS
7324 + help
7325 + This option enables support for LEDs connected to GPIO lines
7326 + on AT91-based boards.
7327 +
7328 config LEDS_WRAP
7329 tristate "LED Support for the WRAP series LEDs"
7330 depends on LEDS_CLASS && SCx200_GPIO
7331 diff -urN linux-2.6.22-rc5/drivers/leds/leds-at91.c linux-2.6.22-rc5.new/drivers/leds/leds-at91.c
7332 --- linux-2.6.22-rc5/drivers/leds/leds-at91.c 1970-01-01 01:00:00.000000000 +0100
7333 +++ linux-2.6.22-rc5.new/drivers/leds/leds-at91.c 2007-07-29 05:55:39.000000000 +0200
7334 @@ -0,0 +1,140 @@
7335 +/*
7336 + * AT91 GPIO based LED driver
7337 + *
7338 + * Copyright (C) 2006 David Brownell
7339 + *
7340 + * This program is free software; you can redistribute it and/or modify
7341 + * it under the terms of the GNU General Public License version 2 as
7342 + * published by the Free Software Foundation.
7343 + */
7344 +
7345 +#include <linux/kernel.h>
7346 +#include <linux/init.h>
7347 +#include <linux/platform_device.h>
7348 +#include <linux/leds.h>
7349 +
7350 +#include <asm/arch/board.h>
7351 +#include <asm/arch/gpio.h>
7352 +
7353 +static LIST_HEAD(at91_led_list); /* list of AT91 LEDs */
7354 +
7355 +struct at91_led {
7356 + struct led_classdev cdev;
7357 + struct list_head list;
7358 + struct at91_gpio_led *led_data;
7359 +};
7360 +
7361 +/*
7362 + * Change the state of the LED.
7363 + */
7364 +static void at91_led_set(struct led_classdev *cdev, enum led_brightness value)
7365 +{
7366 + struct at91_led *led = container_of(cdev, struct at91_led, cdev);
7367 + short active = (value == LED_OFF);
7368 +
7369 + if (led->led_data->flags & 1) /* active high/low? */
7370 + active = !active;
7371 + at91_set_gpio_value(led->led_data->gpio, active);
7372 +}
7373 +
7374 +static int __devexit at91_led_remove(struct platform_device *pdev)
7375 +{
7376 + struct at91_led *led;
7377 +
7378 + list_for_each_entry (led, &at91_led_list, list)
7379 + led_classdev_unregister(&led->cdev);
7380 +
7381 +#warning "Free allocated memory"
7382 + // TODO: Free memory. kfree(led);
7383 +
7384 + return 0;
7385 +}
7386 +
7387 +static int __init at91_led_probe(struct platform_device *pdev)
7388 +{
7389 + int status = 0;
7390 + struct at91_gpio_led *pdata = pdev->dev.platform_data;
7391 + unsigned nr_leds;
7392 + struct at91_led *led;
7393 +
7394 + if (!pdata)
7395 + return -ENODEV;
7396 +
7397 + nr_leds = pdata->index; /* first index stores number of LEDs */
7398 +
7399 + while (nr_leds--) {
7400 + led = kzalloc(sizeof(struct at91_led), GFP_KERNEL);
7401 + if (!led) {
7402 + dev_err(&pdev->dev, "No memory for device\n");
7403 + status = -ENOMEM;
7404 + goto cleanup;
7405 + }
7406 + led->led_data = pdata;
7407 + led->cdev.name = pdata->name;
7408 + led->cdev.brightness_set = at91_led_set,
7409 + led->cdev.default_trigger = pdata->trigger;
7410 +
7411 + status = led_classdev_register(&pdev->dev, &led->cdev);
7412 + if (status < 0) {
7413 + dev_err(&pdev->dev, "led_classdev_register failed - %d\n", status);
7414 +cleanup:
7415 + at91_led_remove(pdev);
7416 + break;
7417 + }
7418 + list_add(&led->list, &at91_led_list);
7419 + pdata++;
7420 + }
7421 + return status;
7422 +}
7423 +
7424 +#ifdef CONFIG_PM
7425 +static int at91_led_suspend(struct platform_device *dev, pm_message_t state)
7426 +{
7427 + struct at91_led *led;
7428 +
7429 + list_for_each_entry (led, &at91_led_list, list)
7430 + led_classdev_suspend(&led->cdev);
7431 +
7432 + return 0;
7433 +}
7434 +
7435 +static int at91_led_resume(struct platform_device *dev)
7436 +{
7437 + struct at91_led *led;
7438 +
7439 + list_for_each_entry (led, &at91_led_list, list)
7440 + led_classdev_resume(&led->cdev);
7441 +
7442 + return 0;
7443 +}
7444 +#else
7445 +#define at91_led_suspend NULL
7446 +#define at91_led_resume NULL
7447 +#endif
7448 +
7449 +static struct platform_driver at91_led_driver = {
7450 + .probe = at91_led_probe,
7451 + .remove = __devexit_p(at91_led_remove),
7452 + .suspend = at91_led_suspend,
7453 + .resume = at91_led_resume,
7454 + .driver = {
7455 + .name = "at91_leds",
7456 + .owner = THIS_MODULE,
7457 + },
7458 +};
7459 +
7460 +static int __init at91_led_init(void)
7461 +{
7462 + return platform_driver_register(&at91_led_driver);
7463 +}
7464 +module_init(at91_led_init);
7465 +
7466 +static void __exit at91_led_exit(void)
7467 +{
7468 + platform_driver_unregister(&at91_led_driver);
7469 +}
7470 +module_exit(at91_led_exit);
7471 +
7472 +MODULE_DESCRIPTION("AT91 GPIO LED driver");
7473 +MODULE_AUTHOR("David Brownell");
7474 +MODULE_LICENSE("GPL");
7475 diff -urN linux-2.6.22-rc5/drivers/leds/Makefile linux-2.6.22-rc5.new/drivers/leds/Makefile
7476 --- linux-2.6.22-rc5/drivers/leds/Makefile 2007-06-17 04:09:12.000000000 +0200
7477 +++ linux-2.6.22-rc5.new/drivers/leds/Makefile 2007-07-29 05:55:39.000000000 +0200
7478 @@ -16,6 +16,7 @@
7479 obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
7480 obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
7481 obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
7482 +obj-$(CONFIG_LEDS_AT91) += leds-at91.o
7483
7484 # LED Triggers
7485 obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
7486 diff -urN linux-2.6.22-rc5/drivers/mmc/host/at91_mci.c linux-2.6.22-rc5.new/drivers/mmc/host/at91_mci.c
7487 --- linux-2.6.22-rc5/drivers/mmc/host/at91_mci.c 2007-06-17 04:09:12.000000000 +0200
7488 +++ linux-2.6.22-rc5.new/drivers/mmc/host/at91_mci.c 2007-07-29 05:57:56.000000000 +0200
7489 @@ -85,7 +85,7 @@
7490
7491 #define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \
7492 | AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \
7493 - | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)
7494 + | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)
7495
7496 #define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg))
7497 #define at91_mci_write(host, reg, val) __raw_writel((val), (host)->baseaddr + (reg))
7498 @@ -560,9 +560,7 @@
7499 pr_debug("Status = %08X [%08X %08X %08X %08X]\n",
7500 status, cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
7501
7502 - if (status & (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE |
7503 - AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE |
7504 - AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)) {
7505 + if (status & AT91_MCI_ERRORS) {
7506 if ((status & AT91_MCI_RCRCE) && !(mmc_resp_type(cmd) & MMC_RSP_CRC)) {
7507 cmd->error = MMC_ERR_NONE;
7508 }
7509 @@ -663,15 +661,15 @@
7510
7511 int_status = at91_mci_read(host, AT91_MCI_SR);
7512 int_mask = at91_mci_read(host, AT91_MCI_IMR);
7513 -
7514 +
7515 pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask,
7516 int_status & int_mask);
7517 -
7518 +
7519 int_status = int_status & int_mask;
7520
7521 if (int_status & AT91_MCI_ERRORS) {
7522 completed = 1;
7523 -
7524 +
7525 if (int_status & AT91_MCI_UNRE)
7526 pr_debug("MMC: Underrun error\n");
7527 if (int_status & AT91_MCI_OVRE)
7528 @@ -819,7 +817,7 @@
7529 mmc->f_min = 375000;
7530 mmc->f_max = 25000000;
7531 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
7532 - mmc->caps = MMC_CAP_BYTEBLOCK;
7533 + mmc->caps = MMC_CAP_BYTEBLOCK | MMC_CAP_MULTIWRITE;
7534
7535 mmc->max_blk_size = 4095;
7536 mmc->max_blk_count = mmc->max_req_size;
7537 @@ -893,6 +891,8 @@
7538
7539 mmc_add_host(mmc);
7540
7541 + device_init_wakeup(&pdev->dev, 1);
7542 +
7543 /*
7544 * monitor card insertion/removal if we can
7545 */
7546 @@ -922,6 +922,8 @@
7547
7548 host = mmc_priv(mmc);
7549
7550 + device_init_wakeup(&pdev->dev, 0);
7551 +
7552 if (host->present != -1) {
7553 free_irq(host->board->det_pin, host);
7554 cancel_delayed_work(&host->mmc->detect);
7555 @@ -949,8 +951,12 @@
7556 static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
7557 {
7558 struct mmc_host *mmc = platform_get_drvdata(pdev);
7559 + struct at91mci_host *host = mmc_priv(mmc);
7560 int ret = 0;
7561
7562 + if (device_may_wakeup(&pdev->dev))
7563 + enable_irq_wake(host->board->det_pin);
7564 +
7565 if (mmc)
7566 ret = mmc_suspend_host(mmc, state);
7567
7568 @@ -960,8 +966,12 @@
7569 static int at91_mci_resume(struct platform_device *pdev)
7570 {
7571 struct mmc_host *mmc = platform_get_drvdata(pdev);
7572 + struct at91mci_host *host = mmc_priv(mmc);
7573 int ret = 0;
7574
7575 + if (device_may_wakeup(&pdev->dev))
7576 + disable_irq_wake(host->board->det_pin);
7577 +
7578 if (mmc)
7579 ret = mmc_resume_host(mmc);
7580
7581 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/at91_dataflash.c linux-2.6.22-rc5.new/drivers/mtd/devices/at91_dataflash.c
7582 --- linux-2.6.22-rc5/drivers/mtd/devices/at91_dataflash.c 1970-01-01 01:00:00.000000000 +0100
7583 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/at91_dataflash.c 2007-07-29 05:55:39.000000000 +0200
7584 @@ -0,0 +1,667 @@
7585 +/*
7586 + * Atmel DataFlash driver for Atmel AT91RM9200 (Thunder)
7587 + *
7588 + * Copyright (C) SAN People (Pty) Ltd
7589 + *
7590 + * This program is free software; you can redistribute it and/or
7591 + * modify it under the terms of the GNU General Public License
7592 + * as published by the Free Software Foundation; either version
7593 + * 2 of the License, or (at your option) any later version.
7594 +*/
7595 +
7596 +#include <linux/module.h>
7597 +#include <linux/init.h>
7598 +#include <linux/slab.h>
7599 +#include <linux/pci.h>
7600 +#include <linux/mtd/mtd.h>
7601 +#include <linux/mtd/partitions.h>
7602 +
7603 +#include <asm/arch/spi.h>
7604 +
7605 +#undef DEBUG_DATAFLASH
7606 +
7607 +#define DATAFLASH_MAX_DEVICES 4 /* max number of dataflash devices */
7608 +#undef DATAFLASH_ALWAYS_ADD_DEVICE /* always add whole device when using partitions? */
7609 +
7610 +#define OP_READ_CONTINUOUS 0xE8
7611 +#define OP_READ_PAGE 0xD2
7612 +#define OP_READ_BUFFER1 0xD4
7613 +#define OP_READ_BUFFER2 0xD6
7614 +#define OP_READ_STATUS 0xD7
7615 +
7616 +#define OP_ERASE_PAGE 0x81
7617 +#define OP_ERASE_BLOCK 0x50
7618 +
7619 +#define OP_TRANSFER_BUF1 0x53
7620 +#define OP_TRANSFER_BUF2 0x55
7621 +#define OP_COMPARE_BUF1 0x60
7622 +#define OP_COMPARE_BUF2 0x61
7623 +
7624 +#define OP_PROGRAM_VIA_BUF1 0x82
7625 +#define OP_PROGRAM_VIA_BUF2 0x85
7626 +
7627 +struct dataflash_local
7628 +{
7629 + int spi; /* SPI chip-select number */
7630 +
7631 + unsigned int page_size; /* number of bytes per page */
7632 + unsigned short page_offset; /* page offset in flash address */
7633 +};
7634 +
7635 +
7636 +/* Detected DataFlash devices */
7637 +static struct mtd_info* mtd_devices[DATAFLASH_MAX_DEVICES];
7638 +static int nr_devices = 0;
7639 +
7640 +/* ......................................................................... */
7641 +
7642 +#ifdef CONFIG_MTD_PARTITIONS
7643 +
7644 +static struct mtd_partition static_partitions_2M[] =
7645 +{
7646 + {
7647 + .name = "bootloader",
7648 + .offset = 0,
7649 + .size = 1 * 32 * 8 * 528, /* 1st sector = 32 blocks * 8 pages * 528 bytes */
7650 + .mask_flags = MTD_WRITEABLE, /* read-only */
7651 + },
7652 + {
7653 + .name = "kernel",
7654 + .offset = MTDPART_OFS_NXTBLK,
7655 + .size = 6 * 32 * 8 * 528, /* 6 sectors */
7656 + },
7657 + {
7658 + .name = "filesystem",
7659 + .offset = MTDPART_OFS_NXTBLK,
7660 + .size = MTDPART_SIZ_FULL, /* rest = 9 sectors */
7661 + }
7662 +};
7663 +
7664 +static struct mtd_partition static_partitions_4M[] =
7665 +{
7666 + {
7667 + .name = "bootloader",
7668 + .offset = 0,
7669 + .size = 1 * 64 * 8 * 528, /* 1st sector = 64 blocks * 8 pages * 528 bytes */
7670 + .mask_flags = MTD_WRITEABLE, /* read-only */
7671 + },
7672 + {
7673 + .name = "kernel",
7674 + .offset = MTDPART_OFS_NXTBLK,
7675 + .size = 4 * 64 * 8 * 528, /* 4 sectors */
7676 + },
7677 + {
7678 + .name = "filesystem",
7679 + .offset = MTDPART_OFS_NXTBLK,
7680 + .size = MTDPART_SIZ_FULL, /* rest = 11 sectors */
7681 + }
7682 +};
7683 +
7684 +#if defined(CONFIG_MACH_KAFA)
7685 +static struct mtd_partition static_partitions_8M[] =
7686 +{
7687 + {
7688 + name: "romboot",
7689 + offset: 0,
7690 + size: 16 * 1056, /* 160 Kb */
7691 + mask_flags: MTD_WRITEABLE, /* read-only */
7692 + },
7693 + {
7694 + name: "uboot",
7695 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7696 + size: 128 * 1056, /* 1 MB */
7697 + },
7698 + {
7699 + name: "kernel",
7700 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7701 + size: 1024 * 1056, /* 1 MB */
7702 + },
7703 + {
7704 + name: "filesystem",
7705 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7706 + size: MTDPART_SIZ_FULL,
7707 + }
7708 +};
7709 +
7710 +#elif defined(CONFIG_MACH_MULTMDP)
7711 +
7712 +static struct mtd_partition static_partitions_8M[] =
7713 +{
7714 + {
7715 + .name = "bootloader",
7716 + .offset = 0,
7717 + .size = 12 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7718 + .mask_flags = MTD_WRITEABLE, /* read-only */
7719 + },
7720 + {
7721 + .name = "configuration",
7722 + .offset = MTDPART_OFS_NXTBLK,
7723 + .size = 20 * 1056,
7724 + },
7725 + {
7726 + .name = "kernel",
7727 + .offset = MTDPART_OFS_NXTBLK,
7728 + .size = 1520 * 1056,
7729 + },
7730 + {
7731 + .name = "filesystem",
7732 + .offset = MTDPART_OFS_NXTBLK,
7733 + .size = MTDPART_SIZ_FULL,
7734 + }
7735 +};
7736 +
7737 +#else
7738 +
7739 +static struct mtd_partition static_partitions_8M[] =
7740 +{
7741 + {
7742 + .name = "bootloader",
7743 + .offset = 0,
7744 + .size = 1 * 32 * 8 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7745 + .mask_flags = MTD_WRITEABLE, /* read-only */
7746 + },
7747 + {
7748 + .name = "kernel",
7749 + .offset = MTDPART_OFS_NXTBLK,
7750 + .size = 5 * 32 * 8 * 1056, /* 5 sectors */
7751 + },
7752 + {
7753 + .name = "filesystem",
7754 + .offset = MTDPART_OFS_NXTBLK,
7755 + .size = MTDPART_SIZ_FULL, /* rest = 26 sectors */
7756 + }
7757 +};
7758 +#endif
7759 +
7760 +static const char *part_probes[] = { "cmdlinepart", NULL, };
7761 +
7762 +#endif
7763 +
7764 +/* ......................................................................... */
7765 +
7766 +/* Allocate a single SPI transfer descriptor. We're assuming that if multiple
7767 + SPI transfers occur at the same time, spi_access_bus() will serialize them.
7768 + If this is not valid, then either (i) each dataflash 'priv' structure
7769 + needs it's own transfer descriptor, (ii) we lock this one, or (iii) use
7770 + another mechanism. */
7771 +static struct spi_transfer_list* spi_transfer_desc;
7772 +
7773 +/*
7774 + * Perform a SPI transfer to access the DataFlash device.
7775 + */
7776 +static int do_spi_transfer(int nr, char* tx, int tx_len, char* rx, int rx_len,
7777 + char* txnext, int txnext_len, char* rxnext, int rxnext_len)
7778 +{
7779 + struct spi_transfer_list* list = spi_transfer_desc;
7780 +
7781 + list->tx[0] = tx; list->txlen[0] = tx_len;
7782 + list->rx[0] = rx; list->rxlen[0] = rx_len;
7783 +
7784 + list->tx[1] = txnext; list->txlen[1] = txnext_len;
7785 + list->rx[1] = rxnext; list->rxlen[1] = rxnext_len;
7786 +
7787 + list->nr_transfers = nr;
7788 +
7789 + return spi_transfer(list);
7790 +}
7791 +
7792 +/* ......................................................................... */
7793 +
7794 +/*
7795 + * Poll the DataFlash device until it is READY.
7796 + */
7797 +static void at91_dataflash_waitready(void)
7798 +{
7799 + char* command = kmalloc(2, GFP_KERNEL);
7800 +
7801 + if (!command)
7802 + return;
7803 +
7804 + do {
7805 + command[0] = OP_READ_STATUS;
7806 + command[1] = 0;
7807 +
7808 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7809 + } while ((command[1] & 0x80) == 0);
7810 +
7811 + kfree(command);
7812 +}
7813 +
7814 +/*
7815 + * Return the status of the DataFlash device.
7816 + */
7817 +static unsigned short at91_dataflash_status(void)
7818 +{
7819 + unsigned short status;
7820 + char* command = kmalloc(2, GFP_KERNEL);
7821 +
7822 + if (!command)
7823 + return 0;
7824 +
7825 + command[0] = OP_READ_STATUS;
7826 + command[1] = 0;
7827 +
7828 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7829 + status = command[1];
7830 +
7831 + kfree(command);
7832 + return status;
7833 +}
7834 +
7835 +/* ......................................................................... */
7836 +
7837 +/*
7838 + * Erase blocks of flash.
7839 + */
7840 +static int at91_dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
7841 +{
7842 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7843 + unsigned int pageaddr;
7844 + char* command;
7845 +
7846 +#ifdef DEBUG_DATAFLASH
7847 + printk("dataflash_erase: addr=%i len=%i\n", instr->addr, instr->len);
7848 +#endif
7849 +
7850 + /* Sanity checks */
7851 + if (instr->addr + instr->len > mtd->size)
7852 + return -EINVAL;
7853 + if ((instr->len % mtd->erasesize != 0) || (instr->len % priv->page_size != 0))
7854 + return -EINVAL;
7855 + if ((instr->addr % priv->page_size) != 0)
7856 + return -EINVAL;
7857 +
7858 + command = kmalloc(4, GFP_KERNEL);
7859 + if (!command)
7860 + return -ENOMEM;
7861 +
7862 + while (instr->len > 0) {
7863 + /* Calculate flash page address */
7864 + pageaddr = (instr->addr / priv->page_size) << priv->page_offset;
7865 +
7866 + command[0] = OP_ERASE_PAGE;
7867 + command[1] = (pageaddr & 0x00FF0000) >> 16;
7868 + command[2] = (pageaddr & 0x0000FF00) >> 8;
7869 + command[3] = 0;
7870 +#ifdef DEBUG_DATAFLASH
7871 + printk("ERASE: (%x) %x %x %x [%i]\n", command[0], command[1], command[2], command[3], pageaddr);
7872 +#endif
7873 +
7874 + /* Send command to SPI device */
7875 + spi_access_bus(priv->spi);
7876 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
7877 +
7878 + at91_dataflash_waitready(); /* poll status until ready */
7879 + spi_release_bus(priv->spi);
7880 +
7881 + instr->addr += priv->page_size; /* next page */
7882 + instr->len -= priv->page_size;
7883 + }
7884 +
7885 + kfree(command);
7886 +
7887 + /* Inform MTD subsystem that erase is complete */
7888 + instr->state = MTD_ERASE_DONE;
7889 + if (instr->callback)
7890 + instr->callback(instr);
7891 +
7892 + return 0;
7893 +}
7894 +
7895 +/*
7896 + * Read from the DataFlash device.
7897 + * from : Start offset in flash device
7898 + * len : Amount to read
7899 + * retlen : About of data actually read
7900 + * buf : Buffer containing the data
7901 + */
7902 +static int at91_dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
7903 +{
7904 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7905 + unsigned int addr;
7906 + char* command;
7907 +
7908 +#ifdef DEBUG_DATAFLASH
7909 + printk("dataflash_read: %lli .. %lli\n", from, from+len);
7910 +#endif
7911 +
7912 + *retlen = 0;
7913 +
7914 + /* Sanity checks */
7915 + if (!len)
7916 + return 0;
7917 + if (from + len > mtd->size)
7918 + return -EINVAL;
7919 +
7920 + /* Calculate flash page/byte address */
7921 + addr = (((unsigned)from / priv->page_size) << priv->page_offset) + ((unsigned)from % priv->page_size);
7922 +
7923 + command = kmalloc(8, GFP_KERNEL);
7924 + if (!command)
7925 + return -ENOMEM;
7926 +
7927 + command[0] = OP_READ_CONTINUOUS;
7928 + command[1] = (addr & 0x00FF0000) >> 16;
7929 + command[2] = (addr & 0x0000FF00) >> 8;
7930 + command[3] = (addr & 0x000000FF);
7931 +#ifdef DEBUG_DATAFLASH
7932 + printk("READ: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
7933 +#endif
7934 +
7935 + /* Send command to SPI device */
7936 + spi_access_bus(priv->spi);
7937 + do_spi_transfer(2, command, 8, command, 8, buf, len, buf, len);
7938 + spi_release_bus(priv->spi);
7939 +
7940 + *retlen = len;
7941 + kfree(command);
7942 + return 0;
7943 +}
7944 +
7945 +/*
7946 + * Write to the DataFlash device.
7947 + * to : Start offset in flash device
7948 + * len : Amount to write
7949 + * retlen : Amount of data actually written
7950 + * buf : Buffer containing the data
7951 + */
7952 +static int at91_dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
7953 +{
7954 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7955 + unsigned int pageaddr, addr, offset, writelen;
7956 + size_t remaining;
7957 + u_char *writebuf;
7958 + unsigned short status;
7959 + int res = 0;
7960 + char* command;
7961 + char* tmpbuf = NULL;
7962 +
7963 +#ifdef DEBUG_DATAFLASH
7964 + printk("dataflash_write: %lli .. %lli\n", to, to+len);
7965 +#endif
7966 +
7967 + *retlen = 0;
7968 +
7969 + /* Sanity checks */
7970 + if (!len)
7971 + return 0;
7972 + if (to + len > mtd->size)
7973 + return -EINVAL;
7974 +
7975 + command = kmalloc(4, GFP_KERNEL);
7976 + if (!command)
7977 + return -ENOMEM;
7978 +
7979 + pageaddr = ((unsigned)to / priv->page_size);
7980 + offset = ((unsigned)to % priv->page_size);
7981 + if (offset + len > priv->page_size)
7982 + writelen = priv->page_size - offset;
7983 + else
7984 + writelen = len;
7985 + writebuf = (u_char *)buf;
7986 + remaining = len;
7987 +
7988 + /* Allocate temporary buffer */
7989 + tmpbuf = kmalloc(priv->page_size, GFP_KERNEL);
7990 + if (!tmpbuf) {
7991 + kfree(command);
7992 + return -ENOMEM;
7993 + }
7994 +
7995 + /* Gain access to the SPI bus */
7996 + spi_access_bus(priv->spi);
7997 +
7998 + while (remaining > 0) {
7999 +#ifdef DEBUG_DATAFLASH
8000 + printk("write @ %i:%i len=%i\n", pageaddr, offset, writelen);
8001 +#endif
8002 +
8003 + /* (1) Transfer to Buffer1 */
8004 + if (writelen != priv->page_size) {
8005 + addr = pageaddr << priv->page_offset;
8006 + command[0] = OP_TRANSFER_BUF1;
8007 + command[1] = (addr & 0x00FF0000) >> 16;
8008 + command[2] = (addr & 0x0000FF00) >> 8;
8009 + command[3] = 0;
8010 +#ifdef DEBUG_DATAFLASH
8011 + printk("TRANSFER: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8012 +#endif
8013 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8014 + at91_dataflash_waitready();
8015 + }
8016 +
8017 + /* (2) Program via Buffer1 */
8018 + addr = (pageaddr << priv->page_offset) + offset;
8019 + command[0] = OP_PROGRAM_VIA_BUF1;
8020 + command[1] = (addr & 0x00FF0000) >> 16;
8021 + command[2] = (addr & 0x0000FF00) >> 8;
8022 + command[3] = (addr & 0x000000FF);
8023 +#ifdef DEBUG_DATAFLASH
8024 + printk("PROGRAM: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8025 +#endif
8026 + do_spi_transfer(2, command, 4, command, 4, writebuf, writelen, tmpbuf, writelen);
8027 + at91_dataflash_waitready();
8028 +
8029 + /* (3) Compare to Buffer1 */
8030 + addr = pageaddr << priv->page_offset;
8031 + command[0] = OP_COMPARE_BUF1;
8032 + command[1] = (addr & 0x00FF0000) >> 16;
8033 + command[2] = (addr & 0x0000FF00) >> 8;
8034 + command[3] = 0;
8035 +#ifdef DEBUG_DATAFLASH
8036 + printk("COMPARE: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8037 +#endif
8038 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8039 + at91_dataflash_waitready();
8040 +
8041 + /* Get result of the compare operation */
8042 + status = at91_dataflash_status();
8043 + if ((status & 0x40) == 1) {
8044 + printk("at91_dataflash: Write error on page %i\n", pageaddr);
8045 + remaining = 0;
8046 + res = -EIO;
8047 + }
8048 +
8049 + remaining = remaining - writelen;
8050 + pageaddr++;
8051 + offset = 0;
8052 + writebuf += writelen;
8053 + *retlen += writelen;
8054 +
8055 + if (remaining > priv->page_size)
8056 + writelen = priv->page_size;
8057 + else
8058 + writelen = remaining;
8059 + }
8060 +
8061 + /* Release SPI bus */
8062 + spi_release_bus(priv->spi);
8063 +
8064 + kfree(tmpbuf);
8065 + kfree(command);
8066 + return res;
8067 +}
8068 +
8069 +/* ......................................................................... */
8070 +
8071 +/*
8072 + * Initialize and register DataFlash device with MTD subsystem.
8073 + */
8074 +static int __init add_dataflash(int channel, char *name, int IDsize,
8075 + int nr_pages, int pagesize, int pageoffset)
8076 +{
8077 + struct mtd_info *device;
8078 + struct dataflash_local *priv;
8079 +#ifdef CONFIG_MTD_PARTITIONS
8080 + struct mtd_partition *mtd_parts = 0;
8081 + int mtd_parts_nr = 0;
8082 +#endif
8083 +
8084 + if (nr_devices >= DATAFLASH_MAX_DEVICES) {
8085 + printk(KERN_ERR "at91_dataflash: Too many devices detected\n");
8086 + return 0;
8087 + }
8088 +
8089 + device = kmalloc(sizeof(struct mtd_info) + strlen(name) + 8, GFP_KERNEL);
8090 + if (!device)
8091 + return -ENOMEM;
8092 + memset(device, 0, sizeof(struct mtd_info));
8093 +
8094 + device->name = (char *)&device[1];
8095 + sprintf(device->name, "%s.spi%d", name, channel);
8096 + device->size = nr_pages * pagesize;
8097 + device->erasesize = pagesize;
8098 + device->writesize = pagesize;
8099 + device->owner = THIS_MODULE;
8100 + device->type = MTD_DATAFLASH;
8101 + device->flags = MTD_WRITEABLE;
8102 + device->erase = at91_dataflash_erase;
8103 + device->read = at91_dataflash_read;
8104 + device->write = at91_dataflash_write;
8105 +
8106 + priv = (struct dataflash_local *) kmalloc(sizeof(struct dataflash_local), GFP_KERNEL);
8107 + if (!priv) {
8108 + kfree(device);
8109 + return -ENOMEM;
8110 + }
8111 + memset(priv, 0, sizeof(struct dataflash_local));
8112 +
8113 + priv->spi = channel;
8114 + priv->page_size = pagesize;
8115 + priv->page_offset = pageoffset;
8116 + device->priv = priv;
8117 +
8118 + mtd_devices[nr_devices] = device;
8119 + nr_devices++;
8120 + printk("at91_dataflash: %s detected [spi%i] (%i bytes)\n", name, channel, device->size);
8121 +
8122 +#ifdef CONFIG_MTD_PARTITIONS
8123 +#ifdef CONFIG_MTD_CMDLINE_PARTS
8124 + mtd_parts_nr = parse_mtd_partitions(device, part_probes, &mtd_parts, 0);
8125 +#endif
8126 + if (mtd_parts_nr <= 0) {
8127 + switch (IDsize) {
8128 + case SZ_2M:
8129 + mtd_parts = static_partitions_2M;
8130 + mtd_parts_nr = ARRAY_SIZE(static_partitions_2M);
8131 + break;
8132 + case SZ_4M:
8133 + mtd_parts = static_partitions_4M;
8134 + mtd_parts_nr = ARRAY_SIZE(static_partitions_4M);
8135 + break;
8136 + case SZ_8M:
8137 + mtd_parts = static_partitions_8M;
8138 + mtd_parts_nr = ARRAY_SIZE(static_partitions_8M);
8139 + break;
8140 + }
8141 + }
8142 +
8143 + if (mtd_parts_nr > 0) {
8144 +#ifdef DATAFLASH_ALWAYS_ADD_DEVICE
8145 + add_mtd_device(device);
8146 +#endif
8147 + return add_mtd_partitions(device, mtd_parts, mtd_parts_nr);
8148 + }
8149 +#endif
8150 + return add_mtd_device(device); /* add whole device */
8151 +}
8152 +
8153 +/*
8154 + * Detect and initialize DataFlash device connected to specified SPI channel.
8155 + *
8156 + * Device Density ID code Nr Pages Page Size Page offset
8157 + * AT45DB011B 1Mbit (128K) xx0011xx (0x0c) 512 264 9
8158 + * AT45DB021B 2Mbit (256K) xx0101xx (0x14) 1025 264 9
8159 + * AT45DB041B 4Mbit (512K) xx0111xx (0x1c) 2048 264 9
8160 + * AT45DB081B 8Mbit (1M) xx1001xx (0x24) 4096 264 9
8161 + * AT45DB0161B 16Mbit (2M) xx1011xx (0x2c) 4096 528 10
8162 + * AT45DB0321B 32Mbit (4M) xx1101xx (0x34) 8192 528 10
8163 + * AT45DB0642 64Mbit (8M) xx1111xx (0x3c) 8192 1056 11
8164 + * AT45DB1282 128Mbit (16M) xx0100xx (0x10) 16384 1056 11
8165 + */
8166 +static int __init at91_dataflash_detect(int channel)
8167 +{
8168 + int res = 0;
8169 + unsigned short status;
8170 +
8171 + spi_access_bus(channel);
8172 + status = at91_dataflash_status();
8173 + spi_release_bus(channel);
8174 + if (status != 0xff) { /* no dataflash device there */
8175 + switch (status & 0x3c) {
8176 + case 0x0c: /* 0 0 1 1 */
8177 + res = add_dataflash(channel, "AT45DB011B", SZ_128K, 512, 264, 9);
8178 + break;
8179 + case 0x14: /* 0 1 0 1 */
8180 + res = add_dataflash(channel, "AT45DB021B", SZ_256K, 1025, 264, 9);
8181 + break;
8182 + case 0x1c: /* 0 1 1 1 */
8183 + res = add_dataflash(channel, "AT45DB041B", SZ_512K, 2048, 264, 9);
8184 + break;
8185 + case 0x24: /* 1 0 0 1 */
8186 + res = add_dataflash(channel, "AT45DB081B", SZ_1M, 4096, 264, 9);
8187 + break;
8188 + case 0x2c: /* 1 0 1 1 */
8189 + res = add_dataflash(channel, "AT45DB161B", SZ_2M, 4096, 528, 10);
8190 + break;
8191 + case 0x34: /* 1 1 0 1 */
8192 + res = add_dataflash(channel, "AT45DB321B", SZ_4M, 8192, 528, 10);
8193 + break;
8194 + case 0x3c: /* 1 1 1 1 */
8195 + res = add_dataflash(channel, "AT45DB642", SZ_8M, 8192, 1056, 11);
8196 + break;
8197 +// Currently unsupported since Atmel removed the "Main Memory Program via Buffer" commands.
8198 +// case 0x10: /* 0 1 0 0 */
8199 +// res = add_dataflash(channel, "AT45DB1282", SZ_16M, 16384, 1056, 11);
8200 +// break;
8201 + default:
8202 + printk(KERN_ERR "at91_dataflash: Unknown device (%x)\n", status & 0x3c);
8203 + }
8204 + }
8205 +
8206 + return res;
8207 +}
8208 +
8209 +static int __init at91_dataflash_init(void)
8210 +{
8211 + spi_transfer_desc = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
8212 + if (!spi_transfer_desc)
8213 + return -ENOMEM;
8214 +
8215 + /* DataFlash (SPI chip select 0) */
8216 + at91_dataflash_detect(0);
8217 +
8218 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
8219 + /* DataFlash card (SPI chip select 3) */
8220 + at91_dataflash_detect(3);
8221 +#endif
8222 +
8223 + return 0;
8224 +}
8225 +
8226 +static void __exit at91_dataflash_exit(void)
8227 +{
8228 + int i;
8229 +
8230 + for (i = 0; i < DATAFLASH_MAX_DEVICES; i++) {
8231 + if (mtd_devices[i]) {
8232 +#ifdef CONFIG_MTD_PARTITIONS
8233 + del_mtd_partitions(mtd_devices[i]);
8234 +#else
8235 + del_mtd_device(mtd_devices[i]);
8236 +#endif
8237 + kfree(mtd_devices[i]->priv);
8238 + kfree(mtd_devices[i]);
8239 + }
8240 + }
8241 + nr_devices = 0;
8242 + kfree(spi_transfer_desc);
8243 +}
8244 +
8245 +
8246 +module_init(at91_dataflash_init);
8247 +module_exit(at91_dataflash_exit);
8248 +
8249 +MODULE_LICENSE("GPL");
8250 +MODULE_AUTHOR("Andrew Victor");
8251 +MODULE_DESCRIPTION("DataFlash driver for Atmel AT91RM9200");
8252 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/Kconfig linux-2.6.22-rc5.new/drivers/mtd/devices/Kconfig
8253 --- linux-2.6.22-rc5/drivers/mtd/devices/Kconfig 2007-06-17 04:09:12.000000000 +0200
8254 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/Kconfig 2007-07-29 05:55:39.000000000 +0200
8255 @@ -269,5 +269,11 @@
8256 LinuxBIOS or if you need to recover a DiskOnChip Millennium on which
8257 you have managed to wipe the first block.
8258
8259 -endmenu
8260 +config MTD_AT91_DATAFLASH
8261 + tristate "AT91RM9200 DataFlash AT45DBxxx (legacy driver)"
8262 + depends on MTD && ARCH_AT91RM9200 && AT91_SPI
8263 + help
8264 + This enables access to the DataFlash (AT45DBxxx) on the AT91RM9200.
8265 + If you have such a board, say 'Y'.
8266
8267 +endmenu
8268 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/Makefile linux-2.6.22-rc5.new/drivers/mtd/devices/Makefile
8269 --- linux-2.6.22-rc5/drivers/mtd/devices/Makefile 2007-06-17 04:09:12.000000000 +0200
8270 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/Makefile 2007-07-29 05:55:39.000000000 +0200
8271 @@ -18,3 +18,4 @@
8272 obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
8273 obj-$(CONFIG_MTD_DATAFLASH26) += at91_dataflash26.o
8274 obj-$(CONFIG_MTD_M25P80) += m25p80.o
8275 +obj-$(CONFIG_MTD_AT91_DATAFLASH)+= at91_dataflash.o
8276 diff -urN linux-2.6.22-rc5/drivers/net/arm/at91_ether.c linux-2.6.22-rc5.new/drivers/net/arm/at91_ether.c
8277 --- linux-2.6.22-rc5/drivers/net/arm/at91_ether.c 2007-06-17 04:09:12.000000000 +0200
8278 +++ linux-2.6.22-rc5.new/drivers/net/arm/at91_ether.c 2007-07-29 05:55:39.000000000 +0200
8279 @@ -894,6 +894,7 @@
8280 skb_reserve(skb, 2);
8281 memcpy(skb_put(skb, pktlen), p_recv, pktlen);
8282
8283 + skb->dev = dev;
8284 skb->protocol = eth_type_trans(skb, dev);
8285 dev->last_rx = jiffies;
8286 lp->stats.rx_bytes += pktlen;
8287 @@ -978,14 +979,22 @@
8288 struct net_device *dev;
8289 struct at91_private *lp;
8290 unsigned int val;
8291 - int res;
8292 + struct resource *res;
8293 + int ret;
8294
8295 dev = alloc_etherdev(sizeof(struct at91_private));
8296 if (!dev)
8297 return -ENOMEM;
8298
8299 - dev->base_addr = AT91_VA_BASE_EMAC;
8300 - dev->irq = AT91RM9200_ID_EMAC;
8301 + /* Get I/O base address and IRQ */
8302 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
8303 + if (!res) {
8304 + free_netdev(dev);
8305 + return -ENODEV;
8306 + }
8307 + dev->base_addr = res->start;
8308 + dev->irq = platform_get_irq(pdev, 0);
8309 +
8310 SET_MODULE_OWNER(dev);
8311
8312 /* Install the interrupt handler */
8313 @@ -1058,12 +1067,12 @@
8314 lp->phy_address = phy_address; /* MDI address of PHY */
8315
8316 /* Register the network interface */
8317 - res = register_netdev(dev);
8318 - if (res) {
8319 + ret = register_netdev(dev);
8320 + if (ret) {
8321 free_irq(dev->irq, dev);
8322 free_netdev(dev);
8323 dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
8324 - return res;
8325 + return ret;
8326 }
8327
8328 /* Determine current link speed */
8329 diff -urN linux-2.6.22-rc5/drivers/serial/atmel_serial.c linux-2.6.22-rc5.new/drivers/serial/atmel_serial.c
8330 --- linux-2.6.22-rc5/drivers/serial/atmel_serial.c 2007-06-17 04:09:12.000000000 +0200
8331 +++ linux-2.6.22-rc5.new/drivers/serial/atmel_serial.c 2007-07-29 05:55:39.000000000 +0200
8332 @@ -7,6 +7,8 @@
8333 * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
8334 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
8335 *
8336 + * DMA support added by Chip Coldwell.
8337 + *
8338 * This program is free software; you can redistribute it and/or modify
8339 * it under the terms of the GNU General Public License as published by
8340 * the Free Software Foundation; either version 2 of the License, or
8341 @@ -33,6 +35,7 @@
8342 #include <linux/sysrq.h>
8343 #include <linux/tty_flip.h>
8344 #include <linux/platform_device.h>
8345 +#include <linux/dma-mapping.h>
8346 #include <linux/atmel_pdc.h>
8347
8348 #include <asm/io.h>
8349 @@ -47,6 +50,11 @@
8350
8351 #include "atmel_serial.h"
8352
8353 +#define SUPPORT_PDC
8354 +#define PDC_BUFFER_SIZE (L1_CACHE_BYTES << 3)
8355 +#warning "Revisit"
8356 +#define PDC_RX_TIMEOUT (3 * 10) /* 3 bytes */
8357 +
8358 #if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
8359 #define SUPPORT_SYSRQ
8360 #endif
8361 @@ -107,6 +115,13 @@
8362 static int (*atmel_open_hook)(struct uart_port *);
8363 static void (*atmel_close_hook)(struct uart_port *);
8364
8365 +struct atmel_dma_buffer {
8366 + unsigned char *buf;
8367 + dma_addr_t dma_addr;
8368 + size_t dma_size;
8369 + unsigned int ofs;
8370 +};
8371 +
8372 /*
8373 * We wrap our port structure around the generic uart_port.
8374 */
8375 @@ -114,10 +129,20 @@
8376 struct uart_port uart; /* uart */
8377 struct clk *clk; /* uart clock */
8378 unsigned short suspended; /* is port suspended? */
8379 +
8380 + short use_dma_rx; /* enable PDC receiver */
8381 + short pdc_rx_idx; /* current PDC RX buffer */
8382 + struct atmel_dma_buffer pdc_rx[2]; /* PDC receier */
8383 +
8384 + short use_dma_tx; /* enable PDC transmitter */
8385 + struct atmel_dma_buffer pdc_tx; /* PDC transmitter */
8386 };
8387
8388 static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART];
8389
8390 +#define PDC_RX_BUF(port) &(port)->pdc_rx[(port)->pdc_rx_idx]
8391 +#define PDC_RX_SWITCH(port) (port)->pdc_rx_idx = !(port)->pdc_rx_idx
8392 +
8393 #ifdef SUPPORT_SYSRQ
8394 static struct console atmel_console;
8395 #endif
8396 @@ -205,7 +230,12 @@
8397 {
8398 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8399
8400 - UART_PUT_IDR(port, ATMEL_US_TXRDY);
8401 + if (atmel_port->use_dma_tx) {
8402 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8403 + UART_PUT_IDR(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8404 + }
8405 + else
8406 + UART_PUT_IDR(port, ATMEL_US_TXRDY);
8407 }
8408
8409 /*
8410 @@ -215,7 +245,17 @@
8411 {
8412 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8413
8414 - UART_PUT_IER(port, ATMEL_US_TXRDY);
8415 + if (atmel_port->use_dma_tx) {
8416 + if (UART_GET_PTSR(port) & ATMEL_PDC_TXTEN)
8417 + /* The transmitter is already running. Yes, we
8418 + really need this.*/
8419 + return;
8420 +
8421 + UART_PUT_IER(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8422 + UART_PUT_PTCR(port, ATMEL_PDC_TXTEN); /* re-enable PDC transmit */
8423 + }
8424 + else
8425 + UART_PUT_IER(port, ATMEL_US_TXRDY);
8426 }
8427
8428 /*
8429 @@ -225,7 +265,12 @@
8430 {
8431 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8432
8433 - UART_PUT_IDR(port, ATMEL_US_RXRDY);
8434 + if (atmel_port->use_dma_rx) {
8435 + UART_PUT_PTCR(port, ATMEL_PDC_RXTDIS); /* disable PDC receive */
8436 + UART_PUT_IDR(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
8437 + }
8438 + else
8439 + UART_PUT_IDR(port, ATMEL_US_RXRDY);
8440 }
8441
8442 /*
8443 @@ -248,6 +293,134 @@
8444 }
8445
8446 /*
8447 + * Receive data via the PDC. A buffer has been fulled.
8448 + */
8449 +static void atmel_pdc_endrx(struct uart_port *port)
8450 +{
8451 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8452 + struct tty_struct *tty = port->info->tty;
8453 + struct atmel_dma_buffer *pdc = PDC_RX_BUF(atmel_port);
8454 + unsigned int count;
8455 +
8456 + count = pdc->dma_size - pdc->ofs;
8457 + if (likely(count > 0)) {
8458 + dma_sync_single_for_cpu(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8459 + tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count);
8460 + tty_flip_buffer_push(tty);
8461 +
8462 + port->icount.rx += count;
8463 + }
8464 +
8465 + /* Set this buffer as the next receive buffer */
8466 + pdc->ofs = 0;
8467 + UART_PUT_RNPR(port, pdc->dma_addr);
8468 + UART_PUT_RNCR(port, pdc->dma_size);
8469 +
8470 + /* Switch to next buffer */
8471 + PDC_RX_SWITCH(atmel_port); /* next PDC buffer */
8472 +}
8473 +
8474 +/*
8475 + * Receive data via the PDC. At least one byte was received, but the
8476 + * buffer was not full when the inter-character timeout expired.
8477 + */
8478 +static void atmel_pdc_timeout(struct uart_port *port)
8479 +{
8480 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8481 + struct tty_struct *tty = port->info->tty;
8482 + struct atmel_dma_buffer *pdc = PDC_RX_BUF(atmel_port);
8483 + /* unsigned */ int ofs, count;
8484 +
8485 + ofs = UART_GET_RPR(port) - pdc->dma_addr; /* current DMA adress */
8486 + count = ofs - pdc->ofs;
8487 +
8488 + if (likely(count > 0)) {
8489 + dma_sync_single_for_cpu(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8490 + tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count);
8491 + tty_flip_buffer_push(tty);
8492 +
8493 + pdc->ofs = ofs;
8494 + port->icount.rx += count;
8495 + }
8496 +
8497 + /* reset the UART timeout */
8498 + UART_PUT_CR(port, ATMEL_US_STTTO);
8499 +}
8500 +
8501 +/*
8502 + * Deal with parity, framing and overrun errors.
8503 + */
8504 +static void atmel_pdc_rxerr(struct uart_port *port, unsigned int status)
8505 +{
8506 + /* clear error */
8507 + UART_PUT_CR(port, ATMEL_US_RSTSTA);
8508 +
8509 + if (status & ATMEL_US_RXBRK) {
8510 + status &= ~(ATMEL_US_PARE | ATMEL_US_FRAME); /* ignore side-effect */
8511 + port->icount.brk++;
8512 + }
8513 + if (status & ATMEL_US_PARE)
8514 + port->icount.parity++;
8515 + if (status & ATMEL_US_FRAME)
8516 + port->icount.frame++;
8517 + if (status & ATMEL_US_OVRE)
8518 + port->icount.overrun++;
8519 +}
8520 +
8521 +/*
8522 + * A transmission via the PDC is complete.
8523 + */
8524 +static void atmel_pdc_endtx(struct uart_port *port)
8525 +{
8526 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8527 + struct circ_buf *xmit = &port->info->xmit;
8528 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8529 +
8530 + xmit->tail += pdc->ofs;
8531 + if (xmit->tail >= SERIAL_XMIT_SIZE)
8532 + xmit->tail -= SERIAL_XMIT_SIZE;
8533 +
8534 + port->icount.tx += pdc->ofs;
8535 + pdc->ofs = 0;
8536 +
8537 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
8538 + uart_write_wakeup(port);
8539 +}
8540 +
8541 +/*
8542 + * The PDC transmitter is idle, so either start the next transfer or
8543 + * disable the transmitter.
8544 + */
8545 +static void atmel_pdc_txbufe(struct uart_port *port)
8546 +{
8547 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8548 + struct circ_buf *xmit = &port->info->xmit;
8549 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8550 + int count;
8551 +
8552 + if (!uart_circ_empty(xmit)) {
8553 + /* more to transmit - setup next transfer */
8554 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8555 + dma_sync_single_for_device(port->dev, pdc->dma_addr, pdc->dma_size, DMA_TO_DEVICE);
8556 +
8557 + if (xmit->tail < xmit->head)
8558 + count = xmit->head - xmit->tail;
8559 + else
8560 + count = SERIAL_XMIT_SIZE - xmit->tail;
8561 + pdc->ofs = count;
8562 +
8563 + UART_PUT_TPR(port, pdc->dma_addr + xmit->tail);
8564 + UART_PUT_TCR(port, count);
8565 + UART_PUT_PTCR(port, ATMEL_PDC_TXTEN); /* re-enable PDC transmit */
8566 + }
8567 + else {
8568 + /* nothing left to transmit - disable the transmitter */
8569 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8570 + UART_PUT_IDR(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8571 + }
8572 +}
8573 +
8574 +/*
8575 * Characters received (called from interrupt handler)
8576 */
8577 static void atmel_rx_chars(struct uart_port *port)
8578 @@ -349,6 +522,14 @@
8579 status = UART_GET_CSR(port);
8580 pending = status & UART_GET_IMR(port);
8581 while (pending) {
8582 + /* PDC receive */
8583 + if (pending & ATMEL_US_ENDRX)
8584 + atmel_pdc_endrx(port);
8585 + if (pending & ATMEL_US_TIMEOUT)
8586 + atmel_pdc_timeout(port);
8587 + if (atmel_port->use_dma_rx && pending & (ATMEL_US_RXBRK | ATMEL_US_OVRE | ATMEL_US_FRAME | ATMEL_US_PARE))
8588 + atmel_pdc_rxerr(port, pending);
8589 +
8590 /* Interrupt receive */
8591 if (pending & ATMEL_US_RXRDY)
8592 atmel_rx_chars(port);
8593 @@ -363,6 +544,12 @@
8594 if (pending & (ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC))
8595 wake_up_interruptible(&port->info->delta_msr_wait);
8596
8597 + /* PDC transmit */
8598 + if (pending & ATMEL_US_ENDTX)
8599 + atmel_pdc_endtx(port);
8600 + if (pending & ATMEL_US_TXBUFE)
8601 + atmel_pdc_txbufe(port);
8602 +
8603 /* Interrupt transmit */
8604 if (pending & ATMEL_US_TXRDY)
8605 atmel_tx_chars(port);
8606 @@ -401,6 +588,47 @@
8607 }
8608
8609 /*
8610 + * Initialize DMA (if necessary)
8611 + */
8612 + if (atmel_port->use_dma_rx) {
8613 + int i;
8614 +
8615 + for (i = 0; i < 2; i++) {
8616 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8617 +
8618 + pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL);
8619 + if (pdc->buf == NULL) {
8620 + if (i != 0) {
8621 + dma_unmap_single(port->dev, atmel_port->pdc_rx[0].dma_addr, PDC_BUFFER_SIZE, DMA_FROM_DEVICE);
8622 + kfree(atmel_port->pdc_rx[0].buf);
8623 + }
8624 + free_irq(port->irq, port);
8625 + return -ENOMEM;
8626 + }
8627 + pdc->dma_addr = dma_map_single(port->dev, pdc->buf, PDC_BUFFER_SIZE, DMA_FROM_DEVICE);
8628 + pdc->dma_size = PDC_BUFFER_SIZE;
8629 + pdc->ofs = 0;
8630 + }
8631 +
8632 + atmel_port->pdc_rx_idx = 0;
8633 +
8634 + UART_PUT_RPR(port, atmel_port->pdc_rx[0].dma_addr);
8635 + UART_PUT_RCR(port, PDC_BUFFER_SIZE);
8636 +
8637 + UART_PUT_RNPR(port, atmel_port->pdc_rx[1].dma_addr);
8638 + UART_PUT_RNCR(port, PDC_BUFFER_SIZE);
8639 + }
8640 + if (atmel_port->use_dma_tx) {
8641 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8642 + struct circ_buf *xmit = &port->info->xmit;
8643 +
8644 + pdc->buf = xmit->buf;
8645 + pdc->dma_addr = dma_map_single(port->dev, pdc->buf, SERIAL_XMIT_SIZE, DMA_TO_DEVICE);
8646 + pdc->dma_size = SERIAL_XMIT_SIZE;
8647 + pdc->ofs = 0;
8648 + }
8649 +
8650 + /*
8651 * If there is a specific "open" function (to register
8652 * control line interrupts)
8653 */
8654 @@ -418,7 +646,15 @@
8655 UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
8656 UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN); /* enable xmit & rcvr */
8657
8658 - UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */
8659 + if (atmel_port->use_dma_rx) {
8660 + UART_PUT_RTOR(port, PDC_RX_TIMEOUT); /* set UART timeout */
8661 + UART_PUT_CR(port, ATMEL_US_STTTO);
8662 +
8663 + UART_PUT_IER(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
8664 + UART_PUT_PTCR(port, ATMEL_PDC_RXTEN); /* enable PDC controller */
8665 + }
8666 + else
8667 + UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */
8668
8669 return 0;
8670 }
8671 @@ -431,6 +667,31 @@
8672 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8673
8674 /*
8675 + * Ensure everything is stopped.
8676 + */
8677 + atmel_stop_rx(port);
8678 + atmel_stop_tx(port);
8679 +
8680 + /*
8681 + * Shut-down the DMA.
8682 + */
8683 + if (atmel_port->use_dma_rx) {
8684 + int i;
8685 +
8686 + for (i = 0; i < 2; i++) {
8687 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8688 +
8689 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8690 + kfree(pdc->buf);
8691 + }
8692 + }
8693 + if (atmel_port->use_dma_tx) {
8694 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8695 +
8696 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_TO_DEVICE);
8697 + }
8698 +
8699 + /*
8700 * Disable all interrupts, port and break condition.
8701 */
8702 UART_PUT_CR(port, ATMEL_US_RSTSTA);
8703 @@ -481,6 +742,7 @@
8704 */
8705 static void atmel_set_termios(struct uart_port *port, struct ktermios * termios, struct ktermios * old)
8706 {
8707 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8708 unsigned long flags;
8709 unsigned int mode, imr, quot, baud;
8710
8711 @@ -490,7 +752,7 @@
8712 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
8713 quot = uart_get_divisor(port, baud);
8714
8715 - if (quot > 65535) { /* BRGR is 16-bit, so switch to slower clock */
8716 + if (quot > 65535) { /* BRGR is 16-bit, so switch to slower clock */
8717 quot /= 8;
8718 mode |= ATMEL_US_USCLKS_MCK_DIV8;
8719 }
8720 @@ -539,6 +801,9 @@
8721 if (termios->c_iflag & (BRKINT | PARMRK))
8722 port->read_status_mask |= ATMEL_US_RXBRK;
8723
8724 + if (atmel_port->use_dma_rx) /* need to enable error interrupts */
8725 + UART_PUT_IER(port, port->read_status_mask);
8726 +
8727 /*
8728 * Characters to ignore
8729 */
8730 @@ -717,6 +982,13 @@
8731 clk_enable(atmel_port->clk);
8732 port->uartclk = clk_get_rate(atmel_port->clk);
8733 }
8734 +
8735 +#ifdef SUPPORT_PDC
8736 + atmel_port->use_dma_rx = data->use_dma_rx;
8737 + atmel_port->use_dma_tx = data->use_dma_tx;
8738 + if (atmel_port->use_dma_tx)
8739 + port->fifosize = PDC_BUFFER_SIZE;
8740 +#endif
8741 }
8742
8743 /*
8744 @@ -893,7 +1165,8 @@
8745 struct uart_port *port = platform_get_drvdata(pdev);
8746 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8747
8748 - if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
8749 + if (device_may_wakeup(&pdev->dev)
8750 + && !clk_must_disable(atmel_port->clk))
8751 enable_irq_wake(port->irq);
8752 else {
8753 uart_suspend_port(&atmel_uart, port);
8754 diff -urN linux-2.6.22-rc5/drivers/spi/Kconfig linux-2.6.22-rc5.new/drivers/spi/Kconfig
8755 --- linux-2.6.22-rc5/drivers/spi/Kconfig 2007-06-17 04:09:12.000000000 +0200
8756 +++ linux-2.6.22-rc5.new/drivers/spi/Kconfig 2007-07-29 05:55:39.000000000 +0200
8757 @@ -55,6 +55,7 @@
8758 config SPI_ATMEL
8759 tristate "Atmel SPI Controller"
8760 depends on (ARCH_AT91 || AVR32) && SPI_MASTER
8761 + select SPI_AT91_MANUAL_CS if ARCH_AT91RM9200
8762 help
8763 This selects a driver for the Atmel SPI Controller, present on
8764 many AT32 (AVR32) and AT91 (ARM) chips.
8765 @@ -100,6 +101,24 @@
8766 inexpensive battery powered microcontroller evaluation board.
8767 This same cable can be used to flash new firmware.
8768
8769 +config SPI_AT91
8770 + tristate "AT91RM9200 Bitbang SPI Master"
8771 + depends on SPI_MASTER && ARCH_AT91RM9200 && !SPI_ATMEL && EXPERIMENTAL
8772 + select SPI_BITBANG
8773 + select SPI_AT91_MANUAL_CS
8774 + help
8775 + This is dumb PIO bitbanging driver for the Atmel AT91RM9200.
8776 + The SPI_ATMEL driver will be its replacement, using the native
8777 + SPI hardware and its DMA controller.
8778 +
8779 +config SPI_AT91_MANUAL_CS
8780 + bool
8781 + depends on ARCH_AT91RM9200
8782 + help
8783 + Works around an AT91RM9200 problem whereby the SPI chip-select
8784 + will be wrongly disabled. The workaround uses those pins as
8785 + GPIOs instead of letting the SPI controller manage them.
8786 +
8787 config SPI_IMX
8788 tristate "Freescale iMX SPI controller"
8789 depends on SPI_MASTER && ARCH_IMX && EXPERIMENTAL
8790 diff -urN linux-2.6.22-rc5/drivers/spi/Makefile linux-2.6.22-rc5.new/drivers/spi/Makefile
8791 --- linux-2.6.22-rc5/drivers/spi/Makefile 2007-06-17 04:09:12.000000000 +0200
8792 +++ linux-2.6.22-rc5.new/drivers/spi/Makefile 2007-07-29 05:55:39.000000000 +0200
8793 @@ -23,6 +23,7 @@
8794 obj-$(CONFIG_SPI_MPC83xx) += spi_mpc83xx.o
8795 obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o
8796 obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
8797 +obj-$(CONFIG_SPI_AT91) += spi_at91_bitbang.o
8798 # ... add above this line ...
8799
8800 # SPI protocol drivers (device/link on bus)
8801 diff -urN linux-2.6.22-rc5/drivers/spi/spi_at91_bitbang.c linux-2.6.22-rc5.new/drivers/spi/spi_at91_bitbang.c
8802 --- linux-2.6.22-rc5/drivers/spi/spi_at91_bitbang.c 1970-01-01 01:00:00.000000000 +0100
8803 +++ linux-2.6.22-rc5.new/drivers/spi/spi_at91_bitbang.c 2007-07-29 05:55:39.000000000 +0200
8804 @@ -0,0 +1,207 @@
8805 +/*
8806 + * at91_spi.c - at91 SPI driver (BOOTSTRAP/BITBANG VERSION)
8807 + *
8808 + * Copyright (C) 2006 David Brownell
8809 + *
8810 + * This program is free software; you can redistribute it and/or modify
8811 + * it under the terms of the GNU General Public License as published by
8812 + * the Free Software Foundation; either version 2 of the License, or
8813 + * (at your option) any later version.
8814 + *
8815 + * This program is distributed in the hope that it will be useful,
8816 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8817 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8818 + * GNU General Public License for more details.
8819 + *
8820 + * You should have received a copy of the GNU General Public License
8821 + * along with this program; if not, write to the Free Software
8822 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
8823 + */
8824 +#include <linux/kernel.h>
8825 +#include <linux/init.h>
8826 +#include <linux/platform_device.h>
8827 +
8828 +#include <linux/spi/spi.h>
8829 +#include <linux/spi/spi_bitbang.h>
8830 +
8831 +#include <asm/arch/gpio.h>
8832 +
8833 +
8834 +/*
8835 + * FIXME this bitbanging version is just to help bootstrap systems until
8836 + * there's a native SPI+IRQ+DMA controller driver ... such a driver should
8837 + * be a drop-in replacement for this one, and much faster.
8838 + *
8839 + * remember:
8840 + *
8841 + * - other at91 parts (like at91sam9) have multiple controllers
8842 + * and different pin muxing; this version is at91rm9200 specfic.
8843 + *
8844 + * - at91sam9261 SPI0 pins are directly muxed with MMC/SD pins.
8845 + *
8846 + * - rm9200 spi chipselects drop wrongly, so the native driver
8847 + * will need to use gpios much like this does.
8848 + *
8849 + * - real hardware only allows 8..16 bits per word, while this
8850 + * bitbanger allows 1..32 (incompatible superset).
8851 + *
8852 + * - this disregards clock parameters. with inlined gpio calls,
8853 + * gcc 3.4.4 produces about 1.5 mbit/sec, more than 2x faster
8854 + * than using the subroutined veresion from txrx_word().
8855 + *
8856 + * - suspend/resume and <linux/clk.h> support is missing ...
8857 + */
8858 +
8859 +#define spi_miso_bit AT91_PIN_PA0
8860 +#define spi_mosi_bit AT91_PIN_PA1
8861 +#define spi_sck_bit AT91_PIN_PA2
8862 +
8863 +struct at91_spi {
8864 + struct spi_bitbang bitbang;
8865 + struct platform_device *pdev;
8866 +};
8867 +
8868 +/*----------------------------------------------------------------------*/
8869 +
8870 +static inline void setsck(struct spi_device *spi, int is_on)
8871 +{
8872 + at91_set_gpio_value(spi_sck_bit, is_on);
8873 +}
8874 +
8875 +static inline void setmosi(struct spi_device *spi, int is_on)
8876 +{
8877 + at91_set_gpio_value(spi_mosi_bit, is_on);
8878 +}
8879 +
8880 +static inline int getmiso(struct spi_device *spi)
8881 +{
8882 + return at91_get_gpio_value(spi_miso_bit);
8883 +}
8884 +
8885 +static void at91_spi_chipselect(struct spi_device *spi, int is_active)
8886 +{
8887 + unsigned long cs = (unsigned long) spi->controller_data;
8888 +
8889 + /* set default clock polarity */
8890 + if (is_active)
8891 + setsck(spi, spi->mode & SPI_CPOL);
8892 +
8893 + /* only support active-low (default) */
8894 + at91_set_gpio_value(cs, !is_active);
8895 +}
8896 +
8897 +/*
8898 + * NOTE: this is "as fast as we can"; it should be a function of
8899 + * the device clock ...
8900 + */
8901 +#define spidelay(X) do{} while(0)
8902 +
8903 +#define EXPAND_BITBANG_TXRX
8904 +#include <linux/spi/spi_bitbang.h>
8905 +
8906 +static u32 at91_spi_txrx_word_mode0(struct spi_device *spi,
8907 + unsigned nsecs, u32 word, u8 bits)
8908 +{
8909 + return bitbang_txrx_be_cpha0(spi, nsecs, 0, word, 8);
8910 +}
8911 +
8912 +static u32 at91_spi_txrx_word_mode1(struct spi_device *spi,
8913 + unsigned nsecs, u32 word, u8 bits)
8914 +{
8915 + return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, 8);
8916 +}
8917 +
8918 +static u32 at91_spi_txrx_word_mode2(struct spi_device *spi,
8919 + unsigned nsecs, u32 word, u8 bits)
8920 +{
8921 + return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, 8);
8922 +}
8923 +
8924 +static u32 at91_spi_txrx_word_mode3(struct spi_device *spi,
8925 + unsigned nsecs, u32 word, u8 bits)
8926 +{
8927 + return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, 8);
8928 +}
8929 +
8930 +/*----------------------------------------------------------------------*/
8931 +
8932 +static int __init at91_spi_probe(struct platform_device *pdev)
8933 +{
8934 + int status;
8935 + struct spi_master *master;
8936 + struct at91_spi *at91_spi;
8937 +
8938 + if (pdev->id != 0) /* SPI0 bus */
8939 + return -EINVAL;
8940 +
8941 + master = spi_alloc_master(&pdev->dev, sizeof *at91_spi);
8942 + if (!master)
8943 + return -ENOMEM;
8944 +
8945 + at91_spi = spi_master_get_devdata(master);
8946 + at91_spi->pdev = pdev;
8947 + platform_set_drvdata(pdev, at91_spi);
8948 +
8949 + /* SPI and bitbang hookup */
8950 + master->bus_num = 0;
8951 + master->num_chipselect = 4;
8952 +
8953 + at91_spi->bitbang.master = spi_master_get(master);
8954 + at91_spi->bitbang.chipselect = at91_spi_chipselect;
8955 + at91_spi->bitbang.txrx_word[SPI_MODE_0] = at91_spi_txrx_word_mode0;
8956 + at91_spi->bitbang.txrx_word[SPI_MODE_1] = at91_spi_txrx_word_mode1;
8957 + at91_spi->bitbang.txrx_word[SPI_MODE_2] = at91_spi_txrx_word_mode2;
8958 + at91_spi->bitbang.txrx_word[SPI_MODE_3] = at91_spi_txrx_word_mode3;
8959 +
8960 + status = spi_bitbang_start(&at91_spi->bitbang);
8961 + if (status < 0)
8962 + (void) spi_master_put(at91_spi->bitbang.master);
8963 +
8964 + return status;
8965 +}
8966 +
8967 +static int __exit at91_spi_remove(struct platform_device *pdev)
8968 +{
8969 + struct at91_spi *at91_spi = platform_get_drvdata(pdev);
8970 + int status;
8971 +
8972 + /* stop() unregisters child devices too */
8973 + status = spi_bitbang_stop(&at91_spi->bitbang);
8974 + (void) spi_master_put(at91_spi->bitbang.master);
8975 +
8976 + platform_set_drvdata(pdev, NULL);
8977 + return status;
8978 +}
8979 +
8980 +static struct platform_driver at91_spi_driver = {
8981 + .probe = at91_spi_probe,
8982 + .remove = __exit_p(at91_spi_remove),
8983 + .driver = {
8984 + .name = "at91_spi",
8985 + .owner = THIS_MODULE,
8986 + },
8987 +};
8988 +
8989 +static int __init at91_spi_init(void)
8990 +{
8991 + at91_set_gpio_output(spi_sck_bit, 0);
8992 + at91_set_gpio_output(spi_mosi_bit, 0);
8993 + at91_set_gpio_input(spi_miso_bit, 1 /* pullup */);
8994 +
8995 + /* register driver */
8996 + return platform_driver_register(&at91_spi_driver);
8997 +}
8998 +
8999 +static void __exit at91_spi_exit(void)
9000 +{
9001 + platform_driver_unregister(&at91_spi_driver);
9002 +}
9003 +
9004 +device_initcall(at91_spi_init);
9005 +module_exit(at91_spi_exit);
9006 +
9007 +MODULE_ALIAS("at91_spi.0");
9008 +
9009 +MODULE_DESCRIPTION("AT91 SPI support (BOOTSTRAP/BITBANG VERSION)");
9010 +MODULE_AUTHOR("David Brownell");
9011 +MODULE_LICENSE("GPL");
9012 diff -urN linux-2.6.22-rc5/drivers/usb/gadget/at91_udc.c linux-2.6.22-rc5.new/drivers/usb/gadget/at91_udc.c
9013 --- linux-2.6.22-rc5/drivers/usb/gadget/at91_udc.c 2007-06-17 04:09:12.000000000 +0200
9014 +++ linux-2.6.22-rc5.new/drivers/usb/gadget/at91_udc.c 2007-07-29 05:55:39.000000000 +0200
9015 @@ -1803,7 +1803,7 @@
9016 */
9017 if ((!udc->suspended && udc->addr)
9018 || !wake
9019 - || at91_suspend_entering_slow_clock()) {
9020 + || clk_must_disable(udc->fclk)) {
9021 pullup(udc, 0);
9022 wake = 0;
9023 } else
9024 diff -urN linux-2.6.22-rc5/drivers/usb/host/ohci-at91.c linux-2.6.22-rc5.new/drivers/usb/host/ohci-at91.c
9025 --- linux-2.6.22-rc5/drivers/usb/host/ohci-at91.c 2007-06-17 04:09:12.000000000 +0200
9026 +++ linux-2.6.22-rc5.new/drivers/usb/host/ohci-at91.c 2007-07-29 05:55:39.000000000 +0200
9027 @@ -299,7 +299,7 @@
9028 *
9029 * REVISIT: some boards will be able to turn VBUS off...
9030 */
9031 - if (at91_suspend_entering_slow_clock()) {
9032 + if (clk_must_disable(fclk)) {
9033 ohci_usb_reset (ohci);
9034 at91_stop_clock();
9035 }
9036 diff -urN linux-2.6.22-rc5/drivers/video/backlight/kb920x_bl.c linux-2.6.22-rc5.new/drivers/video/backlight/kb920x_bl.c
9037 --- linux-2.6.22-rc5/drivers/video/backlight/kb920x_bl.c 1970-01-01 01:00:00.000000000 +0100
9038 +++ linux-2.6.22-rc5.new/drivers/video/backlight/kb920x_bl.c 2007-07-29 05:55:39.000000000 +0200
9039 @@ -0,0 +1,164 @@
9040 +/*
9041 + * Backlight Driver for KB9202
9042 + *
9043 + * Copyright (c) 2006 KwikByte
9044 + *
9045 + * Based on Sharp's Corgi Backlight Driver
9046 + *
9047 + * This file is subject to the terms and conditions of the GNU General Public
9048 + * License. See the file "COPYING" in the main directory of this archive
9049 + * for more details.
9050 + */
9051 +
9052 +#include <linux/module.h>
9053 +#include <linux/kernel.h>
9054 +#include <linux/init.h>
9055 +#include <linux/platform_device.h>
9056 +#include <linux/spinlock.h>
9057 +#include <linux/fb.h>
9058 +#include <linux/backlight.h>
9059 +
9060 +#include <asm/arch/gpio.h>
9061 +
9062 +/* The backlight is on(1)/off(0) */
9063 +#define KB9202_DEFAULT_INTENSITY 1
9064 +#define KB9202_MAX_INTENSITY 1
9065 +
9066 +static int kb9202bl_suspended;
9067 +static int current_intensity = 0;
9068 +static DEFINE_SPINLOCK(bl_lock);
9069 +
9070 +static int kb9202bl_set_intensity(struct backlight_device *bd)
9071 +{
9072 + unsigned long flags;
9073 + int intensity = bd->props.brightness;
9074 +
9075 + if (bd->props.power != FB_BLANK_UNBLANK)
9076 + intensity = 0;
9077 + if (bd->props.fb_blank != FB_BLANK_UNBLANK)
9078 + intensity = 0;
9079 + if (kb9202bl_suspended)
9080 + intensity = 0;
9081 +
9082 + if ((!current_intensity) && (bd->props.power == FB_BLANK_UNBLANK))
9083 + intensity = 1;
9084 +
9085 + spin_lock_irqsave(&bl_lock, flags);
9086 + if (intensity)
9087 + gpio_set_value(AT91_PIN_PC23, 1);
9088 + else
9089 + gpio_set_value(AT91_PIN_PC23, 0);
9090 + spin_unlock_irqrestore(&bl_lock, flags);
9091 +
9092 + current_intensity = intensity;
9093 +
9094 + return 0;
9095 +}
9096 +
9097 +static int kb9202bl_get_intensity(struct backlight_device *bd)
9098 +{
9099 + return current_intensity;
9100 +}
9101 +
9102 +static struct backlight_ops kb9202bl_ops = {
9103 + .get_brightness = kb9202bl_get_intensity,
9104 + .update_status = kb9202bl_set_intensity,
9105 +};
9106 +
9107 +static int __init kb9202bl_probe(struct platform_device *pdev)
9108 +{
9109 + struct backlight_device *bd;
9110 +
9111 + bd = backlight_device_register ("kb9202-bl", &pdev->dev, NULL, &kb9202bl_ops);
9112 + if (IS_ERR(bd))
9113 + return PTR_ERR(bd);
9114 +
9115 + platform_set_drvdata(pdev, bd);
9116 +
9117 + bd->props.max_brightness = KB9202_MAX_INTENSITY;
9118 + bd->props.brightness = KB9202_DEFAULT_INTENSITY;
9119 + (void) kb9202bl_set_intensity(bd);
9120 +
9121 + return 0;
9122 +}
9123 +
9124 +static int kb9202bl_remove(struct platform_device *pdev)
9125 +{
9126 + struct backlight_device *bd = platform_get_drvdata(pdev);
9127 +
9128 + bd->props.brightness = 0;
9129 + bd->props.power = 0;
9130 + (void) kb9202bl_set_intensity(bd);
9131 +
9132 + backlight_device_unregister(bd);
9133 +
9134 + return 0;
9135 +}
9136 +
9137 +#ifdef CONFIG_PM
9138 +static int kb9202bl_suspend(struct platform_device *dev, pm_message_t state)
9139 +{
9140 + struct backlight_device *bd = platform_get_drvdata(pdev);
9141 +
9142 + kb9202bl_suspended = 1;
9143 + (void) kb9202bl_set_intensity(bd);
9144 + return 0;
9145 +}
9146 +
9147 +static int kb9202bl_resume(struct platform_device *dev)
9148 +{
9149 + struct backlight_device *bd = platform_get_drvdata(pdev);
9150 +
9151 + kb9202bl_suspended = 0;
9152 + (void) kb9202bl_set_intensity(bd);
9153 + return 0;
9154 +}
9155 +#else
9156 +#define kb9202bl_suspend NULL
9157 +#define kb9202bl_resume NULL
9158 +#endif
9159 +
9160 +static struct platform_driver kb9202bl_driver = {
9161 + .probe = kb9202bl_probe,
9162 + .remove = kb9202bl_remove,
9163 + .suspend = kb9202bl_suspend,
9164 + .resume = kb9202bl_resume,
9165 + .driver = {
9166 + .name = "kb9202-bl",
9167 + .owner = THIS_MODULE,
9168 + },
9169 +};
9170 +
9171 +static struct platform_device *kb9202bl_device;
9172 +
9173 +static int __init kb9202bl_init(void)
9174 +{
9175 + int ret;
9176 +
9177 + ret = platform_driver_register(&kb9202bl_driver);
9178 + if (!ret) {
9179 + kb9202bl_device = platform_device_alloc("kb9202-bl", -1);
9180 + if (!kb9202bl_device)
9181 + return -ENOMEM;
9182 +
9183 + ret = platform_device_add(kb9202bl_device);
9184 + if (ret) {
9185 + platform_device_put(kb9202bl_device);
9186 + platform_driver_unregister(&kb9202bl_driver);
9187 + }
9188 + }
9189 + return ret;
9190 +}
9191 +
9192 +static void __exit kb9202bl_exit(void)
9193 +{
9194 + platform_device_unregister(kb9202bl_device);
9195 + platform_driver_unregister(&kb9202bl_driver);
9196 +}
9197 +
9198 +module_init(kb9202bl_init);
9199 +module_exit(kb9202bl_exit);
9200 +
9201 +MODULE_AUTHOR("KwikByte <kb9200_dev@kwikbyte.com>");
9202 +MODULE_DESCRIPTION("KB9202 Backlight Driver");
9203 +MODULE_LICENSE("GPL");
9204 diff -urN linux-2.6.22-rc5/drivers/video/backlight/Kconfig linux-2.6.22-rc5.new/drivers/video/backlight/Kconfig
9205 --- linux-2.6.22-rc5/drivers/video/backlight/Kconfig 2007-06-17 04:09:12.000000000 +0200
9206 +++ linux-2.6.22-rc5.new/drivers/video/backlight/Kconfig 2007-07-29 05:55:39.000000000 +0200
9207 @@ -71,3 +71,11 @@
9208 help
9209 If you have a Intel LE80578 (Carillo Ranch) say Y to enable the
9210 backlight driver.
9211 +
9212 +config BACKLIGHT_KB920x
9213 + tristate "KwikByte KB9202 Backlight Driver"
9214 + depends on BACKLIGHT_CLASS_DEVICE && MACH_KB9200
9215 + default y
9216 + help
9217 + If you have a KwikByte KB9202 board, say Y to enable the
9218 + backlight driver.
9219 diff -urN linux-2.6.22-rc5/drivers/video/backlight/Makefile linux-2.6.22-rc5.new/drivers/video/backlight/Makefile
9220 --- linux-2.6.22-rc5/drivers/video/backlight/Makefile 2007-06-17 04:09:12.000000000 +0200
9221 +++ linux-2.6.22-rc5.new/drivers/video/backlight/Makefile 2007-07-29 05:55:39.000000000 +0200
9222 @@ -7,3 +7,4 @@
9223 obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
9224 obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
9225 obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
9226 +obj-$(CONFIG_BACKLIGHT_KB920x) += kb920x_bl.o
9227 diff -urN linux-2.6.22-rc5/drivers/video/Kconfig linux-2.6.22-rc5.new/drivers/video/Kconfig
9228 --- linux-2.6.22-rc5/drivers/video/Kconfig 2007-06-17 04:09:12.000000000 +0200
9229 +++ linux-2.6.22-rc5.new/drivers/video/Kconfig 2007-07-29 05:55:39.000000000 +0200
9230 @@ -822,6 +822,17 @@
9231 framebuffer. Product specs at
9232 <http://www.erd.epson.com/vdc/html/products.htm>.
9233
9234 +config FB_S1D15605
9235 + tristate "Epson S1D15605 framebuffer support"
9236 + depends on FB
9237 + default m if MACH_KB9200
9238 + select FB_CFB_FILLRECT
9239 + select FB_CFB_COPYAREA
9240 + select FB_CFB_IMAGEBLIT
9241 + help
9242 + Build in support for the S1D15605 Epson Research 128x64
9243 + LCD controller as a framebuffer.
9244 +
9245 config FB_S1D13XXX
9246 tristate "Epson S1D13XXX framebuffer support"
9247 depends on FB
9248 @@ -835,7 +846,7 @@
9249
9250 config FB_ATMEL
9251 tristate "AT91/AT32 LCD Controller support"
9252 - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || AVR32)
9253 + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || AVR32)
9254 select FB_CFB_FILLRECT
9255 select FB_CFB_COPYAREA
9256 select FB_CFB_IMAGEBLIT
9257 diff -urN linux-2.6.22-rc5/drivers/video/Makefile linux-2.6.22-rc5.new/drivers/video/Makefile
9258 --- linux-2.6.22-rc5/drivers/video/Makefile 2007-06-17 04:09:12.000000000 +0200
9259 +++ linux-2.6.22-rc5.new/drivers/video/Makefile 2007-07-29 05:55:39.000000000 +0200
9260 @@ -87,7 +87,8 @@
9261 obj-$(CONFIG_FB_SA1100) += sa1100fb.o
9262 obj-$(CONFIG_FB_HIT) += hitfb.o
9263 obj-$(CONFIG_FB_EPSON1355) += epson1355fb.o
9264 -obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o
9265 +obj-$(CONFIG_FB_S1D15605) += s1d15605fb.o
9266 +obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o
9267 obj-$(CONFIG_FB_PVR2) += pvr2fb.o
9268 obj-$(CONFIG_FB_VOODOO1) += sstfb.o
9269 obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o
9270 diff -urN linux-2.6.22-rc5/drivers/video/s1d15605fb.c linux-2.6.22-rc5.new/drivers/video/s1d15605fb.c
9271 --- linux-2.6.22-rc5/drivers/video/s1d15605fb.c 1970-01-01 01:00:00.000000000 +0100
9272 +++ linux-2.6.22-rc5.new/drivers/video/s1d15605fb.c 2007-07-29 05:55:39.000000000 +0200
9273 @@ -0,0 +1,659 @@
9274 +/*
9275 + * drivers/video/s1d15605.c
9276 + *
9277 + * Adapted from several sources including:
9278 + * 1) Driver for AT91 LCD Controller
9279 + * Copyright (C) 2006 Atmel
9280 + *
9281 + * 2) Copyright (C) 2005 S. Kevin Hester
9282 + *
9283 + * This file is subject to the terms and conditions of the GNU General Public
9284 + * License. See the file COPYING in the main directory of this archive for
9285 + * more details.
9286 + *
9287 + * This is a basic framebuffer driver for the Optrex F-51320 128x64 mono LCD
9288 + * display. This display uses a clone of the common Epson SED 1531 display
9289 + * controller.
9290 + *
9291 + * I've heavily borrowed code from the vfb.c driver.
9292 + *
9293 + * This program is free software; you can redistribute it and/or modify
9294 + * it under the terms of the GNU General Public License as published by
9295 + * the Free Software Foundation; either version 2 of the License, or
9296 + * (at your option) any later version.
9297 + *
9298 + * This program is distributed in the hope that it will be useful,
9299 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9300 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9301 + * GNU General Public License for more details.
9302 + *
9303 + * You should have received a copy of the GNU General Public License
9304 + * along with this program; if not, write to the Free Software
9305 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9306 + */
9307 +
9308 +#ifdef DEBUG
9309 +#define MSG(string, args...) printk("s1d15605fb:" string, ##args)
9310 +#else
9311 +#define MSG(string, args...)
9312 +#endif
9313 +
9314 +#include <linux/kernel.h>
9315 +#include <linux/platform_device.h>
9316 +#include <linux/dma-mapping.h>
9317 +#include <linux/interrupt.h>
9318 +#include <linux/clk.h>
9319 +#include <linux/fb.h>
9320 +#include <linux/init.h>
9321 +#include <linux/delay.h>
9322 +
9323 +#include <asm/uaccess.h>
9324 +
9325 +#include <asm/arch/board.h>
9326 +#include <asm/arch/gpio.h>
9327 +
9328 +#ifdef CONFIG_PMAC_BACKLIGHT
9329 +#include <asm/backlight.h>
9330 +#endif
9331 +
9332 +#define VIDEOWIDTH 128
9333 +#define VIDEOHEIGHT 64
9334 +#define VIDEODEPTH 1 /* bits/pixel */
9335 +#define VIDEOWIDTH_BYTES ((VIDEOWIDTH * VIDEODEPTH) / 8)
9336 +
9337 +/* The number of bytes that actually go to the device */
9338 +#define ACTUALVIDEOMEMSIZE (VIDEOWIDTH_BYTES * VIDEOHEIGHT)
9339 +#define VIDEOMEMSIZE PAGE_SIZE
9340 +
9341 +static struct fb_var_screeninfo s1d15605_default __initdata = {
9342 + .xres = VIDEOWIDTH,
9343 + .yres = VIDEOHEIGHT,
9344 + .xres_virtual = VIDEOWIDTH,
9345 + .yres_virtual = VIDEOHEIGHT,
9346 + .bits_per_pixel = VIDEODEPTH,
9347 + .red = { 0, 1, 0 },
9348 + .green = { 0, 1, 0 },
9349 + .blue = { 0, 1, 0 },
9350 + .activate = FB_ACTIVATE_NOW,
9351 + .pixclock = 20000,
9352 + .vmode = FB_VMODE_NONINTERLACED,
9353 +};
9354 +
9355 +static struct fb_fix_screeninfo s1d15605_fix __initdata = {
9356 + .id = "s1d15605",
9357 + .type = FB_TYPE_PACKED_PIXELS,
9358 + .visual = FB_VISUAL_MONO10,
9359 + .xpanstep = 0,
9360 + .ypanstep = 0,
9361 + .ywrapstep = 0,
9362 + .accel = FB_ACCEL_NONE,
9363 +};
9364 +
9365 +struct s1d15605fb_info {
9366 + struct fb_info *info;
9367 + char *mmio;
9368 + unsigned long reset_pin;
9369 + struct platform_device *pdev;
9370 +};
9371 +
9372 +/*
9373 + * LCD device interface
9374 + */
9375 +#define RESET_DISPLAY 0xE2
9376 +#define LCD_BIAS_1_9 0xA2
9377 +#define ADC_SELECT_REVERSE 0xA1
9378 +#define COMMON_OUTPUT_NORMAL 0xC0
9379 +#define V5_RESISTOR_RATIO 0x26
9380 +#define ELECTRONIC_VOLUME_SET 0x81
9381 +#define ELECTRONIC_VOLUME_INIT 0x20
9382 +#define POWER_CONTROL_SET 0x28
9383 +#define VOLTAGE_REGULATOR 0x02
9384 +#define VOLTAGE_FOLLOWER 0x01
9385 +#define BOOSTER_CIRCUIT 0x04
9386 +#define DISPLAY_ON 0xAF
9387 +#define START_LINE_SET 0x40
9388 +#define PAGE_ADDRESS_SET 0xB0
9389 +#define COLUMN_ADDRESS_HIGH 0x10
9390 +#define COLUMN_ADDRESS_LOW 0x00
9391 +#define RESISTOR_RATIO_START 0x20
9392 +
9393 +#define NUM_OF_PAGES 8
9394 +#define NUM_OF_COLUMNS 128
9395 +
9396 +#define WRITE_COMMAND(x) __raw_writeb((x), (sinfo)->mmio)
9397 +#define READ_COMMAND __raw_readb((sinfo)->mmio)
9398 +#define WRITE_DATA(x) __raw_writeb((x), (sinfo)->mmio + (0x10000))
9399 +#define READ_DATA __raw_readb((sinfo)->mmio + (0x10000))
9400 +
9401 +
9402 +/*
9403 + * s1d15605fb_resize_framebuffer
9404 + *
9405 + * Free allocated space if different. Allocate on new of changed.
9406 + * Returns -ENOMEM if the new framebuffer can not be allocated,
9407 + * zero on success.
9408 + */
9409 +static int s1d15605fb_resize_framebuffer(struct s1d15605fb_info *sinfo)
9410 +{
9411 + struct fb_info *info = sinfo->info;
9412 + struct fb_fix_screeninfo *fix = &info->fix;
9413 + struct fb_var_screeninfo *var = &info->var;
9414 + unsigned int new_size;
9415 + void *new_vaddr;
9416 +
9417 + new_size = ((var->xres_virtual * var->yres_virtual * var->bits_per_pixel) / 8);
9418 +
9419 + MSG("%s: x (%d) y (%d) bpp (%d): new size 0x%08x\n", __FUNCTION__,
9420 + var->xres_virtual, var->yres_virtual, var->bits_per_pixel, new_size);
9421 +
9422 + if (new_size == fix->smem_len)
9423 + return 0;
9424 +
9425 + if (fix->smem_len) {
9426 + kfree(info->screen_base);
9427 + }
9428 +
9429 + new_vaddr = kmalloc(new_size, GFP_KERNEL);
9430 +
9431 + if (!new_vaddr) {
9432 + fix->smem_len = 0;
9433 + return -ENOMEM;
9434 + }
9435 +
9436 + info->screen_base = new_vaddr;
9437 + fix->smem_start = (unsigned)new_vaddr;
9438 + fix->smem_len = new_size;
9439 + fix->line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
9440 +
9441 + dev_info(info->device,
9442 + "%luKiB frame buffer at %08lx (mapped at %p)\n",
9443 + (unsigned long)info->fix.smem_len / 1024,
9444 + (unsigned long)info->fix.smem_start,
9445 + info->screen_base);
9446 +
9447 + return 0;
9448 +}
9449 +
9450 +
9451 +/*
9452 + * The s1d15605 seems to be divided into eight 128 pixel wide pages (from top to
9453 + * bottom) each page seems to be eight pixels high, where these eight pixels are
9454 + * one byte
9455 + */
9456 +static void s1d15605_update(struct fb_info *info)
9457 +{
9458 + struct s1d15605fb_info *sinfo = info->par;
9459 + int page, i, row, colmask;
9460 + u8 retVal, *rowPtr;
9461 +
9462 + WRITE_COMMAND(START_LINE_SET);
9463 + for (page = 0; page < NUM_OF_PAGES; ++page) {
9464 + WRITE_COMMAND(PAGE_ADDRESS_SET + page);
9465 + WRITE_COMMAND(COLUMN_ADDRESS_HIGH);
9466 + WRITE_COMMAND(COLUMN_ADDRESS_LOW);
9467 +
9468 + for (i = 0; i < NUM_OF_COLUMNS; ++i)
9469 + {
9470 + /* point of opportunity: optimization */
9471 + colmask = (1 << (i & 0x7));
9472 + rowPtr = (u8*)(info->screen_base);
9473 + rowPtr += (VIDEOWIDTH_BYTES * 8 * page);
9474 + rowPtr += (i >> 3);
9475 + retVal = 0;
9476 + for (row = 0; row < 8; ++row)
9477 + {
9478 + retVal = (retVal >> 1) | (((*rowPtr) & colmask) ? 0x80 : 0);
9479 + rowPtr += VIDEOWIDTH_BYTES;
9480 + }
9481 + WRITE_DATA(retVal);
9482 + }
9483 + }
9484 +
9485 + WRITE_COMMAND(DISPLAY_ON);
9486 +}
9487 +
9488 +
9489 +/*
9490 + * Setting the video mode has been split into two parts.
9491 + * First part, xxxfb_check_var, must not write anything
9492 + * to hardware, it should only verify and adjust var.
9493 + * This means it doesn't alter par but it does use hardware
9494 + * data from it to check this var.
9495 + */
9496 +static int s1d15605_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
9497 +{
9498 + /*
9499 + * Some very basic checks
9500 + */
9501 + if (!var->xres)
9502 + var->xres = 1;
9503 + if (!var->yres)
9504 + var->yres = 1;
9505 + if (var->xres > var->xres_virtual)
9506 + var->xres_virtual = var->xres;
9507 + if (var->yres > var->yres_virtual)
9508 + var->yres_virtual = var->yres;
9509 +
9510 + if(var->bits_per_pixel > VIDEODEPTH)
9511 + return -EINVAL;
9512 +
9513 + /*
9514 + * Memory limit
9515 + */
9516 + if (((var->yres_virtual * var->bits_per_pixel * var->yres_virtual) >> 3) >
9517 + ACTUALVIDEOMEMSIZE)
9518 + return -ENOMEM;
9519 +
9520 + /*
9521 + * Now that we checked it we alter var. The reason being is that the video
9522 + * mode passed in might not work but slight changes to it might make it
9523 + * work. This way we let the user know what is acceptable.
9524 + */
9525 + switch (var->bits_per_pixel) {
9526 + case 1:
9527 + var->red.offset = var->green.offset = var->blue.offset = 0;
9528 + var->red.length = var->green.length = var->blue.length
9529 + = var->bits_per_pixel;
9530 + break;
9531 + default:
9532 + return -EINVAL;
9533 + }
9534 +
9535 + var->xoffset = var->yoffset = 0;
9536 + var->red.msb_right = var->green.msb_right = var->blue.msb_right =
9537 + var->transp.msb_right = 0;
9538 +
9539 + return 0;
9540 +}
9541 +
9542 +
9543 +/*
9544 + * This routine actually sets the video mode. It's in here where we
9545 + * the hardware state info->par and fix which can be affected by the
9546 + * change in par. For this driver it doesn't do much.
9547 + */
9548 +static int s1d15605_set_par(struct fb_info *info)
9549 +{
9550 + int ret;
9551 +
9552 + MSG("%s:\n", __func__);
9553 + MSG(" * resolution: %ux%u (%ux%u virtual)\n",
9554 + info->var.xres, info->var.yres,
9555 + info->var.xres_virtual, info->var.yres_virtual);
9556 +
9557 + ret = s1d15605fb_resize_framebuffer(info->par);
9558 +
9559 + info->fix.visual = FB_VISUAL_MONO10;
9560 + return ret;
9561 +}
9562 +
9563 +
9564 +/*
9565 + * Set a single color register. The values supplied are already
9566 + * rounded down to the hardware's capabilities (according to the
9567 + * entries in the var structure). Return != 0 for invalid regno.
9568 + */
9569 +static int s1d15605_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
9570 + u_int transp, struct fb_info *info)
9571 +{
9572 + if (regno > 1) /* no. of hw registers - we only do mono now */
9573 + return 1;
9574 +
9575 + return 0;
9576 +}
9577 +
9578 +
9579 +/*
9580 + * Currently, the routine will simply shut-off the backlight and prevent
9581 + * updates/refreshes. Modify according to application.
9582 + *
9583 + * 0 unblank, 1 blank, 2 no vsync, 3 no hsync, 4 off
9584 + */
9585 +static int s1d15605_blank(int blank, struct fb_info *info)
9586 +{
9587 +#ifdef CONFIG_PMAC_BACKLIGHT
9588 + if (blank)
9589 + pmac_backlight->props.power = FB_BLANK_POWERDOWN;
9590 + else
9591 + pmac_backlight->props.power = FB_BLANK_UNBLANK;
9592 + backlight_update_status(pmac_backlight);
9593 +#endif
9594 + return 1;
9595 +}
9596 +
9597 +
9598 +/*
9599 + * Pan or Wrap the Display
9600 + *
9601 + * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
9602 + */
9603 +/*
9604 +static int s1d15605_pan_display(struct fb_var_screeninfo *var,
9605 + struct fb_info *info)
9606 +{
9607 + if (var->vmode & FB_VMODE_YWRAP) {
9608 + if (var->yoffset < 0
9609 + || var->yoffset >= info->var.yres_virtual
9610 + || var->xoffset)
9611 + return -EINVAL;
9612 + } else {
9613 + if (var->xoffset + var->xres > info->var.xres_virtual ||
9614 + var->yoffset + var->yres > info->var.yres_virtual)
9615 + return -EINVAL;
9616 + }
9617 + info->var.xoffset = var->xoffset;
9618 + info->var.yoffset = var->yoffset;
9619 + if (var->vmode & FB_VMODE_YWRAP)
9620 + info->var.vmode |= FB_VMODE_YWRAP;
9621 + else
9622 + info->var.vmode &= ~FB_VMODE_YWRAP;
9623 + return 0;
9624 +}
9625 +*/
9626 +
9627 +
9628 +static void s1d15605_copyarea(struct fb_info *info, const struct fb_copyarea *region)
9629 +{
9630 + cfb_copyarea(info, region);
9631 + s1d15605_update(info);
9632 +}
9633 +
9634 +
9635 +static void s1d15605_fillrect (struct fb_info *info, const struct fb_fillrect *rect)
9636 +{
9637 + cfb_fillrect(info, rect);
9638 + s1d15605_update(info);
9639 +}
9640 +
9641 +
9642 +static void s1d15605_imageblit(struct fb_info *p, const struct fb_image *image)
9643 +{
9644 + cfb_imageblit(p, image);
9645 + s1d15605_update(p);
9646 +}
9647 +
9648 +
9649 +/*
9650 + * Write the users data to our framebuffer, and then trigger a psuedo DMA
9651 + */
9652 +static ssize_t s1d15605_write(struct file *file, const char *buf,
9653 + size_t count, loff_t *ppos)
9654 +{
9655 + unsigned long p = *ppos;
9656 + struct inode *inode = file->f_dentry->d_inode;
9657 + int fbidx = iminor(inode);
9658 + struct fb_info *info = registered_fb[fbidx];
9659 + int err;
9660 +
9661 + if (p > info->fix.smem_len)
9662 + return -ENOSPC;
9663 + if (count >= info->fix.smem_len)
9664 + count = info->fix.smem_len;
9665 + err = 0;
9666 + if (count + p > info->fix.smem_len) {
9667 + count = info->fix.smem_len - p;
9668 + err = -ENOSPC;
9669 + }
9670 + if (count) {
9671 + char *base_addr;
9672 +
9673 + base_addr = info->screen_base;
9674 + count -= copy_from_user(base_addr+p, buf, count);
9675 + *ppos += count;
9676 + err = -EFAULT;
9677 + }
9678 +
9679 + s1d15605_update(info);
9680 +
9681 + if (count)
9682 + return count;
9683 +
9684 + return err;
9685 +}
9686 +
9687 +#ifdef USE_PRIVATE_VMA_FXS
9688 +static void s1d15605_vma_open(struct vm_area_struct *vma)
9689 +{
9690 + // FIXME - store stats in the device data via vm_private_data
9691 +}
9692 +
9693 +
9694 +static void s1d15605_vma_close(struct vm_area_struct *vma)
9695 +{
9696 + // FIXME - store stats in the device data via vm_private_data
9697 +}
9698 +
9699 +
9700 +static struct page *s1d15605_vma_nopage(struct vm_area_struct *vma,
9701 + unsigned long address, int *type)
9702 +{
9703 + struct page *page;
9704 + struct fb_info *info = vma->vm_private_data;
9705 +
9706 + page = virt_to_page(info->screen_base);
9707 + get_page(page);
9708 +
9709 + // FIXME - now someone has a link to our page, start periodically blitting
9710 + // latest updates to the actual device.
9711 +
9712 + return page;
9713 +}
9714 +
9715 +
9716 +static struct vm_operations_struct s1d15605_vm_ops = {
9717 + .open = s1d15605_vma_open,
9718 + .close = s1d15605_vma_close,
9719 + .nopage = s1d15605_vma_nopage
9720 +};
9721 +
9722 +
9723 +/* We don't do much here - because we have special vm_ops */
9724 +static int s1d15605_mmap(struct fb_info *info, struct vm_area_struct *vma)
9725 +{
9726 + vma->vm_ops = &s1d15605_vm_ops;
9727 + vma->vm_flags |= VM_RESERVED;
9728 + vma->vm_private_data = info;
9729 + s1d15605_vma_open(vma);
9730 +
9731 + return 0;
9732 +}
9733 +#endif /* USE_PRIVATE_VMA_FXS */
9734 +
9735 +
9736 +static struct fb_ops s1d15605fb_ops = {
9737 + .owner = THIS_MODULE,
9738 + .fb_check_var = s1d15605_check_var,
9739 + .fb_set_par = s1d15605_set_par,
9740 + .fb_setcolreg = s1d15605_setcolreg,
9741 + .fb_blank = s1d15605_blank,
9742 +// .fb_pan_display = s1d15605_pan_display,
9743 + .fb_fillrect = s1d15605_fillrect,
9744 + .fb_copyarea = s1d15605_copyarea,
9745 + .fb_imageblit = s1d15605_imageblit,
9746 + .fb_write = s1d15605_write,
9747 +#ifdef USE_PRIVATE_VMA_FXS
9748 + .fb_mmap = s1d15605_mmap,
9749 +#endif
9750 +};
9751 +
9752 +
9753 +static void s1d15605_device_init(struct s1d15605fb_info *sinfo) {
9754 +
9755 + char value;
9756 +
9757 + /* release the reset line by reading the device - proto hardware */
9758 + value = READ_COMMAND;
9759 + value = READ_COMMAND;
9760 +
9761 +#ifdef CONFIG_MACH_KB9200
9762 + /* new boards have dedicated reset line */
9763 + gpio_set_value(sinfo->reset_pin, 1);
9764 +#endif
9765 +
9766 + /* initialize the device within 5ms */
9767 + WRITE_COMMAND(RESET_DISPLAY);
9768 + WRITE_COMMAND(LCD_BIAS_1_9);
9769 + WRITE_COMMAND(ADC_SELECT_REVERSE);
9770 + WRITE_COMMAND(COMMON_OUTPUT_NORMAL);
9771 + WRITE_COMMAND(V5_RESISTOR_RATIO);
9772 + WRITE_COMMAND(ELECTRONIC_VOLUME_SET);
9773 + WRITE_COMMAND(ELECTRONIC_VOLUME_INIT);
9774 + WRITE_COMMAND(POWER_CONTROL_SET | VOLTAGE_REGULATOR | VOLTAGE_FOLLOWER | BOOSTER_CIRCUIT);
9775 + WRITE_COMMAND(DISPLAY_ON);
9776 +
9777 + WRITE_COMMAND(RESISTOR_RATIO_START + 4);
9778 + WRITE_COMMAND(ELECTRONIC_VOLUME_SET);
9779 + WRITE_COMMAND(0x33);
9780 +}
9781 +
9782 +
9783 +static int s1d15605fb_probe(struct platform_device *pdev)
9784 +{
9785 + struct device *dev = &pdev->dev;
9786 + struct fb_info *info;
9787 + struct s1d15605fb_info *sinfo;
9788 + int ret;
9789 +
9790 + MSG("%s\n", __func__);
9791 +
9792 + if (!(info = framebuffer_alloc(sizeof(struct s1d15605fb_info), dev))) {
9793 + dev_err(dev, "Cannot allocate framebuffer struct\n");
9794 + return -ENOMEM;
9795 + }
9796 +
9797 + sinfo = info->par;
9798 + sinfo->info = info;
9799 + sinfo->pdev = pdev;
9800 +
9801 + if (pdev->num_resources < 2) {
9802 + dev_err(dev, "Resources unusable\n");
9803 + ret = -ENODEV;
9804 + goto free_info;
9805 + }
9806 +
9807 + info->fbops = &s1d15605fb_ops;
9808 + strcpy(info->fix.id, pdev->name);
9809 +
9810 + info->fix.mmio_start = pdev->resource[0].start;
9811 + info->fix.mmio_len = pdev->resource[0].end - pdev->resource[0].start + 1;
9812 + sinfo->reset_pin = pdev->resource[1].start;
9813 +
9814 + ret = s1d15605fb_resize_framebuffer(sinfo);
9815 + if (ret < 0) {
9816 + dev_err(dev, "Cannot resize framebuffer: %d\n", ret);
9817 + goto free_fb;
9818 + }
9819 +
9820 + if (!request_mem_region(info->fix.mmio_start,
9821 + info->fix.mmio_len, pdev->name)) {
9822 + ret = -EBUSY;
9823 + goto free_fb;
9824 + }
9825 +
9826 + sinfo->mmio = ioremap(info->fix.mmio_start, info->fix.mmio_len);
9827 + if (!sinfo->mmio) {
9828 + dev_err(dev, "Cannot map LCD memory region\n");
9829 + goto release_mem;
9830 + }
9831 +
9832 + s1d15605_device_init(sinfo);
9833 +
9834 + ret = fb_find_mode(&info->var, info, NULL, NULL, 0, NULL, 1);
9835 +
9836 + if (!ret || (ret == 4))
9837 + info->var = s1d15605_default;
9838 +
9839 + info->fix = s1d15605_fix;
9840 + info->flags = FBINFO_FLAG_DEFAULT |
9841 +/* FBINFO_HWACCEL_YPAN | */
9842 + FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
9843 +
9844 + ret = register_framebuffer(info);
9845 + if (ret < 0) {
9846 + dev_err(dev, "Failed to register framebuffer device: %d\n", ret);
9847 + goto unmap_mmio;
9848 + }
9849 +
9850 + dev_set_drvdata(dev, info);
9851 +
9852 + memset(info->screen_base, 0, info->fix.smem_len);
9853 + info->var.activate |= FB_ACTIVATE_NOW;
9854 + ret = fb_set_var(info, &info->var);
9855 + if (ret) {
9856 + dev_warn(dev, "Unable to set display parameters\n");
9857 + }
9858 +
9859 + info->var.activate &= ~(FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW);
9860 +
9861 + dev_dbg(dev, "%s SUCCESS\n", __func__);
9862 +
9863 + dev_info(dev, "Driver $Revision: 1.1 $\n");
9864 +
9865 + return 0;
9866 +
9867 +unmap_mmio:
9868 + iounmap(sinfo->mmio);
9869 +release_mem:
9870 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9871 +free_fb:
9872 + kfree(info->screen_base);
9873 +
9874 +free_info:
9875 + framebuffer_release(info);
9876 +
9877 + dev_dbg(dev, "%s FAILED\n", __func__);
9878 + return ret;
9879 +}
9880 +
9881 +
9882 +static int s1d15605fb_remove(struct platform_device *pdev)
9883 +{
9884 + struct device *dev = &pdev->dev;
9885 + struct fb_info *info = dev_get_drvdata(dev);
9886 + struct s1d15605fb_info *sinfo = info->par;
9887 +
9888 + if (!sinfo)
9889 + return 0;
9890 +
9891 + unregister_framebuffer(info);
9892 +
9893 + iounmap(sinfo->mmio);
9894 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9895 +
9896 + kfree(info->screen_base);
9897 +
9898 + dev_set_drvdata(dev, NULL);
9899 + framebuffer_release(info);
9900 + return 0;
9901 +}
9902 +
9903 +
9904 +static struct platform_driver s1d15605fb_driver = {
9905 + .probe = s1d15605fb_probe,
9906 + .remove = s1d15605fb_remove,
9907 + .driver = {
9908 + .name = "s1d15605fb",
9909 + .owner = THIS_MODULE,
9910 + },
9911 +};
9912 +
9913 +
9914 +static int __init s1d15605fb_init(void)
9915 +{
9916 + return platform_driver_register(&s1d15605fb_driver);
9917 +}
9918 +
9919 +
9920 +static void __exit s1d15605fb_exit(void)
9921 +{
9922 + platform_driver_unregister(&s1d15605fb_driver);
9923 +}
9924 +
9925 +
9926 +module_init(s1d15605fb_init);
9927 +module_exit(s1d15605fb_exit);
9928 +
9929 +
9930 +MODULE_AUTHOR("KwikByte");
9931 +MODULE_DESCRIPTION("Epson S1D15605 LCD Controller framebuffer driver");
9932 +MODULE_LICENSE("GPL");
This page took 0.411784 seconds and 5 git commands to generate.