1 diff -urN linux-2.6.22-rc5/arch/arm/boot/compressed/head-at91rm9200.S linux-2.6.22-rc5.new/arch/arm/boot/compressed/head-at91rm9200.S
2 --- linux-2.6.22-rc5/arch/arm/boot/compressed/head-at91rm9200.S 2007-06-17 04:09:12.000000000 +0200
3 +++ linux-2.6.22-rc5.new/arch/arm/boot/compressed/head-at91rm9200.S 2007-07-29 05:23:04.000000000 +0200
8 + @ Promwad Chub : 1181
9 + mov r3, #(MACH_TYPE_CHUB & 0xff)
10 + orr r3, r3, #(MACH_TYPE_CHUB & 0xff00)
14 @ Unknown board, use the AT91RM9200DK board
15 @ mov r7, #MACH_TYPE_AT91RM9200
16 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff)
17 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9260ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9260ek_defconfig
18 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9260ek_defconfig 2007-06-17 04:09:12.000000000 +0200
19 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9260ek_defconfig 2007-07-29 05:23:04.000000000 +0200
22 # Automatically generated make config: don't edit
23 -# Linux kernel version: 2.6.19-rc6
24 -# Fri Nov 17 18:42:21 2006
25 +# Linux kernel version: 2.6.21
26 +# Mon May 7 11:42:02 2007
29 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
30 +CONFIG_GENERIC_GPIO=y
31 # CONFIG_GENERIC_TIME is not set
33 +# CONFIG_NO_IOPORT is not set
34 CONFIG_GENERIC_HARDIRQS=y
35 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
36 CONFIG_HARDIRQS_SW_RESEND=y
37 CONFIG_GENERIC_IRQ_PROBE=y
38 CONFIG_RWSEM_GENERIC_SPINLOCK=y
39 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
40 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
41 CONFIG_GENERIC_HWEIGHT=y
42 CONFIG_GENERIC_CALIBRATE_DELAY=y
44 CONFIG_VECTORS_BASE=0xffff0000
45 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
48 # CONFIG_SWAP is not set
50 # CONFIG_IPC_NS is not set
51 +CONFIG_SYSVIPC_SYSCTL=y
52 # CONFIG_POSIX_MQUEUE is not set
53 # CONFIG_BSD_PROCESS_ACCT is not set
54 # CONFIG_TASKSTATS is not set
55 # CONFIG_UTS_NS is not set
56 # CONFIG_AUDIT is not set
57 # CONFIG_IKCONFIG is not set
58 +CONFIG_SYSFS_DEPRECATED=y
59 # CONFIG_RELAY is not set
60 +CONFIG_BLK_DEV_INITRD=y
61 CONFIG_INITRAMFS_SOURCE=""
62 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
68 +# CONFIG_LBD is not set
69 # CONFIG_BLK_DEV_IO_TRACE is not set
70 +# CONFIG_LSF is not set
75 # CONFIG_ARCH_IMX is not set
76 # CONFIG_ARCH_IOP32X is not set
77 # CONFIG_ARCH_IOP33X is not set
78 +# CONFIG_ARCH_IOP13XX is not set
79 # CONFIG_ARCH_IXP4XX is not set
80 # CONFIG_ARCH_IXP2000 is not set
81 # CONFIG_ARCH_IXP23XX is not set
82 # CONFIG_ARCH_L7200 is not set
83 +# CONFIG_ARCH_NS9XXX is not set
84 # CONFIG_ARCH_PNX4008 is not set
85 # CONFIG_ARCH_PXA is not set
86 # CONFIG_ARCH_RPC is not set
88 # CONFIG_ARCH_AT91RM9200 is not set
89 CONFIG_ARCH_AT91SAM9260=y
90 # CONFIG_ARCH_AT91SAM9261 is not set
91 +# CONFIG_ARCH_AT91SAM9263 is not set
94 +# AT91SAM9260 Variants
96 +# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
99 -# AT91SAM9260 Board Type
100 +# AT91SAM9260 / AT91SAM9XE Board Type
102 CONFIG_MACH_AT91SAM9260EK=y
107 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
108 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
111 # AT91 Feature Selections
113 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
114 +# CONFIG_ATMEL_TCLIB is not set
119 # CONFIG_CPU_DCACHE_DISABLE is not set
120 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
121 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
122 +# CONFIG_OUTER_CACHE is not set
127 # CONFIG_SPARSEMEM_STATIC is not set
128 CONFIG_SPLIT_PTLOCK_CPUS=4096
129 # CONFIG_RESOURCES_64BIT is not set
130 +CONFIG_ZONE_DMA_FLAG=1
131 # CONFIG_LEDS is not set
132 CONFIG_ALIGNMENT_TRAP=y
135 CONFIG_ZBOOT_ROM_BSS=0x0
136 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
137 # CONFIG_XIP_KERNEL is not set
138 +# CONFIG_KEXEC is not set
141 # Floating point emulation
143 # Power management options
145 # CONFIG_PM is not set
146 -# CONFIG_APM is not set
152 # CONFIG_PACKET_MMAP is not set
155 -# CONFIG_XFRM_USER is not set
156 -# CONFIG_XFRM_SUB_POLICY is not set
157 # CONFIG_NET_KEY is not set
159 # CONFIG_IP_MULTICAST is not set
160 @@ -263,14 +283,15 @@
161 # CONFIG_INET_IPCOMP is not set
162 # CONFIG_INET_XFRM_TUNNEL is not set
163 # CONFIG_INET_TUNNEL is not set
164 -CONFIG_INET_XFRM_MODE_TRANSPORT=y
165 -CONFIG_INET_XFRM_MODE_TUNNEL=y
166 -CONFIG_INET_XFRM_MODE_BEET=y
167 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
168 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
169 +# CONFIG_INET_XFRM_MODE_BEET is not set
171 CONFIG_INET_TCP_DIAG=y
172 # CONFIG_TCP_CONG_ADVANCED is not set
173 CONFIG_TCP_CONG_CUBIC=y
174 CONFIG_DEFAULT_TCP_CONG="cubic"
175 +# CONFIG_TCP_MD5SIG is not set
176 # CONFIG_IPV6 is not set
177 # CONFIG_INET6_XFRM_TUNNEL is not set
178 # CONFIG_INET6_TUNNEL is not set
180 CONFIG_PREVENT_FIRMWARE_BUILD=y
181 # CONFIG_FW_LOADER is not set
182 # CONFIG_DEBUG_DRIVER is not set
183 +# CONFIG_DEBUG_DEVRES is not set
184 # CONFIG_SYS_HYPERVISOR is not set
189 # Plug and Play support
191 +# CONFIG_PNPACPI is not set
196 CONFIG_BLK_DEV_RAM_COUNT=16
197 CONFIG_BLK_DEV_RAM_SIZE=8192
198 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
199 -CONFIG_BLK_DEV_INITRD=y
200 # CONFIG_CDROM_PKTCDVD is not set
201 # CONFIG_ATA_OVER_ETH is not set
205 # CONFIG_RAID_ATTRS is not set
207 +# CONFIG_SCSI_TGT is not set
208 # CONFIG_SCSI_NETLINK is not set
209 CONFIG_SCSI_PROC_FS=y
212 CONFIG_SCSI_MULTI_LUN=y
213 # CONFIG_SCSI_CONSTANTS is not set
214 # CONFIG_SCSI_LOGGING is not set
215 +# CONFIG_SCSI_SCAN_ASYNC is not set
220 # CONFIG_SCSI_DEBUG is not set
223 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
225 +# CONFIG_ATA is not set
228 # Multi-device support (RAID and LVM)
230 # CONFIG_MD is not set
233 # Network device support
235 -# CONFIG_NETDEVICES is not set
237 +# CONFIG_DUMMY is not set
238 +# CONFIG_BONDING is not set
239 +# CONFIG_EQUALIZER is not set
240 +# CONFIG_TUN is not set
243 +# PHY device support
245 +# CONFIG_PHYLIB is not set
248 +# Ethernet (10 or 100Mbit)
250 +CONFIG_NET_ETHERNET=y
253 +# CONFIG_SMC91X is not set
254 +# CONFIG_DM9000 is not set
257 +# Ethernet (1000 Mbit)
261 +# Ethernet (10000 Mbit)
265 +# Token Ring devices
269 +# Wireless LAN (non-hamradio)
271 +# CONFIG_NET_RADIO is not set
276 +# CONFIG_WAN is not set
277 +# CONFIG_PPP is not set
278 +# CONFIG_SLIP is not set
279 +# CONFIG_SHAPER is not set
280 +# CONFIG_NETCONSOLE is not set
281 # CONFIG_NETPOLL is not set
282 # CONFIG_NET_POLL_CONTROLLER is not set
285 # CONFIG_NVRAM is not set
286 # CONFIG_DTLK is not set
287 # CONFIG_R3964 is not set
290 -# Ftape, the floppy tape device driver
292 # CONFIG_RAW_DRIVER is not set
299 -# CONFIG_TIFM_CORE is not set
302 +# Multifunction device drivers
304 +# CONFIG_MFD_SM501 is not set
312 -# CONFIG_FIRMWARE_EDID is not set
313 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
314 # CONFIG_FB is not set
319 # CONFIG_VGA_CONSOLE is not set
320 CONFIG_DUMMY_CONSOLE=y
321 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
326 # CONFIG_SOUND is not set
332 +# CONFIG_HID_DEBUG is not set
337 CONFIG_USB_ARCH_HAS_HCD=y
339 # Miscellaneous USB options
341 CONFIG_USB_DEVICEFS=y
342 -# CONFIG_USB_BANDWIDTH is not set
343 # CONFIG_USB_DYNAMIC_MINORS is not set
344 # CONFIG_USB_OTG is not set
348 # CONFIG_USB_ISP116X_HCD is not set
349 CONFIG_USB_OHCI_HCD=y
350 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
351 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
352 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
353 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
354 # CONFIG_USB_SL811_HCD is not set
357 # CONFIG_USB_ATI_REMOTE2 is not set
358 # CONFIG_USB_KEYSPAN_REMOTE is not set
359 # CONFIG_USB_APPLETOUCH is not set
360 +# CONFIG_USB_GTCO is not set
363 # USB Imaging devices
365 # CONFIG_USB_RIO500 is not set
366 # CONFIG_USB_LEGOTOWER is not set
367 # CONFIG_USB_LCD is not set
368 +# CONFIG_USB_BERRY_CHARGE is not set
369 # CONFIG_USB_LED is not set
370 # CONFIG_USB_CYPRESS_CY7C63 is not set
371 # CONFIG_USB_CYTHERM is not set
373 # CONFIG_USB_APPLEDISPLAY is not set
374 # CONFIG_USB_LD is not set
375 # CONFIG_USB_TRANCEVIBRATOR is not set
376 +# CONFIG_USB_IOWARRIOR is not set
377 # CONFIG_USB_TEST is not set
381 # CONFIG_NLS_UTF8 is not set
384 +# Distributed Lock Manager
386 +# CONFIG_DLM is not set
391 # CONFIG_PROFILING is not set
392 @@ -900,28 +986,30 @@
393 CONFIG_ENABLE_MUST_CHECK=y
394 # CONFIG_MAGIC_SYSRQ is not set
395 # CONFIG_UNUSED_SYMBOLS is not set
396 +# CONFIG_DEBUG_FS is not set
397 +# CONFIG_HEADERS_CHECK is not set
398 CONFIG_DEBUG_KERNEL=y
399 +# CONFIG_DEBUG_SHIRQ is not set
400 CONFIG_LOG_BUF_SHIFT=14
401 CONFIG_DETECT_SOFTLOCKUP=y
402 # CONFIG_SCHEDSTATS is not set
403 +# CONFIG_TIMER_STATS is not set
404 # CONFIG_DEBUG_SLAB is not set
405 # CONFIG_DEBUG_RT_MUTEXES is not set
406 # CONFIG_RT_MUTEX_TESTER is not set
407 # CONFIG_DEBUG_SPINLOCK is not set
408 # CONFIG_DEBUG_MUTEXES is not set
409 -# CONFIG_DEBUG_RWSEMS is not set
410 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
411 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
412 # CONFIG_DEBUG_KOBJECT is not set
413 CONFIG_DEBUG_BUGVERBOSE=y
414 # CONFIG_DEBUG_INFO is not set
415 -# CONFIG_DEBUG_FS is not set
416 # CONFIG_DEBUG_VM is not set
417 # CONFIG_DEBUG_LIST is not set
418 CONFIG_FRAME_POINTER=y
419 CONFIG_FORCED_INLINING=y
420 -# CONFIG_HEADERS_CHECK is not set
421 # CONFIG_RCU_TORTURE_TEST is not set
422 +# CONFIG_FAULT_INJECTION is not set
424 # CONFIG_DEBUG_ERRORS is not set
426 @@ -941,9 +1029,12 @@
431 # CONFIG_CRC_CCITT is not set
432 # CONFIG_CRC16 is not set
434 # CONFIG_LIBCRC32C is not set
435 CONFIG_ZLIB_INFLATE=y
439 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9261ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9261ek_defconfig
440 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9261ek_defconfig 2007-06-17 04:09:12.000000000 +0200
441 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9261ek_defconfig 2007-07-29 05:23:04.000000000 +0200
444 # Automatically generated make config: don't edit
445 -# Linux kernel version: 2.6.19-rc6
446 -# Fri Nov 17 18:00:38 2006
447 +# Linux kernel version: 2.6.21
448 +# Mon May 7 11:42:30 2007
451 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
452 +CONFIG_GENERIC_GPIO=y
453 # CONFIG_GENERIC_TIME is not set
455 +# CONFIG_NO_IOPORT is not set
456 CONFIG_GENERIC_HARDIRQS=y
457 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
458 CONFIG_HARDIRQS_SW_RESEND=y
459 CONFIG_GENERIC_IRQ_PROBE=y
460 CONFIG_RWSEM_GENERIC_SPINLOCK=y
461 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
462 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
463 CONFIG_GENERIC_HWEIGHT=y
464 CONFIG_GENERIC_CALIBRATE_DELAY=y
466 CONFIG_VECTORS_BASE=0xffff0000
467 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
470 # CONFIG_SWAP is not set
472 # CONFIG_IPC_NS is not set
473 +CONFIG_SYSVIPC_SYSCTL=y
474 # CONFIG_POSIX_MQUEUE is not set
475 # CONFIG_BSD_PROCESS_ACCT is not set
476 # CONFIG_TASKSTATS is not set
477 # CONFIG_UTS_NS is not set
478 # CONFIG_AUDIT is not set
479 # CONFIG_IKCONFIG is not set
480 +CONFIG_SYSFS_DEPRECATED=y
481 # CONFIG_RELAY is not set
482 +CONFIG_BLK_DEV_INITRD=y
483 CONFIG_INITRAMFS_SOURCE=""
484 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
490 +# CONFIG_LBD is not set
491 # CONFIG_BLK_DEV_IO_TRACE is not set
492 +# CONFIG_LSF is not set
496 @@ -110,10 +121,12 @@
497 # CONFIG_ARCH_IMX is not set
498 # CONFIG_ARCH_IOP32X is not set
499 # CONFIG_ARCH_IOP33X is not set
500 +# CONFIG_ARCH_IOP13XX is not set
501 # CONFIG_ARCH_IXP4XX is not set
502 # CONFIG_ARCH_IXP2000 is not set
503 # CONFIG_ARCH_IXP23XX is not set
504 # CONFIG_ARCH_L7200 is not set
505 +# CONFIG_ARCH_NS9XXX is not set
506 # CONFIG_ARCH_PNX4008 is not set
507 # CONFIG_ARCH_PXA is not set
508 # CONFIG_ARCH_RPC is not set
510 # CONFIG_ARCH_AT91RM9200 is not set
511 # CONFIG_ARCH_AT91SAM9260 is not set
512 CONFIG_ARCH_AT91SAM9261=y
513 +# CONFIG_ARCH_AT91SAM9263 is not set
516 # AT91SAM9261 Board Type
517 @@ -138,12 +152,14 @@
521 +# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
522 # CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
525 # AT91 Feature Selections
527 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
528 +# CONFIG_ATMEL_TCLIB is not set
533 # CONFIG_CPU_DCACHE_DISABLE is not set
534 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
535 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
536 +# CONFIG_OUTER_CACHE is not set
541 # CONFIG_SPARSEMEM_STATIC is not set
542 CONFIG_SPLIT_PTLOCK_CPUS=4096
543 # CONFIG_RESOURCES_64BIT is not set
544 +CONFIG_ZONE_DMA_FLAG=1
545 # CONFIG_LEDS is not set
546 CONFIG_ALIGNMENT_TRAP=y
549 CONFIG_ZBOOT_ROM_BSS=0x0
550 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
551 # CONFIG_XIP_KERNEL is not set
552 +# CONFIG_KEXEC is not set
555 # Floating point emulation
557 # Power management options
559 # CONFIG_PM is not set
560 -# CONFIG_APM is not set
566 # CONFIG_XFRM_USER is not set
567 # CONFIG_XFRM_SUB_POLICY is not set
568 +# CONFIG_XFRM_MIGRATE is not set
569 # CONFIG_NET_KEY is not set
571 # CONFIG_IP_MULTICAST is not set
573 # CONFIG_TCP_CONG_ADVANCED is not set
574 CONFIG_TCP_CONG_CUBIC=y
575 CONFIG_DEFAULT_TCP_CONG="cubic"
576 +# CONFIG_TCP_MD5SIG is not set
577 # CONFIG_IPV6 is not set
578 # CONFIG_INET6_XFRM_TUNNEL is not set
579 # CONFIG_INET6_TUNNEL is not set
581 CONFIG_PREVENT_FIRMWARE_BUILD=y
582 # CONFIG_FW_LOADER is not set
583 # CONFIG_DEBUG_DRIVER is not set
584 +# CONFIG_DEBUG_DEVRES is not set
585 # CONFIG_SYS_HYPERVISOR is not set
589 # User Modules And Translation Layers
591 # CONFIG_MTD_CHAR is not set
592 +CONFIG_MTD_BLKDEVS=y
594 # CONFIG_FTL is not set
595 # CONFIG_NFTL is not set
598 # Self-contained MTD device drivers
600 +# CONFIG_MTD_DATAFLASH is not set
601 +# CONFIG_MTD_M25P80 is not set
602 # CONFIG_MTD_SLRAM is not set
603 # CONFIG_MTD_PHRAM is not set
604 # CONFIG_MTD_MTDRAM is not set
607 # Plug and Play support
609 +# CONFIG_PNPACPI is not set
614 CONFIG_BLK_DEV_RAM_COUNT=16
615 CONFIG_BLK_DEV_RAM_SIZE=8192
616 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
617 -CONFIG_BLK_DEV_INITRD=y
618 # CONFIG_CDROM_PKTCDVD is not set
619 # CONFIG_ATA_OVER_ETH is not set
623 # CONFIG_RAID_ATTRS is not set
625 +# CONFIG_SCSI_TGT is not set
626 # CONFIG_SCSI_NETLINK is not set
627 CONFIG_SCSI_PROC_FS=y
630 CONFIG_SCSI_MULTI_LUN=y
631 # CONFIG_SCSI_CONSTANTS is not set
632 # CONFIG_SCSI_LOGGING is not set
633 +# CONFIG_SCSI_SCAN_ASYNC is not set
638 # CONFIG_SCSI_DEBUG is not set
641 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
643 +# CONFIG_ATA is not set
646 # Multi-device support (RAID and LVM)
648 # CONFIG_MD is not set
650 # CONFIG_INPUT_KEYBOARD is not set
651 # CONFIG_INPUT_MOUSE is not set
652 # CONFIG_INPUT_JOYSTICK is not set
653 -# CONFIG_INPUT_TOUCHSCREEN is not set
654 +CONFIG_INPUT_TOUCHSCREEN=y
655 +CONFIG_TOUCHSCREEN_ADS7846=y
656 +# CONFIG_TOUCHSCREEN_GUNZE is not set
657 +# CONFIG_TOUCHSCREEN_ELO is not set
658 +# CONFIG_TOUCHSCREEN_MTOUCH is not set
659 +# CONFIG_TOUCHSCREEN_MK712 is not set
660 +# CONFIG_TOUCHSCREEN_PENMOUNT is not set
661 +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
662 +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
663 +# CONFIG_TOUCHSCREEN_UCB1400 is not set
664 # CONFIG_INPUT_MISC is not set
668 # CONFIG_NVRAM is not set
669 # CONFIG_DTLK is not set
670 # CONFIG_R3964 is not set
673 -# Ftape, the floppy tape device driver
675 # CONFIG_RAW_DRIVER is not set
679 # I2C Hardware Bus support
682 +CONFIG_I2C_AT91_CLOCKRATE=100000
683 # CONFIG_I2C_OCORES is not set
684 # CONFIG_I2C_PARPORT_LIGHT is not set
685 # CONFIG_I2C_STUB is not set
690 -# CONFIG_SPI is not set
691 -# CONFIG_SPI_MASTER is not set
693 +# CONFIG_SPI_DEBUG is not set
697 +# SPI Master Controller Drivers
700 +# CONFIG_SPI_BITBANG is not set
703 +# SPI Protocol Masters
705 +# CONFIG_SPI_AT25 is not set
708 # Dallas's 1-wire bus
713 -# CONFIG_TIFM_CORE is not set
716 +# Multifunction device drivers
718 +# CONFIG_MFD_SM501 is not set
726 -# CONFIG_FIRMWARE_EDID is not set
727 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
728 # CONFIG_FB is not set
733 # CONFIG_VGA_CONSOLE is not set
734 CONFIG_DUMMY_CONSOLE=y
735 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
740 # CONFIG_SOUND is not set
746 +# CONFIG_HID_DEBUG is not set
751 CONFIG_USB_ARCH_HAS_HCD=y
753 # Miscellaneous USB options
755 CONFIG_USB_DEVICEFS=y
756 -# CONFIG_USB_BANDWIDTH is not set
757 # CONFIG_USB_DYNAMIC_MINORS is not set
758 # CONFIG_USB_OTG is not set
762 # CONFIG_USB_ISP116X_HCD is not set
763 CONFIG_USB_OHCI_HCD=y
764 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
765 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
766 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
767 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
768 # CONFIG_USB_SL811_HCD is not set
771 # CONFIG_USB_ATI_REMOTE2 is not set
772 # CONFIG_USB_KEYSPAN_REMOTE is not set
773 # CONFIG_USB_APPLETOUCH is not set
774 +# CONFIG_USB_GTCO is not set
777 # USB Imaging devices
779 # CONFIG_USB_RIO500 is not set
780 # CONFIG_USB_LEGOTOWER is not set
781 # CONFIG_USB_LCD is not set
782 +# CONFIG_USB_BERRY_CHARGE is not set
783 # CONFIG_USB_LED is not set
784 # CONFIG_USB_CYPRESS_CY7C63 is not set
785 # CONFIG_USB_CYTHERM is not set
787 # CONFIG_USB_APPLEDISPLAY is not set
788 # CONFIG_USB_LD is not set
789 # CONFIG_USB_TRANCEVIBRATOR is not set
790 +# CONFIG_USB_IOWARRIOR is not set
791 # CONFIG_USB_TEST is not set
795 # CONFIG_MMC_DEBUG is not set
798 -# CONFIG_MMC_TIFM_SD is not set
803 # CONFIG_BEFS_FS is not set
804 # CONFIG_BFS_FS is not set
805 # CONFIG_EFS_FS is not set
806 -# CONFIG_JFFS_FS is not set
807 # CONFIG_JFFS2_FS is not set
809 # CONFIG_VXFS_FS is not set
810 @@ -1045,6 +1104,11 @@
811 # CONFIG_NLS_UTF8 is not set
814 +# Distributed Lock Manager
816 +# CONFIG_DLM is not set
821 # CONFIG_PROFILING is not set
822 @@ -1056,28 +1120,30 @@
823 CONFIG_ENABLE_MUST_CHECK=y
824 # CONFIG_MAGIC_SYSRQ is not set
825 # CONFIG_UNUSED_SYMBOLS is not set
826 +# CONFIG_DEBUG_FS is not set
827 +# CONFIG_HEADERS_CHECK is not set
828 CONFIG_DEBUG_KERNEL=y
829 +# CONFIG_DEBUG_SHIRQ is not set
830 CONFIG_LOG_BUF_SHIFT=14
831 CONFIG_DETECT_SOFTLOCKUP=y
832 # CONFIG_SCHEDSTATS is not set
833 +# CONFIG_TIMER_STATS is not set
834 # CONFIG_DEBUG_SLAB is not set
835 # CONFIG_DEBUG_RT_MUTEXES is not set
836 # CONFIG_RT_MUTEX_TESTER is not set
837 # CONFIG_DEBUG_SPINLOCK is not set
838 # CONFIG_DEBUG_MUTEXES is not set
839 -# CONFIG_DEBUG_RWSEMS is not set
840 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
841 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
842 # CONFIG_DEBUG_KOBJECT is not set
843 CONFIG_DEBUG_BUGVERBOSE=y
844 # CONFIG_DEBUG_INFO is not set
845 -# CONFIG_DEBUG_FS is not set
846 # CONFIG_DEBUG_VM is not set
847 # CONFIG_DEBUG_LIST is not set
848 CONFIG_FRAME_POINTER=y
849 CONFIG_FORCED_INLINING=y
850 -# CONFIG_HEADERS_CHECK is not set
851 # CONFIG_RCU_TORTURE_TEST is not set
852 +# CONFIG_FAULT_INJECTION is not set
854 # CONFIG_DEBUG_ERRORS is not set
856 @@ -1097,9 +1163,12 @@
861 # CONFIG_CRC_CCITT is not set
862 # CONFIG_CRC16 is not set
864 # CONFIG_LIBCRC32C is not set
865 CONFIG_ZLIB_INFLATE=y
869 diff -urN linux-2.6.22-rc5/arch/arm/configs/at91sam9263ek_defconfig linux-2.6.22-rc5.new/arch/arm/configs/at91sam9263ek_defconfig
870 --- linux-2.6.22-rc5/arch/arm/configs/at91sam9263ek_defconfig 2007-06-17 04:09:12.000000000 +0200
871 +++ linux-2.6.22-rc5.new/arch/arm/configs/at91sam9263ek_defconfig 2007-07-29 05:23:04.000000000 +0200
874 # Automatically generated make config: don't edit
875 -# Linux kernel version: 2.6.20-rc1
876 -# Mon Jan 8 16:06:54 2007
877 +# Linux kernel version: 2.6.21
878 +# Mon May 7 11:42:49 2007
881 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
882 +CONFIG_GENERIC_GPIO=y
883 # CONFIG_GENERIC_TIME is not set
885 +# CONFIG_NO_IOPORT is not set
886 CONFIG_GENERIC_HARDIRQS=y
887 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
888 CONFIG_HARDIRQS_SW_RESEND=y
890 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
891 CONFIG_GENERIC_HWEIGHT=y
892 CONFIG_GENERIC_CALIBRATE_DELAY=y
894 CONFIG_VECTORS_BASE=0xffff0000
895 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
898 # CONFIG_SWAP is not set
900 # CONFIG_IPC_NS is not set
901 +CONFIG_SYSVIPC_SYSCTL=y
902 # CONFIG_POSIX_MQUEUE is not set
903 # CONFIG_BSD_PROCESS_ACCT is not set
904 # CONFIG_TASKSTATS is not set
906 # CONFIG_IKCONFIG is not set
907 CONFIG_SYSFS_DEPRECATED=y
908 # CONFIG_RELAY is not set
909 +CONFIG_BLK_DEV_INITRD=y
910 CONFIG_INITRAMFS_SOURCE=""
911 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
914 # CONFIG_ARCH_IXP2000 is not set
915 # CONFIG_ARCH_IXP23XX is not set
916 # CONFIG_ARCH_L7200 is not set
917 +# CONFIG_ARCH_NS9XXX is not set
918 # CONFIG_ARCH_PNX4008 is not set
919 # CONFIG_ARCH_PXA is not set
920 # CONFIG_ARCH_RPC is not set
922 # AT91 Feature Selections
924 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
925 +# CONFIG_ATMEL_TCLIB is not set
930 # CONFIG_CPU_DCACHE_DISABLE is not set
931 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
932 # CONFIG_CPU_CACHE_ROUND_ROBIN is not set
933 +# CONFIG_OUTER_CACHE is not set
938 # CONFIG_SPARSEMEM_STATIC is not set
939 CONFIG_SPLIT_PTLOCK_CPUS=4096
940 # CONFIG_RESOURCES_64BIT is not set
941 +CONFIG_ZONE_DMA_FLAG=1
942 # CONFIG_LEDS is not set
943 CONFIG_ALIGNMENT_TRAP=y
946 CONFIG_ZBOOT_ROM_BSS=0x0
947 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
948 # CONFIG_XIP_KERNEL is not set
949 +# CONFIG_KEXEC is not set
952 # Floating point emulation
954 # Power management options
956 # CONFIG_PM is not set
957 -# CONFIG_APM is not set
962 CONFIG_PREVENT_FIRMWARE_BUILD=y
963 # CONFIG_FW_LOADER is not set
964 # CONFIG_DEBUG_DRIVER is not set
965 +# CONFIG_DEBUG_DEVRES is not set
966 # CONFIG_SYS_HYPERVISOR is not set
971 # Plug and Play support
973 +# CONFIG_PNPACPI is not set
978 CONFIG_BLK_DEV_RAM_COUNT=16
979 CONFIG_BLK_DEV_RAM_SIZE=8192
980 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
981 -CONFIG_BLK_DEV_INITRD=y
982 # CONFIG_CDROM_PKTCDVD is not set
983 # CONFIG_ATA_OVER_ETH is not set
987 CONFIG_NET_ETHERNET=y
990 # CONFIG_SMC91X is not set
991 # CONFIG_DM9000 is not set
994 # I2C Hardware Bus support
997 +CONFIG_I2C_AT91_CLOCKRATE=100000
998 # CONFIG_I2C_OCORES is not set
999 # CONFIG_I2C_PARPORT_LIGHT is not set
1000 # CONFIG_I2C_STUB is not set
1003 # SPI Protocol Masters
1005 +# CONFIG_SPI_AT25 is not set
1008 # Dallas's 1-wire bus
1009 @@ -737,7 +751,11 @@
1013 -# CONFIG_TIFM_CORE is not set
1016 +# Multifunction device drivers
1018 +# CONFIG_MFD_SM501 is not set
1022 @@ -766,15 +784,23 @@
1026 -# CONFIG_FIRMWARE_EDID is not set
1027 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1029 +# CONFIG_FIRMWARE_EDID is not set
1030 +# CONFIG_FB_DDC is not set
1031 # CONFIG_FB_CFB_FILLRECT is not set
1032 # CONFIG_FB_CFB_COPYAREA is not set
1033 # CONFIG_FB_CFB_IMAGEBLIT is not set
1034 +# CONFIG_FB_SVGALIB is not set
1035 # CONFIG_FB_MACMODES is not set
1036 # CONFIG_FB_BACKLIGHT is not set
1037 # CONFIG_FB_MODE_HELPERS is not set
1038 # CONFIG_FB_TILEBLITTING is not set
1041 +# Frame buffer hardware drivers
1043 +# CONFIG_FB_S1D15605 is not set
1044 # CONFIG_FB_S1D13XXX is not set
1045 # CONFIG_FB_VIRTUAL is not set
1048 # Logo configuration
1050 # CONFIG_LOGO is not set
1051 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1059 +# CONFIG_HID_DEBUG is not set
1064 # Miscellaneous USB options
1066 CONFIG_USB_DEVICEFS=y
1067 -# CONFIG_USB_BANDWIDTH is not set
1068 # CONFIG_USB_DYNAMIC_MINORS is not set
1069 -# CONFIG_USB_MULTITHREAD_PROBE is not set
1070 # CONFIG_USB_OTG is not set
1075 # CONFIG_USB_ISP116X_HCD is not set
1076 CONFIG_USB_OHCI_HCD=y
1077 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
1078 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1079 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1080 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1081 # CONFIG_USB_SL811_HCD is not set
1084 # CONFIG_USB_ATI_REMOTE2 is not set
1085 # CONFIG_USB_KEYSPAN_REMOTE is not set
1086 # CONFIG_USB_APPLETOUCH is not set
1087 +# CONFIG_USB_GTCO is not set
1090 # USB Imaging devices
1092 # CONFIG_USB_RIO500 is not set
1093 # CONFIG_USB_LEGOTOWER is not set
1094 # CONFIG_USB_LCD is not set
1095 +# CONFIG_USB_BERRY_CHARGE is not set
1096 # CONFIG_USB_LED is not set
1097 # CONFIG_USB_CYPRESS_CY7C63 is not set
1098 # CONFIG_USB_CYTHERM is not set
1100 # CONFIG_USB_APPLEDISPLAY is not set
1101 # CONFIG_USB_LD is not set
1102 # CONFIG_USB_TRANCEVIBRATOR is not set
1103 +# CONFIG_USB_IOWARRIOR is not set
1104 # CONFIG_USB_TEST is not set
1108 # CONFIG_MMC_DEBUG is not set
1111 -# CONFIG_MMC_TIFM_SD is not set
1115 @@ -1136,15 +1163,16 @@
1116 # CONFIG_DEBUG_FS is not set
1117 # CONFIG_HEADERS_CHECK is not set
1118 CONFIG_DEBUG_KERNEL=y
1119 +# CONFIG_DEBUG_SHIRQ is not set
1120 CONFIG_LOG_BUF_SHIFT=14
1121 CONFIG_DETECT_SOFTLOCKUP=y
1122 # CONFIG_SCHEDSTATS is not set
1123 +# CONFIG_TIMER_STATS is not set
1124 # CONFIG_DEBUG_SLAB is not set
1125 # CONFIG_DEBUG_RT_MUTEXES is not set
1126 # CONFIG_RT_MUTEX_TESTER is not set
1127 # CONFIG_DEBUG_SPINLOCK is not set
1128 # CONFIG_DEBUG_MUTEXES is not set
1129 -# CONFIG_DEBUG_RWSEMS is not set
1130 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1131 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1132 # CONFIG_DEBUG_KOBJECT is not set
1133 @@ -1155,6 +1183,7 @@
1134 CONFIG_FRAME_POINTER=y
1135 CONFIG_FORCED_INLINING=y
1136 # CONFIG_RCU_TORTURE_TEST is not set
1137 +# CONFIG_FAULT_INJECTION is not set
1139 # CONFIG_DEBUG_ERRORS is not set
1141 @@ -1180,5 +1209,7 @@
1143 # CONFIG_LIBCRC32C is not set
1144 CONFIG_ZLIB_INFLATE=y
1145 +CONFIG_ZLIB_DEFLATE=y
1147 -CONFIG_IOMAP_COPY=y
1149 +CONFIG_HAS_IOPORT=y
1150 diff -urN linux-2.6.22-rc5/arch/arm/configs/cam60_defconfig linux-2.6.22-rc5.new/arch/arm/configs/cam60_defconfig
1151 --- linux-2.6.22-rc5/arch/arm/configs/cam60_defconfig 1970-01-01 01:00:00.000000000 +0100
1152 +++ linux-2.6.22-rc5.new/arch/arm/configs/cam60_defconfig 2007-07-29 05:23:04.000000000 +0200
1155 +# Automatically generated make config: don't edit
1156 +# Linux kernel version: 2.6.20
1157 +# Tue May 1 21:06:33 2007
1160 +# CONFIG_GENERIC_TIME is not set
1162 +CONFIG_GENERIC_HARDIRQS=y
1163 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1164 +CONFIG_HARDIRQS_SW_RESEND=y
1165 +CONFIG_GENERIC_IRQ_PROBE=y
1166 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
1167 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
1168 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
1169 +CONFIG_GENERIC_HWEIGHT=y
1170 +CONFIG_GENERIC_CALIBRATE_DELAY=y
1171 +CONFIG_VECTORS_BASE=0xffff0000
1172 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
1175 +# Code maturity level options
1177 +CONFIG_EXPERIMENTAL=y
1178 +CONFIG_BROKEN_ON_SMP=y
1179 +CONFIG_INIT_ENV_ARG_LIMIT=32
1184 +CONFIG_LOCALVERSION=""
1185 +# CONFIG_LOCALVERSION_AUTO is not set
1186 +# CONFIG_SWAP is not set
1188 +# CONFIG_IPC_NS is not set
1189 +# CONFIG_POSIX_MQUEUE is not set
1190 +# CONFIG_BSD_PROCESS_ACCT is not set
1191 +# CONFIG_TASKSTATS is not set
1192 +# CONFIG_UTS_NS is not set
1193 +# CONFIG_AUDIT is not set
1195 +CONFIG_IKCONFIG_PROC=y
1196 +CONFIG_SYSFS_DEPRECATED=y
1197 +# CONFIG_RELAY is not set
1198 +CONFIG_INITRAMFS_SOURCE=""
1199 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
1201 +# CONFIG_EMBEDDED is not set
1203 +CONFIG_SYSCTL_SYSCALL=y
1205 +# CONFIG_KALLSYMS_ALL is not set
1206 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
1216 +CONFIG_VM_EVENT_COUNTERS=y
1217 +CONFIG_RT_MUTEXES=y
1218 +# CONFIG_TINY_SHMEM is not set
1219 +CONFIG_BASE_SMALL=0
1220 +# CONFIG_SLOB is not set
1223 +# Loadable module support
1226 +CONFIG_MODULE_UNLOAD=y
1227 +CONFIG_MODULE_FORCE_UNLOAD=y
1228 +# CONFIG_MODVERSIONS is not set
1229 +# CONFIG_MODULE_SRCVERSION_ALL is not set
1230 +# CONFIG_KMOD is not set
1236 +# CONFIG_LBD is not set
1237 +# CONFIG_BLK_DEV_IO_TRACE is not set
1238 +# CONFIG_LSF is not set
1243 +CONFIG_IOSCHED_NOOP=y
1244 +CONFIG_IOSCHED_AS=y
1245 +# CONFIG_IOSCHED_DEADLINE is not set
1246 +# CONFIG_IOSCHED_CFQ is not set
1247 +CONFIG_DEFAULT_AS=y
1248 +# CONFIG_DEFAULT_DEADLINE is not set
1249 +# CONFIG_DEFAULT_CFQ is not set
1250 +# CONFIG_DEFAULT_NOOP is not set
1251 +CONFIG_DEFAULT_IOSCHED="anticipatory"
1256 +# CONFIG_ARCH_AAEC2000 is not set
1257 +# CONFIG_ARCH_INTEGRATOR is not set
1258 +# CONFIG_ARCH_REALVIEW is not set
1259 +# CONFIG_ARCH_VERSATILE is not set
1261 +# CONFIG_ARCH_CLPS7500 is not set
1262 +# CONFIG_ARCH_CLPS711X is not set
1263 +# CONFIG_ARCH_CO285 is not set
1264 +# CONFIG_ARCH_EBSA110 is not set
1265 +# CONFIG_ARCH_EP93XX is not set
1266 +# CONFIG_ARCH_FOOTBRIDGE is not set
1267 +# CONFIG_ARCH_NETX is not set
1268 +# CONFIG_ARCH_H720X is not set
1269 +# CONFIG_ARCH_IMX is not set
1270 +# CONFIG_ARCH_IOP32X is not set
1271 +# CONFIG_ARCH_IOP33X is not set
1272 +# CONFIG_ARCH_IOP13XX is not set
1273 +# CONFIG_ARCH_IXP4XX is not set
1274 +# CONFIG_ARCH_IXP2000 is not set
1275 +# CONFIG_ARCH_IXP23XX is not set
1276 +# CONFIG_ARCH_L7200 is not set
1277 +# CONFIG_ARCH_PNX4008 is not set
1278 +# CONFIG_ARCH_PXA is not set
1279 +# CONFIG_ARCH_RPC is not set
1280 +# CONFIG_ARCH_SA1100 is not set
1281 +# CONFIG_ARCH_S3C2410 is not set
1282 +# CONFIG_ARCH_SHARK is not set
1283 +# CONFIG_ARCH_LH7A40X is not set
1284 +# CONFIG_ARCH_OMAP is not set
1287 +# Atmel AT91 System-on-Chip
1289 +# CONFIG_ARCH_AT91RM9200 is not set
1290 +CONFIG_ARCH_AT91SAM9260=y
1291 +# CONFIG_ARCH_AT91SAM9261 is not set
1292 +# CONFIG_ARCH_AT91SAM9263 is not set
1295 +# AT91SAM9260 Board Type
1297 +# CONFIG_MACH_AT91SAM9260EK is not set
1298 +CONFIG_MACH_CAM60=y
1301 +# AT91 Board Options
1305 +# AT91 Feature Selections
1307 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
1313 +CONFIG_CPU_ARM926T=y
1315 +CONFIG_CPU_ABRT_EV5TJ=y
1316 +CONFIG_CPU_CACHE_VIVT=y
1317 +CONFIG_CPU_COPY_V4WB=y
1318 +CONFIG_CPU_TLB_V4WBI=y
1320 +CONFIG_CPU_CP15_MMU=y
1323 +# Processor Features
1325 +# CONFIG_ARM_THUMB is not set
1326 +# CONFIG_CPU_ICACHE_DISABLE is not set
1327 +# CONFIG_CPU_DCACHE_DISABLE is not set
1328 +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
1329 +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
1336 +# PCCARD (PCMCIA/CardBus) support
1338 +# CONFIG_PCCARD is not set
1343 +# CONFIG_PREEMPT is not set
1344 +# CONFIG_NO_IDLE_HZ is not set
1346 +# CONFIG_AEABI is not set
1347 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
1348 +CONFIG_SELECT_MEMORY_MODEL=y
1349 +CONFIG_FLATMEM_MANUAL=y
1350 +# CONFIG_DISCONTIGMEM_MANUAL is not set
1351 +# CONFIG_SPARSEMEM_MANUAL is not set
1353 +CONFIG_FLAT_NODE_MEM_MAP=y
1354 +# CONFIG_SPARSEMEM_STATIC is not set
1355 +CONFIG_SPLIT_PTLOCK_CPUS=4096
1356 +# CONFIG_RESOURCES_64BIT is not set
1357 +# CONFIG_LEDS is not set
1358 +CONFIG_ALIGNMENT_TRAP=y
1363 +CONFIG_ZBOOT_ROM_TEXT=0x22000000
1364 +CONFIG_ZBOOT_ROM_BSS=0x20004000
1365 +# CONFIG_ZBOOT_ROM is not set
1366 +CONFIG_CMDLINE="console=ttyS0,115200 noinitrd root=/dev/mtdblock3 rootfstype=jffs2 mem=64M"
1367 +# CONFIG_XIP_KERNEL is not set
1370 +# Floating point emulation
1374 +# At least one emulation must be selected
1377 +# CONFIG_FPE_NWFPE_XP is not set
1378 +# CONFIG_FPE_FASTFPE is not set
1379 +# CONFIG_VFP is not set
1382 +# Userspace binary formats
1384 +CONFIG_BINFMT_ELF=y
1385 +# CONFIG_BINFMT_AOUT is not set
1386 +# CONFIG_BINFMT_MISC is not set
1387 +# CONFIG_ARTHUR is not set
1390 +# Power management options
1392 +# CONFIG_PM is not set
1393 +# CONFIG_APM is not set
1401 +# Networking options
1403 +# CONFIG_NETDEBUG is not set
1405 +# CONFIG_PACKET_MMAP is not set
1408 +# CONFIG_XFRM_USER is not set
1409 +# CONFIG_XFRM_SUB_POLICY is not set
1410 +# CONFIG_NET_KEY is not set
1412 +# CONFIG_IP_MULTICAST is not set
1413 +# CONFIG_IP_ADVANCED_ROUTER is not set
1414 +CONFIG_IP_FIB_HASH=y
1416 +# CONFIG_IP_PNP_DHCP is not set
1417 +CONFIG_IP_PNP_BOOTP=y
1418 +# CONFIG_IP_PNP_RARP is not set
1419 +# CONFIG_NET_IPIP is not set
1420 +# CONFIG_NET_IPGRE is not set
1421 +# CONFIG_ARPD is not set
1422 +# CONFIG_SYN_COOKIES is not set
1423 +# CONFIG_INET_AH is not set
1424 +# CONFIG_INET_ESP is not set
1425 +# CONFIG_INET_IPCOMP is not set
1426 +# CONFIG_INET_XFRM_TUNNEL is not set
1427 +# CONFIG_INET_TUNNEL is not set
1428 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
1429 +CONFIG_INET_XFRM_MODE_TUNNEL=y
1430 +CONFIG_INET_XFRM_MODE_BEET=y
1432 +CONFIG_INET_TCP_DIAG=y
1433 +# CONFIG_TCP_CONG_ADVANCED is not set
1434 +CONFIG_TCP_CONG_CUBIC=y
1435 +CONFIG_DEFAULT_TCP_CONG="cubic"
1436 +# CONFIG_TCP_MD5SIG is not set
1437 +# CONFIG_IPV6 is not set
1438 +# CONFIG_INET6_XFRM_TUNNEL is not set
1439 +# CONFIG_INET6_TUNNEL is not set
1440 +# CONFIG_NETWORK_SECMARK is not set
1441 +# CONFIG_NETFILTER is not set
1444 +# DCCP Configuration (EXPERIMENTAL)
1446 +# CONFIG_IP_DCCP is not set
1449 +# SCTP Configuration (EXPERIMENTAL)
1451 +# CONFIG_IP_SCTP is not set
1454 +# TIPC Configuration (EXPERIMENTAL)
1456 +# CONFIG_TIPC is not set
1457 +# CONFIG_ATM is not set
1458 +# CONFIG_BRIDGE is not set
1459 +# CONFIG_VLAN_8021Q is not set
1460 +# CONFIG_DECNET is not set
1461 +# CONFIG_LLC2 is not set
1462 +# CONFIG_IPX is not set
1463 +# CONFIG_ATALK is not set
1464 +# CONFIG_X25 is not set
1465 +# CONFIG_LAPB is not set
1466 +# CONFIG_ECONET is not set
1467 +# CONFIG_WAN_ROUTER is not set
1470 +# QoS and/or fair queueing
1472 +# CONFIG_NET_SCHED is not set
1477 +# CONFIG_NET_PKTGEN is not set
1478 +# CONFIG_HAMRADIO is not set
1479 +# CONFIG_IRDA is not set
1480 +# CONFIG_BT is not set
1481 +# CONFIG_IEEE80211 is not set
1488 +# Generic Driver Options
1490 +CONFIG_STANDALONE=y
1491 +CONFIG_PREVENT_FIRMWARE_BUILD=y
1492 +# CONFIG_FW_LOADER is not set
1493 +# CONFIG_DEBUG_DRIVER is not set
1494 +# CONFIG_SYS_HYPERVISOR is not set
1497 +# Connector - unified userspace <-> kernelspace linker
1499 +# CONFIG_CONNECTOR is not set
1502 +# Memory Technology Devices (MTD)
1505 +# CONFIG_MTD_DEBUG is not set
1506 +CONFIG_MTD_CONCAT=y
1507 +CONFIG_MTD_PARTITIONS=y
1508 +# CONFIG_MTD_REDBOOT_PARTS is not set
1509 +CONFIG_MTD_CMDLINE_PARTS=y
1510 +# CONFIG_MTD_AFS_PARTS is not set
1513 +# User Modules And Translation Layers
1516 +CONFIG_MTD_BLKDEVS=y
1518 +# CONFIG_FTL is not set
1519 +# CONFIG_NFTL is not set
1520 +# CONFIG_INFTL is not set
1521 +# CONFIG_RFD_FTL is not set
1522 +# CONFIG_SSFDC is not set
1525 +# RAM/ROM/Flash chip drivers
1528 +# CONFIG_MTD_JEDECPROBE is not set
1529 +CONFIG_MTD_GEN_PROBE=y
1530 +# CONFIG_MTD_CFI_ADV_OPTIONS is not set
1531 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
1532 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
1533 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
1534 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
1535 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
1536 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
1537 +CONFIG_MTD_CFI_I1=y
1538 +CONFIG_MTD_CFI_I2=y
1539 +# CONFIG_MTD_CFI_I4 is not set
1540 +# CONFIG_MTD_CFI_I8 is not set
1541 +# CONFIG_MTD_CFI_INTELEXT is not set
1542 +# CONFIG_MTD_CFI_AMDSTD is not set
1543 +# CONFIG_MTD_CFI_STAA is not set
1544 +# CONFIG_MTD_RAM is not set
1545 +# CONFIG_MTD_ROM is not set
1546 +# CONFIG_MTD_ABSENT is not set
1547 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
1550 +# Mapping drivers for chip access
1552 +CONFIG_MTD_COMPLEX_MAPPINGS=y
1553 +# CONFIG_MTD_PHYSMAP is not set
1554 +# CONFIG_MTD_ARM_INTEGRATOR is not set
1555 +# CONFIG_MTD_PLATRAM is not set
1558 +# Self-contained MTD device drivers
1560 +CONFIG_MTD_DATAFLASH=y
1561 +# CONFIG_MTD_M25P80 is not set
1562 +# CONFIG_MTD_SLRAM is not set
1563 +# CONFIG_MTD_PHRAM is not set
1564 +# CONFIG_MTD_MTDRAM is not set
1565 +# CONFIG_MTD_BLOCK2MTD is not set
1568 +# Disk-On-Chip Device Drivers
1570 +# CONFIG_MTD_DOC2000 is not set
1571 +# CONFIG_MTD_DOC2001 is not set
1572 +# CONFIG_MTD_DOC2001PLUS is not set
1575 +# NAND Flash Device Drivers
1577 +# CONFIG_MTD_NAND is not set
1580 +# OneNAND Flash Device Drivers
1582 +# CONFIG_MTD_ONENAND is not set
1585 +# Parallel port support
1587 +# CONFIG_PARPORT is not set
1590 +# Plug and Play support
1596 +# CONFIG_BLK_DEV_COW_COMMON is not set
1597 +# CONFIG_BLK_DEV_LOOP is not set
1598 +# CONFIG_BLK_DEV_NBD is not set
1599 +CONFIG_BLK_DEV_RAM=y
1600 +CONFIG_BLK_DEV_RAM_COUNT=16
1601 +CONFIG_BLK_DEV_RAM_SIZE=8192
1602 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
1603 +CONFIG_BLK_DEV_INITRD=y
1604 +# CONFIG_CDROM_PKTCDVD is not set
1605 +# CONFIG_ATA_OVER_ETH is not set
1608 +# SCSI device support
1610 +# CONFIG_RAID_ATTRS is not set
1611 +# CONFIG_SCSI is not set
1612 +# CONFIG_SCSI_NETLINK is not set
1615 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
1617 +# CONFIG_ATA is not set
1620 +# Multi-device support (RAID and LVM)
1622 +# CONFIG_MD is not set
1625 +# Fusion MPT device support
1627 +# CONFIG_FUSION is not set
1630 +# IEEE 1394 (FireWire) support
1634 +# I2O device support
1638 +# Network device support
1640 +CONFIG_NETDEVICES=y
1641 +# CONFIG_DUMMY is not set
1642 +# CONFIG_BONDING is not set
1643 +# CONFIG_EQUALIZER is not set
1644 +# CONFIG_TUN is not set
1647 +# PHY device support
1649 +# CONFIG_PHYLIB is not set
1652 +# Ethernet (10 or 100Mbit)
1654 +CONFIG_NET_ETHERNET=y
1657 +# CONFIG_SMC91X is not set
1658 +# CONFIG_DM9000 is not set
1661 +# Ethernet (1000 Mbit)
1665 +# Ethernet (10000 Mbit)
1669 +# Token Ring devices
1673 +# Wireless LAN (non-hamradio)
1675 +# CONFIG_NET_RADIO is not set
1680 +# CONFIG_WAN is not set
1681 +# CONFIG_PPP is not set
1682 +# CONFIG_SLIP is not set
1683 +# CONFIG_SHAPER is not set
1684 +# CONFIG_NETCONSOLE is not set
1685 +# CONFIG_NETPOLL is not set
1686 +# CONFIG_NET_POLL_CONTROLLER is not set
1691 +# CONFIG_ISDN is not set
1694 +# Input device support
1697 +# CONFIG_INPUT_FF_MEMLESS is not set
1700 +# Userland interfaces
1702 +CONFIG_INPUT_MOUSEDEV=y
1703 +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
1704 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1705 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1706 +# CONFIG_INPUT_JOYDEV is not set
1707 +# CONFIG_INPUT_TSDEV is not set
1708 +# CONFIG_INPUT_EVDEV is not set
1709 +# CONFIG_INPUT_EVBUG is not set
1712 +# Input Device Drivers
1714 +# CONFIG_INPUT_KEYBOARD is not set
1715 +# CONFIG_INPUT_MOUSE is not set
1716 +# CONFIG_INPUT_JOYSTICK is not set
1717 +# CONFIG_INPUT_TOUCHSCREEN is not set
1718 +# CONFIG_INPUT_MISC is not set
1721 +# Hardware I/O ports
1723 +# CONFIG_SERIO is not set
1724 +# CONFIG_GAMEPORT is not set
1727 +# Character devices
1730 +CONFIG_VT_CONSOLE=y
1731 +CONFIG_HW_CONSOLE=y
1732 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
1733 +# CONFIG_SERIAL_NONSTANDARD is not set
1738 +# CONFIG_SERIAL_8250 is not set
1741 +# Non-8250 serial port support
1743 +CONFIG_SERIAL_ATMEL=y
1744 +CONFIG_SERIAL_ATMEL_CONSOLE=y
1745 +# CONFIG_SERIAL_ATMEL_TTYAT is not set
1746 +CONFIG_SERIAL_CORE=y
1747 +CONFIG_SERIAL_CORE_CONSOLE=y
1748 +CONFIG_UNIX98_PTYS=y
1749 +CONFIG_LEGACY_PTYS=y
1750 +CONFIG_LEGACY_PTY_COUNT=256
1755 +# CONFIG_IPMI_HANDLER is not set
1760 +# CONFIG_WATCHDOG is not set
1761 +# CONFIG_HW_RANDOM is not set
1762 +# CONFIG_NVRAM is not set
1763 +# CONFIG_DTLK is not set
1764 +# CONFIG_R3964 is not set
1765 +# CONFIG_RAW_DRIVER is not set
1770 +# CONFIG_TCG_TPM is not set
1775 +# CONFIG_I2C is not set
1781 +# CONFIG_SPI_DEBUG is not set
1782 +CONFIG_SPI_MASTER=y
1785 +# SPI Master Controller Drivers
1788 +# CONFIG_SPI_BITBANG is not set
1791 +# SPI Protocol Masters
1795 +# Dallas's 1-wire bus
1797 +# CONFIG_W1 is not set
1800 +# Hardware Monitoring support
1802 +# CONFIG_HWMON is not set
1803 +# CONFIG_HWMON_VID is not set
1808 +# CONFIG_TIFM_CORE is not set
1813 +# CONFIG_NEW_LEDS is not set
1824 +# Multimedia devices
1826 +# CONFIG_VIDEO_DEV is not set
1829 +# Digital Video Broadcasting Devices
1831 +# CONFIG_DVB is not set
1836 +# CONFIG_FIRMWARE_EDID is not set
1837 +# CONFIG_FB is not set
1840 +# Console display driver support
1842 +# CONFIG_VGA_CONSOLE is not set
1843 +CONFIG_DUMMY_CONSOLE=y
1844 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1849 +# CONFIG_SOUND is not set
1854 +# CONFIG_HID is not set
1859 +CONFIG_USB_ARCH_HAS_HCD=y
1860 +CONFIG_USB_ARCH_HAS_OHCI=y
1861 +# CONFIG_USB_ARCH_HAS_EHCI is not set
1862 +# CONFIG_USB is not set
1865 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1869 +# USB Gadget Support
1871 +# CONFIG_USB_GADGET is not set
1874 +# MMC/SD Card support
1876 +# CONFIG_MMC is not set
1882 +# CONFIG_RTC_CLASS is not set
1888 +# CONFIG_EXT2_FS_XATTR is not set
1889 +# CONFIG_EXT2_FS_XIP is not set
1891 +CONFIG_EXT3_FS_XATTR=y
1892 +# CONFIG_EXT3_FS_POSIX_ACL is not set
1893 +# CONFIG_EXT3_FS_SECURITY is not set
1894 +# CONFIG_EXT4DEV_FS is not set
1896 +# CONFIG_JBD_DEBUG is not set
1897 +CONFIG_FS_MBCACHE=y
1898 +# CONFIG_REISERFS_FS is not set
1899 +# CONFIG_JFS_FS is not set
1900 +# CONFIG_FS_POSIX_ACL is not set
1901 +# CONFIG_XFS_FS is not set
1902 +# CONFIG_GFS2_FS is not set
1903 +# CONFIG_OCFS2_FS is not set
1904 +# CONFIG_MINIX_FS is not set
1905 +# CONFIG_ROMFS_FS is not set
1907 +CONFIG_INOTIFY_USER=y
1908 +# CONFIG_QUOTA is not set
1910 +# CONFIG_AUTOFS_FS is not set
1911 +CONFIG_AUTOFS4_FS=y
1912 +# CONFIG_FUSE_FS is not set
1915 +# CD-ROM/DVD Filesystems
1917 +# CONFIG_ISO9660_FS is not set
1918 +# CONFIG_UDF_FS is not set
1921 +# DOS/FAT/NT Filesystems
1924 +# CONFIG_MSDOS_FS is not set
1926 +CONFIG_FAT_DEFAULT_CODEPAGE=437
1927 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1928 +# CONFIG_NTFS_FS is not set
1931 +# Pseudo filesystems
1934 +CONFIG_PROC_SYSCTL=y
1937 +# CONFIG_TMPFS_POSIX_ACL is not set
1938 +# CONFIG_HUGETLB_PAGE is not set
1940 +# CONFIG_CONFIGFS_FS is not set
1943 +# Miscellaneous filesystems
1945 +# CONFIG_ADFS_FS is not set
1946 +# CONFIG_AFFS_FS is not set
1947 +# CONFIG_HFS_FS is not set
1948 +# CONFIG_HFSPLUS_FS is not set
1949 +# CONFIG_BEFS_FS is not set
1950 +# CONFIG_BFS_FS is not set
1951 +# CONFIG_EFS_FS is not set
1953 +CONFIG_JFFS2_FS_DEBUG=0
1954 +CONFIG_JFFS2_FS_WRITEBUFFER=y
1955 +# CONFIG_JFFS2_SUMMARY is not set
1956 +# CONFIG_JFFS2_FS_XATTR is not set
1957 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1958 +CONFIG_JFFS2_ZLIB=y
1959 +CONFIG_JFFS2_RTIME=y
1960 +# CONFIG_JFFS2_RUBIN is not set
1962 +# CONFIG_VXFS_FS is not set
1963 +# CONFIG_HPFS_FS is not set
1964 +# CONFIG_QNX4FS_FS is not set
1965 +# CONFIG_SYSV_FS is not set
1966 +# CONFIG_UFS_FS is not set
1969 +# Network File Systems
1973 +# CONFIG_NFS_V3_ACL is not set
1974 +# CONFIG_NFS_V4 is not set
1975 +# CONFIG_NFS_DIRECTIO is not set
1976 +# CONFIG_NFSD is not set
1980 +CONFIG_NFS_COMMON=y
1982 +# CONFIG_RPCSEC_GSS_KRB5 is not set
1983 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
1984 +# CONFIG_SMB_FS is not set
1985 +# CONFIG_CIFS is not set
1986 +# CONFIG_NCP_FS is not set
1987 +# CONFIG_CODA_FS is not set
1988 +# CONFIG_AFS_FS is not set
1989 +# CONFIG_9P_FS is not set
1994 +# CONFIG_PARTITION_ADVANCED is not set
1995 +CONFIG_MSDOS_PARTITION=y
1998 +# Native Language Support
2001 +CONFIG_NLS_DEFAULT="iso8859-1"
2002 +CONFIG_NLS_CODEPAGE_437=y
2003 +# CONFIG_NLS_CODEPAGE_737 is not set
2004 +# CONFIG_NLS_CODEPAGE_775 is not set
2005 +CONFIG_NLS_CODEPAGE_850=y
2006 +# CONFIG_NLS_CODEPAGE_852 is not set
2007 +# CONFIG_NLS_CODEPAGE_855 is not set
2008 +# CONFIG_NLS_CODEPAGE_857 is not set
2009 +# CONFIG_NLS_CODEPAGE_860 is not set
2010 +# CONFIG_NLS_CODEPAGE_861 is not set
2011 +# CONFIG_NLS_CODEPAGE_862 is not set
2012 +# CONFIG_NLS_CODEPAGE_863 is not set
2013 +# CONFIG_NLS_CODEPAGE_864 is not set
2014 +# CONFIG_NLS_CODEPAGE_865 is not set
2015 +# CONFIG_NLS_CODEPAGE_866 is not set
2016 +# CONFIG_NLS_CODEPAGE_869 is not set
2017 +# CONFIG_NLS_CODEPAGE_936 is not set
2018 +# CONFIG_NLS_CODEPAGE_950 is not set
2019 +# CONFIG_NLS_CODEPAGE_932 is not set
2020 +# CONFIG_NLS_CODEPAGE_949 is not set
2021 +# CONFIG_NLS_CODEPAGE_874 is not set
2022 +# CONFIG_NLS_ISO8859_8 is not set
2023 +# CONFIG_NLS_CODEPAGE_1250 is not set
2024 +# CONFIG_NLS_CODEPAGE_1251 is not set
2025 +# CONFIG_NLS_ASCII is not set
2026 +CONFIG_NLS_ISO8859_1=y
2027 +# CONFIG_NLS_ISO8859_2 is not set
2028 +# CONFIG_NLS_ISO8859_3 is not set
2029 +# CONFIG_NLS_ISO8859_4 is not set
2030 +# CONFIG_NLS_ISO8859_5 is not set
2031 +# CONFIG_NLS_ISO8859_6 is not set
2032 +# CONFIG_NLS_ISO8859_7 is not set
2033 +# CONFIG_NLS_ISO8859_9 is not set
2034 +# CONFIG_NLS_ISO8859_13 is not set
2035 +# CONFIG_NLS_ISO8859_14 is not set
2036 +# CONFIG_NLS_ISO8859_15 is not set
2037 +# CONFIG_NLS_KOI8_R is not set
2038 +# CONFIG_NLS_KOI8_U is not set
2039 +# CONFIG_NLS_UTF8 is not set
2042 +# Distributed Lock Manager
2044 +# CONFIG_DLM is not set
2047 +# Profiling support
2049 +# CONFIG_PROFILING is not set
2054 +# CONFIG_PRINTK_TIME is not set
2055 +CONFIG_ENABLE_MUST_CHECK=y
2056 +# CONFIG_MAGIC_SYSRQ is not set
2057 +# CONFIG_UNUSED_SYMBOLS is not set
2058 +# CONFIG_DEBUG_FS is not set
2059 +# CONFIG_HEADERS_CHECK is not set
2060 +CONFIG_DEBUG_KERNEL=y
2061 +CONFIG_LOG_BUF_SHIFT=14
2062 +CONFIG_DETECT_SOFTLOCKUP=y
2063 +# CONFIG_SCHEDSTATS is not set
2064 +# CONFIG_DEBUG_SLAB is not set
2065 +# CONFIG_DEBUG_RT_MUTEXES is not set
2066 +# CONFIG_RT_MUTEX_TESTER is not set
2067 +# CONFIG_DEBUG_SPINLOCK is not set
2068 +# CONFIG_DEBUG_MUTEXES is not set
2069 +# CONFIG_DEBUG_RWSEMS is not set
2070 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
2071 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
2072 +# CONFIG_DEBUG_KOBJECT is not set
2073 +CONFIG_DEBUG_BUGVERBOSE=y
2074 +# CONFIG_DEBUG_INFO is not set
2075 +# CONFIG_DEBUG_VM is not set
2076 +# CONFIG_DEBUG_LIST is not set
2077 +CONFIG_FRAME_POINTER=y
2078 +CONFIG_FORCED_INLINING=y
2079 +# CONFIG_RCU_TORTURE_TEST is not set
2080 +CONFIG_DEBUG_USER=y
2081 +# CONFIG_DEBUG_ERRORS is not set
2083 +# CONFIG_DEBUG_ICEDCC is not set
2088 +# CONFIG_KEYS is not set
2089 +# CONFIG_SECURITY is not set
2092 +# Cryptographic options
2094 +# CONFIG_CRYPTO is not set
2099 +CONFIG_BITREVERSE=y
2100 +# CONFIG_CRC_CCITT is not set
2101 +# CONFIG_CRC16 is not set
2103 +# CONFIG_LIBCRC32C is not set
2104 +CONFIG_ZLIB_INFLATE=y
2105 +CONFIG_ZLIB_DEFLATE=y
2107 +CONFIG_IOMAP_COPY=y
2108 diff -urN linux-2.6.22-rc5/arch/arm/configs/kb9202_defconfig linux-2.6.22-rc5.new/arch/arm/configs/kb9202_defconfig
2109 --- linux-2.6.22-rc5/arch/arm/configs/kb9202_defconfig 2007-06-17 04:09:12.000000000 +0200
2110 +++ linux-2.6.22-rc5.new/arch/arm/configs/kb9202_defconfig 2007-07-29 05:23:04.000000000 +0200
2113 # Automatically generated make config: don't edit
2114 -# Linux kernel version: 2.6.13-rc2
2115 -# Sun Aug 14 19:26:59 2005
2116 +# Linux kernel version: 2.6.21
2117 +# Mon May 7 11:43:14 2007
2120 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y
2121 +CONFIG_GENERIC_GPIO=y
2122 +# CONFIG_GENERIC_TIME is not set
2125 +# CONFIG_NO_IOPORT is not set
2126 +CONFIG_GENERIC_HARDIRQS=y
2127 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
2128 +CONFIG_HARDIRQS_SW_RESEND=y
2129 +CONFIG_GENERIC_IRQ_PROBE=y
2130 CONFIG_RWSEM_GENERIC_SPINLOCK=y
2131 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
2132 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
2133 +CONFIG_GENERIC_HWEIGHT=y
2134 CONFIG_GENERIC_CALIBRATE_DELAY=y
2136 +CONFIG_VECTORS_BASE=0xffff0000
2137 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
2140 # Code maturity level options
2142 -# CONFIG_EXPERIMENTAL is not set
2143 -CONFIG_CLEAN_COMPILE=y
2144 +CONFIG_EXPERIMENTAL=y
2145 CONFIG_BROKEN_ON_SMP=y
2146 CONFIG_INIT_ENV_ARG_LIMIT=32
2148 @@ -21,54 +33,103 @@
2151 CONFIG_LOCALVERSION=""
2152 -# CONFIG_SWAP is not set
2153 -# CONFIG_SYSVIPC is not set
2154 -# CONFIG_BSD_PROCESS_ACCT is not set
2155 +CONFIG_LOCALVERSION_AUTO=y
2158 +# CONFIG_IPC_NS is not set
2159 +CONFIG_SYSVIPC_SYSCTL=y
2160 +CONFIG_POSIX_MQUEUE=y
2161 +CONFIG_BSD_PROCESS_ACCT=y
2162 +# CONFIG_BSD_PROCESS_ACCT_V3 is not set
2163 +# CONFIG_TASKSTATS is not set
2164 +# CONFIG_UTS_NS is not set
2167 +CONFIG_IKCONFIG_PROC=y
2168 +CONFIG_SYSFS_DEPRECATED=y
2169 +# CONFIG_RELAY is not set
2170 +CONFIG_BLK_DEV_INITRD=y
2171 +CONFIG_INITRAMFS_SOURCE=""
2172 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
2174 -# CONFIG_AUDIT is not set
2176 -# CONFIG_KOBJECT_UEVENT is not set
2177 -# CONFIG_IKCONFIG is not set
2178 # CONFIG_EMBEDDED is not set
2180 +CONFIG_SYSCTL_SYSCALL=y
2182 # CONFIG_KALLSYMS_ALL is not set
2183 -# CONFIG_KALLSYMS_EXTRA_PASS is not set
2184 +CONFIG_KALLSYMS_EXTRA_PASS=y
2192 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y
2194 -CONFIG_CC_ALIGN_FUNCTIONS=0
2195 -CONFIG_CC_ALIGN_LABELS=0
2196 -CONFIG_CC_ALIGN_LOOPS=0
2197 -CONFIG_CC_ALIGN_JUMPS=0
2199 +CONFIG_VM_EVENT_COUNTERS=y
2200 +CONFIG_RT_MUTEXES=y
2201 # CONFIG_TINY_SHMEM is not set
2203 +# CONFIG_SLOB is not set
2206 # Loadable module support
2209 CONFIG_MODULE_UNLOAD=y
2210 -CONFIG_OBSOLETE_MODPARM=y
2211 -# CONFIG_MODULE_SRCVERSION_ALL is not set
2212 +# CONFIG_MODULE_FORCE_UNLOAD is not set
2213 +CONFIG_MODVERSIONS=y
2214 +CONFIG_MODULE_SRCVERSION_ALL=y
2222 +# CONFIG_BLK_DEV_IO_TRACE is not set
2223 +# CONFIG_LSF is not set
2228 +CONFIG_IOSCHED_NOOP=y
2229 +CONFIG_IOSCHED_AS=y
2230 +CONFIG_IOSCHED_DEADLINE=y
2231 +CONFIG_IOSCHED_CFQ=y
2232 +# CONFIG_DEFAULT_AS is not set
2233 +# CONFIG_DEFAULT_DEADLINE is not set
2234 +CONFIG_DEFAULT_CFQ=y
2235 +# CONFIG_DEFAULT_NOOP is not set
2236 +CONFIG_DEFAULT_IOSCHED="cfq"
2241 +# CONFIG_ARCH_AAEC2000 is not set
2242 +# CONFIG_ARCH_INTEGRATOR is not set
2243 +# CONFIG_ARCH_REALVIEW is not set
2244 +# CONFIG_ARCH_VERSATILE is not set
2246 # CONFIG_ARCH_CLPS7500 is not set
2247 # CONFIG_ARCH_CLPS711X is not set
2248 # CONFIG_ARCH_CO285 is not set
2249 # CONFIG_ARCH_EBSA110 is not set
2250 +# CONFIG_ARCH_EP93XX is not set
2251 # CONFIG_ARCH_FOOTBRIDGE is not set
2252 -# CONFIG_ARCH_INTEGRATOR is not set
2253 -# CONFIG_ARCH_IOP3XX is not set
2254 +# CONFIG_ARCH_NETX is not set
2255 +# CONFIG_ARCH_H720X is not set
2256 +# CONFIG_ARCH_IMX is not set
2257 +# CONFIG_ARCH_IOP32X is not set
2258 +# CONFIG_ARCH_IOP33X is not set
2259 +# CONFIG_ARCH_IOP13XX is not set
2260 # CONFIG_ARCH_IXP4XX is not set
2261 # CONFIG_ARCH_IXP2000 is not set
2262 +# CONFIG_ARCH_IXP23XX is not set
2263 # CONFIG_ARCH_L7200 is not set
2264 +# CONFIG_ARCH_NS9XXX is not set
2265 +# CONFIG_ARCH_PNX4008 is not set
2266 # CONFIG_ARCH_PXA is not set
2267 # CONFIG_ARCH_RPC is not set
2268 # CONFIG_ARCH_SA1100 is not set
2269 @@ -76,34 +137,52 @@
2270 # CONFIG_ARCH_SHARK is not set
2271 # CONFIG_ARCH_LH7A40X is not set
2272 # CONFIG_ARCH_OMAP is not set
2273 -# CONFIG_ARCH_VERSATILE is not set
2274 -# CONFIG_ARCH_IMX is not set
2275 -# CONFIG_ARCH_H720X is not set
2276 -# CONFIG_ARCH_AAEC2000 is not set
2280 +# Atmel AT91 System-on-Chip
2282 CONFIG_ARCH_AT91RM9200=y
2283 +# CONFIG_ARCH_AT91SAM9260 is not set
2284 +# CONFIG_ARCH_AT91SAM9261 is not set
2285 +# CONFIG_ARCH_AT91SAM9263 is not set
2288 -# AT91RM9200 Implementations
2289 +# AT91RM9200 Board Type
2291 +# CONFIG_MACH_ONEARM is not set
2292 # CONFIG_ARCH_AT91RM9200DK is not set
2293 # CONFIG_MACH_AT91RM9200EK is not set
2294 # CONFIG_MACH_CSB337 is not set
2295 # CONFIG_MACH_CSB637 is not set
2296 # CONFIG_MACH_CARMEVA is not set
2297 +# CONFIG_MACH_ATEB9200 is not set
2298 CONFIG_MACH_KB9200=y
2299 +# CONFIG_MACH_KAFA is not set
2300 +# CONFIG_MACH_CHUB is not set
2303 +# AT91 Board Options
2307 +# AT91 Feature Selections
2309 +# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
2310 +# CONFIG_ATMEL_TCLIB is not set
2316 CONFIG_CPU_ARM920T=y
2319 CONFIG_CPU_ABRT_EV4T=y
2320 CONFIG_CPU_CACHE_V4WT=y
2321 CONFIG_CPU_CACHE_VIVT=y
2322 CONFIG_CPU_COPY_V4WB=y
2323 CONFIG_CPU_TLB_V4WBI=y
2325 +CONFIG_CPU_CP15_MMU=y
2328 # Processor Features
2329 @@ -112,24 +191,44 @@
2330 # CONFIG_CPU_ICACHE_DISABLE is not set
2331 # CONFIG_CPU_DCACHE_DISABLE is not set
2332 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
2333 +# CONFIG_OUTER_CACHE is not set
2338 -CONFIG_ISA_DMA_API=y
2341 # PCCARD (PCMCIA/CardBus) support
2343 -# CONFIG_PCCARD is not set
2345 +# CONFIG_PCMCIA_DEBUG is not set
2347 +CONFIG_PCMCIA_LOAD_CIS=y
2348 +CONFIG_PCMCIA_IOCTL=y
2353 +# CONFIG_AT91_CF is not set
2358 +# CONFIG_PREEMPT is not set
2359 # CONFIG_NO_IDLE_HZ is not set
2361 +# CONFIG_AEABI is not set
2362 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
2363 +CONFIG_SELECT_MEMORY_MODEL=y
2364 +CONFIG_FLATMEM_MANUAL=y
2365 +# CONFIG_DISCONTIGMEM_MANUAL is not set
2366 +# CONFIG_SPARSEMEM_MANUAL is not set
2368 CONFIG_FLAT_NODE_MEM_MAP=y
2369 +# CONFIG_SPARSEMEM_STATIC is not set
2370 +CONFIG_SPLIT_PTLOCK_CPUS=4096
2371 +# CONFIG_RESOURCES_64BIT is not set
2372 +CONFIG_ZONE_DMA_FLAG=1
2373 # CONFIG_LEDS is not set
2374 CONFIG_ALIGNMENT_TRAP=y
2376 @@ -138,8 +237,10 @@
2378 CONFIG_ZBOOT_ROM_TEXT=0x10000000
2379 CONFIG_ZBOOT_ROM_BSS=0x20040000
2381 -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933"
2382 +# CONFIG_ZBOOT_ROM is not set
2383 +CONFIG_CMDLINE="noinitrd root=/dev/mtdblock0 rootfstype=jffs2 mem=64M"
2384 +# CONFIG_XIP_KERNEL is not set
2385 +# CONFIG_KEXEC is not set
2388 # Floating point emulation
2392 # CONFIG_FPE_NWFPE_XP is not set
2393 +# CONFIG_FPE_FASTFPE is not set
2396 # Userspace binary formats
2397 @@ -165,6 +267,96 @@
2398 # CONFIG_PM is not set
2406 +# Networking options
2408 +# CONFIG_NETDEBUG is not set
2410 +# CONFIG_PACKET_MMAP is not set
2412 +# CONFIG_NET_KEY is not set
2414 +CONFIG_IP_MULTICAST=y
2415 +# CONFIG_IP_ADVANCED_ROUTER is not set
2416 +CONFIG_IP_FIB_HASH=y
2418 +# CONFIG_IP_PNP_DHCP is not set
2419 +# CONFIG_IP_PNP_BOOTP is not set
2420 +# CONFIG_IP_PNP_RARP is not set
2421 +# CONFIG_NET_IPIP is not set
2422 +# CONFIG_NET_IPGRE is not set
2423 +# CONFIG_IP_MROUTE is not set
2424 +# CONFIG_ARPD is not set
2425 +# CONFIG_SYN_COOKIES is not set
2426 +# CONFIG_INET_AH is not set
2427 +# CONFIG_INET_ESP is not set
2428 +# CONFIG_INET_IPCOMP is not set
2429 +# CONFIG_INET_XFRM_TUNNEL is not set
2430 +# CONFIG_INET_TUNNEL is not set
2431 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
2432 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
2433 +# CONFIG_INET_XFRM_MODE_BEET is not set
2434 +# CONFIG_INET_DIAG is not set
2435 +# CONFIG_TCP_CONG_ADVANCED is not set
2436 +CONFIG_TCP_CONG_CUBIC=y
2437 +CONFIG_DEFAULT_TCP_CONG="cubic"
2438 +# CONFIG_TCP_MD5SIG is not set
2439 +# CONFIG_IPV6 is not set
2440 +# CONFIG_INET6_XFRM_TUNNEL is not set
2441 +# CONFIG_INET6_TUNNEL is not set
2442 +# CONFIG_NETWORK_SECMARK is not set
2443 +# CONFIG_NETFILTER is not set
2446 +# DCCP Configuration (EXPERIMENTAL)
2448 +# CONFIG_IP_DCCP is not set
2451 +# SCTP Configuration (EXPERIMENTAL)
2454 +# CONFIG_SCTP_DBG_MSG is not set
2455 +# CONFIG_SCTP_DBG_OBJCNT is not set
2456 +# CONFIG_SCTP_HMAC_NONE is not set
2457 +# CONFIG_SCTP_HMAC_SHA1 is not set
2458 +CONFIG_SCTP_HMAC_MD5=y
2461 +# TIPC Configuration (EXPERIMENTAL)
2463 +# CONFIG_TIPC is not set
2464 +# CONFIG_ATM is not set
2465 +# CONFIG_BRIDGE is not set
2466 +# CONFIG_VLAN_8021Q is not set
2467 +# CONFIG_DECNET is not set
2468 +# CONFIG_LLC2 is not set
2469 +# CONFIG_IPX is not set
2470 +# CONFIG_ATALK is not set
2471 +# CONFIG_X25 is not set
2472 +# CONFIG_LAPB is not set
2473 +# CONFIG_ECONET is not set
2474 +# CONFIG_WAN_ROUTER is not set
2477 +# QoS and/or fair queueing
2479 +# CONFIG_NET_SCHED is not set
2484 +# CONFIG_NET_PKTGEN is not set
2485 +# CONFIG_HAMRADIO is not set
2486 +# CONFIG_IRDA is not set
2487 +# CONFIG_BT is not set
2488 +# CONFIG_IEEE80211 is not set
2494 @@ -173,13 +365,95 @@
2497 CONFIG_PREVENT_FIRMWARE_BUILD=y
2498 -# CONFIG_FW_LOADER is not set
2499 -CONFIG_DEBUG_DRIVER=y
2501 +# CONFIG_DEBUG_DRIVER is not set
2502 +# CONFIG_DEBUG_DEVRES is not set
2503 +# CONFIG_SYS_HYPERVISOR is not set
2506 +# Connector - unified userspace <-> kernelspace linker
2508 +# CONFIG_CONNECTOR is not set
2511 # Memory Technology Devices (MTD)
2513 -# CONFIG_MTD is not set
2515 +# CONFIG_MTD_DEBUG is not set
2516 +CONFIG_MTD_CONCAT=y
2517 +CONFIG_MTD_PARTITIONS=y
2518 +# CONFIG_MTD_REDBOOT_PARTS is not set
2519 +CONFIG_MTD_CMDLINE_PARTS=y
2520 +# CONFIG_MTD_AFS_PARTS is not set
2523 +# User Modules And Translation Layers
2526 +CONFIG_MTD_BLKDEVS=y
2528 +# CONFIG_FTL is not set
2529 +# CONFIG_NFTL is not set
2530 +# CONFIG_INFTL is not set
2531 +# CONFIG_RFD_FTL is not set
2532 +# CONFIG_SSFDC is not set
2535 +# RAM/ROM/Flash chip drivers
2537 +# CONFIG_MTD_CFI is not set
2538 +# CONFIG_MTD_JEDECPROBE is not set
2539 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
2540 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
2541 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
2542 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
2543 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
2544 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
2545 +CONFIG_MTD_CFI_I1=y
2546 +CONFIG_MTD_CFI_I2=y
2547 +# CONFIG_MTD_CFI_I4 is not set
2548 +# CONFIG_MTD_CFI_I8 is not set
2549 +# CONFIG_MTD_RAM is not set
2550 +# CONFIG_MTD_ROM is not set
2551 +# CONFIG_MTD_ABSENT is not set
2552 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
2555 +# Mapping drivers for chip access
2557 +CONFIG_MTD_COMPLEX_MAPPINGS=y
2558 +# CONFIG_MTD_PLATRAM is not set
2561 +# Self-contained MTD device drivers
2563 +# CONFIG_MTD_SLRAM is not set
2564 +# CONFIG_MTD_PHRAM is not set
2565 +# CONFIG_MTD_MTDRAM is not set
2566 +# CONFIG_MTD_BLOCK2MTD is not set
2569 +# Disk-On-Chip Device Drivers
2571 +# CONFIG_MTD_DOC2000 is not set
2572 +# CONFIG_MTD_DOC2001 is not set
2573 +# CONFIG_MTD_DOC2001PLUS is not set
2576 +# NAND Flash Device Drivers
2579 +# CONFIG_MTD_NAND_VERIFY_WRITE is not set
2580 +# CONFIG_MTD_NAND_ECC_SMC is not set
2581 +CONFIG_MTD_NAND_IDS=y
2582 +# CONFIG_MTD_NAND_DISKONCHIP is not set
2583 +CONFIG_MTD_NAND_AT91=y
2584 +# CONFIG_MTD_NAND_NANDSIM is not set
2587 +# OneNAND Flash Device Drivers
2589 +# CONFIG_MTD_ONENAND is not set
2592 # Parallel port support
2595 # Plug and Play support
2597 +# CONFIG_PNPACPI is not set
2601 @@ -196,28 +471,27 @@
2602 # CONFIG_BLK_DEV_COW_COMMON is not set
2603 CONFIG_BLK_DEV_LOOP=y
2604 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
2605 -CONFIG_BLK_DEV_NBD=y
2606 +# CONFIG_BLK_DEV_NBD is not set
2607 # CONFIG_BLK_DEV_UB is not set
2608 CONFIG_BLK_DEV_RAM=y
2609 CONFIG_BLK_DEV_RAM_COUNT=16
2610 -CONFIG_BLK_DEV_RAM_SIZE=4096
2611 -CONFIG_BLK_DEV_INITRD=y
2612 -CONFIG_INITRAMFS_SOURCE=""
2613 +CONFIG_BLK_DEV_RAM_SIZE=16384
2614 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
2615 # CONFIG_CDROM_PKTCDVD is not set
2616 +# CONFIG_ATA_OVER_ETH is not set
2620 +# ATA/ATAPI/MFM/RLL support
2622 -CONFIG_IOSCHED_NOOP=y
2623 -CONFIG_IOSCHED_AS=y
2624 -CONFIG_IOSCHED_DEADLINE=y
2625 -CONFIG_IOSCHED_CFQ=y
2626 -# CONFIG_ATA_OVER_ETH is not set
2627 +# CONFIG_IDE is not set
2630 # SCSI device support
2632 +# CONFIG_RAID_ATTRS is not set
2634 +# CONFIG_SCSI_TGT is not set
2635 +# CONFIG_SCSI_NETLINK is not set
2636 CONFIG_SCSI_PROC_FS=y
2639 @@ -233,97 +507,61 @@
2641 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
2643 -# CONFIG_SCSI_MULTI_LUN is not set
2644 -# CONFIG_SCSI_CONSTANTS is not set
2645 -# CONFIG_SCSI_LOGGING is not set
2646 +CONFIG_SCSI_MULTI_LUN=y
2647 +CONFIG_SCSI_CONSTANTS=y
2648 +CONFIG_SCSI_LOGGING=y
2649 +# CONFIG_SCSI_SCAN_ASYNC is not set
2652 -# SCSI Transport Attributes
2655 -# CONFIG_SCSI_SPI_ATTRS is not set
2656 +CONFIG_SCSI_SPI_ATTRS=m
2657 # CONFIG_SCSI_FC_ATTRS is not set
2658 # CONFIG_SCSI_ISCSI_ATTRS is not set
2659 +# CONFIG_SCSI_SAS_ATTRS is not set
2660 +# CONFIG_SCSI_SAS_LIBSAS is not set
2663 # SCSI low-level drivers
2665 -# CONFIG_SCSI_SATA is not set
2666 +# CONFIG_ISCSI_TCP is not set
2667 # CONFIG_SCSI_DEBUG is not set
2670 -# Multi-device support (RAID and LVM)
2672 -# CONFIG_MD is not set
2675 -# Fusion MPT device support
2676 +# PCMCIA SCSI adapter support
2678 -# CONFIG_FUSION is not set
2679 +# CONFIG_PCMCIA_AHA152X is not set
2680 +# CONFIG_PCMCIA_FDOMAIN is not set
2681 +# CONFIG_PCMCIA_NINJA_SCSI is not set
2682 +# CONFIG_PCMCIA_QLOGIC is not set
2683 +# CONFIG_PCMCIA_SYM53C500 is not set
2686 -# IEEE 1394 (FireWire) support
2687 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
2689 +# CONFIG_ATA is not set
2692 -# I2O device support
2693 +# Multi-device support (RAID and LVM)
2695 +# CONFIG_MD is not set
2698 -# Networking support
2699 +# Fusion MPT device support
2702 +# CONFIG_FUSION is not set
2705 -# Networking options
2706 +# IEEE 1394 (FireWire) support
2709 -# CONFIG_PACKET_MMAP is not set
2711 -# CONFIG_NET_KEY is not set
2713 -CONFIG_IP_MULTICAST=y
2714 -# CONFIG_IP_ADVANCED_ROUTER is not set
2715 -CONFIG_IP_FIB_HASH=y
2717 -CONFIG_IP_PNP_DHCP=y
2718 -# CONFIG_IP_PNP_BOOTP is not set
2719 -# CONFIG_IP_PNP_RARP is not set
2720 -# CONFIG_NET_IPIP is not set
2721 -# CONFIG_NET_IPGRE is not set
2722 -# CONFIG_IP_MROUTE is not set
2723 -# CONFIG_SYN_COOKIES is not set
2724 -# CONFIG_INET_AH is not set
2725 -# CONFIG_INET_ESP is not set
2726 -# CONFIG_INET_IPCOMP is not set
2727 -# CONFIG_INET_TUNNEL is not set
2728 -# CONFIG_IP_TCPDIAG is not set
2729 -# CONFIG_IP_TCPDIAG_IPV6 is not set
2730 -# CONFIG_TCP_CONG_ADVANCED is not set
2731 -CONFIG_TCP_CONG_BIC=y
2732 -# CONFIG_IPV6 is not set
2733 -# CONFIG_NETFILTER is not set
2734 -# CONFIG_BRIDGE is not set
2735 -# CONFIG_VLAN_8021Q is not set
2736 -# CONFIG_DECNET is not set
2737 -# CONFIG_LLC2 is not set
2738 -# CONFIG_IPX is not set
2739 -# CONFIG_ATALK is not set
2742 -# QoS and/or fair queueing
2743 +# I2O device support
2745 -# CONFIG_NET_SCHED is not set
2746 -# CONFIG_NET_CLS_ROUTE is not set
2750 +# Network device support
2752 -# CONFIG_NET_PKTGEN is not set
2753 -# CONFIG_NETPOLL is not set
2754 -# CONFIG_NET_POLL_CONTROLLER is not set
2755 -# CONFIG_HAMRADIO is not set
2756 -# CONFIG_IRDA is not set
2757 -# CONFIG_BT is not set
2759 # CONFIG_DUMMY is not set
2760 # CONFIG_BONDING is not set
2761 @@ -331,6 +569,11 @@
2762 # CONFIG_TUN is not set
2765 +# PHY device support
2767 +# CONFIG_PHYLIB is not set
2770 # Ethernet (10 or 100Mbit)
2772 CONFIG_NET_ETHERNET=y
2773 @@ -357,11 +600,20 @@
2774 # CONFIG_NET_RADIO is not set
2777 +# PCMCIA network device support
2779 +# CONFIG_NET_PCMCIA is not set
2784 # CONFIG_WAN is not set
2785 # CONFIG_PPP is not set
2786 # CONFIG_SLIP is not set
2787 +# CONFIG_SHAPER is not set
2788 +# CONFIG_NETCONSOLE is not set
2789 +# CONFIG_NETPOLL is not set
2790 +# CONFIG_NET_POLL_CONTROLLER is not set
2795 # Input device support
2798 +# CONFIG_INPUT_FF_MEMLESS is not set
2801 # Userland interfaces
2804 # Hardware I/O ports
2807 -# CONFIG_SERIO_SERPORT is not set
2808 -# CONFIG_SERIO_RAW is not set
2809 +# CONFIG_SERIO is not set
2810 # CONFIG_GAMEPORT is not set
2817 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
2818 # CONFIG_SERIAL_NONSTANDARD is not set
2821 @@ -420,11 +672,11 @@
2823 CONFIG_SERIAL_ATMEL=y
2824 CONFIG_SERIAL_ATMEL_CONSOLE=y
2825 +# CONFIG_SERIAL_ATMEL_TTYAT is not set
2826 CONFIG_SERIAL_CORE=y
2827 CONFIG_SERIAL_CORE_CONSOLE=y
2828 CONFIG_UNIX98_PTYS=y
2829 -CONFIG_LEGACY_PTYS=y
2830 -CONFIG_LEGACY_PTY_COUNT=256
2831 +# CONFIG_LEGACY_PTYS is not set
2835 @@ -435,21 +687,23 @@
2838 # CONFIG_WATCHDOG is not set
2839 +# CONFIG_HW_RANDOM is not set
2840 # CONFIG_NVRAM is not set
2841 -# CONFIG_RTC is not set
2842 -# CONFIG_AT91RM9200_RTC is not set
2843 # CONFIG_DTLK is not set
2844 # CONFIG_R3964 is not set
2847 -# Ftape, the floppy tape device driver
2848 +# PCMCIA character devices
2850 +# CONFIG_SYNCLINK_CS is not set
2851 +# CONFIG_CARDMAN_4000 is not set
2852 +# CONFIG_CARDMAN_4040 is not set
2853 # CONFIG_RAW_DRIVER is not set
2858 -# CONFIG_AT91_SPI is not set
2859 +# CONFIG_TCG_TPM is not set
2863 @@ -457,10 +711,50 @@
2864 # CONFIG_I2C is not set
2869 +# CONFIG_SPI is not set
2870 +# CONFIG_SPI_MASTER is not set
2873 +# Dallas's 1-wire bus
2875 +# CONFIG_W1 is not set
2878 +# Hardware Monitoring support
2881 +# CONFIG_HWMON_VID is not set
2882 +# CONFIG_SENSORS_ABITUGURU is not set
2883 +# CONFIG_SENSORS_F71805F is not set
2884 +# CONFIG_SENSORS_PC87427 is not set
2885 +# CONFIG_SENSORS_VT1211 is not set
2886 +CONFIG_HWMON_DEBUG_CHIP=y
2893 +# Multifunction device drivers
2895 +# CONFIG_MFD_SM501 is not set
2900 +# CONFIG_NEW_LEDS is not set
2911 # Multimedia devices
2913 # CONFIG_VIDEO_DEV is not set
2914 @@ -469,17 +763,57 @@
2915 # Digital Video Broadcasting Devices
2917 # CONFIG_DVB is not set
2918 +# CONFIG_USB_DABUSB is not set
2923 -# CONFIG_FB is not set
2924 +CONFIG_BACKLIGHT_LCD_SUPPORT=y
2925 +CONFIG_BACKLIGHT_CLASS_DEVICE=y
2926 +# CONFIG_LCD_CLASS_DEVICE is not set
2927 +CONFIG_BACKLIGHT_KB920x=y
2929 +# CONFIG_FIRMWARE_EDID is not set
2930 +# CONFIG_FB_DDC is not set
2931 +CONFIG_FB_CFB_FILLRECT=y
2932 +CONFIG_FB_CFB_COPYAREA=y
2933 +CONFIG_FB_CFB_IMAGEBLIT=y
2934 +# CONFIG_FB_SVGALIB is not set
2935 +# CONFIG_FB_MACMODES is not set
2936 +# CONFIG_FB_BACKLIGHT is not set
2937 +CONFIG_FB_MODE_HELPERS=y
2938 +CONFIG_FB_TILEBLITTING=y
2941 +# Frame buffer hardware drivers
2943 +CONFIG_FB_S1D15605=y
2944 +# CONFIG_FB_S1D13XXX is not set
2945 +# CONFIG_FB_VIRTUAL is not set
2948 # Console display driver support
2950 # CONFIG_VGA_CONSOLE is not set
2951 CONFIG_DUMMY_CONSOLE=y
2952 +CONFIG_FRAMEBUFFER_CONSOLE=y
2953 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
2955 +# CONFIG_FONT_8x8 is not set
2956 +# CONFIG_FONT_8x16 is not set
2957 +# CONFIG_FONT_6x11 is not set
2958 +# CONFIG_FONT_7x14 is not set
2959 +# CONFIG_FONT_PEARL_8x8 is not set
2960 +# CONFIG_FONT_ACORN_8x8 is not set
2961 +CONFIG_FONT_MINI_4x6=y
2962 +# CONFIG_FONT_SUN8x16 is not set
2963 +# CONFIG_FONT_SUN12x22 is not set
2964 +# CONFIG_FONT_10x18 is not set
2967 +# Logo configuration
2969 +# CONFIG_LOGO is not set
2973 @@ -487,82 +821,98 @@
2974 # CONFIG_SOUND is not set
2980 +# CONFIG_HID_DEBUG is not set
2985 CONFIG_USB_ARCH_HAS_HCD=y
2986 CONFIG_USB_ARCH_HAS_OHCI=y
2987 +# CONFIG_USB_ARCH_HAS_EHCI is not set
2990 +# CONFIG_USB_DEBUG is not set
2993 # Miscellaneous USB options
2995 CONFIG_USB_DEVICEFS=y
2996 +# CONFIG_USB_DYNAMIC_MINORS is not set
2997 +# CONFIG_USB_OTG is not set
3000 # USB Host Controller Drivers
3002 # CONFIG_USB_ISP116X_HCD is not set
3003 CONFIG_USB_OHCI_HCD=y
3004 -# CONFIG_USB_OHCI_BIG_ENDIAN is not set
3005 +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
3006 +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
3007 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
3008 # CONFIG_USB_SL811_HCD is not set
3011 # USB Device Class drivers
3013 -# CONFIG_USB_BLUETOOTH_TTY is not set
3014 # CONFIG_USB_ACM is not set
3015 # CONFIG_USB_PRINTER is not set
3018 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
3019 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
3023 +# may also be needed; see USB_STORAGE Help for more information
3025 CONFIG_USB_STORAGE=y
3026 -CONFIG_USB_STORAGE_DEBUG=y
3027 +# CONFIG_USB_STORAGE_DEBUG is not set
3028 +# CONFIG_USB_STORAGE_DATAFAB is not set
3029 # CONFIG_USB_STORAGE_FREECOM is not set
3030 # CONFIG_USB_STORAGE_DPCM is not set
3031 +# CONFIG_USB_STORAGE_USBAT is not set
3032 +# CONFIG_USB_STORAGE_SDDR09 is not set
3033 +# CONFIG_USB_STORAGE_SDDR55 is not set
3034 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
3035 +# CONFIG_USB_STORAGE_ALAUDA is not set
3036 +# CONFIG_USB_STORAGE_KARMA is not set
3037 +CONFIG_USB_LIBUSUAL=y
3042 -# CONFIG_USB_HID is not set
3045 -# USB HID Boot Protocol drivers
3047 -# CONFIG_USB_KBD is not set
3048 -# CONFIG_USB_MOUSE is not set
3050 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
3051 +# CONFIG_HID_FF is not set
3052 +# CONFIG_USB_HIDDEV is not set
3053 # CONFIG_USB_AIPTEK is not set
3054 # CONFIG_USB_WACOM is not set
3055 # CONFIG_USB_ACECAD is not set
3056 # CONFIG_USB_KBTAB is not set
3057 # CONFIG_USB_POWERMATE is not set
3058 -# CONFIG_USB_MTOUCH is not set
3059 -# CONFIG_USB_ITMTOUCH is not set
3060 -# CONFIG_USB_EGALAX is not set
3061 +# CONFIG_USB_TOUCHSCREEN is not set
3062 +# CONFIG_USB_YEALINK is not set
3063 # CONFIG_USB_XPAD is not set
3064 # CONFIG_USB_ATI_REMOTE is not set
3065 +# CONFIG_USB_ATI_REMOTE2 is not set
3066 +# CONFIG_USB_KEYSPAN_REMOTE is not set
3067 +# CONFIG_USB_APPLETOUCH is not set
3068 +# CONFIG_USB_GTCO is not set
3071 # USB Imaging devices
3073 +# CONFIG_USB_MDC800 is not set
3074 # CONFIG_USB_MICROTEK is not set
3077 -# USB Multimedia devices
3079 -# CONFIG_USB_DABUSB is not set
3082 -# Video4Linux support is needed for USB Multimedia device support
3086 # USB Network Adapters
3088 +# CONFIG_USB_CATC is not set
3089 # CONFIG_USB_KAWETH is not set
3090 # CONFIG_USB_PEGASUS is not set
3091 +# CONFIG_USB_RTL8150 is not set
3092 +# CONFIG_USB_USBNET_MII is not set
3093 # CONFIG_USB_USBNET is not set
3094 # CONFIG_USB_MON is not set
3096 @@ -580,12 +930,23 @@
3098 # CONFIG_USB_EMI62 is not set
3099 # CONFIG_USB_EMI26 is not set
3100 +# CONFIG_USB_ADUTUX is not set
3101 +# CONFIG_USB_AUERSWALD is not set
3102 +# CONFIG_USB_RIO500 is not set
3103 +# CONFIG_USB_LEGOTOWER is not set
3104 # CONFIG_USB_LCD is not set
3105 +# CONFIG_USB_BERRY_CHARGE is not set
3106 # CONFIG_USB_LED is not set
3107 +# CONFIG_USB_CYPRESS_CY7C63 is not set
3108 # CONFIG_USB_CYTHERM is not set
3109 -# CONFIG_USB_PHIDGETKIT is not set
3110 -# CONFIG_USB_PHIDGETSERVO is not set
3111 +# CONFIG_USB_PHIDGET is not set
3112 # CONFIG_USB_IDMOUSE is not set
3113 +# CONFIG_USB_FTDI_ELAN is not set
3114 +# CONFIG_USB_APPLEDISPLAY is not set
3115 +# CONFIG_USB_LD is not set
3116 +# CONFIG_USB_TRANCEVIBRATOR is not set
3117 +# CONFIG_USB_IOWARRIOR is not set
3118 +# CONFIG_USB_TEST is not set
3121 # USB DSL modem support
3122 @@ -599,36 +960,51 @@
3124 # MMC/SD Card support
3126 -# CONFIG_MMC is not set
3128 +# CONFIG_MMC_DEBUG is not set
3136 +# CONFIG_RTC_CLASS is not set
3142 CONFIG_EXT2_FS_XATTR=y
3143 -# CONFIG_EXT2_FS_POSIX_ACL is not set
3144 -# CONFIG_EXT2_FS_SECURITY is not set
3145 +CONFIG_EXT2_FS_POSIX_ACL=y
3146 +CONFIG_EXT2_FS_SECURITY=y
3147 # CONFIG_EXT2_FS_XIP is not set
3149 CONFIG_EXT3_FS_XATTR=y
3150 -# CONFIG_EXT3_FS_POSIX_ACL is not set
3151 -# CONFIG_EXT3_FS_SECURITY is not set
3152 +CONFIG_EXT3_FS_POSIX_ACL=y
3153 +CONFIG_EXT3_FS_SECURITY=y
3154 +# CONFIG_EXT4DEV_FS is not set
3156 # CONFIG_JBD_DEBUG is not set
3158 # CONFIG_REISERFS_FS is not set
3159 # CONFIG_JFS_FS is not set
3164 +CONFIG_FS_POSIX_ACL=y
3165 # CONFIG_XFS_FS is not set
3166 +# CONFIG_GFS2_FS is not set
3167 +# CONFIG_OCFS2_FS is not set
3168 # CONFIG_MINIX_FS is not set
3169 # CONFIG_ROMFS_FS is not set
3170 -# CONFIG_QUOTA is not set
3172 +CONFIG_INOTIFY_USER=y
3174 +# CONFIG_QFMT_V1 is not set
3179 +# CONFIG_AUTOFS_FS is not set
3181 +# CONFIG_FUSE_FS is not set
3184 # CD-ROM/DVD Filesystems
3185 @@ -643,25 +1019,40 @@
3188 CONFIG_FAT_DEFAULT_CODEPAGE=437
3189 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
3190 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
3191 # CONFIG_NTFS_FS is not set
3194 # Pseudo filesystems
3197 +CONFIG_PROC_SYSCTL=y
3199 -CONFIG_DEVPTS_FS_XATTR=y
3200 -# CONFIG_DEVPTS_FS_SECURITY is not set
3202 -# CONFIG_TMPFS_XATTR is not set
3203 +# CONFIG_TMPFS_POSIX_ACL is not set
3204 # CONFIG_HUGETLB_PAGE is not set
3206 +CONFIG_CONFIGFS_FS=y
3209 # Miscellaneous filesystems
3211 +# CONFIG_ADFS_FS is not set
3212 +# CONFIG_AFFS_FS is not set
3213 +# CONFIG_HFS_FS is not set
3214 # CONFIG_HFSPLUS_FS is not set
3215 +# CONFIG_BEFS_FS is not set
3216 +# CONFIG_BFS_FS is not set
3217 +# CONFIG_EFS_FS is not set
3219 +CONFIG_JFFS2_FS_DEBUG=0
3220 +CONFIG_JFFS2_FS_WRITEBUFFER=y
3221 +# CONFIG_JFFS2_SUMMARY is not set
3222 +# CONFIG_JFFS2_FS_XATTR is not set
3223 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
3224 +CONFIG_JFFS2_ZLIB=y
3225 +CONFIG_JFFS2_RTIME=y
3226 +# CONFIG_JFFS2_RUBIN is not set
3227 # CONFIG_CRAMFS is not set
3228 # CONFIG_VXFS_FS is not set
3229 # CONFIG_HPFS_FS is not set
3230 @@ -675,16 +1066,23 @@
3233 # CONFIG_NFS_V3_ACL is not set
3235 +# CONFIG_NFS_DIRECTIO is not set
3236 # CONFIG_NFSD is not set
3242 +CONFIG_SUNRPC_GSS=y
3243 +CONFIG_RPCSEC_GSS_KRB5=y
3244 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
3245 # CONFIG_SMB_FS is not set
3246 # CONFIG_CIFS is not set
3247 # CONFIG_NCP_FS is not set
3248 # CONFIG_CODA_FS is not set
3249 +# CONFIG_AFS_FS is not set
3250 +# CONFIG_9P_FS is not set
3254 @@ -734,26 +1132,51 @@
3255 # CONFIG_NLS_ISO8859_15 is not set
3256 # CONFIG_NLS_KOI8_R is not set
3257 # CONFIG_NLS_KOI8_U is not set
3258 -# CONFIG_NLS_UTF8 is not set
3262 +# Distributed Lock Manager
3264 +# CONFIG_DLM is not set
3267 +# Profiling support
3269 +# CONFIG_PROFILING is not set
3274 # CONFIG_PRINTK_TIME is not set
3275 +CONFIG_ENABLE_MUST_CHECK=y
3276 +CONFIG_MAGIC_SYSRQ=y
3277 +# CONFIG_UNUSED_SYMBOLS is not set
3278 +# CONFIG_DEBUG_FS is not set
3279 +# CONFIG_HEADERS_CHECK is not set
3280 CONFIG_DEBUG_KERNEL=y
3281 -# CONFIG_MAGIC_SYSRQ is not set
3282 -CONFIG_LOG_BUF_SHIFT=14
3283 +# CONFIG_DEBUG_SHIRQ is not set
3284 +CONFIG_LOG_BUF_SHIFT=17
3285 +CONFIG_DETECT_SOFTLOCKUP=y
3286 # CONFIG_SCHEDSTATS is not set
3287 +# CONFIG_TIMER_STATS is not set
3288 # CONFIG_DEBUG_SLAB is not set
3289 -# CONFIG_DEBUG_SPINLOCK is not set
3290 -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
3291 +# CONFIG_DEBUG_RT_MUTEXES is not set
3292 +# CONFIG_RT_MUTEX_TESTER is not set
3293 +CONFIG_DEBUG_SPINLOCK=y
3294 +# CONFIG_DEBUG_MUTEXES is not set
3295 +CONFIG_DEBUG_SPINLOCK_SLEEP=y
3296 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
3297 # CONFIG_DEBUG_KOBJECT is not set
3298 CONFIG_DEBUG_BUGVERBOSE=y
3299 # CONFIG_DEBUG_INFO is not set
3300 -# CONFIG_DEBUG_FS is not set
3301 +# CONFIG_DEBUG_VM is not set
3302 +# CONFIG_DEBUG_LIST is not set
3303 CONFIG_FRAME_POINTER=y
3304 -CONFIG_DEBUG_USER=y
3305 -CONFIG_DEBUG_ERRORS=y
3306 +CONFIG_FORCED_INLINING=y
3307 +# CONFIG_RCU_TORTURE_TEST is not set
3308 +# CONFIG_FAULT_INJECTION is not set
3309 +# CONFIG_DEBUG_USER is not set
3310 +# CONFIG_DEBUG_ERRORS is not set
3312 # CONFIG_DEBUG_ICEDCC is not set
3314 @@ -766,7 +1189,43 @@
3316 # Cryptographic options
3318 -# CONFIG_CRYPTO is not set
3320 +CONFIG_CRYPTO_ALGAPI=y
3321 +CONFIG_CRYPTO_BLKCIPHER=y
3322 +CONFIG_CRYPTO_HASH=m
3323 +CONFIG_CRYPTO_MANAGER=y
3324 +CONFIG_CRYPTO_HMAC=m
3325 +# CONFIG_CRYPTO_XCBC is not set
3326 +# CONFIG_CRYPTO_NULL is not set
3327 +# CONFIG_CRYPTO_MD4 is not set
3328 +CONFIG_CRYPTO_MD5=y
3329 +# CONFIG_CRYPTO_SHA1 is not set
3330 +# CONFIG_CRYPTO_SHA256 is not set
3331 +# CONFIG_CRYPTO_SHA512 is not set
3332 +# CONFIG_CRYPTO_WP512 is not set
3333 +# CONFIG_CRYPTO_TGR192 is not set
3334 +# CONFIG_CRYPTO_GF128MUL is not set
3335 +# CONFIG_CRYPTO_ECB is not set
3336 +CONFIG_CRYPTO_CBC=y
3337 +CONFIG_CRYPTO_PCBC=m
3338 +# CONFIG_CRYPTO_LRW is not set
3339 +CONFIG_CRYPTO_DES=y
3340 +# CONFIG_CRYPTO_FCRYPT is not set
3341 +# CONFIG_CRYPTO_BLOWFISH is not set
3342 +# CONFIG_CRYPTO_TWOFISH is not set
3343 +# CONFIG_CRYPTO_SERPENT is not set
3344 +# CONFIG_CRYPTO_AES is not set
3345 +# CONFIG_CRYPTO_CAST5 is not set
3346 +# CONFIG_CRYPTO_CAST6 is not set
3347 +# CONFIG_CRYPTO_TEA is not set
3348 +# CONFIG_CRYPTO_ARC4 is not set
3349 +# CONFIG_CRYPTO_KHAZAD is not set
3350 +# CONFIG_CRYPTO_ANUBIS is not set
3351 +# CONFIG_CRYPTO_DEFLATE is not set
3352 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
3353 +# CONFIG_CRYPTO_CRC32C is not set
3354 +# CONFIG_CRYPTO_CAMELLIA is not set
3355 +# CONFIG_CRYPTO_TEST is not set
3358 # Hardware crypto devices
3359 @@ -775,6 +1234,14 @@
3363 +CONFIG_BITREVERSE=y
3364 # CONFIG_CRC_CCITT is not set
3365 +# CONFIG_CRC16 is not set
3367 # CONFIG_LIBCRC32C is not set
3368 +CONFIG_AUDIT_GENERIC=y
3369 +CONFIG_ZLIB_INFLATE=y
3370 +CONFIG_ZLIB_DEFLATE=y
3373 +CONFIG_HAS_IOPORT=y
3374 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200.c
3375 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200.c 2007-06-17 04:09:12.000000000 +0200
3376 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200.c 2007-07-29 05:23:04.000000000 +0200
3377 @@ -267,6 +267,33 @@
3380 /* --------------------------------------------------------------------
3381 + * Timer/Counter library initialization
3382 + * -------------------------------------------------------------------- */
3383 +#ifdef CONFIG_ATMEL_TCLIB
3387 +static struct atmel_tcblock at91rm9200_tcblocks[] = {
3389 + .physaddr = AT91RM9200_BASE_TCB0,
3390 + .irq = { AT91RM9200_ID_TC0, AT91RM9200_ID_TC1, AT91RM9200_ID_TC2 },
3391 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3394 + .physaddr = AT91RM9200_BASE_TCB1,
3395 + .irq = { AT91RM9200_ID_TC3, AT91RM9200_ID_TC4, AT91RM9200_ID_TC5 },
3396 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3400 +#define at91rm9200_tc_init() atmel_tc_init(at91rm9200_tcblocks, ARRAY_SIZE(at91rm9200_tcblocks))
3403 +#define at91rm9200_tc_init() do {} while(0)
3407 +/* --------------------------------------------------------------------
3408 * AT91RM9200 processor initialization
3409 * -------------------------------------------------------------------- */
3410 void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks)
3413 /* Initialize GPIO subsystem */
3414 at91_gpio_init(at91rm9200_gpio, banks);
3416 + /* Initialize the Timer/Counter blocks */
3417 + at91rm9200_tc_init();
3421 @@ -301,28 +331,28 @@
3422 static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
3423 7, /* Advanced Interrupt Controller (FIQ) */
3424 7, /* System Peripherals */
3425 - 0, /* Parallel IO Controller A */
3426 - 0, /* Parallel IO Controller B */
3427 - 0, /* Parallel IO Controller C */
3428 - 0, /* Parallel IO Controller D */
3433 + 1, /* Parallel IO Controller A */
3434 + 1, /* Parallel IO Controller B */
3435 + 1, /* Parallel IO Controller C */
3436 + 1, /* Parallel IO Controller D */
3441 0, /* Multimedia Card Interface */
3442 - 4, /* USB Device Port */
3443 - 0, /* Two-Wire Interface */
3444 - 6, /* Serial Peripheral Interface */
3445 - 5, /* Serial Synchronous Controller 0 */
3446 - 5, /* Serial Synchronous Controller 1 */
3447 - 5, /* Serial Synchronous Controller 2 */
3448 + 2, /* USB Device Port */
3449 + 6, /* Two-Wire Interface */
3450 + 5, /* Serial Peripheral Interface */
3451 + 4, /* Serial Synchronous Controller 0 */
3452 + 4, /* Serial Synchronous Controller 1 */
3453 + 4, /* Serial Synchronous Controller 2 */
3454 0, /* Timer Counter 0 */
3455 0, /* Timer Counter 1 */
3456 0, /* Timer Counter 2 */
3457 0, /* Timer Counter 3 */
3458 0, /* Timer Counter 4 */
3459 0, /* Timer Counter 5 */
3460 - 3, /* USB Host port */
3461 + 2, /* USB Host port */
3462 3, /* Ethernet MAC */
3463 0, /* Advanced Interrupt Controller (IRQ0) */
3464 0, /* Advanced Interrupt Controller (IRQ1) */
3465 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200_devices.c
3466 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91rm9200_devices.c 2007-06-17 04:09:12.000000000 +0200
3467 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91rm9200_devices.c 2007-07-29 05:23:04.000000000 +0200
3468 @@ -477,7 +477,18 @@
3470 * -------------------------------------------------------------------- */
3472 -#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
3473 +#if defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) /* legacy SPI driver */
3474 +#define SPI_DEVNAME "at91_spi"
3476 +#elif defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) /* SPI bitbanging driver */
3477 +#define SPI_DEVNAME "at91_spi"
3479 +#elif defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) /* new SPI driver */
3480 +#define SPI_DEVNAME "atmel_spi"
3485 static u64 spi_dmamask = 0xffffffffUL;
3487 static struct resource spi_resources[] = {
3491 static struct platform_device at91rm9200_spi_device = {
3492 - .name = "at91_spi",
3493 + .name = SPI_DEVNAME,
3496 .dma_mask = &spi_dmamask,
3497 @@ -603,6 +614,32 @@
3501 +#if defined(CONFIG_NEW_LEDS)
3503 +static struct platform_device at91_leds = {
3504 + .name = "at91_leds",
3508 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3513 + at91_leds.dev.platform_data = leds;
3515 + for ( ; nr; nr--, leds++) {
3516 + leds->index = nr; /* first record stores number of leds */
3517 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3520 + platform_device_register(&at91_leds);
3523 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3527 /* --------------------------------------------------------------------
3529 * -------------------------------------------------------------------- */
3530 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260.c
3531 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260.c 2007-06-17 04:09:12.000000000 +0200
3532 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260.c 2007-07-29 05:23:04.000000000 +0200
3533 @@ -269,6 +269,33 @@
3536 /* --------------------------------------------------------------------
3537 + * Timer/Counter library initialization
3538 + * -------------------------------------------------------------------- */
3539 +#ifdef CONFIG_ATMEL_TCLIB
3543 +static struct atmel_tcblock at91sam9260_tcblocks[] = {
3545 + .physaddr = AT91SAM9260_BASE_TCB0,
3546 + .irq = { AT91SAM9260_ID_TC0, AT91SAM9260_ID_TC1, AT91SAM9260_ID_TC2 },
3547 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3550 + .physaddr = AT91SAM9260_BASE_TCB1,
3551 + .irq = { AT91SAM9260_ID_TC3, AT91SAM9260_ID_TC4, AT91SAM9260_ID_TC5 },
3552 + .clk = { &tc3_clk, &tc4_clk, &tc5_clk },
3556 +#define at91sam9260_tc_init() atmel_tc_init(at91sam9260_tcblocks, ARRAY_SIZE(at91sam9260_tcblocks))
3559 +#define at91sam9260_tc_init() do {} while(0)
3563 +/* --------------------------------------------------------------------
3564 * AT91SAM9260 processor initialization
3565 * -------------------------------------------------------------------- */
3569 /* Register GPIO subsystem */
3570 at91_gpio_init(at91sam9260_gpio, 3);
3572 + /* Initialize the Timer/Counter blocks */
3573 + at91sam9260_tc_init();
3576 /* --------------------------------------------------------------------
3577 @@ -327,30 +357,30 @@
3578 static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
3579 7, /* Advanced Interrupt Controller */
3580 7, /* System Peripherals */
3581 - 0, /* Parallel IO Controller A */
3582 - 0, /* Parallel IO Controller B */
3583 - 0, /* Parallel IO Controller C */
3584 + 1, /* Parallel IO Controller A */
3585 + 1, /* Parallel IO Controller B */
3586 + 1, /* Parallel IO Controller C */
3587 0, /* Analog-to-Digital Converter */
3594 0, /* Multimedia Card Interface */
3595 - 4, /* USB Device Port */
3596 - 0, /* Two-Wire Interface */
3597 - 6, /* Serial Peripheral Interface 0 */
3598 - 6, /* Serial Peripheral Interface 1 */
3599 + 2, /* USB Device Port */
3600 + 6, /* Two-Wire Interface */
3601 + 5, /* Serial Peripheral Interface 0 */
3602 + 5, /* Serial Peripheral Interface 1 */
3603 5, /* Serial Synchronous Controller */
3606 0, /* Timer Counter 0 */
3607 0, /* Timer Counter 1 */
3608 0, /* Timer Counter 2 */
3609 - 3, /* USB Host port */
3610 + 2, /* USB Host port */
3612 0, /* Image Sensor Interface */
3619 0, /* Timer Counter 3 */
3620 0, /* Timer Counter 4 */
3621 0, /* Timer Counter 5 */
3622 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260_devices.c
3623 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9260_devices.c 2007-06-17 04:09:12.000000000 +0200
3624 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9260_devices.c 2007-07-29 05:23:04.000000000 +0200
3625 @@ -524,6 +524,32 @@
3629 +#if defined(CONFIG_NEW_LEDS)
3631 +static struct platform_device at91_leds = {
3632 + .name = "at91_leds",
3636 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3641 + at91_leds.dev.platform_data = leds;
3643 + for ( ; nr; nr--, leds++) {
3644 + leds->index = nr; /* first record stores number of leds */
3645 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3648 + platform_device_register(&at91_leds);
3651 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3655 /* --------------------------------------------------------------------
3657 * -------------------------------------------------------------------- */
3658 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261.c
3659 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261.c 2007-06-17 04:09:12.000000000 +0200
3660 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261.c 2007-07-29 05:23:04.000000000 +0200
3661 @@ -247,6 +247,28 @@
3664 /* --------------------------------------------------------------------
3665 + * Timer/Counter library initialization
3666 + * -------------------------------------------------------------------- */
3667 +#ifdef CONFIG_ATMEL_TCLIB
3671 +static struct atmel_tcblock at91sam9261_tcblocks[] = {
3673 + .physaddr = AT91SAM9261_BASE_TCB0,
3674 + .irq = { AT91SAM9261_ID_TC0, AT91SAM9261_ID_TC1, AT91SAM9261_ID_TC2 },
3675 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
3679 +#define at91sam9261_tc_init() atmel_tc_init(at91sam9261_tcblocks, ARRAY_SIZE(at91sam9261_tcblocks))
3682 +#define at91sam9261_tc_init() do {} while(0)
3686 +/* --------------------------------------------------------------------
3687 * AT91SAM9261 processor initialization
3688 * -------------------------------------------------------------------- */
3692 /* Register GPIO subsystem */
3693 at91_gpio_init(at91sam9261_gpio, 3);
3695 + /* Initialize the Timer/Counter blocks */
3696 + at91sam9261_tc_init();
3699 /* --------------------------------------------------------------------
3700 @@ -279,25 +304,25 @@
3701 static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
3702 7, /* Advanced Interrupt Controller */
3703 7, /* System Peripherals */
3704 - 0, /* Parallel IO Controller A */
3705 - 0, /* Parallel IO Controller B */
3706 - 0, /* Parallel IO Controller C */
3711 + 1, /* Parallel IO Controller A */
3712 + 1, /* Parallel IO Controller B */
3713 + 1, /* Parallel IO Controller C */
3718 0, /* Multimedia Card Interface */
3719 - 4, /* USB Device Port */
3720 - 0, /* Two-Wire Interface */
3721 - 6, /* Serial Peripheral Interface 0 */
3722 - 6, /* Serial Peripheral Interface 1 */
3723 - 5, /* Serial Synchronous Controller 0 */
3724 - 5, /* Serial Synchronous Controller 1 */
3725 - 5, /* Serial Synchronous Controller 2 */
3726 + 2, /* USB Device Port */
3727 + 6, /* Two-Wire Interface */
3728 + 5, /* Serial Peripheral Interface 0 */
3729 + 5, /* Serial Peripheral Interface 1 */
3730 + 4, /* Serial Synchronous Controller 0 */
3731 + 4, /* Serial Synchronous Controller 1 */
3732 + 4, /* Serial Synchronous Controller 2 */
3733 0, /* Timer Counter 0 */
3734 0, /* Timer Counter 1 */
3735 0, /* Timer Counter 2 */
3736 - 3, /* USB Host port */
3737 + 2, /* USB Host port */
3738 3, /* LCD Controller */
3741 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261_devices.c
3742 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9261_devices.c 2007-06-17 04:09:12.000000000 +0200
3743 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9261_devices.c 2007-07-29 05:23:04.000000000 +0200
3745 #include <asm/mach/map.h>
3747 #include <linux/platform_device.h>
3748 +#include <linux/fb.h>
3750 +#include <video/atmel_lcdc.h>
3752 #include <asm/arch/board.h>
3753 #include <asm/arch/gpio.h>
3754 @@ -522,6 +525,32 @@
3758 +#if defined(CONFIG_NEW_LEDS)
3760 +static struct platform_device at91_leds = {
3761 + .name = "at91_leds",
3765 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3770 + at91_leds.dev.platform_data = leds;
3772 + for ( ; nr; nr--, leds++) {
3773 + leds->index = nr; /* first record stores number of leds */
3774 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3777 + platform_device_register(&at91_leds);
3780 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3784 /* --------------------------------------------------------------------
3786 * -------------------------------------------------------------------- */
3787 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263.c
3788 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263.c 2007-06-17 04:09:12.000000000 +0200
3789 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263.c 2007-07-29 05:23:04.000000000 +0200
3790 @@ -273,6 +273,28 @@
3793 /* --------------------------------------------------------------------
3794 + * Timer/Counter library initialization
3795 + * -------------------------------------------------------------------- */
3796 +#ifdef CONFIG_ATMEL_TCLIB
3800 +static struct atmel_tcblock at91sam9263_tcblocks[] = {
3802 + .physaddr = AT91SAM9263_BASE_TCB0,
3803 + .irq = { AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB },
3804 + .clk = { &tcb_clk, &tcb_clk, &tcb_clk },
3808 +#define at91sam9263_tc_init() atmel_tc_init(at91sam9263_tcblocks, ARRAY_SIZE(at91sam9263_tcblocks))
3811 +#define at91sam9263_tc_init() do {} while(0)
3815 +/* --------------------------------------------------------------------
3816 * AT91SAM9263 processor initialization
3817 * -------------------------------------------------------------------- */
3821 /* Register GPIO subsystem */
3822 at91_gpio_init(at91sam9263_gpio, 5);
3824 + /* Initialize the Timer/Counter blocks */
3825 + at91sam9263_tc_init();
3828 /* --------------------------------------------------------------------
3829 @@ -304,34 +329,34 @@
3830 static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
3831 7, /* Advanced Interrupt Controller (FIQ) */
3832 7, /* System Peripherals */
3833 - 0, /* Parallel IO Controller A */
3834 - 0, /* Parallel IO Controller B */
3835 - 0, /* Parallel IO Controller C, D and E */
3836 + 1, /* Parallel IO Controller A */
3837 + 1, /* Parallel IO Controller B */
3838 + 1, /* Parallel IO Controller C, D and E */
3847 0, /* Multimedia Card Interface 0 */
3848 0, /* Multimedia Card Interface 1 */
3850 - 0, /* Two-Wire Interface */
3851 - 6, /* Serial Peripheral Interface 0 */
3852 - 6, /* Serial Peripheral Interface 1 */
3853 - 5, /* Serial Synchronous Controller 0 */
3854 - 5, /* Serial Synchronous Controller 1 */
3855 - 6, /* AC97 Controller */
3857 + 6, /* Two-Wire Interface */
3858 + 5, /* Serial Peripheral Interface 0 */
3859 + 5, /* Serial Peripheral Interface 1 */
3860 + 4, /* Serial Synchronous Controller 0 */
3861 + 4, /* Serial Synchronous Controller 1 */
3862 + 5, /* AC97 Controller */
3863 0, /* Timer Counter 0, 1 and 2 */
3864 0, /* Pulse Width Modulation Controller */
3867 0, /* 2D Graphic Engine */
3868 - 3, /* USB Device Port */
3869 + 2, /* USB Device Port */
3870 0, /* Image Sensor Interface */
3871 3, /* LDC Controller */
3872 0, /* DMA Controller */
3874 - 3, /* USB Host port */
3875 + 2, /* USB Host port */
3876 0, /* Advanced Interrupt Controller (IRQ0) */
3877 0, /* Advanced Interrupt Controller (IRQ1) */
3879 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263_devices.c
3880 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9263_devices.c 2007-06-17 04:09:12.000000000 +0200
3881 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9263_devices.c 2007-07-29 05:23:04.000000000 +0200
3883 #include <asm/mach/map.h>
3885 #include <linux/platform_device.h>
3886 +#include <linux/fb.h>
3888 +#include <video/atmel_lcdc.h>
3890 #include <asm/arch/board.h>
3891 #include <asm/arch/gpio.h>
3892 @@ -625,6 +628,56 @@
3895 /* --------------------------------------------------------------------
3896 + * Image Sensor Interface
3897 + * -------------------------------------------------------------------- */
3899 +#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
3901 +struct resource isi_resources[] = {
3903 + .start = AT91SAM9263_BASE_ISI,
3904 + .end = AT91SAM9263_BASE_ISI + SZ_16K - 1,
3905 + .flags = IORESOURCE_MEM,
3908 + .start = AT91SAM9263_ID_ISI,
3909 + .end = AT91SAM9263_ID_ISI,
3910 + .flags = IORESOURCE_IRQ,
3914 +static struct platform_device at91sam9263_isi_device = {
3915 + .name = "at91_isi",
3917 + .resource = isi_resources,
3918 + .num_resources = ARRAY_SIZE(isi_resources),
3921 +void __init at91_add_device_isi(void)
3923 + at91_set_A_periph(AT91_PIN_PE0, 0); /* ISI_D0 */
3924 + at91_set_A_periph(AT91_PIN_PE1, 0); /* ISI_D1 */
3925 + at91_set_A_periph(AT91_PIN_PE2, 0); /* ISI_D2 */
3926 + at91_set_A_periph(AT91_PIN_PE3, 0); /* ISI_D3 */
3927 + at91_set_A_periph(AT91_PIN_PE4, 0); /* ISI_D4 */
3928 + at91_set_A_periph(AT91_PIN_PE5, 0); /* ISI_D5 */
3929 + at91_set_A_periph(AT91_PIN_PE6, 0); /* ISI_D6 */
3930 + at91_set_A_periph(AT91_PIN_PE7, 0); /* ISI_D7 */
3931 + at91_set_A_periph(AT91_PIN_PE8, 0); /* ISI_PCK */
3932 + at91_set_A_periph(AT91_PIN_PE9, 0); /* ISI_HSYNC */
3933 + at91_set_A_periph(AT91_PIN_PE10, 0); /* ISI_VSYNC */
3934 + at91_set_B_periph(AT91_PIN_PE11, 0); /* ISI_MCK (PCK3) */
3935 + at91_set_B_periph(AT91_PIN_PE12, 0); /* ISI_PD8 */
3936 + at91_set_B_periph(AT91_PIN_PE13, 0); /* ISI_PD9 */
3937 + at91_set_B_periph(AT91_PIN_PE14, 0); /* ISI_PD10 */
3938 + at91_set_B_periph(AT91_PIN_PE15, 0); /* ISI_PD11 */
3941 +void __init at91_add_device_isi(void) {}
3945 +/* --------------------------------------------------------------------
3947 * -------------------------------------------------------------------- */
3949 @@ -715,6 +768,32 @@
3953 +#if defined(CONFIG_NEW_LEDS)
3955 +static struct platform_device at91_leds = {
3956 + .name = "at91_leds",
3960 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
3965 + at91_leds.dev.platform_data = leds;
3967 + for ( ; nr; nr--, leds++) {
3968 + leds->index = nr; /* first record stores number of leds */
3969 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
3972 + platform_device_register(&at91_leds);
3975 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
3979 /* --------------------------------------------------------------------
3981 * -------------------------------------------------------------------- */
3982 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl.c
3983 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl.c 2007-06-17 04:09:12.000000000 +0200
3984 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl.c 2007-07-29 05:23:04.000000000 +0200
3985 @@ -246,6 +246,28 @@
3988 /* --------------------------------------------------------------------
3989 + * Timer/Counter library initialization
3990 + * -------------------------------------------------------------------- */
3991 +#ifdef CONFIG_ATMEL_TCLIB
3995 +static struct atmel_tcblock at91sam9rl_tcblocks[] = {
3997 + .physaddr = AT91SAM9RL_BASE_TCB0,
3998 + .irq = { AT91SAM9RL_ID_TC0, AT91SAM9RL_ID_TC1, AT91SAM9RL_ID_TC2 },
3999 + .clk = { &tc0_clk, &tc1_clk, &tc2_clk },
4003 +#define at91sam9rl_tc_init() atmel_tc_init(at91sam9rl_tcblocks, ARRAY_SIZE(at91sam9rl_tcblocks))
4006 +#define at91sam9rl_tc_init() do {} while(0)
4010 +/* --------------------------------------------------------------------
4011 * AT91SAM9RL processor initialization
4012 * -------------------------------------------------------------------- */
4016 /* Register GPIO subsystem */
4017 at91_gpio_init(at91sam9rl_gpio, 4);
4019 + /* Initialize the Timer/Counter blocks */
4020 + at91sam9rl_tc_init();
4023 /* --------------------------------------------------------------------
4024 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl_devices.c linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl_devices.c
4025 --- linux-2.6.22-rc5/arch/arm/mach-at91/at91sam9rl_devices.c 2007-06-17 04:09:12.000000000 +0200
4026 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/at91sam9rl_devices.c 2007-07-29 05:23:04.000000000 +0200
4027 @@ -370,6 +370,32 @@
4031 +#if defined(CONFIG_NEW_LEDS)
4033 +static struct platform_device at91_leds = {
4034 + .name = "at91_leds",
4038 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
4043 + at91_leds.dev.platform_data = leds;
4045 + for ( ; nr; nr--, leds++) {
4046 + leds->index = nr; /* first record stores number of leds */
4047 + at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
4050 + platform_device_register(&at91_leds);
4053 +void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
4057 /* --------------------------------------------------------------------
4059 * -------------------------------------------------------------------- */
4060 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-cam60.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-cam60.c
4061 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-cam60.c 1970-01-01 01:00:00.000000000 +0100
4062 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-cam60.c 2007-07-29 05:23:04.000000000 +0200
4067 + * based on board-sam9260ek.c
4068 + * Copyright (C) 2005 SAN People
4069 + * Copyright (C) 2006 Atmel
4071 + * This program is free software; you can redistribute it and/or modify
4072 + * it under the terms of the GNU General Public License as published by
4073 + * the Free Software Foundation; either version 2 of the License, or
4074 + * (at your option) any later version.
4076 + * This program is distributed in the hope that it will be useful,
4077 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4078 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4079 + * GNU General Public License for more details.
4081 + * You should have received a copy of the GNU General Public License
4082 + * along with this program; if not, write to the Free Software
4083 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4086 +#include <linux/types.h>
4087 +#include <linux/init.h>
4088 +#include <linux/mm.h>
4089 +#include <linux/module.h>
4090 +#include <linux/platform_device.h>
4091 +#include <linux/spi/spi.h>
4092 +#include <linux/spi/flash.h>
4094 +#include <asm/hardware.h>
4095 +#include <asm/setup.h>
4096 +#include <asm/mach-types.h>
4097 +#include <asm/irq.h>
4099 +#include <asm/mach/arch.h>
4100 +#include <asm/mach/map.h>
4101 +#include <asm/mach/irq.h>
4103 +#include <asm/arch/board.h>
4104 +#include <asm/arch/gpio.h>
4105 +#include <asm/arch/at91sam926x_mc.h>
4107 +#include "generic.h"
4111 + * Serial port configuration.
4112 + * 0 .. 5 = USART0 .. USART5
4115 +static struct at91_uart_config __initdata cam60_uart_config = {
4116 + .console_tty = 0, /* ttyS0 */
4118 + .tty_map = { 6, -1, -1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
4121 +static void __init cam60_map_io(void)
4123 + /* Initialize processor: 10 MHz crystal */
4124 + at91sam9260_initialize(10000000);
4126 + /* Setup the serial ports and console */
4127 + at91_init_serial(&cam60_uart_config);
4130 +static void __init cam60_init_irq(void)
4132 + at91sam9260_init_interrupts(NULL);
4139 +#if defined(CONFIG_MTD_DATAFLASH)
4140 +static struct mtd_partition __initdata cam60_spi_partitions[] = {
4148 + .offset = MTDPART_OFS_NXTBLK,
4149 + .size = 256 * 1056,
4153 + .offset = MTDPART_OFS_NXTBLK,
4154 + .size = 2222 * 1056,
4157 + .name = "file system",
4158 + .offset = MTDPART_OFS_NXTBLK,
4159 + .size = MTDPART_SIZ_FULL,
4163 +static struct flash_platform_data __initdata cam60_spi_flash_platform_data = {
4164 + .name = "spi_flash",
4165 + .parts = cam60_spi_partitions,
4166 + .nr_parts = ARRAY_SIZE(cam60_spi_partitions)
4170 +static struct spi_board_info cam60_spi_devices[] = {
4171 +#if defined(CONFIG_MTD_DATAFLASH)
4172 + { /* DataFlash chip */
4173 + .modalias = "mtd_dataflash",
4175 + .max_speed_hz = 15 * 1000 * 1000,
4177 + .platform_data = &cam60_spi_flash_platform_data
4184 + * MACB Ethernet device
4186 +static struct __initdata at91_eth_data cam60_macb_data = {
4187 + .phy_irq_pin = AT91_PIN_PB5,
4192 +static void __init cam60_board_init(void)
4195 + at91_add_device_serial();
4197 + at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
4199 + at91_add_device_eth(&cam60_macb_data);
4202 +MACHINE_START(CAM60, "KwikByte CAM60")
4203 + /* Maintainer: KwikByte */
4204 + .phys_io = AT91_BASE_SYS,
4205 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
4206 + .boot_params = AT91_SDRAM_BASE + 0x100,
4207 + .timer = &at91sam926x_timer,
4208 + .map_io = cam60_map_io,
4209 + .init_irq = cam60_init_irq,
4210 + .init_machine = cam60_board_init,
4212 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-chub.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-chub.c
4213 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-chub.c 1970-01-01 01:00:00.000000000 +0100
4214 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-chub.c 2007-07-29 05:23:04.000000000 +0200
4217 + * linux/arch/arm/mach-at91/board-chub.c
4219 + * Copyright (C) 2005 SAN People, adapted for Promwad Chub board
4222 + * This program is free software; you can redistribute it and/or modify
4223 + * it under the terms of the GNU General Public License as published by
4224 + * the Free Software Foundation; either version 2 of the License, or
4225 + * (at your option) any later version.
4227 + * This program is distributed in the hope that it will be useful,
4228 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4229 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4230 + * GNU General Public License for more details.
4232 + * You should have received a copy of the GNU General Public License
4233 + * along with this program; if not, write to the Free Software
4234 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4237 +#include <linux/types.h>
4238 +#include <linux/init.h>
4239 +#include <linux/mm.h>
4240 +#include <linux/module.h>
4241 +#include <linux/platform_device.h>
4243 +#include <asm/hardware.h>
4244 +#include <asm/setup.h>
4245 +#include <asm/mach-types.h>
4246 +#include <asm/irq.h>
4248 +#include <asm/mach/arch.h>
4249 +#include <asm/mach/map.h>
4250 +#include <asm/mach/irq.h>
4252 +#include <asm/arch/board.h>
4253 +#include <asm/arch/gpio.h>
4255 +#include "generic.h"
4258 + * Serial port configuration.
4259 + * 0 .. 3 = USART0 .. USART3
4262 +static struct at91_uart_config __initdata chub_uart_config = {
4263 + .console_tty = 0, /* ttyS0 */
4265 + .tty_map = { 4, 0, 1, 2, 3 } /* ttyS0, ..., ttyS4 */
4268 +static void __init chub_init_irq(void)
4270 + at91rm9200_init_interrupts(NULL);
4273 +static void __init chub_map_io(void)
4275 + /* Initialize clocks: 18.432 MHz crystal */
4276 + at91rm9200_initialize(18432000, AT91RM9200_PQFP);
4278 + /* Setup the serial ports and console */
4279 + at91_init_serial(&chub_uart_config);
4282 +static struct at91_eth_data __initdata chub_eth_data = {
4283 + .phy_irq_pin = AT91_PIN_PB29,
4287 +static struct mtd_partition __initdata chub_nand_partition[] = {
4289 + .name = "NAND Partition 1",
4291 + .size = MTDPART_SIZ_FULL,
4295 +static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
4297 + *num_partitions = ARRAY_SIZE(chub_nand_partition);
4298 + return chub_nand_partition;
4301 +static struct at91_nand_data __initdata chub_nand_data = {
4304 + .enable_pin = AT91_PIN_PA27,
4305 + .partition_info = nand_partitions,
4308 +static struct spi_board_info chub_spi_devices[] = {
4309 + { /* DataFlash chip */
4310 + .modalias = "mtd_dataflash",
4312 + .max_speed_hz = 15 * 1000 * 1000,
4316 +static void __init chub_board_init(void)
4319 + at91_add_device_serial();
4321 + at91_add_device_i2c();
4323 + at91_add_device_eth(&chub_eth_data);
4325 + at91_add_device_spi(chub_spi_devices, ARRAY_SIZE(chub_spi_devices));
4327 + at91_add_device_nand(&chub_nand_data);
4328 + /* Disable write protect for NAND */
4329 + at91_set_gpio_output(AT91_PIN_PB7, 1);
4330 + /* Power enable for 3x RS-232 and 1x RS-485 */
4331 + at91_set_gpio_output(AT91_PIN_PB9, 1);
4332 + /* Disable write protect for FRAM */
4333 + at91_set_gpio_output(AT91_PIN_PA21, 1);
4334 + /* Disable write protect for Dataflash */
4335 + at91_set_gpio_output(AT91_PIN_PA19, 1);
4338 +MACHINE_START(CHUB, "Promwad Chub")
4339 + /* Maintainer: Ivan Kuten AT Promwad DOT com */
4340 + .phys_io = AT91_BASE_SYS,
4341 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
4342 + .boot_params = AT91_SDRAM_BASE + 0x100,
4343 + .timer = &at91rm9200_timer,
4344 + .map_io = chub_map_io,
4345 + .init_irq = chub_init_irq,
4346 + .init_machine = chub_board_init,
4348 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-csb337.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-csb337.c
4349 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-csb337.c 2007-06-17 04:09:12.000000000 +0200
4350 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-csb337.c 2007-07-29 05:23:04.000000000 +0200
4352 #include <linux/module.h>
4353 #include <linux/platform_device.h>
4354 #include <linux/spi/spi.h>
4355 +#include <linux/interrupt.h>
4356 #include <linux/mtd/physmap.h>
4358 #include <asm/hardware.h>
4361 /* Setup the LEDs */
4362 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
4363 + at91_set_gpio_output(AT91_PIN_PB2, 1); /* third (unused) LED */
4365 /* Setup the serial ports and console */
4366 at91_init_serial(&csb337_uart_config);
4367 @@ -149,6 +151,55 @@
4368 .num_resources = ARRAY_SIZE(csb_flash_resources),
4371 +static struct at91_gpio_led csb337_leds[] = {
4374 + .gpio = AT91_PIN_PB0,
4375 + .trigger = "heartbeat",
4379 + .gpio = AT91_PIN_PB1,
4380 + .trigger = "timer",
4384 + .gpio = AT91_PIN_PB2,
4388 +#if defined(CONFIG_CSB300_WAKE_SW0) || defined(CONFIG_CSB300_WAKE_SW1)
4389 +static irqreturn_t switch_irq_handler(int irq, void *context)
4391 + return IRQ_HANDLED;
4394 +static inline void __init switch_irq_setup(int irq, char *name, unsigned long mode)
4398 + res = request_irq(irq, switch_irq_handler, IRQF_SAMPLE_RANDOM | mode, name, NULL);
4400 + enable_irq_wake(irq);
4403 +static void __init csb300_switches(void)
4405 +#ifdef CONFIG_CSB300_WAKE_SW0
4406 + at91_set_A_periph(AT91_PIN_PB29, 1); /* IRQ0 */
4407 + switch_irq_setup(AT91RM9200_ID_IRQ0, "csb300_sw0", IRQF_TRIGGER_FALLING);
4409 +#ifdef CONFIG_CSB300_WAKE_SW1
4410 + at91_set_gpio_input(AT91_PIN_PB28, 1);
4411 + at91_set_deglitch(AT91_PIN_PB28, 1);
4412 + switch_irq_setup(AT91_PIN_PB28, "csb300_sw1", IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
4414 + /* there's also SW2 at PA21, GPIO or TIOA2 */
4417 +static void __init csb300_switches(void) {}
4420 static void __init csb337_board_init(void)
4423 @@ -168,8 +219,12 @@
4424 at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
4426 at91_add_device_mmc(0, &csb337_mmc_data);
4428 + at91_gpio_leds(csb337_leds, ARRAY_SIZE(csb337_leds));
4430 platform_device_register(&csb_flash);
4431 + /* Switches on CSB300 */
4432 + csb300_switches();
4435 MACHINE_START(CSB337, "Cogent CSB337")
4436 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-dk.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-dk.c
4437 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-dk.c 2007-06-17 04:09:12.000000000 +0200
4438 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-dk.c 2007-07-29 05:23:04.000000000 +0200
4440 at91rm9200_init_interrupts(NULL);
4443 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4444 +#include <video/s1d13xxxfb.h>
4445 +#include <asm/arch/ics1523.h>
4447 +/* EPSON S1D13806 FB */
4448 +#define AT91_FB_REG_BASE 0x30000000L
4449 +#define AT91_FB_REG_SIZE 0x200
4450 +#define AT91_FB_VMEM_BASE 0x30200000L
4451 +#define AT91_FB_VMEM_SIZE 0x140000L
4453 +static void __init dk_init_video(void)
4455 + /* NWAIT Signal */
4456 + at91_set_A_periph(AT91_PIN_PC6, 0);
4458 + /* Initialization of the Static Memory Controller for Chip Select 2 */
4459 + at91_sys_write(AT91_SMC_CSR(2), AT91_SMC_DBW_16 /* 16 bit */
4460 + | AT91_SMC_WSEN | AT91_SMC_NWS_(4) /* wait states */
4461 + | AT91_SMC_TDF_(1) /* float time */
4464 + at91_ics1523_init();
4467 +/* CRT: (active) 640x480 60Hz (PCLK=CLKI=25.175MHz)
4468 + Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
4469 +static const struct s1d13xxxfb_regval dk_s1dfb_initregs[] = {
4470 + {S1DREG_MISC, 0x00}, /* Enable Memory/Register select bit */
4471 + {S1DREG_COM_DISP_MODE, 0x00}, /* disable display output */
4472 + {S1DREG_GPIO_CNF0, 0x00},
4473 + {S1DREG_GPIO_CNF1, 0x00},
4474 + {S1DREG_GPIO_CTL0, 0x08},
4475 + {S1DREG_GPIO_CTL1, 0x00},
4476 + {S1DREG_CLK_CNF, 0x01}, /* no divide, MCLK source is CLKI3 0x02*/
4477 + {S1DREG_LCD_CLK_CNF, 0x00},
4478 + {S1DREG_CRT_CLK_CNF, 0x00},
4479 + {S1DREG_MPLUG_CLK_CNF, 0x00},
4480 + {S1DREG_CPU2MEM_WST_SEL, 0x01}, /* 2*period(MCLK) - 4ns > period(BCLK) */
4481 + {S1DREG_SDRAM_REF_RATE, 0x03}, /* 32768 <= MCLK <= 50000 (MHz) */
4482 + {S1DREG_SDRAM_TC0, 0x00}, /* MCLK source freq (MHz): */
4483 + {S1DREG_SDRAM_TC1, 0x01}, /* 42 <= MCLK <= 50 */
4484 + {S1DREG_MEM_CNF, 0x80}, /* SDRAM Initialization - needed before mem access */
4485 + {S1DREG_PANEL_TYPE, 0x25}, /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
4486 + {S1DREG_MOD_RATE, 0x00}, /* toggle every FPFRAME */
4487 + {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* 680 pix */
4488 + {S1DREG_LCD_NDISP_HPER, 0x12}, /* 152 pix */
4489 + {S1DREG_TFT_FPLINE_START, 0x01}, /* 13 pix */
4490 + {S1DREG_TFT_FPLINE_PWIDTH, 0x0B}, /* 96 pix */
4491 + {S1DREG_LCD_DISP_VHEIGHT0, 0xDF},
4492 + {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4493 + {S1DREG_LCD_NDISP_VPER, 0x2C}, /* 44 lines */
4494 + {S1DREG_TFT_FPFRAME_START, 0x0A}, /* 10 lines */
4495 + {S1DREG_TFT_FPFRAME_PWIDTH, 0x01}, /* 2 lines */
4496 + {S1DREG_LCD_DISP_MODE, 0x05}, /* 16 bpp */
4497 + {S1DREG_LCD_MISC, 0x00}, /* dithering enabled, dual panel buffer enabled */
4498 + {S1DREG_LCD_DISP_START0, 0x00},
4499 + {S1DREG_LCD_DISP_START1, 0xC8},
4500 + {S1DREG_LCD_DISP_START2, 0x00},
4501 + {S1DREG_LCD_MEM_OFF0, 0x80},
4502 + {S1DREG_LCD_MEM_OFF1, 0x02},
4503 + {S1DREG_LCD_PIX_PAN, 0x00},
4504 + {S1DREG_LCD_DISP_FIFO_HTC, 0x3B},
4505 + {S1DREG_LCD_DISP_FIFO_LTC, 0x3C},
4506 + {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* 680 pix */
4507 + {S1DREG_CRT_NDISP_HPER, 0x13}, /* 160 pix */
4508 + {S1DREG_CRT_HRTC_START, 0x01}, /* 13 pix */
4509 + {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* 96 pix */
4510 + {S1DREG_CRT_DISP_VHEIGHT0, 0xDF},
4511 + {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4512 + {S1DREG_CRT_NDISP_VPER, 0x2B}, /* 44 lines */
4513 + {S1DREG_CRT_VRTC_START, 0x09}, /* 10 lines */
4514 + {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* 2 lines */
4515 + {S1DREG_TV_OUT_CTL, 0x10},
4516 + {S1DREG_CRT_DISP_MODE, 0x05}, /* 16 bpp */
4517 + {S1DREG_CRT_DISP_START0, 0x00},
4518 + {S1DREG_CRT_DISP_START1, 0x00},
4519 + {S1DREG_CRT_DISP_START2, 0x00},
4520 + {S1DREG_CRT_MEM_OFF0, 0x80},
4521 + {S1DREG_CRT_MEM_OFF1, 0x02},
4522 + {S1DREG_CRT_PIX_PAN, 0x00},
4523 + {S1DREG_CRT_DISP_FIFO_HTC, 0x3B},
4524 + {S1DREG_CRT_DISP_FIFO_LTC, 0x3C},
4525 + {S1DREG_LCD_CUR_CTL, 0x00}, /* inactive */
4526 + {S1DREG_LCD_CUR_START, 0x01},
4527 + {S1DREG_LCD_CUR_XPOS0, 0x00},
4528 + {S1DREG_LCD_CUR_XPOS1, 0x00},
4529 + {S1DREG_LCD_CUR_YPOS0, 0x00},
4530 + {S1DREG_LCD_CUR_YPOS1, 0x00},
4531 + {S1DREG_LCD_CUR_BCTL0, 0x00},
4532 + {S1DREG_LCD_CUR_GCTL0, 0x00},
4533 + {S1DREG_LCD_CUR_RCTL0, 0x00},
4534 + {S1DREG_LCD_CUR_BCTL1, 0x1F},
4535 + {S1DREG_LCD_CUR_GCTL1, 0x3F},
4536 + {S1DREG_LCD_CUR_RCTL1, 0x1F},
4537 + {S1DREG_LCD_CUR_FIFO_HTC, 0x00},
4538 + {S1DREG_CRT_CUR_CTL, 0x00}, /* inactive */
4539 + {S1DREG_CRT_CUR_START, 0x01},
4540 + {S1DREG_CRT_CUR_XPOS0, 0x00},
4541 + {S1DREG_CRT_CUR_XPOS1, 0x00},
4542 + {S1DREG_CRT_CUR_YPOS0, 0x00},
4543 + {S1DREG_CRT_CUR_YPOS1, 0x00},
4544 + {S1DREG_CRT_CUR_BCTL0, 0x00},
4545 + {S1DREG_CRT_CUR_GCTL0, 0x00},
4546 + {S1DREG_CRT_CUR_RCTL0, 0x00},
4547 + {S1DREG_CRT_CUR_BCTL1, 0x1F},
4548 + {S1DREG_CRT_CUR_GCTL1, 0x3F},
4549 + {S1DREG_CRT_CUR_RCTL1, 0x1F},
4550 + {S1DREG_CRT_CUR_FIFO_HTC, 0x00},
4551 + {S1DREG_BBLT_CTL0, 0x00},
4552 + {S1DREG_BBLT_CTL0, 0x00},
4553 + {S1DREG_BBLT_CC_EXP, 0x00},
4554 + {S1DREG_BBLT_OP, 0x00},
4555 + {S1DREG_BBLT_SRC_START0, 0x00},
4556 + {S1DREG_BBLT_SRC_START1, 0x00},
4557 + {S1DREG_BBLT_SRC_START2, 0x00},
4558 + {S1DREG_BBLT_DST_START0, 0x00},
4559 + {S1DREG_BBLT_DST_START1, 0x00},
4560 + {S1DREG_BBLT_DST_START2, 0x00},
4561 + {S1DREG_BBLT_MEM_OFF0, 0x00},
4562 + {S1DREG_BBLT_MEM_OFF1, 0x00},
4563 + {S1DREG_BBLT_WIDTH0, 0x00},
4564 + {S1DREG_BBLT_WIDTH1, 0x00},
4565 + {S1DREG_BBLT_HEIGHT0, 0x00},
4566 + {S1DREG_BBLT_HEIGHT1, 0x00},
4567 + {S1DREG_BBLT_BGC0, 0x00},
4568 + {S1DREG_BBLT_BGC1, 0x00},
4569 + {S1DREG_BBLT_FGC0, 0x00},
4570 + {S1DREG_BBLT_FGC1, 0x00},
4571 + {S1DREG_LKUP_MODE, 0x00}, /* LCD LUT r | LCD and CRT/TV LUT w */
4572 + {S1DREG_LKUP_ADDR, 0x00},
4573 + {S1DREG_PS_CNF, 0x00}, /* Power Save disable */
4574 + {S1DREG_PS_STATUS, 0x02}, /* LCD Panel down, mem up */
4575 + {S1DREG_CPU2MEM_WDOGT, 0x00},
4576 + {S1DREG_COM_DISP_MODE, 0x02}, /* enable CRT display output */
4579 +static struct s1d13xxxfb_pdata dk_s1dfb_pdata = {
4580 + .initregs = dk_s1dfb_initregs,
4581 + .initregssize = ARRAY_SIZE(dk_s1dfb_initregs),
4582 + .platform_init_video = dk_init_video,
4585 +static u64 s1dfb_dmamask = 0xffffffffUL;
4587 +static struct resource dk_s1dfb_resource[] = {
4588 + [0] = { /* video mem */
4589 + .name = "s1d13806 memory",
4590 + .start = AT91_FB_VMEM_BASE,
4591 + .end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
4592 + .flags = IORESOURCE_MEM,
4594 + [1] = { /* video registers */
4595 + .name = "s1d13806 registers",
4596 + .start = AT91_FB_REG_BASE,
4597 + .end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
4598 + .flags = IORESOURCE_MEM,
4602 +static struct platform_device dk_s1dfb_device = {
4603 + .name = "s1d13806fb",
4606 + .dma_mask = &s1dfb_dmamask,
4607 + .coherent_dma_mask = 0xffffffff,
4608 + .platform_data = &dk_s1dfb_pdata,
4610 + .resource = dk_s1dfb_resource,
4611 + .num_resources = ARRAY_SIZE(dk_s1dfb_resource),
4614 +static void __init dk_add_device_video(void)
4616 + platform_device_register(&dk_s1dfb_device);
4619 +static void __init dk_add_device_video(void) {}
4622 static struct at91_eth_data __initdata dk_eth_data = {
4623 .phy_irq_pin = AT91_PIN_PC4,
4626 #define DK_FLASH_SIZE 0x200000
4628 static struct physmap_flash_data dk_flash_data = {
4633 static struct resource dk_flash_resource = {
4634 @@ -170,6 +349,13 @@
4638 +static struct at91_gpio_led dk_leds[] = {
4641 + .gpio = AT91_PIN_PB2,
4642 + .trigger = "timer",
4646 static void __init dk_board_init(void)
4648 @@ -200,8 +386,10 @@
4649 at91_add_device_nand(&dk_nand_data);
4651 platform_device_register(&dk_flash);
4653 + at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
4655 -// dk_add_device_video();
4656 + dk_add_device_video();
4659 MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
4660 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-ek.c
4661 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-ek.c 2007-06-17 04:09:12.000000000 +0200
4662 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-ek.c 2007-07-29 05:23:04.000000000 +0200
4664 at91rm9200_init_interrupts(NULL);
4667 +#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
4668 +#include <video/s1d13xxxfb.h>
4669 +#include <asm/arch/ics1523.h>
4671 +/* EPSON S1D13806 FB */
4672 +#define AT91_FB_REG_BASE 0x40000000L
4673 +#define AT91_FB_REG_SIZE 0x200
4674 +#define AT91_FB_VMEM_BASE 0x40200000L
4675 +#define AT91_FB_VMEM_SIZE 0x140000L
4677 +static void __init ek_init_video(void)
4679 + /* NWAIT Signal */
4680 + at91_set_A_periph(AT91_PIN_PC6, 0);
4682 + /* Initialization of the Static Memory Controller for Chip Select 3 */
4683 + at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_DBW_16 /* 16 bit */
4684 + | AT91_SMC_WSEN | AT91_SMC_NWS_(5) /* wait states */
4685 + | AT91_SMC_TDF_(1) /* float time */
4688 + at91_ics1523_init();
4691 +/* CRT: (active) 640x480 60Hz (PCLK=CLKI=25.175MHz)
4692 + Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
4693 +static const struct s1d13xxxfb_regval ek_s1dfb_initregs[] = {
4694 + {S1DREG_MISC, 0x00}, /* Enable Memory/Register select bit */
4695 + {S1DREG_COM_DISP_MODE, 0x00}, /* disable display output */
4696 + {S1DREG_GPIO_CNF0, 0xFF}, // 0x00
4697 + {S1DREG_GPIO_CNF1, 0x1F}, // 0x08
4698 + {S1DREG_GPIO_CTL0, 0x00},
4699 + {S1DREG_GPIO_CTL1, 0x00},
4700 + {S1DREG_CLK_CNF, 0x01}, /* no divide, MCLK source is CLKI3 0x02*/
4701 + {S1DREG_LCD_CLK_CNF, 0x00},
4702 + {S1DREG_CRT_CLK_CNF, 0x00},
4703 + {S1DREG_MPLUG_CLK_CNF, 0x00},
4704 + {S1DREG_CPU2MEM_WST_SEL, 0x01}, /* 2*period(MCLK) - 4ns > period(BCLK) */
4705 + {S1DREG_SDRAM_REF_RATE, 0x03}, /* 32768 <= MCLK <= 50000 (MHz) */
4706 + {S1DREG_SDRAM_TC0, 0x00}, /* MCLK source freq (MHz): */
4707 + {S1DREG_SDRAM_TC1, 0x01}, /* 42 <= MCLK <= 50 */
4708 + {S1DREG_MEM_CNF, 0x80}, /* SDRAM Initialization - needed before mem access */
4709 + {S1DREG_PANEL_TYPE, 0x25}, /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
4710 + {S1DREG_MOD_RATE, 0x00}, /* toggle every FPFRAME */
4711 + {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* 680 pix */
4712 + {S1DREG_LCD_NDISP_HPER, 0x12}, /* 152 pix */
4713 + {S1DREG_TFT_FPLINE_START, 0x01}, /* 13 pix */
4714 + {S1DREG_TFT_FPLINE_PWIDTH, 0x0B}, /* 96 pix */
4715 + {S1DREG_LCD_DISP_VHEIGHT0, 0xDF},
4716 + {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4717 + {S1DREG_LCD_NDISP_VPER, 0x2C}, /* 44 lines */
4718 + {S1DREG_TFT_FPFRAME_START, 0x0A}, /* 10 lines */
4719 + {S1DREG_TFT_FPFRAME_PWIDTH, 0x01}, /* 2 lines */
4720 + {S1DREG_LCD_DISP_MODE, 0x05}, /* 16 bpp */
4721 + {S1DREG_LCD_MISC, 0x00}, /* dithering enabled, dual panel buffer enabled */
4722 + {S1DREG_LCD_DISP_START0, 0x00},
4723 + {S1DREG_LCD_DISP_START1, 0xC8},
4724 + {S1DREG_LCD_DISP_START2, 0x00},
4725 + {S1DREG_LCD_MEM_OFF0, 0x80},
4726 + {S1DREG_LCD_MEM_OFF1, 0x02},
4727 + {S1DREG_LCD_PIX_PAN, 0x00},
4728 + {S1DREG_LCD_DISP_FIFO_HTC, 0x3B},
4729 + {S1DREG_LCD_DISP_FIFO_LTC, 0x3C},
4730 + {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* 680 pix */
4731 + {S1DREG_CRT_NDISP_HPER, 0x13}, /* 160 pix */
4732 + {S1DREG_CRT_HRTC_START, 0x01}, /* 13 pix */
4733 + {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* 96 pix */
4734 + {S1DREG_CRT_DISP_VHEIGHT0, 0xDF},
4735 + {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* 480 lines */
4736 + {S1DREG_CRT_NDISP_VPER, 0x2B}, /* 44 lines */
4737 + {S1DREG_CRT_VRTC_START, 0x09}, /* 10 lines */
4738 + {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* 2 lines */
4739 + {S1DREG_TV_OUT_CTL, 0x10},
4742 + {S1DREG_CRT_DISP_MODE, 0x05}, /* 16 bpp */
4743 + {S1DREG_CRT_DISP_START0, 0x00},
4744 + {S1DREG_CRT_DISP_START1, 0x00},
4745 + {S1DREG_CRT_DISP_START2, 0x00},
4746 + {S1DREG_CRT_MEM_OFF0, 0x80},
4747 + {S1DREG_CRT_MEM_OFF1, 0x02},
4748 + {S1DREG_CRT_PIX_PAN, 0x00},
4749 + {S1DREG_CRT_DISP_FIFO_HTC, 0x3B},
4750 + {S1DREG_CRT_DISP_FIFO_LTC, 0x3C},
4751 + {S1DREG_LCD_CUR_CTL, 0x00}, /* inactive */
4752 + {S1DREG_LCD_CUR_START, 0x01},
4753 + {S1DREG_LCD_CUR_XPOS0, 0x00},
4754 + {S1DREG_LCD_CUR_XPOS1, 0x00},
4755 + {S1DREG_LCD_CUR_YPOS0, 0x00},
4756 + {S1DREG_LCD_CUR_YPOS1, 0x00},
4757 + {S1DREG_LCD_CUR_BCTL0, 0x00},
4758 + {S1DREG_LCD_CUR_GCTL0, 0x00},
4759 + {S1DREG_LCD_CUR_RCTL0, 0x00},
4760 + {S1DREG_LCD_CUR_BCTL1, 0x1F},
4761 + {S1DREG_LCD_CUR_GCTL1, 0x3F},
4762 + {S1DREG_LCD_CUR_RCTL1, 0x1F},
4763 + {S1DREG_LCD_CUR_FIFO_HTC, 0x00},
4764 + {S1DREG_CRT_CUR_CTL, 0x00}, /* inactive */
4765 + {S1DREG_CRT_CUR_START, 0x01},
4766 + {S1DREG_CRT_CUR_XPOS0, 0x00},
4767 + {S1DREG_CRT_CUR_XPOS1, 0x00},
4768 + {S1DREG_CRT_CUR_YPOS0, 0x00},
4769 + {S1DREG_CRT_CUR_YPOS1, 0x00},
4770 + {S1DREG_CRT_CUR_BCTL0, 0x00},
4771 + {S1DREG_CRT_CUR_GCTL0, 0x00},
4772 + {S1DREG_CRT_CUR_RCTL0, 0x00},
4773 + {S1DREG_CRT_CUR_BCTL1, 0x1F},
4774 + {S1DREG_CRT_CUR_GCTL1, 0x3F},
4775 + {S1DREG_CRT_CUR_RCTL1, 0x1F},
4776 + {S1DREG_CRT_CUR_FIFO_HTC, 0x00},
4777 + {S1DREG_BBLT_CTL0, 0x00},
4778 + {S1DREG_BBLT_CTL0, 0x00},
4779 + {S1DREG_BBLT_CC_EXP, 0x00},
4780 + {S1DREG_BBLT_OP, 0x00},
4781 + {S1DREG_BBLT_SRC_START0, 0x00},
4782 + {S1DREG_BBLT_SRC_START1, 0x00},
4783 + {S1DREG_BBLT_SRC_START2, 0x00},
4784 + {S1DREG_BBLT_DST_START0, 0x00},
4785 + {S1DREG_BBLT_DST_START1, 0x00},
4786 + {S1DREG_BBLT_DST_START2, 0x00},
4787 + {S1DREG_BBLT_MEM_OFF0, 0x00},
4788 + {S1DREG_BBLT_MEM_OFF1, 0x00},
4789 + {S1DREG_BBLT_WIDTH0, 0x00},
4790 + {S1DREG_BBLT_WIDTH1, 0x00},
4791 + {S1DREG_BBLT_HEIGHT0, 0x00},
4792 + {S1DREG_BBLT_HEIGHT1, 0x00},
4793 + {S1DREG_BBLT_BGC0, 0x00},
4794 + {S1DREG_BBLT_BGC1, 0x00},
4795 + {S1DREG_BBLT_FGC0, 0x00},
4796 + {S1DREG_BBLT_FGC1, 0x00},
4797 + {S1DREG_LKUP_MODE, 0x00}, /* LCD LUT r | LCD and CRT/TV LUT w */
4798 + {S1DREG_LKUP_ADDR, 0x00},
4799 + {S1DREG_PS_CNF, 0x10}, /* Power Save disable */
4800 + {S1DREG_PS_STATUS, 0x02}, /* LCD Panel down, mem up */
4801 + {S1DREG_CPU2MEM_WDOGT, 0x00},
4802 + {S1DREG_COM_DISP_MODE, 0x02}, /* enable CRT display output */
4805 +static struct s1d13xxxfb_pdata ek_s1dfb_pdata = {
4806 + .initregs = ek_s1dfb_initregs,
4807 + .initregssize = ARRAY_SIZE(ek_s1dfb_initregs),
4808 + .platform_init_video = ek_init_video,
4811 +static u64 s1dfb_dmamask = 0xffffffffUL;
4813 +static struct resource ek_s1dfb_resource[] = {
4814 + [0] = { /* video mem */
4815 + .name = "s1d13806 memory",
4816 + .start = AT91_FB_VMEM_BASE,
4817 + .end = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
4818 + .flags = IORESOURCE_MEM,
4820 + [1] = { /* video registers */
4821 + .name = "s1d13806 registers",
4822 + .start = AT91_FB_REG_BASE,
4823 + .end = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
4824 + .flags = IORESOURCE_MEM,
4828 +static struct platform_device ek_s1dfb_device = {
4829 + .name = "s1d13806fb",
4832 + .dma_mask = &s1dfb_dmamask,
4833 + .coherent_dma_mask = 0xffffffff,
4834 + .platform_data = &ek_s1dfb_pdata,
4836 + .resource = ek_s1dfb_resource,
4837 + .num_resources = ARRAY_SIZE(ek_s1dfb_resource),
4840 +static void __init ek_add_device_video(void)
4842 + platform_device_register(&ek_s1dfb_device);
4845 +static void __init ek_add_device_video(void) {}
4848 static struct at91_eth_data __initdata ek_eth_data = {
4849 .phy_irq_pin = AT91_PIN_PC4,
4852 #define EK_FLASH_SIZE 0x200000
4854 static struct physmap_flash_data ek_flash_data = {
4859 static struct resource ek_flash_resource = {
4860 @@ -132,6 +313,18 @@
4864 +static struct at91_gpio_led ek_leds[] = {
4867 + .gpio = AT91_PIN_PB1,
4868 + .trigger = "heartbeat",
4872 + .gpio = AT91_PIN_PB2,
4873 + .trigger = "timer",
4877 static void __init ek_board_init(void)
4879 @@ -158,8 +351,10 @@
4882 platform_device_register(&ek_flash);
4884 + at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
4886 -// ek_add_device_video();
4887 + ek_add_device_video();
4890 MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
4891 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-kb9202.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-kb9202.c
4892 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-kb9202.c 2007-06-17 04:09:12.000000000 +0200
4893 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-kb9202.c 2007-07-29 05:23:04.000000000 +0200
4895 #include <asm/arch/board.h>
4896 #include <asm/arch/gpio.h>
4898 +#include <asm/arch/at91rm9200_mc.h>
4900 #include "generic.h"
4903 @@ -111,6 +113,48 @@
4904 .partition_info = nand_partitions,
4908 +#if defined(CONFIG_FB_S1D15605)
4909 +#warning "Rather pass reset pin via platform_data"
4910 +static struct resource kb9202_lcd_resources[] = {
4912 + .start = AT91_CHIPSELECT_2,
4913 + .end = AT91_CHIPSELECT_2 + 0x200FF,
4914 + .flags = IORESOURCE_MEM
4916 + [1] = { /* reset pin */
4917 + .start = AT91_PIN_PC22,
4918 + .end = AT91_PIN_PC22,
4919 + .flags = IORESOURCE_MEM
4923 +static struct platform_device kb9202_lcd_device = {
4924 + .name = "s1d15605fb",
4926 + .num_resources = ARRAY_SIZE(kb9202_lcd_resources),
4927 + .resource = kb9202_lcd_resources,
4930 +static void __init kb9202_add_device_lcd(void)
4932 + /* In case the boot loader did not set the chip select mode and timing */
4933 + at91_sys_write(AT91_SMC_CSR(2),
4934 + AT91_SMC_WSEN | AT91_SMC_NWS_(18) | AT91_SMC_TDF_(1) | AT91_SMC_DBW_8 |
4935 + AT91_SMC_RWSETUP_(1) | AT91_SMC_RWHOLD_(1));
4937 + /* Backlight pin = output, off */
4938 + at91_set_gpio_output(AT91_PIN_PC23, 0);
4940 + /* Reset pin = output, in reset */
4941 + at91_set_gpio_output(AT91_PIN_PC22, 0);
4943 + platform_device_register(&kb9202_lcd_device);
4946 +static void __init kb9202_add_device_lcd(void) {}
4949 static void __init kb9202_board_init(void)
4953 at91_add_device_spi(NULL, 0);
4955 at91_add_device_nand(&kb9202_nand_data);
4957 + kb9202_add_device_lcd();
4960 MACHINE_START(KB9200, "KB920x")
4961 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9261ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9261ek.c
4962 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9261ek.c 2007-06-17 04:09:12.000000000 +0200
4963 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9261ek.c 2007-07-29 05:23:04.000000000 +0200
4965 #include <linux/spi/spi.h>
4966 #include <linux/spi/ads7846.h>
4967 #include <linux/dm9000.h>
4968 +#include <linux/fb.h>
4970 +#include <video/atmel_lcdc.h>
4972 #include <asm/hardware.h>
4973 #include <asm/setup.h>
4976 .platform_data = &ads_info,
4977 .irq = AT91SAM9261_ID_IRQ0,
4978 + .controller_data = AT91_PIN_PA28, /* CS pin */
4981 #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
4982 @@ -271,6 +275,65 @@
4989 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
4990 +static struct fb_videomode at91_tft_vga_modes[] = {
4992 + .name = "TX09D50VM1CCA @ 60",
4994 + .xres = 240, .yres = 320,
4995 + .pixclock = KHZ2PICOS(4965),
4997 + .left_margin = 1, .right_margin = 33,
4998 + .upper_margin = 1, .lower_margin = 0,
4999 + .hsync_len = 5, .vsync_len = 1,
5001 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5002 + .vmode = FB_VMODE_NONINTERLACED,
5006 +static struct fb_monspecs at91fb_default_monspecs = {
5007 + .manufacturer = "HIT",
5008 + .monitor = "TX09D50VM1CCA",
5010 + .modedb = at91_tft_vga_modes,
5011 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5018 +#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5019 + | ATMEL_LCDC_DISTYPE_TFT \
5020 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5022 +static void at91_lcdc_power_control(int on)
5025 + at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
5027 + at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
5031 +static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
5032 + .default_bpp = 16,
5033 + .default_dmacon = ATMEL_LCDC_DMAEN,
5034 + .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2,
5035 + .default_monspecs = &at91fb_default_monspecs,
5036 + .atmel_lcdfb_power_control = at91_lcdc_power_control,
5041 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
5045 static void __init ek_board_init(void)
5050 at91_add_device_mmc(0, &ek_mmc_data);
5052 + /* LCD Controller */
5053 + at91_add_device_lcdc(&ek_lcdc_data);
5056 MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
5057 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9263ek.c linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9263ek.c
5058 --- linux-2.6.22-rc5/arch/arm/mach-at91/board-sam9263ek.c 2007-06-17 04:09:12.000000000 +0200
5059 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/board-sam9263ek.c 2007-07-29 05:23:04.000000000 +0200
5061 #include <linux/platform_device.h>
5062 #include <linux/spi/spi.h>
5063 #include <linux/spi/ads7846.h>
5064 +#include <linux/fb.h>
5066 +#include <video/atmel_lcdc.h>
5068 #include <asm/hardware.h>
5069 #include <asm/setup.h>
5070 @@ -202,6 +205,65 @@
5076 +#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
5077 +static struct fb_videomode at91_tft_vga_modes[] = {
5079 + .name = "TX09D50VM1CCA @ 60",
5081 + .xres = 240, .yres = 320,
5082 + .pixclock = KHZ2PICOS(4965),
5084 + .left_margin = 1, .right_margin = 33,
5085 + .upper_margin = 1, .lower_margin = 0,
5086 + .hsync_len = 5, .vsync_len = 1,
5088 + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
5089 + .vmode = FB_VMODE_NONINTERLACED,
5093 +static struct fb_monspecs at91fb_default_monspecs = {
5094 + .manufacturer = "HIT",
5095 + .monitor = "TX09D70VM1CCA",
5097 + .modedb = at91_tft_vga_modes,
5098 + .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
5105 +#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
5106 + | ATMEL_LCDC_DISTYPE_TFT \
5107 + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
5109 +static void at91_lcdc_power_control(int on)
5112 + at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
5114 + at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
5118 +static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
5119 + .default_bpp = 16,
5120 + .default_dmacon = ATMEL_LCDC_DMAEN,
5121 + .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
5122 + .default_monspecs = &at91fb_default_monspecs,
5123 + .atmel_lcdfb_power_control = at91_lcdc_power_control,
5128 +static struct atmel_lcdfb_info __initdata ek_lcdc_data;
5135 static struct atmel_ac97_data ek_ac97_data = {
5137 at91_add_device_nand(&ek_nand_data);
5139 at91_add_device_i2c();
5140 + /* LCD Controller */
5141 + at91_add_device_lcdc(&ek_lcdc_data);
5143 at91_add_device_ac97(&ek_ac97_data);
5145 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/clock.c linux-2.6.22-rc5.new/arch/arm/mach-at91/clock.c
5146 --- linux-2.6.22-rc5/arch/arm/mach-at91/clock.c 2007-06-17 04:09:12.000000000 +0200
5147 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/clock.c 2007-07-29 05:23:04.000000000 +0200
5149 #include <asm/arch/cpu.h>
5152 +#include "generic.h"
5156 @@ -254,6 +255,23 @@
5158 /*------------------------------------------------------------------------*/
5162 +int clk_must_disable(struct clk *clk)
5164 + if (!at91_suspend_entering_slow_clock())
5167 + while (clk->parent)
5168 + clk = clk->parent;
5169 + return clk != &clk32k;
5171 +EXPORT_SYMBOL(clk_must_disable);
5175 +/*------------------------------------------------------------------------*/
5177 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
5180 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/generic.h linux-2.6.22-rc5.new/arch/arm/mach-at91/generic.h
5181 --- linux-2.6.22-rc5/arch/arm/mach-at91/generic.h 2007-06-17 04:09:12.000000000 +0200
5182 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/generic.h 2007-07-29 05:23:04.000000000 +0200
5184 /* Power Management */
5185 extern void at91_irq_suspend(void);
5186 extern void at91_irq_resume(void);
5187 +extern int at91_suspend_entering_slow_clock(void);
5190 #define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */
5191 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/ics1523.c linux-2.6.22-rc5.new/arch/arm/mach-at91/ics1523.c
5192 --- linux-2.6.22-rc5/arch/arm/mach-at91/ics1523.c 1970-01-01 01:00:00.000000000 +0100
5193 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/ics1523.c 2007-07-29 05:23:04.000000000 +0200
5196 + * arch/arm/mach-at91rm9200/ics1523.c
5198 + * Copyright (C) 2003 ATMEL Rousset
5200 + * This program is free software; you can redistribute it and/or modify
5201 + * it under the terms of the GNU General Public License as published by
5202 + * the Free Software Foundation; either version 2 of the License, or
5203 + * (at your option) any later version.
5205 + * This program is distributed in the hope that it will be useful,
5206 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5207 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5208 + * GNU General Public License for more details.
5210 + * You should have received a copy of the GNU General Public License
5211 + * along with this program; if not, write to the Free Software
5212 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5215 +#include <asm/hardware.h>
5216 +#include <asm/io.h>
5218 +#include <linux/clk.h>
5219 +#include <linux/delay.h>
5220 +#include <linux/err.h>
5221 +#include <linux/init.h>
5223 +#include <asm/arch/ics1523.h>
5224 +#include <asm/arch/at91_twi.h>
5225 +#include <asm/arch/gpio.h>
5228 +#define AT91_TWI_ERROR (AT91_TWI_NACK | AT91_TWI_UNRE | AT91_TWI_OVRE)
5231 +static void __iomem *twi_base;
5233 +#define at91_twi_read(reg) __raw_readl(twi_base + (reg))
5234 +#define at91_twi_write(reg, val) __raw_writel((val), twi_base + (reg))
5237 +/* -----------------------------------------------------------------------------
5238 + * Initialization of TWI CLOCK
5239 + * ----------------------------------------------------------------------------- */
5241 +static void at91_ics1523_SetTwiClock(unsigned int mck_khz)
5245 + /* Here, CKDIV = 1 and CHDIV = CLDIV ==> CLDIV = CHDIV = 1/4*((Fmclk/FTWI) -6) */
5246 + sclock = (10*mck_khz / ICS_TRANSFER_RATE);
5247 + if (sclock % 10 >= 5)
5248 + sclock = (sclock /10) - 5;
5250 + sclock = (sclock /10)- 6;
5251 + sclock = (sclock + (4 - sclock %4)) >> 2; /* div 4 */
5253 + at91_twi_write(AT91_TWI_CWGR, 0x00010000 | sclock | (sclock << 8));
5256 +/* -----------------------------------------------------------------------------
5257 + * Read a byte with TWI Interface from the Clock Generator ICS1523
5258 + * ----------------------------------------------------------------------------- */
5260 +static int at91_ics1523_ReadByte(unsigned char reg_address, unsigned char *data_in)
5262 + int Status, nb_trial;
5264 + at91_twi_write(AT91_TWI_MMR, AT91_TWI_MREAD | AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
5265 + at91_twi_write(AT91_TWI_IADR, reg_address);
5266 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5268 + /* Program temporizing period (300us) */
5271 + /* Wait TXcomplete ... */
5273 + Status = at91_twi_read(AT91_TWI_SR);
5274 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
5276 + Status = at91_twi_read(AT91_TWI_SR);
5279 + if (Status & AT91_TWI_TXCOMP) {
5280 + *data_in = (unsigned char) at91_twi_read(AT91_TWI_RHR);
5281 + return ICS1523_ACCESS_OK;
5284 + return ICS1523_ACCESS_ERROR;
5287 +/* -----------------------------------------------------------------------------
5288 + * Write a byte with TWI Interface to the Clock Generator ICS1523
5289 + * ----------------------------------------------------------------------------- */
5291 +static int at91_ics1523_WriteByte(unsigned char reg_address, unsigned char data_out)
5293 + int Status, nb_trial;
5295 + at91_twi_write(AT91_TWI_MMR, AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
5296 + at91_twi_write(AT91_TWI_IADR, reg_address);
5297 + at91_twi_write(AT91_TWI_THR, data_out);
5298 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5300 + /* Program temporizing period (300us) */
5304 + Status = at91_twi_read(AT91_TWI_SR);
5305 + while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
5307 + if (Status & AT91_TWI_ERROR) {
5308 + /* If Underrun OR NACK - Start again */
5309 + at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
5311 + /* Program temporizing period (300us) */
5314 + Status = at91_twi_read(AT91_TWI_SR);
5317 + if (Status & AT91_TWI_TXCOMP)
5318 + return ICS1523_ACCESS_OK;
5320 + return ICS1523_ACCESS_ERROR;
5323 +/* -----------------------------------------------------------------------------
5324 + * Initialization of the Clock Generator ICS1523
5325 + * ----------------------------------------------------------------------------- */
5327 +int at91_ics1523_init(void)
5330 + int ack = ICS1523_ACCESS_OK;
5331 + unsigned int status = 0xffffffff;
5332 + struct clk *twi_clk;
5334 + /* Map in TWI peripheral */
5335 + twi_base = ioremap(AT91RM9200_BASE_TWI, SZ_16K);
5339 + /* pins used for TWI interface */
5340 + at91_set_A_periph(AT91_PIN_PA25, 0); /* TWD */
5341 + at91_set_multi_drive(AT91_PIN_PA25, 1);
5342 + at91_set_A_periph(AT91_PIN_PA26, 0); /* TWCK */
5343 + at91_set_multi_drive(AT91_PIN_PA26, 1);
5345 + /* Enable the TWI clock */
5346 + twi_clk = clk_get(NULL, "twi_clk");
5347 + if (IS_ERR(twi_clk))
5348 + return ICS1523_ACCESS_ERROR;
5349 + clk_enable(twi_clk);
5351 + /* Disable interrupts */
5352 + at91_twi_write(AT91_TWI_IDR, -1);
5354 + /* Reset peripheral */
5355 + at91_twi_write(AT91_TWI_CR, AT91_TWI_SWRST);
5357 + /* Set Master mode */
5358 + at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN);
5360 + /* Set TWI Clock Waveform Generator Register */
5361 + at91_ics1523_SetTwiClock(60000); /* MCK in KHz = 60000 KHz */
5363 + /* ICS1523 Initialisation */
5364 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) 0);
5365 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OE, (unsigned char) (ICS_OEF | ICS_OET2 | ICS_OETCK));
5366 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OD, (unsigned char) (ICS_INSEL | 0x7F));
5367 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0);
5372 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) (ICS_ENDLS | ICS_ENPLS | ICS_PDEN /*| ICS_FUNCSEL*/));
5373 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_LCR, (unsigned char) (ICS_PSD | ICS_PFD));
5374 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD0, (unsigned char) 0x39) ; /* 0x7A */
5375 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD1, (unsigned char) 0x00);
5376 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_PLLR));
5378 + /* Program 1ms temporizing period */
5381 + at91_ics1523_ReadByte ((unsigned char) ICS_SR, (char *)&status);
5382 + } while (!((unsigned int) status & (unsigned int) ICS_PLLLOCK) && (nb_trial < 10));
5384 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAC, (unsigned char) 0x03) ; /* 0x01 */
5385 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_DPAR));
5387 + /* Program 1ms temporizing period */
5390 + ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0x00);
5392 + /* Program 1ms temporizing period */
5395 + /* All done - cleanup */
5396 + iounmap(twi_base);
5397 + clk_disable(twi_clk);
5402 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/Kconfig linux-2.6.22-rc5.new/arch/arm/mach-at91/Kconfig
5403 --- linux-2.6.22-rc5/arch/arm/mach-at91/Kconfig 2007-06-17 04:09:12.000000000 +0200
5404 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/Kconfig 2007-07-29 05:23:04.000000000 +0200
5407 Select this if you are using Sperry-Sun's KAFA board.
5410 + bool "Promwad Chub board"
5411 + depends on ARCH_AT91RM9200
5413 + Select this if you are using Promwad's Chub board.
5417 # ----------------------------------------------------------
5418 @@ -121,6 +127,13 @@
5419 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
5420 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
5423 + bool "KwikByte CAM60 board"
5424 + depends on ARCH_AT91SAM9260
5426 + Select this if you are using KwikByte's CAM60 board based on the Atmel AT91SAM9260.
5427 + <http://www.kwikbyte.com>
5431 # ----------------------------------------------------------
5432 @@ -184,6 +197,20 @@
5433 On AT91SAM926x boards both types of NAND flash can be present
5434 (8 and 16 bit data bus width).
5436 +config CSB300_WAKE_SW0
5437 + bool "CSB300 SW0 irq0 wakeup"
5438 + depends on MACH_CSB337 && PM
5440 + If you have a CSB300 connected to your CSB337, this lets
5441 + SW0 serve as a wakeup button. It uses IRQ0.
5443 +config CSB300_WAKE_SW1
5444 + bool "CSB300 SW1 gpio wakeup"
5445 + depends on MACH_CSB337 && PM
5447 + If you have a CSB300 connected to your CSB337, this lets
5448 + SW1 serve as a wakeup button. It uses GPIO.
5450 # ----------------------------------------------------------
5452 comment "AT91 Feature Selections"
5453 @@ -194,6 +221,20 @@
5454 Select this if you need to program one or more of the PCK0..PCK3
5455 programmable clock outputs.
5458 + bool "Timer/Counter Library"
5460 + Select this if you want a library to allocate the Timer/Counter
5461 + blocks found on many Atmel processors. This facilitates using
5462 + these modules despite processor differences.
5464 +config AT91_SLOW_CLOCK
5465 + bool "Suspend-to-RAM uses slow clock mode (EXPERIMENTAL)"
5466 + depends on PM && EXPERIMENTAL
5468 + Select this if you wish to put the CPU into slow clock mode
5469 + while in the "Suspend to RAM" state, to save more power.
5474 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/Makefile linux-2.6.22-rc5.new/arch/arm/mach-at91/Makefile
5475 --- linux-2.6.22-rc5/arch/arm/mach-at91/Makefile 2007-06-17 04:09:12.000000000 +0200
5476 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/Makefile 2007-07-29 05:23:04.000000000 +0200
5480 obj-$(CONFIG_PM) += pm.o
5481 +obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o
5482 +obj-$(CONFIG_ATMEL_TCLIB) += tclib.o
5484 # CPU-specific support
5485 obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
5487 obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
5488 obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
5489 obj-$(CONFIG_MACH_KAFA) += board-kafa.o
5490 +obj-$(CONFIG_MACH_CHUB) += board-chub.o
5491 obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
5493 # AT91SAM9260 board-specific support
5494 obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
5495 +obj-$(CONFIG_MACH_CAM60) += board-cam60.o
5497 # AT91SAM9261 board-specific support
5498 obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
5500 obj-$(CONFIG_LEDS) += $(led-y)
5503 -#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
5504 +obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
5507 ifeq ($(CONFIG_PM_DEBUG),y)
5508 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm.c linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c
5509 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm.c 2007-06-17 04:09:12.000000000 +0200
5510 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c 2007-07-29 05:23:04.000000000 +0200
5512 * Verify that all the clocks are correct before entering
5515 +#warning "SAM9260 only has 3 programmable clocks."
5516 static int at91_pm_verify_clocks(void)
5519 @@ -103,20 +104,15 @@
5523 - * Call this from platform driver suspend() to see how deeply to suspend.
5524 + * This is called from clk_must_disable(), to see how deeply to suspend.
5525 * For example, some controllers (like OHCI) need one of the PLL clocks
5526 * in order to act as a wakeup source, and those are not available when
5527 * going into slow clock mode.
5529 - * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have
5530 - * the very same problem (but not using at91 main_clk), and it'd be better
5531 - * to add one generic API rather than lots of platform-specific ones.
5533 int at91_suspend_entering_slow_clock(void)
5535 return (target_state == PM_SUSPEND_MEM);
5537 -EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5540 static void (*slow_clock)(void);
5541 @@ -205,16 +201,23 @@
5542 .enter = at91_pm_enter,
5545 +#ifdef CONFIG_AT91_SLOW_CLOCK
5546 +extern void at91rm9200_slow_clock(void);
5547 +extern u32 at91rm9200_slow_clock_sz;
5550 static int __init at91_pm_init(void)
5552 - printk("AT91: Power Management\n");
5554 -#ifdef CONFIG_AT91_PM_SLOW_CLOCK
5555 - /* REVISIT allocations of SRAM should be dynamically managed.
5556 +#ifdef CONFIG_AT91_SLOW_CLOCK
5558 + * REVISIT allocations of SRAM should be dynamically managed.
5559 * FIQ handlers and other components will want SRAM/TCM too...
5561 - slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
5562 + slow_clock = (void *) (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE + (3 * SZ_4K));
5563 memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
5564 + printk("AT91: Power Management (with slow clock mode)\n");
5566 + printk("AT91: Power Management\n");
5569 /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
5570 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm.c.orig linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c.orig
5571 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm.c.orig 1970-01-01 01:00:00.000000000 +0100
5572 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm.c.orig 2007-06-17 04:09:12.000000000 +0200
5575 + * arch/arm/mach-at91/pm.c
5576 + * AT91 Power Management
5578 + * Copyright (C) 2005 David Brownell
5580 + * This program is free software; you can redistribute it and/or modify
5581 + * it under the terms of the GNU General Public License as published by
5582 + * the Free Software Foundation; either version 2 of the License, or
5583 + * (at your option) any later version.
5586 +#include <linux/pm.h>
5587 +#include <linux/sched.h>
5588 +#include <linux/proc_fs.h>
5589 +#include <linux/pm.h>
5590 +#include <linux/interrupt.h>
5591 +#include <linux/sysfs.h>
5592 +#include <linux/module.h>
5593 +#include <linux/platform_device.h>
5595 +#include <asm/io.h>
5596 +#include <asm/irq.h>
5597 +#include <asm/atomic.h>
5598 +#include <asm/mach/time.h>
5599 +#include <asm/mach/irq.h>
5600 +#include <asm/mach-types.h>
5602 +#include <asm/arch/at91_pmc.h>
5603 +#include <asm/arch/at91rm9200_mc.h>
5604 +#include <asm/arch/gpio.h>
5605 +#include <asm/arch/cpu.h>
5607 +#include "generic.h"
5610 +static int at91_pm_valid_state(suspend_state_t state)
5613 + case PM_SUSPEND_ON:
5614 + case PM_SUSPEND_STANDBY:
5615 + case PM_SUSPEND_MEM:
5624 +static suspend_state_t target_state;
5627 + * Called after processes are frozen, but before we shutdown devices.
5629 +static int at91_pm_prepare(suspend_state_t state)
5631 + target_state = state;
5636 + * Verify that all the clocks are correct before entering
5637 + * slow-clock mode.
5639 +static int at91_pm_verify_clocks(void)
5641 + unsigned long scsr;
5644 + scsr = at91_sys_read(AT91_PMC_SCSR);
5646 + /* USB must not be using PLLB */
5647 + if (cpu_is_at91rm9200()) {
5648 + if ((scsr & (AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP)) != 0) {
5649 + pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
5652 + } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()) {
5653 + if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
5654 + pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
5659 +#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
5660 + /* PCK0..PCK3 must be disabled, or configured to use clk32k */
5661 + for (i = 0; i < 4; i++) {
5664 + if ((scsr & (AT91_PMC_PCK0 << i)) == 0)
5667 + css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS;
5668 + if (css != AT91_PMC_CSS_SLOW) {
5669 + pr_debug("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css);
5679 + * Call this from platform driver suspend() to see how deeply to suspend.
5680 + * For example, some controllers (like OHCI) need one of the PLL clocks
5681 + * in order to act as a wakeup source, and those are not available when
5682 + * going into slow clock mode.
5684 + * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have
5685 + * the very same problem (but not using at91 main_clk), and it'd be better
5686 + * to add one generic API rather than lots of platform-specific ones.
5688 +int at91_suspend_entering_slow_clock(void)
5690 + return (target_state == PM_SUSPEND_MEM);
5692 +EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
5695 +static void (*slow_clock)(void);
5698 +static int at91_pm_enter(suspend_state_t state)
5700 + at91_gpio_suspend();
5701 + at91_irq_suspend();
5703 + pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
5704 + /* remember all the always-wake irqs */
5705 + (at91_sys_read(AT91_PMC_PCSR)
5706 + | (1 << AT91_ID_FIQ)
5707 + | (1 << AT91_ID_SYS)
5708 + | (at91_extern_irq))
5709 + & at91_sys_read(AT91_AIC_IMR),
5714 + * Suspend-to-RAM is like STANDBY plus slow clock mode, so
5715 + * drivers must suspend more deeply: only the master clock
5716 + * controller may be using the main oscillator.
5718 + case PM_SUSPEND_MEM:
5720 + * Ensure that clocks are in a valid state.
5722 + if (!at91_pm_verify_clocks())
5726 + * Enter slow clock mode by switching over to clk32k and
5727 + * turning off the main oscillator; reverse on wakeup.
5733 + /* DEVELOPMENT ONLY */
5734 + pr_info("AT91: PM - no slow clock mode yet ...\n");
5735 + /* FALLTHROUGH leaving master clock alone */
5739 + * STANDBY mode has *all* drivers suspended; ignores irqs not
5740 + * marked as 'wakeup' event sources; and reduces DRAM power.
5741 + * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and
5742 + * nothing fancy done with main or cpu clocks.
5744 + case PM_SUSPEND_STANDBY:
5746 + * NOTE: the Wait-for-Interrupt instruction needs to be
5747 + * in icache so the SDRAM stays in self-refresh mode until
5748 + * the wakeup IRQ occurs.
5750 + asm("b 1f; .align 5; 1:");
5751 + asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */
5752 + at91_sys_write(AT91_SDRAMC_SRR, 1); /* self-refresh mode */
5753 + /* fall though to next state */
5755 + case PM_SUSPEND_ON:
5756 + asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
5760 + pr_debug("AT91: PM - bogus suspend state %d\n", state);
5764 + pr_debug("AT91: PM - wakeup %08x\n",
5765 + at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));
5768 + target_state = PM_SUSPEND_ON;
5769 + at91_irq_resume();
5770 + at91_gpio_resume();
5775 +static struct pm_ops at91_pm_ops ={
5776 + .valid = at91_pm_valid_state,
5777 + .prepare = at91_pm_prepare,
5778 + .enter = at91_pm_enter,
5781 +static int __init at91_pm_init(void)
5783 + printk("AT91: Power Management\n");
5785 +#ifdef CONFIG_AT91_PM_SLOW_CLOCK
5786 + /* REVISIT allocations of SRAM should be dynamically managed.
5787 + * FIQ handlers and other components will want SRAM/TCM too...
5789 + slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
5790 + memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
5793 + /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
5794 + at91_sys_write(AT91_SDRAMC_LPR, 0);
5796 + pm_set_ops(&at91_pm_ops);
5800 +arch_initcall(at91_pm_init);
5801 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/pm_slowclock.S linux-2.6.22-rc5.new/arch/arm/mach-at91/pm_slowclock.S
5802 --- linux-2.6.22-rc5/arch/arm/mach-at91/pm_slowclock.S 1970-01-01 01:00:00.000000000 +0100
5803 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/pm_slowclock.S 2007-07-29 05:23:04.000000000 +0200
5806 + * arch/arm/mach-at91/pm_slow_clock.S
5808 + * Copyright (C) 2006 Savin Zlobec
5810 + * This program is free software; you can redistribute it and/or modify
5811 + * it under the terms of the GNU General Public License version 2 as
5812 + * published by the Free Software Foundation.
5816 +#include <linux/linkage.h>
5817 +#include <asm/hardware.h>
5818 +#include <asm/arch/at91_pmc.h>
5819 +#include <asm/arch/at91rm9200_mc.h>
5821 +#define MCKRDY_TIMEOUT 1000
5822 +#define MOSCRDY_TIMEOUT 1000
5823 +#define PLLALOCK_TIMEOUT 1000
5825 + .macro wait_mckrdy
5826 + mov r2, #MCKRDY_TIMEOUT
5830 + ldr r3, [r1, #AT91_PMC_SR]
5831 + tst r3, #AT91_PMC_MCKRDY
5836 + .macro wait_moscrdy
5837 + mov r2, #MOSCRDY_TIMEOUT
5841 + ldr r3, [r1, #AT91_PMC_SR]
5842 + tst r3, #AT91_PMC_MOSCS
5847 + .macro wait_pllalock
5848 + mov r2, #PLLALOCK_TIMEOUT
5852 + ldr r3, [r1, #AT91_PMC_SR]
5853 + tst r3, #AT91_PMC_LOCKA
5858 + .macro wait_plladis
5859 + mov r2, #PLLALOCK_TIMEOUT
5863 + ldr r3, [r1, #AT91_PMC_SR]
5864 + tst r3, #AT91_PMC_LOCKA
5871 +ENTRY(at91rm9200_slow_clock)
5873 + ldr r1, .at91_va_base_sys
5875 + /* Put SDRAM in self refresh mode */
5879 +1: mcr p15, 0, r0, c7, c10, 4
5881 + str r2, [r1, #AT91_SDRAMC_SRR]
5883 + /* Save Master clock setting */
5885 + ldr r2, [r1, #AT91_PMC_MCKR]
5886 + str r2, .saved_mckr
5889 + * Set the Master clock source to slow clock
5891 + * First set the CSS field, wait for MCKRDY
5892 + * and than set the PRES and MDIV fields.
5894 + * See eratta #2[78] for details.
5898 + str r2, [r1, #AT91_PMC_MCKR]
5903 + str r2, [r1, #AT91_PMC_MCKR]
5905 + /* Save PLLA setting and disable it */
5907 + ldr r2, [r1, #AT91_CKGR_PLLAR]
5908 + str r2, .saved_pllar
5911 + str r2, [r1, #AT91_CKGR_PLLAR]
5915 + /* Turn off the main oscillator */
5917 + ldr r2, [r1, #AT91_CKGR_MOR]
5918 + bic r2, r2, #AT91_PMC_MOSCEN
5919 + str r2, [r1, #AT91_CKGR_MOR]
5921 + /* Wait for interrupt */
5923 + mcr p15, 0, r0, c7, c0, 4
5925 + /* Turn on the main oscillator */
5927 + ldr r2, [r1, #AT91_CKGR_MOR]
5928 + orr r2, r2, #AT91_PMC_MOSCEN
5929 + str r2, [r1, #AT91_CKGR_MOR]
5933 + /* Restore PLLA setting */
5935 + ldr r2, .saved_pllar
5936 + str r2, [r1, #AT91_CKGR_PLLAR]
5941 + * Restore master clock setting
5943 + * First set PRES if it was not 0,
5944 + * than set CSS and MDIV fields.
5945 + * After every change wait for
5948 + * See eratta #2[78] for details.
5951 + ldr r2, .saved_mckr
5955 + str r2, [r1, #AT91_PMC_MCKR]
5959 +2: ldr r2, .saved_mckr
5960 + str r2, [r1, #AT91_PMC_MCKR]
5973 + .word AT91_VA_BASE_SYS
5975 +ENTRY(at91rm9200_slow_clock_sz)
5976 + .word .-at91rm9200_slow_clock
5977 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/tclib.c linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.c
5978 --- linux-2.6.22-rc5/arch/arm/mach-at91/tclib.c 1970-01-01 01:00:00.000000000 +0100
5979 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.c 2007-07-29 05:23:04.000000000 +0200
5981 +#include <linux/clk.h>
5982 +#include <linux/kernel.h>
5983 +#include <linux/module.h>
5987 +static struct atmel_tcblock *blocks;
5988 +static int nblocks;
5991 + * Called from the processor-specific init to register the TC Blocks.
5993 +void __init atmel_tc_init(struct atmel_tcblock *tcblocks, int n)
5995 + blocks = tcblocks;
5998 diff -urN linux-2.6.22-rc5/arch/arm/mach-at91/tclib.h linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.h
5999 --- linux-2.6.22-rc5/arch/arm/mach-at91/tclib.h 1970-01-01 01:00:00.000000000 +0100
6000 +++ linux-2.6.22-rc5.new/arch/arm/mach-at91/tclib.h 2007-07-29 05:23:04.000000000 +0200
6003 +#define TC_PER_TCB 3
6005 +struct atmel_tcblock {
6007 + void __iomem *ioaddr;
6008 + struct clk *clk[TC_PER_TCB];
6009 + int irq[TC_PER_TCB];
6012 +extern void __init atmel_tc_init(struct atmel_tcblock *tcblocks, int n);
6013 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_mci.h linux-2.6-stable/include/asm-arm/arch-at91/at91_mci.h
6014 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_mci.h Thu Apr 26 05:08:32 2007
6015 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91_mci.h Tue May 8 12:13:31 2007
6017 #define AT91_MCI_MR 0x04 /* Mode Register */
6018 #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */
6019 #define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */
6020 +#define AT91_MCI_RDPROOF (1 << 11) /* Read Proof Enable [SAM926[03] only] */
6021 +#define AT91_MCI_WRPROOF (1 << 12) /* Write Proof Enable [SAM926[03] only] */
6022 +#define AT91_MCI_PDCFBYTE (1 << 13) /* PDC Force Byte Transfer [SAM926[03] only] */
6023 #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */
6024 #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */
6025 #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */
6026 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_pmc.h linux-2.6-stable/include/asm-arm/arch-at91/at91_pmc.h
6027 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91_pmc.h Thu Apr 26 05:08:32 2007
6028 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91_pmc.h Fri May 11 16:45:00 2007
6030 #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
6031 #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
6033 -#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */
6034 +#define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL only] */
6036 +#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */
6037 #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
6038 #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */
6039 #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
6040 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/at91sam9260_matrix.h linux-2.6-stable/include/asm-arm/arch-at91/at91sam9260_matrix.h
6041 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/at91sam9260_matrix.h Thu Apr 26 05:08:32 2007
6042 +++ linux-2.6-stable/include/asm-arm/arch-at91/at91sam9260_matrix.h Fri May 11 16:20:33 2007
6044 #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
6045 #define AT91_MATRIX_CS4A_SMC (0 << 4)
6046 #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
6047 -#define AT91_MATRIX_CS5A (1 << 5 ) /* Chip Select 5 Assignment */
6048 +#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
6049 #define AT91_MATRIX_CS5A_SMC (0 << 5)
6050 #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
6051 #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
6052 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/board.h linux-2.6-stable/include/asm-arm/arch-at91/board.h
6053 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/board.h Thu May 17 12:13:17 2007
6054 +++ linux-2.6-stable/include/asm-arm/arch-at91/board.h Thu May 10 12:21:10 2007
6055 @@ -124,9 +124,21 @@
6057 extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
6060 +extern void __init at91_add_device_isi(void);
6063 extern u8 at91_leds_cpu;
6064 extern u8 at91_leds_timer;
6065 extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
6067 +struct at91_gpio_led {
6068 + u8 index; /* index of LED */
6069 + char* name; /* name of LED */
6070 + u8 gpio; /* AT91_PIN_xx */
6071 + u8 flags; /* 1=active-high */
6072 + char* trigger; /* default trigger */
6074 +extern void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr);
6077 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/ics1523.h linux-2.6-stable/include/asm-arm/arch-at91/ics1523.h
6078 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/ics1523.h Thu Jan 1 02:00:00 1970
6079 +++ linux-2.6-stable/include/asm-arm/arch-at91/ics1523.h Mon May 14 13:49:47 2007
6081 +//*----------------------------------------------------------------------------
6082 +//* ATMEL Microcontroller Software Support - ROUSSET -
6083 +//*----------------------------------------------------------------------------
6084 +//* The software is delivered "AS IS" without warranty or condition of any
6085 +//* kind, either express, implied or statutory. This includes without
6086 +//* limitation any warranty or condition with respect to merchantability or
6087 +//* fitness for any particular purpose, or against the infringements of
6088 +//* intellectual property rights of others.
6089 +//*----------------------------------------------------------------------------
6090 +//* File Name : ics1523.h
6091 +//* Object : Clock Generator Prototyping File.
6093 +//* 1.0 08/28/02 ED : Creation
6094 +//* 1.2 13/01/03 FB : Update on lib V3
6095 +//*----------------------------------------------------------------------------
6100 +/*-------------------------------------------*/
6101 +/* ICS1523 TWI Serial Clock Definition */
6102 +/*-------------------------------------------*/
6104 +#define ICS_MIN_CLOCK 100 /* Min Frequency Access Clock KHz */
6105 +#define ICS_MAX_CLOCK 400 /* Max Frequency Access Clock KHz */
6106 +#define ICS_TRANSFER_RATE ICS_MAX_CLOCK /* Transfer speed to apply */
6108 +#define ICS_WRITE_CLK_PNB 30 /* TWCK Clock Periods required to write */
6109 +#define ICS_READ_CLK_PNB 40 /* TWCK Clock Periods required to read */
6111 +/*-------------------------------------------*/
6112 +/* ICS1523 Write Operation Definition */
6113 +/*-------------------------------------------*/
6115 +#define ICS1523_ACCESS_OK 0 /* OK */
6116 +#define ICS1523_ACCESS_ERROR -1 /* NOK */
6118 +/*-------------------------------------------*/
6119 +/* ICS1523 Device Addresses Definition */
6120 +/*-------------------------------------------*/
6122 +#define ICS_ADDR 0x26 /* Device Address */
6124 +/*--------------------------------------------------*/
6125 +/* ICS1523 Registers Internal Addresses Definition */
6126 +/*--------------------------------------------------*/
6128 +#define ICS_ICR 0x0 /* Input Control Register */
6129 +#define ICS_LCR 0x1 /* Loop Control Register */
6130 +#define ICS_FD0 0x2 /* PLL FeedBack Divider LSBs */
6131 +#define ICS_FD1 0x3 /* PLL FeedBack Divider MSBs */
6132 +#define ICS_DPAO 0x4 /* Dynamic Phase Aligner Offset */
6133 +#define ICS_DPAC 0x5 /* Dynamic Phase Aligner Resolution */
6134 +#define ICS_OE 0x6 /* Output Enables Register */
6135 +#define ICS_OD 0x7 /* Osc Divider Register */
6136 +#define ICS_SWRST 0x8 /* DPA & PLL Reset Register */
6137 +#define ICS_VID 0x10 /* Chip Version Register */
6138 +#define ICS_RID 0x11 /* Chip Revision Register */
6139 +#define ICS_SR 0x12 /* Status Register */
6141 +/*------------------------------------------------------*/
6142 +/* ICS1523 Input Control Register Bits Definition */
6143 +/*------------------------------------------------------*/
6145 +#define ICS_PDEN 0x1 /* Phase Detector Enable */
6146 +#define ICS_PDPOL 0x2 /* Phase Detector Enable Polarity */
6147 +#define ICS_REFPOL 0x4 /* External Reference Polarity */
6148 +#define ICS_FBKPOL 0x8 /* External Feedback Polarity */
6149 +#define ICS_FBKSEL 0x10 /* External Feedback Select */
6150 +#define ICS_FUNCSEL 0x20 /* Function Out Select */
6151 +#define ICS_ENPLS 0x40 /* Enable PLL Lock/Ref Status Output */
6152 +#define ICS_ENDLS 0x80 /* Enable DPA Lock/Ref Status Output */
6154 +/*-----------------------------------------------------*/
6155 +/* ICS1523 Loop Control Register Bits Definition */
6156 +/*-----------------------------------------------------*/
6158 +#define ICS_PFD 0x7 /* Phase Detector Gain */
6159 +#define ICS_PSD 0x30 /* Post-Scaler Divider */
6161 +/*----------------------------------------------------*/
6162 +/* ICS1523 PLL FeedBack Divider LSBs Definition */
6163 +/*----------------------------------------------------*/
6165 +#define ICS_FBDL 0xFF /* PLL FeedBack Divider LSBs */
6167 +/*----------------------------------------------------*/
6168 +/* ICS1523 PLL FeedBack Divider MSBs Definition */
6169 +/*----------------------------------------------------*/
6171 +#define ICS_FBDM 0xF /* PLL FeedBack Divider MSBs */
6173 +/*------------------------------------------------------------*/
6174 +/* ICS1523 Dynamic Phase Aligner Offset Bits Definition */
6175 +/*------------------------------------------------------------*/
6177 +#define ICS_DPAOS 0x2F /* Dynamic Phase Aligner Offset */
6178 +#define ICS_FILSEL 0x80 /* Loop Filter Select */
6180 +/*----------------------------------------------------------------*/
6181 +/* ICS1523 Dynamic Phase Aligner Resolution Bits Definition */
6182 +/*----------------------------------------------------------------*/
6184 +#define ICS_DPARES 0x3 /* Dynamic Phase Aligner Resolution */
6185 +#define ICS_MMREV 0xFC /* Metal Mask Revision Number */
6187 +/*-------------------------------------------------------*/
6188 +/* ICS1523 Output Enables Register Bits Definition */
6189 +/*-------------------------------------------------------*/
6191 +#define ICS_OEPCK 0x1 /* Output Enable for PECL PCLK Outputs */
6192 +#define ICS_OETCK 0x2 /* Output Enable for STTL CLK Output */
6193 +#define ICS_OEP2 0x4 /* Output Enable for PECL CLK/2 Outputs */
6194 +#define ICS_OET2 0x8 /* Output Enable for STTL CLK/2 Output */
6195 +#define ICS_OEF 0x10 /* Output Enable for STTL FUNC Output */
6196 +#define ICS_CLK2INV 0x20 /* CLK/2 Invert */
6197 +#define ICS_OSCL 0xC0 /* SSTL Clock Scaler */
6199 +/*----------------------------------------------------*/
6200 +/* ICS1523 Osc Divider Register Bits Definition */
6201 +/*----------------------------------------------------*/
6203 +#define ICS_OSCDIV 0x7F /* Oscillator Divider Modulus */
6204 +#define ICS_INSEL 0x80 /* Input Select */
6206 +/*---------------------------------------------------*/
6207 +/* ICS1523 DPA & PLL Reset Register Definition */
6208 +/*---------------------------------------------------*/
6210 +#define ICS_DPAR 0x0A /* DPA Reset Command */
6211 +#define ICS_PLLR 0x50 /* PLL Reset Command */
6213 +/*------------------------------------------------*/
6214 +/* ICS1523 Chip Version Register Definition */
6215 +/*------------------------------------------------*/
6217 +#define ICS_CHIPV 0xFF /* Chip Version */
6219 +/*-------------------------------------------------*/
6220 +/* ICS1523 Chip Revision Register Definition */
6221 +/*-------------------------------------------------*/
6223 +#define ICS_CHIPR 0xFF /* Chip Revision */
6225 +/*------------------------------------------*/
6226 +/* ICS1523 Status Register Definition */
6227 +/*------------------------------------------*/
6229 +#define ICS_DPALOCK 0x1 /* DPA Lock Status */
6230 +#define ICS_PLLLOCK 0x2 /* PLL Lock Status */
6232 +int at91_ics1523_init(void);
6234 +#endif /* ics1523_h */
6235 diff -urN -x CVS linux-2.6.22-rc1/include/asm-arm/arch-at91/spi.h linux-2.6-stable/include/asm-arm/arch-at91/spi.h
6236 --- linux-2.6.22-rc1/include/asm-arm/arch-at91/spi.h Thu Jan 1 02:00:00 1970
6237 +++ linux-2.6-stable/include/asm-arm/arch-at91/spi.h Mon May 14 13:49:47 2007
6240 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200
6242 + * (c) SAN People (Pty) Ltd
6244 + * This program is free software; you can redistribute it and/or
6245 + * modify it under the terms of the GNU General Public License
6246 + * as published by the Free Software Foundation; either version
6247 + * 2 of the License, or (at your option) any later version.
6250 +#ifndef AT91_LEGACY_SPI_H
6251 +#define AT91_LEGACY_SPI_H
6253 +#define SPI_MAJOR 153 /* registered device number */
6255 +#define DEFAULT_SPI_CLK 6000000
6258 +/* Maximum number of buffers in a single SPI transfer.
6259 + * DataFlash uses maximum of 2
6260 + * spidev interface supports up to 8.
6262 +#define MAX_SPI_TRANSFERS 8
6263 +#define NR_SPI_DEVICES 4 /* number of devices on SPI bus */
6266 + * Describes the buffers for a SPI transfer.
6267 + * A transmit & receive buffer must be specified for each transfer
6269 +struct spi_transfer_list {
6270 + void* tx[MAX_SPI_TRANSFERS]; /* transmit */
6271 + int txlen[MAX_SPI_TRANSFERS];
6272 + void* rx[MAX_SPI_TRANSFERS]; /* receive */
6273 + int rxlen[MAX_SPI_TRANSFERS];
6274 + int nr_transfers; /* number of transfers */
6275 + int curr; /* current transfer */
6279 + unsigned int pcs; /* Peripheral Chip Select value */
6281 + struct spi_transfer_list *xfers; /* current transfer list */
6282 + dma_addr_t tx, rx; /* DMA address for current transfer */
6283 + dma_addr_t txnext, rxnext; /* DMA address for next transfer */
6287 +/* Exported functions */
6288 +extern void spi_access_bus(short device);
6289 +extern void spi_release_bus(short device);
6290 +extern int spi_transfer(struct spi_transfer_list* list);
6293 diff -urN -x CVS linux-2.6.22-rc1/include/linux/clk.h linux-2.6-stable/include/linux/clk.h
6294 --- linux-2.6.22-rc1/include/linux/clk.h Thu Apr 26 05:08:32 2007
6295 +++ linux-2.6-stable/include/linux/clk.h Tue May 8 12:13:31 2007
6296 @@ -121,4 +121,24 @@
6298 struct clk *clk_get_parent(struct clk *clk);
6301 + * clk_must_disable - report whether a clock's users must disable it
6302 + * @clk: one node in the clock tree
6304 + * This routine returns true only if the upcoming system state requires
6305 + * disabling the specified clock.
6307 + * It's common for platform power states to constrain certain clocks (and
6308 + * their descendants) to be unavailable, while other states allow that
6309 + * clock to be active. A platform's power states often include an "all on"
6310 + * mode; system wide sleep states like "standby" or "suspend-to-RAM"; and
6311 + * operating states which sacrifice functionality for lower power usage.
6313 + * The constraint value is commonly tested in device driver suspend(), to
6314 + * leave clocks active if they are needed for features like wakeup events.
6315 + * On platforms that support reduced functionality operating states, the
6316 + * constraint may also need to be tested during resume() and probe() calls.
6318 +int clk_must_disable(struct clk *clk);
6321 diff -urN -x CVS linux-2.6.22-rc1/include/linux/i2c-id.h linux-2.6-stable/include/linux/i2c-id.h
6322 --- linux-2.6.22-rc1/include/linux/i2c-id.h Thu May 17 12:13:23 2007
6323 +++ linux-2.6-stable/include/linux/i2c-id.h Mon May 14 10:18:35 2007
6326 /* --- PCA 9564 based algorithms */
6327 #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */
6328 +#define I2C_HW_A_PLAT 0x1a0001 /* generic platform_bus interface */
6330 /* --- ACPI Embedded controller algorithms */
6331 #define I2C_HW_ACPI_EC 0x1f0000
6332 diff -urN -x CVS linux-2.6.22-rc1/sound/soc/at91/eti_b1_wm8731.c linux-2.6-stable/sound/soc/at91/eti_b1_wm8731.c
6333 --- linux-2.6.22-rc1/sound/soc/at91/eti_b1_wm8731.c Thu May 17 12:13:36 2007
6334 +++ linux-2.6-stable/sound/soc/at91/eti_b1_wm8731.c Mon May 14 10:19:04 2007
6336 #include <sound/soc.h>
6337 #include <sound/soc-dapm.h>
6339 -#include <asm/arch/hardware.h>
6340 -#include <asm/arch/at91_pio.h>
6341 +#include <asm/hardware.h>
6342 #include <asm/arch/gpio.h>
6344 #include "../codecs/wm8731.h"
6349 -#define AT91_PIO_TF1 (1 << (AT91_PIN_PB6 - PIN_BASE) % 32)
6350 -#define AT91_PIO_TK1 (1 << (AT91_PIN_PB7 - PIN_BASE) % 32)
6351 -#define AT91_PIO_TD1 (1 << (AT91_PIN_PB8 - PIN_BASE) % 32)
6352 -#define AT91_PIO_RD1 (1 << (AT91_PIN_PB9 - PIN_BASE) % 32)
6353 -#define AT91_PIO_RK1 (1 << (AT91_PIN_PB10 - PIN_BASE) % 32)
6354 -#define AT91_PIO_RF1 (1 << (AT91_PIN_PB11 - PIN_BASE) % 32)
6356 static struct clk *pck1_clk;
6357 static struct clk *pllb_clk;
6360 static int __init eti_b1_init(void)
6363 - u32 ssc_pio_lines;
6364 struct at91_ssc_periph *ssc = eti_b1_dai.cpu_dai->private_data;
6366 if (!request_mem_region(AT91RM9200_BASE_SSC1, SZ_16K, "soc-audio")) {
6367 @@ -311,19 +302,12 @@
6371 - ssc_pio_lines = AT91_PIO_TF1 | AT91_PIO_TK1 | AT91_PIO_TD1
6372 - | AT91_PIO_RD1 /* | AT91_PIO_RK1 */ | AT91_PIO_RF1;
6374 - /* Reset all PIO registers and assign lines to peripheral A */
6375 - at91_sys_write(AT91_PIOB + PIO_PDR, ssc_pio_lines);
6376 - at91_sys_write(AT91_PIOB + PIO_ODR, ssc_pio_lines);
6377 - at91_sys_write(AT91_PIOB + PIO_IFDR, ssc_pio_lines);
6378 - at91_sys_write(AT91_PIOB + PIO_CODR, ssc_pio_lines);
6379 - at91_sys_write(AT91_PIOB + PIO_IDR, ssc_pio_lines);
6380 - at91_sys_write(AT91_PIOB + PIO_MDDR, ssc_pio_lines);
6381 - at91_sys_write(AT91_PIOB + PIO_PUDR, ssc_pio_lines);
6382 - at91_sys_write(AT91_PIOB + PIO_ASR, ssc_pio_lines);
6383 - at91_sys_write(AT91_PIOB + PIO_OWDR, ssc_pio_lines);
6384 + at91_set_A_periph(AT91_PIN_PB6, 0); /* TF1 */
6385 + at91_set_A_periph(AT91_PIN_PB7, 0); /* TK1 */
6386 + at91_set_A_periph(AT91_PIN_PB8, 0); /* TD1 */
6387 + at91_set_A_periph(AT91_PIN_PB9, 0); /* RD1 */
6388 +/* at91_set_A_periph(AT91_PIN_PB10, 0);*/ /* RK1 */
6389 + at91_set_A_periph(AT91_PIN_PB11, 0); /* RF1 */
6392 * Set PCK1 parent to PLLB and its rate to 12 Mhz.
6393 diff -urN linux-2.6.22-rc5/drivers/char/at91_spi.c linux-2.6.22-rc5.new/drivers/char/at91_spi.c
6394 --- linux-2.6.22-rc5/drivers/char/at91_spi.c 1970-01-01 01:00:00.000000000 +0100
6395 +++ linux-2.6.22-rc5.new/drivers/char/at91_spi.c 2007-07-29 05:55:39.000000000 +0200
6398 + * Serial Peripheral Interface (SPI) driver for the Atmel AT91RM9200 (Thunder)
6400 + * Copyright (C) SAN People (Pty) Ltd
6402 + * This program is free software; you can redistribute it and/or
6403 + * modify it under the terms of the GNU General Public License
6404 + * as published by the Free Software Foundation; either version
6405 + * 2 of the License, or (at your option) any later version.
6408 +#include <linux/init.h>
6409 +#include <linux/dma-mapping.h>
6410 +#include <linux/module.h>
6411 +#include <linux/sched.h>
6412 +#include <linux/completion.h>
6413 +#include <linux/interrupt.h>
6414 +#include <linux/clk.h>
6415 +#include <linux/platform_device.h>
6416 +#include <linux/atmel_pdc.h>
6417 +#include <asm/io.h>
6418 +#include <asm/semaphore.h>
6420 +#include <asm/arch/at91_spi.h>
6421 +#include <asm/arch/board.h>
6422 +#include <asm/arch/spi.h>
6426 +static struct spi_local spi_dev[NR_SPI_DEVICES]; /* state of the SPI devices */
6427 +static int spi_enabled = 0;
6428 +static struct semaphore spi_lock; /* protect access to SPI bus */
6429 +static int current_device = -1; /* currently selected SPI device */
6430 +static struct clk *spi_clk; /* SPI clock */
6431 +static void __iomem *spi_base; /* SPI peripheral base-address */
6433 +DECLARE_COMPLETION(transfer_complete);
6436 +#define at91_spi_read(reg) __raw_readl(spi_base + (reg))
6437 +#define at91_spi_write(reg, val) __raw_writel((val), spi_base + (reg))
6440 +/* ......................................................................... */
6443 + * Access and enable the SPI bus.
6444 + * This MUST be called before any transfers are performed.
6446 +void spi_access_bus(short device)
6448 + /* Ensure that requested device is valid */
6449 + if ((device < 0) || (device >= NR_SPI_DEVICES))
6450 + panic("at91_spi: spi_access_bus called with invalid device");
6452 + if (spi_enabled == 0) {
6453 + clk_enable(spi_clk); /* Enable Peripheral clock */
6454 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIEN); /* Enable SPI */
6456 + printk("SPI on\n");
6461 + /* Lock the SPI bus */
6463 + current_device = device;
6465 + /* Configure SPI bus for device */
6466 + at91_spi_write(AT91_SPI_MR, AT91_SPI_MSTR | AT91_SPI_MODFDIS | (spi_dev[device].pcs << 16));
6470 + * Relinquish control of the SPI bus.
6472 +void spi_release_bus(short device)
6474 + if (device != current_device)
6475 + panic("at91_spi: spi_release called with invalid device");
6477 + /* Release the SPI bus */
6478 + current_device = -1;
6482 + if (spi_enabled == 0) {
6483 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIDIS); /* Disable SPI */
6484 + clk_disable(spi_clk); /* Disable Peripheral clock */
6486 + printk("SPI off\n");
6492 + * Perform a data transfer over the SPI bus
6494 +int spi_transfer(struct spi_transfer_list* list)
6496 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
6500 + panic("at91_spi: spi_transfer called with NULL transfer list");
6501 + if (current_device == -1)
6502 + panic("at91_spi: spi_transfer called without acquiring bus");
6505 + printk("SPI transfer start [%i]\n", list->nr_transfers);
6508 + /* If we are in 16-bit mode, we need to modify what we pass to the PDC */
6509 + tx_size = (at91_spi_read(AT91_SPI_CSR(current_device)) & AT91_SPI_BITS_16) ? 2 : 1;
6511 + /* Store transfer list */
6512 + device->xfers = list;
6515 + /* Assume there must be at least one transfer */
6516 + device->tx = dma_map_single(NULL, list->tx[0], list->txlen[0], DMA_TO_DEVICE);
6517 + device->rx = dma_map_single(NULL, list->rx[0], list->rxlen[0], DMA_FROM_DEVICE);
6519 + /* Program PDC registers */
6520 + at91_spi_write(ATMEL_PDC_TPR, device->tx);
6521 + at91_spi_write(ATMEL_PDC_RPR, device->rx);
6522 + at91_spi_write(ATMEL_PDC_TCR, list->txlen[0] / tx_size);
6523 + at91_spi_write(ATMEL_PDC_RCR, list->rxlen[0] / tx_size);
6525 + /* Is there a second transfer? */
6526 + if (list->nr_transfers > 1) {
6527 + device->txnext = dma_map_single(NULL, list->tx[1], list->txlen[1], DMA_TO_DEVICE);
6528 + device->rxnext = dma_map_single(NULL, list->rx[1], list->rxlen[1], DMA_FROM_DEVICE);
6530 + /* Program Next PDC registers */
6531 + at91_spi_write(ATMEL_PDC_TNPR, device->txnext);
6532 + at91_spi_write(ATMEL_PDC_RNPR, device->rxnext);
6533 + at91_spi_write(ATMEL_PDC_TNCR, list->txlen[1] / tx_size);
6534 + at91_spi_write(ATMEL_PDC_RNCR, list->rxlen[1] / tx_size);
6537 + device->txnext = 0;
6538 + device->rxnext = 0;
6539 + at91_spi_write(ATMEL_PDC_TNCR, 0);
6540 + at91_spi_write(ATMEL_PDC_RNCR, 0);
6543 + // TODO: If we are doing consecutive transfers (at high speed, or
6544 + // small buffers), then it might be worth modifying the 'Delay between
6545 + // Consecutive Transfers' in the CSR registers.
6546 + // This is an issue if we cannot chain the next buffer fast enough
6547 + // in the interrupt handler.
6549 + /* Enable transmitter and receiver */
6550 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTEN | ATMEL_PDC_TXTEN);
6552 + at91_spi_write(AT91_SPI_IER, AT91_SPI_ENDRX); /* enable buffer complete interrupt */
6553 + wait_for_completion(&transfer_complete);
6556 + printk("SPI transfer end\n");
6562 +/* ......................................................................... */
6565 + * Handle interrupts from the SPI controller.
6567 +static irqreturn_t at91spi_interrupt(int irq, void *dev_id)
6569 + unsigned int status;
6570 + struct spi_local *device = (struct spi_local *) &spi_dev[current_device];
6571 + struct spi_transfer_list *list = device->xfers;
6574 + printk("SPI interrupt %i\n", current_device);
6578 + panic("at91_spi: spi_interrupt with a NULL transfer list");
6580 + status = at91_spi_read(AT91_SPI_SR) & at91_spi_read(AT91_SPI_IMR); /* read status */
6582 + dma_unmap_single(NULL, device->tx, list->txlen[list->curr], DMA_TO_DEVICE);
6583 + dma_unmap_single(NULL, device->rx, list->rxlen[list->curr], DMA_FROM_DEVICE);
6585 + device->tx = device->txnext; /* move next transfer to current transfer */
6586 + device->rx = device->rxnext;
6588 + list->curr = list->curr + 1;
6589 + if (list->curr == list->nr_transfers) { /* all transfers complete */
6590 + at91_spi_write(AT91_SPI_IDR, AT91_SPI_ENDRX); /* disable interrupt */
6592 + /* Disable transmitter and receiver */
6593 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
6595 + device->xfers = NULL;
6596 + complete(&transfer_complete);
6598 + else if (list->curr+1 == list->nr_transfers) { /* no more next transfers */
6599 + device->txnext = 0;
6600 + device->rxnext = 0;
6601 + at91_spi_write(ATMEL_PDC_TNCR, 0);
6602 + at91_spi_write(ATMEL_PDC_RNCR, 0);
6605 + int i = (list->curr)+1;
6607 + /* If we are in 16-bit mode, we need to modify what we pass to the PDC */
6608 + int tx_size = (at91_spi_read(AT91_SPI_CSR(current_device)) & AT91_SPI_BITS_16) ? 2 : 1;
6610 + device->txnext = dma_map_single(NULL, list->tx[i], list->txlen[i], DMA_TO_DEVICE);
6611 + device->rxnext = dma_map_single(NULL, list->rx[i], list->rxlen[i], DMA_FROM_DEVICE);
6612 + at91_spi_write(ATMEL_PDC_TNPR, device->txnext);
6613 + at91_spi_write(ATMEL_PDC_RNPR, device->rxnext);
6614 + at91_spi_write(ATMEL_PDC_TNCR, list->txlen[i] / tx_size);
6615 + at91_spi_write(ATMEL_PDC_RNCR, list->rxlen[i] / tx_size);
6617 + return IRQ_HANDLED;
6620 +/* ......................................................................... */
6623 + * Initialize the SPI controller
6625 +static int __init at91spi_probe(struct platform_device *pdev)
6628 + unsigned long scbr;
6629 + struct resource *res;
6631 + init_MUTEX(&spi_lock);
6633 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6637 + if (!request_mem_region(res->start, res->end - res->start + 1, "at91_spi"))
6640 + spi_base = ioremap(res->start, res->end - res->start + 1);
6642 + release_mem_region(res->start, res->end - res->start + 1);
6646 + spi_clk = clk_get(NULL, "spi_clk");
6647 + if (IS_ERR(spi_clk)) {
6648 + printk(KERN_ERR "at91_spi: no clock defined\n");
6649 + iounmap(spi_base);
6650 + release_mem_region(res->start, res->end - res->start + 1);
6654 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SWRST); /* software reset of SPI controller */
6657 + * Calculate the correct SPI baud-rate divisor.
6659 + scbr = clk_get_rate(spi_clk) / (2 * DEFAULT_SPI_CLK);
6660 + scbr = scbr + 1; /* round up */
6662 + printk(KERN_INFO "at91_spi: Baud rate set to %ld\n", clk_get_rate(spi_clk) / (2 * scbr));
6664 + /* Set Chip Select registers to good defaults */
6665 + for (i = 0; i < 4; i++) {
6666 + at91_spi_write(AT91_SPI_CSR(i), AT91_SPI_CPOL | AT91_SPI_BITS_8 | (16 << 16) | (scbr << 8));
6669 + at91_spi_write(ATMEL_PDC_PTCR, ATMEL_PDC_RXTDIS | ATMEL_PDC_TXTDIS);
6671 + memset(&spi_dev, 0, sizeof(spi_dev));
6672 + spi_dev[0].pcs = 0xE;
6673 + spi_dev[1].pcs = 0xD;
6674 + spi_dev[2].pcs = 0xB;
6675 + spi_dev[3].pcs = 0x7;
6677 + if (request_irq(AT91RM9200_ID_SPI, at91spi_interrupt, 0, "spi", NULL)) {
6679 + iounmap(spi_base);
6680 + release_mem_region(res->start, res->end - res->start + 1);
6684 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIEN); /* Enable SPI */
6689 +static int __devexit at91spi_remove(struct platform_device *pdev)
6691 + struct resource *res;
6693 + at91_spi_write(AT91_SPI_CR, AT91_SPI_SPIDIS); /* Disable SPI */
6696 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
6697 + iounmap(spi_base);
6698 + release_mem_region(res->start, res->end - res->start + 1);
6700 + free_irq(AT91RM9200_ID_SPI, 0);
6704 +static struct platform_driver at91spi_driver = {
6705 + .probe = at91spi_probe,
6706 + .remove = __devexit_p(at91spi_remove),
6708 + .name = "at91_spi",
6709 + .owner = THIS_MODULE,
6713 +static int __init at91spi_init(void)
6715 + return platform_driver_register(&at91spi_driver);
6718 +static void __exit at91spi_exit(void)
6720 + platform_driver_unregister(&at91spi_driver);
6723 +EXPORT_SYMBOL(spi_access_bus);
6724 +EXPORT_SYMBOL(spi_release_bus);
6725 +EXPORT_SYMBOL(spi_transfer);
6727 +module_init(at91spi_init);
6728 +module_exit(at91spi_exit);
6730 +MODULE_LICENSE("GPL")
6731 +MODULE_AUTHOR("Andrew Victor")
6732 +MODULE_DESCRIPTION("SPI driver for Atmel AT91RM9200")
6733 diff -urN linux-2.6.22-rc5/drivers/char/at91_spidev.c linux-2.6.22-rc5.new/drivers/char/at91_spidev.c
6734 --- linux-2.6.22-rc5/drivers/char/at91_spidev.c 1970-01-01 01:00:00.000000000 +0100
6735 +++ linux-2.6.22-rc5.new/drivers/char/at91_spidev.c 2007-07-29 05:55:39.000000000 +0200
6738 + * User-space interface to the SPI bus on Atmel AT91RM9200
6740 + * Copyright (C) 2003 SAN People (Pty) Ltd
6742 + * Based on SPI driver by Rick Bronson
6744 + * This program is free software; you can redistribute it and/or
6745 + * modify it under the terms of the GNU General Public License
6746 + * as published by the Free Software Foundation; either version
6747 + * 2 of the License, or (at your option) any later version.
6750 +#include <linux/module.h>
6751 +#include <linux/init.h>
6752 +#include <linux/slab.h>
6753 +#include <linux/highmem.h>
6754 +#include <linux/pagemap.h>
6755 +#include <asm/arch/spi.h>
6757 +#ifdef CONFIG_DEVFS_FS
6758 +#include <linux/devfs_fs_kernel.h>
6762 +#undef DEBUG_SPIDEV
6764 +/* ......................................................................... */
6767 + * Read or Write to SPI bus.
6769 +static ssize_t spidev_rd_wr(struct file *file, char *buf, size_t count, loff_t *offset)
6771 + unsigned int spi_device = (unsigned int) file->private_data;
6773 + struct mm_struct * mm;
6774 + struct page ** maplist;
6775 + struct spi_transfer_list* list;
6778 + unsigned int ofs, pagelen;
6785 + list = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
6792 + pgcount = ((unsigned long)buf+count+PAGE_SIZE-1)/PAGE_SIZE - (unsigned long)buf/PAGE_SIZE;
6794 + if (pgcount >= MAX_SPI_TRANSFERS) {
6799 + maplist = kmalloc (pgcount * sizeof (struct page *), GFP_KERNEL);
6805 + flush_cache_all();
6806 + down_read(&mm->mmap_sem);
6807 + err= get_user_pages(current, mm, (unsigned long)buf, pgcount, 1, 0, maplist, NULL);
6808 + up_read(&mm->mmap_sem);
6817 +#ifdef DEBUG_SPIDEV
6818 + printk("spidev_rd_rw: %i %i\n", count, pgcount);
6821 + /* Set default return value = transfer length */
6825 + * At this point, the virtual area buf[0] .. buf[count-1] will have
6826 + * corresponding pages mapped in the physical memory and locked until
6827 + * we unmap the kiobuf. The pages cannot be swapped out or moved
6830 + ofs = (unsigned long) buf & (PAGE_SIZE -1);
6831 + pagelen = PAGE_SIZE - ofs;
6832 + if (count < pagelen)
6835 + for (i = 0; i < pgcount; i++) {
6836 + flush_dcache_page(maplist[i]);
6838 + list->tx[i] = list->rx[i] = page_address(maplist[i]) + ofs;
6839 + list->txlen[i] = list->rxlen[i] = pagelen;
6841 +#ifdef DEBUG_SPIDEV
6842 + printk(" %i: %x (%i)\n", i, list->tx[i], list->txlen[i]);
6845 + ofs = 0; /* all subsequent transfers start at beginning of a page */
6846 + count = count - pagelen;
6847 + pagelen = (count < PAGE_SIZE) ? count : PAGE_SIZE;
6849 + list->nr_transfers = pgcount;
6851 + /* Perform transfer on SPI bus */
6852 + spi_access_bus(spi_device);
6853 + spi_transfer(list);
6854 + spi_release_bus(spi_device);
6856 + while (pgcount--) {
6857 + page_cache_release (maplist[pgcount]);
6859 + flush_cache_all();
6867 +static int spidev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
6869 + int spi_device = MINOR(inode->i_rdev);
6871 + if (spi_device >= NR_SPI_DEVICES)
6874 + // TODO: This interface can be used to configure the SPI bus.
6875 + // Configurable options could include: Speed, Clock Polarity, Clock Phase
6879 + return -ENOIOCTLCMD;
6884 + * Open the SPI device
6886 +static int spidev_open(struct inode *inode, struct file *file)
6888 + unsigned int spi_device = MINOR(inode->i_rdev);
6890 + if (spi_device >= NR_SPI_DEVICES)
6894 + * 'private_data' is actually a pointer, but we overload it with the
6895 + * value we want to store.
6897 + file->private_data = (void *)spi_device;
6903 + * Close the SPI device
6905 +static int spidev_close(struct inode *inode, struct file *file)
6910 +/* ......................................................................... */
6912 +static struct file_operations spidev_fops = {
6913 + .owner = THIS_MODULE,
6914 + .llseek = no_llseek,
6915 + .read = spidev_rd_wr,
6916 + .write = (int (*) (struct file *file, const char *buf, size_t count, loff_t *offset))spidev_rd_wr,
6917 + .ioctl = spidev_ioctl,
6918 + .open = spidev_open,
6919 + .release = spidev_close,
6923 + * Install the SPI /dev interface driver
6925 +static int __init at91_spidev_init(void)
6927 +#ifdef CONFIG_DEVFS_FS
6931 + if (register_chrdev(SPI_MAJOR, "spi", &spidev_fops)) {
6932 + printk(KERN_ERR "at91_spidev: Unable to get major %d for SPI bus\n", SPI_MAJOR);
6936 +#ifdef CONFIG_DEVFS_FS
6937 + devfs_mk_dir("spi");
6938 + for (i = 0; i < NR_SPI_DEVICES; i++) {
6939 + devfs_mk_cdev(MKDEV(SPI_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, "spi/%d",i);
6942 + printk(KERN_INFO "AT91 SPI driver loaded\n");
6948 + * Remove the SPI /dev interface driver
6950 +static void __exit at91_spidev_exit(void)
6952 +#ifdef CONFIG_DEVFS_FS
6954 + for (i = 0; i < NR_SPI_DEVICES; i++) {
6955 + devfs_remove("spi/%d", i);
6958 + devfs_remove("spi");
6961 + if (unregister_chrdev(SPI_MAJOR, "spi")) {
6962 + printk(KERN_ERR "at91_spidev: Unable to release major %d for SPI bus\n", SPI_MAJOR);
6967 +module_init(at91_spidev_init);
6968 +module_exit(at91_spidev_exit);
6970 +MODULE_LICENSE("GPL")
6971 +MODULE_AUTHOR("Andrew Victor")
6972 +MODULE_DESCRIPTION("SPI /dev interface for Atmel AT91RM9200")
6973 diff -urN linux-2.6.22-rc5/drivers/char/Kconfig linux-2.6.22-rc5.new/drivers/char/Kconfig
6974 --- linux-2.6.22-rc5/drivers/char/Kconfig 2007-06-17 04:09:12.000000000 +0200
6975 +++ linux-2.6.22-rc5.new/drivers/char/Kconfig 2007-07-29 05:55:39.000000000 +0200
6976 @@ -1083,5 +1083,21 @@
6978 source "drivers/s390/char/Kconfig"
6981 + bool "SPI driver (legacy) for AT91RM9200 processors"
6982 + depends on ARCH_AT91RM9200
6985 + The SPI driver gives access to this serial bus on the AT91RM9200
6989 + bool "SPI device interface (legacy) for AT91RM9200 processors"
6990 + depends on ARCH_AT91RM9200 && AT91_SPI
6993 + The SPI driver gives user mode access to this serial
6994 + bus on the AT91RM9200 processor.
6998 diff -urN linux-2.6.22-rc5/drivers/char/Makefile linux-2.6.22-rc5.new/drivers/char/Makefile
6999 --- linux-2.6.22-rc5/drivers/char/Makefile 2007-06-17 04:09:12.000000000 +0200
7000 +++ linux-2.6.22-rc5.new/drivers/char/Makefile 2007-07-29 05:55:39.000000000 +0200
7002 obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
7003 obj-$(CONFIG_GPIO_TB0219) += tb0219.o
7004 obj-$(CONFIG_TELCLOCK) += tlclk.o
7005 +obj-$(CONFIG_AT91_SPI) += at91_spi.o
7006 +obj-$(CONFIG_AT91_SPIDEV) += at91_spidev.o
7008 obj-$(CONFIG_WATCHDOG) += watchdog/
7009 obj-$(CONFIG_MWAVE) += mwave/
7010 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/i2c-at91.c linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-at91.c
7011 --- linux-2.6.22-rc5/drivers/i2c/busses/i2c-at91.c 2007-06-17 04:09:12.000000000 +0200
7012 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-at91.c 2007-07-29 05:55:39.000000000 +0200
7014 #include <asm/arch/board.h>
7015 #include <asm/arch/cpu.h>
7017 -#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */
7019 +/* Clockrate is configurable - max 400 Kbits/sec */
7020 +static unsigned int clockrate = CONFIG_I2C_AT91_CLOCKRATE;
7021 +module_param(clockrate, uint, 0);
7022 +MODULE_PARM_DESC(clockrate, "The TWI clockrate");
7024 static struct clk *twi_clk;
7025 static void __iomem *twi_base;
7027 at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN); /* Set Master mode */
7029 /* Calcuate clock dividers */
7030 - cdiv = (clk_get_rate(twi_clk) / (2 * TWI_CLOCK)) - 3;
7031 + cdiv = (clk_get_rate(twi_clk) / (2 * clockrate)) - 3;
7032 cdiv = cdiv + 1; /* round up */
7034 while (cdiv > 255) {
7039 - if (cpu_is_at91rm9200()) { /* AT91RM9200 Errata #22 */
7041 - printk(KERN_ERR "AT91 I2C: Invalid TWI_CLOCK value!\n");
7044 + if (cpu_is_at91rm9200() && (ckdiv > 5)) { /* AT91RM9200 Errata #22 */
7045 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
7047 + } else if (ckdiv > 7) {
7048 + printk(KERN_ERR "AT91 I2C: Invalid TWI clockrate!\n");
7052 at91_twi_write(AT91_TWI_CWGR, (ckdiv << 16) | (cdiv << 8) | cdiv);
7053 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/i2c-pca.c linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-pca.c
7054 --- linux-2.6.22-rc5/drivers/i2c/busses/i2c-pca.c 1970-01-01 01:00:00.000000000 +0100
7055 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/i2c-pca.c 2007-07-29 05:55:39.000000000 +0200
7058 + * Platform driver for PCA9564 I2C bus controller.
7060 + * (C) 2006 Andrew Victor
7062 + * Based on i2c-pca-isa.c driver for PCA9564 on ISA boards
7063 + * Copyright (C) 2004 Arcom Control Systems
7065 + * This program is free software; you can redistribute it and/or modify
7066 + * it under the terms of the GNU General Public License as published by
7067 + * the Free Software Foundation; either version 2 of the License, or
7068 + * (at your option) any later version.
7070 + * This program is distributed in the hope that it will be useful,
7071 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7072 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7073 + * GNU General Public License for more details.
7075 + * You should have received a copy of the GNU General Public License
7076 + * along with this program; if not, write to the Free Software
7077 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7080 +#include <linux/kernel.h>
7081 +#include <linux/module.h>
7082 +#include <linux/moduleparam.h>
7083 +#include <linux/delay.h>
7084 +#include <linux/init.h>
7085 +#include <linux/interrupt.h>
7086 +#include <linux/wait.h>
7087 +#include <linux/platform_device.h>
7089 +#include <linux/i2c.h>
7090 +#include <linux/i2c-algo-pca.h>
7092 +#include <asm/io.h>
7094 +#include "../algos/i2c-algo-pca.h"
7096 +#define PCA_OWN_ADDRESS 0x55 /* our address for slave mode */
7097 +#define PCA_CLOCK I2C_PCA_CON_59kHz
7099 +//#define REG_SHIFT 2
7100 +#define REG_SHIFT 0
7104 +#define PCA_IO_SIZE 4
7106 +static void __iomem *base_addr;
7108 +static wait_queue_head_t pca_wait;
7110 +static int pca_getown(struct i2c_algo_pca_data *adap)
7112 + return PCA_OWN_ADDRESS;
7115 +static int pca_getclock(struct i2c_algo_pca_data *adap)
7120 +static void pca_writebyte(struct i2c_algo_pca_data *adap, int reg, int val)
7123 + static char *names[] = { "T/O", "DAT", "ADR", "CON" };
7124 + printk("*** write %s at %#lx <= %#04x\n", names[reg], (unsigned long) base_addr+reg, val);
7127 + outb(val, base_addr + (reg << REG_SHIFT));
7130 +static int pca_readbyte(struct i2c_algo_pca_data *adap, int reg)
7135 + res = inb(base_addr + (reg << REG_SHIFT));
7138 + static char *names[] = { "STA", "DAT", "ADR", "CON" };
7139 + printk("*** read %s => %#04x\n", names[reg], res);
7145 +static int pca_waitforinterrupt(struct i2c_algo_pca_data *adap)
7150 + ret = wait_event_interruptible(pca_wait,
7151 + pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI);
7153 + while ((pca_readbyte(adap, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
7159 +static irqreturn_t pca_handler(int this_irq, void *dev_id)
7161 + wake_up_interruptible(&pca_wait);
7162 + return IRQ_HANDLED;
7165 +static struct i2c_algo_pca_data pca_i2c_data = {
7166 + .get_own = pca_getown,
7167 + .get_clock = pca_getclock,
7168 + .write_byte = pca_writebyte,
7169 + .read_byte = pca_readbyte,
7170 + .wait_for_interrupt = pca_waitforinterrupt,
7173 +static struct i2c_adapter pca_i2c_ops = {
7174 + .owner = THIS_MODULE,
7175 + .id = I2C_HW_A_PLAT,
7176 + .algo_data = &pca_i2c_data,
7177 + .name = "PCA9564",
7178 + .class = I2C_CLASS_HWMON,
7181 +static int __devinit pca_i2c_probe(struct platform_device *pdev)
7183 + struct resource *res;
7185 + init_waitqueue_head(&pca_wait);
7187 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7191 + if (!request_mem_region(res->start, PCA_IO_SIZE, "PCA9564"))
7194 + base_addr = ioremap(res->start, PCA_IO_SIZE);
7195 + if (base_addr == NULL)
7198 + irq = platform_get_irq(pdev, 0);
7200 + if (request_irq(irq, pca_handler, 0, "pca9564", NULL) < 0) {
7201 + printk(KERN_ERR "i2c-pca: Request irq%d failed\n", irq);
7206 + /* set up the driverfs linkage to our parent device */
7207 + pca_i2c_ops.dev.parent = &pdev->dev;
7209 + if (i2c_pca_add_bus(&pca_i2c_ops) < 0) {
7210 + printk(KERN_ERR "i2c-pca: Failed to add i2c bus\n");
7218 + free_irq(irq, &pca_i2c_ops);
7221 + iounmap(base_addr);
7224 + release_mem_region(res->start, PCA_IO_SIZE);
7228 +static int __devexit pca_i2c_remove(struct platform_device *pdev)
7230 + struct resource *res;
7232 + i2c_del_adapter(&pca_i2c_ops);
7235 + free_irq(irq, NULL);
7237 + iounmap(base_addr);
7239 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7240 + release_mem_region(res->start, PCA_IO_SIZE);
7245 +static struct platform_driver pca_i2c_driver = {
7246 + .probe = pca_i2c_probe,
7247 + .remove = __devexit_p(pca_i2c_remove),
7249 + .name = "pca9564",
7250 + .owner = THIS_MODULE,
7254 +static int __init pca_i2c_init(void)
7256 + return platform_driver_register(&pca_i2c_driver);
7259 +static void __exit pca_i2c_exit(void)
7261 + platform_driver_unregister(&pca_i2c_driver);
7264 +module_init(pca_i2c_init);
7265 +module_exit(pca_i2c_exit);
7267 +MODULE_AUTHOR("Andrew Victor");
7268 +MODULE_DESCRIPTION("PCA9564 platform driver");
7269 +MODULE_LICENSE("GPL");
7270 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/Kconfig linux-2.6.22-rc5.new/drivers/i2c/busses/Kconfig
7271 --- linux-2.6.22-rc5/drivers/i2c/busses/Kconfig 2007-06-17 04:09:12.000000000 +0200
7272 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/Kconfig 2007-07-29 05:55:39.000000000 +0200
7274 This supports the use of the I2C interface on Atmel AT91
7277 +config I2C_AT91_CLOCKRATE
7278 + prompt "Atmel AT91 I2C/TWI clock-rate"
7279 + depends on I2C_AT91
7283 + Set the AT91 I2C/TWI clock-rate.
7286 tristate "Au1550/Au1200 SMBus interface"
7287 depends on SOC_AU1550 || SOC_AU1200
7288 @@ -598,6 +606,14 @@
7289 This driver can also be built as a module. If so, the module
7290 will be called i2c-voodoo3.
7293 + tristate "PCA9564"
7295 + select I2C_ALGOPCA
7297 + This driver support the Philips PCA 9564 Parallel bus to I2C
7301 tristate "PCA9564 on an ISA bus"
7303 diff -urN linux-2.6.22-rc5/drivers/i2c/busses/Makefile linux-2.6.22-rc5.new/drivers/i2c/busses/Makefile
7304 --- linux-2.6.22-rc5/drivers/i2c/busses/Makefile 2007-06-17 04:09:12.000000000 +0200
7305 +++ linux-2.6.22-rc5.new/drivers/i2c/busses/Makefile 2007-07-29 05:55:39.000000000 +0200
7307 obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o
7308 obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o
7309 obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o
7310 +obj-$(CONFIG_I2C_PCA) += i2c-pca.o
7311 obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o
7312 obj-$(CONFIG_I2C_PIIX4) += i2c-piix4.o
7313 obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
7314 diff -urN linux-2.6.22-rc5/drivers/leds/Kconfig linux-2.6.22-rc5.new/drivers/leds/Kconfig
7315 --- linux-2.6.22-rc5/drivers/leds/Kconfig 2007-06-17 04:09:12.000000000 +0200
7316 +++ linux-2.6.22-rc5.new/drivers/leds/Kconfig 2007-07-29 05:55:39.000000000 +0200
7318 This option enables support for the Soekris net4801 and net4826 error
7322 + tristate "LED support using AT91 GPIOs"
7323 + depends on LEDS_CLASS && ARCH_AT91 && !LEDS
7325 + This option enables support for LEDs connected to GPIO lines
7326 + on AT91-based boards.
7329 tristate "LED Support for the WRAP series LEDs"
7330 depends on LEDS_CLASS && SCx200_GPIO
7331 diff -urN linux-2.6.22-rc5/drivers/leds/leds-at91.c linux-2.6.22-rc5.new/drivers/leds/leds-at91.c
7332 --- linux-2.6.22-rc5/drivers/leds/leds-at91.c 1970-01-01 01:00:00.000000000 +0100
7333 +++ linux-2.6.22-rc5.new/drivers/leds/leds-at91.c 2007-07-29 05:55:39.000000000 +0200
7336 + * AT91 GPIO based LED driver
7338 + * Copyright (C) 2006 David Brownell
7340 + * This program is free software; you can redistribute it and/or modify
7341 + * it under the terms of the GNU General Public License version 2 as
7342 + * published by the Free Software Foundation.
7345 +#include <linux/kernel.h>
7346 +#include <linux/init.h>
7347 +#include <linux/platform_device.h>
7348 +#include <linux/leds.h>
7350 +#include <asm/arch/board.h>
7351 +#include <asm/arch/gpio.h>
7353 +static LIST_HEAD(at91_led_list); /* list of AT91 LEDs */
7356 + struct led_classdev cdev;
7357 + struct list_head list;
7358 + struct at91_gpio_led *led_data;
7362 + * Change the state of the LED.
7364 +static void at91_led_set(struct led_classdev *cdev, enum led_brightness value)
7366 + struct at91_led *led = container_of(cdev, struct at91_led, cdev);
7367 + short active = (value == LED_OFF);
7369 + if (led->led_data->flags & 1) /* active high/low? */
7371 + at91_set_gpio_value(led->led_data->gpio, active);
7374 +static int __devexit at91_led_remove(struct platform_device *pdev)
7376 + struct at91_led *led;
7378 + list_for_each_entry (led, &at91_led_list, list)
7379 + led_classdev_unregister(&led->cdev);
7381 +#warning "Free allocated memory"
7382 + // TODO: Free memory. kfree(led);
7387 +static int __init at91_led_probe(struct platform_device *pdev)
7390 + struct at91_gpio_led *pdata = pdev->dev.platform_data;
7392 + struct at91_led *led;
7397 + nr_leds = pdata->index; /* first index stores number of LEDs */
7399 + while (nr_leds--) {
7400 + led = kzalloc(sizeof(struct at91_led), GFP_KERNEL);
7402 + dev_err(&pdev->dev, "No memory for device\n");
7406 + led->led_data = pdata;
7407 + led->cdev.name = pdata->name;
7408 + led->cdev.brightness_set = at91_led_set,
7409 + led->cdev.default_trigger = pdata->trigger;
7411 + status = led_classdev_register(&pdev->dev, &led->cdev);
7413 + dev_err(&pdev->dev, "led_classdev_register failed - %d\n", status);
7415 + at91_led_remove(pdev);
7418 + list_add(&led->list, &at91_led_list);
7425 +static int at91_led_suspend(struct platform_device *dev, pm_message_t state)
7427 + struct at91_led *led;
7429 + list_for_each_entry (led, &at91_led_list, list)
7430 + led_classdev_suspend(&led->cdev);
7435 +static int at91_led_resume(struct platform_device *dev)
7437 + struct at91_led *led;
7439 + list_for_each_entry (led, &at91_led_list, list)
7440 + led_classdev_resume(&led->cdev);
7445 +#define at91_led_suspend NULL
7446 +#define at91_led_resume NULL
7449 +static struct platform_driver at91_led_driver = {
7450 + .probe = at91_led_probe,
7451 + .remove = __devexit_p(at91_led_remove),
7452 + .suspend = at91_led_suspend,
7453 + .resume = at91_led_resume,
7455 + .name = "at91_leds",
7456 + .owner = THIS_MODULE,
7460 +static int __init at91_led_init(void)
7462 + return platform_driver_register(&at91_led_driver);
7464 +module_init(at91_led_init);
7466 +static void __exit at91_led_exit(void)
7468 + platform_driver_unregister(&at91_led_driver);
7470 +module_exit(at91_led_exit);
7472 +MODULE_DESCRIPTION("AT91 GPIO LED driver");
7473 +MODULE_AUTHOR("David Brownell");
7474 +MODULE_LICENSE("GPL");
7475 diff -urN linux-2.6.22-rc5/drivers/leds/Makefile linux-2.6.22-rc5.new/drivers/leds/Makefile
7476 --- linux-2.6.22-rc5/drivers/leds/Makefile 2007-06-17 04:09:12.000000000 +0200
7477 +++ linux-2.6.22-rc5.new/drivers/leds/Makefile 2007-07-29 05:55:39.000000000 +0200
7479 obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
7480 obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
7481 obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
7482 +obj-$(CONFIG_LEDS_AT91) += leds-at91.o
7485 obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
7486 diff -urN linux-2.6.22-rc5/drivers/mmc/host/at91_mci.c linux-2.6.22-rc5.new/drivers/mmc/host/at91_mci.c
7487 --- linux-2.6.22-rc5/drivers/mmc/host/at91_mci.c 2007-06-17 04:09:12.000000000 +0200
7488 +++ linux-2.6.22-rc5.new/drivers/mmc/host/at91_mci.c 2007-07-29 05:57:56.000000000 +0200
7491 #define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \
7492 | AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \
7493 - | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)
7494 + | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)
7496 #define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg))
7497 #define at91_mci_write(host, reg, val) __raw_writel((val), (host)->baseaddr + (reg))
7499 pr_debug("Status = %08X [%08X %08X %08X %08X]\n",
7500 status, cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]);
7502 - if (status & (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE |
7503 - AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE |
7504 - AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)) {
7505 + if (status & AT91_MCI_ERRORS) {
7506 if ((status & AT91_MCI_RCRCE) && !(mmc_resp_type(cmd) & MMC_RSP_CRC)) {
7507 cmd->error = MMC_ERR_NONE;
7509 @@ -663,15 +661,15 @@
7511 int_status = at91_mci_read(host, AT91_MCI_SR);
7512 int_mask = at91_mci_read(host, AT91_MCI_IMR);
7515 pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask,
7516 int_status & int_mask);
7519 int_status = int_status & int_mask;
7521 if (int_status & AT91_MCI_ERRORS) {
7525 if (int_status & AT91_MCI_UNRE)
7526 pr_debug("MMC: Underrun error\n");
7527 if (int_status & AT91_MCI_OVRE)
7529 mmc->f_min = 375000;
7530 mmc->f_max = 25000000;
7531 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
7532 - mmc->caps = MMC_CAP_BYTEBLOCK;
7533 + mmc->caps = MMC_CAP_BYTEBLOCK | MMC_CAP_MULTIWRITE;
7535 mmc->max_blk_size = 4095;
7536 mmc->max_blk_count = mmc->max_req_size;
7541 + device_init_wakeup(&pdev->dev, 1);
7544 * monitor card insertion/removal if we can
7548 host = mmc_priv(mmc);
7550 + device_init_wakeup(&pdev->dev, 0);
7552 if (host->present != -1) {
7553 free_irq(host->board->det_pin, host);
7554 cancel_delayed_work(&host->mmc->detect);
7555 @@ -949,8 +951,12 @@
7556 static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
7558 struct mmc_host *mmc = platform_get_drvdata(pdev);
7559 + struct at91mci_host *host = mmc_priv(mmc);
7562 + if (device_may_wakeup(&pdev->dev))
7563 + enable_irq_wake(host->board->det_pin);
7566 ret = mmc_suspend_host(mmc, state);
7568 @@ -960,8 +966,12 @@
7569 static int at91_mci_resume(struct platform_device *pdev)
7571 struct mmc_host *mmc = platform_get_drvdata(pdev);
7572 + struct at91mci_host *host = mmc_priv(mmc);
7575 + if (device_may_wakeup(&pdev->dev))
7576 + disable_irq_wake(host->board->det_pin);
7579 ret = mmc_resume_host(mmc);
7581 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/at91_dataflash.c linux-2.6.22-rc5.new/drivers/mtd/devices/at91_dataflash.c
7582 --- linux-2.6.22-rc5/drivers/mtd/devices/at91_dataflash.c 1970-01-01 01:00:00.000000000 +0100
7583 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/at91_dataflash.c 2007-07-29 05:55:39.000000000 +0200
7586 + * Atmel DataFlash driver for Atmel AT91RM9200 (Thunder)
7588 + * Copyright (C) SAN People (Pty) Ltd
7590 + * This program is free software; you can redistribute it and/or
7591 + * modify it under the terms of the GNU General Public License
7592 + * as published by the Free Software Foundation; either version
7593 + * 2 of the License, or (at your option) any later version.
7596 +#include <linux/module.h>
7597 +#include <linux/init.h>
7598 +#include <linux/slab.h>
7599 +#include <linux/pci.h>
7600 +#include <linux/mtd/mtd.h>
7601 +#include <linux/mtd/partitions.h>
7603 +#include <asm/arch/spi.h>
7605 +#undef DEBUG_DATAFLASH
7607 +#define DATAFLASH_MAX_DEVICES 4 /* max number of dataflash devices */
7608 +#undef DATAFLASH_ALWAYS_ADD_DEVICE /* always add whole device when using partitions? */
7610 +#define OP_READ_CONTINUOUS 0xE8
7611 +#define OP_READ_PAGE 0xD2
7612 +#define OP_READ_BUFFER1 0xD4
7613 +#define OP_READ_BUFFER2 0xD6
7614 +#define OP_READ_STATUS 0xD7
7616 +#define OP_ERASE_PAGE 0x81
7617 +#define OP_ERASE_BLOCK 0x50
7619 +#define OP_TRANSFER_BUF1 0x53
7620 +#define OP_TRANSFER_BUF2 0x55
7621 +#define OP_COMPARE_BUF1 0x60
7622 +#define OP_COMPARE_BUF2 0x61
7624 +#define OP_PROGRAM_VIA_BUF1 0x82
7625 +#define OP_PROGRAM_VIA_BUF2 0x85
7627 +struct dataflash_local
7629 + int spi; /* SPI chip-select number */
7631 + unsigned int page_size; /* number of bytes per page */
7632 + unsigned short page_offset; /* page offset in flash address */
7636 +/* Detected DataFlash devices */
7637 +static struct mtd_info* mtd_devices[DATAFLASH_MAX_DEVICES];
7638 +static int nr_devices = 0;
7640 +/* ......................................................................... */
7642 +#ifdef CONFIG_MTD_PARTITIONS
7644 +static struct mtd_partition static_partitions_2M[] =
7647 + .name = "bootloader",
7649 + .size = 1 * 32 * 8 * 528, /* 1st sector = 32 blocks * 8 pages * 528 bytes */
7650 + .mask_flags = MTD_WRITEABLE, /* read-only */
7654 + .offset = MTDPART_OFS_NXTBLK,
7655 + .size = 6 * 32 * 8 * 528, /* 6 sectors */
7658 + .name = "filesystem",
7659 + .offset = MTDPART_OFS_NXTBLK,
7660 + .size = MTDPART_SIZ_FULL, /* rest = 9 sectors */
7664 +static struct mtd_partition static_partitions_4M[] =
7667 + .name = "bootloader",
7669 + .size = 1 * 64 * 8 * 528, /* 1st sector = 64 blocks * 8 pages * 528 bytes */
7670 + .mask_flags = MTD_WRITEABLE, /* read-only */
7674 + .offset = MTDPART_OFS_NXTBLK,
7675 + .size = 4 * 64 * 8 * 528, /* 4 sectors */
7678 + .name = "filesystem",
7679 + .offset = MTDPART_OFS_NXTBLK,
7680 + .size = MTDPART_SIZ_FULL, /* rest = 11 sectors */
7684 +#if defined(CONFIG_MACH_KAFA)
7685 +static struct mtd_partition static_partitions_8M[] =
7690 + size: 16 * 1056, /* 160 Kb */
7691 + mask_flags: MTD_WRITEABLE, /* read-only */
7695 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7696 + size: 128 * 1056, /* 1 MB */
7700 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7701 + size: 1024 * 1056, /* 1 MB */
7704 + name: "filesystem",
7705 + offset: MTDPART_OFS_APPEND, /* Sperry, NXTBLK is broken */
7706 + size: MTDPART_SIZ_FULL,
7710 +#elif defined(CONFIG_MACH_MULTMDP)
7712 +static struct mtd_partition static_partitions_8M[] =
7715 + .name = "bootloader",
7717 + .size = 12 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7718 + .mask_flags = MTD_WRITEABLE, /* read-only */
7721 + .name = "configuration",
7722 + .offset = MTDPART_OFS_NXTBLK,
7723 + .size = 20 * 1056,
7727 + .offset = MTDPART_OFS_NXTBLK,
7728 + .size = 1520 * 1056,
7731 + .name = "filesystem",
7732 + .offset = MTDPART_OFS_NXTBLK,
7733 + .size = MTDPART_SIZ_FULL,
7739 +static struct mtd_partition static_partitions_8M[] =
7742 + .name = "bootloader",
7744 + .size = 1 * 32 * 8 * 1056, /* 1st sector = 32 blocks * 8 pages * 1056 bytes */
7745 + .mask_flags = MTD_WRITEABLE, /* read-only */
7749 + .offset = MTDPART_OFS_NXTBLK,
7750 + .size = 5 * 32 * 8 * 1056, /* 5 sectors */
7753 + .name = "filesystem",
7754 + .offset = MTDPART_OFS_NXTBLK,
7755 + .size = MTDPART_SIZ_FULL, /* rest = 26 sectors */
7760 +static const char *part_probes[] = { "cmdlinepart", NULL, };
7764 +/* ......................................................................... */
7766 +/* Allocate a single SPI transfer descriptor. We're assuming that if multiple
7767 + SPI transfers occur at the same time, spi_access_bus() will serialize them.
7768 + If this is not valid, then either (i) each dataflash 'priv' structure
7769 + needs it's own transfer descriptor, (ii) we lock this one, or (iii) use
7770 + another mechanism. */
7771 +static struct spi_transfer_list* spi_transfer_desc;
7774 + * Perform a SPI transfer to access the DataFlash device.
7776 +static int do_spi_transfer(int nr, char* tx, int tx_len, char* rx, int rx_len,
7777 + char* txnext, int txnext_len, char* rxnext, int rxnext_len)
7779 + struct spi_transfer_list* list = spi_transfer_desc;
7781 + list->tx[0] = tx; list->txlen[0] = tx_len;
7782 + list->rx[0] = rx; list->rxlen[0] = rx_len;
7784 + list->tx[1] = txnext; list->txlen[1] = txnext_len;
7785 + list->rx[1] = rxnext; list->rxlen[1] = rxnext_len;
7787 + list->nr_transfers = nr;
7789 + return spi_transfer(list);
7792 +/* ......................................................................... */
7795 + * Poll the DataFlash device until it is READY.
7797 +static void at91_dataflash_waitready(void)
7799 + char* command = kmalloc(2, GFP_KERNEL);
7805 + command[0] = OP_READ_STATUS;
7808 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7809 + } while ((command[1] & 0x80) == 0);
7815 + * Return the status of the DataFlash device.
7817 +static unsigned short at91_dataflash_status(void)
7819 + unsigned short status;
7820 + char* command = kmalloc(2, GFP_KERNEL);
7825 + command[0] = OP_READ_STATUS;
7828 + do_spi_transfer(1, command, 2, command, 2, NULL, 0, NULL, 0);
7829 + status = command[1];
7835 +/* ......................................................................... */
7838 + * Erase blocks of flash.
7840 +static int at91_dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
7842 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7843 + unsigned int pageaddr;
7846 +#ifdef DEBUG_DATAFLASH
7847 + printk("dataflash_erase: addr=%i len=%i\n", instr->addr, instr->len);
7850 + /* Sanity checks */
7851 + if (instr->addr + instr->len > mtd->size)
7853 + if ((instr->len % mtd->erasesize != 0) || (instr->len % priv->page_size != 0))
7855 + if ((instr->addr % priv->page_size) != 0)
7858 + command = kmalloc(4, GFP_KERNEL);
7862 + while (instr->len > 0) {
7863 + /* Calculate flash page address */
7864 + pageaddr = (instr->addr / priv->page_size) << priv->page_offset;
7866 + command[0] = OP_ERASE_PAGE;
7867 + command[1] = (pageaddr & 0x00FF0000) >> 16;
7868 + command[2] = (pageaddr & 0x0000FF00) >> 8;
7870 +#ifdef DEBUG_DATAFLASH
7871 + printk("ERASE: (%x) %x %x %x [%i]\n", command[0], command[1], command[2], command[3], pageaddr);
7874 + /* Send command to SPI device */
7875 + spi_access_bus(priv->spi);
7876 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
7878 + at91_dataflash_waitready(); /* poll status until ready */
7879 + spi_release_bus(priv->spi);
7881 + instr->addr += priv->page_size; /* next page */
7882 + instr->len -= priv->page_size;
7887 + /* Inform MTD subsystem that erase is complete */
7888 + instr->state = MTD_ERASE_DONE;
7889 + if (instr->callback)
7890 + instr->callback(instr);
7896 + * Read from the DataFlash device.
7897 + * from : Start offset in flash device
7898 + * len : Amount to read
7899 + * retlen : About of data actually read
7900 + * buf : Buffer containing the data
7902 +static int at91_dataflash_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
7904 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7905 + unsigned int addr;
7908 +#ifdef DEBUG_DATAFLASH
7909 + printk("dataflash_read: %lli .. %lli\n", from, from+len);
7914 + /* Sanity checks */
7917 + if (from + len > mtd->size)
7920 + /* Calculate flash page/byte address */
7921 + addr = (((unsigned)from / priv->page_size) << priv->page_offset) + ((unsigned)from % priv->page_size);
7923 + command = kmalloc(8, GFP_KERNEL);
7927 + command[0] = OP_READ_CONTINUOUS;
7928 + command[1] = (addr & 0x00FF0000) >> 16;
7929 + command[2] = (addr & 0x0000FF00) >> 8;
7930 + command[3] = (addr & 0x000000FF);
7931 +#ifdef DEBUG_DATAFLASH
7932 + printk("READ: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
7935 + /* Send command to SPI device */
7936 + spi_access_bus(priv->spi);
7937 + do_spi_transfer(2, command, 8, command, 8, buf, len, buf, len);
7938 + spi_release_bus(priv->spi);
7946 + * Write to the DataFlash device.
7947 + * to : Start offset in flash device
7948 + * len : Amount to write
7949 + * retlen : Amount of data actually written
7950 + * buf : Buffer containing the data
7952 +static int at91_dataflash_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
7954 + struct dataflash_local *priv = (struct dataflash_local *) mtd->priv;
7955 + unsigned int pageaddr, addr, offset, writelen;
7958 + unsigned short status;
7961 + char* tmpbuf = NULL;
7963 +#ifdef DEBUG_DATAFLASH
7964 + printk("dataflash_write: %lli .. %lli\n", to, to+len);
7969 + /* Sanity checks */
7972 + if (to + len > mtd->size)
7975 + command = kmalloc(4, GFP_KERNEL);
7979 + pageaddr = ((unsigned)to / priv->page_size);
7980 + offset = ((unsigned)to % priv->page_size);
7981 + if (offset + len > priv->page_size)
7982 + writelen = priv->page_size - offset;
7985 + writebuf = (u_char *)buf;
7988 + /* Allocate temporary buffer */
7989 + tmpbuf = kmalloc(priv->page_size, GFP_KERNEL);
7995 + /* Gain access to the SPI bus */
7996 + spi_access_bus(priv->spi);
7998 + while (remaining > 0) {
7999 +#ifdef DEBUG_DATAFLASH
8000 + printk("write @ %i:%i len=%i\n", pageaddr, offset, writelen);
8003 + /* (1) Transfer to Buffer1 */
8004 + if (writelen != priv->page_size) {
8005 + addr = pageaddr << priv->page_offset;
8006 + command[0] = OP_TRANSFER_BUF1;
8007 + command[1] = (addr & 0x00FF0000) >> 16;
8008 + command[2] = (addr & 0x0000FF00) >> 8;
8010 +#ifdef DEBUG_DATAFLASH
8011 + printk("TRANSFER: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8013 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8014 + at91_dataflash_waitready();
8017 + /* (2) Program via Buffer1 */
8018 + addr = (pageaddr << priv->page_offset) + offset;
8019 + command[0] = OP_PROGRAM_VIA_BUF1;
8020 + command[1] = (addr & 0x00FF0000) >> 16;
8021 + command[2] = (addr & 0x0000FF00) >> 8;
8022 + command[3] = (addr & 0x000000FF);
8023 +#ifdef DEBUG_DATAFLASH
8024 + printk("PROGRAM: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8026 + do_spi_transfer(2, command, 4, command, 4, writebuf, writelen, tmpbuf, writelen);
8027 + at91_dataflash_waitready();
8029 + /* (3) Compare to Buffer1 */
8030 + addr = pageaddr << priv->page_offset;
8031 + command[0] = OP_COMPARE_BUF1;
8032 + command[1] = (addr & 0x00FF0000) >> 16;
8033 + command[2] = (addr & 0x0000FF00) >> 8;
8035 +#ifdef DEBUG_DATAFLASH
8036 + printk("COMPARE: (%x) %x %x %x\n", command[0], command[1], command[2], command[3]);
8038 + do_spi_transfer(1, command, 4, command, 4, NULL, 0, NULL, 0);
8039 + at91_dataflash_waitready();
8041 + /* Get result of the compare operation */
8042 + status = at91_dataflash_status();
8043 + if ((status & 0x40) == 1) {
8044 + printk("at91_dataflash: Write error on page %i\n", pageaddr);
8049 + remaining = remaining - writelen;
8052 + writebuf += writelen;
8053 + *retlen += writelen;
8055 + if (remaining > priv->page_size)
8056 + writelen = priv->page_size;
8058 + writelen = remaining;
8061 + /* Release SPI bus */
8062 + spi_release_bus(priv->spi);
8069 +/* ......................................................................... */
8072 + * Initialize and register DataFlash device with MTD subsystem.
8074 +static int __init add_dataflash(int channel, char *name, int IDsize,
8075 + int nr_pages, int pagesize, int pageoffset)
8077 + struct mtd_info *device;
8078 + struct dataflash_local *priv;
8079 +#ifdef CONFIG_MTD_PARTITIONS
8080 + struct mtd_partition *mtd_parts = 0;
8081 + int mtd_parts_nr = 0;
8084 + if (nr_devices >= DATAFLASH_MAX_DEVICES) {
8085 + printk(KERN_ERR "at91_dataflash: Too many devices detected\n");
8089 + device = kmalloc(sizeof(struct mtd_info) + strlen(name) + 8, GFP_KERNEL);
8092 + memset(device, 0, sizeof(struct mtd_info));
8094 + device->name = (char *)&device[1];
8095 + sprintf(device->name, "%s.spi%d", name, channel);
8096 + device->size = nr_pages * pagesize;
8097 + device->erasesize = pagesize;
8098 + device->writesize = pagesize;
8099 + device->owner = THIS_MODULE;
8100 + device->type = MTD_DATAFLASH;
8101 + device->flags = MTD_WRITEABLE;
8102 + device->erase = at91_dataflash_erase;
8103 + device->read = at91_dataflash_read;
8104 + device->write = at91_dataflash_write;
8106 + priv = (struct dataflash_local *) kmalloc(sizeof(struct dataflash_local), GFP_KERNEL);
8111 + memset(priv, 0, sizeof(struct dataflash_local));
8113 + priv->spi = channel;
8114 + priv->page_size = pagesize;
8115 + priv->page_offset = pageoffset;
8116 + device->priv = priv;
8118 + mtd_devices[nr_devices] = device;
8120 + printk("at91_dataflash: %s detected [spi%i] (%i bytes)\n", name, channel, device->size);
8122 +#ifdef CONFIG_MTD_PARTITIONS
8123 +#ifdef CONFIG_MTD_CMDLINE_PARTS
8124 + mtd_parts_nr = parse_mtd_partitions(device, part_probes, &mtd_parts, 0);
8126 + if (mtd_parts_nr <= 0) {
8129 + mtd_parts = static_partitions_2M;
8130 + mtd_parts_nr = ARRAY_SIZE(static_partitions_2M);
8133 + mtd_parts = static_partitions_4M;
8134 + mtd_parts_nr = ARRAY_SIZE(static_partitions_4M);
8137 + mtd_parts = static_partitions_8M;
8138 + mtd_parts_nr = ARRAY_SIZE(static_partitions_8M);
8143 + if (mtd_parts_nr > 0) {
8144 +#ifdef DATAFLASH_ALWAYS_ADD_DEVICE
8145 + add_mtd_device(device);
8147 + return add_mtd_partitions(device, mtd_parts, mtd_parts_nr);
8150 + return add_mtd_device(device); /* add whole device */
8154 + * Detect and initialize DataFlash device connected to specified SPI channel.
8156 + * Device Density ID code Nr Pages Page Size Page offset
8157 + * AT45DB011B 1Mbit (128K) xx0011xx (0x0c) 512 264 9
8158 + * AT45DB021B 2Mbit (256K) xx0101xx (0x14) 1025 264 9
8159 + * AT45DB041B 4Mbit (512K) xx0111xx (0x1c) 2048 264 9
8160 + * AT45DB081B 8Mbit (1M) xx1001xx (0x24) 4096 264 9
8161 + * AT45DB0161B 16Mbit (2M) xx1011xx (0x2c) 4096 528 10
8162 + * AT45DB0321B 32Mbit (4M) xx1101xx (0x34) 8192 528 10
8163 + * AT45DB0642 64Mbit (8M) xx1111xx (0x3c) 8192 1056 11
8164 + * AT45DB1282 128Mbit (16M) xx0100xx (0x10) 16384 1056 11
8166 +static int __init at91_dataflash_detect(int channel)
8169 + unsigned short status;
8171 + spi_access_bus(channel);
8172 + status = at91_dataflash_status();
8173 + spi_release_bus(channel);
8174 + if (status != 0xff) { /* no dataflash device there */
8175 + switch (status & 0x3c) {
8176 + case 0x0c: /* 0 0 1 1 */
8177 + res = add_dataflash(channel, "AT45DB011B", SZ_128K, 512, 264, 9);
8179 + case 0x14: /* 0 1 0 1 */
8180 + res = add_dataflash(channel, "AT45DB021B", SZ_256K, 1025, 264, 9);
8182 + case 0x1c: /* 0 1 1 1 */
8183 + res = add_dataflash(channel, "AT45DB041B", SZ_512K, 2048, 264, 9);
8185 + case 0x24: /* 1 0 0 1 */
8186 + res = add_dataflash(channel, "AT45DB081B", SZ_1M, 4096, 264, 9);
8188 + case 0x2c: /* 1 0 1 1 */
8189 + res = add_dataflash(channel, "AT45DB161B", SZ_2M, 4096, 528, 10);
8191 + case 0x34: /* 1 1 0 1 */
8192 + res = add_dataflash(channel, "AT45DB321B", SZ_4M, 8192, 528, 10);
8194 + case 0x3c: /* 1 1 1 1 */
8195 + res = add_dataflash(channel, "AT45DB642", SZ_8M, 8192, 1056, 11);
8197 +// Currently unsupported since Atmel removed the "Main Memory Program via Buffer" commands.
8198 +// case 0x10: /* 0 1 0 0 */
8199 +// res = add_dataflash(channel, "AT45DB1282", SZ_16M, 16384, 1056, 11);
8202 + printk(KERN_ERR "at91_dataflash: Unknown device (%x)\n", status & 0x3c);
8209 +static int __init at91_dataflash_init(void)
8211 + spi_transfer_desc = kmalloc(sizeof(struct spi_transfer_list), GFP_KERNEL);
8212 + if (!spi_transfer_desc)
8215 + /* DataFlash (SPI chip select 0) */
8216 + at91_dataflash_detect(0);
8218 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
8219 + /* DataFlash card (SPI chip select 3) */
8220 + at91_dataflash_detect(3);
8226 +static void __exit at91_dataflash_exit(void)
8230 + for (i = 0; i < DATAFLASH_MAX_DEVICES; i++) {
8231 + if (mtd_devices[i]) {
8232 +#ifdef CONFIG_MTD_PARTITIONS
8233 + del_mtd_partitions(mtd_devices[i]);
8235 + del_mtd_device(mtd_devices[i]);
8237 + kfree(mtd_devices[i]->priv);
8238 + kfree(mtd_devices[i]);
8242 + kfree(spi_transfer_desc);
8246 +module_init(at91_dataflash_init);
8247 +module_exit(at91_dataflash_exit);
8249 +MODULE_LICENSE("GPL");
8250 +MODULE_AUTHOR("Andrew Victor");
8251 +MODULE_DESCRIPTION("DataFlash driver for Atmel AT91RM9200");
8252 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/Kconfig linux-2.6.22-rc5.new/drivers/mtd/devices/Kconfig
8253 --- linux-2.6.22-rc5/drivers/mtd/devices/Kconfig 2007-06-17 04:09:12.000000000 +0200
8254 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/Kconfig 2007-07-29 05:55:39.000000000 +0200
8255 @@ -269,5 +269,11 @@
8256 LinuxBIOS or if you need to recover a DiskOnChip Millennium on which
8257 you have managed to wipe the first block.
8260 +config MTD_AT91_DATAFLASH
8261 + tristate "AT91RM9200 DataFlash AT45DBxxx (legacy driver)"
8262 + depends on MTD && ARCH_AT91RM9200 && AT91_SPI
8264 + This enables access to the DataFlash (AT45DBxxx) on the AT91RM9200.
8265 + If you have such a board, say 'Y'.
8268 diff -urN linux-2.6.22-rc5/drivers/mtd/devices/Makefile linux-2.6.22-rc5.new/drivers/mtd/devices/Makefile
8269 --- linux-2.6.22-rc5/drivers/mtd/devices/Makefile 2007-06-17 04:09:12.000000000 +0200
8270 +++ linux-2.6.22-rc5.new/drivers/mtd/devices/Makefile 2007-07-29 05:55:39.000000000 +0200
8272 obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
8273 obj-$(CONFIG_MTD_DATAFLASH26) += at91_dataflash26.o
8274 obj-$(CONFIG_MTD_M25P80) += m25p80.o
8275 +obj-$(CONFIG_MTD_AT91_DATAFLASH)+= at91_dataflash.o
8276 diff -urN linux-2.6.22-rc5/drivers/net/arm/at91_ether.c linux-2.6.22-rc5.new/drivers/net/arm/at91_ether.c
8277 --- linux-2.6.22-rc5/drivers/net/arm/at91_ether.c 2007-06-17 04:09:12.000000000 +0200
8278 +++ linux-2.6.22-rc5.new/drivers/net/arm/at91_ether.c 2007-07-29 05:55:39.000000000 +0200
8280 skb_reserve(skb, 2);
8281 memcpy(skb_put(skb, pktlen), p_recv, pktlen);
8284 skb->protocol = eth_type_trans(skb, dev);
8285 dev->last_rx = jiffies;
8286 lp->stats.rx_bytes += pktlen;
8287 @@ -978,14 +979,22 @@
8288 struct net_device *dev;
8289 struct at91_private *lp;
8292 + struct resource *res;
8295 dev = alloc_etherdev(sizeof(struct at91_private));
8299 - dev->base_addr = AT91_VA_BASE_EMAC;
8300 - dev->irq = AT91RM9200_ID_EMAC;
8301 + /* Get I/O base address and IRQ */
8302 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
8307 + dev->base_addr = res->start;
8308 + dev->irq = platform_get_irq(pdev, 0);
8310 SET_MODULE_OWNER(dev);
8312 /* Install the interrupt handler */
8313 @@ -1058,12 +1067,12 @@
8314 lp->phy_address = phy_address; /* MDI address of PHY */
8316 /* Register the network interface */
8317 - res = register_netdev(dev);
8319 + ret = register_netdev(dev);
8321 free_irq(dev->irq, dev);
8323 dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
8328 /* Determine current link speed */
8329 diff -urN linux-2.6.22-rc5/drivers/serial/atmel_serial.c linux-2.6.22-rc5.new/drivers/serial/atmel_serial.c
8330 --- linux-2.6.22-rc5/drivers/serial/atmel_serial.c 2007-06-17 04:09:12.000000000 +0200
8331 +++ linux-2.6.22-rc5.new/drivers/serial/atmel_serial.c 2007-07-29 05:55:39.000000000 +0200
8333 * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
8334 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
8336 + * DMA support added by Chip Coldwell.
8338 * This program is free software; you can redistribute it and/or modify
8339 * it under the terms of the GNU General Public License as published by
8340 * the Free Software Foundation; either version 2 of the License, or
8342 #include <linux/sysrq.h>
8343 #include <linux/tty_flip.h>
8344 #include <linux/platform_device.h>
8345 +#include <linux/dma-mapping.h>
8346 #include <linux/atmel_pdc.h>
8351 #include "atmel_serial.h"
8353 +#define SUPPORT_PDC
8354 +#define PDC_BUFFER_SIZE (L1_CACHE_BYTES << 3)
8356 +#define PDC_RX_TIMEOUT (3 * 10) /* 3 bytes */
8358 #if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
8359 #define SUPPORT_SYSRQ
8361 @@ -107,6 +115,13 @@
8362 static int (*atmel_open_hook)(struct uart_port *);
8363 static void (*atmel_close_hook)(struct uart_port *);
8365 +struct atmel_dma_buffer {
8366 + unsigned char *buf;
8367 + dma_addr_t dma_addr;
8373 * We wrap our port structure around the generic uart_port.
8375 @@ -114,10 +129,20 @@
8376 struct uart_port uart; /* uart */
8377 struct clk *clk; /* uart clock */
8378 unsigned short suspended; /* is port suspended? */
8380 + short use_dma_rx; /* enable PDC receiver */
8381 + short pdc_rx_idx; /* current PDC RX buffer */
8382 + struct atmel_dma_buffer pdc_rx[2]; /* PDC receier */
8384 + short use_dma_tx; /* enable PDC transmitter */
8385 + struct atmel_dma_buffer pdc_tx; /* PDC transmitter */
8388 static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART];
8390 +#define PDC_RX_BUF(port) &(port)->pdc_rx[(port)->pdc_rx_idx]
8391 +#define PDC_RX_SWITCH(port) (port)->pdc_rx_idx = !(port)->pdc_rx_idx
8393 #ifdef SUPPORT_SYSRQ
8394 static struct console atmel_console;
8396 @@ -205,7 +230,12 @@
8398 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8400 - UART_PUT_IDR(port, ATMEL_US_TXRDY);
8401 + if (atmel_port->use_dma_tx) {
8402 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8403 + UART_PUT_IDR(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8406 + UART_PUT_IDR(port, ATMEL_US_TXRDY);
8410 @@ -215,7 +245,17 @@
8412 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8414 - UART_PUT_IER(port, ATMEL_US_TXRDY);
8415 + if (atmel_port->use_dma_tx) {
8416 + if (UART_GET_PTSR(port) & ATMEL_PDC_TXTEN)
8417 + /* The transmitter is already running. Yes, we
8418 + really need this.*/
8421 + UART_PUT_IER(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8422 + UART_PUT_PTCR(port, ATMEL_PDC_TXTEN); /* re-enable PDC transmit */
8425 + UART_PUT_IER(port, ATMEL_US_TXRDY);
8429 @@ -225,7 +265,12 @@
8431 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8433 - UART_PUT_IDR(port, ATMEL_US_RXRDY);
8434 + if (atmel_port->use_dma_rx) {
8435 + UART_PUT_PTCR(port, ATMEL_PDC_RXTDIS); /* disable PDC receive */
8436 + UART_PUT_IDR(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
8439 + UART_PUT_IDR(port, ATMEL_US_RXRDY);
8443 @@ -248,6 +293,134 @@
8447 + * Receive data via the PDC. A buffer has been fulled.
8449 +static void atmel_pdc_endrx(struct uart_port *port)
8451 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8452 + struct tty_struct *tty = port->info->tty;
8453 + struct atmel_dma_buffer *pdc = PDC_RX_BUF(atmel_port);
8454 + unsigned int count;
8456 + count = pdc->dma_size - pdc->ofs;
8457 + if (likely(count > 0)) {
8458 + dma_sync_single_for_cpu(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8459 + tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count);
8460 + tty_flip_buffer_push(tty);
8462 + port->icount.rx += count;
8465 + /* Set this buffer as the next receive buffer */
8467 + UART_PUT_RNPR(port, pdc->dma_addr);
8468 + UART_PUT_RNCR(port, pdc->dma_size);
8470 + /* Switch to next buffer */
8471 + PDC_RX_SWITCH(atmel_port); /* next PDC buffer */
8475 + * Receive data via the PDC. At least one byte was received, but the
8476 + * buffer was not full when the inter-character timeout expired.
8478 +static void atmel_pdc_timeout(struct uart_port *port)
8480 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8481 + struct tty_struct *tty = port->info->tty;
8482 + struct atmel_dma_buffer *pdc = PDC_RX_BUF(atmel_port);
8483 + /* unsigned */ int ofs, count;
8485 + ofs = UART_GET_RPR(port) - pdc->dma_addr; /* current DMA adress */
8486 + count = ofs - pdc->ofs;
8488 + if (likely(count > 0)) {
8489 + dma_sync_single_for_cpu(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8490 + tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count);
8491 + tty_flip_buffer_push(tty);
8494 + port->icount.rx += count;
8497 + /* reset the UART timeout */
8498 + UART_PUT_CR(port, ATMEL_US_STTTO);
8502 + * Deal with parity, framing and overrun errors.
8504 +static void atmel_pdc_rxerr(struct uart_port *port, unsigned int status)
8507 + UART_PUT_CR(port, ATMEL_US_RSTSTA);
8509 + if (status & ATMEL_US_RXBRK) {
8510 + status &= ~(ATMEL_US_PARE | ATMEL_US_FRAME); /* ignore side-effect */
8511 + port->icount.brk++;
8513 + if (status & ATMEL_US_PARE)
8514 + port->icount.parity++;
8515 + if (status & ATMEL_US_FRAME)
8516 + port->icount.frame++;
8517 + if (status & ATMEL_US_OVRE)
8518 + port->icount.overrun++;
8522 + * A transmission via the PDC is complete.
8524 +static void atmel_pdc_endtx(struct uart_port *port)
8526 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8527 + struct circ_buf *xmit = &port->info->xmit;
8528 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8530 + xmit->tail += pdc->ofs;
8531 + if (xmit->tail >= SERIAL_XMIT_SIZE)
8532 + xmit->tail -= SERIAL_XMIT_SIZE;
8534 + port->icount.tx += pdc->ofs;
8537 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
8538 + uart_write_wakeup(port);
8542 + * The PDC transmitter is idle, so either start the next transfer or
8543 + * disable the transmitter.
8545 +static void atmel_pdc_txbufe(struct uart_port *port)
8547 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8548 + struct circ_buf *xmit = &port->info->xmit;
8549 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8552 + if (!uart_circ_empty(xmit)) {
8553 + /* more to transmit - setup next transfer */
8554 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8555 + dma_sync_single_for_device(port->dev, pdc->dma_addr, pdc->dma_size, DMA_TO_DEVICE);
8557 + if (xmit->tail < xmit->head)
8558 + count = xmit->head - xmit->tail;
8560 + count = SERIAL_XMIT_SIZE - xmit->tail;
8563 + UART_PUT_TPR(port, pdc->dma_addr + xmit->tail);
8564 + UART_PUT_TCR(port, count);
8565 + UART_PUT_PTCR(port, ATMEL_PDC_TXTEN); /* re-enable PDC transmit */
8568 + /* nothing left to transmit - disable the transmitter */
8569 + UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); /* disable PDC transmit */
8570 + UART_PUT_IDR(port, ATMEL_US_ENDTX | ATMEL_US_TXBUFE);
8575 * Characters received (called from interrupt handler)
8577 static void atmel_rx_chars(struct uart_port *port)
8578 @@ -349,6 +522,14 @@
8579 status = UART_GET_CSR(port);
8580 pending = status & UART_GET_IMR(port);
8583 + if (pending & ATMEL_US_ENDRX)
8584 + atmel_pdc_endrx(port);
8585 + if (pending & ATMEL_US_TIMEOUT)
8586 + atmel_pdc_timeout(port);
8587 + if (atmel_port->use_dma_rx && pending & (ATMEL_US_RXBRK | ATMEL_US_OVRE | ATMEL_US_FRAME | ATMEL_US_PARE))
8588 + atmel_pdc_rxerr(port, pending);
8590 /* Interrupt receive */
8591 if (pending & ATMEL_US_RXRDY)
8592 atmel_rx_chars(port);
8593 @@ -363,6 +544,12 @@
8594 if (pending & (ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC))
8595 wake_up_interruptible(&port->info->delta_msr_wait);
8597 + /* PDC transmit */
8598 + if (pending & ATMEL_US_ENDTX)
8599 + atmel_pdc_endtx(port);
8600 + if (pending & ATMEL_US_TXBUFE)
8601 + atmel_pdc_txbufe(port);
8603 /* Interrupt transmit */
8604 if (pending & ATMEL_US_TXRDY)
8605 atmel_tx_chars(port);
8606 @@ -401,6 +588,47 @@
8610 + * Initialize DMA (if necessary)
8612 + if (atmel_port->use_dma_rx) {
8615 + for (i = 0; i < 2; i++) {
8616 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8618 + pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL);
8619 + if (pdc->buf == NULL) {
8621 + dma_unmap_single(port->dev, atmel_port->pdc_rx[0].dma_addr, PDC_BUFFER_SIZE, DMA_FROM_DEVICE);
8622 + kfree(atmel_port->pdc_rx[0].buf);
8624 + free_irq(port->irq, port);
8627 + pdc->dma_addr = dma_map_single(port->dev, pdc->buf, PDC_BUFFER_SIZE, DMA_FROM_DEVICE);
8628 + pdc->dma_size = PDC_BUFFER_SIZE;
8632 + atmel_port->pdc_rx_idx = 0;
8634 + UART_PUT_RPR(port, atmel_port->pdc_rx[0].dma_addr);
8635 + UART_PUT_RCR(port, PDC_BUFFER_SIZE);
8637 + UART_PUT_RNPR(port, atmel_port->pdc_rx[1].dma_addr);
8638 + UART_PUT_RNCR(port, PDC_BUFFER_SIZE);
8640 + if (atmel_port->use_dma_tx) {
8641 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8642 + struct circ_buf *xmit = &port->info->xmit;
8644 + pdc->buf = xmit->buf;
8645 + pdc->dma_addr = dma_map_single(port->dev, pdc->buf, SERIAL_XMIT_SIZE, DMA_TO_DEVICE);
8646 + pdc->dma_size = SERIAL_XMIT_SIZE;
8651 * If there is a specific "open" function (to register
8652 * control line interrupts)
8654 @@ -418,7 +646,15 @@
8655 UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
8656 UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN); /* enable xmit & rcvr */
8658 - UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */
8659 + if (atmel_port->use_dma_rx) {
8660 + UART_PUT_RTOR(port, PDC_RX_TIMEOUT); /* set UART timeout */
8661 + UART_PUT_CR(port, ATMEL_US_STTTO);
8663 + UART_PUT_IER(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
8664 + UART_PUT_PTCR(port, ATMEL_PDC_RXTEN); /* enable PDC controller */
8667 + UART_PUT_IER(port, ATMEL_US_RXRDY); /* enable receive only */
8671 @@ -431,6 +667,31 @@
8672 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8675 + * Ensure everything is stopped.
8677 + atmel_stop_rx(port);
8678 + atmel_stop_tx(port);
8681 + * Shut-down the DMA.
8683 + if (atmel_port->use_dma_rx) {
8686 + for (i = 0; i < 2; i++) {
8687 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i];
8689 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_FROM_DEVICE);
8693 + if (atmel_port->use_dma_tx) {
8694 + struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
8696 + dma_unmap_single(port->dev, pdc->dma_addr, pdc->dma_size, DMA_TO_DEVICE);
8700 * Disable all interrupts, port and break condition.
8702 UART_PUT_CR(port, ATMEL_US_RSTSTA);
8705 static void atmel_set_termios(struct uart_port *port, struct ktermios * termios, struct ktermios * old)
8707 + struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8708 unsigned long flags;
8709 unsigned int mode, imr, quot, baud;
8712 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
8713 quot = uart_get_divisor(port, baud);
8715 - if (quot > 65535) { /* BRGR is 16-bit, so switch to slower clock */
8716 + if (quot > 65535) { /* BRGR is 16-bit, so switch to slower clock */
8718 mode |= ATMEL_US_USCLKS_MCK_DIV8;
8721 if (termios->c_iflag & (BRKINT | PARMRK))
8722 port->read_status_mask |= ATMEL_US_RXBRK;
8724 + if (atmel_port->use_dma_rx) /* need to enable error interrupts */
8725 + UART_PUT_IER(port, port->read_status_mask);
8728 * Characters to ignore
8730 @@ -717,6 +982,13 @@
8731 clk_enable(atmel_port->clk);
8732 port->uartclk = clk_get_rate(atmel_port->clk);
8736 + atmel_port->use_dma_rx = data->use_dma_rx;
8737 + atmel_port->use_dma_tx = data->use_dma_tx;
8738 + if (atmel_port->use_dma_tx)
8739 + port->fifosize = PDC_BUFFER_SIZE;
8744 @@ -893,7 +1165,8 @@
8745 struct uart_port *port = platform_get_drvdata(pdev);
8746 struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
8748 - if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
8749 + if (device_may_wakeup(&pdev->dev)
8750 + && !clk_must_disable(atmel_port->clk))
8751 enable_irq_wake(port->irq);
8753 uart_suspend_port(&atmel_uart, port);
8754 diff -urN linux-2.6.22-rc5/drivers/spi/Kconfig linux-2.6.22-rc5.new/drivers/spi/Kconfig
8755 --- linux-2.6.22-rc5/drivers/spi/Kconfig 2007-06-17 04:09:12.000000000 +0200
8756 +++ linux-2.6.22-rc5.new/drivers/spi/Kconfig 2007-07-29 05:55:39.000000000 +0200
8759 tristate "Atmel SPI Controller"
8760 depends on (ARCH_AT91 || AVR32) && SPI_MASTER
8761 + select SPI_AT91_MANUAL_CS if ARCH_AT91RM9200
8763 This selects a driver for the Atmel SPI Controller, present on
8764 many AT32 (AVR32) and AT91 (ARM) chips.
8765 @@ -100,6 +101,24 @@
8766 inexpensive battery powered microcontroller evaluation board.
8767 This same cable can be used to flash new firmware.
8770 + tristate "AT91RM9200 Bitbang SPI Master"
8771 + depends on SPI_MASTER && ARCH_AT91RM9200 && !SPI_ATMEL && EXPERIMENTAL
8772 + select SPI_BITBANG
8773 + select SPI_AT91_MANUAL_CS
8775 + This is dumb PIO bitbanging driver for the Atmel AT91RM9200.
8776 + The SPI_ATMEL driver will be its replacement, using the native
8777 + SPI hardware and its DMA controller.
8779 +config SPI_AT91_MANUAL_CS
8781 + depends on ARCH_AT91RM9200
8783 + Works around an AT91RM9200 problem whereby the SPI chip-select
8784 + will be wrongly disabled. The workaround uses those pins as
8785 + GPIOs instead of letting the SPI controller manage them.
8788 tristate "Freescale iMX SPI controller"
8789 depends on SPI_MASTER && ARCH_IMX && EXPERIMENTAL
8790 diff -urN linux-2.6.22-rc5/drivers/spi/Makefile linux-2.6.22-rc5.new/drivers/spi/Makefile
8791 --- linux-2.6.22-rc5/drivers/spi/Makefile 2007-06-17 04:09:12.000000000 +0200
8792 +++ linux-2.6.22-rc5.new/drivers/spi/Makefile 2007-07-29 05:55:39.000000000 +0200
8794 obj-$(CONFIG_SPI_MPC83xx) += spi_mpc83xx.o
8795 obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o
8796 obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
8797 +obj-$(CONFIG_SPI_AT91) += spi_at91_bitbang.o
8798 # ... add above this line ...
8800 # SPI protocol drivers (device/link on bus)
8801 diff -urN linux-2.6.22-rc5/drivers/spi/spi_at91_bitbang.c linux-2.6.22-rc5.new/drivers/spi/spi_at91_bitbang.c
8802 --- linux-2.6.22-rc5/drivers/spi/spi_at91_bitbang.c 1970-01-01 01:00:00.000000000 +0100
8803 +++ linux-2.6.22-rc5.new/drivers/spi/spi_at91_bitbang.c 2007-07-29 05:55:39.000000000 +0200
8806 + * at91_spi.c - at91 SPI driver (BOOTSTRAP/BITBANG VERSION)
8808 + * Copyright (C) 2006 David Brownell
8810 + * This program is free software; you can redistribute it and/or modify
8811 + * it under the terms of the GNU General Public License as published by
8812 + * the Free Software Foundation; either version 2 of the License, or
8813 + * (at your option) any later version.
8815 + * This program is distributed in the hope that it will be useful,
8816 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8817 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8818 + * GNU General Public License for more details.
8820 + * You should have received a copy of the GNU General Public License
8821 + * along with this program; if not, write to the Free Software
8822 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
8824 +#include <linux/kernel.h>
8825 +#include <linux/init.h>
8826 +#include <linux/platform_device.h>
8828 +#include <linux/spi/spi.h>
8829 +#include <linux/spi/spi_bitbang.h>
8831 +#include <asm/arch/gpio.h>
8835 + * FIXME this bitbanging version is just to help bootstrap systems until
8836 + * there's a native SPI+IRQ+DMA controller driver ... such a driver should
8837 + * be a drop-in replacement for this one, and much faster.
8841 + * - other at91 parts (like at91sam9) have multiple controllers
8842 + * and different pin muxing; this version is at91rm9200 specfic.
8844 + * - at91sam9261 SPI0 pins are directly muxed with MMC/SD pins.
8846 + * - rm9200 spi chipselects drop wrongly, so the native driver
8847 + * will need to use gpios much like this does.
8849 + * - real hardware only allows 8..16 bits per word, while this
8850 + * bitbanger allows 1..32 (incompatible superset).
8852 + * - this disregards clock parameters. with inlined gpio calls,
8853 + * gcc 3.4.4 produces about 1.5 mbit/sec, more than 2x faster
8854 + * than using the subroutined veresion from txrx_word().
8856 + * - suspend/resume and <linux/clk.h> support is missing ...
8859 +#define spi_miso_bit AT91_PIN_PA0
8860 +#define spi_mosi_bit AT91_PIN_PA1
8861 +#define spi_sck_bit AT91_PIN_PA2
8864 + struct spi_bitbang bitbang;
8865 + struct platform_device *pdev;
8868 +/*----------------------------------------------------------------------*/
8870 +static inline void setsck(struct spi_device *spi, int is_on)
8872 + at91_set_gpio_value(spi_sck_bit, is_on);
8875 +static inline void setmosi(struct spi_device *spi, int is_on)
8877 + at91_set_gpio_value(spi_mosi_bit, is_on);
8880 +static inline int getmiso(struct spi_device *spi)
8882 + return at91_get_gpio_value(spi_miso_bit);
8885 +static void at91_spi_chipselect(struct spi_device *spi, int is_active)
8887 + unsigned long cs = (unsigned long) spi->controller_data;
8889 + /* set default clock polarity */
8891 + setsck(spi, spi->mode & SPI_CPOL);
8893 + /* only support active-low (default) */
8894 + at91_set_gpio_value(cs, !is_active);
8898 + * NOTE: this is "as fast as we can"; it should be a function of
8899 + * the device clock ...
8901 +#define spidelay(X) do{} while(0)
8903 +#define EXPAND_BITBANG_TXRX
8904 +#include <linux/spi/spi_bitbang.h>
8906 +static u32 at91_spi_txrx_word_mode0(struct spi_device *spi,
8907 + unsigned nsecs, u32 word, u8 bits)
8909 + return bitbang_txrx_be_cpha0(spi, nsecs, 0, word, 8);
8912 +static u32 at91_spi_txrx_word_mode1(struct spi_device *spi,
8913 + unsigned nsecs, u32 word, u8 bits)
8915 + return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, 8);
8918 +static u32 at91_spi_txrx_word_mode2(struct spi_device *spi,
8919 + unsigned nsecs, u32 word, u8 bits)
8921 + return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, 8);
8924 +static u32 at91_spi_txrx_word_mode3(struct spi_device *spi,
8925 + unsigned nsecs, u32 word, u8 bits)
8927 + return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, 8);
8930 +/*----------------------------------------------------------------------*/
8932 +static int __init at91_spi_probe(struct platform_device *pdev)
8935 + struct spi_master *master;
8936 + struct at91_spi *at91_spi;
8938 + if (pdev->id != 0) /* SPI0 bus */
8941 + master = spi_alloc_master(&pdev->dev, sizeof *at91_spi);
8945 + at91_spi = spi_master_get_devdata(master);
8946 + at91_spi->pdev = pdev;
8947 + platform_set_drvdata(pdev, at91_spi);
8949 + /* SPI and bitbang hookup */
8950 + master->bus_num = 0;
8951 + master->num_chipselect = 4;
8953 + at91_spi->bitbang.master = spi_master_get(master);
8954 + at91_spi->bitbang.chipselect = at91_spi_chipselect;
8955 + at91_spi->bitbang.txrx_word[SPI_MODE_0] = at91_spi_txrx_word_mode0;
8956 + at91_spi->bitbang.txrx_word[SPI_MODE_1] = at91_spi_txrx_word_mode1;
8957 + at91_spi->bitbang.txrx_word[SPI_MODE_2] = at91_spi_txrx_word_mode2;
8958 + at91_spi->bitbang.txrx_word[SPI_MODE_3] = at91_spi_txrx_word_mode3;
8960 + status = spi_bitbang_start(&at91_spi->bitbang);
8962 + (void) spi_master_put(at91_spi->bitbang.master);
8967 +static int __exit at91_spi_remove(struct platform_device *pdev)
8969 + struct at91_spi *at91_spi = platform_get_drvdata(pdev);
8972 + /* stop() unregisters child devices too */
8973 + status = spi_bitbang_stop(&at91_spi->bitbang);
8974 + (void) spi_master_put(at91_spi->bitbang.master);
8976 + platform_set_drvdata(pdev, NULL);
8980 +static struct platform_driver at91_spi_driver = {
8981 + .probe = at91_spi_probe,
8982 + .remove = __exit_p(at91_spi_remove),
8984 + .name = "at91_spi",
8985 + .owner = THIS_MODULE,
8989 +static int __init at91_spi_init(void)
8991 + at91_set_gpio_output(spi_sck_bit, 0);
8992 + at91_set_gpio_output(spi_mosi_bit, 0);
8993 + at91_set_gpio_input(spi_miso_bit, 1 /* pullup */);
8995 + /* register driver */
8996 + return platform_driver_register(&at91_spi_driver);
8999 +static void __exit at91_spi_exit(void)
9001 + platform_driver_unregister(&at91_spi_driver);
9004 +device_initcall(at91_spi_init);
9005 +module_exit(at91_spi_exit);
9007 +MODULE_ALIAS("at91_spi.0");
9009 +MODULE_DESCRIPTION("AT91 SPI support (BOOTSTRAP/BITBANG VERSION)");
9010 +MODULE_AUTHOR("David Brownell");
9011 +MODULE_LICENSE("GPL");
9012 diff -urN linux-2.6.22-rc5/drivers/usb/gadget/at91_udc.c linux-2.6.22-rc5.new/drivers/usb/gadget/at91_udc.c
9013 --- linux-2.6.22-rc5/drivers/usb/gadget/at91_udc.c 2007-06-17 04:09:12.000000000 +0200
9014 +++ linux-2.6.22-rc5.new/drivers/usb/gadget/at91_udc.c 2007-07-29 05:55:39.000000000 +0200
9015 @@ -1803,7 +1803,7 @@
9017 if ((!udc->suspended && udc->addr)
9019 - || at91_suspend_entering_slow_clock()) {
9020 + || clk_must_disable(udc->fclk)) {
9024 diff -urN linux-2.6.22-rc5/drivers/usb/host/ohci-at91.c linux-2.6.22-rc5.new/drivers/usb/host/ohci-at91.c
9025 --- linux-2.6.22-rc5/drivers/usb/host/ohci-at91.c 2007-06-17 04:09:12.000000000 +0200
9026 +++ linux-2.6.22-rc5.new/drivers/usb/host/ohci-at91.c 2007-07-29 05:55:39.000000000 +0200
9029 * REVISIT: some boards will be able to turn VBUS off...
9031 - if (at91_suspend_entering_slow_clock()) {
9032 + if (clk_must_disable(fclk)) {
9033 ohci_usb_reset (ohci);
9036 diff -urN linux-2.6.22-rc5/drivers/video/backlight/kb920x_bl.c linux-2.6.22-rc5.new/drivers/video/backlight/kb920x_bl.c
9037 --- linux-2.6.22-rc5/drivers/video/backlight/kb920x_bl.c 1970-01-01 01:00:00.000000000 +0100
9038 +++ linux-2.6.22-rc5.new/drivers/video/backlight/kb920x_bl.c 2007-07-29 05:55:39.000000000 +0200
9041 + * Backlight Driver for KB9202
9043 + * Copyright (c) 2006 KwikByte
9045 + * Based on Sharp's Corgi Backlight Driver
9047 + * This file is subject to the terms and conditions of the GNU General Public
9048 + * License. See the file "COPYING" in the main directory of this archive
9049 + * for more details.
9052 +#include <linux/module.h>
9053 +#include <linux/kernel.h>
9054 +#include <linux/init.h>
9055 +#include <linux/platform_device.h>
9056 +#include <linux/spinlock.h>
9057 +#include <linux/fb.h>
9058 +#include <linux/backlight.h>
9060 +#include <asm/arch/gpio.h>
9062 +/* The backlight is on(1)/off(0) */
9063 +#define KB9202_DEFAULT_INTENSITY 1
9064 +#define KB9202_MAX_INTENSITY 1
9066 +static int kb9202bl_suspended;
9067 +static int current_intensity = 0;
9068 +static DEFINE_SPINLOCK(bl_lock);
9070 +static int kb9202bl_set_intensity(struct backlight_device *bd)
9072 + unsigned long flags;
9073 + int intensity = bd->props.brightness;
9075 + if (bd->props.power != FB_BLANK_UNBLANK)
9077 + if (bd->props.fb_blank != FB_BLANK_UNBLANK)
9079 + if (kb9202bl_suspended)
9082 + if ((!current_intensity) && (bd->props.power == FB_BLANK_UNBLANK))
9085 + spin_lock_irqsave(&bl_lock, flags);
9087 + gpio_set_value(AT91_PIN_PC23, 1);
9089 + gpio_set_value(AT91_PIN_PC23, 0);
9090 + spin_unlock_irqrestore(&bl_lock, flags);
9092 + current_intensity = intensity;
9097 +static int kb9202bl_get_intensity(struct backlight_device *bd)
9099 + return current_intensity;
9102 +static struct backlight_ops kb9202bl_ops = {
9103 + .get_brightness = kb9202bl_get_intensity,
9104 + .update_status = kb9202bl_set_intensity,
9107 +static int __init kb9202bl_probe(struct platform_device *pdev)
9109 + struct backlight_device *bd;
9111 + bd = backlight_device_register ("kb9202-bl", &pdev->dev, NULL, &kb9202bl_ops);
9113 + return PTR_ERR(bd);
9115 + platform_set_drvdata(pdev, bd);
9117 + bd->props.max_brightness = KB9202_MAX_INTENSITY;
9118 + bd->props.brightness = KB9202_DEFAULT_INTENSITY;
9119 + (void) kb9202bl_set_intensity(bd);
9124 +static int kb9202bl_remove(struct platform_device *pdev)
9126 + struct backlight_device *bd = platform_get_drvdata(pdev);
9128 + bd->props.brightness = 0;
9129 + bd->props.power = 0;
9130 + (void) kb9202bl_set_intensity(bd);
9132 + backlight_device_unregister(bd);
9138 +static int kb9202bl_suspend(struct platform_device *dev, pm_message_t state)
9140 + struct backlight_device *bd = platform_get_drvdata(pdev);
9142 + kb9202bl_suspended = 1;
9143 + (void) kb9202bl_set_intensity(bd);
9147 +static int kb9202bl_resume(struct platform_device *dev)
9149 + struct backlight_device *bd = platform_get_drvdata(pdev);
9151 + kb9202bl_suspended = 0;
9152 + (void) kb9202bl_set_intensity(bd);
9156 +#define kb9202bl_suspend NULL
9157 +#define kb9202bl_resume NULL
9160 +static struct platform_driver kb9202bl_driver = {
9161 + .probe = kb9202bl_probe,
9162 + .remove = kb9202bl_remove,
9163 + .suspend = kb9202bl_suspend,
9164 + .resume = kb9202bl_resume,
9166 + .name = "kb9202-bl",
9167 + .owner = THIS_MODULE,
9171 +static struct platform_device *kb9202bl_device;
9173 +static int __init kb9202bl_init(void)
9177 + ret = platform_driver_register(&kb9202bl_driver);
9179 + kb9202bl_device = platform_device_alloc("kb9202-bl", -1);
9180 + if (!kb9202bl_device)
9183 + ret = platform_device_add(kb9202bl_device);
9185 + platform_device_put(kb9202bl_device);
9186 + platform_driver_unregister(&kb9202bl_driver);
9192 +static void __exit kb9202bl_exit(void)
9194 + platform_device_unregister(kb9202bl_device);
9195 + platform_driver_unregister(&kb9202bl_driver);
9198 +module_init(kb9202bl_init);
9199 +module_exit(kb9202bl_exit);
9201 +MODULE_AUTHOR("KwikByte <kb9200_dev@kwikbyte.com>");
9202 +MODULE_DESCRIPTION("KB9202 Backlight Driver");
9203 +MODULE_LICENSE("GPL");
9204 diff -urN linux-2.6.22-rc5/drivers/video/backlight/Kconfig linux-2.6.22-rc5.new/drivers/video/backlight/Kconfig
9205 --- linux-2.6.22-rc5/drivers/video/backlight/Kconfig 2007-06-17 04:09:12.000000000 +0200
9206 +++ linux-2.6.22-rc5.new/drivers/video/backlight/Kconfig 2007-07-29 05:55:39.000000000 +0200
9209 If you have a Intel LE80578 (Carillo Ranch) say Y to enable the
9212 +config BACKLIGHT_KB920x
9213 + tristate "KwikByte KB9202 Backlight Driver"
9214 + depends on BACKLIGHT_CLASS_DEVICE && MACH_KB9200
9217 + If you have a KwikByte KB9202 board, say Y to enable the
9219 diff -urN linux-2.6.22-rc5/drivers/video/backlight/Makefile linux-2.6.22-rc5.new/drivers/video/backlight/Makefile
9220 --- linux-2.6.22-rc5/drivers/video/backlight/Makefile 2007-06-17 04:09:12.000000000 +0200
9221 +++ linux-2.6.22-rc5.new/drivers/video/backlight/Makefile 2007-07-29 05:55:39.000000000 +0200
9223 obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
9224 obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
9225 obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
9226 +obj-$(CONFIG_BACKLIGHT_KB920x) += kb920x_bl.o
9227 diff -urN linux-2.6.22-rc5/drivers/video/Kconfig linux-2.6.22-rc5.new/drivers/video/Kconfig
9228 --- linux-2.6.22-rc5/drivers/video/Kconfig 2007-06-17 04:09:12.000000000 +0200
9229 +++ linux-2.6.22-rc5.new/drivers/video/Kconfig 2007-07-29 05:55:39.000000000 +0200
9230 @@ -822,6 +822,17 @@
9231 framebuffer. Product specs at
9232 <http://www.erd.epson.com/vdc/html/products.htm>.
9235 + tristate "Epson S1D15605 framebuffer support"
9237 + default m if MACH_KB9200
9238 + select FB_CFB_FILLRECT
9239 + select FB_CFB_COPYAREA
9240 + select FB_CFB_IMAGEBLIT
9242 + Build in support for the S1D15605 Epson Research 128x64
9243 + LCD controller as a framebuffer.
9246 tristate "Epson S1D13XXX framebuffer support"
9251 tristate "AT91/AT32 LCD Controller support"
9252 - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || AVR32)
9253 + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || AVR32)
9254 select FB_CFB_FILLRECT
9255 select FB_CFB_COPYAREA
9256 select FB_CFB_IMAGEBLIT
9257 diff -urN linux-2.6.22-rc5/drivers/video/Makefile linux-2.6.22-rc5.new/drivers/video/Makefile
9258 --- linux-2.6.22-rc5/drivers/video/Makefile 2007-06-17 04:09:12.000000000 +0200
9259 +++ linux-2.6.22-rc5.new/drivers/video/Makefile 2007-07-29 05:55:39.000000000 +0200
9261 obj-$(CONFIG_FB_SA1100) += sa1100fb.o
9262 obj-$(CONFIG_FB_HIT) += hitfb.o
9263 obj-$(CONFIG_FB_EPSON1355) += epson1355fb.o
9264 -obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o
9265 +obj-$(CONFIG_FB_S1D15605) += s1d15605fb.o
9266 +obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o
9267 obj-$(CONFIG_FB_PVR2) += pvr2fb.o
9268 obj-$(CONFIG_FB_VOODOO1) += sstfb.o
9269 obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o
9270 diff -urN linux-2.6.22-rc5/drivers/video/s1d15605fb.c linux-2.6.22-rc5.new/drivers/video/s1d15605fb.c
9271 --- linux-2.6.22-rc5/drivers/video/s1d15605fb.c 1970-01-01 01:00:00.000000000 +0100
9272 +++ linux-2.6.22-rc5.new/drivers/video/s1d15605fb.c 2007-07-29 05:55:39.000000000 +0200
9275 + * drivers/video/s1d15605.c
9277 + * Adapted from several sources including:
9278 + * 1) Driver for AT91 LCD Controller
9279 + * Copyright (C) 2006 Atmel
9281 + * 2) Copyright (C) 2005 S. Kevin Hester
9283 + * This file is subject to the terms and conditions of the GNU General Public
9284 + * License. See the file COPYING in the main directory of this archive for
9287 + * This is a basic framebuffer driver for the Optrex F-51320 128x64 mono LCD
9288 + * display. This display uses a clone of the common Epson SED 1531 display
9291 + * I've heavily borrowed code from the vfb.c driver.
9293 + * This program is free software; you can redistribute it and/or modify
9294 + * it under the terms of the GNU General Public License as published by
9295 + * the Free Software Foundation; either version 2 of the License, or
9296 + * (at your option) any later version.
9298 + * This program is distributed in the hope that it will be useful,
9299 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9300 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9301 + * GNU General Public License for more details.
9303 + * You should have received a copy of the GNU General Public License
9304 + * along with this program; if not, write to the Free Software
9305 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9309 +#define MSG(string, args...) printk("s1d15605fb:" string, ##args)
9311 +#define MSG(string, args...)
9314 +#include <linux/kernel.h>
9315 +#include <linux/platform_device.h>
9316 +#include <linux/dma-mapping.h>
9317 +#include <linux/interrupt.h>
9318 +#include <linux/clk.h>
9319 +#include <linux/fb.h>
9320 +#include <linux/init.h>
9321 +#include <linux/delay.h>
9323 +#include <asm/uaccess.h>
9325 +#include <asm/arch/board.h>
9326 +#include <asm/arch/gpio.h>
9328 +#ifdef CONFIG_PMAC_BACKLIGHT
9329 +#include <asm/backlight.h>
9332 +#define VIDEOWIDTH 128
9333 +#define VIDEOHEIGHT 64
9334 +#define VIDEODEPTH 1 /* bits/pixel */
9335 +#define VIDEOWIDTH_BYTES ((VIDEOWIDTH * VIDEODEPTH) / 8)
9337 +/* The number of bytes that actually go to the device */
9338 +#define ACTUALVIDEOMEMSIZE (VIDEOWIDTH_BYTES * VIDEOHEIGHT)
9339 +#define VIDEOMEMSIZE PAGE_SIZE
9341 +static struct fb_var_screeninfo s1d15605_default __initdata = {
9342 + .xres = VIDEOWIDTH,
9343 + .yres = VIDEOHEIGHT,
9344 + .xres_virtual = VIDEOWIDTH,
9345 + .yres_virtual = VIDEOHEIGHT,
9346 + .bits_per_pixel = VIDEODEPTH,
9347 + .red = { 0, 1, 0 },
9348 + .green = { 0, 1, 0 },
9349 + .blue = { 0, 1, 0 },
9350 + .activate = FB_ACTIVATE_NOW,
9351 + .pixclock = 20000,
9352 + .vmode = FB_VMODE_NONINTERLACED,
9355 +static struct fb_fix_screeninfo s1d15605_fix __initdata = {
9357 + .type = FB_TYPE_PACKED_PIXELS,
9358 + .visual = FB_VISUAL_MONO10,
9362 + .accel = FB_ACCEL_NONE,
9365 +struct s1d15605fb_info {
9366 + struct fb_info *info;
9368 + unsigned long reset_pin;
9369 + struct platform_device *pdev;
9373 + * LCD device interface
9375 +#define RESET_DISPLAY 0xE2
9376 +#define LCD_BIAS_1_9 0xA2
9377 +#define ADC_SELECT_REVERSE 0xA1
9378 +#define COMMON_OUTPUT_NORMAL 0xC0
9379 +#define V5_RESISTOR_RATIO 0x26
9380 +#define ELECTRONIC_VOLUME_SET 0x81
9381 +#define ELECTRONIC_VOLUME_INIT 0x20
9382 +#define POWER_CONTROL_SET 0x28
9383 +#define VOLTAGE_REGULATOR 0x02
9384 +#define VOLTAGE_FOLLOWER 0x01
9385 +#define BOOSTER_CIRCUIT 0x04
9386 +#define DISPLAY_ON 0xAF
9387 +#define START_LINE_SET 0x40
9388 +#define PAGE_ADDRESS_SET 0xB0
9389 +#define COLUMN_ADDRESS_HIGH 0x10
9390 +#define COLUMN_ADDRESS_LOW 0x00
9391 +#define RESISTOR_RATIO_START 0x20
9393 +#define NUM_OF_PAGES 8
9394 +#define NUM_OF_COLUMNS 128
9396 +#define WRITE_COMMAND(x) __raw_writeb((x), (sinfo)->mmio)
9397 +#define READ_COMMAND __raw_readb((sinfo)->mmio)
9398 +#define WRITE_DATA(x) __raw_writeb((x), (sinfo)->mmio + (0x10000))
9399 +#define READ_DATA __raw_readb((sinfo)->mmio + (0x10000))
9403 + * s1d15605fb_resize_framebuffer
9405 + * Free allocated space if different. Allocate on new of changed.
9406 + * Returns -ENOMEM if the new framebuffer can not be allocated,
9407 + * zero on success.
9409 +static int s1d15605fb_resize_framebuffer(struct s1d15605fb_info *sinfo)
9411 + struct fb_info *info = sinfo->info;
9412 + struct fb_fix_screeninfo *fix = &info->fix;
9413 + struct fb_var_screeninfo *var = &info->var;
9414 + unsigned int new_size;
9417 + new_size = ((var->xres_virtual * var->yres_virtual * var->bits_per_pixel) / 8);
9419 + MSG("%s: x (%d) y (%d) bpp (%d): new size 0x%08x\n", __FUNCTION__,
9420 + var->xres_virtual, var->yres_virtual, var->bits_per_pixel, new_size);
9422 + if (new_size == fix->smem_len)
9425 + if (fix->smem_len) {
9426 + kfree(info->screen_base);
9429 + new_vaddr = kmalloc(new_size, GFP_KERNEL);
9432 + fix->smem_len = 0;
9436 + info->screen_base = new_vaddr;
9437 + fix->smem_start = (unsigned)new_vaddr;
9438 + fix->smem_len = new_size;
9439 + fix->line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
9441 + dev_info(info->device,
9442 + "%luKiB frame buffer at %08lx (mapped at %p)\n",
9443 + (unsigned long)info->fix.smem_len / 1024,
9444 + (unsigned long)info->fix.smem_start,
9445 + info->screen_base);
9452 + * The s1d15605 seems to be divided into eight 128 pixel wide pages (from top to
9453 + * bottom) each page seems to be eight pixels high, where these eight pixels are
9456 +static void s1d15605_update(struct fb_info *info)
9458 + struct s1d15605fb_info *sinfo = info->par;
9459 + int page, i, row, colmask;
9460 + u8 retVal, *rowPtr;
9462 + WRITE_COMMAND(START_LINE_SET);
9463 + for (page = 0; page < NUM_OF_PAGES; ++page) {
9464 + WRITE_COMMAND(PAGE_ADDRESS_SET + page);
9465 + WRITE_COMMAND(COLUMN_ADDRESS_HIGH);
9466 + WRITE_COMMAND(COLUMN_ADDRESS_LOW);
9468 + for (i = 0; i < NUM_OF_COLUMNS; ++i)
9470 + /* point of opportunity: optimization */
9471 + colmask = (1 << (i & 0x7));
9472 + rowPtr = (u8*)(info->screen_base);
9473 + rowPtr += (VIDEOWIDTH_BYTES * 8 * page);
9474 + rowPtr += (i >> 3);
9476 + for (row = 0; row < 8; ++row)
9478 + retVal = (retVal >> 1) | (((*rowPtr) & colmask) ? 0x80 : 0);
9479 + rowPtr += VIDEOWIDTH_BYTES;
9481 + WRITE_DATA(retVal);
9485 + WRITE_COMMAND(DISPLAY_ON);
9490 + * Setting the video mode has been split into two parts.
9491 + * First part, xxxfb_check_var, must not write anything
9492 + * to hardware, it should only verify and adjust var.
9493 + * This means it doesn't alter par but it does use hardware
9494 + * data from it to check this var.
9496 +static int s1d15605_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
9499 + * Some very basic checks
9505 + if (var->xres > var->xres_virtual)
9506 + var->xres_virtual = var->xres;
9507 + if (var->yres > var->yres_virtual)
9508 + var->yres_virtual = var->yres;
9510 + if(var->bits_per_pixel > VIDEODEPTH)
9516 + if (((var->yres_virtual * var->bits_per_pixel * var->yres_virtual) >> 3) >
9517 + ACTUALVIDEOMEMSIZE)
9521 + * Now that we checked it we alter var. The reason being is that the video
9522 + * mode passed in might not work but slight changes to it might make it
9523 + * work. This way we let the user know what is acceptable.
9525 + switch (var->bits_per_pixel) {
9527 + var->red.offset = var->green.offset = var->blue.offset = 0;
9528 + var->red.length = var->green.length = var->blue.length
9529 + = var->bits_per_pixel;
9535 + var->xoffset = var->yoffset = 0;
9536 + var->red.msb_right = var->green.msb_right = var->blue.msb_right =
9537 + var->transp.msb_right = 0;
9544 + * This routine actually sets the video mode. It's in here where we
9545 + * the hardware state info->par and fix which can be affected by the
9546 + * change in par. For this driver it doesn't do much.
9548 +static int s1d15605_set_par(struct fb_info *info)
9552 + MSG("%s:\n", __func__);
9553 + MSG(" * resolution: %ux%u (%ux%u virtual)\n",
9554 + info->var.xres, info->var.yres,
9555 + info->var.xres_virtual, info->var.yres_virtual);
9557 + ret = s1d15605fb_resize_framebuffer(info->par);
9559 + info->fix.visual = FB_VISUAL_MONO10;
9565 + * Set a single color register. The values supplied are already
9566 + * rounded down to the hardware's capabilities (according to the
9567 + * entries in the var structure). Return != 0 for invalid regno.
9569 +static int s1d15605_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
9570 + u_int transp, struct fb_info *info)
9572 + if (regno > 1) /* no. of hw registers - we only do mono now */
9580 + * Currently, the routine will simply shut-off the backlight and prevent
9581 + * updates/refreshes. Modify according to application.
9583 + * 0 unblank, 1 blank, 2 no vsync, 3 no hsync, 4 off
9585 +static int s1d15605_blank(int blank, struct fb_info *info)
9587 +#ifdef CONFIG_PMAC_BACKLIGHT
9589 + pmac_backlight->props.power = FB_BLANK_POWERDOWN;
9591 + pmac_backlight->props.power = FB_BLANK_UNBLANK;
9592 + backlight_update_status(pmac_backlight);
9599 + * Pan or Wrap the Display
9601 + * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
9604 +static int s1d15605_pan_display(struct fb_var_screeninfo *var,
9605 + struct fb_info *info)
9607 + if (var->vmode & FB_VMODE_YWRAP) {
9608 + if (var->yoffset < 0
9609 + || var->yoffset >= info->var.yres_virtual
9613 + if (var->xoffset + var->xres > info->var.xres_virtual ||
9614 + var->yoffset + var->yres > info->var.yres_virtual)
9617 + info->var.xoffset = var->xoffset;
9618 + info->var.yoffset = var->yoffset;
9619 + if (var->vmode & FB_VMODE_YWRAP)
9620 + info->var.vmode |= FB_VMODE_YWRAP;
9622 + info->var.vmode &= ~FB_VMODE_YWRAP;
9628 +static void s1d15605_copyarea(struct fb_info *info, const struct fb_copyarea *region)
9630 + cfb_copyarea(info, region);
9631 + s1d15605_update(info);
9635 +static void s1d15605_fillrect (struct fb_info *info, const struct fb_fillrect *rect)
9637 + cfb_fillrect(info, rect);
9638 + s1d15605_update(info);
9642 +static void s1d15605_imageblit(struct fb_info *p, const struct fb_image *image)
9644 + cfb_imageblit(p, image);
9645 + s1d15605_update(p);
9650 + * Write the users data to our framebuffer, and then trigger a psuedo DMA
9652 +static ssize_t s1d15605_write(struct file *file, const char *buf,
9653 + size_t count, loff_t *ppos)
9655 + unsigned long p = *ppos;
9656 + struct inode *inode = file->f_dentry->d_inode;
9657 + int fbidx = iminor(inode);
9658 + struct fb_info *info = registered_fb[fbidx];
9661 + if (p > info->fix.smem_len)
9663 + if (count >= info->fix.smem_len)
9664 + count = info->fix.smem_len;
9666 + if (count + p > info->fix.smem_len) {
9667 + count = info->fix.smem_len - p;
9673 + base_addr = info->screen_base;
9674 + count -= copy_from_user(base_addr+p, buf, count);
9679 + s1d15605_update(info);
9687 +#ifdef USE_PRIVATE_VMA_FXS
9688 +static void s1d15605_vma_open(struct vm_area_struct *vma)
9690 + // FIXME - store stats in the device data via vm_private_data
9694 +static void s1d15605_vma_close(struct vm_area_struct *vma)
9696 + // FIXME - store stats in the device data via vm_private_data
9700 +static struct page *s1d15605_vma_nopage(struct vm_area_struct *vma,
9701 + unsigned long address, int *type)
9703 + struct page *page;
9704 + struct fb_info *info = vma->vm_private_data;
9706 + page = virt_to_page(info->screen_base);
9709 + // FIXME - now someone has a link to our page, start periodically blitting
9710 + // latest updates to the actual device.
9716 +static struct vm_operations_struct s1d15605_vm_ops = {
9717 + .open = s1d15605_vma_open,
9718 + .close = s1d15605_vma_close,
9719 + .nopage = s1d15605_vma_nopage
9723 +/* We don't do much here - because we have special vm_ops */
9724 +static int s1d15605_mmap(struct fb_info *info, struct vm_area_struct *vma)
9726 + vma->vm_ops = &s1d15605_vm_ops;
9727 + vma->vm_flags |= VM_RESERVED;
9728 + vma->vm_private_data = info;
9729 + s1d15605_vma_open(vma);
9733 +#endif /* USE_PRIVATE_VMA_FXS */
9736 +static struct fb_ops s1d15605fb_ops = {
9737 + .owner = THIS_MODULE,
9738 + .fb_check_var = s1d15605_check_var,
9739 + .fb_set_par = s1d15605_set_par,
9740 + .fb_setcolreg = s1d15605_setcolreg,
9741 + .fb_blank = s1d15605_blank,
9742 +// .fb_pan_display = s1d15605_pan_display,
9743 + .fb_fillrect = s1d15605_fillrect,
9744 + .fb_copyarea = s1d15605_copyarea,
9745 + .fb_imageblit = s1d15605_imageblit,
9746 + .fb_write = s1d15605_write,
9747 +#ifdef USE_PRIVATE_VMA_FXS
9748 + .fb_mmap = s1d15605_mmap,
9753 +static void s1d15605_device_init(struct s1d15605fb_info *sinfo) {
9757 + /* release the reset line by reading the device - proto hardware */
9758 + value = READ_COMMAND;
9759 + value = READ_COMMAND;
9761 +#ifdef CONFIG_MACH_KB9200
9762 + /* new boards have dedicated reset line */
9763 + gpio_set_value(sinfo->reset_pin, 1);
9766 + /* initialize the device within 5ms */
9767 + WRITE_COMMAND(RESET_DISPLAY);
9768 + WRITE_COMMAND(LCD_BIAS_1_9);
9769 + WRITE_COMMAND(ADC_SELECT_REVERSE);
9770 + WRITE_COMMAND(COMMON_OUTPUT_NORMAL);
9771 + WRITE_COMMAND(V5_RESISTOR_RATIO);
9772 + WRITE_COMMAND(ELECTRONIC_VOLUME_SET);
9773 + WRITE_COMMAND(ELECTRONIC_VOLUME_INIT);
9774 + WRITE_COMMAND(POWER_CONTROL_SET | VOLTAGE_REGULATOR | VOLTAGE_FOLLOWER | BOOSTER_CIRCUIT);
9775 + WRITE_COMMAND(DISPLAY_ON);
9777 + WRITE_COMMAND(RESISTOR_RATIO_START + 4);
9778 + WRITE_COMMAND(ELECTRONIC_VOLUME_SET);
9779 + WRITE_COMMAND(0x33);
9783 +static int s1d15605fb_probe(struct platform_device *pdev)
9785 + struct device *dev = &pdev->dev;
9786 + struct fb_info *info;
9787 + struct s1d15605fb_info *sinfo;
9790 + MSG("%s\n", __func__);
9792 + if (!(info = framebuffer_alloc(sizeof(struct s1d15605fb_info), dev))) {
9793 + dev_err(dev, "Cannot allocate framebuffer struct\n");
9797 + sinfo = info->par;
9798 + sinfo->info = info;
9799 + sinfo->pdev = pdev;
9801 + if (pdev->num_resources < 2) {
9802 + dev_err(dev, "Resources unusable\n");
9807 + info->fbops = &s1d15605fb_ops;
9808 + strcpy(info->fix.id, pdev->name);
9810 + info->fix.mmio_start = pdev->resource[0].start;
9811 + info->fix.mmio_len = pdev->resource[0].end - pdev->resource[0].start + 1;
9812 + sinfo->reset_pin = pdev->resource[1].start;
9814 + ret = s1d15605fb_resize_framebuffer(sinfo);
9816 + dev_err(dev, "Cannot resize framebuffer: %d\n", ret);
9820 + if (!request_mem_region(info->fix.mmio_start,
9821 + info->fix.mmio_len, pdev->name)) {
9826 + sinfo->mmio = ioremap(info->fix.mmio_start, info->fix.mmio_len);
9827 + if (!sinfo->mmio) {
9828 + dev_err(dev, "Cannot map LCD memory region\n");
9832 + s1d15605_device_init(sinfo);
9834 + ret = fb_find_mode(&info->var, info, NULL, NULL, 0, NULL, 1);
9836 + if (!ret || (ret == 4))
9837 + info->var = s1d15605_default;
9839 + info->fix = s1d15605_fix;
9840 + info->flags = FBINFO_FLAG_DEFAULT |
9841 +/* FBINFO_HWACCEL_YPAN | */
9842 + FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
9844 + ret = register_framebuffer(info);
9846 + dev_err(dev, "Failed to register framebuffer device: %d\n", ret);
9850 + dev_set_drvdata(dev, info);
9852 + memset(info->screen_base, 0, info->fix.smem_len);
9853 + info->var.activate |= FB_ACTIVATE_NOW;
9854 + ret = fb_set_var(info, &info->var);
9856 + dev_warn(dev, "Unable to set display parameters\n");
9859 + info->var.activate &= ~(FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW);
9861 + dev_dbg(dev, "%s SUCCESS\n", __func__);
9863 + dev_info(dev, "Driver $Revision: 1.1 $\n");
9868 + iounmap(sinfo->mmio);
9870 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9872 + kfree(info->screen_base);
9875 + framebuffer_release(info);
9877 + dev_dbg(dev, "%s FAILED\n", __func__);
9882 +static int s1d15605fb_remove(struct platform_device *pdev)
9884 + struct device *dev = &pdev->dev;
9885 + struct fb_info *info = dev_get_drvdata(dev);
9886 + struct s1d15605fb_info *sinfo = info->par;
9891 + unregister_framebuffer(info);
9893 + iounmap(sinfo->mmio);
9894 + release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
9896 + kfree(info->screen_base);
9898 + dev_set_drvdata(dev, NULL);
9899 + framebuffer_release(info);
9904 +static struct platform_driver s1d15605fb_driver = {
9905 + .probe = s1d15605fb_probe,
9906 + .remove = s1d15605fb_remove,
9908 + .name = "s1d15605fb",
9909 + .owner = THIS_MODULE,
9914 +static int __init s1d15605fb_init(void)
9916 + return platform_driver_register(&s1d15605fb_driver);
9920 +static void __exit s1d15605fb_exit(void)
9922 + platform_driver_unregister(&s1d15605fb_driver);
9926 +module_init(s1d15605fb_init);
9927 +module_exit(s1d15605fb_exit);
9930 +MODULE_AUTHOR("KwikByte");
9931 +MODULE_DESCRIPTION("Epson S1D15605 LCD Controller framebuffer driver");
9932 +MODULE_LICENSE("GPL");