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