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
9 + @ Promwad Chub : 1181
10 + mov r3, #(MACH_TYPE_CHUB & 0xff)
11 + orr r3, r3, #(MACH_TYPE_CHUB & 0xff00)
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
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
31 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
32 +CONFIG_GENERIC_GPIO=y
33 # CONFIG_GENERIC_TIME is not set
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
46 CONFIG_VECTORS_BASE=0xffff0000
47 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
49 @@ -31,13 +37,16 @@ CONFIG_LOCALVERSION=""
50 # CONFIG_SWAP is not set
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
66 @@ -76,7 +85,9 @@ CONFIG_KMOD=y
70 +# CONFIG_LBD is not set
71 # CONFIG_BLK_DEV_IO_TRACE is not set
72 +# CONFIG_LSF is not set
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
96 +# AT91SAM9260 Variants
98 +# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
101 -# AT91SAM9260 Board Type
102 +# AT91SAM9260 / AT91SAM9XE Board Type
104 CONFIG_MACH_AT91SAM9260EK=y
109 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
110 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
113 # AT91 Feature Selections
115 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
116 +# CONFIG_ATMEL_TCLIB is not set
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
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
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
143 # Floating point emulation
144 @@ -228,7 +252,6 @@ CONFIG_BINFMT_ELF=y
145 # Power management options
147 # CONFIG_PM is not set
148 -# CONFIG_APM is not set
152 @@ -242,9 +265,6 @@ CONFIG_NET=y
154 # CONFIG_PACKET_MMAP is not set
157 -# CONFIG_XFRM_USER is not set
158 -# CONFIG_XFRM_SUB_POLICY is not set
159 # CONFIG_NET_KEY is not set
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
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
189 @@ -348,6 +370,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
191 # Plug and Play support
193 +# CONFIG_PNPACPI is not set
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
205 @@ -369,6 +391,7 @@ CONFIG_BLK_DEV_INITRD=y
207 # CONFIG_RAID_ATTRS is not set
209 +# CONFIG_SCSI_TGT is not set
210 # CONFIG_SCSI_NETLINK is not set
211 CONFIG_SCSI_PROC_FS=y
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
221 @@ -405,6 +429,11 @@ CONFIG_SCSI_MULTI_LUN=y
222 # CONFIG_SCSI_DEBUG is not set
225 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
227 +# CONFIG_ATA is not set
230 # Multi-device support (RAID and LVM)
232 # CONFIG_MD is not set
233 @@ -425,7 +454,51 @@ CONFIG_SCSI_MULTI_LUN=y
235 # Network device support
237 -# CONFIG_NETDEVICES is not set
239 +# CONFIG_DUMMY is not set
240 +# CONFIG_BONDING is not set
241 +# CONFIG_EQUALIZER is not set
242 +# CONFIG_TUN is not set
245 +# PHY device support
247 +# CONFIG_PHYLIB is not set
250 +# Ethernet (10 or 100Mbit)
252 +CONFIG_NET_ETHERNET=y
255 +# CONFIG_SMC91X is not set
256 +# CONFIG_DM9000 is not set
259 +# Ethernet (1000 Mbit)
263 +# Ethernet (10000 Mbit)
267 +# Token Ring devices
271 +# Wireless LAN (non-hamradio)
273 +# CONFIG_NET_RADIO is not set
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
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
292 -# Ftape, the floppy tape device driver
294 # CONFIG_RAW_DRIVER is not set
297 @@ -553,7 +622,11 @@ CONFIG_HW_RANDOM=y
301 -# CONFIG_TIFM_CORE is not set
304 +# Multifunction device drivers
306 +# CONFIG_MFD_SM501 is not set
310 @@ -582,7 +655,7 @@ CONFIG_HW_RANDOM=y
314 -# CONFIG_FIRMWARE_EDID is not set
315 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
316 # CONFIG_FB is not set
319 @@ -590,7 +663,6 @@ CONFIG_HW_RANDOM=y
321 # CONFIG_VGA_CONSOLE is not set
322 CONFIG_DUMMY_CONSOLE=y
323 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
327 @@ -598,6 +670,12 @@ CONFIG_DUMMY_CONSOLE=y
328 # CONFIG_SOUND is not set
334 +# CONFIG_HID_DEBUG is not set
339 CONFIG_USB_ARCH_HAS_HCD=y
340 @@ -610,7 +688,6 @@ CONFIG_USB=y
341 # Miscellaneous USB options
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
348 @@ -619,7 +696,8 @@ CONFIG_USB_DEVICEFS=y
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
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
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
382 @@ -889,6 +970,11 @@ CONFIG_NLS_ISO8859_1=y
383 # CONFIG_NLS_UTF8 is not set
386 +# Distributed Lock Manager
388 +# CONFIG_DLM is not set
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
426 # CONFIG_DEBUG_ERRORS is not set
428 @@ -941,9 +1029,12 @@ CONFIG_DEBUG_LL=y
433 # CONFIG_CRC_CCITT is not set
434 # CONFIG_CRC16 is not set
436 # CONFIG_LIBCRC32C is not set
437 CONFIG_ZLIB_INFLATE=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
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
454 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
455 +CONFIG_GENERIC_GPIO=y
456 # CONFIG_GENERIC_TIME is not set
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
469 CONFIG_VECTORS_BASE=0xffff0000
470 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
472 @@ -31,13 +37,16 @@ CONFIG_LOCALVERSION=""
473 # CONFIG_SWAP is not set
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
489 @@ -76,7 +85,9 @@ CONFIG_KMOD=y
493 +# CONFIG_LBD is not set
494 # CONFIG_BLK_DEV_IO_TRACE is not set
495 +# CONFIG_LSF is not set
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
519 # AT91SAM9261 Board Type
520 @@ -138,12 +152,14 @@ CONFIG_MACH_AT91SAM9261EK=y
524 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
525 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
528 # AT91 Feature Selections
530 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
531 +# CONFIG_ATMEL_TCLIB is not set
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
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
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
558 # Floating point emulation
559 @@ -228,7 +247,6 @@ CONFIG_BINFMT_ELF=y
560 # Power management options
562 # CONFIG_PM is not set
563 -# CONFIG_APM is not set
567 @@ -245,6 +263,7 @@ CONFIG_UNIX=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
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
591 @@ -350,6 +371,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
592 # User Modules And Translation Layers
594 # CONFIG_MTD_CHAR is not set
595 +CONFIG_MTD_BLKDEVS=y
597 # CONFIG_FTL is not set
598 # CONFIG_NFTL is not set
599 @@ -386,6 +408,8 @@ CONFIG_MTD_CFI_I2=y
601 # Self-contained MTD device drivers
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
610 # Plug and Play support
612 +# CONFIG_PNPACPI is not set
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
624 @@ -443,6 +467,7 @@ CONFIG_BLK_DEV_INITRD=y
626 # CONFIG_RAID_ATTRS is not set
628 +# CONFIG_SCSI_TGT is not set
629 # CONFIG_SCSI_NETLINK is not set
630 CONFIG_SCSI_PROC_FS=y
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
640 @@ -479,6 +505,11 @@ CONFIG_SCSI_MULTI_LUN=y
641 # CONFIG_SCSI_DEBUG is not set
644 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
646 +# CONFIG_ATA is not set
649 # Multi-device support (RAID and LVM)
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
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
676 -# Ftape, the floppy tape device driver
678 # CONFIG_RAW_DRIVER is not set
681 @@ -662,6 +698,7 @@ CONFIG_I2C_CHARDEV=y
682 # I2C Hardware Bus support
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
693 -# CONFIG_SPI is not set
694 -# CONFIG_SPI_MASTER is not set
696 +# CONFIG_SPI_DEBUG is not set
700 +# SPI Master Controller Drivers
703 +# CONFIG_SPI_BITBANG is not set
706 +# SPI Protocol Masters
708 +# CONFIG_SPI_AT25 is not set
711 # Dallas's 1-wire bus
712 @@ -703,7 +752,11 @@ CONFIG_I2C_AT91=y
716 -# CONFIG_TIFM_CORE is not set
719 +# Multifunction device drivers
721 +# CONFIG_MFD_SM501 is not set
725 @@ -732,7 +785,7 @@ CONFIG_I2C_AT91=y
729 -# CONFIG_FIRMWARE_EDID is not set
730 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
731 # CONFIG_FB is not set
734 @@ -740,7 +793,6 @@ CONFIG_I2C_AT91=y
736 # CONFIG_VGA_CONSOLE is not set
737 CONFIG_DUMMY_CONSOLE=y
738 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
742 @@ -748,6 +800,12 @@ CONFIG_DUMMY_CONSOLE=y
743 # CONFIG_SOUND is not set
749 +# CONFIG_HID_DEBUG is not set
754 CONFIG_USB_ARCH_HAS_HCD=y
755 @@ -760,7 +818,6 @@ CONFIG_USB=y
756 # Miscellaneous USB options
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
763 @@ -769,7 +826,8 @@ CONFIG_USB_DEVICEFS=y
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
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
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
797 @@ -903,7 +964,6 @@ CONFIG_MMC=y
798 # CONFIG_MMC_DEBUG is not set
801 -# CONFIG_MMC_TIFM_SD is not set
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
812 # CONFIG_VXFS_FS is not set
813 @@ -1045,6 +1104,11 @@ CONFIG_NLS_ISO8859_1=y
814 # CONFIG_NLS_UTF8 is not set
817 +# Distributed Lock Manager
819 +# CONFIG_DLM is not set
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
857 # CONFIG_DEBUG_ERRORS is not set
859 @@ -1097,9 +1163,12 @@ CONFIG_DEBUG_LL=y
864 # CONFIG_CRC_CCITT is not set
865 # CONFIG_CRC16 is not set
867 # CONFIG_LIBCRC32C is not set
868 CONFIG_ZLIB_INFLATE=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
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
885 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
886 +CONFIG_GENERIC_GPIO=y
887 # CONFIG_GENERIC_TIME is not set
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
898 CONFIG_VECTORS_BASE=0xffff0000
899 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
901 @@ -33,6 +37,7 @@ CONFIG_LOCALVERSION=""
902 # CONFIG_SWAP is not set
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
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
928 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
929 +# CONFIG_ATMEL_TCLIB is not set
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
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
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
956 # Floating point emulation
957 @@ -236,7 +247,6 @@ CONFIG_BINFMT_ELF=y
958 # Power management options
960 # CONFIG_PM is not set
961 -# CONFIG_APM is not set
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
973 @@ -430,6 +441,7 @@ CONFIG_MTD_NAND_AT91=y
975 # Plug and Play support
977 +# CONFIG_PNPACPI is not set
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
989 @@ -531,6 +542,7 @@ CONFIG_NETDEVICES=y
991 CONFIG_NET_ETHERNET=y
994 # CONFIG_SMC91X is not set
995 # CONFIG_DM9000 is not set
997 @@ -685,6 +697,7 @@ CONFIG_I2C_CHARDEV=y
998 # I2C Hardware Bus support
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
1007 # SPI Protocol Masters
1009 +# CONFIG_SPI_AT25 is not set
1012 # Dallas's 1-wire bus
1013 @@ -737,7 +751,11 @@ CONFIG_SPI_ATMEL=y
1017 -# CONFIG_TIFM_CORE is not set
1020 +# Multifunction device drivers
1022 +# CONFIG_MFD_SM501 is not set
1026 @@ -766,15 +784,23 @@ CONFIG_SPI_ATMEL=y
1030 -# CONFIG_FIRMWARE_EDID is not set
1031 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
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
1045 +# Frame buffer hardware drivers
1047 +# CONFIG_FB_S1D15605 is not set
1048 # CONFIG_FB_S1D13XXX is not set
1049 # CONFIG_FB_VIRTUAL is not set
1051 @@ -789,7 +815,6 @@ CONFIG_DUMMY_CONSOLE=y
1052 # Logo configuration
1054 # CONFIG_LOGO is not set
1055 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1059 @@ -800,6 +825,7 @@ CONFIG_DUMMY_CONSOLE=y
1063 +# CONFIG_HID_DEBUG is not set
1067 @@ -814,9 +840,7 @@ CONFIG_USB=y
1068 # Miscellaneous USB options
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
1077 @@ -824,7 +848,8 @@ CONFIG_USB_DEVICEFS=y
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
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
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
1111 @@ -959,7 +987,6 @@ CONFIG_MMC=y
1112 # CONFIG_MMC_DEBUG is not set
1115 -# CONFIG_MMC_TIFM_SD is not set
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
1143 # CONFIG_DEBUG_ERRORS is not set
1145 @@ -1180,5 +1209,7 @@ CONFIG_BITREVERSE=y
1147 # CONFIG_LIBCRC32C is not set
1148 CONFIG_ZLIB_INFLATE=y
1149 +CONFIG_ZLIB_DEFLATE=y
1151 -CONFIG_IOMAP_COPY=y
1153 +CONFIG_HAS_IOPORT=y
1154 Index: linux-2.6.22.19/arch/arm/configs/cam60_defconfig
1155 ===================================================================
1157 +++ linux-2.6.22.19/arch/arm/configs/cam60_defconfig
1160 +# Automatically generated make config: don't edit
1161 +# Linux kernel version: 2.6.20
1162 +# Tue May 1 21:06:33 2007
1165 +# CONFIG_GENERIC_TIME is not set
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"
1180 +# Code maturity level options
1182 +CONFIG_EXPERIMENTAL=y
1183 +CONFIG_BROKEN_ON_SMP=y
1184 +CONFIG_INIT_ENV_ARG_LIMIT=32
1189 +CONFIG_LOCALVERSION=""
1190 +# CONFIG_LOCALVERSION_AUTO is not set
1191 +# CONFIG_SWAP is not set
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
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
1206 +# CONFIG_EMBEDDED is not set
1208 +CONFIG_SYSCTL_SYSCALL=y
1210 +# CONFIG_KALLSYMS_ALL is not set
1211 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
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
1228 +# Loadable module support
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
1241 +# CONFIG_LBD is not set
1242 +# CONFIG_BLK_DEV_IO_TRACE is not set
1243 +# CONFIG_LSF is not set
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"
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
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
1292 +# Atmel AT91 System-on-Chip
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
1300 +# AT91SAM9260 Board Type
1302 +# CONFIG_MACH_AT91SAM9260EK is not set
1303 +CONFIG_MACH_CAM60=y
1306 +# AT91 Board Options
1310 +# AT91 Feature Selections
1312 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
1318 +CONFIG_CPU_ARM926T=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
1325 +CONFIG_CPU_CP15_MMU=y
1328 +# Processor Features
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
1341 +# PCCARD (PCMCIA/CardBus) support
1343 +# CONFIG_PCCARD is not set
1348 +# CONFIG_PREEMPT is not set
1349 +# CONFIG_NO_IDLE_HZ is not set
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
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
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
1375 +# Floating point emulation
1379 +# At least one emulation must be selected
1382 +# CONFIG_FPE_NWFPE_XP is not set
1383 +# CONFIG_FPE_FASTFPE is not set
1384 +# CONFIG_VFP is not set
1387 +# Userspace binary formats
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
1395 +# Power management options
1397 +# CONFIG_PM is not set
1398 +# CONFIG_APM is not set
1406 +# Networking options
1408 +# CONFIG_NETDEBUG is not set
1410 +# CONFIG_PACKET_MMAP is not set
1413 +# CONFIG_XFRM_USER is not set
1414 +# CONFIG_XFRM_SUB_POLICY is not set
1415 +# CONFIG_NET_KEY is not set
1417 +# CONFIG_IP_MULTICAST is not set
1418 +# CONFIG_IP_ADVANCED_ROUTER is not set
1419 +CONFIG_IP_FIB_HASH=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
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
1449 +# DCCP Configuration (EXPERIMENTAL)
1451 +# CONFIG_IP_DCCP is not set
1454 +# SCTP Configuration (EXPERIMENTAL)
1456 +# CONFIG_IP_SCTP is not set
1459 +# TIPC Configuration (EXPERIMENTAL)
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
1475 +# QoS and/or fair queueing
1477 +# CONFIG_NET_SCHED is not set
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
1493 +# Generic Driver Options
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
1502 +# Connector - unified userspace <-> kernelspace linker
1504 +# CONFIG_CONNECTOR is not set
1507 +# Memory Technology Devices (MTD)
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
1518 +# User Modules And Translation Layers
1521 +CONFIG_MTD_BLKDEVS=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
1530 +# RAM/ROM/Flash chip drivers
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
1555 +# Mapping drivers for chip access
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
1563 +# Self-contained MTD device drivers
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
1573 +# Disk-On-Chip Device Drivers
1575 +# CONFIG_MTD_DOC2000 is not set
1576 +# CONFIG_MTD_DOC2001 is not set
1577 +# CONFIG_MTD_DOC2001PLUS is not set
1580 +# NAND Flash Device Drivers
1582 +# CONFIG_MTD_NAND is not set
1585 +# OneNAND Flash Device Drivers
1587 +# CONFIG_MTD_ONENAND is not set
1590 +# Parallel port support
1592 +# CONFIG_PARPORT is not set
1595 +# Plug and Play support
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
1613 +# SCSI device support
1615 +# CONFIG_RAID_ATTRS is not set
1616 +# CONFIG_SCSI is not set
1617 +# CONFIG_SCSI_NETLINK is not set
1620 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
1622 +# CONFIG_ATA is not set
1625 +# Multi-device support (RAID and LVM)
1627 +# CONFIG_MD is not set
1630 +# Fusion MPT device support
1632 +# CONFIG_FUSION is not set
1635 +# IEEE 1394 (FireWire) support
1639 +# I2O device support
1643 +# Network device support
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
1652 +# PHY device support
1654 +# CONFIG_PHYLIB is not set
1657 +# Ethernet (10 or 100Mbit)
1659 +CONFIG_NET_ETHERNET=y
1662 +# CONFIG_SMC91X is not set
1663 +# CONFIG_DM9000 is not set
1666 +# Ethernet (1000 Mbit)
1670 +# Ethernet (10000 Mbit)
1674 +# Token Ring devices
1678 +# Wireless LAN (non-hamradio)
1680 +# CONFIG_NET_RADIO is not set
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
1696 +# CONFIG_ISDN is not set
1699 +# Input device support
1702 +# CONFIG_INPUT_FF_MEMLESS is not set
1705 +# Userland interfaces
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
1717 +# Input Device Drivers
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
1726 +# Hardware I/O ports
1728 +# CONFIG_SERIO is not set
1729 +# CONFIG_GAMEPORT is not set
1732 +# Character devices
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
1743 +# CONFIG_SERIAL_8250 is not set
1746 +# Non-8250 serial port support
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
1760 +# CONFIG_IPMI_HANDLER is not set
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
1775 +# CONFIG_TCG_TPM is not set
1780 +# CONFIG_I2C is not set
1786 +# CONFIG_SPI_DEBUG is not set
1787 +CONFIG_SPI_MASTER=y
1790 +# SPI Master Controller Drivers
1793 +# CONFIG_SPI_BITBANG is not set
1796 +# SPI Protocol Masters
1800 +# Dallas's 1-wire bus
1802 +# CONFIG_W1 is not set
1805 +# Hardware Monitoring support
1807 +# CONFIG_HWMON is not set
1808 +# CONFIG_HWMON_VID is not set
1813 +# CONFIG_TIFM_CORE is not set
1818 +# CONFIG_NEW_LEDS is not set
1829 +# Multimedia devices
1831 +# CONFIG_VIDEO_DEV is not set
1834 +# Digital Video Broadcasting Devices
1836 +# CONFIG_DVB is not set
1841 +# CONFIG_FIRMWARE_EDID is not set
1842 +# CONFIG_FB is not set
1845 +# Console display driver support
1847 +# CONFIG_VGA_CONSOLE is not set
1848 +CONFIG_DUMMY_CONSOLE=y
1849 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1854 +# CONFIG_SOUND is not set
1859 +# CONFIG_HID is not set
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
1870 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1874 +# USB Gadget Support
1876 +# CONFIG_USB_GADGET is not set
1879 +# MMC/SD Card support
1881 +# CONFIG_MMC is not set
1887 +# CONFIG_RTC_CLASS is not set
1893 +# CONFIG_EXT2_FS_XATTR is not set
1894 +# CONFIG_EXT2_FS_XIP is not set
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
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
1912 +CONFIG_INOTIFY_USER=y
1913 +# CONFIG_QUOTA is not set
1915 +# CONFIG_AUTOFS_FS is not set
1916 +CONFIG_AUTOFS4_FS=y
1917 +# CONFIG_FUSE_FS is not set
1920 +# CD-ROM/DVD Filesystems
1922 +# CONFIG_ISO9660_FS is not set
1923 +# CONFIG_UDF_FS is not set
1926 +# DOS/FAT/NT Filesystems
1929 +# CONFIG_MSDOS_FS is not set
1931 +CONFIG_FAT_DEFAULT_CODEPAGE=437
1932 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1933 +# CONFIG_NTFS_FS is not set
1936 +# Pseudo filesystems
1939 +CONFIG_PROC_SYSCTL=y
1942 +# CONFIG_TMPFS_POSIX_ACL is not set
1943 +# CONFIG_HUGETLB_PAGE is not set
1945 +# CONFIG_CONFIGFS_FS is not set
1948 +# Miscellaneous filesystems
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
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
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
1974 +# Network File Systems
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
1985 +CONFIG_NFS_COMMON=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
1999 +# CONFIG_PARTITION_ADVANCED is not set
2000 +CONFIG_MSDOS_PARTITION=y
2003 +# Native Language Support
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
2047 +# Distributed Lock Manager
2049 +# CONFIG_DLM is not set
2052 +# Profiling support
2054 +# CONFIG_PROFILING is not set
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
2088 +# CONFIG_DEBUG_ICEDCC is not set
2093 +# CONFIG_KEYS is not set
2094 +# CONFIG_SECURITY is not set
2097 +# Cryptographic options
2099 +# CONFIG_CRYPTO is not set
2104 +CONFIG_BITREVERSE=y
2105 +# CONFIG_CRC_CCITT is not set
2106 +# CONFIG_CRC16 is not set
2108 +# CONFIG_LIBCRC32C is not set
2109 +CONFIG_ZLIB_INFLATE=y
2110 +CONFIG_ZLIB_DEFLATE=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
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
2126 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
2127 +CONFIG_GENERIC_GPIO=y
2128 +# CONFIG_GENERIC_TIME is not set
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
2142 +CONFIG_VECTORS_BASE=0xffff0000
2143 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
2146 # Code maturity level options
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
2154 @@ -21,54 +33,103 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
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
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
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
2180 -# CONFIG_AUDIT is not set
2182 -# CONFIG_KOBJECT_UEVENT is not set
2183 -# CONFIG_IKCONFIG is not set
2184 # CONFIG_EMBEDDED is not set
2186 +CONFIG_SYSCTL_SYSCALL=y
2188 # CONFIG_KALLSYMS_ALL is not set
2189 -# CONFIG_KALLSYMS_EXTRA_PASS is not set
2190 +CONFIG_KALLSYMS_EXTRA_PASS=y
2198 -CONFIG_CC_OPTIMIZE_FOR_SIZE=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
2205 +CONFIG_VM_EVENT_COUNTERS=y
2206 +CONFIG_RT_MUTEXES=y
2207 # CONFIG_TINY_SHMEM is not set
2209 +# CONFIG_SLOB is not set
2212 # Loadable module support
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
2228 +# CONFIG_BLK_DEV_IO_TRACE is not set
2229 +# CONFIG_LSF is not set
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"
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
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
2286 +# Atmel AT91 System-on-Chip
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
2294 -# AT91RM9200 Implementations
2295 +# AT91RM9200 Board Type
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
2309 +# AT91 Board Options
2313 +# AT91 Feature Selections
2315 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
2316 +# CONFIG_ATMEL_TCLIB is not set
2322 CONFIG_CPU_ARM920T=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
2331 +CONFIG_CPU_CP15_MMU=y
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
2344 -CONFIG_ISA_DMA_API=y
2347 # PCCARD (PCMCIA/CardBus) support
2349 -# CONFIG_PCCARD is not set
2351 +# CONFIG_PCMCIA_DEBUG is not set
2353 +CONFIG_PCMCIA_LOAD_CIS=y
2354 +CONFIG_PCMCIA_IOCTL=y
2359 +# CONFIG_AT91_CF is not set
2364 +# CONFIG_PREEMPT is not set
2365 # CONFIG_NO_IDLE_HZ is not set
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
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
2382 @@ -138,8 +237,10 @@ CONFIG_ALIGNMENT_TRAP=y
2384 CONFIG_ZBOOT_ROM_TEXT=0x10000000
2385 CONFIG_ZBOOT_ROM_BSS=0x20040000
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
2394 # Floating point emulation
2395 @@ -150,6 +251,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 roo
2398 # CONFIG_FPE_NWFPE_XP is not set
2399 +# CONFIG_FPE_FASTFPE is not set
2402 # Userspace binary formats
2403 @@ -165,6 +267,96 @@ CONFIG_BINFMT_MISC=y
2404 # CONFIG_PM is not set
2412 +# Networking options
2414 +# CONFIG_NETDEBUG is not set
2416 +# CONFIG_PACKET_MMAP is not set
2418 +# CONFIG_NET_KEY is not set
2420 +CONFIG_IP_MULTICAST=y
2421 +# CONFIG_IP_ADVANCED_ROUTER is not set
2422 +CONFIG_IP_FIB_HASH=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
2452 +# DCCP Configuration (EXPERIMENTAL)
2454 +# CONFIG_IP_DCCP is not set
2457 +# SCTP Configuration (EXPERIMENTAL)
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
2467 +# TIPC Configuration (EXPERIMENTAL)
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
2483 +# QoS and/or fair queueing
2485 +# CONFIG_NET_SCHED is not set
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
2500 @@ -173,13 +365,95 @@ CONFIG_BINFMT_MISC=y
2503 CONFIG_PREVENT_FIRMWARE_BUILD=y
2504 -# CONFIG_FW_LOADER is not set
2505 -CONFIG_DEBUG_DRIVER=y
2507 +# CONFIG_DEBUG_DRIVER is not set
2508 +# CONFIG_DEBUG_DEVRES is not set
2509 +# CONFIG_SYS_HYPERVISOR is not set
2512 +# Connector - unified userspace <-> kernelspace linker
2514 +# CONFIG_CONNECTOR is not set
2517 # Memory Technology Devices (MTD)
2519 -# CONFIG_MTD is not set
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
2529 +# User Modules And Translation Layers
2532 +CONFIG_MTD_BLKDEVS=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
2541 +# RAM/ROM/Flash chip drivers
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
2561 +# Mapping drivers for chip access
2563 +CONFIG_MTD_COMPLEX_MAPPINGS=y
2564 +# CONFIG_MTD_PLATRAM is not set
2567 +# Self-contained MTD device drivers
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
2575 +# Disk-On-Chip Device Drivers
2577 +# CONFIG_MTD_DOC2000 is not set
2578 +# CONFIG_MTD_DOC2001 is not set
2579 +# CONFIG_MTD_DOC2001PLUS is not set
2582 +# NAND Flash Device Drivers
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
2593 +# OneNAND Flash Device Drivers
2595 +# CONFIG_MTD_ONENAND is not set
2598 # Parallel port support
2599 @@ -189,6 +463,7 @@ CONFIG_DEBUG_DRIVER=y
2601 # Plug and Play support
2603 +# CONFIG_PNPACPI is not set
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
2626 +# ATA/ATAPI/MFM/RLL support
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
2636 # SCSI device support
2638 +# CONFIG_RAID_ATTRS is not set
2640 +# CONFIG_SCSI_TGT is not set
2641 +# CONFIG_SCSI_NETLINK is not set
2642 CONFIG_SCSI_PROC_FS=y
2645 @@ -233,97 +507,61 @@ CONFIG_CHR_DEV_SG=y
2647 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
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
2658 -# SCSI Transport Attributes
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
2669 # SCSI low-level drivers
2671 -# CONFIG_SCSI_SATA is not set
2672 +# CONFIG_ISCSI_TCP is not set
2673 # CONFIG_SCSI_DEBUG is not set
2676 -# Multi-device support (RAID and LVM)
2678 -# CONFIG_MD is not set
2681 -# Fusion MPT device support
2682 +# PCMCIA SCSI adapter support
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
2692 -# IEEE 1394 (FireWire) support
2693 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
2695 +# CONFIG_ATA is not set
2698 -# I2O device support
2699 +# Multi-device support (RAID and LVM)
2701 +# CONFIG_MD is not set
2704 -# Networking support
2705 +# Fusion MPT device support
2708 +# CONFIG_FUSION is not set
2711 -# Networking options
2712 +# IEEE 1394 (FireWire) support
2715 -# CONFIG_PACKET_MMAP is not set
2717 -# CONFIG_NET_KEY is not set
2719 -CONFIG_IP_MULTICAST=y
2720 -# CONFIG_IP_ADVANCED_ROUTER is not set
2721 -CONFIG_IP_FIB_HASH=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
2748 -# QoS and/or fair queueing
2749 +# I2O device support
2751 -# CONFIG_NET_SCHED is not set
2752 -# CONFIG_NET_CLS_ROUTE is not set
2756 +# Network device support
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
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
2771 +# PHY device support
2773 +# CONFIG_PHYLIB is not set
2776 # Ethernet (10 or 100Mbit)
2778 CONFIG_NET_ETHERNET=y
2779 @@ -357,11 +600,20 @@ CONFIG_ARM_AT91_ETHER=y
2780 # CONFIG_NET_RADIO is not set
2783 +# PCMCIA network device support
2785 +# CONFIG_NET_PCMCIA is not set
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
2800 @@ -372,6 +624,7 @@ CONFIG_ARM_AT91_ETHER=y
2801 # Input device support
2804 +# CONFIG_INPUT_FF_MEMLESS is not set
2807 # Userland interfaces
2808 @@ -397,9 +650,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
2810 # Hardware I/O ports
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
2819 @@ -408,6 +659,7 @@ CONFIG_SERIO=y
2823 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
2824 # CONFIG_SERIAL_NONSTANDARD is not set
2827 @@ -420,11 +672,11 @@ CONFIG_HW_CONSOLE=y
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
2841 @@ -435,21 +687,23 @@ CONFIG_LEGACY_PTY_COUNT=256
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
2853 -# Ftape, the floppy tape device driver
2854 +# PCMCIA character devices
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
2864 -# CONFIG_AT91_SPI is not set
2865 +# CONFIG_TCG_TPM is not set
2869 @@ -457,10 +711,50 @@ CONFIG_LEGACY_PTY_COUNT=256
2870 # CONFIG_I2C is not set
2875 +# CONFIG_SPI is not set
2876 +# CONFIG_SPI_MASTER is not set
2879 +# Dallas's 1-wire bus
2881 +# CONFIG_W1 is not set
2884 +# Hardware Monitoring support
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
2899 +# Multifunction device drivers
2901 +# CONFIG_MFD_SM501 is not set
2906 +# CONFIG_NEW_LEDS is not set
2917 # Multimedia devices
2919 # CONFIG_VIDEO_DEV is not set
2920 @@ -469,17 +763,57 @@ CONFIG_LEGACY_PTY_COUNT=256
2921 # Digital Video Broadcasting Devices
2923 # CONFIG_DVB is not set
2924 +# CONFIG_USB_DABUSB is not set
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
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
2947 +# Frame buffer hardware drivers
2949 +CONFIG_FB_S1D15605=y
2950 +# CONFIG_FB_S1D13XXX is not set
2951 +# CONFIG_FB_VIRTUAL is not set
2954 # Console display driver support
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
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
2973 +# Logo configuration
2975 +# CONFIG_LOGO is not set
2979 @@ -487,82 +821,98 @@ CONFIG_DUMMY_CONSOLE=y
2980 # CONFIG_SOUND is not set
2986 +# CONFIG_HID_DEBUG is not set
2991 CONFIG_USB_ARCH_HAS_HCD=y
2992 CONFIG_USB_ARCH_HAS_OHCI=y
2993 +# CONFIG_USB_ARCH_HAS_EHCI is not set
2996 +# CONFIG_USB_DEBUG is not set
2999 # Miscellaneous USB options
3001 CONFIG_USB_DEVICEFS=y
3002 +# CONFIG_USB_DYNAMIC_MINORS is not set
3003 +# CONFIG_USB_OTG is not set
3006 # USB Host Controller Drivers
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
3017 # USB Device Class drivers
3019 -# CONFIG_USB_BLUETOOTH_TTY is not set
3020 # CONFIG_USB_ACM is not set
3021 # CONFIG_USB_PRINTER is not set
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'
3029 +# may also be needed; see USB_STORAGE Help for more information
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
3048 -# CONFIG_USB_HID is not set
3051 -# USB HID Boot Protocol drivers
3053 -# CONFIG_USB_KBD is not set
3054 -# CONFIG_USB_MOUSE is not set
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
3077 # USB Imaging devices
3079 +# CONFIG_USB_MDC800 is not set
3080 # CONFIG_USB_MICROTEK is not set
3083 -# USB Multimedia devices
3085 -# CONFIG_USB_DABUSB is not set
3088 -# Video4Linux support is needed for USB Multimedia device support
3092 # USB Network Adapters
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
3102 @@ -580,12 +930,23 @@ CONFIG_USB_STORAGE_DEBUG=y
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
3127 # USB DSL modem support
3128 @@ -599,36 +960,51 @@ CONFIG_USB_STORAGE_DEBUG=y
3130 # MMC/SD Card support
3132 -# CONFIG_MMC is not set
3134 +# CONFIG_MMC_DEBUG is not set
3142 +# CONFIG_RTC_CLASS is not set
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
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
3162 # CONFIG_JBD_DEBUG is not set
3164 # CONFIG_REISERFS_FS is not set
3165 # CONFIG_JFS_FS is not set
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
3178 +CONFIG_INOTIFY_USER=y
3180 +# CONFIG_QFMT_V1 is not set
3185 +# CONFIG_AUTOFS_FS is not set
3187 +# CONFIG_FUSE_FS is not set
3190 # CD-ROM/DVD Filesystems
3191 @@ -643,25 +1019,40 @@ CONFIG_FAT_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
3200 # Pseudo filesystems
3203 +CONFIG_PROC_SYSCTL=y
3205 -CONFIG_DEVPTS_FS_XATTR=y
3206 -# CONFIG_DEVPTS_FS_SECURITY is not set
3208 -# CONFIG_TMPFS_XATTR is not set
3209 +# CONFIG_TMPFS_POSIX_ACL is not set
3210 # CONFIG_HUGETLB_PAGE is not set
3212 +CONFIG_CONFIGFS_FS=y
3215 # Miscellaneous filesystems
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
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
3239 # CONFIG_NFS_V3_ACL is not set
3241 +# CONFIG_NFS_DIRECTIO is not set
3242 # CONFIG_NFSD is not set
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
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
3268 +# Distributed Lock Manager
3270 +# CONFIG_DLM is not set
3273 +# Profiling support
3275 +# CONFIG_PROFILING is not set
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
3318 # CONFIG_DEBUG_ICEDCC is not set
3320 @@ -766,7 +1189,43 @@ CONFIG_DEBUG_LL=y
3322 # Cryptographic options
3324 -# CONFIG_CRYPTO is not set
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
3364 # Hardware crypto devices
3365 @@ -775,6 +1234,14 @@ CONFIG_DEBUG_LL=y
3369 +CONFIG_BITREVERSE=y
3370 # CONFIG_CRC_CCITT is not set
3371 +# CONFIG_CRC16 is not set
3373 # CONFIG_LIBCRC32C is not set
3374 +CONFIG_AUDIT_GENERIC=y
3375 +CONFIG_ZLIB_INFLATE=y
3376 +CONFIG_ZLIB_DEFLATE=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)
3387 /* --------------------------------------------------------------------
3388 + * Timer/Counter library initialization
3389 + * -------------------------------------------------------------------- */
3390 +#ifdef CONFIG_ATMEL_TCLIB
3394 +static struct atmel_tcblock at91rm9200_tcblocks[] = {
3396 + .physaddr = AT91RM9200_BASE_TCB0,
3397 + .irq = { AT91RM9200_ID_TC0, AT91RM9200_ID_TC1, AT91RM9200_ID_TC2 },
3398 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3401 + .physaddr = AT91RM9200_BASE_TCB1,
3402 + .irq = { AT91RM9200_ID_TC3, AT91RM9200_ID_TC4, AT91RM9200_ID_TC5 },
3403 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3407 +#define at91rm9200_tc_init() atmel_tc_init(at91rm9200_tcblocks, ARRAY_SIZE(at91rm9200_tcblocks))
3410 +#define at91rm9200_tc_init() do {} while(0)
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
3420 /* Initialize GPIO subsystem */
3421 at91_gpio_init(at91rm9200_gpio, banks);
3423 + /* Initialize the Timer/Counter blocks */
3424 + at91rm9200_tc_init();
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 */
3440 + 1, /* Parallel IO Controller A */
3441 + 1, /* Parallel IO Controller B */
3442 + 1, /* Parallel IO Controller C */
3443 + 1, /* Parallel IO Controller D */
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) {}
3478 * -------------------------------------------------------------------- */
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"
3484 +#elif defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) /* SPI bitbanging driver */
3485 +#define SPI_DEVNAME "at91_spi"
3487 +#elif defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) /* new SPI driver */
3488 +#define SPI_DEVNAME "atmel_spi"
3493 static u64 spi_dmamask = 0xffffffffUL;
3495 static struct resource spi_resources[] = {
3496 @@ -494,7 +505,7 @@ static struct resource spi_resources[] =
3499 static struct platform_device at91rm9200_spi_device = {
3500 - .name = "at91_spi",
3501 + .name = SPI_DEVNAME,
3504 .dma_mask = &spi_dmamask,
3505 @@ -603,6 +614,32 @@ void __init at91_init_leds(u8 cpu_led, u
3509 +#if defined(CONFIG_NEW_LEDS)
3511 +static struct platform_device at91_leds = {
3512 + .name = "at91_leds",
3516 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3521 + at91_leds.dev.platform_data = leds;
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);
3528 + platform_device_register(&at91_leds);
3531 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3535 /* --------------------------------------------------------------------
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)
3545 /* --------------------------------------------------------------------
3546 + * Timer/Counter library initialization
3547 + * -------------------------------------------------------------------- */
3548 +#ifdef CONFIG_ATMEL_TCLIB
3552 +static struct atmel_tcblock at91sam9260_tcblocks[] = {
3554 + .physaddr = AT91SAM9260_BASE_TCB0,
3555 + .irq = { AT91SAM9260_ID_TC0, AT91SAM9260_ID_TC1, AT91SAM9260_ID_TC2 },
3556 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3559 + .physaddr = AT91SAM9260_BASE_TCB1,
3560 + .irq = { AT91SAM9260_ID_TC3, AT91SAM9260_ID_TC4, AT91SAM9260_ID_TC5 },
3561 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3565 +#define at91sam9260_tc_init() atmel_tc_init(at91sam9260_tcblocks, ARRAY_SIZE(at91sam9260_tcblocks))
3568 +#define at91sam9260_tc_init() do {} while(0)
3572 +/* --------------------------------------------------------------------
3573 * AT91SAM9260 processor initialization
3574 * -------------------------------------------------------------------- */
3576 @@ -315,6 +342,9 @@ void __init at91sam9260_initialize(unsig
3578 /* Register GPIO subsystem */
3579 at91_gpio_init(at91sam9260_gpio, 3);
3581 + /* Initialize the Timer/Counter blocks */
3582 + at91sam9260_tc_init();
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 */
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 */
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 */
3621 0, /* Image Sensor Interface */
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
3639 +#if defined(CONFIG_NEW_LEDS)
3641 +static struct platform_device at91_leds = {
3642 + .name = "at91_leds",
3646 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3651 + at91_leds.dev.platform_data = leds;
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);
3658 + platform_device_register(&at91_leds);
3661 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3665 /* --------------------------------------------------------------------
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)
3675 /* --------------------------------------------------------------------
3676 + * Timer/Counter library initialization
3677 + * -------------------------------------------------------------------- */
3678 +#ifdef CONFIG_ATMEL_TCLIB
3682 +static struct atmel_tcblock at91sam9261_tcblocks[] = {
3684 + .physaddr = AT91SAM9261_BASE_TCB0,
3685 + .irq = { AT91SAM9261_ID_TC0, AT91SAM9261_ID_TC1, AT91SAM9261_ID_TC2 },
3686 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3690 +#define at91sam9261_tc_init() atmel_tc_init(at91sam9261_tcblocks, ARRAY_SIZE(at91sam9261_tcblocks))
3693 +#define at91sam9261_tc_init() do {} while(0)
3697 +/* --------------------------------------------------------------------
3698 * AT91SAM9261 processor initialization
3699 * -------------------------------------------------------------------- */
3701 @@ -267,6 +289,9 @@ void __init at91sam9261_initialize(unsig
3703 /* Register GPIO subsystem */
3704 at91_gpio_init(at91sam9261_gpio, 3);
3706 + /* Initialize the Timer/Counter blocks */
3707 + at91sam9261_tc_init();
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 */
3722 + 1, /* Parallel IO Controller A */
3723 + 1, /* Parallel IO Controller B */
3724 + 1, /* Parallel IO Controller C */
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 */
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
3757 #include <asm/mach/map.h>
3759 #include <linux/platform_device.h>
3760 +#include <linux/fb.h>
3762 +#include <video/atmel_lcdc.h>
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
3770 +#if defined(CONFIG_NEW_LEDS)
3772 +static struct platform_device at91_leds = {
3773 + .name = "at91_leds",
3777 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3782 + at91_leds.dev.platform_data = leds;
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);
3789 + platform_device_register(&at91_leds);
3792 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3796 /* --------------------------------------------------------------------
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)
3806 /* --------------------------------------------------------------------
3807 + * Timer/Counter library initialization
3808 + * -------------------------------------------------------------------- */
3809 +#ifdef CONFIG_ATMEL_TCLIB
3813 +static struct atmel_tcblock at91sam9263_tcblocks[] = {
3815 + .physaddr = AT91SAM9263_BASE_TCB0,
3816 + .irq = { AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB },
3817 + .clk = { &tcb_clk, &tcb_clk, &tcb_clk },
3821 +#define at91sam9263_tc_init() atmel_tc_init(at91sam9263_tcblocks, ARRAY_SIZE(at91sam9263_tcblocks))
3824 +#define at91sam9263_tc_init() do {} while(0)
3828 +/* --------------------------------------------------------------------
3829 * AT91SAM9263 processor initialization
3830 * -------------------------------------------------------------------- */
3832 @@ -292,6 +314,9 @@ void __init at91sam9263_initialize(unsig
3834 /* Register GPIO subsystem */
3835 at91_gpio_init(at91sam9263_gpio, 5);
3837 + /* Initialize the Timer/Counter blocks */
3838 + at91sam9263_tc_init();
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 */
3860 0, /* Multimedia Card Interface 0 */
3861 0, /* Multimedia Card Interface 1 */
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 */
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 */
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 */
3887 - 3, /* USB Host port */
3888 + 2, /* USB Host port */
3889 0, /* Advanced Interrupt Controller (IRQ0) */
3890 0, /* Advanced Interrupt Controller (IRQ1) */
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
3897 #include <asm/mach/map.h>
3899 #include <linux/platform_device.h>
3900 +#include <linux/fb.h>
3902 +#include <video/atmel_lcdc.h>
3904 #include <asm/arch/board.h>
3905 #include <asm/arch/gpio.h>
3906 @@ -625,6 +628,56 @@ void __init at91_add_device_ac97(struct
3909 /* --------------------------------------------------------------------
3910 + * Image Sensor Interface
3911 + * -------------------------------------------------------------------- */
3913 +#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
3915 +struct resource isi_resources[] = {
3917 + .start = AT91SAM9263_BASE_ISI,
3918 + .end = AT91SAM9263_BASE_ISI + SZ_16K - 1,
3919 + .flags = IORESOURCE_MEM,
3922 + .start = AT91SAM9263_ID_ISI,
3923 + .end = AT91SAM9263_ID_ISI,
3924 + .flags = IORESOURCE_IRQ,
3928 +static struct platform_device at91sam9263_isi_device = {
3929 + .name = "at91_isi",
3931 + .resource = isi_resources,
3932 + .num_resources = ARRAY_SIZE(isi_resources),
3935 +void __init at91_add_device_isi(void)
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 */
3955 +void __init at91_add_device_isi(void) {}
3959 +/* --------------------------------------------------------------------
3961 * -------------------------------------------------------------------- */
3963 @@ -715,6 +768,32 @@ void __init at91_init_leds(u8 cpu_led, u
3967 +#if defined(CONFIG_NEW_LEDS)
3969 +static struct platform_device at91_leds = {
3970 + .name = "at91_leds",
3974 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3979 + at91_leds.dev.platform_data = leds;
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);
3986 + platform_device_register(&at91_leds);
3989 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3993 /* --------------------------------------------------------------------
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)
4003 /* --------------------------------------------------------------------
4004 + * Timer/Counter library initialization
4005 + * -------------------------------------------------------------------- */
4006 +#ifdef CONFIG_ATMEL_TCLIB
4010 +static struct atmel_tcblock at91sam9rl_tcblocks[] = {
4012 + .physaddr = AT91SAM9RL_BASE_TCB0,
4013 + .irq = { AT91SAM9RL_ID_TC0, AT91SAM9RL_ID_TC1, AT91SAM9RL_ID_TC2 },
4014 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
4018 +#define at91sam9rl_tc_init() atmel_tc_init(at91sam9rl_tcblocks, ARRAY_SIZE(at91sam9rl_tcblocks))
4021 +#define at91sam9rl_tc_init() do {} while(0)
4025 +/* --------------------------------------------------------------------
4026 * AT91SAM9RL processor initialization
4027 * -------------------------------------------------------------------- */
4029 @@ -284,6 +306,9 @@ void __init at91sam9rl_initialize(unsign
4031 /* Register GPIO subsystem */
4032 at91_gpio_init(at91sam9rl_gpio, 4);
4034 + /* Initialize the Timer/Counter blocks */
4035 + at91sam9rl_tc_init();
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
4047 +#if defined(CONFIG_NEW_LEDS)
4049 +static struct platform_device at91_leds = {
4050 + .name = "at91_leds",
4054 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
4059 + at91_leds.dev.platform_data = leds;
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);
4066 + platform_device_register(&at91_leds);
4069 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
4073 /* --------------------------------------------------------------------
4075 * -------------------------------------------------------------------- */
4076 Index: linux-2.6.22.19/arch/arm/mach-at91/board-cam60.c
4077 ===================================================================
4079 +++ linux-2.6.22.19/arch/arm/mach-at91/board-cam60.c
4084 + * based on board-sam9260ek.c
4085 + * Copyright (C) 2005 SAN People
4086 + * Copyright (C) 2006 Atmel
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.
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.
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
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>
4111 +#include <asm/hardware.h>
4112 +#include <asm/setup.h>
4113 +#include <asm/mach-types.h>
4114 +#include <asm/irq.h>
4116 +#include <asm/mach/arch.h>
4117 +#include <asm/mach/map.h>
4118 +#include <asm/mach/irq.h>
4120 +#include <asm/arch/board.h>
4121 +#include <asm/arch/gpio.h>
4122 +#include <asm/arch/at91sam926x_mc.h>
4124 +#include "generic.h"
4128 + * Serial port configuration.
4129 + * 0 .. 5 = USART0 .. USART5
4132 +static struct at91_uart_config __initdata cam60_uart_config = {
4133 + .console_tty = 0, /* ttyS0 */
4135 + .tty_map = { 6, -1, -1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
4138 +static void __init cam60_map_io(void)
4140 + /* Initialize processor: 10 MHz crystal */
4141 + at91sam9260_initialize(10000000);
4143 + /* Setup the serial ports and console */
4144 + at91_init_serial(&cam60_uart_config);
4147 +static void __init cam60_init_irq(void)
4149 + at91sam9260_init_interrupts(NULL);
4156 +#if defined(CONFIG_MTD_DATAFLASH)
4157 +static struct mtd_partition __initdata cam60_spi_partitions[] = {
4165 + .offset = MTDPART_OFS_NXTBLK,
4166 + .size = 256 * 1056,
4170 + .offset = MTDPART_OFS_NXTBLK,
4171 + .size = 2222 * 1056,
4174 + .name = "file system",
4175 + .offset = MTDPART_OFS_NXTBLK,
4176 + .size = MTDPART_SIZ_FULL,
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)
4187 +static struct spi_board_info cam60_spi_devices[] = {
4188 +#if defined(CONFIG_MTD_DATAFLASH)
4189 + { /* DataFlash chip */
4190 + .modalias = "mtd_dataflash",
4192 + .max_speed_hz = 15 * 1000 * 1000,
4194 + .platform_data = &cam60_spi_flash_platform_data
4201 + * MACB Ethernet device
4203 +static struct __initdata at91_eth_data cam60_macb_data = {
4204 + .phy_irq_pin = AT91_PIN_PB5,
4209 +static void __init cam60_board_init(void)
4212 + at91_add_device_serial();
4214 + at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
4216 + at91_add_device_eth(&cam60_macb_data);
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,
4229 Index: linux-2.6.22.19/arch/arm/mach-at91/board-chub.c
4230 ===================================================================
4232 +++ linux-2.6.22.19/arch/arm/mach-at91/board-chub.c
4235 + * linux/arch/arm/mach-at91/board-chub.c
4237 + * Copyright (C) 2005 SAN People, adapted for Promwad Chub board
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.
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.
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
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>
4261 +#include <asm/hardware.h>
4262 +#include <asm/setup.h>
4263 +#include <asm/mach-types.h>
4264 +#include <asm/irq.h>
4266 +#include <asm/mach/arch.h>
4267 +#include <asm/mach/map.h>
4268 +#include <asm/mach/irq.h>
4270 +#include <asm/arch/board.h>
4271 +#include <asm/arch/gpio.h>
4273 +#include "generic.h"
4276 + * Serial port configuration.
4277 + * 0 .. 3 = USART0 .. USART3
4280 +static struct at91_uart_config __initdata chub_uart_config = {
4281 + .console_tty = 0, /* ttyS0 */
4283 + .tty_map = { 4, 0, 1, 2, 3 } /* ttyS0, ..., ttyS4 */
4286 +static void __init chub_init_irq(void)
4288 + at91rm9200_init_interrupts(NULL);
4291 +static void __init chub_map_io(void)
4293 + /* Initialize clocks: 18.432 MHz crystal */
4294 + at91rm9200_initialize(18432000, AT91RM9200_PQFP);
4296 + /* Setup the serial ports and console */
4297 + at91_init_serial(&chub_uart_config);
4300 +static struct at91_eth_data __initdata chub_eth_data = {
4301 + .phy_irq_pin = AT91_PIN_PB29,
4305 +static struct mtd_partition __initdata chub_nand_partition[] = {
4307 + .name = "NAND Partition 1",
4309 + .size = MTDPART_SIZ_FULL,
4313 +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
4315 + *num_partitions = ARRAY_SIZE(chub_nand_partition);
4316 + return chub_nand_partition;
4319 +static struct at91_nand_data __initdata chub_nand_data = {
4322 + .enable_pin = AT91_PIN_PA27,
4323 + .partition_info = nand_partitions,
4326 +static struct spi_board_info chub_spi_devices[] = {
4327 + { /* DataFlash chip */
4328 + .modalias = "mtd_dataflash",
4330 + .max_speed_hz = 15 * 1000 * 1000,
4334 +static void __init chub_board_init(void)
4337 + at91_add_device_serial();
4339 + at91_add_device_i2c();
4341 + at91_add_device_eth(&chub_eth_data);
4343 + at91_add_device_spi(chub_spi_devices, ARRAY_SIZE(chub_spi_devices));
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);
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,
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
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>
4377 #include <asm/hardware.h>
4378 @@ -59,6 +60,7 @@ static void __init csb337_map_io(void)
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 */
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),
4390 +static struct at91_gpio_led csb337_leds[] = {
4393 + .gpio = AT91_PIN_PB0,
4394 + .trigger = "heartbeat",
4398 + .gpio = AT91_PIN_PB1,
4399 + .trigger = "timer",
4403 + .gpio = AT91_PIN_PB2,
4407 +#if defined(CONFIG_CSB300_WAKE_SW0) || defined(CONFIG_CSB300_WAKE_SW1)
4408 +static irqreturn_t switch_irq_handler(int irq, void *context)
4410 + return IRQ_HANDLED;
4413 +static inline void __init switch_irq_setup(int irq, char *name, unsigned long mode)
4417 + res = request_irq(irq, switch_irq_handler, IRQF_SAMPLE_RANDOM | mode, name, NULL);
4419 + enable_irq_wake(irq);
4422 +static void __init csb300_switches(void)
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);
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);
4433 + /* there's also SW2 at PA21, GPIO or TIOA2 */
4436 +static void __init csb300_switches(void) {}
4439 static void __init csb337_board_init(void)
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));
4445 at91_add_device_mmc(0, &csb337_mmc_data);
4447 + at91_gpio_leds(csb337_leds, ARRAY_SIZE(csb337_leds));
4449 platform_device_register(&csb_flash);
4450 + /* Switches on CSB300 */
4451 + csb300_switches();
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);
4463 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4464 +#include <video/s1d13xxxfb.h>
4465 +#include <asm/arch/ics1523.h>
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
4473 +static void __init dk_init_video(void)
4475 + /* NWAIT Signal */
4476 + at91_set_A_periph(AT91_PIN_PC6, 0);
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 */
4484 + at91_ics1523_init();
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 */
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,
4605 +static u64 s1dfb_dmamask = 0xffffffffUL;
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,
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,
4622 +static struct platform_device dk_s1dfb_device = {
4623 + .name = "s1d13806fb",
4626 + .dma_mask = &s1dfb_dmamask,
4627 + .coherent_dma_mask = 0xffffffff,
4628 + .platform_data = &dk_s1dfb_pdata,
4630 + .resource = dk_s1dfb_resource,
4631 + .num_resources = ARRAY_SIZE(dk_s1dfb_resource),
4634 +static void __init dk_add_device_video(void)
4636 + platform_device_register(&dk_s1dfb_device);
4639 +static void __init dk_add_device_video(void) {}
4642 static struct at91_eth_data __initdata dk_eth_data = {
4643 .phy_irq_pin = AT91_PIN_PC4,
4645 @@ -151,7 +330,7 @@ static struct at91_nand_data __initdata
4646 #define DK_FLASH_SIZE 0x200000
4648 static struct physmap_flash_data dk_flash_data = {
4653 static struct resource dk_flash_resource = {
4654 @@ -170,6 +349,13 @@ static struct platform_device dk_flash =
4658 +static struct at91_gpio_led dk_leds[] = {
4661 + .gpio = AT91_PIN_PB2,
4662 + .trigger = "timer",
4666 static void __init dk_board_init(void)
4668 @@ -200,8 +386,10 @@ static void __init dk_board_init(void)
4669 at91_add_device_nand(&dk_nand_data);
4671 platform_device_register(&dk_flash);
4673 + at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
4675 -// dk_add_device_video();
4676 + dk_add_device_video();
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);
4688 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4689 +#include <video/s1d13xxxfb.h>
4690 +#include <asm/arch/ics1523.h>
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
4698 +static void __init ek_init_video(void)
4700 + /* NWAIT Signal */
4701 + at91_set_A_periph(AT91_PIN_PC6, 0);
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 */
4709 + at91_ics1523_init();
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},
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 */
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,
4832 +static u64 s1dfb_dmamask = 0xffffffffUL;
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,
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,
4849 +static struct platform_device ek_s1dfb_device = {
4850 + .name = "s1d13806fb",
4853 + .dma_mask = &s1dfb_dmamask,
4854 + .coherent_dma_mask = 0xffffffff,
4855 + .platform_data = &ek_s1dfb_pdata,
4857 + .resource = ek_s1dfb_resource,
4858 + .num_resources = ARRAY_SIZE(ek_s1dfb_resource),
4861 +static void __init ek_add_device_video(void)
4863 + platform_device_register(&ek_s1dfb_device);
4866 +static void __init ek_add_device_video(void) {}
4869 static struct at91_eth_data __initdata ek_eth_data = {
4870 .phy_irq_pin = AT91_PIN_PC4,
4872 @@ -113,7 +294,7 @@ static struct spi_board_info ek_spi_devi
4873 #define EK_FLASH_SIZE 0x200000
4875 static struct physmap_flash_data ek_flash_data = {
4880 static struct resource ek_flash_resource = {
4881 @@ -132,6 +313,18 @@ static struct platform_device ek_flash =
4885 +static struct at91_gpio_led ek_leds[] = {
4888 + .gpio = AT91_PIN_PB1,
4889 + .trigger = "heartbeat",
4893 + .gpio = AT91_PIN_PB2,
4894 + .trigger = "timer",
4898 static void __init ek_board_init(void)
4900 @@ -158,8 +351,10 @@ static void __init ek_board_init(void)
4903 platform_device_register(&ek_flash);
4905 + at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
4907 -// ek_add_device_video();
4908 + ek_add_device_video();
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
4917 #include <asm/arch/board.h>
4918 #include <asm/arch/gpio.h>
4920 +#include <asm/arch/at91rm9200_mc.h>
4922 #include "generic.h"
4925 @@ -111,6 +113,48 @@ static struct at91_nand_data __initdata
4926 .partition_info = nand_partitions,
4930 +#if defined(CONFIG_FB_S1D15605)
4931 +#warning "Rather pass reset pin via platform_data"
4932 +static struct resource kb9202_lcd_resources[] = {
4934 + .start = AT91_CHIPSELECT_2,
4935 + .end = AT91_CHIPSELECT_2 + 0x200FF,
4936 + .flags = IORESOURCE_MEM
4938 + [1] = { /* reset pin */
4939 + .start = AT91_PIN_PC22,
4940 + .end = AT91_PIN_PC22,
4941 + .flags = IORESOURCE_MEM
4945 +static struct platform_device kb9202_lcd_device = {
4946 + .name = "s1d15605fb",
4948 + .num_resources = ARRAY_SIZE(kb9202_lcd_resources),
4949 + .resource = kb9202_lcd_resources,
4952 +static void __init kb9202_add_device_lcd(void)
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));
4959 + /* Backlight pin = output, off */
4960 + at91_set_gpio_output(AT91_PIN_PC23, 0);
4962 + /* Reset pin = output, in reset */
4963 + at91_set_gpio_output(AT91_PIN_PC22, 0);
4965 + platform_device_register(&kb9202_lcd_device);
4968 +static void __init kb9202_add_device_lcd(void) {}
4971 static void __init kb9202_board_init(void)
4974 @@ -129,6 +173,8 @@ static void __init kb9202_board_init(voi
4975 at91_add_device_spi(NULL, 0);
4977 at91_add_device_nand(&kb9202_nand_data);
4979 + kb9202_add_device_lcd();
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
4988 #include <linux/spi/spi.h>
4989 #include <linux/spi/ads7846.h>
4990 #include <linux/dm9000.h>
4991 +#include <linux/fb.h>
4993 +#include <video/atmel_lcdc.h>
4995 #include <asm/hardware.h>
4996 #include <asm/setup.h>
4997 @@ -251,6 +254,7 @@ static struct spi_board_info ek_spi_devi
4999 .platform_data = &ads_info,
5000 .irq = AT91SAM9261_ID_IRQ0,
5001 + .controller_data = AT91_PIN_PA28, /* CS pin */
5004 #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
5005 @@ -271,6 +275,65 @@ static struct spi_board_info ek_spi_devi
5012 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
5013 +static struct fb_videomode at91_tft_vga_modes[] = {
5015 + .name = "TX09D50VM1CCA @ 60",
5017 + .xres = 240, .yres = 320,
5018 + .pixclock = KHZ2PICOS(4965),
5020 + .left_margin = 1, .right_margin = 33,
5021 + .upper_margin = 1, .lower_margin = 0,
5022 + .hsync_len = 5, .vsync_len = 1,
5024 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5025 + .vmode = FB_VMODE_NONINTERLACED,
5029 +static struct fb_monspecs at91fb_default_monspecs = {
5030 + .manufacturer = "HIT",
5031 + .monitor = "TX09D50VM1CCA",
5033 + .modedb = at91_tft_vga_modes,
5034 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5041 +#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5042 + | ATMEL_LCDC_DISTYPE_TFT \
5043 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5045 +static void at91_lcdc_power_control(int on)
5048 + at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
5050 + at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
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,
5064 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
5068 static void __init ek_board_init(void)
5071 @@ -296,6 +359,8 @@ static void __init ek_board_init(void)
5073 at91_add_device_mmc(0, &ek_mmc_data);
5075 + /* LCD Controller */
5076 + at91_add_device_lcdc(&ek_lcdc_data);
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
5085 #include <linux/platform_device.h>
5086 #include <linux/spi/spi.h>
5087 #include <linux/spi/ads7846.h>
5088 +#include <linux/fb.h>
5090 +#include <video/atmel_lcdc.h>
5092 #include <asm/hardware.h>
5093 #include <asm/setup.h>
5094 @@ -202,6 +205,65 @@ static struct at91_nand_data __initdata
5100 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
5101 +static struct fb_videomode at91_tft_vga_modes[] = {
5103 + .name = "TX09D50VM1CCA @ 60",
5105 + .xres = 240, .yres = 320,
5106 + .pixclock = KHZ2PICOS(4965),
5108 + .left_margin = 1, .right_margin = 33,
5109 + .upper_margin = 1, .lower_margin = 0,
5110 + .hsync_len = 5, .vsync_len = 1,
5112 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5113 + .vmode = FB_VMODE_NONINTERLACED,
5117 +static struct fb_monspecs at91fb_default_monspecs = {
5118 + .manufacturer = "HIT",
5119 + .monitor = "TX09D70VM1CCA",
5121 + .modedb = at91_tft_vga_modes,
5122 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5129 +#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5130 + | ATMEL_LCDC_DISTYPE_TFT \
5131 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5133 +static void at91_lcdc_power_control(int on)
5136 + at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
5138 + at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
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,
5152 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
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);
5163 at91_add_device_i2c();
5164 + /* LCD Controller */
5165 + at91_add_device_lcdc(&ek_lcdc_data);
5167 at91_add_device_ac97(&ek_ac97_data);
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
5174 #include <asm/arch/cpu.h>
5177 +#include "generic.h"
5181 @@ -254,6 +255,23 @@ EXPORT_SYMBOL(clk_get_rate);
5183 /*------------------------------------------------------------------------*/
5187 +int clk_must_disable(struct clk *clk)
5189 + if (!at91_suspend_entering_slow_clock())
5192 + while (clk->parent)
5193 + clk = clk->parent;
5194 + return clk != &clk32k;
5196 +EXPORT_SYMBOL(clk_must_disable);
5200 +/*------------------------------------------------------------------------*/
5202 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
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);
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 ===================================================================
5220 +++ linux-2.6.22.19/arch/arm/mach-at91/ics1523.c
5223 + * arch/arm/mach-at91rm9200/ics1523.c
5225 + * Copyright (C) 2003 ATMEL Rousset
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.
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.
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
5242 +#include <asm/hardware.h>
5243 +#include <asm/io.h>
5245 +#include <linux/clk.h>
5246 +#include <linux/delay.h>
5247 +#include <linux/err.h>
5248 +#include <linux/init.h>
5250 +#include <asm/arch/ics1523.h>
5251 +#include <asm/arch/at91_twi.h>
5252 +#include <asm/arch/gpio.h>
5255 +#define AT91_TWI_ERROR (AT91_TWI_NACK | AT91_TWI_UNRE | AT91_TWI_OVRE)
5258 +static void __iomem *twi_base;
5260 +#define at91_twi_read(reg) __raw_readl(twi_base + (reg))
5261 +#define at91_twi_write(reg, val) __raw_writel((val), twi_base + (reg))
5264 +/* -----------------------------------------------------------------------------
5265 + * Initialization of TWI CLOCK
5266 + * ----------------------------------------------------------------------------- */
5268 +static void at91_ics1523_SetTwiClock(unsigned int mck_khz)
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;
5277 + sclock = (sclock /10)- 6;
5278 + sclock = (sclock + (4 - sclock %4)) >> 2; /* div 4 */
5280 + at91_twi_write(AT91_TWI_CWGR, 0x00010000 | sclock | (sclock << 8));
5283 +/* -----------------------------------------------------------------------------
5284 + * Read a byte with TWI Interface from the Clock Generator ICS1523
5285 + * ----------------------------------------------------------------------------- */
5287 +static int at91_ics1523_ReadByte(unsigned char reg_address, unsigned char *data_in)
5289 + int Status, nb_trial;
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);
5295 + /* Program temporizing period (300us) */
5298 + /* Wait TXcomplete ... */
5300 + Status = at91_twi_read(AT91_TWI_SR);
5301 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
5303 + Status = at91_twi_read(AT91_TWI_SR);
5306 + if (Status & AT91_TWI_TXCOMP) {
5307 + *data_in = (unsigned char) at91_twi_read(AT91_TWI_RHR);
5308 + return ICS1523_ACCESS_OK;
5311 + return ICS1523_ACCESS_ERROR;
5314 +/* -----------------------------------------------------------------------------
5315 + * Write a byte with TWI Interface to the Clock Generator ICS1523
5316 + * ----------------------------------------------------------------------------- */
5318 +static int at91_ics1523_WriteByte(unsigned char reg_address, unsigned char data_out)
5320 + int Status, nb_trial;
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);
5327 + /* Program temporizing period (300us) */
5331 + Status = at91_twi_read(AT91_TWI_SR);
5332 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
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);
5338 + /* Program temporizing period (300us) */
5341 + Status = at91_twi_read(AT91_TWI_SR);
5344 + if (Status & AT91_TWI_TXCOMP)
5345 + return ICS1523_ACCESS_OK;
5347 + return ICS1523_ACCESS_ERROR;
5350 +/* -----------------------------------------------------------------------------
5351 + * Initialization of the Clock Generator ICS1523
5352 + * ----------------------------------------------------------------------------- */
5354 +int at91_ics1523_init(void)
5357 + int ack = ICS1523_ACCESS_OK;
5358 + unsigned int status = 0xffffffff;
5359 + struct clk *twi_clk;
5361 + /* Map in TWI peripheral */
5362 + twi_base = ioremap(AT91RM9200_BASE_TWI, SZ_16K);
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);
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);
5378 + /* Disable interrupts */
5379 + at91_twi_write(AT91_TWI_IDR, -1);
5381 + /* Reset peripheral */
5382 + at91_twi_write(AT91_TWI_CR, AT91_TWI_SWRST);
5384 + /* Set Master mode */
5385 + at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN);
5387 + /* Set TWI Clock Waveform Generator Register */
5388 + at91_ics1523_SetTwiClock(60000); /* MCK in KHz = 60000 KHz */
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);
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));
5405 + /* Program 1ms temporizing period */
5408 + at91_ics1523_ReadByte ((unsigned char) ICS_SR, (char *)&status);
5409 + } while (!((unsigned int) status & (unsigned int) ICS_PLLLOCK) && (nb_trial < 10));
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));
5414 + /* Program 1ms temporizing period */
5417 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0x00);
5419 + /* Program 1ms temporizing period */
5422 + /* All done - cleanup */
5423 + iounmap(twi_base);
5424 + clk_disable(twi_clk);
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
5435 Select this if you are using Sperry-Sun's KAFA board.
5438 + bool "Promwad Chub board"
5439 + depends on ARCH_AT91RM9200
5441 + Select this if you are using Promwad's Chub board.
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>
5451 + bool "KwikByte CAM60 board"
5452 + depends on ARCH_AT91SAM9260
5454 + Select this if you are using KwikByte's CAM60 board based on the Atmel AT91SAM9260.
5455 + <http://www.kwikbyte.com>
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).
5464 +config CSB300_WAKE_SW0
5465 + bool "CSB300 SW0 irq0 wakeup"
5466 + depends on MACH_CSB337 && PM
5468 + If you have a CSB300 connected to your CSB337, this lets
5469 + SW0 serve as a wakeup button. It uses IRQ0.
5471 +config CSB300_WAKE_SW1
5472 + bool "CSB300 SW1 gpio wakeup"
5473 + depends on MACH_CSB337 && PM
5475 + If you have a CSB300 connected to your CSB337, this lets
5476 + SW1 serve as a wakeup button. It uses GPIO.
5478 # ----------------------------------------------------------
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.
5486 + bool "Timer/Counter Library"
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.
5492 +config AT91_SLOW_CLOCK
5493 + bool "Suspend-to-RAM uses slow clock mode (EXPERIMENTAL)"
5494 + depends on PM && EXPERIMENTAL
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.
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 :=
5509 obj-$(CONFIG_PM) += pm.o
5510 +obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o
5511 +obj-$(CONFIG_ATMEL_TCLIB) += tclib.o
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
5522 # AT91SAM9260 board-specific support
5523 obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
5524 +obj-$(CONFIG_MACH_CAM60) += board-cam60.o
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)
5532 -#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
5533 +obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
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
5545 +#warning "SAM9260 only has 3 programmable clocks."
5546 static int at91_pm_verify_clocks(void)
5549 @@ -103,20 +104,15 @@ static int at91_pm_verify_clocks(void)
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.
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.
5563 int at91_suspend_entering_slow_clock(void)
5565 return (target_state == PM_SUSPEND_MEM);
5567 -EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5570 static void (*slow_clock)(void);
5571 @@ -205,16 +201,23 @@ static struct pm_ops at91_pm_ops ={
5572 .enter = at91_pm_enter,
5575 +#ifdef CONFIG_AT91_SLOW_CLOCK
5576 +extern void at91rm9200_slow_clock(void);
5577 +extern u32 at91rm9200_slow_clock_sz;
5580 static int __init at91_pm_init(void)
5582 - printk("AT91: Power Management\n");
5584 -#ifdef CONFIG_AT91_PM_SLOW_CLOCK
5585 - /* REVISIT allocations of SRAM should be dynamically managed.
5586 +#ifdef CONFIG_AT91_SLOW_CLOCK
5588 + * REVISIT allocations of SRAM should be dynamically managed.
5589 * FIQ handlers and other components will want SRAM/TCM too...
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");
5596 + printk("AT91: Power Management\n");
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 ===================================================================
5603 +++ linux-2.6.22.19/arch/arm/mach-at91/pm.c.orig
5606 + * arch/arm/mach-at91/pm.c
5607 + * AT91 Power Management
5609 + * Copyright (C) 2005 David Brownell
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.
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>
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>
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>
5638 +#include "generic.h"
5641 +static int at91_pm_valid_state(suspend_state_t state)
5644 + case PM_SUSPEND_ON:
5645 + case PM_SUSPEND_STANDBY:
5646 + case PM_SUSPEND_MEM:
5655 +static suspend_state_t target_state;
5658 + * Called after processes are frozen, but before we shutdown devices.
5660 +static int at91_pm_prepare(suspend_state_t state)
5662 + target_state = state;
5667 + * Verify that all the clocks are correct before entering
5668 + * slow-clock mode.
5670 +static int at91_pm_verify_clocks(void)
5672 + unsigned long scsr;
5675 + scsr = at91_sys_read(AT91_PMC_SCSR);
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");
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");
5690 +#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
5691 + /* PCK0..PCK3 must be disabled, or configured to use clk32k */
5692 + for (i = 0; i < 4; i++) {
5695 + if ((scsr & (AT91_PMC_PCK0 << i)) == 0)
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);
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.
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.
5719 +int at91_suspend_entering_slow_clock(void)
5721 + return (target_state == PM_SUSPEND_MEM);
5723 +EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5726 +static void (*slow_clock)(void);
5729 +static int at91_pm_enter(suspend_state_t state)
5731 + at91_gpio_suspend();
5732 + at91_irq_suspend();
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),
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.
5749 + case PM_SUSPEND_MEM:
5751 + * Ensure that clocks are in a valid state.
5753 + if (!at91_pm_verify_clocks())
5757 + * Enter slow clock mode by switching over to clk32k and
5758 + * turning off the main oscillator; reverse on wakeup.
5764 + /* DEVELOPMENT ONLY */
5765 + pr_info("AT91: PM - no slow clock mode yet ...\n");
5766 + /* FALLTHROUGH leaving master clock alone */
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.
5775 + case PM_SUSPEND_STANDBY:
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.
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 */
5786 + case PM_SUSPEND_ON:
5787 + asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
5791 + pr_debug("AT91: PM - bogus suspend state %d\n", state);
5795 + pr_debug("AT91: PM - wakeup %08x\n",
5796 + at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));
5799 + target_state = PM_SUSPEND_ON;
5800 + at91_irq_resume();
5801 + at91_gpio_resume();
5806 +static struct pm_ops at91_pm_ops ={
5807 + .valid = at91_pm_valid_state,
5808 + .prepare = at91_pm_prepare,
5809 + .enter = at91_pm_enter,
5812 +static int __init at91_pm_init(void)
5814 + printk("AT91: Power Management\n");
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...
5820 + slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
5821 + memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
5824 + /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
5825 + at91_sys_write(AT91_SDRAMC_LPR, 0);
5827 + pm_set_ops(&at91_pm_ops);
5831 +arch_initcall(at91_pm_init);
5832 Index: linux-2.6.22.19/arch/arm/mach-at91/pm_slowclock.S
5833 ===================================================================
5835 +++ linux-2.6.22.19/arch/arm/mach-at91/pm_slowclock.S
5838 + * arch/arm/mach-at91/pm_slow_clock.S
5840 + * Copyright (C) 2006 Savin Zlobec
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.
5848 +#include <linux/linkage.h>
5849 +#include <asm/hardware.h>
5850 +#include <asm/arch/at91_pmc.h>
5851 +#include <asm/arch/at91rm9200_mc.h>
5853 +#define MCKRDY_TIMEOUT 1000
5854 +#define MOSCRDY_TIMEOUT 1000
5855 +#define PLLALOCK_TIMEOUT 1000
5857 + .macro wait_mckrdy
5858 + mov r2, #MCKRDY_TIMEOUT
5862 + ldr r3, [r1, #AT91_PMC_SR]
5863 + tst r3, #AT91_PMC_MCKRDY
5868 + .macro wait_moscrdy
5869 + mov r2, #MOSCRDY_TIMEOUT
5873 + ldr r3, [r1, #AT91_PMC_SR]
5874 + tst r3, #AT91_PMC_MOSCS
5879 + .macro wait_pllalock
5880 + mov r2, #PLLALOCK_TIMEOUT
5884 + ldr r3, [r1, #AT91_PMC_SR]
5885 + tst r3, #AT91_PMC_LOCKA
5890 + .macro wait_plladis
5891 + mov r2, #PLLALOCK_TIMEOUT
5895 + ldr r3, [r1, #AT91_PMC_SR]
5896 + tst r3, #AT91_PMC_LOCKA
5903 +ENTRY(at91rm9200_slow_clock)
5905 + ldr r1, .at91_va_base_sys
5907 + /* Put SDRAM in self refresh mode */
5911 +1: mcr p15, 0, r0, c7, c10, 4
5913 + str r2, [r1, #AT91_SDRAMC_SRR]
5915 + /* Save Master clock setting */
5917 + ldr r2, [r1, #AT91_PMC_MCKR]
5918 + str r2, .saved_mckr
5921 + * Set the Master clock source to slow clock
5923 + * First set the CSS field, wait for MCKRDY
5924 + * and than set the PRES and MDIV fields.
5926 + * See eratta #2[78] for details.
5930 + str r2, [r1, #AT91_PMC_MCKR]
5935 + str r2, [r1, #AT91_PMC_MCKR]
5937 + /* Save PLLA setting and disable it */
5939 + ldr r2, [r1, #AT91_CKGR_PLLAR]
5940 + str r2, .saved_pllar
5943 + str r2, [r1, #AT91_CKGR_PLLAR]
5947 + /* Turn off the main oscillator */
5949 + ldr r2, [r1, #AT91_CKGR_MOR]
5950 + bic r2, r2, #AT91_PMC_MOSCEN
5951 + str r2, [r1, #AT91_CKGR_MOR]
5953 + /* Wait for interrupt */
5955 + mcr p15, 0, r0, c7, c0, 4
5957 + /* Turn on the main oscillator */
5959 + ldr r2, [r1, #AT91_CKGR_MOR]
5960 + orr r2, r2, #AT91_PMC_MOSCEN
5961 + str r2, [r1, #AT91_CKGR_MOR]
5965 + /* Restore PLLA setting */
5967 + ldr r2, .saved_pllar
5968 + str r2, [r1, #AT91_CKGR_PLLAR]
5973 + * Restore master clock setting
5975 + * First set PRES if it was not 0,
5976 + * than set CSS and MDIV fields.
5977 + * After every change wait for
5980 + * See eratta #2[78] for details.
5983 + ldr r2, .saved_mckr
5987 + str r2, [r1, #AT91_PMC_MCKR]
5991 +2: ldr r2, .saved_mckr
5992 + str r2, [r1, #AT91_PMC_MCKR]
6005 + .word AT91_VA_BASE_SYS
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 ===================================================================
6012 +++ linux-2.6.22.19/arch/arm/mach-at91/tclib.c
6014 +#include <linux/clk.h>
6015 +#include <linux/kernel.h>
6016 +#include <linux/module.h>
6020 +static struct atmel_tcblock *blocks;
6021 +static int nblocks;
6024 + * Called from the processor-specific init to register the TC Blocks.
6026 +void __init atmel_tc_init(struct atmel_tcblock *tcblocks, int n)
6028 + blocks = tcblocks;
6031 Index: linux-2.6.22.19/arch/arm/mach-at91/tclib.h
6032 ===================================================================
6034 +++ linux-2.6.22.19/arch/arm/mach-at91/tclib.h
6037 +#define TC_PER_TCB 3
6039 +struct atmel_tcblock {
6041 + void __iomem *ioaddr;
6042 + struct clk *clk[TC_PER_TCB];
6043 + int irq[TC_PER_TCB];
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
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
6066 #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
6067 #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
6069 -#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */
6070 +#define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL only] */
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
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 {
6095 extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
6098 +extern void __init at91_add_device_isi(void);
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);
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 */
6112 +extern void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr);
6115 Index: linux-2.6.22.19/include/asm-arm/arch-at91/ics1523.h
6116 ===================================================================
6118 +++ linux-2.6.22.19/include/asm-arm/arch-at91/ics1523.h
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.
6132 +//* 1.0 08/28/02 ED : Creation
6133 +//* 1.2 13/01/03 FB : Update on lib V3
6134 +//*----------------------------------------------------------------------------
6139 +/*-------------------------------------------*/
6140 +/* ICS1523 TWI Serial Clock Definition */
6141 +/*-------------------------------------------*/
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 */
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 */
6150 +/*-------------------------------------------*/
6151 +/* ICS1523 Write Operation Definition */
6152 +/*-------------------------------------------*/
6154 +#define ICS1523_ACCESS_OK 0 /* OK */
6155 +#define ICS1523_ACCESS_ERROR -1 /* NOK */
6157 +/*-------------------------------------------*/
6158 +/* ICS1523 Device Addresses Definition */
6159 +/*-------------------------------------------*/
6161 +#define ICS_ADDR 0x26 /* Device Address */
6163 +/*--------------------------------------------------*/
6164 +/* ICS1523 Registers Internal Addresses Definition */
6165 +/*--------------------------------------------------*/
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 */
6180 +/*------------------------------------------------------*/
6181 +/* ICS1523 Input Control Register Bits Definition */
6182 +/*------------------------------------------------------*/
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 */
6193 +/*-----------------------------------------------------*/
6194 +/* ICS1523 Loop Control Register Bits Definition */
6195 +/*-----------------------------------------------------*/
6197 +#define ICS_PFD 0x7 /* Phase Detector Gain */
6198 +#define ICS_PSD 0x30 /* Post-Scaler Divider */
6200 +/*----------------------------------------------------*/
6201 +/* ICS1523 PLL FeedBack Divider LSBs Definition */
6202 +/*----------------------------------------------------*/
6204 +#define ICS_FBDL 0xFF /* PLL FeedBack Divider LSBs */
6206 +/*----------------------------------------------------*/
6207 +/* ICS1523 PLL FeedBack Divider MSBs Definition */
6208 +/*----------------------------------------------------*/
6210 +#define ICS_FBDM 0xF /* PLL FeedBack Divider MSBs */
6212 +/*------------------------------------------------------------*/
6213 +/* ICS1523 Dynamic Phase Aligner Offset Bits Definition */
6214 +/*------------------------------------------------------------*/
6216 +#define ICS_DPAOS 0x2F /* Dynamic Phase Aligner Offset */
6217 +#define ICS_FILSEL 0x80 /* Loop Filter Select */
6219 +/*----------------------------------------------------------------*/
6220 +/* ICS1523 Dynamic Phase Aligner Resolution Bits Definition */
6221 +/*----------------------------------------------------------------*/
6223 +#define ICS_DPARES 0x3 /* Dynamic Phase Aligner Resolution */
6224 +#define ICS_MMREV 0xFC /* Metal Mask Revision Number */
6226 +/*-------------------------------------------------------*/
6227 +/* ICS1523 Output Enables Register Bits Definition */
6228 +/*-------------------------------------------------------*/
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 */
6238 +/*----------------------------------------------------*/
6239 +/* ICS1523 Osc Divider Register Bits Definition */
6240 +/*----------------------------------------------------*/
6242 +#define ICS_OSCDIV 0x7F /* Oscillator Divider Modulus */
6243 +#define ICS_INSEL 0x80 /* Input Select */
6245 +/*---------------------------------------------------*/
6246 +/* ICS1523 DPA & PLL Reset Register Definition */
6247 +/*---------------------------------------------------*/
6249 +#define ICS_DPAR 0x0A /* DPA Reset Command */
6250 +#define ICS_PLLR 0x50 /* PLL Reset Command */
6252 +/*------------------------------------------------*/
6253 +/* ICS1523 Chip Version Register Definition */
6254 +/*------------------------------------------------*/
6256 +#define ICS_CHIPV 0xFF /* Chip Version */
6258 +/*-------------------------------------------------*/
6259 +/* ICS1523 Chip Revision Register Definition */
6260 +/*-------------------------------------------------*/
6262 +#define ICS_CHIPR 0xFF /* Chip Revision */
6264 +/*------------------------------------------*/
6265 +/* ICS1523 Status Register Definition */
6266 +/*------------------------------------------*/
6268 +#define ICS_DPALOCK 0x1 /* DPA Lock Status */
6269 +#define ICS_PLLLOCK 0x2 /* PLL Lock Status */
6271 +int at91_ics1523_init(void);
6273 +#endif /* ics1523_h */
6274 Index: linux-2.6.22.19/include/asm-arm/arch-at91/spi.h
6275 ===================================================================
6277 +++ linux-2.6.22.19/include/asm-arm/arch-at91/spi.h
6280 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200
6282 + * (c) SAN People (Pty) Ltd
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.
6290 +#ifndef AT91_LEGACY_SPI_H
6291 +#define AT91_LEGACY_SPI_H
6293 +#define SPI_MAJOR 153 /* registered device number */
6295 +#define DEFAULT_SPI_CLK 6000000
6298 +/* Maximum number of buffers in a single SPI transfer.
6299 + * DataFlash uses maximum of 2
6300 + * spidev interface supports up to 8.
6302 +#define MAX_SPI_TRANSFERS 8
6303 +#define NR_SPI_DEVICES 4 /* number of devices on SPI bus */
6306 + * Describes the buffers for a SPI transfer.
6307 + * A transmit & receive buffer must be specified for each transfer
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 */
6319 + unsigned int pcs; /* Peripheral Chip Select value */
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 */
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);
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
6339 struct clk *clk_get_parent(struct clk *clk);
6342 + * clk_must_disable - report whether a clock's users must disable it
6343 + * @clk: one node in the clock tree
6345 + * This routine returns true only if the upcoming system state requires
6346 + * disabling the specified clock.
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.
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.
6359 +int clk_must_disable(struct clk *clk);
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
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 */
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
6379 #include <sound/soc.h>
6380 #include <sound/soc-dapm.h>
6382 -#include <asm/arch/hardware.h>
6383 -#include <asm/arch/at91_pio.h>
6384 +#include <asm/hardware.h>
6385 #include <asm/arch/gpio.h>
6387 #include "../codecs/wm8731.h"
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)
6399 static struct clk *pck1_clk;
6400 static struct clk *pllb_clk;
6402 @@ -277,7 +269,6 @@ static struct platform_device *eti_b1_sn
6403 static int __init eti_b1_init(void)
6406 - u32 ssc_pio_lines;
6407 struct at91_ssc_periph *ssc = eti_b1_dai.cpu_dai->private_data;
6409 if (!request_mem_region(AT91RM9200_BASE_SSC1, SZ_16K, "soc-audio")) {
6410 @@ -311,19 +302,12 @@ static int __init eti_b1_init(void)
6414 - ssc_pio_lines = AT91_PIO_TF1 | AT91_PIO_TK1 | AT91_PIO_TD1
6415 - | AT91_PIO_RD1 /* | AT91_PIO_RK1 */ | AT91_PIO_RF1;
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 */
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 ===================================================================
6439 +++ linux-2.6.22.19/drivers/char/at91_spi.c
6442 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200 (Thunder)
6444 + * Copyright (C) SAN People (Pty) Ltd
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.
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>
6464 +#include <asm/arch/at91_spi.h>
6465 +#include <asm/arch/board.h>
6466 +#include <asm/arch/spi.h>
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 */
6477 +DECLARE_COMPLETION(transfer_complete);
6480 +#define at91_spi_read(reg) __raw_readl(spi_base + (reg))
6481 +#define at91_spi_write(reg, val) __raw_writel((val), spi_base + (reg))
6484 +/* ......................................................................... */
6487 + * Access and enable the SPI bus.
6488 + * This MUST be called before any transfers are performed.
6490 +void spi_access_bus(short device)
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");
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 */
6500 + printk("SPI on\n");
6505 + /* Lock the SPI bus */
6507 + current_device = device;
6509 + /* Configure SPI bus for device */
6510 + at91_spi_write(AT91_SPI_MR, AT91_SPI_MSTR | AT91_SPI_MODFDIS | (spi_dev[device].pcs << 16));
6514 + * Relinquish control of the SPI bus.
6516 +void spi_release_bus(short device)
6518 + if (device != current_device)
6519 + panic("at91_spi: spi_release called with invalid device");
6521 + /* Release the SPI bus */
6522 + current_device = -1;
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 */
6530 + printk("SPI off\n");
6536 + * Perform a data transfer over the SPI bus
6538 +int spi_transfer(struct spi_transfer_list* list)
6540 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
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");
6549 + printk("SPI transfer start [%i]\n", list->nr_transfers);
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;
6555 + /* Store transfer list */
6556 + device->xfers = list;
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);
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);
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);
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);
6581 + device->txnext = 0;
6582 + device->rxnext = 0;
6583 + at91_spi_write(ATMEL_PDC_TNCR, 0);
6584 + at91_spi_write(ATMEL_PDC_RNCR, 0);
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.
6593 + /* Enable transmitter and receiver */
6594 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTEN | ATMEL_PDC_TXTEN);
6596 + at91_spi_write(AT91_SPI_IER, AT91_SPI_ENDRX); /* enable buffer complete interrupt */
6597 + wait_for_completion(&transfer_complete);
6600 + printk("SPI transfer end\n");
6606 +/* ......................................................................... */
6609 + * Handle interrupts from the SPI controller.
6611 +static irqreturn_t at91spi_interrupt(int irq, void *dev_id)
6613 + unsigned int status;
6614 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
6615 + struct spi_transfer_list *list = device->xfers;
6618 + printk("SPI interrupt %i\n", current_device);
6622 + panic("at91_spi: spi_interrupt with a NULL transfer list");
6624 + status = at91_spi_read(AT91_SPI_SR) & at91_spi_read(AT91_SPI_IMR); /* read status */
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);
6629 + device->tx = device->txnext; /* move next transfer to current transfer */
6630 + device->rx = device->rxnext;
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 */
6636 + /* Disable transmitter and receiver */
6637 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
6639 + device->xfers = NULL;
6640 + complete(&transfer_complete);
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);
6649 + int i = (list->curr)+1;
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;
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);
6661 + return IRQ_HANDLED;
6664 +/* ......................................................................... */
6667 + * Initialize the SPI controller
6669 +static int __init at91spi_probe(struct platform_device *pdev)
6672 + unsigned long scbr;
6673 + struct resource *res;
6675 + init_MUTEX(&spi_lock);
6677 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6681 + if (!request_mem_region(res->start, res->end - res->start + 1, "at91_spi"))
6684 + spi_base = ioremap(res->start, res->end - res->start + 1);
6686 + release_mem_region(res->start, res->end - res->start + 1);
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);
6698 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SWRST); /* software reset of SPI controller */
6701 + * Calculate the correct SPI baud-rate divisor.
6703 + scbr = clk_get_rate(spi_clk) / (2 * DEFAULT_SPI_CLK);
6704 + scbr = scbr + 1; /* round up */
6706 + printk(KERN_INFO "at91_spi: Baud rate set to %ld\n", clk_get_rate(spi_clk) / (2 * scbr));
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));
6713 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
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;
6721 + if (request_irq(AT91RM9200_ID_SPI, at91spi_interrupt, 0, "spi", NULL)) {
6723 + iounmap(spi_base);
6724 + release_mem_region(res->start, res->end - res->start + 1);
6728 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIEN); /* Enable SPI */
6733 +static int __devexit at91spi_remove(struct platform_device *pdev)
6735 + struct resource *res;
6737 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIDIS); /* Disable SPI */
6740 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6741 + iounmap(spi_base);
6742 + release_mem_region(res->start, res->end - res->start + 1);
6744 + free_irq(AT91RM9200_ID_SPI, 0);
6748 +static struct platform_driver at91spi_driver = {
6749 + .probe = at91spi_probe,
6750 + .remove = __devexit_p(at91spi_remove),
6752 + .name = "at91_spi",
6753 + .owner = THIS_MODULE,
6757 +static int __init at91spi_init(void)
6759 + return platform_driver_register(&at91spi_driver);
6762 +static void __exit at91spi_exit(void)
6764 + platform_driver_unregister(&at91spi_driver);
6767 +EXPORT_SYMBOL(spi_access_bus);
6768 +EXPORT_SYMBOL(spi_release_bus);
6769 +EXPORT_SYMBOL(spi_transfer);
6771 +module_init(at91spi_init);
6772 +module_exit(at91spi_exit);
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 ===================================================================
6780 +++ linux-2.6.22.19/drivers/char/at91_spidev.c
6783 + * User-space interface to the SPI bus on Atmel AT91RM9200
6785 + * Copyright (C) 2003 SAN People (Pty) Ltd
6787 + * Based on SPI driver by Rick Bronson
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.
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>
6802 +#ifdef CONFIG_DEVFS_FS
6803 +#include <linux/devfs_fs_kernel.h>
6807 +#undef DEBUG_SPIDEV
6809 +/* ......................................................................... */
6812 + * Read or Write to SPI bus.
6814 +static ssize_t spidev_rd_wr(struct file *file, char *buf, size_t count, loff_t *offset)
6816 + unsigned int spi_device = (unsigned int) file->private_data;
6818 + struct mm_struct * mm;
6819 + struct page ** maplist;
6820 + struct spi_transfer_list* list;
6823 + unsigned int ofs, pagelen;
6830 + list = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
6837 + pgcount = ((unsigned long)buf+count+PAGE_SIZE-1)/PAGE_SIZE - (unsigned long)buf/PAGE_SIZE;
6839 + if (pgcount >= MAX_SPI_TRANSFERS) {
6844 + maplist = kmalloc (pgcount * sizeof (struct page *), GFP_KERNEL);
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);
6862 +#ifdef DEBUG_SPIDEV
6863 + printk("spidev_rd_rw: %i %i\n", count, pgcount);
6866 + /* Set default return value = transfer length */
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
6875 + ofs = (unsigned long) buf & (PAGE_SIZE -1);
6876 + pagelen = PAGE_SIZE - ofs;
6877 + if (count < pagelen)
6880 + for (i = 0; i < pgcount; i++) {
6881 + flush_dcache_page(maplist[i]);
6883 + list->tx[i] = list->rx[i] = page_address(maplist[i]) + ofs;
6884 + list->txlen[i] = list->rxlen[i] = pagelen;
6886 +#ifdef DEBUG_SPIDEV
6887 + printk(" %i: %x (%i)\n", i, list->tx[i], list->txlen[i]);
6890 + ofs = 0; /* all subsequent transfers start at beginning of a page */
6891 + count = count - pagelen;
6892 + pagelen = (count < PAGE_SIZE) ? count : PAGE_SIZE;
6894 + list->nr_transfers = pgcount;
6896 + /* Perform transfer on SPI bus */
6897 + spi_access_bus(spi_device);
6898 + spi_transfer(list);
6899 + spi_release_bus(spi_device);
6901 + while (pgcount--) {
6902 + page_cache_release (maplist[pgcount]);
6904 + flush_cache_all();
6912 +static int spidev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
6914 + int spi_device = MINOR(inode->i_rdev);
6916 + if (spi_device >= NR_SPI_DEVICES)
6919 + // TODO: This interface can be used to configure the SPI bus.
6920 + // Configurable options could include: Speed, Clock Polarity, Clock Phase
6924 + return -ENOIOCTLCMD;
6929 + * Open the SPI device
6931 +static int spidev_open(struct inode *inode, struct file *file)
6933 + unsigned int spi_device = MINOR(inode->i_rdev);
6935 + if (spi_device >= NR_SPI_DEVICES)
6939 + * 'private_data' is actually a pointer, but we overload it with the
6940 + * value we want to store.
6942 + file->private_data = (void *)spi_device;
6948 + * Close the SPI device
6950 +static int spidev_close(struct inode *inode, struct file *file)
6955 +/* ......................................................................... */
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,
6968 + * Install the SPI /dev interface driver
6970 +static int __init at91_spidev_init(void)
6972 +#ifdef CONFIG_DEVFS_FS
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);
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);
6987 + printk(KERN_INFO "AT91 SPI driver loaded\n");
6993 + * Remove the SPI /dev interface driver
6995 +static void __exit at91_spidev_exit(void)
6997 +#ifdef CONFIG_DEVFS_FS
6999 + for (i = 0; i < NR_SPI_DEVICES; i++) {
7000 + devfs_remove("spi/%d", i);
7003 + devfs_remove("spi");
7006 + if (unregister_chrdev(SPI_MAJOR, "spi")) {
7007 + printk(KERN_ERR "at91_spidev: Unable to release major %d for SPI bus\n", SPI_MAJOR);
7012 +module_init(at91_spidev_init);
7013 +module_exit(at91_spidev_exit);
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
7024 source "drivers/s390/char/Kconfig"
7027 + bool "SPI driver (legacy) for AT91RM9200 processors"
7028 + depends on ARCH_AT91RM9200
7031 + The SPI driver gives access to this serial bus on the AT91RM9200
7035 + bool "SPI device interface (legacy) for AT91RM9200 processors"
7036 + depends on ARCH_AT91RM9200 && AT91_SPI
7039 + The SPI driver gives user mode access to this serial
7040 + bus on the AT91RM9200 processor.
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
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
7062 #include <asm/arch/board.h>
7063 #include <asm/arch/cpu.h>
7065 -#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */
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");
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 */
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 */
7082 while (cdiv > 255) {
7083 @@ -61,11 +64,12 @@ static void __devinit at91_twi_hwinit(vo
7087 - if (cpu_is_at91rm9200()) { /* AT91RM9200 Errata #22 */
7089 - printk(KERN_ERR "AT91 I2C: Invalid TWI_CLOCK value!\n");
7092 + if (cpu_is_at91rm9200() && (ckdiv > 5)) { /* AT91RM9200 Errata #22 */
7093 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
7095 + } else if (ckdiv > 7) {
7096 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
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 ===================================================================
7104 +++ linux-2.6.22.19/drivers/i2c/busses/i2c-pca.c
7107 + * Platform driver for PCA9564 I2C bus controller.
7109 + * (C) 2006 Andrew Victor
7111 + * Based on i2c-pca-isa.c driver for PCA9564 on ISA boards
7112 + * Copyright (C) 2004 Arcom Control Systems
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.
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.
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.
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>
7138 +#include <linux/i2c.h>
7139 +#include <linux/i2c-algo-pca.h>
7141 +#include <asm/io.h>
7143 +#include "../algos/i2c-algo-pca.h"
7145 +#define PCA_OWN_ADDRESS 0x55 /* our address for slave mode */
7146 +#define PCA_CLOCK I2C_PCA_CON_59kHz
7148 +//#define REG_SHIFT 2
7149 +#define REG_SHIFT 0
7153 +#define PCA_IO_SIZE 4
7155 +static void __iomem *base_addr;
7157 +static wait_queue_head_t pca_wait;
7159 +static int pca_getown(struct i2c_algo_pca_data *adap)
7161 + return PCA_OWN_ADDRESS;
7164 +static int pca_getclock(struct i2c_algo_pca_data *adap)
7169 +static void pca_writebyte(struct i2c_algo_pca_data *adap, int reg, int val)
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);
7176 + outb(val, base_addr + (reg << REG_SHIFT));
7179 +static int pca_readbyte(struct i2c_algo_pca_data *adap, int reg)
7184 + res = inb(base_addr + (reg << REG_SHIFT));
7187 + static char *names[] = { "STA", "DAT", "ADR", "CON" };
7188 + printk("*** read %s => %#04x\n", names[reg], res);
7194 +static int pca_waitforinterrupt(struct i2c_algo_pca_data *adap)
7199 + ret = wait_event_interruptible(pca_wait,
7200 + pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI);
7202 + while ((pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
7208 +static irqreturn_t pca_handler(int this_irq, void *dev_id)
7210 + wake_up_interruptible(&pca_wait);
7211 + return IRQ_HANDLED;
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,
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,
7230 +static int __devinit pca_i2c_probe(struct platform_device *pdev)
7232 + struct resource *res;
7234 + init_waitqueue_head(&pca_wait);
7236 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7240 + if (!request_mem_region(res->start, PCA_IO_SIZE, "PCA9564"))
7243 + base_addr = ioremap(res->start, PCA_IO_SIZE);
7244 + if (base_addr == NULL)
7247 + irq = platform_get_irq(pdev, 0);
7249 + if (request_irq(irq, pca_handler, 0, "pca9564", NULL) < 0) {
7250 + printk(KERN_ERR "i2c-pca: Request irq%d failed\n", irq);
7255 + /* set up the driverfs linkage to our parent device */
7256 + pca_i2c_ops.dev.parent = &pdev->dev;
7258 + if (i2c_pca_add_bus(&pca_i2c_ops) < 0) {
7259 + printk(KERN_ERR "i2c-pca: Failed to add i2c bus\n");
7267 + free_irq(irq, &pca_i2c_ops);
7270 + iounmap(base_addr);
7273 + release_mem_region(res->start, PCA_IO_SIZE);
7277 +static int __devexit pca_i2c_remove(struct platform_device *pdev)
7279 + struct resource *res;
7281 + i2c_del_adapter(&pca_i2c_ops);
7284 + free_irq(irq, NULL);
7286 + iounmap(base_addr);
7288 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7289 + release_mem_region(res->start, PCA_IO_SIZE);
7294 +static struct platform_driver pca_i2c_driver = {
7295 + .probe = pca_i2c_probe,
7296 + .remove = __devexit_p(pca_i2c_remove),
7298 + .name = "pca9564",
7299 + .owner = THIS_MODULE,
7303 +static int __init pca_i2c_init(void)
7305 + return platform_driver_register(&pca_i2c_driver);
7308 +static void __exit pca_i2c_exit(void)
7310 + platform_driver_unregister(&pca_i2c_driver);
7313 +module_init(pca_i2c_init);
7314 +module_exit(pca_i2c_exit);
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
7327 +config I2C_AT91_CLOCKRATE
7328 + prompt "Atmel AT91 I2C/TWI clock-rate"
7329 + depends on I2C_AT91
7333 + Set the AT91 I2C/TWI clock-rate.
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.
7343 + tristate "PCA9564"
7345 + select I2C_ALGOPCA
7347 + This driver support the Philips PCA 9564 Parallel bus to I2C
7351 tristate "PCA9564 on an ISA bus"
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
7374 + tristate "LED support using AT91 GPIOs"
7375 + depends on LEDS_CLASS && ARCH_AT91 && !LEDS
7377 + This option enables support for LEDs connected to GPIO lines
7378 + on AT91-based boards.
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 ===================================================================
7386 +++ linux-2.6.22.19/drivers/leds/leds-at91.c
7389 + * AT91 GPIO based LED driver
7391 + * Copyright (C) 2006 David Brownell
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.
7398 +#include <linux/kernel.h>
7399 +#include <linux/init.h>
7400 +#include <linux/platform_device.h>
7401 +#include <linux/leds.h>
7403 +#include <asm/arch/board.h>
7404 +#include <asm/arch/gpio.h>
7406 +static LIST_HEAD(at91_led_list); /* list of AT91 LEDs */
7409 + struct led_classdev cdev;
7410 + struct list_head list;
7411 + struct at91_gpio_led *led_data;
7415 + * Change the state of the LED.
7417 +static void at91_led_set(struct led_classdev *cdev, enum led_brightness value)
7419 + struct at91_led *led = container_of(cdev, struct at91_led, cdev);
7420 + short active = (value == LED_OFF);
7422 + if (led->led_data->flags & 1) /* active high/low? */
7424 + at91_set_gpio_value(led->led_data->gpio, active);
7427 +static int __devexit at91_led_remove(struct platform_device *pdev)
7429 + struct at91_led *led;
7431 + list_for_each_entry (led, &at91_led_list, list)
7432 + led_classdev_unregister(&led->cdev);
7434 +#warning "Free allocated memory"
7435 + // TODO: Free memory. kfree(led);
7440 +static int __init at91_led_probe(struct platform_device *pdev)
7443 + struct at91_gpio_led *pdata = pdev->dev.platform_data;
7445 + struct at91_led *led;
7450 + nr_leds = pdata->index; /* first index stores number of LEDs */
7452 + while (nr_leds--) {
7453 + led = kzalloc(sizeof(struct at91_led), GFP_KERNEL);
7455 + dev_err(&pdev->dev, "No memory for device\n");
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;
7464 + status = led_classdev_register(&pdev->dev, &led->cdev);
7466 + dev_err(&pdev->dev, "led_classdev_register failed - %d\n", status);
7468 + at91_led_remove(pdev);
7471 + list_add(&led->list, &at91_led_list);
7478 +static int at91_led_suspend(struct platform_device *dev, pm_message_t state)
7480 + struct at91_led *led;
7482 + list_for_each_entry (led, &at91_led_list, list)
7483 + led_classdev_suspend(&led->cdev);
7488 +static int at91_led_resume(struct platform_device *dev)
7490 + struct at91_led *led;
7492 + list_for_each_entry (led, &at91_led_list, list)
7493 + led_classdev_resume(&led->cdev);
7498 +#define at91_led_suspend NULL
7499 +#define at91_led_resume NULL
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,
7508 + .name = "at91_leds",
7509 + .owner = THIS_MODULE,
7513 +static int __init at91_led_init(void)
7515 + return platform_driver_register(&at91_led_driver);
7517 +module_init(at91_led_init);
7519 +static void __exit at91_led_exit(void)
7521 + platform_driver_unregister(&at91_led_driver);
7523 +module_exit(at91_led_exit);
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
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
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)
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]);
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;
7564 @@ -663,15 +661,15 @@ static irqreturn_t at91_mci_irq(int irq,
7566 int_status = at91_mci_read(host, AT91_MCI_SR);
7567 int_mask = at91_mci_read(host, AT91_MCI_IMR);
7570 pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask,
7571 int_status & int_mask);
7574 int_status = int_status & int_mask;
7576 if (int_status & AT91_MCI_ERRORS) {
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;
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
7596 + device_init_wakeup(&pdev->dev, 1);
7599 * monitor card insertion/removal if we can
7601 @@ -922,6 +922,8 @@ static int __exit at91_mci_remove(struct
7603 host = mmc_priv(mmc);
7605 + device_init_wakeup(&pdev->dev, 0);
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)
7613 struct mmc_host *mmc = platform_get_drvdata(pdev);
7614 + struct at91mci_host *host = mmc_priv(mmc);
7617 + if (device_may_wakeup(&pdev->dev))
7618 + enable_irq_wake(host->board->det_pin);
7621 ret = mmc_suspend_host(mmc, state);
7623 @@ -960,8 +966,12 @@ static int at91_mci_suspend(struct platf
7624 static int at91_mci_resume(struct platform_device *pdev)
7626 struct mmc_host *mmc = platform_get_drvdata(pdev);
7627 + struct at91mci_host *host = mmc_priv(mmc);
7630 + if (device_may_wakeup(&pdev->dev))
7631 + disable_irq_wake(host->board->det_pin);
7634 ret = mmc_resume_host(mmc);
7636 Index: linux-2.6.22.19/drivers/mtd/devices/at91_dataflash.c
7637 ===================================================================
7639 +++ linux-2.6.22.19/drivers/mtd/devices/at91_dataflash.c
7642 + * Atmel DataFlash driver for Atmel AT91RM9200 (Thunder)
7644 + * Copyright (C) SAN People (Pty) Ltd
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.
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>
7659 +#include <asm/arch/spi.h>
7661 +#undef DEBUG_DATAFLASH
7663 +#define DATAFLASH_MAX_DEVICES 4 /* max number of dataflash devices */
7664 +#undef DATAFLASH_ALWAYS_ADD_DEVICE /* always add whole device when using partitions? */
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
7672 +#define OP_ERASE_PAGE 0x81
7673 +#define OP_ERASE_BLOCK 0x50
7675 +#define OP_TRANSFER_BUF1 0x53
7676 +#define OP_TRANSFER_BUF2 0x55
7677 +#define OP_COMPARE_BUF1 0x60
7678 +#define OP_COMPARE_BUF2 0x61
7680 +#define OP_PROGRAM_VIA_BUF1 0x82
7681 +#define OP_PROGRAM_VIA_BUF2 0x85
7683 +struct dataflash_local
7685 + int spi; /* SPI chip-select number */
7687 + unsigned int page_size; /* number of bytes per page */
7688 + unsigned short page_offset; /* page offset in flash address */
7692 +/* Detected DataFlash devices */
7693 +static struct mtd_info* mtd_devices[DATAFLASH_MAX_DEVICES];
7694 +static int nr_devices = 0;
7696 +/* ......................................................................... */
7698 +#ifdef CONFIG_MTD_PARTITIONS
7700 +static struct mtd_partition static_partitions_2M[] =
7703 + .name = "bootloader",
7705 + .size = 1 * 32 * 8 * 528, /* 1st sector = 32 blocks * 8 pages * 528 bytes */
7706 + .mask_flags = MTD_WRITEABLE, /* read-only */
7710 + .offset = MTDPART_OFS_NXTBLK,
7711 + .size = 6 * 32 * 8 * 528, /* 6 sectors */
7714 + .name = "filesystem",
7715 + .offset = MTDPART_OFS_NXTBLK,
7716 + .size = MTDPART_SIZ_FULL, /* rest = 9 sectors */
7720 +static struct mtd_partition static_partitions_4M[] =
7723 + .name = "bootloader",
7725 + .size = 1 * 64 * 8 * 528, /* 1st sector = 64 blocks * 8 pages * 528 bytes */
7726 + .mask_flags = MTD_WRITEABLE, /* read-only */
7730 + .offset = MTDPART_OFS_NXTBLK,
7731 + .size = 4 * 64 * 8 * 528, /* 4 sectors */
7734 + .name = "filesystem",
7735 + .offset = MTDPART_OFS_NXTBLK,
7736 + .size = MTDPART_SIZ_FULL, /* rest = 11 sectors */
7740 +#if defined(CONFIG_MACH_KAFA)
7741 +static struct mtd_partition static_partitions_8M[] =
7746 + size: 16 * 1056, /* 160 Kb */
7747 + mask_flags: MTD_WRITEABLE, /* read-only */
7751 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7752 + size: 128 * 1056, /* 1 MB */
7756 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7757 + size: 1024 * 1056, /* 1 MB */
7760 + name: "filesystem",
7761 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7762 + size: MTDPART_SIZ_FULL,
7766 +#elif defined(CONFIG_MACH_MULTMDP)
7768 +static struct mtd_partition static_partitions_8M[] =
7771 + .name = "bootloader",
7773 + .size = 12 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7774 + .mask_flags = MTD_WRITEABLE, /* read-only */
7777 + .name = "configuration",
7778 + .offset = MTDPART_OFS_NXTBLK,
7779 + .size = 20 * 1056,
7783 + .offset = MTDPART_OFS_NXTBLK,
7784 + .size = 1520 * 1056,
7787 + .name = "filesystem",
7788 + .offset = MTDPART_OFS_NXTBLK,
7789 + .size = MTDPART_SIZ_FULL,
7795 +static struct mtd_partition static_partitions_8M[] =
7798 + .name = "bootloader",
7800 + .size = 1 * 32 * 8 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7801 + .mask_flags = MTD_WRITEABLE, /* read-only */
7805 + .offset = MTDPART_OFS_NXTBLK,
7806 + .size = 5 * 32 * 8 * 1056, /* 5 sectors */
7809 + .name = "filesystem",
7810 + .offset = MTDPART_OFS_NXTBLK,
7811 + .size = MTDPART_SIZ_FULL, /* rest = 26 sectors */
7816 +static const char *part_probes[] = { "cmdlinepart", NULL, };
7820 +/* ......................................................................... */
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;
7830 + * Perform a SPI transfer to access the DataFlash device.
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)
7835 + struct spi_transfer_list* list = spi_transfer_desc;
7837 + list->tx[0] = tx; list->txlen[0] = tx_len;
7838 + list->rx[0] = rx; list->rxlen[0] = rx_len;
7840 + list->tx[1] = txnext; list->txlen[1] = txnext_len;
7841 + list->rx[1] = rxnext; list->rxlen[1] = rxnext_len;
7843 + list->nr_transfers = nr;
7845 + return spi_transfer(list);
7848 +/* ......................................................................... */
7851 + * Poll the DataFlash device until it is READY.
7853 +static void at91_dataflash_waitready(void)
7855 + char* command = kmalloc(2, GFP_KERNEL);
7861 + command[0] = OP_READ_STATUS;
7864 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7865 + } while ((command[1] & 0x80) == 0);
7871 + * Return the status of the DataFlash device.
7873 +static unsigned short at91_dataflash_status(void)
7875 + unsigned short status;
7876 + char* command = kmalloc(2, GFP_KERNEL);
7881 + command[0] = OP_READ_STATUS;
7884 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7885 + status = command[1];
7891 +/* ......................................................................... */
7894 + * Erase blocks of flash.
7896 +static int at91_dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
7898 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7899 + unsigned int pageaddr;
7902 +#ifdef DEBUG_DATAFLASH
7903 + printk("dataflash_erase: addr=%i len=%i\n", instr->addr, instr->len);
7906 + /* Sanity checks */
7907 + if (instr->addr + instr->len > mtd->size)
7909 + if ((instr->len % mtd->erasesize != 0) || (instr->len % priv->page_size != 0))
7911 + if ((instr->addr % priv->page_size) != 0)
7914 + command = kmalloc(4, GFP_KERNEL);
7918 + while (instr->len > 0) {
7919 + /* Calculate flash page address */
7920 + pageaddr = (instr->addr / priv->page_size) << priv->page_offset;
7922 + command[0] = OP_ERASE_PAGE;
7923 + command[1] = (pageaddr & 0x00FF0000) >> 16;
7924 + command[2] = (pageaddr & 0x0000FF00) >> 8;
7926 +#ifdef DEBUG_DATAFLASH
7927 + printk("ERASE: (%x) %x %x %x [%i]\n", command[0], command[1], command[2], command[3], pageaddr);
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);
7934 + at91_dataflash_waitready(); /* poll status until ready */
7935 + spi_release_bus(priv->spi);
7937 + instr->addr += priv->page_size; /* next page */
7938 + instr->len -= priv->page_size;
7943 + /* Inform MTD subsystem that erase is complete */
7944 + instr->state = MTD_ERASE_DONE;
7945 + if (instr->callback)
7946 + instr->callback(instr);
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
7958 +static int at91_dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
7960 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7961 + unsigned int addr;
7964 +#ifdef DEBUG_DATAFLASH
7965 + printk("dataflash_read: %lli .. %lli\n", from, from+len);
7970 + /* Sanity checks */
7973 + if (from + len > mtd->size)
7976 + /* Calculate flash page/byte address */
7977 + addr = (((unsigned)from / priv->page_size) << priv->page_offset) + ((unsigned)from % priv->page_size);
7979 + command = kmalloc(8, GFP_KERNEL);
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]);
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);
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
8008 +static int at91_dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
8010 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
8011 + unsigned int pageaddr, addr, offset, writelen;
8014 + unsigned short status;
8017 + char* tmpbuf = NULL;
8019 +#ifdef DEBUG_DATAFLASH
8020 + printk("dataflash_write: %lli .. %lli\n", to, to+len);
8025 + /* Sanity checks */
8028 + if (to + len > mtd->size)
8031 + command = kmalloc(4, GFP_KERNEL);
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;
8041 + writebuf = (u_char *)buf;
8044 + /* Allocate temporary buffer */
8045 + tmpbuf = kmalloc(priv->page_size, GFP_KERNEL);
8051 + /* Gain access to the SPI bus */
8052 + spi_access_bus(priv->spi);
8054 + while (remaining > 0) {
8055 +#ifdef DEBUG_DATAFLASH
8056 + printk("write @ %i:%i len=%i\n", pageaddr, offset, writelen);
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;
8066 +#ifdef DEBUG_DATAFLASH
8067 + printk("TRANSFER: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8069 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8070 + at91_dataflash_waitready();
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]);
8082 + do_spi_transfer(2, command, 4, command, 4, writebuf, writelen, tmpbuf, writelen);
8083 + at91_dataflash_waitready();
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;
8091 +#ifdef DEBUG_DATAFLASH
8092 + printk("COMPARE: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8094 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8095 + at91_dataflash_waitready();
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);
8105 + remaining = remaining - writelen;
8108 + writebuf += writelen;
8109 + *retlen += writelen;
8111 + if (remaining > priv->page_size)
8112 + writelen = priv->page_size;
8114 + writelen = remaining;
8117 + /* Release SPI bus */
8118 + spi_release_bus(priv->spi);
8125 +/* ......................................................................... */
8128 + * Initialize and register DataFlash device with MTD subsystem.
8130 +static int __init add_dataflash(int channel, char *name, int IDsize,
8131 + int nr_pages, int pagesize, int pageoffset)
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;
8140 + if (nr_devices >= DATAFLASH_MAX_DEVICES) {
8141 + printk(KERN_ERR "at91_dataflash: Too many devices detected\n");
8145 + device = kmalloc(sizeof(struct mtd_info) + strlen(name) + 8, GFP_KERNEL);
8148 + memset(device, 0, sizeof(struct mtd_info));
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;
8162 + priv = (struct dataflash_local *) kmalloc(sizeof(struct dataflash_local), GFP_KERNEL);
8167 + memset(priv, 0, sizeof(struct dataflash_local));
8169 + priv->spi = channel;
8170 + priv->page_size = pagesize;
8171 + priv->page_offset = pageoffset;
8172 + device->priv = priv;
8174 + mtd_devices[nr_devices] = device;
8176 + printk("at91_dataflash: %s detected [spi%i] (%i bytes)\n", name, channel, device->size);
8178 +#ifdef CONFIG_MTD_PARTITIONS
8179 +#ifdef CONFIG_MTD_CMDLINE_PARTS
8180 + mtd_parts_nr = parse_mtd_partitions(device, part_probes, &mtd_parts, 0);
8182 + if (mtd_parts_nr <= 0) {
8185 + mtd_parts = static_partitions_2M;
8186 + mtd_parts_nr = ARRAY_SIZE(static_partitions_2M);
8189 + mtd_parts = static_partitions_4M;
8190 + mtd_parts_nr = ARRAY_SIZE(static_partitions_4M);
8193 + mtd_parts = static_partitions_8M;
8194 + mtd_parts_nr = ARRAY_SIZE(static_partitions_8M);
8199 + if (mtd_parts_nr > 0) {
8200 +#ifdef DATAFLASH_ALWAYS_ADD_DEVICE
8201 + add_mtd_device(device);
8203 + return add_mtd_partitions(device, mtd_parts, mtd_parts_nr);
8206 + return add_mtd_device(device); /* add whole device */
8210 + * Detect and initialize DataFlash device connected to specified SPI channel.
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
8222 +static int __init at91_dataflash_detect(int channel)
8225 + unsigned short status;
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);
8235 + case 0x14: /* 0 1 0 1 */
8236 + res = add_dataflash(channel, "AT45DB021B", SZ_256K, 1025, 264, 9);
8238 + case 0x1c: /* 0 1 1 1 */
8239 + res = add_dataflash(channel, "AT45DB041B", SZ_512K, 2048, 264, 9);
8241 + case 0x24: /* 1 0 0 1 */
8242 + res = add_dataflash(channel, "AT45DB081B", SZ_1M, 4096, 264, 9);
8244 + case 0x2c: /* 1 0 1 1 */
8245 + res = add_dataflash(channel, "AT45DB161B", SZ_2M, 4096, 528, 10);
8247 + case 0x34: /* 1 1 0 1 */
8248 + res = add_dataflash(channel, "AT45DB321B", SZ_4M, 8192, 528, 10);
8250 + case 0x3c: /* 1 1 1 1 */
8251 + res = add_dataflash(channel, "AT45DB642", SZ_8M, 8192, 1056, 11);
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);
8258 + printk(KERN_ERR "at91_dataflash: Unknown device (%x)\n", status & 0x3c);
8265 +static int __init at91_dataflash_init(void)
8267 + spi_transfer_desc = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
8268 + if (!spi_transfer_desc)
8271 + /* DataFlash (SPI chip select 0) */
8272 + at91_dataflash_detect(0);
8274 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
8275 + /* DataFlash card (SPI chip select 3) */
8276 + at91_dataflash_detect(3);
8282 +static void __exit at91_dataflash_exit(void)
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]);
8291 + del_mtd_device(mtd_devices[i]);
8293 + kfree(mtd_devices[i]->priv);
8294 + kfree(mtd_devices[i]);
8298 + kfree(spi_transfer_desc);
8302 +module_init(at91_dataflash_init);
8303 +module_exit(at91_dataflash_exit);
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.
8317 +config MTD_AT91_DATAFLASH
8318 + tristate "AT91RM9200 DataFlash AT45DBxxx (legacy driver)"
8319 + depends on MTD && ARCH_AT91RM9200 && AT91_SPI
8321 + This enables access to the DataFlash (AT45DBxxx) on the AT91RM9200.
8322 + If you have such a board, say 'Y'.
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);
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;
8351 + struct resource *res;
8354 dev = alloc_etherdev(sizeof(struct at91_private));
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);
8366 + dev->base_addr = res->start;
8367 + dev->irq = platform_get_irq(pdev, 0);
8369 SET_MODULE_OWNER(dev);
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 */
8375 /* Register the network interface */
8376 - res = register_netdev(dev);
8378 + ret = register_netdev(dev);
8380 free_irq(dev->irq, dev);
8382 dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
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
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.
8396 + * DMA support added by Chip Coldwell.
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
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>
8411 #include "atmel_serial.h"
8413 +#define SUPPORT_PDC
8414 +#define PDC_BUFFER_SIZE (L1_CACHE_BYTES << 3)
8416 +#define PDC_RX_TIMEOUT (3 * 10) /* 3 bytes */
8418 #if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
8419 #define SUPPORT_SYSRQ
8421 @@ -107,6 +115,13 @@
8422 static int (*atmel_open_hook)(struct uart_port *);
8423 static void (*atmel_close_hook)(struct uart_port *);
8425 +struct atmel_dma_buffer {
8426 + unsigned char *buf;
8427 + dma_addr_t dma_addr;
8433 * We wrap our port structure around the generic uart_port.
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? */
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 */
8444 + short use_dma_tx; /* enable PDC transmitter */
8445 + struct atmel_dma_buffer pdc_tx; /* PDC transmitter */
8448 static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART];
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
8453 #ifdef SUPPORT_SYSRQ
8454 static struct console atmel_console;
8456 @@ -205,7 +230,12 @@ static void atmel_stop_tx(struct uart_po
8458 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
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);
8466 + UART_PUT_IDR(port, ATMEL_US_TXRDY);
8470 @@ -215,7 +245,17 @@ static void atmel_start_tx(struct uart_p
8472 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
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.*/
8481 + UART_PUT_IER(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8482 + UART_PUT_PTCR(port, ATMEL_PDC_TXTEN); /* re-enable PDC transmit */
8485 + UART_PUT_IER(port, ATMEL_US_TXRDY);
8489 @@ -225,7 +265,12 @@ static void atmel_stop_rx(struct uart_po
8491 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
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);
8499 + UART_PUT_IDR(port, ATMEL_US_RXRDY);
8503 @@ -248,6 +293,134 @@ static void atmel_break_ctl(struct uart_
8507 + * Receive data via the PDC. A buffer has been fulled.
8509 +static void atmel_pdc_endrx(struct uart_port *port)
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;
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);
8522 + port->icount.rx += count;
8525 + /* Set this buffer as the next receive buffer */
8527 + UART_PUT_RNPR(port, pdc->dma_addr);
8528 + UART_PUT_RNCR(port, pdc->dma_size);
8530 + /* Switch to next buffer */
8531 + PDC_RX_SWITCH(atmel_port); /* next PDC buffer */
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.
8538 +static void atmel_pdc_timeout(struct uart_port *port)
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;
8545 + ofs = UART_GET_RPR(port) - pdc->dma_addr; /* current DMA adress */
8546 + count = ofs - pdc->ofs;
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);
8554 + port->icount.rx += count;
8557 + /* reset the UART timeout */
8558 + UART_PUT_CR(port, ATMEL_US_STTTO);
8562 + * Deal with parity, framing and overrun errors.
8564 +static void atmel_pdc_rxerr(struct uart_port *port, unsigned int status)
8567 + UART_PUT_CR(port, ATMEL_US_RSTSTA);
8569 + if (status & ATMEL_US_RXBRK) {
8570 + status &= ~(ATMEL_US_PARE | ATMEL_US_FRAME); /* ignore side-effect */
8571 + port->icount.brk++;
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++;
8582 + * A transmission via the PDC is complete.
8584 +static void atmel_pdc_endtx(struct uart_port *port)
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;
8590 + xmit->tail += pdc->ofs;
8591 + if (xmit->tail >= SERIAL_XMIT_SIZE)
8592 + xmit->tail -= SERIAL_XMIT_SIZE;
8594 + port->icount.tx += pdc->ofs;
8597 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
8598 + uart_write_wakeup(port);
8602 + * The PDC transmitter is idle, so either start the next transfer or
8603 + * disable the transmitter.
8605 +static void atmel_pdc_txbufe(struct uart_port *port)
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;
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);
8617 + if (xmit->tail < xmit->head)
8618 + count = xmit->head - xmit->tail;
8620 + count = SERIAL_XMIT_SIZE - xmit->tail;
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 */
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);
8635 * Characters received (called from interrupt handler)
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);
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);
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);
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);
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
8670 + * Initialize DMA (if necessary)
8672 + if (atmel_port->use_dma_rx) {
8675 + for (i = 0; i < 2; i++) {
8676 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8678 + pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL);
8679 + if (pdc->buf == NULL) {
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);
8684 + free_irq(port->irq, port);
8687 + pdc->dma_addr = dma_map_single(port->dev, pdc->buf, PDC_BUFFER_SIZE, DMA_FROM_DEVICE);
8688 + pdc->dma_size = PDC_BUFFER_SIZE;
8692 + atmel_port->pdc_rx_idx = 0;
8694 + UART_PUT_RPR(port, atmel_port->pdc_rx[0].dma_addr);
8695 + UART_PUT_RCR(port, PDC_BUFFER_SIZE);
8697 + UART_PUT_RNPR(port, atmel_port->pdc_rx[1].dma_addr);
8698 + UART_PUT_RNCR(port, PDC_BUFFER_SIZE);
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;
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;
8711 * If there is a specific "open" function (to register
8712 * control line interrupts)
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 */
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);
8723 + UART_PUT_IER(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
8724 + UART_PUT_PTCR(port, ATMEL_PDC_RXTEN); /* enable PDC controller */
8727 + UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */
8731 @@ -431,6 +667,31 @@ static void atmel_shutdown(struct uart_p
8732 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8735 + * Ensure everything is stopped.
8737 + atmel_stop_rx(port);
8738 + atmel_stop_tx(port);
8741 + * Shut-down the DMA.
8743 + if (atmel_port->use_dma_rx) {
8746 + for (i = 0; i < 2; i++) {
8747 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8749 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8753 + if (atmel_port->use_dma_tx) {
8754 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8756 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_TO_DEVICE);
8760 * Disable all interrupts, port and break condition.
8762 UART_PUT_CR(port, ATMEL_US_RSTSTA);
8763 @@ -481,6 +742,7 @@ static void atmel_serial_pm(struct uart_
8765 static void atmel_set_termios(struct uart_port *port, struct ktermios * termios, struct ktermios * old)
8767 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8768 unsigned long flags;
8769 unsigned int mode, imr, quot, baud;
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);
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 */
8778 mode |= ATMEL_US_USCLKS_MCK_DIV8;
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;
8784 + if (atmel_port->use_dma_rx) /* need to enable error interrupts */
8785 + UART_PUT_IER(port, port->read_status_mask);
8788 * Characters to ignore
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);
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;
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;
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);
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"
8820 tristate "Atmel SPI Controller"
8821 depends on (ARCH_AT91 || AVR32) && SPI_MASTER
8822 + select SPI_AT91_MANUAL_CS if ARCH_AT91RM9200
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.
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
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.
8840 +config SPI_AT91_MANUAL_CS
8842 + depends on ARCH_AT91RM9200
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.
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 ...
8862 # SPI protocol drivers (device/link on bus)
8863 Index: linux-2.6.22.19/drivers/spi/spi_at91_bitbang.c
8864 ===================================================================
8866 +++ linux-2.6.22.19/drivers/spi/spi_at91_bitbang.c
8869 + * at91_spi.c - at91 SPI driver (BOOTSTRAP/BITBANG VERSION)
8871 + * Copyright (C) 2006 David Brownell
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.
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.
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.
8887 +#include <linux/kernel.h>
8888 +#include <linux/init.h>
8889 +#include <linux/platform_device.h>
8891 +#include <linux/spi/spi.h>
8892 +#include <linux/spi/spi_bitbang.h>
8894 +#include <asm/arch/gpio.h>
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.
8904 + * - other at91 parts (like at91sam9) have multiple controllers
8905 + * and different pin muxing; this version is at91rm9200 specfic.
8907 + * - at91sam9261 SPI0 pins are directly muxed with MMC/SD pins.
8909 + * - rm9200 spi chipselects drop wrongly, so the native driver
8910 + * will need to use gpios much like this does.
8912 + * - real hardware only allows 8..16 bits per word, while this
8913 + * bitbanger allows 1..32 (incompatible superset).
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().
8919 + * - suspend/resume and <linux/clk.h> support is missing ...
8922 +#define spi_miso_bit AT91_PIN_PA0
8923 +#define spi_mosi_bit AT91_PIN_PA1
8924 +#define spi_sck_bit AT91_PIN_PA2
8927 + struct spi_bitbang bitbang;
8928 + struct platform_device *pdev;
8931 +/*----------------------------------------------------------------------*/
8933 +static inline void setsck(struct spi_device *spi, int is_on)
8935 + at91_set_gpio_value(spi_sck_bit, is_on);
8938 +static inline void setmosi(struct spi_device *spi, int is_on)
8940 + at91_set_gpio_value(spi_mosi_bit, is_on);
8943 +static inline int getmiso(struct spi_device *spi)
8945 + return at91_get_gpio_value(spi_miso_bit);
8948 +static void at91_spi_chipselect(struct spi_device *spi, int is_active)
8950 + unsigned long cs = (unsigned long) spi->controller_data;
8952 + /* set default clock polarity */
8954 + setsck(spi, spi->mode & SPI_CPOL);
8956 + /* only support active-low (default) */
8957 + at91_set_gpio_value(cs, !is_active);
8961 + * NOTE: this is "as fast as we can"; it should be a function of
8962 + * the device clock ...
8964 +#define spidelay(X) do{} while(0)
8966 +#define EXPAND_BITBANG_TXRX
8967 +#include <linux/spi/spi_bitbang.h>
8969 +static u32 at91_spi_txrx_word_mode0(struct spi_device *spi,
8970 + unsigned nsecs, u32 word, u8 bits)
8972 + return bitbang_txrx_be_cpha0(spi, nsecs, 0, word, 8);
8975 +static u32 at91_spi_txrx_word_mode1(struct spi_device *spi,
8976 + unsigned nsecs, u32 word, u8 bits)
8978 + return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, 8);
8981 +static u32 at91_spi_txrx_word_mode2(struct spi_device *spi,
8982 + unsigned nsecs, u32 word, u8 bits)
8984 + return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, 8);
8987 +static u32 at91_spi_txrx_word_mode3(struct spi_device *spi,
8988 + unsigned nsecs, u32 word, u8 bits)
8990 + return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, 8);
8993 +/*----------------------------------------------------------------------*/
8995 +static int __init at91_spi_probe(struct platform_device *pdev)
8998 + struct spi_master *master;
8999 + struct at91_spi *at91_spi;
9001 + if (pdev->id != 0) /* SPI0 bus */
9004 + master = spi_alloc_master(&pdev->dev, sizeof *at91_spi);
9008 + at91_spi = spi_master_get_devdata(master);
9009 + at91_spi->pdev = pdev;
9010 + platform_set_drvdata(pdev, at91_spi);
9012 + /* SPI and bitbang hookup */
9013 + master->bus_num = 0;
9014 + master->num_chipselect = 4;
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;
9023 + status = spi_bitbang_start(&at91_spi->bitbang);
9025 + (void) spi_master_put(at91_spi->bitbang.master);
9030 +static int __exit at91_spi_remove(struct platform_device *pdev)
9032 + struct at91_spi *at91_spi = platform_get_drvdata(pdev);
9035 + /* stop() unregisters child devices too */
9036 + status = spi_bitbang_stop(&at91_spi->bitbang);
9037 + (void) spi_master_put(at91_spi->bitbang.master);
9039 + platform_set_drvdata(pdev, NULL);
9043 +static struct platform_driver at91_spi_driver = {
9044 + .probe = at91_spi_probe,
9045 + .remove = __exit_p(at91_spi_remove),
9047 + .name = "at91_spi",
9048 + .owner = THIS_MODULE,
9052 +static int __init at91_spi_init(void)
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 */);
9058 + /* register driver */
9059 + return platform_driver_register(&at91_spi_driver);
9062 +static void __exit at91_spi_exit(void)
9064 + platform_driver_unregister(&at91_spi_driver);
9067 +device_initcall(at91_spi_init);
9068 +module_exit(at91_spi_exit);
9070 +MODULE_ALIAS("at91_spi.0");
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
9081 if ((!udc->suspended && udc->addr)
9083 - || at91_suspend_entering_slow_clock()) {
9084 + || clk_must_disable(udc->fclk)) {
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
9094 * REVISIT: some boards will be able to turn VBUS off...
9096 - if (at91_suspend_entering_slow_clock()) {
9097 + if (clk_must_disable(fclk)) {
9098 ohci_usb_reset (ohci);
9101 Index: linux-2.6.22.19/drivers/video/backlight/kb920x_bl.c
9102 ===================================================================
9104 +++ linux-2.6.22.19/drivers/video/backlight/kb920x_bl.c
9107 + * Backlight Driver for KB9202
9109 + * Copyright (c) 2006 KwikByte
9111 + * Based on Sharp's Corgi Backlight Driver
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.
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>
9126 +#include <asm/arch/gpio.h>
9128 +/* The backlight is on(1)/off(0) */
9129 +#define KB9202_DEFAULT_INTENSITY 1
9130 +#define KB9202_MAX_INTENSITY 1
9132 +static int kb9202bl_suspended;
9133 +static int current_intensity = 0;
9134 +static DEFINE_SPINLOCK(bl_lock);
9136 +static int kb9202bl_set_intensity(struct backlight_device *bd)
9138 + unsigned long flags;
9139 + int intensity = bd->props.brightness;
9141 + if (bd->props.power != FB_BLANK_UNBLANK)
9143 + if (bd->props.fb_blank != FB_BLANK_UNBLANK)
9145 + if (kb9202bl_suspended)
9148 + if ((!current_intensity) && (bd->props.power == FB_BLANK_UNBLANK))
9151 + spin_lock_irqsave(&bl_lock, flags);
9153 + gpio_set_value(AT91_PIN_PC23, 1);
9155 + gpio_set_value(AT91_PIN_PC23, 0);
9156 + spin_unlock_irqrestore(&bl_lock, flags);
9158 + current_intensity = intensity;
9163 +static int kb9202bl_get_intensity(struct backlight_device *bd)
9165 + return current_intensity;
9168 +static struct backlight_ops kb9202bl_ops = {
9169 + .get_brightness = kb9202bl_get_intensity,
9170 + .update_status = kb9202bl_set_intensity,
9173 +static int __init kb9202bl_probe(struct platform_device *pdev)
9175 + struct backlight_device *bd;
9177 + bd = backlight_device_register ("kb9202-bl", &pdev->dev, NULL, &kb9202bl_ops);
9179 + return PTR_ERR(bd);
9181 + platform_set_drvdata(pdev, bd);
9183 + bd->props.max_brightness = KB9202_MAX_INTENSITY;
9184 + bd->props.brightness = KB9202_DEFAULT_INTENSITY;
9185 + (void) kb9202bl_set_intensity(bd);
9190 +static int kb9202bl_remove(struct platform_device *pdev)
9192 + struct backlight_device *bd = platform_get_drvdata(pdev);
9194 + bd->props.brightness = 0;
9195 + bd->props.power = 0;
9196 + (void) kb9202bl_set_intensity(bd);
9198 + backlight_device_unregister(bd);
9204 +static int kb9202bl_suspend(struct platform_device *dev, pm_message_t state)
9206 + struct backlight_device *bd = platform_get_drvdata(pdev);
9208 + kb9202bl_suspended = 1;
9209 + (void) kb9202bl_set_intensity(bd);
9213 +static int kb9202bl_resume(struct platform_device *dev)
9215 + struct backlight_device *bd = platform_get_drvdata(pdev);
9217 + kb9202bl_suspended = 0;
9218 + (void) kb9202bl_set_intensity(bd);
9222 +#define kb9202bl_suspend NULL
9223 +#define kb9202bl_resume NULL
9226 +static struct platform_driver kb9202bl_driver = {
9227 + .probe = kb9202bl_probe,
9228 + .remove = kb9202bl_remove,
9229 + .suspend = kb9202bl_suspend,
9230 + .resume = kb9202bl_resume,
9232 + .name = "kb9202-bl",
9233 + .owner = THIS_MODULE,
9237 +static struct platform_device *kb9202bl_device;
9239 +static int __init kb9202bl_init(void)
9243 + ret = platform_driver_register(&kb9202bl_driver);
9245 + kb9202bl_device = platform_device_alloc("kb9202-bl", -1);
9246 + if (!kb9202bl_device)
9249 + ret = platform_device_add(kb9202bl_device);
9251 + platform_device_put(kb9202bl_device);
9252 + platform_driver_unregister(&kb9202bl_driver);
9258 +static void __exit kb9202bl_exit(void)
9260 + platform_device_unregister(kb9202bl_device);
9261 + platform_driver_unregister(&kb9202bl_driver);
9264 +module_init(kb9202bl_init);
9265 +module_exit(kb9202bl_exit);
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
9276 If you have a Intel LE80578 (Carillo Ranch) say Y to enable the
9279 +config BACKLIGHT_KB920x
9280 + tristate "KwikByte KB9202 Backlight Driver"
9281 + depends on BACKLIGHT_CLASS_DEVICE && MACH_KB9200
9284 + If you have a KwikByte KB9202 board, say Y to enable the
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>.
9304 + tristate "Epson S1D15605 framebuffer support"
9306 + default m if MACH_KB9200
9307 + select FB_CFB_FILLRECT
9308 + select FB_CFB_COPYAREA
9309 + select FB_CFB_IMAGEBLIT
9311 + Build in support for the S1D15605 Epson Research 128x64
9312 + LCD controller as a framebuffer.
9315 tristate "Epson S1D13XXX framebuffer support"
9317 @@ -835,7 +846,7 @@ config FB_S1D13XXX
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 ===================================================================
9343 +++ linux-2.6.22.19/drivers/video/s1d15605fb.c
9346 + * drivers/video/s1d15605.c
9348 + * Adapted from several sources including:
9349 + * 1) Driver for AT91 LCD Controller
9350 + * Copyright (C) 2006 Atmel
9352 + * 2) Copyright (C) 2005 S. Kevin Hester
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
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
9362 + * I've heavily borrowed code from the vfb.c driver.
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.
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.
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
9380 +#define MSG(string, args...) printk("s1d15605fb:" string, ##args)
9382 +#define MSG(string, args...)
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>
9394 +#include <asm/uaccess.h>
9396 +#include <asm/arch/board.h>
9397 +#include <asm/arch/gpio.h>
9399 +#ifdef CONFIG_PMAC_BACKLIGHT
9400 +#include <asm/backlight.h>
9403 +#define VIDEOWIDTH 128
9404 +#define VIDEOHEIGHT 64
9405 +#define VIDEODEPTH 1 /* bits/pixel */
9406 +#define VIDEOWIDTH_BYTES ((VIDEOWIDTH * VIDEODEPTH) / 8)
9408 +/* The number of bytes that actually go to the device */
9409 +#define ACTUALVIDEOMEMSIZE (VIDEOWIDTH_BYTES * VIDEOHEIGHT)
9410 +#define VIDEOMEMSIZE PAGE_SIZE
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,
9426 +static struct fb_fix_screeninfo s1d15605_fix __initdata = {
9428 + .type = FB_TYPE_PACKED_PIXELS,
9429 + .visual = FB_VISUAL_MONO10,
9433 + .accel = FB_ACCEL_NONE,
9436 +struct s1d15605fb_info {
9437 + struct fb_info *info;
9439 + unsigned long reset_pin;
9440 + struct platform_device *pdev;
9444 + * LCD device interface
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
9464 +#define NUM_OF_PAGES 8
9465 +#define NUM_OF_COLUMNS 128
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))
9474 + * s1d15605fb_resize_framebuffer
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.
9480 +static int s1d15605fb_resize_framebuffer(struct s1d15605fb_info *sinfo)
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;
9488 + new_size = ((var->xres_virtual * var->yres_virtual * var->bits_per_pixel) / 8);
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);
9493 + if (new_size == fix->smem_len)
9496 + if (fix->smem_len) {
9497 + kfree(info->screen_base);
9500 + new_vaddr = kmalloc(new_size, GFP_KERNEL);
9503 + fix->smem_len = 0;
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;
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);
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
9527 +static void s1d15605_update(struct fb_info *info)
9529 + struct s1d15605fb_info *sinfo = info->par;
9530 + int page, i, row, colmask;
9531 + u8 retVal, *rowPtr;
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);
9539 + for (i = 0; i < NUM_OF_COLUMNS; ++i)
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);
9547 + for (row = 0; row < 8; ++row)
9549 + retVal = (retVal >> 1) | (((*rowPtr) & colmask) ? 0x80 : 0);
9550 + rowPtr += VIDEOWIDTH_BYTES;
9552 + WRITE_DATA(retVal);
9556 + WRITE_COMMAND(DISPLAY_ON);
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.
9567 +static int s1d15605_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
9570 + * Some very basic checks
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;
9581 + if(var->bits_per_pixel > VIDEODEPTH)
9587 + if (((var->yres_virtual * var->bits_per_pixel * var->yres_virtual) >> 3) >
9588 + ACTUALVIDEOMEMSIZE)
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.
9596 + switch (var->bits_per_pixel) {
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;
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;
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.
9619 +static int s1d15605_set_par(struct fb_info *info)
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);
9628 + ret = s1d15605fb_resize_framebuffer(info->par);
9630 + info->fix.visual = FB_VISUAL_MONO10;
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.
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)
9643 + if (regno > 1) /* no. of hw registers - we only do mono now */
9651 + * Currently, the routine will simply shut-off the backlight and prevent
9652 + * updates/refreshes. Modify according to application.
9654 + * 0 unblank, 1 blank, 2 no vsync, 3 no hsync, 4 off
9656 +static int s1d15605_blank(int blank, struct fb_info *info)
9658 +#ifdef CONFIG_PMAC_BACKLIGHT
9660 + pmac_backlight->props.power = FB_BLANK_POWERDOWN;
9662 + pmac_backlight->props.power = FB_BLANK_UNBLANK;
9663 + backlight_update_status(pmac_backlight);
9670 + * Pan or Wrap the Display
9672 + * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
9675 +static int s1d15605_pan_display(struct fb_var_screeninfo *var,
9676 + struct fb_info *info)
9678 + if (var->vmode & FB_VMODE_YWRAP) {
9679 + if (var->yoffset < 0
9680 + || var->yoffset >= info->var.yres_virtual
9684 + if (var->xoffset + var->xres > info->var.xres_virtual ||
9685 + var->yoffset + var->yres > info->var.yres_virtual)
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;
9693 + info->var.vmode &= ~FB_VMODE_YWRAP;
9699 +static void s1d15605_copyarea(struct fb_info *info, const struct fb_copyarea *region)
9701 + cfb_copyarea(info, region);
9702 + s1d15605_update(info);
9706 +static void s1d15605_fillrect (struct fb_info *info, const struct fb_fillrect *rect)
9708 + cfb_fillrect(info, rect);
9709 + s1d15605_update(info);
9713 +static void s1d15605_imageblit(struct fb_info *p, const struct fb_image *image)
9715 + cfb_imageblit(p, image);
9716 + s1d15605_update(p);
9721 + * Write the users data to our framebuffer, and then trigger a psuedo DMA
9723 +static ssize_t s1d15605_write(struct file *file, const char *buf,
9724 + size_t count, loff_t *ppos)
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];
9732 + if (p > info->fix.smem_len)
9734 + if (count >= info->fix.smem_len)
9735 + count = info->fix.smem_len;
9737 + if (count + p > info->fix.smem_len) {
9738 + count = info->fix.smem_len - p;
9744 + base_addr = info->screen_base;
9745 + count -= copy_from_user(base_addr+p, buf, count);
9750 + s1d15605_update(info);
9758 +#ifdef USE_PRIVATE_VMA_FXS
9759 +static void s1d15605_vma_open(struct vm_area_struct *vma)
9761 + // FIXME - store stats in the device data via vm_private_data
9765 +static void s1d15605_vma_close(struct vm_area_struct *vma)
9767 + // FIXME - store stats in the device data via vm_private_data
9771 +static struct page *s1d15605_vma_nopage(struct vm_area_struct *vma,
9772 + unsigned long address, int *type)
9774 + struct page *page;
9775 + struct fb_info *info = vma->vm_private_data;
9777 + page = virt_to_page(info->screen_base);
9780 + // FIXME - now someone has a link to our page, start periodically blitting
9781 + // latest updates to the actual device.
9787 +static struct vm_operations_struct s1d15605_vm_ops = {
9788 + .open = s1d15605_vma_open,
9789 + .close = s1d15605_vma_close,
9790 + .nopage = s1d15605_vma_nopage
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)
9797 + vma->vm_ops = &s1d15605_vm_ops;
9798 + vma->vm_flags |= VM_RESERVED;
9799 + vma->vm_private_data = info;
9800 + s1d15605_vma_open(vma);
9804 +#endif /* USE_PRIVATE_VMA_FXS */
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,
9824 +static void s1d15605_device_init(struct s1d15605fb_info *sinfo) {
9828 + /* release the reset line by reading the device - proto hardware */
9829 + value = READ_COMMAND;
9830 + value = READ_COMMAND;
9832 +#ifdef CONFIG_MACH_KB9200
9833 + /* new boards have dedicated reset line */
9834 + gpio_set_value(sinfo->reset_pin, 1);
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);
9848 + WRITE_COMMAND(RESISTOR_RATIO_START + 4);
9849 + WRITE_COMMAND(ELECTRONIC_VOLUME_SET);
9850 + WRITE_COMMAND(0x33);
9854 +static int s1d15605fb_probe(struct platform_device *pdev)
9856 + struct device *dev = &pdev->dev;
9857 + struct fb_info *info;
9858 + struct s1d15605fb_info *sinfo;
9861 + MSG("%s\n", __func__);
9863 + if (!(info = framebuffer_alloc(sizeof(struct s1d15605fb_info), dev))) {
9864 + dev_err(dev, "Cannot allocate framebuffer struct\n");
9868 + sinfo = info->par;
9869 + sinfo->info = info;
9870 + sinfo->pdev = pdev;
9872 + if (pdev->num_resources < 2) {
9873 + dev_err(dev, "Resources unusable\n");
9878 + info->fbops = &s1d15605fb_ops;
9879 + strcpy(info->fix.id, pdev->name);
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;
9885 + ret = s1d15605fb_resize_framebuffer(sinfo);
9887 + dev_err(dev, "Cannot resize framebuffer: %d\n", ret);
9891 + if (!request_mem_region(info->fix.mmio_start,
9892 + info->fix.mmio_len, pdev->name)) {
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");
9903 + s1d15605_device_init(sinfo);
9905 + ret = fb_find_mode(&info->var, info, NULL, NULL, 0, NULL, 1);
9907 + if (!ret || (ret == 4))
9908 + info->var = s1d15605_default;
9910 + info->fix = s1d15605_fix;
9911 + info->flags = FBINFO_FLAG_DEFAULT |
9912 +/* FBINFO_HWACCEL_YPAN | */
9913 + FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
9915 + ret = register_framebuffer(info);
9917 + dev_err(dev, "Failed to register framebuffer device: %d\n", ret);
9921 + dev_set_drvdata(dev, info);
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);
9927 + dev_warn(dev, "Unable to set display parameters\n");
9930 + info->var.activate &= ~(FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW);
9932 + dev_dbg(dev, "%s SUCCESS\n", __func__);
9934 + dev_info(dev, "Driver $Revision: 1.1 $\n");
9939 + iounmap(sinfo->mmio);
9941 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9943 + kfree(info->screen_base);
9946 + framebuffer_release(info);
9948 + dev_dbg(dev, "%s FAILED\n", __func__);
9953 +static int s1d15605fb_remove(struct platform_device *pdev)
9955 + struct device *dev = &pdev->dev;
9956 + struct fb_info *info = dev_get_drvdata(dev);
9957 + struct s1d15605fb_info *sinfo = info->par;
9962 + unregister_framebuffer(info);
9964 + iounmap(sinfo->mmio);
9965 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9967 + kfree(info->screen_base);
9969 + dev_set_drvdata(dev, NULL);
9970 + framebuffer_release(info);
9975 +static struct platform_driver s1d15605fb_driver = {
9976 + .probe = s1d15605fb_probe,
9977 + .remove = s1d15605fb_remove,
9979 + .name = "s1d15605fb",
9980 + .owner = THIS_MODULE,
9985 +static int __init s1d15605fb_init(void)
9987 + return platform_driver_register(&s1d15605fb_driver);
9991 +static void __exit s1d15605fb_exit(void)
9993 + platform_driver_unregister(&s1d15605fb_driver);
9997 +module_init(s1d15605fb_init);
9998 +module_exit(s1d15605fb_exit);
10001 +MODULE_AUTHOR("KwikByte");
10002 +MODULE_DESCRIPTION("Epson S1D15605 LCD Controller framebuffer driver");
10003 +MODULE_LICENSE("GPL");