First patches to get to .21 kernel
authorHamish Guthrie <hcg@openwrt.org>
Mon, 28 May 2007 13:00:05 +0000 (13:00 +0000)
committerHamish Guthrie <hcg@openwrt.org>
Mon, 28 May 2007 13:00:05 +0000 (13:00 +0000)
SVN-Revision: 7365

target/linux/at91-2.6/config/default
target/linux/at91-2.6/patches/000-at91patches.patch
target/linux/at91-2.6/patches/001-vlink-machine.patch
target/linux/at91-2.6/patches/002-led-driver.patch

index 79b053a47e3e8ef889163ee23cd77ee03dcaa896..14a9b8c09a25aba0ef6efde3fb215857af78bb4e 100644 (file)
@@ -1,12 +1,13 @@
 # CONFIG_AEABI is not set
 CONFIG_ALIGNMENT_TRAP=y
-# CONFIG_APM is not set
 # CONFIG_ARCH_AAEC2000 is not set
 CONFIG_ARCH_AT91=y
 CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_AT91RM9200DK is not set
 # CONFIG_ARCH_AT91SAM9260 is not set
 # CONFIG_ARCH_AT91SAM9261 is not set
+# CONFIG_ARCH_AT91SAM9263 is not set
+# CONFIG_ARCH_AT91SAM9RL is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CO285 is not set
@@ -15,8 +16,11 @@ CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 # CONFIG_ARCH_IMX is not set
 # CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IOP32X is not set
 # CONFIG_ARCH_IOP33X is not set
 # CONFIG_ARCH_IXP2000 is not set
@@ -25,6 +29,7 @@ CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_OMAP is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
@@ -41,12 +46,13 @@ CONFIG_ARM_THUMB=y
 # CONFIG_ARTHUR is not set
 # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
 CONFIG_AT91_SPI=y
-CONFIG_AT91_SPIDEV=y
-CONFIG_AT91_VLIO=y
+# CONFIG_AT91_SPIDEV is not set
+# CONFIG_ATMEL_TCLIB is not set
 # CONFIG_ATM_DUMMY is not set
 # CONFIG_ATM_TCP is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_BINFMT_AOUT is not set
+CONFIG_BITREVERSE=y
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
@@ -55,6 +61,7 @@ CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 # CONFIG_BONDING is not set
 # CONFIG_BRIDGE_NETFILTER is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_BSD_DISKLABEL is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_BT is not set
@@ -102,7 +109,6 @@ CONFIG_DAVICOM_PHY=y
 # CONFIG_DEBUG_USER is not set
 # CONFIG_DM9000 is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FIXED_PHY is not set
 # CONFIG_FPE_FASTFPE is not set
 CONFIG_FPE_NWFPE=y
@@ -110,11 +116,15 @@ CONFIG_FPE_NWFPE=y
 CONFIG_FRAME_POINTER=y
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_FW_LOADER is not set
+CONFIG_GENERIC_GPIO=y
 # CONFIG_GENERIC_TIME is not set
 CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
 CONFIG_HW_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
-CONFIG_HZ=100
 # CONFIG_I2C is not set
 # CONFIG_IEEE80211 is not set
 # CONFIG_IKCONFIG is not set
@@ -136,9 +146,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_IP6_NF_TARGET_LOG is not set
 # CONFIG_IP_DCCP is not set
 # CONFIG_IP_NF_ARPTABLES is not set
-# CONFIG_IP_NF_CT_PROTO_SCTP is not set
 # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
 # CONFIG_IP_NF_TARGET_LOG is not set
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
@@ -154,23 +162,22 @@ CONFIG_LEGACY_PTY_COUNT=32
 # CONFIG_MACH_AT91RM9200EK is not set
 # CONFIG_MACH_ATEB9200 is not set
 # CONFIG_MACH_CARMEVA is not set
+# CONFIG_MACH_CHUB is not set
 # CONFIG_MACH_CSB337 is not set
 # CONFIG_MACH_CSB637 is not set
 # CONFIG_MACH_KAFA is not set
 # CONFIG_MACH_KB9200 is not set
 # CONFIG_MACH_ONEARM is not set
 CONFIG_MACH_VLINK=y
-CONFIG_MINI_FO=y
 CONFIG_MMC=m
 CONFIG_MMC_AT91=m
 CONFIG_MMC_BLOCK=m
 # CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_TIFM_SD is not set
 CONFIG_MTD=y
 # CONFIG_MTD_ABSENT is not set
 # CONFIG_MTD_AFS_PARTS is not set
-CONFIG_MTD_AT91_DATAFLASH=y
-CONFIG_MTD_AT91_PARTS=y
+# CONFIG_MTD_AT91_DATAFLASH is not set
+CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_MTD_BLOCK2MTD is not set
 # CONFIG_MTD_CFI is not set
@@ -217,16 +224,17 @@ CONFIG_MTD_PARTITIONS=y
 # CONFIG_NET_IPGRE_BROADCAST is not set
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_RADIO is not set
+CONFIG_NET_SCH_FIFO=y
 # CONFIG_NET_SCH_NETEM is not set
 # CONFIG_NEW_LEDS is not set
 # CONFIG_NO_IDLE_HZ is not set
+# CONFIG_NO_IOPORT is not set
 # CONFIG_NTFS_FS is not set
 # CONFIG_NVRAM is not set
-# CONFIG_PCCARD is not set
+# CONFIG_OUTER_CACHE is not set
 CONFIG_PHYLIB=y
-# CONFIG_PM is not set
+# CONFIG_PNPACPI is not set
 # CONFIG_PPPOATM is not set
-# CONFIG_PPPOL2TP is not set
 # CONFIG_PPP_MULTILINK is not set
 # CONFIG_PPP_SYNC_TTY is not set
 # CONFIG_QSEMI_PHY is not set
@@ -247,6 +255,8 @@ CONFIG_SERIO_SERPORT=y
 # CONFIG_SOUND is not set
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_UID16=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_USB is not set
index a5581d21781efd8c9773cccc4eef1e9465420b95..93fa2cf03c365c0a556c807c1f0c74ae237479a0 100644 (file)
-diff -urN -x CVS linux-2.6.19-final/arch/arm/Kconfig linux-2.6.19/arch/arm/Kconfig
---- linux-2.6.19-final/arch/arm/Kconfig        Mon Dec  4 16:39:27 2006
-+++ linux-2.6.19/arch/arm/Kconfig      Thu Nov 30 09:08:02 2006
-@@ -583,7 +591,7 @@
-                  ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
-                  ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
-                  ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
--                 ARCH_AT91RM9200 || MACH_TRIZEPS4
-+                 ARCH_AT91 || MACH_TRIZEPS4
-       help
-         If you say Y here, the LEDs on your machine will be used
-         to provide useful information about your current system status.
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/at91rm9200dk_defconfig linux-2.6.19/arch/arm/configs/at91rm9200dk_defconfig
---- linux-2.6.19-final/arch/arm/configs/at91rm9200dk_defconfig Mon Dec  4 16:39:28 2006
-+++ linux-2.6.19/arch/arm/configs/at91rm9200dk_defconfig       Mon Nov 20 10:46:02 2006
-@@ -357,9 +357,9 @@
- #
- # CONFIG_MTD_COMPLEX_MAPPINGS is not set
- CONFIG_MTD_PHYSMAP=y
--CONFIG_MTD_PHYSMAP_START=0x10000000
--CONFIG_MTD_PHYSMAP_LEN=0x200000
--CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-+CONFIG_MTD_PHYSMAP_START=0
-+CONFIG_MTD_PHYSMAP_LEN=0
-+CONFIG_MTD_PHYSMAP_BANKWIDTH=0
- # CONFIG_MTD_ARM_INTEGRATOR is not set
- # CONFIG_MTD_IMPA7 is not set
- # CONFIG_MTD_PLATRAM is not set
-@@ -585,7 +585,9 @@
- # CONFIG_USBPCWATCHDOG is not set
- # CONFIG_NVRAM is not set
- # CONFIG_RTC is not set
--CONFIG_AT91_RTC=y
-+CONFIG_RTC_LIB=y
-+CONFIG_RTC_CLASS=y
-+CONFIG_RTC_DRV_AT91RM9200=y
- # CONFIG_DTLK is not set
- # CONFIG_R3964 is not set
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/at91rm9200ek_defconfig linux-2.6.19/arch/arm/configs/at91rm9200ek_defconfig
---- linux-2.6.19-final/arch/arm/configs/at91rm9200ek_defconfig Mon Dec  4 16:39:28 2006
-+++ linux-2.6.19/arch/arm/configs/at91rm9200ek_defconfig       Mon Nov 20 10:45:49 2006
-@@ -348,9 +348,9 @@
- #
- # CONFIG_MTD_COMPLEX_MAPPINGS is not set
- CONFIG_MTD_PHYSMAP=y
--CONFIG_MTD_PHYSMAP_START=0x10000000
--CONFIG_MTD_PHYSMAP_LEN=0x800000
--CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-+CONFIG_MTD_PHYSMAP_START=0
-+CONFIG_MTD_PHYSMAP_LEN=0
-+CONFIG_MTD_PHYSMAP_BANKWIDTH=0
- # CONFIG_MTD_ARM_INTEGRATOR is not set
- # CONFIG_MTD_IMPA7 is not set
- # CONFIG_MTD_PLATRAM is not set
-@@ -566,7 +566,9 @@
- # CONFIG_USBPCWATCHDOG is not set
- # CONFIG_NVRAM is not set
- # CONFIG_RTC is not set
--CONFIG_AT91_RTC=y
-+CONFIG_RTC_LIB=y
-+CONFIG_RTC_CLASS=y
-+CONFIG_RTC_DRV_AT91RM9200=y
- # CONFIG_DTLK is not set
- # CONFIG_R3964 is not set
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/at91sam9260ek_defconfig linux-2.6.19/arch/arm/configs/at91sam9260ek_defconfig
---- linux-2.6.19-final/arch/arm/configs/at91sam9260ek_defconfig        Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/configs/at91sam9260ek_defconfig      Mon Nov 20 10:51:08 2006
-@@ -0,0 +1,950 @@
-+#
-+# Automatically generated make config: don't edit
-+# Linux kernel version: 2.6.19-rc6
-+# Fri Nov 17 18:42:21 2006
-+#
-+CONFIG_ARM=y
-+# CONFIG_GENERIC_TIME is not set
-+CONFIG_MMU=y
-+CONFIG_GENERIC_HARDIRQS=y
-+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-+CONFIG_HARDIRQS_SW_RESEND=y
-+CONFIG_GENERIC_IRQ_PROBE=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_GENERIC_HWEIGHT=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_VECTORS_BASE=0xffff0000
-+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-+
-+#
-+# Code maturity level options
-+#
-+CONFIG_EXPERIMENTAL=y
-+CONFIG_BROKEN_ON_SMP=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+
-+#
-+# General setup
-+#
-+CONFIG_LOCALVERSION=""
-+# CONFIG_LOCALVERSION_AUTO is not set
-+# CONFIG_SWAP is not set
-+CONFIG_SYSVIPC=y
-+# CONFIG_IPC_NS is not set
-+# CONFIG_POSIX_MQUEUE is not set
-+# CONFIG_BSD_PROCESS_ACCT is not set
-+# CONFIG_TASKSTATS is not set
-+# CONFIG_UTS_NS is not set
-+# CONFIG_AUDIT is not set
-+# CONFIG_IKCONFIG is not set
-+# CONFIG_RELAY is not set
-+CONFIG_INITRAMFS_SOURCE=""
-+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-+CONFIG_SYSCTL=y
-+# CONFIG_EMBEDDED is not set
-+CONFIG_UID16=y
-+CONFIG_SYSCTL_SYSCALL=y
-+CONFIG_KALLSYMS=y
-+# CONFIG_KALLSYMS_ALL is not set
-+# CONFIG_KALLSYMS_EXTRA_PASS is not set
-+CONFIG_HOTPLUG=y
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_ELF_CORE=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_SHMEM=y
-+CONFIG_SLAB=y
-+CONFIG_VM_EVENT_COUNTERS=y
-+CONFIG_RT_MUTEXES=y
-+# CONFIG_TINY_SHMEM is not set
-+CONFIG_BASE_SMALL=0
-+# CONFIG_SLOB is not set
-+
-+#
-+# Loadable module support
-+#
-+CONFIG_MODULES=y
-+CONFIG_MODULE_UNLOAD=y
-+# CONFIG_MODULE_FORCE_UNLOAD is not set
-+# CONFIG_MODVERSIONS is not set
-+# CONFIG_MODULE_SRCVERSION_ALL is not set
-+CONFIG_KMOD=y
-+
-+#
-+# Block layer
-+#
-+CONFIG_BLOCK=y
-+# CONFIG_BLK_DEV_IO_TRACE is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
-+CONFIG_IOSCHED_AS=y
-+# CONFIG_IOSCHED_DEADLINE is not set
-+# CONFIG_IOSCHED_CFQ is not set
-+CONFIG_DEFAULT_AS=y
-+# CONFIG_DEFAULT_DEADLINE is not set
-+# CONFIG_DEFAULT_CFQ is not set
-+# CONFIG_DEFAULT_NOOP is not set
-+CONFIG_DEFAULT_IOSCHED="anticipatory"
-+
-+#
-+# System Type
-+#
-+# CONFIG_ARCH_AAEC2000 is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_REALVIEW is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+CONFIG_ARCH_AT91=y
-+# CONFIG_ARCH_CLPS7500 is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_CO285 is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_EP93XX is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_NETX is not set
-+# CONFIG_ARCH_H720X is not set
-+# CONFIG_ARCH_IMX is not set
-+# CONFIG_ARCH_IOP32X is not set
-+# CONFIG_ARCH_IOP33X is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_IXP2000 is not set
-+# CONFIG_ARCH_IXP23XX is not set
-+# CONFIG_ARCH_L7200 is not set
-+# CONFIG_ARCH_PNX4008 is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C2410 is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_LH7A40X is not set
-+# CONFIG_ARCH_OMAP is not set
-+
-+#
-+# Atmel AT91 System-on-Chip
-+#
-+# CONFIG_ARCH_AT91RM9200 is not set
-+CONFIG_ARCH_AT91SAM9260=y
-+# CONFIG_ARCH_AT91SAM9261 is not set
-+
-+#
-+# AT91SAM9260 Board Type
-+#
-+CONFIG_MACH_AT91SAM9260EK=y
-+
-+#
-+# AT91 Board Options
-+#
-+# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
-+
-+#
-+# AT91 Feature Selections
-+#
-+# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_32=y
-+CONFIG_CPU_ARM926T=y
-+CONFIG_CPU_32v5=y
-+CONFIG_CPU_ABRT_EV5TJ=y
-+CONFIG_CPU_CACHE_VIVT=y
-+CONFIG_CPU_COPY_V4WB=y
-+CONFIG_CPU_TLB_V4WBI=y
-+CONFIG_CPU_CP15=y
-+CONFIG_CPU_CP15_MMU=y
-+
-+#
-+# Processor Features
-+#
-+# CONFIG_ARM_THUMB is not set
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
-+
-+#
-+# Bus support
-+#
-+
-+#
-+# PCCARD (PCMCIA/CardBus) support
-+#
-+# CONFIG_PCCARD is not set
-+
-+#
-+# Kernel Features
-+#
-+# CONFIG_PREEMPT is not set
-+# CONFIG_NO_IDLE_HZ is not set
-+CONFIG_HZ=100
-+# CONFIG_AEABI is not set
-+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
-+CONFIG_SELECT_MEMORY_MODEL=y
-+CONFIG_FLATMEM_MANUAL=y
-+# CONFIG_DISCONTIGMEM_MANUAL is not set
-+# CONFIG_SPARSEMEM_MANUAL is not set
-+CONFIG_FLATMEM=y
-+CONFIG_FLAT_NODE_MEM_MAP=y
-+# CONFIG_SPARSEMEM_STATIC is not set
-+CONFIG_SPLIT_PTLOCK_CPUS=4096
-+# CONFIG_RESOURCES_64BIT is not set
-+# CONFIG_LEDS is not set
-+CONFIG_ALIGNMENT_TRAP=y
-+
-+#
-+# Boot options
-+#
-+CONFIG_ZBOOT_ROM_TEXT=0x0
-+CONFIG_ZBOOT_ROM_BSS=0x0
-+CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
-+# CONFIG_XIP_KERNEL is not set
-+
-+#
-+# Floating point emulation
-+#
-+
-+#
-+# At least one emulation must be selected
-+#
-+CONFIG_FPE_NWFPE=y
-+# CONFIG_FPE_NWFPE_XP is not set
-+# CONFIG_FPE_FASTFPE is not set
-+# CONFIG_VFP is not set
-+
-+#
-+# Userspace binary formats
-+#
-+CONFIG_BINFMT_ELF=y
-+# CONFIG_BINFMT_AOUT is not set
-+# CONFIG_BINFMT_MISC is not set
-+# CONFIG_ARTHUR is not set
-+
-+#
-+# Power management options
-+#
-+# CONFIG_PM is not set
-+# CONFIG_APM is not set
-+
-+#
-+# Networking
-+#
-+CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
-+# CONFIG_NETDEBUG is not set
-+CONFIG_PACKET=y
-+# CONFIG_PACKET_MMAP is not set
-+CONFIG_UNIX=y
-+CONFIG_XFRM=y
-+# CONFIG_XFRM_USER is not set
-+# CONFIG_XFRM_SUB_POLICY is not set
-+# CONFIG_NET_KEY is not set
-+CONFIG_INET=y
-+# CONFIG_IP_MULTICAST is not set
-+# CONFIG_IP_ADVANCED_ROUTER is not set
-+CONFIG_IP_FIB_HASH=y
-+CONFIG_IP_PNP=y
-+# CONFIG_IP_PNP_DHCP is not set
-+CONFIG_IP_PNP_BOOTP=y
-+# CONFIG_IP_PNP_RARP is not set
-+# CONFIG_NET_IPIP is not set
-+# CONFIG_NET_IPGRE is not set
-+# CONFIG_ARPD is not set
-+# CONFIG_SYN_COOKIES is not set
-+# CONFIG_INET_AH is not set
-+# CONFIG_INET_ESP is not set
-+# CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_XFRM_TUNNEL is not set
-+# CONFIG_INET_TUNNEL is not set
-+CONFIG_INET_XFRM_MODE_TRANSPORT=y
-+CONFIG_INET_XFRM_MODE_TUNNEL=y
-+CONFIG_INET_XFRM_MODE_BEET=y
-+CONFIG_INET_DIAG=y
-+CONFIG_INET_TCP_DIAG=y
-+# CONFIG_TCP_CONG_ADVANCED is not set
-+CONFIG_TCP_CONG_CUBIC=y
-+CONFIG_DEFAULT_TCP_CONG="cubic"
-+# CONFIG_IPV6 is not set
-+# CONFIG_INET6_XFRM_TUNNEL is not set
-+# CONFIG_INET6_TUNNEL is not set
-+# CONFIG_NETWORK_SECMARK is not set
-+# CONFIG_NETFILTER is not set
-+
-+#
-+# DCCP Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_IP_DCCP is not set
-+
-+#
-+# SCTP Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_IP_SCTP is not set
-+
-+#
-+# TIPC Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_TIPC is not set
-+# CONFIG_ATM is not set
-+# CONFIG_BRIDGE is not set
-+# CONFIG_VLAN_8021Q is not set
-+# CONFIG_DECNET is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_ECONET is not set
-+# CONFIG_WAN_ROUTER is not set
-+
-+#
-+# QoS and/or fair queueing
-+#
-+# CONFIG_NET_SCHED is not set
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_IRDA is not set
-+# CONFIG_BT is not set
-+# CONFIG_IEEE80211 is not set
-+
-+#
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+# CONFIG_FW_LOADER is not set
-+# CONFIG_DEBUG_DRIVER is not set
-+# CONFIG_SYS_HYPERVISOR is not set
-+
-+#
-+# Connector - unified userspace <-> kernelspace linker
-+#
-+# CONFIG_CONNECTOR is not set
-+
-+#
-+# Memory Technology Devices (MTD)
-+#
-+# CONFIG_MTD is not set
-+
-+#
-+# Parallel port support
-+#
-+# CONFIG_PARPORT is not set
-+
-+#
-+# Plug and Play support
-+#
-+
-+#
-+# Block devices
-+#
-+# CONFIG_BLK_DEV_COW_COMMON is not set
-+# CONFIG_BLK_DEV_LOOP is not set
-+# CONFIG_BLK_DEV_NBD is not set
-+# CONFIG_BLK_DEV_UB is not set
-+CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_COUNT=16
-+CONFIG_BLK_DEV_RAM_SIZE=8192
-+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-+CONFIG_BLK_DEV_INITRD=y
-+# CONFIG_CDROM_PKTCDVD is not set
-+# CONFIG_ATA_OVER_ETH is not set
-+
-+#
-+# SCSI device support
-+#
-+# CONFIG_RAID_ATTRS is not set
-+CONFIG_SCSI=y
-+# CONFIG_SCSI_NETLINK is not set
-+CONFIG_SCSI_PROC_FS=y
-+
-+#
-+# SCSI support type (disk, tape, CD-ROM)
-+#
-+CONFIG_BLK_DEV_SD=y
-+# CONFIG_CHR_DEV_ST is not set
-+# CONFIG_CHR_DEV_OSST is not set
-+# CONFIG_BLK_DEV_SR is not set
-+# CONFIG_CHR_DEV_SG is not set
-+# CONFIG_CHR_DEV_SCH is not set
-+
-+#
-+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-+#
-+CONFIG_SCSI_MULTI_LUN=y
-+# CONFIG_SCSI_CONSTANTS is not set
-+# CONFIG_SCSI_LOGGING is not set
-+
-+#
-+# SCSI Transports
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+# CONFIG_SCSI_SAS_ATTRS is not set
-+# CONFIG_SCSI_SAS_LIBSAS is not set
-+
-+#
-+# SCSI low-level drivers
-+#
-+# CONFIG_ISCSI_TCP is not set
-+# CONFIG_SCSI_DEBUG is not set
-+
-+#
-+# Multi-device support (RAID and LVM)
-+#
-+# CONFIG_MD is not set
-+
-+#
-+# Fusion MPT device support
-+#
-+# CONFIG_FUSION is not set
-+
-+#
-+# IEEE 1394 (FireWire) support
-+#
-+
-+#
-+# I2O device support
-+#
-+
-+#
-+# Network device support
-+#
-+# CONFIG_NETDEVICES is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+
-+#
-+# ISDN subsystem
-+#
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+# CONFIG_INPUT_FF_MEMLESS is not set
-+
-+#
-+# Userland interfaces
-+#
-+CONFIG_INPUT_MOUSEDEV=y
-+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-+# CONFIG_INPUT_JOYDEV is not set
-+# CONFIG_INPUT_TSDEV is not set
-+# CONFIG_INPUT_EVDEV is not set
-+# CONFIG_INPUT_EVBUG is not set
-+
-+#
-+# Input Device Drivers
-+#
-+# CONFIG_INPUT_KEYBOARD is not set
-+# CONFIG_INPUT_MOUSE is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TOUCHSCREEN is not set
-+# CONFIG_INPUT_MISC is not set
-+
-+#
-+# Hardware I/O ports
-+#
-+# CONFIG_SERIO is not set
-+# CONFIG_GAMEPORT is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_HW_CONSOLE=y
-+# CONFIG_VT_HW_CONSOLE_BINDING is not set
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+
-+#
-+# Serial drivers
-+#
-+# CONFIG_SERIAL_8250 is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+CONFIG_SERIAL_ATMEL=y
-+CONFIG_SERIAL_ATMEL_CONSOLE=y
-+# CONFIG_SERIAL_ATMEL_TTYAT is not set
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+CONFIG_UNIX98_PTYS=y
-+CONFIG_LEGACY_PTYS=y
-+CONFIG_LEGACY_PTY_COUNT=256
-+
-+#
-+# IPMI
-+#
-+# CONFIG_IPMI_HANDLER is not set
-+
-+#
-+# Watchdog Cards
-+#
-+CONFIG_WATCHDOG=y
-+CONFIG_WATCHDOG_NOWAYOUT=y
-+
-+#
-+# Watchdog Device Drivers
-+#
-+# CONFIG_SOFT_WATCHDOG is not set
-+
-+#
-+# USB-based Watchdog Cards
-+#
-+# CONFIG_USBPCWATCHDOG is not set
-+CONFIG_HW_RANDOM=y
-+# CONFIG_NVRAM is not set
-+# CONFIG_DTLK is not set
-+# CONFIG_R3964 is not set
-+
-+#
-+# Ftape, the floppy tape device driver
-+#
-+# CONFIG_RAW_DRIVER is not set
-+
-+#
-+# TPM devices
-+#
-+# CONFIG_TCG_TPM is not set
-+
-+#
-+# I2C support
-+#
-+# CONFIG_I2C is not set
-+
-+#
-+# SPI support
-+#
-+# CONFIG_SPI is not set
-+# CONFIG_SPI_MASTER is not set
-+
-+#
-+# Dallas's 1-wire bus
-+#
-+# CONFIG_W1 is not set
-+
-+#
-+# Hardware Monitoring support
-+#
-+# CONFIG_HWMON is not set
-+# CONFIG_HWMON_VID is not set
-+
-+#
-+# Misc devices
-+#
-+# CONFIG_TIFM_CORE is not set
-+
-+#
-+# LED devices
-+#
-+# CONFIG_NEW_LEDS is not set
-+
-+#
-+# LED drivers
-+#
-+
-+#
-+# LED Triggers
-+#
-+
-+#
-+# Multimedia devices
-+#
-+# CONFIG_VIDEO_DEV is not set
-+
-+#
-+# Digital Video Broadcasting Devices
-+#
-+# CONFIG_DVB is not set
-+# CONFIG_USB_DABUSB is not set
-+
-+#
-+# Graphics support
-+#
-+# CONFIG_FIRMWARE_EDID is not set
-+# CONFIG_FB is not set
-+
-+#
-+# Console display driver support
-+#
-+# CONFIG_VGA_CONSOLE is not set
-+CONFIG_DUMMY_CONSOLE=y
-+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-+
-+#
-+# Sound
-+#
-+# CONFIG_SOUND is not set
-+
-+#
-+# USB support
-+#
-+CONFIG_USB_ARCH_HAS_HCD=y
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+# CONFIG_USB_ARCH_HAS_EHCI is not set
-+CONFIG_USB=y
-+# CONFIG_USB_DEBUG is not set
-+
-+#
-+# Miscellaneous USB options
-+#
-+CONFIG_USB_DEVICEFS=y
-+# CONFIG_USB_BANDWIDTH is not set
-+# CONFIG_USB_DYNAMIC_MINORS is not set
-+# CONFIG_USB_OTG is not set
-+
-+#
-+# USB Host Controller Drivers
-+#
-+# CONFIG_USB_ISP116X_HCD is not set
-+CONFIG_USB_OHCI_HCD=y
-+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-+# CONFIG_USB_SL811_HCD is not set
-+
-+#
-+# USB Device Class drivers
-+#
-+# CONFIG_USB_ACM is not set
-+# CONFIG_USB_PRINTER is not set
-+
-+#
-+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-+#
-+
-+#
-+# may also be needed; see USB_STORAGE Help for more information
-+#
-+CONFIG_USB_STORAGE=y
-+CONFIG_USB_STORAGE_DEBUG=y
-+# CONFIG_USB_STORAGE_DATAFAB is not set
-+# CONFIG_USB_STORAGE_FREECOM is not set
-+# CONFIG_USB_STORAGE_DPCM is not set
-+# CONFIG_USB_STORAGE_USBAT is not set
-+# CONFIG_USB_STORAGE_SDDR09 is not set
-+# CONFIG_USB_STORAGE_SDDR55 is not set
-+# CONFIG_USB_STORAGE_JUMPSHOT is not set
-+# CONFIG_USB_STORAGE_ALAUDA is not set
-+# CONFIG_USB_STORAGE_KARMA is not set
-+# CONFIG_USB_LIBUSUAL is not set
-+
-+#
-+# USB Input Devices
-+#
-+# CONFIG_USB_HID is not set
-+
-+#
-+# USB HID Boot Protocol drivers
-+#
-+# CONFIG_USB_KBD is not set
-+# CONFIG_USB_MOUSE is not set
-+# CONFIG_USB_AIPTEK is not set
-+# CONFIG_USB_WACOM is not set
-+# CONFIG_USB_ACECAD is not set
-+# CONFIG_USB_KBTAB is not set
-+# CONFIG_USB_POWERMATE is not set
-+# CONFIG_USB_TOUCHSCREEN is not set
-+# CONFIG_USB_YEALINK is not set
-+# CONFIG_USB_XPAD is not set
-+# CONFIG_USB_ATI_REMOTE is not set
-+# CONFIG_USB_ATI_REMOTE2 is not set
-+# CONFIG_USB_KEYSPAN_REMOTE is not set
-+# CONFIG_USB_APPLETOUCH is not set
-+
-+#
-+# USB Imaging devices
-+#
-+# CONFIG_USB_MDC800 is not set
-+# CONFIG_USB_MICROTEK is not set
-+
-+#
-+# USB Network Adapters
-+#
-+# CONFIG_USB_CATC is not set
-+# CONFIG_USB_KAWETH is not set
-+# CONFIG_USB_PEGASUS is not set
-+# CONFIG_USB_RTL8150 is not set
-+# CONFIG_USB_USBNET_MII is not set
-+# CONFIG_USB_USBNET is not set
-+CONFIG_USB_MON=y
-+
-+#
-+# USB port drivers
-+#
-+
-+#
-+# USB Serial Converter support
-+#
-+# CONFIG_USB_SERIAL is not set
-+
-+#
-+# USB Miscellaneous drivers
-+#
-+# CONFIG_USB_EMI62 is not set
-+# CONFIG_USB_EMI26 is not set
-+# CONFIG_USB_ADUTUX is not set
-+# CONFIG_USB_AUERSWALD is not set
-+# CONFIG_USB_RIO500 is not set
-+# CONFIG_USB_LEGOTOWER is not set
-+# CONFIG_USB_LCD is not set
-+# CONFIG_USB_LED is not set
-+# CONFIG_USB_CYPRESS_CY7C63 is not set
-+# CONFIG_USB_CYTHERM is not set
-+# CONFIG_USB_PHIDGET is not set
-+# CONFIG_USB_IDMOUSE is not set
-+# CONFIG_USB_FTDI_ELAN is not set
-+# CONFIG_USB_APPLEDISPLAY is not set
-+# CONFIG_USB_LD is not set
-+# CONFIG_USB_TRANCEVIBRATOR is not set
-+# CONFIG_USB_TEST is not set
-+
-+#
-+# USB DSL modem support
-+#
-+
-+#
-+# USB Gadget Support
-+#
-+CONFIG_USB_GADGET=y
-+# CONFIG_USB_GADGET_DEBUG_FILES is not set
-+CONFIG_USB_GADGET_SELECTED=y
-+# CONFIG_USB_GADGET_NET2280 is not set
-+# CONFIG_USB_GADGET_PXA2XX is not set
-+# CONFIG_USB_GADGET_GOKU is not set
-+# CONFIG_USB_GADGET_LH7A40X is not set
-+# CONFIG_USB_GADGET_OMAP is not set
-+CONFIG_USB_GADGET_AT91=y
-+CONFIG_USB_AT91=y
-+# CONFIG_USB_GADGET_DUMMY_HCD is not set
-+# CONFIG_USB_GADGET_DUALSPEED is not set
-+CONFIG_USB_ZERO=m
-+# CONFIG_USB_ETH is not set
-+CONFIG_USB_GADGETFS=m
-+CONFIG_USB_FILE_STORAGE=m
-+# CONFIG_USB_FILE_STORAGE_TEST is not set
-+CONFIG_USB_G_SERIAL=m
-+# CONFIG_USB_MIDI_GADGET is not set
-+
-+#
-+# MMC/SD Card support
-+#
-+# CONFIG_MMC is not set
-+
-+#
-+# Real Time Clock
-+#
-+CONFIG_RTC_LIB=y
-+# CONFIG_RTC_CLASS is not set
-+
-+#
-+# File systems
-+#
-+CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT2_FS_XIP is not set
-+# CONFIG_EXT3_FS is not set
-+# CONFIG_EXT4DEV_FS is not set
-+# CONFIG_REISERFS_FS is not set
-+# CONFIG_JFS_FS is not set
-+# CONFIG_FS_POSIX_ACL is not set
-+# CONFIG_XFS_FS is not set
-+# CONFIG_GFS2_FS is not set
-+# CONFIG_OCFS2_FS is not set
-+# CONFIG_MINIX_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+CONFIG_INOTIFY=y
-+CONFIG_INOTIFY_USER=y
-+# CONFIG_QUOTA is not set
-+CONFIG_DNOTIFY=y
-+# CONFIG_AUTOFS_FS is not set
-+# CONFIG_AUTOFS4_FS is not set
-+# CONFIG_FUSE_FS is not set
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=y
-+# CONFIG_MSDOS_FS is not set
-+CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_PROC_SYSCTL=y
-+CONFIG_SYSFS=y
-+CONFIG_TMPFS=y
-+# CONFIG_TMPFS_POSIX_ACL is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+CONFIG_RAMFS=y
-+# CONFIG_CONFIGFS_FS is not set
-+
-+#
-+# Miscellaneous filesystems
-+#
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
-+CONFIG_CRAMFS=y
-+# CONFIG_VXFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+
-+#
-+# Network File Systems
-+#
-+# CONFIG_NFS_FS is not set
-+# CONFIG_NFSD is not set
-+# CONFIG_SMB_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+# CONFIG_9P_FS is not set
-+
-+#
-+# Partition Types
-+#
-+# CONFIG_PARTITION_ADVANCED is not set
-+CONFIG_MSDOS_PARTITION=y
-+
-+#
-+# Native Language Support
-+#
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
-+CONFIG_NLS_CODEPAGE_437=y
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+CONFIG_NLS_CODEPAGE_850=y
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
-+CONFIG_NLS_ISO8859_1=y
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_UTF8 is not set
-+
-+#
-+# Profiling support
-+#
-+# CONFIG_PROFILING is not set
-+
-+#
-+# Kernel hacking
-+#
-+# CONFIG_PRINTK_TIME is not set
-+CONFIG_ENABLE_MUST_CHECK=y
-+# CONFIG_MAGIC_SYSRQ is not set
-+# CONFIG_UNUSED_SYMBOLS is not set
-+CONFIG_DEBUG_KERNEL=y
-+CONFIG_LOG_BUF_SHIFT=14
-+CONFIG_DETECT_SOFTLOCKUP=y
-+# CONFIG_SCHEDSTATS is not set
-+# CONFIG_DEBUG_SLAB is not set
-+# CONFIG_DEBUG_RT_MUTEXES is not set
-+# CONFIG_RT_MUTEX_TESTER is not set
-+# CONFIG_DEBUG_SPINLOCK is not set
-+# CONFIG_DEBUG_MUTEXES is not set
-+# CONFIG_DEBUG_RWSEMS is not set
-+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+CONFIG_DEBUG_BUGVERBOSE=y
-+# CONFIG_DEBUG_INFO is not set
-+# CONFIG_DEBUG_FS is not set
-+# CONFIG_DEBUG_VM is not set
-+# CONFIG_DEBUG_LIST is not set
-+CONFIG_FRAME_POINTER=y
-+CONFIG_FORCED_INLINING=y
-+# CONFIG_HEADERS_CHECK is not set
-+# CONFIG_RCU_TORTURE_TEST is not set
-+CONFIG_DEBUG_USER=y
-+# CONFIG_DEBUG_WAITQ is not set
-+# CONFIG_DEBUG_ERRORS is not set
-+CONFIG_DEBUG_LL=y
-+# CONFIG_DEBUG_ICEDCC is not set
-+
-+#
-+# Security options
-+#
-+# CONFIG_KEYS is not set
-+# CONFIG_SECURITY is not set
-+
-+#
-+# Cryptographic options
-+#
-+# CONFIG_CRYPTO is not set
-+
-+#
-+# Library routines
-+#
-+# CONFIG_CRC_CCITT is not set
-+# CONFIG_CRC16 is not set
-+CONFIG_CRC32=y
-+# CONFIG_LIBCRC32C is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_PLIST=y
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/at91sam9261ek_defconfig linux-2.6.19/arch/arm/configs/at91sam9261ek_defconfig
---- linux-2.6.19-final/arch/arm/configs/at91sam9261ek_defconfig        Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/configs/at91sam9261ek_defconfig      Mon Nov 20 10:51:08 2006
-@@ -0,0 +1,1106 @@
-+#
-+# Automatically generated make config: don't edit
-+# Linux kernel version: 2.6.19-rc6
-+# Fri Nov 17 18:00:38 2006
-+#
-+CONFIG_ARM=y
-+# CONFIG_GENERIC_TIME is not set
-+CONFIG_MMU=y
-+CONFIG_GENERIC_HARDIRQS=y
-+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-+CONFIG_HARDIRQS_SW_RESEND=y
-+CONFIG_GENERIC_IRQ_PROBE=y
-+CONFIG_RWSEM_GENERIC_SPINLOCK=y
-+CONFIG_GENERIC_HWEIGHT=y
-+CONFIG_GENERIC_CALIBRATE_DELAY=y
-+CONFIG_VECTORS_BASE=0xffff0000
-+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-+
-+#
-+# Code maturity level options
-+#
-+CONFIG_EXPERIMENTAL=y
-+CONFIG_BROKEN_ON_SMP=y
-+CONFIG_INIT_ENV_ARG_LIMIT=32
-+
-+#
-+# General setup
-+#
-+CONFIG_LOCALVERSION=""
-+# CONFIG_LOCALVERSION_AUTO is not set
-+# CONFIG_SWAP is not set
-+CONFIG_SYSVIPC=y
-+# CONFIG_IPC_NS is not set
-+# CONFIG_POSIX_MQUEUE is not set
-+# CONFIG_BSD_PROCESS_ACCT is not set
-+# CONFIG_TASKSTATS is not set
-+# CONFIG_UTS_NS is not set
-+# CONFIG_AUDIT is not set
-+# CONFIG_IKCONFIG is not set
-+# CONFIG_RELAY is not set
-+CONFIG_INITRAMFS_SOURCE=""
-+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-+CONFIG_SYSCTL=y
-+# CONFIG_EMBEDDED is not set
-+CONFIG_UID16=y
-+CONFIG_SYSCTL_SYSCALL=y
-+CONFIG_KALLSYMS=y
-+# CONFIG_KALLSYMS_ALL is not set
-+# CONFIG_KALLSYMS_EXTRA_PASS is not set
-+CONFIG_HOTPLUG=y
-+CONFIG_PRINTK=y
-+CONFIG_BUG=y
-+CONFIG_ELF_CORE=y
-+CONFIG_BASE_FULL=y
-+CONFIG_FUTEX=y
-+CONFIG_EPOLL=y
-+CONFIG_SHMEM=y
-+CONFIG_SLAB=y
-+CONFIG_VM_EVENT_COUNTERS=y
-+CONFIG_RT_MUTEXES=y
-+# CONFIG_TINY_SHMEM is not set
-+CONFIG_BASE_SMALL=0
-+# CONFIG_SLOB is not set
-+
-+#
-+# Loadable module support
-+#
-+CONFIG_MODULES=y
-+CONFIG_MODULE_UNLOAD=y
-+# CONFIG_MODULE_FORCE_UNLOAD is not set
-+# CONFIG_MODVERSIONS is not set
-+# CONFIG_MODULE_SRCVERSION_ALL is not set
-+CONFIG_KMOD=y
-+
-+#
-+# Block layer
-+#
-+CONFIG_BLOCK=y
-+# CONFIG_BLK_DEV_IO_TRACE is not set
-+
-+#
-+# IO Schedulers
-+#
-+CONFIG_IOSCHED_NOOP=y
-+CONFIG_IOSCHED_AS=y
-+# CONFIG_IOSCHED_DEADLINE is not set
-+# CONFIG_IOSCHED_CFQ is not set
-+CONFIG_DEFAULT_AS=y
-+# CONFIG_DEFAULT_DEADLINE is not set
-+# CONFIG_DEFAULT_CFQ is not set
-+# CONFIG_DEFAULT_NOOP is not set
-+CONFIG_DEFAULT_IOSCHED="anticipatory"
-+
-+#
-+# System Type
-+#
-+# CONFIG_ARCH_AAEC2000 is not set
-+# CONFIG_ARCH_INTEGRATOR is not set
-+# CONFIG_ARCH_REALVIEW is not set
-+# CONFIG_ARCH_VERSATILE is not set
-+CONFIG_ARCH_AT91=y
-+# CONFIG_ARCH_CLPS7500 is not set
-+# CONFIG_ARCH_CLPS711X is not set
-+# CONFIG_ARCH_CO285 is not set
-+# CONFIG_ARCH_EBSA110 is not set
-+# CONFIG_ARCH_EP93XX is not set
-+# CONFIG_ARCH_FOOTBRIDGE is not set
-+# CONFIG_ARCH_NETX is not set
-+# CONFIG_ARCH_H720X is not set
-+# CONFIG_ARCH_IMX is not set
-+# CONFIG_ARCH_IOP32X is not set
-+# CONFIG_ARCH_IOP33X is not set
-+# CONFIG_ARCH_IXP4XX is not set
-+# CONFIG_ARCH_IXP2000 is not set
-+# CONFIG_ARCH_IXP23XX is not set
-+# CONFIG_ARCH_L7200 is not set
-+# CONFIG_ARCH_PNX4008 is not set
-+# CONFIG_ARCH_PXA is not set
-+# CONFIG_ARCH_RPC is not set
-+# CONFIG_ARCH_SA1100 is not set
-+# CONFIG_ARCH_S3C2410 is not set
-+# CONFIG_ARCH_SHARK is not set
-+# CONFIG_ARCH_LH7A40X is not set
-+# CONFIG_ARCH_OMAP is not set
-+
-+#
-+# Atmel AT91 System-on-Chip
-+#
-+# CONFIG_ARCH_AT91RM9200 is not set
-+# CONFIG_ARCH_AT91SAM9260 is not set
-+CONFIG_ARCH_AT91SAM9261=y
-+
-+#
-+# AT91SAM9261 Board Type
-+#
-+CONFIG_MACH_AT91SAM9261EK=y
-+
-+#
-+# AT91 Board Options
-+#
-+# CONFIG_MTD_NAND_AT91_BUSWIDTH_16 is not set
-+
-+#
-+# AT91 Feature Selections
-+#
-+# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
-+
-+#
-+# Processor Type
-+#
-+CONFIG_CPU_32=y
-+CONFIG_CPU_ARM926T=y
-+CONFIG_CPU_32v5=y
-+CONFIG_CPU_ABRT_EV5TJ=y
-+CONFIG_CPU_CACHE_VIVT=y
-+CONFIG_CPU_COPY_V4WB=y
-+CONFIG_CPU_TLB_V4WBI=y
-+CONFIG_CPU_CP15=y
-+CONFIG_CPU_CP15_MMU=y
-+
-+#
-+# Processor Features
-+#
-+# CONFIG_ARM_THUMB is not set
-+# CONFIG_CPU_ICACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_DISABLE is not set
-+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
-+
-+#
-+# Bus support
-+#
-+
-+#
-+# PCCARD (PCMCIA/CardBus) support
-+#
-+# CONFIG_PCCARD is not set
-+
-+#
-+# Kernel Features
-+#
-+# CONFIG_PREEMPT is not set
-+# CONFIG_NO_IDLE_HZ is not set
-+CONFIG_HZ=100
-+# CONFIG_AEABI is not set
-+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
-+CONFIG_SELECT_MEMORY_MODEL=y
-+CONFIG_FLATMEM_MANUAL=y
-+# CONFIG_DISCONTIGMEM_MANUAL is not set
-+# CONFIG_SPARSEMEM_MANUAL is not set
-+CONFIG_FLATMEM=y
-+CONFIG_FLAT_NODE_MEM_MAP=y
-+# CONFIG_SPARSEMEM_STATIC is not set
-+CONFIG_SPLIT_PTLOCK_CPUS=4096
-+# CONFIG_RESOURCES_64BIT is not set
-+# CONFIG_LEDS is not set
-+CONFIG_ALIGNMENT_TRAP=y
-+
-+#
-+# Boot options
-+#
-+CONFIG_ZBOOT_ROM_TEXT=0x0
-+CONFIG_ZBOOT_ROM_BSS=0x0
-+CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
-+# CONFIG_XIP_KERNEL is not set
-+
-+#
-+# Floating point emulation
-+#
-+
-+#
-+# At least one emulation must be selected
-+#
-+CONFIG_FPE_NWFPE=y
-+# CONFIG_FPE_NWFPE_XP is not set
-+# CONFIG_FPE_FASTFPE is not set
-+# CONFIG_VFP is not set
-+
-+#
-+# Userspace binary formats
-+#
-+CONFIG_BINFMT_ELF=y
-+# CONFIG_BINFMT_AOUT is not set
-+# CONFIG_BINFMT_MISC is not set
-+# CONFIG_ARTHUR is not set
-+
-+#
-+# Power management options
-+#
-+# CONFIG_PM is not set
-+# CONFIG_APM is not set
-+
-+#
-+# Networking
-+#
-+CONFIG_NET=y
-+
-+#
-+# Networking options
-+#
-+# CONFIG_NETDEBUG is not set
-+CONFIG_PACKET=y
-+# CONFIG_PACKET_MMAP is not set
-+CONFIG_UNIX=y
-+CONFIG_XFRM=y
-+# CONFIG_XFRM_USER is not set
-+# CONFIG_XFRM_SUB_POLICY is not set
-+# CONFIG_NET_KEY is not set
-+CONFIG_INET=y
-+# CONFIG_IP_MULTICAST is not set
-+# CONFIG_IP_ADVANCED_ROUTER is not set
-+CONFIG_IP_FIB_HASH=y
-+CONFIG_IP_PNP=y
-+# CONFIG_IP_PNP_DHCP is not set
-+CONFIG_IP_PNP_BOOTP=y
-+# CONFIG_IP_PNP_RARP is not set
-+# CONFIG_NET_IPIP is not set
-+# CONFIG_NET_IPGRE is not set
-+# CONFIG_ARPD is not set
-+# CONFIG_SYN_COOKIES is not set
-+# CONFIG_INET_AH is not set
-+# CONFIG_INET_ESP is not set
-+# CONFIG_INET_IPCOMP is not set
-+# CONFIG_INET_XFRM_TUNNEL is not set
-+# CONFIG_INET_TUNNEL is not set
-+CONFIG_INET_XFRM_MODE_TRANSPORT=y
-+CONFIG_INET_XFRM_MODE_TUNNEL=y
-+CONFIG_INET_XFRM_MODE_BEET=y
-+CONFIG_INET_DIAG=y
-+CONFIG_INET_TCP_DIAG=y
-+# CONFIG_TCP_CONG_ADVANCED is not set
-+CONFIG_TCP_CONG_CUBIC=y
-+CONFIG_DEFAULT_TCP_CONG="cubic"
-+# CONFIG_IPV6 is not set
-+# CONFIG_INET6_XFRM_TUNNEL is not set
-+# CONFIG_INET6_TUNNEL is not set
-+# CONFIG_NETWORK_SECMARK is not set
-+# CONFIG_NETFILTER is not set
-+
-+#
-+# DCCP Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_IP_DCCP is not set
-+
-+#
-+# SCTP Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_IP_SCTP is not set
-+
-+#
-+# TIPC Configuration (EXPERIMENTAL)
-+#
-+# CONFIG_TIPC is not set
-+# CONFIG_ATM is not set
-+# CONFIG_BRIDGE is not set
-+# CONFIG_VLAN_8021Q is not set
-+# CONFIG_DECNET is not set
-+# CONFIG_LLC2 is not set
-+# CONFIG_IPX is not set
-+# CONFIG_ATALK is not set
-+# CONFIG_X25 is not set
-+# CONFIG_LAPB is not set
-+# CONFIG_ECONET is not set
-+# CONFIG_WAN_ROUTER is not set
-+
-+#
-+# QoS and/or fair queueing
-+#
-+# CONFIG_NET_SCHED is not set
-+
-+#
-+# Network testing
-+#
-+# CONFIG_NET_PKTGEN is not set
-+# CONFIG_HAMRADIO is not set
-+# CONFIG_IRDA is not set
-+# CONFIG_BT is not set
-+# CONFIG_IEEE80211 is not set
-+
-+#
-+# Device Drivers
-+#
-+
-+#
-+# Generic Driver Options
-+#
-+CONFIG_STANDALONE=y
-+CONFIG_PREVENT_FIRMWARE_BUILD=y
-+# CONFIG_FW_LOADER is not set
-+# CONFIG_DEBUG_DRIVER is not set
-+# CONFIG_SYS_HYPERVISOR is not set
-+
-+#
-+# Connector - unified userspace <-> kernelspace linker
-+#
-+# CONFIG_CONNECTOR is not set
-+
-+#
-+# Memory Technology Devices (MTD)
-+#
-+CONFIG_MTD=y
-+# CONFIG_MTD_DEBUG is not set
-+# CONFIG_MTD_CONCAT is not set
-+CONFIG_MTD_PARTITIONS=y
-+# CONFIG_MTD_REDBOOT_PARTS is not set
-+CONFIG_MTD_CMDLINE_PARTS=y
-+# CONFIG_MTD_AFS_PARTS is not set
-+
-+#
-+# User Modules And Translation Layers
-+#
-+# CONFIG_MTD_CHAR is not set
-+CONFIG_MTD_BLOCK=y
-+# CONFIG_FTL is not set
-+# CONFIG_NFTL is not set
-+# CONFIG_INFTL is not set
-+# CONFIG_RFD_FTL is not set
-+# CONFIG_SSFDC is not set
-+
-+#
-+# RAM/ROM/Flash chip drivers
-+#
-+# CONFIG_MTD_CFI is not set
-+# CONFIG_MTD_JEDECPROBE is not set
-+CONFIG_MTD_MAP_BANK_WIDTH_1=y
-+CONFIG_MTD_MAP_BANK_WIDTH_2=y
-+CONFIG_MTD_MAP_BANK_WIDTH_4=y
-+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-+CONFIG_MTD_CFI_I1=y
-+CONFIG_MTD_CFI_I2=y
-+# CONFIG_MTD_CFI_I4 is not set
-+# CONFIG_MTD_CFI_I8 is not set
-+# CONFIG_MTD_RAM is not set
-+# CONFIG_MTD_ROM is not set
-+# CONFIG_MTD_ABSENT is not set
-+# CONFIG_MTD_OBSOLETE_CHIPS is not set
-+
-+#
-+# Mapping drivers for chip access
-+#
-+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-+# CONFIG_MTD_PLATRAM is not set
-+
-+#
-+# Self-contained MTD device drivers
-+#
-+# CONFIG_MTD_SLRAM is not set
-+# CONFIG_MTD_PHRAM is not set
-+# CONFIG_MTD_MTDRAM is not set
-+# CONFIG_MTD_BLOCK2MTD is not set
-+
-+#
-+# Disk-On-Chip Device Drivers
-+#
-+# CONFIG_MTD_DOC2000 is not set
-+# CONFIG_MTD_DOC2001 is not set
-+# CONFIG_MTD_DOC2001PLUS is not set
-+
-+#
-+# NAND Flash Device Drivers
-+#
-+CONFIG_MTD_NAND=y
-+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-+# CONFIG_MTD_NAND_ECC_SMC is not set
-+CONFIG_MTD_NAND_IDS=y
-+# CONFIG_MTD_NAND_DISKONCHIP is not set
-+CONFIG_MTD_NAND_AT91=y
-+# CONFIG_MTD_NAND_NANDSIM is not set
-+
-+#
-+# OneNAND Flash Device Drivers
-+#
-+# CONFIG_MTD_ONENAND is not set
-+
-+#
-+# Parallel port support
-+#
-+# CONFIG_PARPORT is not set
-+
-+#
-+# Plug and Play support
-+#
-+
-+#
-+# Block devices
-+#
-+# CONFIG_BLK_DEV_COW_COMMON is not set
-+# CONFIG_BLK_DEV_LOOP is not set
-+# CONFIG_BLK_DEV_NBD is not set
-+# CONFIG_BLK_DEV_UB is not set
-+CONFIG_BLK_DEV_RAM=y
-+CONFIG_BLK_DEV_RAM_COUNT=16
-+CONFIG_BLK_DEV_RAM_SIZE=8192
-+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-+CONFIG_BLK_DEV_INITRD=y
-+# CONFIG_CDROM_PKTCDVD is not set
-+# CONFIG_ATA_OVER_ETH is not set
-+
-+#
-+# SCSI device support
-+#
-+# CONFIG_RAID_ATTRS is not set
-+CONFIG_SCSI=y
-+# CONFIG_SCSI_NETLINK is not set
-+CONFIG_SCSI_PROC_FS=y
-+
-+#
-+# SCSI support type (disk, tape, CD-ROM)
-+#
-+CONFIG_BLK_DEV_SD=y
-+# CONFIG_CHR_DEV_ST is not set
-+# CONFIG_CHR_DEV_OSST is not set
-+# CONFIG_BLK_DEV_SR is not set
-+# CONFIG_CHR_DEV_SG is not set
-+# CONFIG_CHR_DEV_SCH is not set
-+
-+#
-+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-+#
-+CONFIG_SCSI_MULTI_LUN=y
-+# CONFIG_SCSI_CONSTANTS is not set
-+# CONFIG_SCSI_LOGGING is not set
-+
-+#
-+# SCSI Transports
-+#
-+# CONFIG_SCSI_SPI_ATTRS is not set
-+# CONFIG_SCSI_FC_ATTRS is not set
-+# CONFIG_SCSI_ISCSI_ATTRS is not set
-+# CONFIG_SCSI_SAS_ATTRS is not set
-+# CONFIG_SCSI_SAS_LIBSAS is not set
-+
-+#
-+# SCSI low-level drivers
-+#
-+# CONFIG_ISCSI_TCP is not set
-+# CONFIG_SCSI_DEBUG is not set
-+
-+#
-+# Multi-device support (RAID and LVM)
-+#
-+# CONFIG_MD is not set
-+
-+#
-+# Fusion MPT device support
-+#
-+# CONFIG_FUSION is not set
-+
-+#
-+# IEEE 1394 (FireWire) support
-+#
-+
-+#
-+# I2O device support
-+#
-+
-+#
-+# Network device support
-+#
-+CONFIG_NETDEVICES=y
-+# CONFIG_DUMMY is not set
-+# CONFIG_BONDING is not set
-+# CONFIG_EQUALIZER is not set
-+# CONFIG_TUN is not set
-+
-+#
-+# PHY device support
-+#
-+# CONFIG_PHYLIB is not set
-+
-+#
-+# Ethernet (10 or 100Mbit)
-+#
-+CONFIG_NET_ETHERNET=y
-+CONFIG_MII=y
-+# CONFIG_SMC91X is not set
-+CONFIG_DM9000=y
-+
-+#
-+# Ethernet (1000 Mbit)
-+#
-+
-+#
-+# Ethernet (10000 Mbit)
-+#
-+
-+#
-+# Token Ring devices
-+#
-+
-+#
-+# Wireless LAN (non-hamradio)
-+#
-+# CONFIG_NET_RADIO is not set
-+
-+#
-+# Wan interfaces
-+#
-+# CONFIG_WAN is not set
-+# CONFIG_PPP is not set
-+# CONFIG_SLIP is not set
-+# CONFIG_SHAPER is not set
-+# CONFIG_NETCONSOLE is not set
-+# CONFIG_NETPOLL is not set
-+# CONFIG_NET_POLL_CONTROLLER is not set
-+
-+#
-+# ISDN subsystem
-+#
-+# CONFIG_ISDN is not set
-+
-+#
-+# Input device support
-+#
-+CONFIG_INPUT=y
-+# CONFIG_INPUT_FF_MEMLESS is not set
-+
-+#
-+# Userland interfaces
-+#
-+CONFIG_INPUT_MOUSEDEV=y
-+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-+# CONFIG_INPUT_JOYDEV is not set
-+# CONFIG_INPUT_TSDEV is not set
-+# CONFIG_INPUT_EVDEV is not set
-+# CONFIG_INPUT_EVBUG is not set
-+
-+#
-+# Input Device Drivers
-+#
-+# CONFIG_INPUT_KEYBOARD is not set
-+# CONFIG_INPUT_MOUSE is not set
-+# CONFIG_INPUT_JOYSTICK is not set
-+# CONFIG_INPUT_TOUCHSCREEN is not set
-+# CONFIG_INPUT_MISC is not set
-+
-+#
-+# Hardware I/O ports
-+#
-+# CONFIG_SERIO is not set
-+# CONFIG_GAMEPORT is not set
-+
-+#
-+# Character devices
-+#
-+CONFIG_VT=y
-+CONFIG_VT_CONSOLE=y
-+CONFIG_HW_CONSOLE=y
-+# CONFIG_VT_HW_CONSOLE_BINDING is not set
-+# CONFIG_SERIAL_NONSTANDARD is not set
-+
-+#
-+# Serial drivers
-+#
-+# CONFIG_SERIAL_8250 is not set
-+
-+#
-+# Non-8250 serial port support
-+#
-+CONFIG_SERIAL_ATMEL=y
-+CONFIG_SERIAL_ATMEL_CONSOLE=y
-+# CONFIG_SERIAL_ATMEL_TTYAT is not set
-+CONFIG_SERIAL_CORE=y
-+CONFIG_SERIAL_CORE_CONSOLE=y
-+CONFIG_UNIX98_PTYS=y
-+CONFIG_LEGACY_PTYS=y
-+CONFIG_LEGACY_PTY_COUNT=256
-+
-+#
-+# IPMI
-+#
-+# CONFIG_IPMI_HANDLER is not set
-+
-+#
-+# Watchdog Cards
-+#
-+CONFIG_WATCHDOG=y
-+CONFIG_WATCHDOG_NOWAYOUT=y
-+
-+#
-+# Watchdog Device Drivers
-+#
-+# CONFIG_SOFT_WATCHDOG is not set
-+
-+#
-+# USB-based Watchdog Cards
-+#
-+# CONFIG_USBPCWATCHDOG is not set
-+CONFIG_HW_RANDOM=y
-+# CONFIG_NVRAM is not set
-+# CONFIG_DTLK is not set
-+# CONFIG_R3964 is not set
-+
-+#
-+# Ftape, the floppy tape device driver
-+#
-+# CONFIG_RAW_DRIVER is not set
-+
-+#
-+# TPM devices
-+#
-+# CONFIG_TCG_TPM is not set
-+
-+#
-+# I2C support
-+#
-+CONFIG_I2C=y
-+CONFIG_I2C_CHARDEV=y
-+
-+#
-+# I2C Algorithms
-+#
-+# CONFIG_I2C_ALGOBIT is not set
-+# CONFIG_I2C_ALGOPCF is not set
-+# CONFIG_I2C_ALGOPCA is not set
-+
-+#
-+# I2C Hardware Bus support
-+#
-+CONFIG_I2C_AT91=y
-+# CONFIG_I2C_OCORES is not set
-+# CONFIG_I2C_PARPORT_LIGHT is not set
-+# CONFIG_I2C_STUB is not set
-+# CONFIG_I2C_PCA is not set
-+# CONFIG_I2C_PCA_ISA is not set
-+
-+#
-+# Miscellaneous I2C Chip support
-+#
-+# CONFIG_SENSORS_DS1337 is not set
-+# CONFIG_SENSORS_DS1374 is not set
-+# CONFIG_SENSORS_EEPROM is not set
-+# CONFIG_SENSORS_PCF8574 is not set
-+# CONFIG_SENSORS_PCA9539 is not set
-+# CONFIG_SENSORS_PCF8591 is not set
-+# CONFIG_SENSORS_MAX6875 is not set
-+# CONFIG_I2C_DEBUG_CORE is not set
-+# CONFIG_I2C_DEBUG_ALGO is not set
-+# CONFIG_I2C_DEBUG_BUS is not set
-+# CONFIG_I2C_DEBUG_CHIP is not set
-+
-+#
-+# SPI support
-+#
-+# CONFIG_SPI is not set
-+# CONFIG_SPI_MASTER is not set
-+
-+#
-+# Dallas's 1-wire bus
-+#
-+# CONFIG_W1 is not set
-+
-+#
-+# Hardware Monitoring support
-+#
-+# CONFIG_HWMON is not set
-+# CONFIG_HWMON_VID is not set
-+
-+#
-+# Misc devices
-+#
-+# CONFIG_TIFM_CORE is not set
-+
-+#
-+# LED devices
-+#
-+# CONFIG_NEW_LEDS is not set
-+
-+#
-+# LED drivers
-+#
-+
-+#
-+# LED Triggers
-+#
-+
-+#
-+# Multimedia devices
-+#
-+# CONFIG_VIDEO_DEV is not set
-+
-+#
-+# Digital Video Broadcasting Devices
-+#
-+# CONFIG_DVB is not set
-+# CONFIG_USB_DABUSB is not set
-+
-+#
-+# Graphics support
-+#
-+# CONFIG_FIRMWARE_EDID is not set
-+# CONFIG_FB is not set
-+
-+#
-+# Console display driver support
-+#
-+# CONFIG_VGA_CONSOLE is not set
-+CONFIG_DUMMY_CONSOLE=y
-+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-+
-+#
-+# Sound
-+#
-+# CONFIG_SOUND is not set
-+
-+#
-+# USB support
-+#
-+CONFIG_USB_ARCH_HAS_HCD=y
-+CONFIG_USB_ARCH_HAS_OHCI=y
-+# CONFIG_USB_ARCH_HAS_EHCI is not set
-+CONFIG_USB=y
-+# CONFIG_USB_DEBUG is not set
-+
-+#
-+# Miscellaneous USB options
-+#
-+CONFIG_USB_DEVICEFS=y
-+# CONFIG_USB_BANDWIDTH is not set
-+# CONFIG_USB_DYNAMIC_MINORS is not set
-+# CONFIG_USB_OTG is not set
-+
-+#
-+# USB Host Controller Drivers
-+#
-+# CONFIG_USB_ISP116X_HCD is not set
-+CONFIG_USB_OHCI_HCD=y
-+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-+# CONFIG_USB_SL811_HCD is not set
-+
-+#
-+# USB Device Class drivers
-+#
-+# CONFIG_USB_ACM is not set
-+# CONFIG_USB_PRINTER is not set
-+
-+#
-+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-+#
-+
-+#
-+# may also be needed; see USB_STORAGE Help for more information
-+#
-+CONFIG_USB_STORAGE=y
-+CONFIG_USB_STORAGE_DEBUG=y
-+# CONFIG_USB_STORAGE_DATAFAB is not set
-+# CONFIG_USB_STORAGE_FREECOM is not set
-+# CONFIG_USB_STORAGE_DPCM is not set
-+# CONFIG_USB_STORAGE_USBAT is not set
-+# CONFIG_USB_STORAGE_SDDR09 is not set
-+# CONFIG_USB_STORAGE_SDDR55 is not set
-+# CONFIG_USB_STORAGE_JUMPSHOT is not set
-+# CONFIG_USB_STORAGE_ALAUDA is not set
-+# CONFIG_USB_STORAGE_KARMA is not set
-+# CONFIG_USB_LIBUSUAL is not set
-+
-+#
-+# USB Input Devices
-+#
-+# CONFIG_USB_HID is not set
-+
-+#
-+# USB HID Boot Protocol drivers
-+#
-+# CONFIG_USB_KBD is not set
-+# CONFIG_USB_MOUSE is not set
-+# CONFIG_USB_AIPTEK is not set
-+# CONFIG_USB_WACOM is not set
-+# CONFIG_USB_ACECAD is not set
-+# CONFIG_USB_KBTAB is not set
-+# CONFIG_USB_POWERMATE is not set
-+# CONFIG_USB_TOUCHSCREEN is not set
-+# CONFIG_USB_YEALINK is not set
-+# CONFIG_USB_XPAD is not set
-+# CONFIG_USB_ATI_REMOTE is not set
-+# CONFIG_USB_ATI_REMOTE2 is not set
-+# CONFIG_USB_KEYSPAN_REMOTE is not set
-+# CONFIG_USB_APPLETOUCH is not set
-+
-+#
-+# USB Imaging devices
-+#
-+# CONFIG_USB_MDC800 is not set
-+# CONFIG_USB_MICROTEK is not set
-+
-+#
-+# USB Network Adapters
-+#
-+# CONFIG_USB_CATC is not set
-+# CONFIG_USB_KAWETH is not set
-+# CONFIG_USB_PEGASUS is not set
-+# CONFIG_USB_RTL8150 is not set
-+# CONFIG_USB_USBNET_MII is not set
-+# CONFIG_USB_USBNET is not set
-+CONFIG_USB_MON=y
-+
-+#
-+# USB port drivers
-+#
-+
-+#
-+# USB Serial Converter support
-+#
-+# CONFIG_USB_SERIAL is not set
-+
-+#
-+# USB Miscellaneous drivers
-+#
-+# CONFIG_USB_EMI62 is not set
-+# CONFIG_USB_EMI26 is not set
-+# CONFIG_USB_ADUTUX is not set
-+# CONFIG_USB_AUERSWALD is not set
-+# CONFIG_USB_RIO500 is not set
-+# CONFIG_USB_LEGOTOWER is not set
-+# CONFIG_USB_LCD is not set
-+# CONFIG_USB_LED is not set
-+# CONFIG_USB_CYPRESS_CY7C63 is not set
-+# CONFIG_USB_CYTHERM is not set
-+# CONFIG_USB_PHIDGET is not set
-+# CONFIG_USB_IDMOUSE is not set
-+# CONFIG_USB_FTDI_ELAN is not set
-+# CONFIG_USB_APPLEDISPLAY is not set
-+# CONFIG_USB_LD is not set
-+# CONFIG_USB_TRANCEVIBRATOR is not set
-+# CONFIG_USB_TEST is not set
-+
-+#
-+# USB DSL modem support
-+#
-+
-+#
-+# USB Gadget Support
-+#
-+CONFIG_USB_GADGET=y
-+# CONFIG_USB_GADGET_DEBUG_FILES is not set
-+CONFIG_USB_GADGET_SELECTED=y
-+# CONFIG_USB_GADGET_NET2280 is not set
-+# CONFIG_USB_GADGET_PXA2XX is not set
-+# CONFIG_USB_GADGET_GOKU is not set
-+# CONFIG_USB_GADGET_LH7A40X is not set
-+# CONFIG_USB_GADGET_OMAP is not set
-+CONFIG_USB_GADGET_AT91=y
-+CONFIG_USB_AT91=y
-+# CONFIG_USB_GADGET_DUMMY_HCD is not set
-+# CONFIG_USB_GADGET_DUALSPEED is not set
-+CONFIG_USB_ZERO=m
-+# CONFIG_USB_ETH is not set
-+CONFIG_USB_GADGETFS=m
-+CONFIG_USB_FILE_STORAGE=m
-+# CONFIG_USB_FILE_STORAGE_TEST is not set
-+CONFIG_USB_G_SERIAL=m
-+# CONFIG_USB_MIDI_GADGET is not set
-+
-+#
-+# MMC/SD Card support
-+#
-+CONFIG_MMC=y
-+# CONFIG_MMC_DEBUG is not set
-+CONFIG_MMC_BLOCK=y
-+CONFIG_MMC_AT91=m
-+# CONFIG_MMC_TIFM_SD is not set
-+
-+#
-+# Real Time Clock
-+#
-+CONFIG_RTC_LIB=y
-+# CONFIG_RTC_CLASS is not set
-+
-+#
-+# File systems
-+#
-+CONFIG_EXT2_FS=y
-+# CONFIG_EXT2_FS_XATTR is not set
-+# CONFIG_EXT2_FS_XIP is not set
-+# CONFIG_EXT3_FS is not set
-+# CONFIG_EXT4DEV_FS is not set
-+# CONFIG_REISERFS_FS is not set
-+# CONFIG_JFS_FS is not set
-+# CONFIG_FS_POSIX_ACL is not set
-+# CONFIG_XFS_FS is not set
-+# CONFIG_GFS2_FS is not set
-+# CONFIG_OCFS2_FS is not set
-+# CONFIG_MINIX_FS is not set
-+# CONFIG_ROMFS_FS is not set
-+CONFIG_INOTIFY=y
-+CONFIG_INOTIFY_USER=y
-+# CONFIG_QUOTA is not set
-+CONFIG_DNOTIFY=y
-+# CONFIG_AUTOFS_FS is not set
-+# CONFIG_AUTOFS4_FS is not set
-+# CONFIG_FUSE_FS is not set
-+
-+#
-+# CD-ROM/DVD Filesystems
-+#
-+# CONFIG_ISO9660_FS is not set
-+# CONFIG_UDF_FS is not set
-+
-+#
-+# DOS/FAT/NT Filesystems
-+#
-+CONFIG_FAT_FS=y
-+# CONFIG_MSDOS_FS is not set
-+CONFIG_VFAT_FS=y
-+CONFIG_FAT_DEFAULT_CODEPAGE=437
-+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-+# CONFIG_NTFS_FS is not set
-+
-+#
-+# Pseudo filesystems
-+#
-+CONFIG_PROC_FS=y
-+CONFIG_PROC_SYSCTL=y
-+CONFIG_SYSFS=y
-+CONFIG_TMPFS=y
-+# CONFIG_TMPFS_POSIX_ACL is not set
-+# CONFIG_HUGETLB_PAGE is not set
-+CONFIG_RAMFS=y
-+# CONFIG_CONFIGFS_FS is not set
-+
-+#
-+# Miscellaneous filesystems
-+#
-+# CONFIG_ADFS_FS is not set
-+# CONFIG_AFFS_FS is not set
-+# CONFIG_HFS_FS is not set
-+# CONFIG_HFSPLUS_FS is not set
-+# CONFIG_BEFS_FS is not set
-+# CONFIG_BFS_FS is not set
-+# CONFIG_EFS_FS is not set
-+# CONFIG_JFFS_FS is not set
-+# CONFIG_JFFS2_FS is not set
-+CONFIG_CRAMFS=y
-+# CONFIG_VXFS_FS is not set
-+# CONFIG_HPFS_FS is not set
-+# CONFIG_QNX4FS_FS is not set
-+# CONFIG_SYSV_FS is not set
-+# CONFIG_UFS_FS is not set
-+
-+#
-+# Network File Systems
-+#
-+# CONFIG_NFS_FS is not set
-+# CONFIG_NFSD is not set
-+# CONFIG_SMB_FS is not set
-+# CONFIG_CIFS is not set
-+# CONFIG_NCP_FS is not set
-+# CONFIG_CODA_FS is not set
-+# CONFIG_AFS_FS is not set
-+# CONFIG_9P_FS is not set
-+
-+#
-+# Partition Types
-+#
-+# CONFIG_PARTITION_ADVANCED is not set
-+CONFIG_MSDOS_PARTITION=y
-+
-+#
-+# Native Language Support
-+#
-+CONFIG_NLS=y
-+CONFIG_NLS_DEFAULT="iso8859-1"
-+CONFIG_NLS_CODEPAGE_437=y
-+# CONFIG_NLS_CODEPAGE_737 is not set
-+# CONFIG_NLS_CODEPAGE_775 is not set
-+CONFIG_NLS_CODEPAGE_850=y
-+# CONFIG_NLS_CODEPAGE_852 is not set
-+# CONFIG_NLS_CODEPAGE_855 is not set
-+# CONFIG_NLS_CODEPAGE_857 is not set
-+# CONFIG_NLS_CODEPAGE_860 is not set
-+# CONFIG_NLS_CODEPAGE_861 is not set
-+# CONFIG_NLS_CODEPAGE_862 is not set
-+# CONFIG_NLS_CODEPAGE_863 is not set
-+# CONFIG_NLS_CODEPAGE_864 is not set
-+# CONFIG_NLS_CODEPAGE_865 is not set
-+# CONFIG_NLS_CODEPAGE_866 is not set
-+# CONFIG_NLS_CODEPAGE_869 is not set
-+# CONFIG_NLS_CODEPAGE_936 is not set
-+# CONFIG_NLS_CODEPAGE_950 is not set
-+# CONFIG_NLS_CODEPAGE_932 is not set
-+# CONFIG_NLS_CODEPAGE_949 is not set
-+# CONFIG_NLS_CODEPAGE_874 is not set
-+# CONFIG_NLS_ISO8859_8 is not set
-+# CONFIG_NLS_CODEPAGE_1250 is not set
-+# CONFIG_NLS_CODEPAGE_1251 is not set
-+# CONFIG_NLS_ASCII is not set
-+CONFIG_NLS_ISO8859_1=y
-+# CONFIG_NLS_ISO8859_2 is not set
-+# CONFIG_NLS_ISO8859_3 is not set
-+# CONFIG_NLS_ISO8859_4 is not set
-+# CONFIG_NLS_ISO8859_5 is not set
-+# CONFIG_NLS_ISO8859_6 is not set
-+# CONFIG_NLS_ISO8859_7 is not set
-+# CONFIG_NLS_ISO8859_9 is not set
-+# CONFIG_NLS_ISO8859_13 is not set
-+# CONFIG_NLS_ISO8859_14 is not set
-+# CONFIG_NLS_ISO8859_15 is not set
-+# CONFIG_NLS_KOI8_R is not set
-+# CONFIG_NLS_KOI8_U is not set
-+# CONFIG_NLS_UTF8 is not set
-+
-+#
-+# Profiling support
-+#
-+# CONFIG_PROFILING is not set
-+
-+#
-+# Kernel hacking
-+#
-+# CONFIG_PRINTK_TIME is not set
-+CONFIG_ENABLE_MUST_CHECK=y
-+# CONFIG_MAGIC_SYSRQ is not set
-+# CONFIG_UNUSED_SYMBOLS is not set
-+CONFIG_DEBUG_KERNEL=y
-+CONFIG_LOG_BUF_SHIFT=14
-+CONFIG_DETECT_SOFTLOCKUP=y
-+# CONFIG_SCHEDSTATS is not set
-+# CONFIG_DEBUG_SLAB is not set
-+# CONFIG_DEBUG_RT_MUTEXES is not set
-+# CONFIG_RT_MUTEX_TESTER is not set
-+# CONFIG_DEBUG_SPINLOCK is not set
-+# CONFIG_DEBUG_MUTEXES is not set
-+# CONFIG_DEBUG_RWSEMS is not set
-+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-+# CONFIG_DEBUG_KOBJECT is not set
-+CONFIG_DEBUG_BUGVERBOSE=y
-+# CONFIG_DEBUG_INFO is not set
-+# CONFIG_DEBUG_FS is not set
-+# CONFIG_DEBUG_VM is not set
-+# CONFIG_DEBUG_LIST is not set
-+CONFIG_FRAME_POINTER=y
-+CONFIG_FORCED_INLINING=y
-+# CONFIG_HEADERS_CHECK is not set
-+# CONFIG_RCU_TORTURE_TEST is not set
-+CONFIG_DEBUG_USER=y
-+# CONFIG_DEBUG_WAITQ is not set
-+# CONFIG_DEBUG_ERRORS is not set
-+CONFIG_DEBUG_LL=y
-+# CONFIG_DEBUG_ICEDCC is not set
-+
-+#
-+# Security options
-+#
-+# CONFIG_KEYS is not set
-+# CONFIG_SECURITY is not set
-+
-+#
-+# Cryptographic options
-+#
-+# CONFIG_CRYPTO is not set
-+
-+#
-+# Library routines
-+#
-+# CONFIG_CRC_CCITT is not set
-+# CONFIG_CRC16 is not set
-+CONFIG_CRC32=y
-+# CONFIG_LIBCRC32C is not set
-+CONFIG_ZLIB_INFLATE=y
-+CONFIG_PLIST=y
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/carmeva_defconfig linux-2.6.19/arch/arm/configs/carmeva_defconfig
---- linux-2.6.19-final/arch/arm/configs/carmeva_defconfig      Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/configs/carmeva_defconfig    Thu Oct 12 17:07:38 2006
-@@ -474,7 +474,7 @@
- # CONFIG_WATCHDOG is not set
- # CONFIG_NVRAM is not set
- # CONFIG_RTC is not set
--# CONFIG_AT91_RTC is not set
-+# CONFIG_AT91RM9200_RTC is not set
- # CONFIG_DTLK is not set
- # CONFIG_R3964 is not set
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/csb637_defconfig linux-2.6.19/arch/arm/configs/csb637_defconfig
---- linux-2.6.19-final/arch/arm/configs/csb637_defconfig       Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/configs/csb637_defconfig     Thu Oct 12 17:07:38 2006
-@@ -623,7 +623,7 @@
- # CONFIG_USBPCWATCHDOG is not set
- # CONFIG_NVRAM is not set
- CONFIG_RTC=y
--# CONFIG_AT91_RTC is not set
-+# CONFIG_AT91RM9200_RTC is not set
- # CONFIG_DTLK is not set
- # CONFIG_R3964 is not set
-diff -urN -x CVS linux-2.6.19-final/arch/arm/configs/kb9202_defconfig linux-2.6.19/arch/arm/configs/kb9202_defconfig
---- linux-2.6.19-final/arch/arm/configs/kb9202_defconfig       Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/configs/kb9202_defconfig     Thu Oct 12 17:07:38 2006
-@@ -437,7 +437,7 @@
- # CONFIG_WATCHDOG is not set
- # CONFIG_NVRAM is not set
- # CONFIG_RTC is not set
--# CONFIG_AT91_RTC is not set
-+# CONFIG_AT91RM9200_RTC is not set
- # CONFIG_DTLK is not set
- # CONFIG_R3964 is not set
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/Kconfig linux-2.6.19/arch/arm/mach-at91rm9200/Kconfig
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/Kconfig        Mon Dec  4 16:32:44 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/Kconfig      Wed Nov 22 09:24:11 2006
-@@ -2,7 +2,8 @@
- menu "Atmel AT91 System-on-Chip"
--comment "Atmel AT91 Processors"
-+choice 
-+      prompt "Atmel AT91 Processor"
+diff -urN -x CVS linux-2.6.21/arch/arm/boot/compressed/head-at91rm9200.S linux-2.6-stable/arch/arm/boot/compressed/head-at91rm9200.S
+--- linux-2.6.21/arch/arm/boot/compressed/head-at91rm9200.S    Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/boot/compressed/head-at91rm9200.S        Tue May  8 12:13:30 2007
+@@ -67,6 +67,12 @@
+               cmp     r7, r3
+               beq     99f
++              @ Promwad Chub : 1181
++              mov     r3,     #(MACH_TYPE_CHUB & 0xff)
++              orr     r3, r3, #(MACH_TYPE_CHUB & 0xff00)
++              cmp     r7, r3
++              beq     99f
++
+               @ Unknown board, use the AT91RM9200DK board
+               @ mov   r7, #MACH_TYPE_AT91RM9200
+               mov     r7,     #(MACH_TYPE_AT91RM9200DK & 0xff)
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/Kconfig linux-2.6-stable/arch/arm/mach-at91/Kconfig
+--- linux-2.6.21/arch/arm/mach-at91/Kconfig    Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/Kconfig        Wed May  9 10:20:54 2007
+@@ -17,6 +17,9 @@
+ config ARCH_AT91SAM9263
+       bool "AT91SAM9263"
++config ARCH_AT91SAM9RL
++      bool "AT91SAM9RL"
++
+ endchoice
  
- config ARCH_AT91RM9200
-       bool "AT91RM9200"
-@@ -13,6 +14,8 @@
- config ARCH_AT91SAM9261
-       bool "AT91SAM9261"
-+endchoice
-+
  # ----------------------------------------------------------
+@@ -87,6 +90,12 @@
+       help
+         Select this if you are using Sperry-Sun's KAFA board.
  
- if ARCH_AT91RM9200
-@@ -33,7 +36,6 @@
-         Select this if you are using Atmel's AT91RM9200-DK Development board.
-         (Discontinued)
--
- config MACH_AT91RM9200EK
-       bool "Atmel AT91RM9200-EK Evaluation Kit"
-       depends on ARCH_AT91RM9200
-@@ -90,6 +92,13 @@
++config MACH_CHUB
++      bool "Promwad Chub board"
++      depends on ARCH_AT91RM9200
++      help
++        Select this if you are using Promwad's Chub board.
++
+ endif
  
- comment "AT91SAM9260 Board Type"
+ # ----------------------------------------------------------
+@@ -111,6 +120,13 @@
+         Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
+         <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
  
-+config MACH_AT91SAM9260EK
-+      bool "Atmel AT91SAM9260-EK Evaluation Kit"
++config MACH_CAM60
++      bool "KwikByte CAM60 board"
 +      depends on ARCH_AT91SAM9260
 +      help
-+        Select this if you are using Atmel's AT91SAM9260-EK Evaluation Kit.
-+        <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
++        Select this if you are using KwikByte's CAM60 board based on the Atmel AT91SAM9260.
++        <http://www.kwikbyte.com>
 +
  endif
  
  # ----------------------------------------------------------
-@@ -98,8 +107,31 @@
+@@ -145,6 +161,20 @@
  
- comment "AT91SAM9261 Board Type"
+ # ----------------------------------------------------------
  
-+config MACH_AT91SAM9261EK
-+      bool "Atmel AT91SAM9261-EK Evaluation Kit"
-+      depends on ARCH_AT91SAM9261
++if ARCH_AT91SAM9RL
++
++comment "AT91SAM9RL Board Type"
++
++config MACH_AT91SAM9RLEK
++      bool "Atmel AT91SAM9RL-EK Evaluation Kit"
++      depends on ARCH_AT91SAM9RL
 +      help
-+        Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
-+        <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
++        Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
 +
- endif
-+# ----------------------------------------------------------
++endif
 +
-+comment "AT91 Board Options"
++# ----------------------------------------------------------
 +
-+config MTD_AT91_DATAFLASH_CARD
-+      bool "Enable DataFlash Card support"
-+      depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK)
+ comment "AT91 Board Options"
+ config MTD_AT91_DATAFLASH_CARD
+@@ -160,6 +190,20 @@
+         On AT91SAM926x boards both types of NAND flash can be present
+         (8 and 16 bit data bus width).
++config CSB300_WAKE_SW0
++      bool "CSB300 SW0 irq0 wakeup"
++      depends on MACH_CSB337 && PM
 +      help
-+        Enable support for the DataFlash card.
++        If you have a CSB300 connected to your CSB337, this lets
++        SW0 serve as a wakeup button.  It uses IRQ0.
 +
-+config MTD_NAND_AT91_BUSWIDTH_16
-+      bool "Enable 16-bit data bus interface to NAND flash"
-+      depends on (MACH_AT91SAM9261EK || MACH_AT91SAM9260EK)
++config CSB300_WAKE_SW1
++      bool "CSB300 SW1 gpio wakeup"
++      depends on MACH_CSB337 && PM
 +      help
-+        On AT91SAM926x boards both types of NAND flash can be present 
-+        (8 and 16 bit data bus width).
++        If you have a CSB300 connected to your CSB337, this lets
++        SW1 serve as a wakeup button.  It uses GPIO.
++
  # ----------------------------------------------------------
  
-@@ -111,6 +143,13 @@
+ comment "AT91 Feature Selections"
+@@ -170,6 +214,20 @@
          Select this if you need to program one or more of the PCK0..PCK3
          programmable clock outputs.
  
++config ATMEL_TCLIB
++      bool "Timer/Counter Library"
++      help
++        Select this if you want a library to allocate the Timer/Counter
++        blocks found on many Atmel processors.  This facilitates using
++        these modules despite processor differences.
++
 +config AT91_SLOW_CLOCK
 +      bool "Suspend-to-RAM uses slow clock mode (EXPERIMENTAL)"
 +      depends on PM && EXPERIMENTAL
@@ -2254,47 +117,52 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/Kconfig linux-2.6.1
  endmenu
  
  endif
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/Makefile linux-2.6.19/arch/arm/mach-at91rm9200/Makefile
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/Makefile       Mon Dec  4 16:32:44 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/Makefile     Thu Nov 16 11:45:54 2006
-@@ -2,19 +2,20 @@
- # Makefile for the linux kernel.
- #
--obj-y         := clock.o irq.o gpio.o devices.o
-+obj-y         := clock.o irq.o gpio.o
- obj-m         :=
- obj-n         :=
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/Makefile linux-2.6-stable/arch/arm/mach-at91/Makefile
+--- linux-2.6.21/arch/arm/mach-at91/Makefile   Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/Makefile       Wed May  9 12:37:19 2007
+@@ -8,12 +8,15 @@
  obj-          :=
  
  obj-$(CONFIG_PM)              += pm.o
 +obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o
++obj-$(CONFIG_ATMEL_TCLIB)     += tclib.o
  
  # CPU-specific support
--obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o
--obj-$(CONFIG_ARCH_AT91SAM9260)        +=
--obj-$(CONFIG_ARCH_AT91SAM9261)        +=
-+obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
-+obj-$(CONFIG_ARCH_AT91SAM9260)        += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o
-+obj-$(CONFIG_ARCH_AT91SAM9261)        += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o
+ obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
+ obj-$(CONFIG_ARCH_AT91SAM9260)        += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o
+ obj-$(CONFIG_ARCH_AT91SAM9261)        += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o
+ obj-$(CONFIG_ARCH_AT91SAM9263)        += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o
++obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o
  
--# AT91RM9200 Board-specific support
-+# AT91RM9200 board-specific support
+ # AT91RM9200 board-specific support
  obj-$(CONFIG_MACH_ONEARM)     += board-1arm.o
- obj-$(CONFIG_ARCH_AT91RM9200DK)       += board-dk.o
- obj-$(CONFIG_MACH_AT91RM9200EK)       += board-ek.o
-@@ -26,8 +27,10 @@
+@@ -25,9 +28,11 @@
+ obj-$(CONFIG_MACH_KB9200)     += board-kb9202.o
+ obj-$(CONFIG_MACH_ATEB9200)   += board-eb9200.o
  obj-$(CONFIG_MACH_KAFA)               += board-kafa.o
++obj-$(CONFIG_MACH_CHUB)               += board-chub.o
  
  # AT91SAM9260 board-specific support
-+obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
+ obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
++obj-$(CONFIG_MACH_CAM60)      += board-cam60.o
  
  # AT91SAM9261 board-specific support
-+obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
+ obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
+@@ -35,9 +40,13 @@
+ # AT91SAM9263 board-specific support
+ obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
  
++# AT91SAM9RL board-specific support
++obj-$(CONFIG_MACH_AT91SAM9RLEK)       += board-sam9rlek.o
++
  # LEDs support
  led-$(CONFIG_ARCH_AT91RM9200DK)       += leds.o
-@@ -39,7 +42,7 @@
+ led-$(CONFIG_MACH_AT91RM9200EK)       += leds.o
++led-$(CONFIG_MACH_AT91SAM9261EK)+= leds.o
+ led-$(CONFIG_MACH_CSB337)     += leds.o
+ led-$(CONFIG_MACH_CSB637)     += leds.o
+ led-$(CONFIG_MACH_KB9200)     += leds.o
+@@ -45,7 +54,7 @@
  obj-$(CONFIG_LEDS) += $(led-y)
  
  # VGA support
@@ -2303,693 +171,921 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/Makefile linux-2.6.
  
  
  ifeq ($(CONFIG_PM_DEBUG),y)
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200.c linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200.c   Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200.c Fri Nov  3 19:22:15 2006
-@@ -14,8 +14,10 @@
- #include <asm/mach/arch.h>
- #include <asm/mach/map.h>
-+#include <asm/arch/at91rm9200.h>
-+#include <asm/arch/at91_pmc.h>
-+#include <asm/arch/at91_st.h>
--#include <asm/hardware.h>
- #include "generic.h"
- #include "clock.h"
-@@ -26,32 +28,12 @@
-               .length         = SZ_4K,
-               .type           = MT_DEVICE,
-       }, {
--              .virtual        = AT91_VA_BASE_SPI,
--              .pfn            = __phys_to_pfn(AT91RM9200_BASE_SPI),
--              .length         = SZ_16K,
--              .type           = MT_DEVICE,
--      }, {
-               .virtual        = AT91_VA_BASE_EMAC,
-               .pfn            = __phys_to_pfn(AT91RM9200_BASE_EMAC),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
--              .virtual        = AT91_VA_BASE_TWI,
--              .pfn            = __phys_to_pfn(AT91RM9200_BASE_TWI),
--              .length         = SZ_16K,
--              .type           = MT_DEVICE,
--      }, {
--              .virtual        = AT91_VA_BASE_MCI,
--              .pfn            = __phys_to_pfn(AT91RM9200_BASE_MCI),
--              .length         = SZ_16K,
--              .type           = MT_DEVICE,
--      }, {
--              .virtual        = AT91_VA_BASE_UDP,
--              .pfn            = __phys_to_pfn(AT91RM9200_BASE_UDP),
--              .length         = SZ_16K,
--              .type           = MT_DEVICE,
--      }, {
--              .virtual        = AT91_SRAM_VIRT_BASE,
-+              .virtual        = AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE,
-               .pfn            = __phys_to_pfn(AT91RM9200_SRAM_BASE),
-               .length         = AT91RM9200_SRAM_SIZE,
-               .type           = MT_DEVICE,
-@@ -222,6 +204,16 @@
-       }
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91rm9200.c linux-2.6-stable/arch/arm/mach-at91/at91rm9200.c
+--- linux-2.6.21/arch/arm/mach-at91/at91rm9200.c       Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91rm9200.c   Tue May  8 12:13:30 2007
+@@ -117,6 +117,21 @@
+       .pmc_mask       = 1 << AT91RM9200_ID_PIOD,
+       .type           = CLK_TYPE_PERIPHERAL,
  };
++static struct clk ssc0_clk = {
++      .name           = "ssc0_clk",
++      .pmc_mask       = 1 << AT91RM9200_ID_SSC0,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ssc1_clk = {
++      .name           = "ssc1_clk",
++      .pmc_mask       = 1 << AT91RM9200_ID_SSC1,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ssc2_clk = {
++      .name           = "ssc2_clk",
++      .pmc_mask       = 1 << AT91RM9200_ID_SSC2,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk tc0_clk = {
+       .name           = "tc0_clk",
+       .pmc_mask       = 1 << AT91RM9200_ID_TC0,
+@@ -161,7 +176,9 @@
+       &udc_clk,
+       &twi_clk,
+       &spi_clk,
+-      // ssc 0 .. ssc2
++      &ssc0_clk,
++      &ssc1_clk,
++      &ssc2_clk,
+       &tc0_clk,
+       &tc1_clk,
+       &tc2_clk,
+@@ -250,6 +267,33 @@
  
-+static void at91rm9200_reset(void)
-+{
-+      /*
-+       * Perform a hardware reset with the use of the Watchdog timer.
-+       */
-+      at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
-+      at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
-+}
-+
-+
- /* --------------------------------------------------------------------
-  *  AT91RM9200 processor initialization
-  * -------------------------------------------------------------------- */
-@@ -230,6 +222,12 @@
-       /* Map peripherals */
-       iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
-+      at91_arch_reset = at91rm9200_reset;
-+      at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
-+                      | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
-+                      | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
-+                      | (1 << AT91RM9200_ID_IRQ6);
-+
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
  
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_devices.c linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200_devices.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_devices.c   Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200_devices.c Fri Dec  1 16:10:47 2006
-@@ -0,0 +1,901 @@
-+/*
-+ * arch/arm/mach-at91rm9200/at91rm9200_devices.c
-+ *
-+ *  Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
-+ *  Copyright (C) 2005 David Brownell
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ */
-+#include <asm/mach/arch.h>
-+#include <asm/mach/map.h>
-+
-+#include <linux/platform_device.h>
-+
-+#include <asm/arch/board.h>
-+#include <asm/arch/gpio.h>
-+#include <asm/arch/at91rm9200.h>
-+#include <asm/arch/at91rm9200_mc.h>
-+
-+#include "generic.h"
-+
-+#define SZ_512        0x00000200
-+#define SZ_256        0x00000100
-+#define SZ_16 0x00000010
-+
-+/* --------------------------------------------------------------------
-+ *  USB Host
+ /* --------------------------------------------------------------------
++ *  Timer/Counter library initialization
 + * -------------------------------------------------------------------- */
++#ifdef CONFIG_ATMEL_TCLIB
 +
-+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-+static u64 ohci_dmamask = 0xffffffffUL;
-+static struct at91_usbh_data usbh_data;
++#include "tclib.h"
 +
-+static struct resource usbh_resources[] = {
++static struct atmel_tcblock at91rm9200_tcblocks[] = {
 +      [0] = {
-+              .start  = AT91RM9200_UHP_BASE,
-+              .end    = AT91RM9200_UHP_BASE + SZ_1M - 1,
-+              .flags  = IORESOURCE_MEM,
++              .physaddr       = AT91RM9200_BASE_TCB0,
++              .irq            = { AT91RM9200_ID_TC0, AT91RM9200_ID_TC1, AT91RM9200_ID_TC2 },
++              .clk            = { &tc0_clk, &tc1_clk, &tc2_clk },
 +      },
 +      [1] = {
-+              .start  = AT91RM9200_ID_UHP,
-+              .end    = AT91RM9200_ID_UHP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91rm9200_usbh_device = {
-+      .name           = "at91_ohci",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &ohci_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &usbh_data,
++              .physaddr       = AT91RM9200_BASE_TCB1,
++              .irq            = { AT91RM9200_ID_TC3, AT91RM9200_ID_TC4, AT91RM9200_ID_TC5 },
++              .clk            = { &tc3_clk, &tc4_clk, &tc5_clk },
 +      },
-+      .resource       = usbh_resources,
-+      .num_resources  = ARRAY_SIZE(usbh_resources),
 +};
 +
-+void __init at91_add_device_usbh(struct at91_usbh_data *data)
-+{
-+      if (!data)
-+              return;
++#define at91rm9200_tc_init()  atmel_tc_init(at91rm9200_tcblocks, ARRAY_SIZE(at91rm9200_tcblocks))
 +
-+      usbh_data = *data;
-+      platform_device_register(&at91rm9200_usbh_device);
-+}
 +#else
-+void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
++#define at91rm9200_tc_init()  do {} while(0)
 +#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  USB Device (Gadget)
-+ * -------------------------------------------------------------------- */
+  *  AT91RM9200 processor initialization
+  * -------------------------------------------------------------------- */
+ void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks)
+@@ -271,6 +315,9 @@
+       /* Initialize GPIO subsystem */
+       at91_gpio_init(at91rm9200_gpio, banks);
 +
-+#ifdef CONFIG_USB_GADGET_AT91
-+static struct at91_udc_data udc_data;
++      /* Initialize the Timer/Counter blocks */
++      at91rm9200_tc_init();
+ }
+@@ -284,28 +331,28 @@
+ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
+       7,      /* Advanced Interrupt Controller (FIQ) */
+       7,      /* System Peripherals */
+-      0,      /* Parallel IO Controller A */
+-      0,      /* Parallel IO Controller B */
+-      0,      /* Parallel IO Controller C */
+-      0,      /* Parallel IO Controller D */
+-      6,      /* USART 0 */
+-      6,      /* USART 1 */
+-      6,      /* USART 2 */
+-      6,      /* USART 3 */
++      1,      /* Parallel IO Controller A */
++      1,      /* Parallel IO Controller B */
++      1,      /* Parallel IO Controller C */
++      1,      /* Parallel IO Controller D */
++      5,      /* USART 0 */
++      5,      /* USART 1 */
++      5,      /* USART 2 */
++      5,      /* USART 3 */
+       0,      /* Multimedia Card Interface */
+-      4,      /* USB Device Port */
+-      0,      /* Two-Wire Interface */
+-      6,      /* Serial Peripheral Interface */
+-      5,      /* Serial Synchronous Controller 0 */
+-      5,      /* Serial Synchronous Controller 1 */
+-      5,      /* Serial Synchronous Controller 2 */
++      2,      /* USB Device Port */
++      6,      /* Two-Wire Interface */
++      5,      /* Serial Peripheral Interface */
++      4,      /* Serial Synchronous Controller 0 */
++      4,      /* Serial Synchronous Controller 1 */
++      4,      /* Serial Synchronous Controller 2 */
+       0,      /* Timer Counter 0 */
+       0,      /* Timer Counter 1 */
+       0,      /* Timer Counter 2 */
+       0,      /* Timer Counter 3 */
+       0,      /* Timer Counter 4 */
+       0,      /* Timer Counter 5 */
+-      3,      /* USB Host port */
++      2,      /* USB Host port */
+       3,      /* Ethernet MAC */
+       0,      /* Advanced Interrupt Controller (IRQ0) */
+       0,      /* Advanced Interrupt Controller (IRQ1) */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91rm9200_devices.c linux-2.6-stable/arch/arm/mach-at91/at91rm9200_devices.c
+--- linux-2.6.21/arch/arm/mach-at91/at91rm9200_devices.c       Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91rm9200_devices.c   Tue May  8 12:13:30 2007
+@@ -480,7 +480,18 @@
+  *  SPI
+  * -------------------------------------------------------------------- */
+-#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
++#if defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)               /* legacy SPI driver */
++#define SPI_DEVNAME   "at91_spi"
 +
-+static struct resource udc_resources[] = {
-+      [0] = {
-+              .start  = AT91RM9200_BASE_UDP,
-+              .end    = AT91RM9200_BASE_UDP + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_UDP,
-+              .end    = AT91RM9200_ID_UDP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
++#elif defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE)     /* SPI bitbanging driver */
++#define SPI_DEVNAME   "at91_spi"
++
++#elif defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)   /* new SPI driver */
++#define SPI_DEVNAME   "atmel_spi"
++
++#endif
++
++#ifdef SPI_DEVNAME
+ static u64 spi_dmamask = 0xffffffffUL;
+ static struct resource spi_resources[] = {
+@@ -497,7 +508,7 @@
+ };
+ static struct platform_device at91rm9200_spi_device = {
+-      .name           = "at91_spi",
++      .name           = SPI_DEVNAME,
+       .id             = 0,
+       .dev            = {
+                               .dma_mask               = &spi_dmamask,
+@@ -606,6 +617,32 @@
+ #endif
++#if defined(CONFIG_NEW_LEDS)
 +
-+static struct platform_device at91rm9200_udc_device = {
-+      .name           = "at91_udc",
++static struct platform_device at91_leds = {
++      .name           = "at91_leds",
 +      .id             = -1,
-+      .dev            = {
-+                              .platform_data          = &udc_data,
-+      },
-+      .resource       = udc_resources,
-+      .num_resources  = ARRAY_SIZE(udc_resources),
 +};
 +
-+void __init at91_add_device_udc(struct at91_udc_data *data)
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
 +{
-+      if (!data)
++      if (!nr)
 +              return;
 +
-+      if (data->vbus_pin) {
-+              at91_set_gpio_input(data->vbus_pin, 0);
-+              at91_set_deglitch(data->vbus_pin, 1);
++      at91_leds.dev.platform_data = leds;
++
++      for ( ; nr; nr--, leds++) {
++              leds->index = nr;       /* first record stores number of leds */
++              at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
 +      }
-+      if (data->pullup_pin)
-+              at91_set_gpio_output(data->pullup_pin, 0);
 +
-+      udc_data = *data;
-+      platform_device_register(&at91rm9200_udc_device);
++      platform_device_register(&at91_leds);
 +}
 +#else
-+void __init at91_add_device_udc(struct at91_udc_data *data) {}
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
 +#endif
 +
 +
-+/* --------------------------------------------------------------------
-+ *  Ethernet
+ /* --------------------------------------------------------------------
+  *  UART
+  * -------------------------------------------------------------------- */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9260.c linux-2.6-stable/arch/arm/mach-at91/at91sam9260.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9260.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9260.c  Tue May  8 12:13:30 2007
+@@ -119,6 +119,11 @@
+       .pmc_mask       = 1 << AT91SAM9260_ID_SPI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk ssc_clk = {
++      .name           = "ssc_clk",
++      .pmc_mask       = 1 << AT91SAM9260_ID_SSC,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk tc0_clk = {
+       .name           = "tc0_clk",
+       .pmc_mask       = 1 << AT91SAM9260_ID_TC0,
+@@ -193,7 +198,7 @@
+       &twi_clk,
+       &spi0_clk,
+       &spi1_clk,
+-      // ssc
++      &ssc_clk,
+       &tc0_clk,
+       &tc1_clk,
+       &tc2_clk,
+@@ -264,6 +269,33 @@
+ /* --------------------------------------------------------------------
++ *  Timer/Counter library initialization
 + * -------------------------------------------------------------------- */
++#ifdef CONFIG_ATMEL_TCLIB
 +
-+#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
-+static u64 eth_dmamask = 0xffffffffUL;
-+static struct eth_platform_data eth_data;
++#include "tclib.h"
 +
-+static struct resource eth_resources[] = {
++static struct atmel_tcblock at91sam9260_tcblocks[] = {
 +      [0] = {
-+              .start  = AT91_VA_BASE_EMAC,
-+              .end    = AT91_VA_BASE_EMAC + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
++              .physaddr       = AT91SAM9260_BASE_TCB0,
++              .irq            = { AT91SAM9260_ID_TC0, AT91SAM9260_ID_TC1, AT91SAM9260_ID_TC2 },
++              .clk            = { &tc0_clk, &tc1_clk, &tc2_clk },
 +      },
 +      [1] = {
-+              .start  = AT91RM9200_ID_EMAC,
-+              .end    = AT91RM9200_ID_EMAC,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91rm9200_eth_device = {
-+      .name           = "at91_ether",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &eth_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &eth_data,
++              .physaddr       = AT91SAM9260_BASE_TCB1,
++              .irq            = { AT91SAM9260_ID_TC3, AT91SAM9260_ID_TC4, AT91SAM9260_ID_TC5 },
++              .clk            = { &tc3_clk, &tc4_clk, &tc5_clk },
 +      },
-+      .resource       = eth_resources,
-+      .num_resources  = ARRAY_SIZE(eth_resources),
 +};
 +
-+void __init at91_add_device_eth(struct eth_platform_data *data)
-+{
-+      if (!data)
-+              return;
-+
-+      if (data->phy_irq_pin) {
-+              at91_set_gpio_input(data->phy_irq_pin, 0);
-+              at91_set_deglitch(data->phy_irq_pin, 1);
-+      }
-+
-+      /* Pins used for MII and RMII */
-+      at91_set_A_periph(AT91_PIN_PA16, 0);    /* EMDIO */
-+      at91_set_A_periph(AT91_PIN_PA15, 0);    /* EMDC */
-+      at91_set_A_periph(AT91_PIN_PA14, 0);    /* ERXER */
-+      at91_set_A_periph(AT91_PIN_PA13, 0);    /* ERX1 */
-+      at91_set_A_periph(AT91_PIN_PA12, 0);    /* ERX0 */
-+      at91_set_A_periph(AT91_PIN_PA11, 0);    /* ECRS_ECRSDV */
-+      at91_set_A_periph(AT91_PIN_PA10, 0);    /* ETX1 */
-+      at91_set_A_periph(AT91_PIN_PA9, 0);     /* ETX0 */
-+      at91_set_A_periph(AT91_PIN_PA8, 0);     /* ETXEN */
-+      at91_set_A_periph(AT91_PIN_PA7, 0);     /* ETXCK_EREFCK */
-+
-+      if (!data->is_rmii) {
-+              at91_set_B_periph(AT91_PIN_PB19, 0);    /* ERXCK */
-+              at91_set_B_periph(AT91_PIN_PB18, 0);    /* ECOL */
-+              at91_set_B_periph(AT91_PIN_PB17, 0);    /* ERXDV */
-+              at91_set_B_periph(AT91_PIN_PB16, 0);    /* ERX3 */
-+              at91_set_B_periph(AT91_PIN_PB15, 0);    /* ERX2 */
-+              at91_set_B_periph(AT91_PIN_PB14, 0);    /* ETXER */
-+              at91_set_B_periph(AT91_PIN_PB13, 0);    /* ETX3 */
-+              at91_set_B_periph(AT91_PIN_PB12, 0);    /* ETX2 */
-+      }
++#define at91sam9260_tc_init() atmel_tc_init(at91sam9260_tcblocks, ARRAY_SIZE(at91sam9260_tcblocks))
 +
-+      eth_data = *data;
-+      platform_device_register(&at91rm9200_eth_device);
-+}
 +#else
-+void __init at91_add_device_eth(struct eth_platform_data *data) {}
++#define at91sam9260_tc_init() do {} while(0)
 +#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  Compact Flash / PCMCIA
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
-+static struct at91_cf_data cf_data;
-+
-+#define CF_BASE               AT91_CHIPSELECT_4
+  *  AT91SAM9260 processor initialization
+  * -------------------------------------------------------------------- */
+@@ -310,6 +342,9 @@
+       /* Register GPIO subsystem */
+       at91_gpio_init(at91sam9260_gpio, 3);
 +
-+static struct resource cf_resources[] = {
-+      [0] = {
-+              .start  = CF_BASE,
-+              /* ties up CS4, CS5 and CS6 */
-+              .end    = CF_BASE + (0x30000000 - 1),
-+              .flags  = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
-+      },
-+};
++      /* Initialize the Timer/Counter blocks */
++      at91sam9260_tc_init();
+ }
+ /* --------------------------------------------------------------------
+@@ -322,30 +357,30 @@
+ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
+       7,      /* Advanced Interrupt Controller */
+       7,      /* System Peripherals */
+-      0,      /* Parallel IO Controller A */
+-      0,      /* Parallel IO Controller B */
+-      0,      /* Parallel IO Controller C */
++      1,      /* Parallel IO Controller A */
++      1,      /* Parallel IO Controller B */
++      1,      /* Parallel IO Controller C */
+       0,      /* Analog-to-Digital Converter */
+-      6,      /* USART 0 */
+-      6,      /* USART 1 */
+-      6,      /* USART 2 */
++      5,      /* USART 0 */
++      5,      /* USART 1 */
++      5,      /* USART 2 */
+       0,      /* Multimedia Card Interface */
+-      4,      /* USB Device Port */
+-      0,      /* Two-Wire Interface */
+-      6,      /* Serial Peripheral Interface 0 */
+-      6,      /* Serial Peripheral Interface 1 */
++      2,      /* USB Device Port */
++      6,      /* Two-Wire Interface */
++      5,      /* Serial Peripheral Interface 0 */
++      5,      /* Serial Peripheral Interface 1 */
+       5,      /* Serial Synchronous Controller */
+       0,
+       0,
+       0,      /* Timer Counter 0 */
+       0,      /* Timer Counter 1 */
+       0,      /* Timer Counter 2 */
+-      3,      /* USB Host port */
++      2,      /* USB Host port */
+       3,      /* Ethernet */
+       0,      /* Image Sensor Interface */
+-      6,      /* USART 3 */
+-      6,      /* USART 4 */
+-      6,      /* USART 5 */
++      5,      /* USART 3 */
++      5,      /* USART 4 */
++      5,      /* USART 5 */
+       0,      /* Timer Counter 3 */
+       0,      /* Timer Counter 4 */
+       0,      /* Timer Counter 5 */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9260_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9260_devices.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9260_devices.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9260_devices.c  Tue May  8 12:13:30 2007
+@@ -527,6 +527,32 @@
+ #endif
++#if defined(CONFIG_NEW_LEDS)
 +
-+static struct platform_device at91rm9200_cf_device = {
-+      .name           = "at91_cf",
++static struct platform_device at91_leds = {
++      .name           = "at91_leds",
 +      .id             = -1,
-+      .dev            = {
-+                              .platform_data          = &cf_data,
-+      },
-+      .resource       = cf_resources,
-+      .num_resources  = ARRAY_SIZE(cf_resources),
 +};
 +
-+void __init at91_add_device_cf(struct at91_cf_data *data)
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
 +{
-+      unsigned int csa;
-+
-+      if (!data)
++      if (!nr)
 +              return;
 +
-+      data->chipselect = 4;           /* can only use EBI ChipSelect 4 */
-+
-+      /* CF takes over CS4, CS5, CS6 */
-+      csa = at91_sys_read(AT91_EBI_CSA);
-+      at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS4A_SMC_COMPACTFLASH);
-+
-+      /*
-+       * Static memory controller timing adjustments.
-+       * REVISIT:  these timings are in terms of MCK cycles, so
-+       * when MCK changes (cpufreq etc) so must these values...
-+       */
-+      at91_sys_write(AT91_SMC_CSR(4),
-+                                AT91_SMC_ACSS_STD
-+                              | AT91_SMC_DBW_16
-+                              | AT91_SMC_BAT
-+                              | AT91_SMC_WSEN
-+                              | AT91_SMC_NWS_(32)     /* wait states */
-+                              | AT91_SMC_RWSETUP_(6)  /* setup time */
-+                              | AT91_SMC_RWHOLD_(4)   /* hold time */
-+      );
++      at91_leds.dev.platform_data = leds;
 +
-+      /* input/irq */
-+      if (data->irq_pin) {
-+              at91_set_gpio_input(data->irq_pin, 1);
-+              at91_set_deglitch(data->irq_pin, 1);
++      for ( ; nr; nr--, leds++) {
++              leds->index = nr;       /* first record stores number of leds */
++              at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
 +      }
-+      at91_set_gpio_input(data->det_pin, 1);
-+      at91_set_deglitch(data->det_pin, 1);
-+
-+      /* outputs, initially off */
-+      if (data->vcc_pin)
-+              at91_set_gpio_output(data->vcc_pin, 0);
-+      at91_set_gpio_output(data->rst_pin, 0);
-+
-+      /* force poweron defaults for these pins ... */
-+      at91_set_A_periph(AT91_PIN_PC9, 0);     /* A25/CFRNW */
-+      at91_set_A_periph(AT91_PIN_PC10, 0);    /* NCS4/CFCS */
-+      at91_set_A_periph(AT91_PIN_PC11, 0);    /* NCS5/CFCE1 */
-+      at91_set_A_periph(AT91_PIN_PC12, 0);    /* NCS6/CFCE2 */
 +
-+      /* nWAIT is _not_ a default setting */
-+      at91_set_A_periph(AT91_PIN_PC6, 1);     /*  nWAIT */
-+
-+      cf_data = *data;
-+      platform_device_register(&at91rm9200_cf_device);
++      platform_device_register(&at91_leds);
 +}
 +#else
-+void __init at91_add_device_cf(struct at91_cf_data *data) {}
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
 +#endif
 +
 +
-+/* --------------------------------------------------------------------
-+ *  MMC / SD
+ /* --------------------------------------------------------------------
+  *  UART
+  * -------------------------------------------------------------------- */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9261.c linux-2.6-stable/arch/arm/mach-at91/at91sam9261.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9261.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9261.c  Tue May  8 12:13:30 2007
+@@ -97,6 +97,21 @@
+       .pmc_mask       = 1 << AT91SAM9261_ID_SPI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk ssc0_clk = {
++      .name           = "ssc0_clk",
++      .pmc_mask       = 1 << AT91SAM9261_ID_SSC0,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ssc1_clk = {
++      .name           = "ssc1_clk",
++      .pmc_mask       = 1 << AT91SAM9261_ID_SSC1,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ssc2_clk = {
++      .name           = "ssc2_clk",
++      .pmc_mask       = 1 << AT91SAM9261_ID_SSC2,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk tc0_clk = {
+       .name           = "tc0_clk",
+       .pmc_mask       = 1 << AT91SAM9261_ID_TC0,
+@@ -135,7 +150,9 @@
+       &twi_clk,
+       &spi0_clk,
+       &spi1_clk,
+-      // ssc 0 .. ssc2
++      &ssc0_clk,
++      &ssc1_clk,
++      &ssc2_clk,
+       &tc0_clk,
+       &tc1_clk,
+       &tc2_clk,
+@@ -230,6 +247,28 @@
+ /* --------------------------------------------------------------------
++ *  Timer/Counter library initialization
 + * -------------------------------------------------------------------- */
++#ifdef CONFIG_ATMEL_TCLIB
 +
-+#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
-+static u64 mmc_dmamask = 0xffffffffUL;
-+static struct at91_mmc_data mmc_data;
++#include "tclib.h"
 +
-+static struct resource mmc_resources[] = {
++static struct atmel_tcblock at91sam9261_tcblocks[] = {
 +      [0] = {
-+              .start  = AT91RM9200_BASE_MCI,
-+              .end    = AT91RM9200_BASE_MCI + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_MCI,
-+              .end    = AT91RM9200_ID_MCI,
-+              .flags  = IORESOURCE_IRQ,
-+      },
++              .physaddr       = AT91SAM9261_BASE_TCB0,
++              .irq            = { AT91SAM9261_ID_TC0, AT91SAM9261_ID_TC1, AT91SAM9261_ID_TC2 },
++              .clk            = { &tc0_clk, &tc1_clk, &tc2_clk },
++      }
 +};
 +
-+static struct platform_device at91rm9200_mmc_device = {
-+      .name           = "at91_mci",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &mmc_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &mmc_data,
-+      },
-+      .resource       = mmc_resources,
-+      .num_resources  = ARRAY_SIZE(mmc_resources),
-+};
++#define at91sam9261_tc_init() atmel_tc_init(at91sam9261_tcblocks, ARRAY_SIZE(at91sam9261_tcblocks))
 +
-+void __init at91_add_device_mmc(struct at91_mmc_data *data)
-+{
-+      if (!data)
-+              return;
-+
-+      /* input/irq */
-+      if (data->det_pin) {
-+              at91_set_gpio_input(data->det_pin, 1);
-+              at91_set_deglitch(data->det_pin, 1);
-+      }
-+      if (data->wp_pin)
-+              at91_set_gpio_input(data->wp_pin, 1);
-+      if (data->vcc_pin)
-+              at91_set_gpio_output(data->vcc_pin, 0);
-+
-+      /* CLK */
-+      at91_set_A_periph(AT91_PIN_PA27, 0);
-+
-+      if (data->slot_b) {
-+              /* CMD */
-+              at91_set_B_periph(AT91_PIN_PA8, 1);
-+
-+              /* DAT0, maybe DAT1..DAT3 */
-+              at91_set_B_periph(AT91_PIN_PA9, 1);
-+              if (data->wire4) {
-+                      at91_set_B_periph(AT91_PIN_PA10, 1);
-+                      at91_set_B_periph(AT91_PIN_PA11, 1);
-+                      at91_set_B_periph(AT91_PIN_PA12, 1);
-+              }
-+      } else {
-+              /* CMD */
-+              at91_set_A_periph(AT91_PIN_PA28, 1);
-+
-+              /* DAT0, maybe DAT1..DAT3 */
-+              at91_set_A_periph(AT91_PIN_PA29, 1);
-+              if (data->wire4) {
-+                      at91_set_B_periph(AT91_PIN_PB3, 1);
-+                      at91_set_B_periph(AT91_PIN_PB4, 1);
-+                      at91_set_B_periph(AT91_PIN_PB5, 1);
-+              }
-+      }
-+
-+      mmc_data = *data;
-+      platform_device_register(&at91rm9200_mmc_device);
-+}
-+#else
-+void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
-+#endif
++#else
++#define at91sam9261_tc_init() do {} while(0)
++#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  NAND / SmartMedia
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
-+static struct at91_nand_data nand_data;
+  *  AT91SAM9261 processor initialization
+  * -------------------------------------------------------------------- */
+@@ -250,6 +289,9 @@
+       /* Register GPIO subsystem */
+       at91_gpio_init(at91sam9261_gpio, 3);
 +
-+#define NAND_BASE     AT91_CHIPSELECT_3
++      /* Initialize the Timer/Counter blocks */
++      at91sam9261_tc_init();
+ }
+ /* --------------------------------------------------------------------
+@@ -262,25 +304,25 @@
+ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
+       7,      /* Advanced Interrupt Controller */
+       7,      /* System Peripherals */
+-      0,      /* Parallel IO Controller A */
+-      0,      /* Parallel IO Controller B */
+-      0,      /* Parallel IO Controller C */
++      1,      /* Parallel IO Controller A */
++      1,      /* Parallel IO Controller B */
++      1,      /* Parallel IO Controller C */
+       0,
+-      6,      /* USART 0 */
+-      6,      /* USART 1 */
+-      6,      /* USART 2 */
++      5,      /* USART 0 */
++      5,      /* USART 1 */
++      5,      /* USART 2 */
+       0,      /* Multimedia Card Interface */
+-      4,      /* USB Device Port */
+-      0,      /* Two-Wire Interface */
+-      6,      /* Serial Peripheral Interface 0 */
+-      6,      /* Serial Peripheral Interface 1 */
+-      5,      /* Serial Synchronous Controller 0 */
+-      5,      /* Serial Synchronous Controller 1 */
+-      5,      /* Serial Synchronous Controller 2 */
++      2,      /* USB Device Port */
++      6,      /* Two-Wire Interface */
++      5,      /* Serial Peripheral Interface 0 */
++      5,      /* Serial Peripheral Interface 1 */
++      4,      /* Serial Synchronous Controller 0 */
++      4,      /* Serial Synchronous Controller 1 */
++      4,      /* Serial Synchronous Controller 2 */
+       0,      /* Timer Counter 0 */
+       0,      /* Timer Counter 1 */
+       0,      /* Timer Counter 2 */
+-      3,      /* USB Host port */
++      2,      /* USB Host port */
+       3,      /* LCD Controller */
+       0,
+       0,
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9261_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9261_devices.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9261_devices.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9261_devices.c  Tue May  8 12:56:33 2007
+@@ -14,6 +14,9 @@
+ #include <asm/mach/map.h>
+ #include <linux/platform_device.h>
++#include <linux/fb.h>
 +
-+static struct resource nand_resources[] = {
-+      {
-+              .start  = NAND_BASE,
-+              .end    = NAND_BASE + SZ_8M - 1,
-+              .flags  = IORESOURCE_MEM,
-+      }
-+};
++#include <video/atmel_lcdc.h>
+ #include <asm/arch/board.h>
+ #include <asm/arch/gpio.h>
+@@ -430,9 +433,9 @@
+  *  LCD Controller
+  * -------------------------------------------------------------------- */
+-#if defined(CONFIG_FB_AT91) || defined(CONFIG_FB_AT91_MODULE)
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
+ static u64 lcdc_dmamask = 0xffffffffUL;
+-static struct at91fb_info lcdc_data;
++static struct atmel_lcdfb_info lcdc_data;
+ static struct resource lcdc_resources[] = {
+       [0] = {
+@@ -455,7 +458,7 @@
+ };
+ static struct platform_device at91_lcdc_device = {
+-      .name           = "at91-fb",
++      .name           = "atmel_lcdfb",
+       .id             = 0,
+       .dev            = {
+                               .dma_mask               = &lcdc_dmamask,
+@@ -466,7 +469,7 @@
+       .num_resources  = ARRAY_SIZE(lcdc_resources),
+ };
+-void __init at91_add_device_lcdc(struct at91fb_info *data)
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
+ {
+       if (!data) {
+               return;
+@@ -499,7 +502,7 @@
+       platform_device_register(&at91_lcdc_device);
+ }
+ #else
+-void __init at91_add_device_lcdc(struct at91fb_info *data) {}
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
+ #endif
+@@ -525,6 +528,32 @@
+ #endif
++#if defined(CONFIG_NEW_LEDS)
 +
-+static struct platform_device at91rm9200_nand_device = {
-+      .name           = "at91_nand",
++static struct platform_device at91_leds = {
++      .name           = "at91_leds",
 +      .id             = -1,
-+      .dev            = {
-+                              .platform_data  = &nand_data,
-+      },
-+      .resource       = nand_resources,
-+      .num_resources  = ARRAY_SIZE(nand_resources),
 +};
 +
-+void __init at91_add_device_nand(struct at91_nand_data *data)
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
 +{
-+      unsigned int csa;
-+
-+      if (!data)
++      if (!nr)
 +              return;
 +
-+      /* enable the address range of CS3 */
-+      csa = at91_sys_read(AT91_EBI_CSA);
-+      at91_sys_write(AT91_EBI_CSA, csa | AT91_EBI_CS3A_SMC_SMARTMEDIA);
-+
-+      /* set the bus interface characteristics */
-+      at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_ACSS_STD | AT91_SMC_DBW_8 | AT91_SMC_WSEN
-+              | AT91_SMC_NWS_(5)
-+              | AT91_SMC_TDF_(1)
-+              | AT91_SMC_RWSETUP_(0)  /* tDS Data Set up Time 30 - ns */
-+              | AT91_SMC_RWHOLD_(1)   /* tDH Data Hold Time 20 - ns */
-+      );
-+
-+      /* enable pin */
-+      if (data->enable_pin)
-+              at91_set_gpio_output(data->enable_pin, 1);
-+
-+      /* ready/busy pin */
-+      if (data->rdy_pin)
-+              at91_set_gpio_input(data->rdy_pin, 1);
-+
-+      /* card detect pin */
-+      if (data->det_pin)
-+              at91_set_gpio_input(data->det_pin, 1);
++      at91_leds.dev.platform_data = leds;
 +
-+      at91_set_A_periph(AT91_PIN_PC1, 0);             /* SMOE */
-+      at91_set_A_periph(AT91_PIN_PC3, 0);             /* SMWE */
++      for ( ; nr; nr--, leds++) {
++              leds->index = nr;       /* first record stores number of leds */
++              at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
++      }
 +
-+      nand_data = *data;
-+      platform_device_register(&at91rm9200_nand_device);
++      platform_device_register(&at91_leds);
 +}
 +#else
-+void __init at91_add_device_nand(struct at91_nand_data *data) {}
++void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
 +#endif
 +
 +
-+/* --------------------------------------------------------------------
-+ *  TWI (i2c)
+ /* --------------------------------------------------------------------
+  *  UART
+  * -------------------------------------------------------------------- */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9263.c linux-2.6-stable/arch/arm/mach-at91/at91sam9263.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9263.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9263.c  Tue May  8 12:13:30 2007
+@@ -87,6 +87,11 @@
+       .pmc_mask       = 1 << AT91SAM9263_ID_MCI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk can_clk = {
++      .name           = "can_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_CAN,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk twi_clk = {
+       .name           = "twi_clk",
+       .pmc_mask       = 1 << AT91SAM9263_ID_TWI,
+@@ -102,16 +107,46 @@
+       .pmc_mask       = 1 << AT91SAM9263_ID_SPI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk ssc0_clk = {
++      .name           = "ssc0_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_SSC0,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ssc1_clk = {
++      .name           = "ssc1_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_SSC1,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ac97_clk = {
++      .name           = "ac97_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_AC97C,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk tcb_clk = {
+       .name           = "tcb_clk",
+       .pmc_mask       = 1 << AT91SAM9263_ID_TCB,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk pwmc_clk = {
++      .name           = "pwmc_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_PWMC,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk macb_clk = {
+       .name           = "macb_clk",
+       .pmc_mask       = 1 << AT91SAM9263_ID_EMAC,
+       .type           = CLK_TYPE_PERIPHERAL,
+ };
++static struct clk dma_clk = {
++      .name           = "dma_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_DMA,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk twodge_clk = {
++      .name           = "2dge_clk",
++      .pmc_mask       = 1 << AT91SAM9263_ID_2DGE,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
+ static struct clk udc_clk = {
+       .name           = "udc_clk",
+       .pmc_mask       = 1 << AT91SAM9263_ID_UDP,
+@@ -142,20 +177,21 @@
+       &usart2_clk,
+       &mmc0_clk,
+       &mmc1_clk,
+-      // can
++      &can_clk,
+       &twi_clk,
+       &spi0_clk,
+       &spi1_clk,
+-      // ssc0 .. ssc1
+-      // ac97
++      &ssc0_clk,
++      &ssc1_clk,
++      &ac97_clk,
+       &tcb_clk,
+-      // pwmc
++      &pwmc_clk,
+       &macb_clk,
+-      // 2dge
++      &twodge_clk,
+       &udc_clk,
+       &isi_clk,
+       &lcdc_clk,
+-      // dma
++      &dma_clk,
+       &ohci_clk,
+       // irq0 .. irq1
+ };
+@@ -237,6 +273,28 @@
+ /* --------------------------------------------------------------------
++ *  Timer/Counter library initialization
 + * -------------------------------------------------------------------- */
++#ifdef CONFIG_ATMEL_TCLIB
 +
-+#if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE)
++#include "tclib.h"
 +
-+static struct resource twi_resources[] = {
++static struct atmel_tcblock at91sam9263_tcblocks[] = {
 +      [0] = {
-+              .start  = AT91RM9200_BASE_TWI,
-+              .end    = AT91RM9200_BASE_TWI + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_TWI,
-+              .end    = AT91RM9200_ID_TWI,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91rm9200_twi_device = {
-+      .name           = "at91_i2c",
-+      .id             = -1,
-+      .resource       = twi_resources,
-+      .num_resources  = ARRAY_SIZE(twi_resources),
++              .physaddr       = AT91SAM9263_BASE_TCB0,
++              .irq            = { AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB, AT91SAM9263_ID_TCB },
++              .clk            = { &tcb_clk, &tcb_clk, &tcb_clk },
++      }
 +};
 +
-+void __init at91_add_device_i2c(void)
-+{
-+      /* pins used for TWI interface */
-+      at91_set_A_periph(AT91_PIN_PA25, 0);            /* TWD */
-+      at91_set_multi_drive(AT91_PIN_PA25, 1);
-+
-+      at91_set_A_periph(AT91_PIN_PA26, 0);            /* TWCK */
-+      at91_set_multi_drive(AT91_PIN_PA26, 1);
++#define at91sam9263_tc_init() atmel_tc_init(at91sam9263_tcblocks, ARRAY_SIZE(at91sam9263_tcblocks))
 +
-+      platform_device_register(&at91rm9200_twi_device);
-+}
 +#else
-+void __init at91_add_device_i2c(void) {}
++#define at91sam9263_tc_init() do {} while(0)
 +#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  SPI
+  *  AT91SAM9263 processor initialization
+  * -------------------------------------------------------------------- */
+@@ -256,6 +314,9 @@
+       /* Register GPIO subsystem */
+       at91_gpio_init(at91sam9263_gpio, 5);
++
++      /* Initialize the Timer/Counter blocks */
++      at91sam9263_tc_init();
+ }
+ /* --------------------------------------------------------------------
+@@ -268,34 +329,34 @@
+ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
+       7,      /* Advanced Interrupt Controller (FIQ) */
+       7,      /* System Peripherals */
+-      0,      /* Parallel IO Controller A */
+-      0,      /* Parallel IO Controller B */
+-      0,      /* Parallel IO Controller C, D and E */
++      1,      /* Parallel IO Controller A */
++      1,      /* Parallel IO Controller B */
++      1,      /* Parallel IO Controller C, D and E */
+       0,
+       0,
+-      6,      /* USART 0 */
+-      6,      /* USART 1 */
+-      6,      /* USART 2 */
++      5,      /* USART 0 */
++      5,      /* USART 1 */
++      5,      /* USART 2 */
+       0,      /* Multimedia Card Interface 0 */
+       0,      /* Multimedia Card Interface 1 */
+-      4,      /* CAN */
+-      0,      /* Two-Wire Interface */
+-      6,      /* Serial Peripheral Interface 0 */
+-      6,      /* Serial Peripheral Interface 1 */
+-      5,      /* Serial Synchronous Controller 0 */
+-      5,      /* Serial Synchronous Controller 1 */
+-      6,      /* AC97 Controller */
++      3,      /* CAN */
++      6,      /* Two-Wire Interface */
++      5,      /* Serial Peripheral Interface 0 */
++      5,      /* Serial Peripheral Interface 1 */
++      4,      /* Serial Synchronous Controller 0 */
++      4,      /* Serial Synchronous Controller 1 */
++      5,      /* AC97 Controller */
+       0,      /* Timer Counter 0, 1 and 2 */
+       0,      /* Pulse Width Modulation Controller */
+       3,      /* Ethernet */
+       0,
+       0,      /* 2D Graphic Engine */
+-      3,      /* USB Device Port */
++      2,      /* USB Device Port */
+       0,      /* Image Sensor Interface */
+       3,      /* LDC Controller */
+       0,      /* DMA Controller */
+       0,
+-      3,      /* USB Host port */
++      2,      /* USB Host port */
+       0,      /* Advanced Interrupt Controller (IRQ0) */
+       0,      /* Advanced Interrupt Controller (IRQ1) */
+ };
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9263_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9263_devices.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9263_devices.c      Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9263_devices.c  Thu May 10 12:23:46 2007
+@@ -13,6 +13,9 @@
+ #include <asm/mach/map.h>
+ #include <linux/platform_device.h>
++#include <linux/fb.h>
++
++#include <video/atmel_lcdc.h>
+ #include <asm/arch/board.h>
+ #include <asm/arch/gpio.h>
+@@ -573,6 +576,180 @@
+ /* --------------------------------------------------------------------
++ *  AC97
 + * -------------------------------------------------------------------- */
 +
-+#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
-+static u64 spi_dmamask = 0xffffffffUL;
++#if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE)
++static u64 ac97_dmamask = 0xffffffffUL;
++static struct atmel_ac97_data ac97_data;
 +
-+static struct resource spi_resources[] = {
++static struct resource ac97_resources[] = {
 +      [0] = {
-+              .start  = AT91RM9200_BASE_SPI,
-+              .end    = AT91RM9200_BASE_SPI + SZ_16K - 1,
++              .start  = AT91SAM9263_BASE_AC97C,
++              .end    = AT91SAM9263_BASE_AC97C + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91RM9200_ID_SPI,
-+              .end    = AT91RM9200_ID_SPI,
++              .start  = AT91SAM9263_ID_AC97C,
++              .end    = AT91SAM9263_ID_AC97C,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
 +
-+static struct platform_device at91rm9200_spi_device = {
-+      .name           = "at91_spi",
-+      .id             = 0,
++static struct platform_device at91sam9263_ac97_device = {
++      .name           = "ac97c",
++      .id             = 1,
 +      .dev            = {
-+                              .dma_mask               = &spi_dmamask,
++                              .dma_mask               = &ac97_dmamask,
 +                              .coherent_dma_mask      = 0xffffffff,
++                              .platform_data          = &ac97_data,
 +      },
-+      .resource       = spi_resources,
-+      .num_resources  = ARRAY_SIZE(spi_resources),
++      .resource       = ac97_resources,
++      .num_resources  = ARRAY_SIZE(ac97_resources),
 +};
 +
-+static const unsigned spi_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 };
-+
-+void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
++void __init at91_add_device_ac97(struct atmel_ac97_data *data)
 +{
-+      int i;
-+      unsigned long cs_pin;
-+
-+      at91_set_A_periph(AT91_PIN_PA0, 0);     /* MISO */
-+      at91_set_A_periph(AT91_PIN_PA1, 0);     /* MOSI */
-+      at91_set_A_periph(AT91_PIN_PA2, 0);     /* SPCK */
-+
-+      /* Enable SPI chip-selects */
-+      for (i = 0; i < nr_devices; i++) {
-+              if (devices[i].controller_data)
-+                      cs_pin = (unsigned long) devices[i].controller_data;
-+              else
-+                      cs_pin = spi_standard_cs[devices[i].chip_select];
++      if (!data)
++              return;
 +
-+#ifdef CONFIG_SPI_AT91_MANUAL_CS
-+              at91_set_gpio_output(cs_pin, 1);
-+#else
-+              at91_set_A_periph(cs_pin, 0);
-+#endif
++      at91_set_A_periph(AT91_PIN_PB0, 0);     /* AC97FS */
++      at91_set_A_periph(AT91_PIN_PB1, 0);     /* AC97CK */
++      at91_set_A_periph(AT91_PIN_PB2, 0);     /* AC97TX */
++      at91_set_A_periph(AT91_PIN_PB3, 0);     /* AC97RX */
 +
-+              /* pass chip-select pin to driver */
-+              devices[i].controller_data = (void *) cs_pin;
-+      }
++      /* reset */
++      if (data->reset_pin)
++              at91_set_gpio_output(data->reset_pin, 0);
 +
-+      spi_register_board_info(devices, nr_devices);
-+      at91_clock_associate("spi_clk", &at91rm9200_spi_device.dev, "spi");
-+      platform_device_register(&at91rm9200_spi_device);
++      ac97_data = *ek_data;
++      platform_device_register(&at91sam9263_ac97_device);
 +}
 +#else
-+void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
++void __init at91_add_device_ac97(struct atmel_ac97_data *data) {}
 +#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  RTC
++ *  Image Sensor Interface
 + * -------------------------------------------------------------------- */
 +
-+#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE)
-+static struct platform_device at91rm9200_rtc_device = {
-+      .name           = "at91_rtc",
-+      .id             = -1,
-+      .num_resources  = 0,
++#if defined(CONFIG_VIDEO_AT91_ISI) || defined(CONFIG_VIDEO_AT91_ISI_MODULE)
++
++struct resource isi_resources[] = {
++      [0] = {
++              .start  = AT91SAM9263_BASE_ISI,
++              .end    = AT91SAM9263_BASE_ISI + SZ_16K - 1,
++              .flags  = IORESOURCE_MEM,
++      },
++      [1] = {
++              .start  = AT91SAM9263_ID_ISI,
++              .end    = AT91SAM9263_ID_ISI,
++              .flags  = IORESOURCE_IRQ,
++      },
 +};
 +
-+static void __init at91_add_device_rtc(void)
-+{
-+      platform_device_register(&at91rm9200_rtc_device);
++static struct platform_device at91sam9263_isi_device = {
++      .name           = "at91_isi",
++      .id             = -1,
++      .resource       = isi_resources,
++      .num_resources  = ARRAY_SIZE(isi_resources),
++};
++
++void __init at91_add_device_isi(void)
++{
++      at91_set_A_periph(AT91_PIN_PE0, 0);     /* ISI_D0 */
++      at91_set_A_periph(AT91_PIN_PE1, 0);     /* ISI_D1 */
++      at91_set_A_periph(AT91_PIN_PE2, 0);     /* ISI_D2 */
++      at91_set_A_periph(AT91_PIN_PE3, 0);     /* ISI_D3 */
++      at91_set_A_periph(AT91_PIN_PE4, 0);     /* ISI_D4 */
++      at91_set_A_periph(AT91_PIN_PE5, 0);     /* ISI_D5 */
++      at91_set_A_periph(AT91_PIN_PE6, 0);     /* ISI_D6 */
++      at91_set_A_periph(AT91_PIN_PE7, 0);     /* ISI_D7 */
++      at91_set_A_periph(AT91_PIN_PE8, 0);     /* ISI_PCK */
++      at91_set_A_periph(AT91_PIN_PE9, 0);     /* ISI_HSYNC */
++      at91_set_A_periph(AT91_PIN_PE10, 0);    /* ISI_VSYNC */
++      at91_set_B_periph(AT91_PIN_PE11, 0);    /* ISI_MCK (PCK3) */
++      at91_set_B_periph(AT91_PIN_PE12, 0);    /* ISI_PD8 */
++      at91_set_B_periph(AT91_PIN_PE13, 0);    /* ISI_PD9 */
++      at91_set_B_periph(AT91_PIN_PE14, 0);    /* ISI_PD10 */
++      at91_set_B_periph(AT91_PIN_PE15, 0);    /* ISI_PD11 */
 +}
 +#else
-+static void __init at91_add_device_rtc(void) {}
++void __init at91_add_device_isi(void) {}
 +#endif
 +
 +
 +/* --------------------------------------------------------------------
-+ *  Watchdog
++ *  LCD Controller
 + * -------------------------------------------------------------------- */
 +
-+#if defined(CONFIG_AT91RM9200_WATCHDOG) || defined(CONFIG_AT91RM9200_WATCHDOG_MODULE)
-+static struct platform_device at91rm9200_wdt_device = {
-+      .name           = "at91_wdt",
-+      .id             = -1,
-+      .num_resources  = 0,
-+};
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
++static u64 lcdc_dmamask = 0xffffffffUL;
++static struct atmel_lcdfb_info lcdc_data;
 +
-+static void __init at91_add_device_watchdog(void)
-+{
-+      platform_device_register(&at91rm9200_wdt_device);
-+}
-+#else
-+static void __init at91_add_device_watchdog(void) {}
-+#endif
++static struct resource lcdc_resources[] = {
++      [0] = {
++              .start  = AT91SAM9263_LCDC_BASE,
++              .end    = AT91SAM9263_LCDC_BASE + SZ_4K - 1,
++              .flags  = IORESOURCE_MEM,
++      },
++      [1] = {
++              .start  = AT91SAM9263_ID_LCDC,
++              .end    = AT91SAM9263_ID_LCDC,
++              .flags  = IORESOURCE_IRQ,
++      },
++};
 +
++static struct platform_device at91_lcdc_device = {
++      .name           = "atmel_lcdfb",
++      .id             = 0,
++      .dev            = {
++                              .dma_mask               = &lcdc_dmamask,
++                              .coherent_dma_mask      = 0xffffffff,
++                              .platform_data          = &lcdc_data,
++      },
++      .resource       = lcdc_resources,
++      .num_resources  = ARRAY_SIZE(lcdc_resources),
++};
 +
-+/* --------------------------------------------------------------------
-+ *  LEDs
-+ * -------------------------------------------------------------------- */
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
++{
++      if (!data)
++              return;
 +
-+#if defined(CONFIG_LEDS)
-+u8 at91_leds_cpu;
-+u8 at91_leds_timer;
++      at91_set_A_periph(AT91_PIN_PC1, 0);     /* LCDHSYNC */
++      at91_set_A_periph(AT91_PIN_PC2, 0);     /* LCDDOTCK */
++      at91_set_A_periph(AT91_PIN_PC3, 0);     /* LCDDEN */
++      at91_set_B_periph(AT91_PIN_PB9, 0);     /* LCDCC */
++      at91_set_A_periph(AT91_PIN_PC6, 0);     /* LCDD2 */
++      at91_set_A_periph(AT91_PIN_PC7, 0);     /* LCDD3 */
++      at91_set_A_periph(AT91_PIN_PC8, 0);     /* LCDD4 */
++      at91_set_A_periph(AT91_PIN_PC9, 0);     /* LCDD5 */
++      at91_set_A_periph(AT91_PIN_PC10, 0);    /* LCDD6 */
++      at91_set_A_periph(AT91_PIN_PC11, 0);    /* LCDD7 */
++      at91_set_A_periph(AT91_PIN_PC14, 0);    /* LCDD10 */
++      at91_set_A_periph(AT91_PIN_PC15, 0);    /* LCDD11 */
++      at91_set_A_periph(AT91_PIN_PC16, 0);    /* LCDD12 */
++      at91_set_B_periph(AT91_PIN_PC12, 0);    /* LCDD13 */
++      at91_set_A_periph(AT91_PIN_PC18, 0);    /* LCDD14 */
++      at91_set_A_periph(AT91_PIN_PC19, 0);    /* LCDD15 */
++      at91_set_A_periph(AT91_PIN_PC22, 0);    /* LCDD18 */
++      at91_set_A_periph(AT91_PIN_PC23, 0);    /* LCDD19 */
++      at91_set_A_periph(AT91_PIN_PC24, 0);    /* LCDD20 */
++      at91_set_B_periph(AT91_PIN_PC17, 0);    /* LCDD21 */
++      at91_set_A_periph(AT91_PIN_PC26, 0);    /* LCDD22 */
++      at91_set_A_periph(AT91_PIN_PC27, 0);    /* LCDD23 */
 +
-+void __init at91_init_leds(u8 cpu_led, u8 timer_led)
-+{
-+      at91_leds_cpu   = cpu_led;
-+      at91_leds_timer = timer_led;
++      lcdc_data = *data;
++      platform_device_register(&at91_lcdc_device);
 +}
 +#else
-+void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
 +#endif
 +
 +
++/* --------------------------------------------------------------------
+  *  LEDs
+  * -------------------------------------------------------------------- */
+@@ -594,6 +771,32 @@
+ #endif
 +#if defined(CONFIG_NEW_LEDS)
 +
 +static struct platform_device at91_leds = {
@@ -3008,7 +1104,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_devices.
 +              leds->index = nr;       /* first record stores number of leds */
 +              at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
 +      }
-+      
++
 +      platform_device_register(&at91_leds);
 +}
 +#else
@@ -3016,344 +1112,52 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_devices.
 +#endif
 +
 +
-+/* --------------------------------------------------------------------
-+ *  UART
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_SERIAL_ATMEL)
-+static struct resource dbgu_resources[] = {
-+      [0] = {
-+              .start  = AT91_VA_BASE_SYS + AT91_DBGU,
-+              .end    = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91_ID_SYS,
-+              .end    = AT91_ID_SYS,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data dbgu_data = {
-+      .use_dma_tx     = 0,
-+      .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-+      .regs           = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
-+};
-+
-+static struct platform_device at91rm9200_dbgu_device = {
-+      .name           = "atmel_usart",
-+      .id             = 0,
-+      .dev            = {
-+                              .platform_data  = &dbgu_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = dbgu_resources,
-+      .num_resources  = ARRAY_SIZE(dbgu_resources),
-+};
-+
-+static inline void configure_dbgu_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PA30, 0);            /* DRXD */
-+      at91_set_A_periph(AT91_PIN_PA31, 1);            /* DTXD */
-+}
-+
-+static struct resource uart0_resources[] = {
-+      [0] = {
-+              .start  = AT91RM9200_BASE_US0,
-+              .end    = AT91RM9200_BASE_US0 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_US0,
-+              .end    = AT91RM9200_ID_US0,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart0_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91rm9200_uart0_device = {
-+      .name           = "atmel_usart",
-+      .id             = 1,
-+      .dev            = {
-+                              .platform_data  = &uart0_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart0_resources,
-+      .num_resources  = ARRAY_SIZE(uart0_resources),
-+};
-+
-+static inline void configure_usart0_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PA17, 1);            /* TXD0 */
-+      at91_set_A_periph(AT91_PIN_PA18, 0);            /* RXD0 */
-+      at91_set_A_periph(AT91_PIN_PA20, 0);            /* CTS0 */
-+
-+      /*
-+       * AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21.
-+       *  We need to drive the pin manually.  Default is off (RTS is active low).
-+       */
-+      at91_set_gpio_output(AT91_PIN_PA21, 1);
-+}
-+
-+static struct resource uart1_resources[] = {
-+      [0] = {
-+              .start  = AT91RM9200_BASE_US1,
-+              .end    = AT91RM9200_BASE_US1 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_US1,
-+              .end    = AT91RM9200_ID_US1,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart1_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91rm9200_uart1_device = {
-+      .name           = "atmel_usart",
-+      .id             = 2,
-+      .dev            = {
-+                              .platform_data  = &uart1_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart1_resources,
-+      .num_resources  = ARRAY_SIZE(uart1_resources),
-+};
-+
-+static inline void configure_usart1_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PB18, 0);            /* RI1 */
-+      at91_set_A_periph(AT91_PIN_PB19, 0);            /* DTR1 */
-+      at91_set_A_periph(AT91_PIN_PB20, 1);            /* TXD1 */
-+      at91_set_A_periph(AT91_PIN_PB21, 0);            /* RXD1 */
-+      at91_set_A_periph(AT91_PIN_PB23, 0);            /* DCD1 */
-+      at91_set_A_periph(AT91_PIN_PB24, 0);            /* CTS1 */
-+      at91_set_A_periph(AT91_PIN_PB25, 0);            /* DSR1 */
-+      at91_set_A_periph(AT91_PIN_PB26, 0);            /* RTS1 */
-+}
-+
-+static struct resource uart2_resources[] = {
-+      [0] = {
-+              .start  = AT91RM9200_BASE_US2,
-+              .end    = AT91RM9200_BASE_US2 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_US2,
-+              .end    = AT91RM9200_ID_US2,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart2_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91rm9200_uart2_device = {
-+      .name           = "atmel_usart",
-+      .id             = 3,
-+      .dev            = {
-+                              .platform_data  = &uart2_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart2_resources,
-+      .num_resources  = ARRAY_SIZE(uart2_resources),
-+};
-+
-+static inline void configure_usart2_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PA22, 0);            /* RXD2 */
-+      at91_set_A_periph(AT91_PIN_PA23, 1);            /* TXD2 */
-+}
-+
-+static struct resource uart3_resources[] = {
-+      [0] = {
-+              .start  = AT91RM9200_BASE_US3,
-+              .end    = AT91RM9200_BASE_US3 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91RM9200_ID_US3,
-+              .end    = AT91RM9200_ID_US3,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart3_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91rm9200_uart3_device = {
-+      .name           = "atmel_usart",
-+      .id             = 4,
-+      .dev            = {
-+                              .platform_data  = &uart3_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart3_resources,
-+      .num_resources  = ARRAY_SIZE(uart3_resources),
-+};
-+
-+static inline void configure_usart3_pins(void)
-+{
-+      at91_set_B_periph(AT91_PIN_PA5, 1);             /* TXD3 */
-+      at91_set_B_periph(AT91_PIN_PA6, 0);             /* RXD3 */
-+}
-+
-+struct platform_device *at91_uarts[ATMEL_MAX_UART];   /* the UARTs to use */
-+struct platform_device *atmel_default_console_device; /* the serial console device */
-+
-+void __init at91_init_serial(struct at91_uart_config *config)
-+{
-+      int i;
-+
-+      /* Fill in list of supported UARTs */
-+      for (i = 0; i < config->nr_tty; i++) {
-+              switch (config->tty_map[i]) {
-+                      case 0:
-+                              configure_usart0_pins();
-+                              at91_uarts[i] = &at91rm9200_uart0_device;
-+                              at91_clock_associate("usart0_clk", &at91rm9200_uart0_device.dev, "usart");
-+                              break;
-+                      case 1:
-+                              configure_usart1_pins();
-+                              at91_uarts[i] = &at91rm9200_uart1_device;
-+                              at91_clock_associate("usart1_clk", &at91rm9200_uart1_device.dev, "usart");
-+                              break;
-+                      case 2:
-+                              configure_usart2_pins();
-+                              at91_uarts[i] = &at91rm9200_uart2_device;
-+                              at91_clock_associate("usart2_clk", &at91rm9200_uart2_device.dev, "usart");
-+                              break;
-+                      case 3:
-+                              configure_usart3_pins();
-+                              at91_uarts[i] = &at91rm9200_uart3_device;
-+                              at91_clock_associate("usart3_clk", &at91rm9200_uart3_device.dev, "usart");
-+                              break;
-+                      case 4:
-+                              configure_dbgu_pins();
-+                              at91_uarts[i] = &at91rm9200_dbgu_device;
-+                              at91_clock_associate("mck", &at91rm9200_dbgu_device.dev, "usart");
-+                              break;
-+                      default:
-+                              continue;
-+              }
-+              at91_uarts[i]->id = i;          /* update ID number to mapped ID */
-+      }
-+
-+      /* Set serial console device */
-+      if (config->console_tty < ATMEL_MAX_UART)
-+              atmel_default_console_device = at91_uarts[config->console_tty];
-+      if (!atmel_default_console_device)
-+              printk(KERN_INFO "AT91: No default serial console defined.\n");
-+}
-+
-+void __init at91_add_device_serial(void)
-+{
-+      int i;
-+
-+      for (i = 0; i < ATMEL_MAX_UART; i++) {
-+              if (at91_uarts[i])
-+                      platform_device_register(at91_uarts[i]);
-+      }
-+}
-+#else
-+void __init at91_init_serial(struct at91_uart_config *config) {}
-+void __init at91_add_device_serial(void) {}
-+#endif
-+
-+
-+/* -------------------------------------------------------------------- */
-+
-+/*
-+ * These devices are always present and don't need any board-specific
-+ * setup.
-+ */
-+static int __init at91_add_standard_devices(void)
-+{
-+      at91_add_device_rtc();
-+      at91_add_device_watchdog();
-+      return 0;
-+}
-+
-+arch_initcall(at91_add_standard_devices);
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_time.c linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200_time.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91rm9200_time.c      Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91rm9200_time.c    Thu Nov 16 11:41:09 2006
-@@ -30,6 +30,8 @@
- #include <asm/io.h>
- #include <asm/mach/time.h>
-+#include <asm/arch/at91_st.h>
-+
- static unsigned long last_crtr;
- /*
-@@ -99,6 +101,9 @@
-       /* Set Period Interval timer */
-       at91_sys_write(AT91_ST_PIMR, LATCH);
-+      /* Clear any pending interrupts */
-+      (void) at91_sys_read(AT91_ST_SR);
-+
-       /* Enable Period Interval Timer interrupt */
-       at91_sys_write(AT91_ST_IER, AT91_ST_PITS);
- }
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9260.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c  Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9260.c        Mon Nov 20 10:52:16 2006
-@@ -0,0 +1,294 @@
-+/*
-+ * arch/arm/mach-at91rm9200/at91sam9260.c
-+ *
-+ *  Copyright (C) 2006 SAN People
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ */
+ /* --------------------------------------------------------------------
+  *  UART
+  * -------------------------------------------------------------------- */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9rl.c linux-2.6-stable/arch/arm/mach-at91/at91sam9rl.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9rl.c       Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9rl.c   Fri May 11 15:48:14 2007
+@@ -0,0 +1,366 @@
++/*
++ * arch/arm/mach-at91/at91sam9rl.c
++ *
++ *  Copyright (C) 2005 SAN People
++ *  Copyright (C) 2007 Atmel Corporation
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive for
++ * more details.
++ */
 +
 +#include <linux/module.h>
 +
 +#include <asm/mach/arch.h>
 +#include <asm/mach/map.h>
-+#include <asm/arch/at91sam9260.h>
++#include <asm/arch/cpu.h>
++#include <asm/arch/at91sam9rl.h>
 +#include <asm/arch/at91_pmc.h>
++#include <asm/arch/at91_rstc.h>
 +
 +#include "generic.h"
 +#include "clock.h"
 +
-+static struct map_desc at91sam9260_io_desc[] __initdata = {
++static struct map_desc at91sam9rl_io_desc[] __initdata = {
 +      {
 +              .virtual        = AT91_VA_BASE_SYS,
 +              .pfn            = __phys_to_pfn(AT91_BASE_SYS),
 +              .length         = SZ_16K,
 +              .type           = MT_DEVICE,
-+      }, {
-+              .virtual        = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE,
-+              .pfn            = __phys_to_pfn(AT91SAM9260_SRAM0_BASE),
-+              .length         = AT91SAM9260_SRAM0_SIZE,
-+              .type           = MT_DEVICE,
-+      }, {
-+              .virtual        = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE - AT91SAM9260_SRAM1_SIZE,
-+              .pfn            = __phys_to_pfn(AT91SAM9260_SRAM1_BASE),
-+              .length         = AT91SAM9260_SRAM1_SIZE,
-+              .type           = MT_DEVICE,
 +      },
 +};
 +
++static struct map_desc at91sam9rl_sram_desc[] __initdata = {
++      {
++              .pfn            = __phys_to_pfn(AT91SAM9RL_SRAM_BASE),
++              .type           = MT_DEVICE,
++      }
++};
++
 +/* --------------------------------------------------------------------
 + *  Clocks
 + * -------------------------------------------------------------------- */
@@ -3363,118 +1167,145 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux
 + */
 +static struct clk pioA_clk = {
 +      .name           = "pioA_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_PIOA,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_PIOA,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk pioB_clk = {
 +      .name           = "pioB_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_PIOB,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_PIOB,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk pioC_clk = {
 +      .name           = "pioC_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_PIOC,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_PIOC,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk adc_clk = {
-+      .name           = "adc_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_ADC,
++static struct clk pioD_clk = {
++      .name           = "pioD_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_PIOD,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk usart0_clk = {
 +      .name           = "usart0_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US0,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_US0,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk usart1_clk = {
 +      .name           = "usart1_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US1,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_US1,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk usart2_clk = {
 +      .name           = "usart2_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US2,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_US2,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk usart3_clk = {
++      .name           = "usart3_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_US3,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
 +static struct clk mmc_clk = {
 +      .name           = "mci_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_MCI,
++      .pmc_mask       = 1 << AT91SAM9RL_ID_MCI,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk udc_clk = {
-+      .name           = "udc_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_UDP,
++static struct clk twi0_clk = {
++      .name           = "twi0_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TWI0,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk twi_clk = {
-+      .name           = "twi_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_TWI,
++static struct clk twi1_clk = {
++      .name           = "twi1_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TWI1,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk spi0_clk = {
-+      .name           = "spi0_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_SPI0,
++static struct clk spi_clk = {
++      .name           = "spi_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_SPI,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk spi1_clk = {
-+      .name           = "spi1_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_SPI1,
++static struct clk ssc0_clk = {
++      .name           = "ssc0_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_SSC0,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk ohci_clk = {
-+      .name           = "ohci_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_UHP,
++static struct clk ssc1_clk = {
++      .name           = "ssc1_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_SSC1,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk ether_clk = {
-+      .name           = "ether_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_EMAC,
++static struct clk tc0_clk = {
++      .name           = "tc0_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TC0,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk isi_clk = {
-+      .name           = "isi_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_ISI,
++static struct clk tc1_clk = {
++      .name           = "tc1_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TC1,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk usart3_clk = {
-+      .name           = "usart3_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US3,
++static struct clk tc2_clk = {
++      .name           = "tc2_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TC2,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk usart4_clk = {
-+      .name           = "usart4_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US4,
++static struct clk pwmc_clk = {
++      .name           = "pwmc_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_PWMC,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+static struct clk usart5_clk = {
-+      .name           = "usart5_clk",
-+      .pmc_mask       = 1 << AT91SAM9260_ID_US5,
++static struct clk tsc_clk = {
++      .name           = "tsc_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_TSC,
 +      .type           = CLK_TYPE_PERIPHERAL,
 +};
-+
-+static struct clk *periph_clocks[] __initdata = {
-+      &pioA_clk,
-+      &pioB_clk,
-+      &pioC_clk,
-+      &adc_clk,
-+      &usart0_clk,
-+      &usart1_clk,
-+      &usart2_clk,
-+      &mmc_clk,
-+      &udc_clk,
-+      &twi_clk,
-+      &spi0_clk,
-+      &spi1_clk,
-+      // ssc
-+      // tc0 .. tc2
-+      &ohci_clk,
-+      &ether_clk,
-+      &isi_clk,
++static struct clk dma_clk = {
++      .name           = "dma_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_DMA,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk udphs_clk = {
++      .name           = "udphs_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_UDPHS,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk lcdc_clk = {
++      .name           = "lcdc_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_LCDC,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++static struct clk ac97_clk = {
++      .name           = "ac97_clk",
++      .pmc_mask       = 1 << AT91SAM9RL_ID_AC97C,
++      .type           = CLK_TYPE_PERIPHERAL,
++};
++
++static struct clk *periph_clocks[] __initdata = {
++      &pioA_clk,
++      &pioB_clk,
++      &pioC_clk,
++      &pioD_clk,
++      &usart0_clk,
++      &usart1_clk,
++      &usart2_clk,
 +      &usart3_clk,
-+      &usart4_clk,
-+      &usart5_clk,
-+      // tc3 .. tc5
-+      // irq0 .. irq2
++      &mmc_clk,
++      &twi0_clk,
++      &twi1_clk,
++      &spi_clk,
++      &ssc0_clk,
++      &ssc1_clk,
++      &tc0_clk,
++      &tc1_clk,
++      &tc2_clk,
++      &pwmc_clk,
++      &tsc_clk,
++      &dma_clk,
++      &udphs_clk,
++      &lcdc_clk,
++      &ac97_clk,
++      // irq0
 +};
 +
 +/*
@@ -3494,7 +1325,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux
 +      .id             = 1,
 +};
 +
-+static void __init at91sam9260_register_clocks(void)
++static void __init at91sam9rl_register_clocks(void)
 +{
 +      int i;
 +
@@ -3509,49 +1340,96 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux
 + *  GPIO
 + * -------------------------------------------------------------------- */
 +
-+static struct at91_gpio_bank at91sam9260_gpio[] = {
++static struct at91_gpio_bank at91sam9rl_gpio[] = {
 +      {
-+              .id             = AT91SAM9260_ID_PIOA,
++              .id             = AT91SAM9RL_ID_PIOA,
 +              .offset         = AT91_PIOA,
 +              .clock          = &pioA_clk,
 +      }, {
-+              .id             = AT91SAM9260_ID_PIOB,
++              .id             = AT91SAM9RL_ID_PIOB,
 +              .offset         = AT91_PIOB,
 +              .clock          = &pioB_clk,
 +      }, {
-+              .id             = AT91SAM9260_ID_PIOC,
++              .id             = AT91SAM9RL_ID_PIOC,
 +              .offset         = AT91_PIOC,
 +              .clock          = &pioC_clk,
++      }, {
++              .id             = AT91SAM9RL_ID_PIOD,
++              .offset         = AT91_PIOD,
++              .clock          = &pioD_clk,
 +      }
 +};
 +
-+static void at91sam9260_reset(void)
++static void at91sam9rl_reset(void)
 +{
-+#warning "Implement CPU reset"
++      at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
 +}
 +
 +
 +/* --------------------------------------------------------------------
-+ *  AT91SAM9260 processor initialization
++ *  Timer/Counter library initialization
++ * -------------------------------------------------------------------- */
++#ifdef CONFIG_ATMEL_TCLIB
++
++#include "tclib.h"
++
++static struct atmel_tcblock at91sam9rl_tcblocks[] = {
++      [0] = {
++              .physaddr       = AT91SAM9RL_BASE_TCB0,
++              .irq            = { AT91SAM9RL_ID_TC0, AT91SAM9RL_ID_TC1, AT91SAM9RL_ID_TC2 },
++              .clk            = { &tc0_clk, &tc1_clk, &tc2_clk },
++      }
++};
++
++#define at91sam9rl_tc_init()  atmel_tc_init(at91sam9rl_tcblocks, ARRAY_SIZE(at91sam9rl_tcblocks))
++
++#else
++#define at91sam9rl_tc_init()  do {} while(0)
++#endif
++
++
++/* --------------------------------------------------------------------
++ *  AT91SAM9RL processor initialization
 + * -------------------------------------------------------------------- */
 +
-+void __init at91sam9260_initialize(unsigned long main_clock)
++void __init at91sam9rl_initialize(unsigned long main_clock)
 +{
++      unsigned long cidr, sram_size;
++
 +      /* Map peripherals */
-+      iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc));
++      iotable_init(at91sam9rl_io_desc, ARRAY_SIZE(at91sam9rl_io_desc));
++
++      cidr = at91_sys_read(AT91_DBGU_CIDR);
++
++      switch (cidr & AT91_CIDR_SRAMSIZ) {
++              case AT91_CIDR_SRAMSIZ_32K:
++                      sram_size = 2 * SZ_16K;
++                      break;
++              case AT91_CIDR_SRAMSIZ_16K:
++              default:
++                      sram_size = SZ_16K;
++      }
++
++      at91sam9rl_sram_desc->virtual = AT91_IO_VIRT_BASE - sram_size;
++      at91sam9rl_sram_desc->length = sram_size;
 +
-+      at91_arch_reset = at91sam9260_reset;
-+      at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
-+                      | (1 << AT91SAM9260_ID_IRQ2);
++      /* Map SRAM */
++      iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
++
++      at91_arch_reset = at91sam9rl_reset;
++      at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
 +
 +      /* Init clock subsystem */
 +      at91_clock_init(main_clock);
 +
 +      /* Register the processor-specific clocks */
-+      at91sam9260_register_clocks();
++      at91sam9rl_register_clocks();
 +
 +      /* Register GPIO subsystem */
-+      at91_gpio_init(at91sam9260_gpio, 3);
++      at91_gpio_init(at91sam9rl_gpio, 4);
++      
++      /* Initialize the Timer/Counter blocks */
++      at91sam9rl_tc_init();
 +}
 +
 +/* --------------------------------------------------------------------
@@ -3561,45 +1439,45 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux
 +/*
 + * The default interrupt priority levels (0 = lowest, 7 = highest).
 + */
-+static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
++static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
 +      7,      /* Advanced Interrupt Controller */
 +      7,      /* System Peripherals */
-+      0,      /* Parallel IO Controller A */
-+      0,      /* Parallel IO Controller B */
-+      0,      /* Parallel IO Controller C */
-+      0,      /* Analog-to-Digital Converter */
-+      6,      /* USART 0 */
-+      6,      /* USART 1 */
-+      6,      /* USART 2 */
++      1,      /* Parallel IO Controller A */
++      1,      /* Parallel IO Controller B */
++      1,      /* Parallel IO Controller C */
++      1,      /* Parallel IO Controller D */
++      5,      /* USART 0 */
++      5,      /* USART 1 */
++      5,      /* USART 2 */
++      5,      /* USART 3 */
 +      0,      /* Multimedia Card Interface */
-+      4,      /* USB Device Port */
-+      0,      /* Two-Wire Interface */
-+      6,      /* Serial Peripheral Interface 0 */
-+      6,      /* Serial Peripheral Interface 1 */
-+      5,      /* Serial Synchronous Controller */
-+      0,
-+      0,
++      6,      /* Two-Wire Interface 0 */
++      6,      /* Two-Wire Interface 1 */
++      5,      /* Serial Peripheral Interface */
++      4,      /* Serial Synchronous Controller 0 */
++      4,      /* Serial Synchronous Controller 1 */
 +      0,      /* Timer Counter 0 */
 +      0,      /* Timer Counter 1 */
 +      0,      /* Timer Counter 2 */
-+      3,      /* USB Host port */
-+      3,      /* Ethernet */
-+      0,      /* Image Sensor Interface */
-+      6,      /* USART 3 */
-+      6,      /* USART 4 */
-+      6,      /* USART 5 */
-+      0,      /* Timer Counter 3 */
-+      0,      /* Timer Counter 4 */
-+      0,      /* Timer Counter 5 */
-+      0,      /* Advanced Interrupt Controller */
-+      0,      /* Advanced Interrupt Controller */
++      0,
++      0,      /* Touch Screen Controller */
++      0,      /* DMA Controller */
++      2,      /* USB Device High speed port */
++      2,      /* LCD Controller */
++      6,      /* AC97 Controller */
++      0,
++      0,
++      0,
++      0,
++      0,
++      0,
 +      0,      /* Advanced Interrupt Controller */
 +};
 +
-+void __init at91sam9260_init_interrupts(unsigned int priority[NR_AIC_IRQS])
++void __init at91sam9rl_init_interrupts(unsigned int priority[NR_AIC_IRQS])
 +{
 +      if (!priority)
-+              priority = at91sam9260_default_irq_priority;
++              priority = at91sam9rl_default_irq_priority;
 +
 +      /* Initialize the AIC interrupt controller */
 +      at91_aic_init(priority);
@@ -3607,29 +1485,30 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260.c linux
 +      /* Enable GPIO interrupts */
 +      at91_gpio_irq_setup();
 +}
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices.c linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9260_devices.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices.c  Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9260_devices.c        Thu Nov 23 16:37:24 2006
-@@ -0,0 +1,892 @@
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/at91sam9rl_devices.c linux-2.6-stable/arch/arm/mach-at91/at91sam9rl_devices.c
+--- linux-2.6.21/arch/arm/mach-at91/at91sam9rl_devices.c       Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/at91sam9rl_devices.c   Fri May 11 16:03:25 2007
+@@ -0,0 +1,660 @@
 +/*
-+ * arch/arm/mach-at91rm9200/at91sam9260_devices.c
-+ *
-+ *  Copyright (C) 2006 Atmel
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
++ *  Copyright (C) 2007 Atmel Corporation
 + *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive for
++ * more details.
 + */
++
 +#include <asm/mach/arch.h>
 +#include <asm/mach/map.h>
 +
 +#include <linux/platform_device.h>
++#include <linux/fb.h>
++
++#include <video/atmel_lcdc.h>
 +
 +#include <asm/arch/board.h>
 +#include <asm/arch/gpio.h>
-+#include <asm/arch/at91sam9260.h>
++#include <asm/arch/at91sam9rl.h>
++#include <asm/arch/at91sam9rl_matrix.h>
 +#include <asm/arch/at91sam926x_mc.h>
 +
 +#include "generic.h"
@@ -3638,175 +1517,6 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +#define SZ_256        0x00000100
 +#define SZ_16 0x00000010
 +
-+/* --------------------------------------------------------------------
-+ *  USB Host
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-+static u64 ohci_dmamask = 0xffffffffUL;
-+static struct at91_usbh_data usbh_data;
-+
-+static struct resource usbh_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_UHP_BASE,
-+              .end    = AT91SAM9260_UHP_BASE + SZ_1M - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_UHP,
-+              .end    = AT91SAM9260_ID_UHP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91_usbh_device = {
-+      .name           = "at91_ohci",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &ohci_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &usbh_data,
-+      },
-+      .resource       = usbh_resources,
-+      .num_resources  = ARRAY_SIZE(usbh_resources),
-+};
-+
-+void __init at91_add_device_usbh(struct at91_usbh_data *data)
-+{
-+      if (!data)
-+              return;
-+
-+      usbh_data = *data;
-+      platform_device_register(&at91_usbh_device);
-+}
-+#else
-+void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
-+#endif
-+
-+
-+/* --------------------------------------------------------------------
-+ *  USB Device (Gadget)
-+ * -------------------------------------------------------------------- */
-+
-+#ifdef CONFIG_USB_GADGET_AT91
-+static struct at91_udc_data udc_data;
-+
-+static struct resource udc_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_BASE_UDP,
-+              .end    = AT91SAM9260_BASE_UDP + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_UDP,
-+              .end    = AT91SAM9260_ID_UDP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91_udc_device = {
-+      .name           = "at91_udc",
-+      .id             = -1,
-+      .dev            = {
-+                              .platform_data          = &udc_data,
-+      },
-+      .resource       = udc_resources,
-+      .num_resources  = ARRAY_SIZE(udc_resources),
-+};
-+
-+void __init at91_add_device_udc(struct at91_udc_data *data)
-+{
-+      if (!data)
-+              return;
-+
-+      if (data->vbus_pin) {
-+              at91_set_gpio_input(data->vbus_pin, 0);
-+              at91_set_deglitch(data->vbus_pin, 1);
-+      }
-+
-+      /* Pullup pin is handled internally by USB device peripheral */
-+
-+      udc_data = *data;
-+      platform_device_register(&at91_udc_device);
-+}
-+#else
-+void __init at91_add_device_udc(struct at91_udc_data *data) {}
-+#endif
-+
-+
-+/* --------------------------------------------------------------------
-+ *  Ethernet
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE)
-+static u64 eth_dmamask = 0xffffffffUL;
-+static struct eth_platform_data eth_data;
-+
-+static struct resource eth_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_BASE_EMAC,
-+              .end    = AT91SAM9260_BASE_EMAC + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_EMAC,
-+              .end    = AT91SAM9260_ID_EMAC,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91sam9260_eth_device = {
-+      .name           = "macb",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &eth_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &eth_data,
-+      },
-+      .resource       = eth_resources,
-+      .num_resources  = ARRAY_SIZE(eth_resources),
-+};
-+
-+void __init at91_add_device_eth(struct eth_platform_data *data)
-+{
-+      if (!data)
-+              return;
-+
-+      if (data->phy_irq_pin) {
-+              at91_set_gpio_input(data->phy_irq_pin, 0);
-+              at91_set_deglitch(data->phy_irq_pin, 1);
-+      }
-+
-+      /* Pins used for MII and RMII */
-+      at91_set_A_periph(AT91_PIN_PA19, 0);    /* ETXCK_EREFCK */
-+      at91_set_A_periph(AT91_PIN_PA17, 0);    /* ERXDV */
-+      at91_set_A_periph(AT91_PIN_PA14, 0);    /* ERX0 */
-+      at91_set_A_periph(AT91_PIN_PA15, 0);    /* ERX1 */
-+      at91_set_A_periph(AT91_PIN_PA18, 0);    /* ERXER */
-+      at91_set_A_periph(AT91_PIN_PA16, 0);    /* ETXEN */
-+      at91_set_A_periph(AT91_PIN_PA12, 0);    /* ETX0 */
-+      at91_set_A_periph(AT91_PIN_PA13, 0);    /* ETX1 */
-+      at91_set_A_periph(AT91_PIN_PA21, 0);    /* EMDIO */
-+      at91_set_A_periph(AT91_PIN_PA20, 0);    /* EMDC */
-+
-+      if (!data->is_rmii) {
-+              at91_set_B_periph(AT91_PIN_PA28, 0);    /* ECRS */
-+              at91_set_B_periph(AT91_PIN_PA29, 0);    /* ECOL */
-+              at91_set_B_periph(AT91_PIN_PA25, 0);    /* ERX2 */
-+              at91_set_B_periph(AT91_PIN_PA26, 0);    /* ERX3 */
-+              at91_set_B_periph(AT91_PIN_PA27, 0);    /* ERXCK */
-+              at91_set_B_periph(AT91_PIN_PA23, 0);    /* ETX2 */
-+              at91_set_B_periph(AT91_PIN_PA24, 0);    /* ETX3 */
-+              at91_set_B_periph(AT91_PIN_PA22, 0);    /* ETXER */
-+      }
-+
-+      eth_data = *data;
-+      platform_device_register(&at91sam9260_eth_device);
-+}
-+#else
-+void __init at91_add_device_eth(struct eth_platform_data *data) {}
-+#endif
-+
 +
 +/* --------------------------------------------------------------------
 + *  MMC / SD
@@ -3818,18 +1528,18 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static struct resource mmc_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_MCI,
-+              .end    = AT91SAM9260_BASE_MCI + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_MCI,
++              .end    = AT91SAM9RL_BASE_MCI + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_MCI,
-+              .end    = AT91SAM9260_ID_MCI,
++              .start  = AT91SAM9RL_ID_MCI,
++              .end    = AT91SAM9RL_ID_MCI,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
 +
-+static struct platform_device at91sam9260_mmc_device = {
++static struct platform_device at91sam9rl_mmc_device = {
 +      .name           = "at91_mci",
 +      .id             = -1,
 +      .dev            = {
@@ -3841,7 +1551,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .num_resources  = ARRAY_SIZE(mmc_resources),
 +};
 +
-+void __init at91_add_device_mmc(struct at91_mmc_data *data)
++void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
 +{
 +      if (!data)
 +              return;
@@ -3857,37 +1567,24 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +              at91_set_gpio_output(data->vcc_pin, 0);
 +
 +      /* CLK */
-+      at91_set_A_periph(AT91_PIN_PA8, 0);
-+      
-+      if (data->slot_b) {
-+              /* CMD */
-+              at91_set_B_periph(AT91_PIN_PA1, 1);
-+
-+              /* DAT0, maybe DAT1..DAT3 */
-+              at91_set_B_periph(AT91_PIN_PA0, 1);
-+              if (data->wire4) {
-+                      at91_set_B_periph(AT91_PIN_PA5, 1);
-+                      at91_set_B_periph(AT91_PIN_PA4, 1);
-+                      at91_set_B_periph(AT91_PIN_PA3, 1);
-+              }
-+      } else {
-+              /* CMD */
-+              at91_set_A_periph(AT91_PIN_PA7, 1);
-+
-+              /* DAT0, maybe DAT1..DAT3 */
-+              at91_set_A_periph(AT91_PIN_PA6, 1);
-+              if (data->wire4) {
-+                      at91_set_A_periph(AT91_PIN_PA9, 1);
-+                      at91_set_A_periph(AT91_PIN_PA10, 1);
-+                      at91_set_A_periph(AT91_PIN_PA11, 1);
-+              }
++      at91_set_A_periph(AT91_PIN_PA2, 0);
++
++      /* CMD */
++      at91_set_A_periph(AT91_PIN_PA1, 1);
++
++      /* DAT0, maybe DAT1..DAT3 */
++      at91_set_A_periph(AT91_PIN_PA0, 1);
++      if (data->wire4) {
++              at91_set_A_periph(AT91_PIN_PA3, 1);
++              at91_set_A_periph(AT91_PIN_PA4, 1);
++              at91_set_A_periph(AT91_PIN_PA5, 1);
 +      }
-+      
++
 +      mmc_data = *data;
-+      platform_device_register(&at91sam9260_mmc_device);
++      platform_device_register(&at91sam9rl_mmc_device);
 +}
 +#else
-+void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
++void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
 +#endif
 +
 +
@@ -3903,12 +1600,12 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +static struct resource nand_resources[] = {
 +      {
 +              .start  = NAND_BASE,
-+              .end    = NAND_BASE + SZ_8M - 1,
++              .end    = NAND_BASE + SZ_256M - 1,
 +              .flags  = IORESOURCE_MEM,
 +      }
 +};
 +
-+static struct platform_device at91sam9260_nand_device = {
++static struct platform_device at91_nand_device = {
 +      .name           = "at91_nand",
 +      .id             = -1,
 +      .dev            = {
@@ -3920,13 +1617,13 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +void __init at91_add_device_nand(struct at91_nand_data *data)
 +{
-+      unsigned long csa, mode;
++      unsigned long csa;
 +
 +      if (!data)
 +              return;
 +
 +      csa = at91_sys_read(AT91_MATRIX_EBICSA);
-+      at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC);
++      at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
 +
 +      /* set the bus interface characteristics */
 +      at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0)
@@ -3937,11 +1634,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +      at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
 +
-+      if (data->bus_width_16)
-+              mode = AT91_SMC_DBW_16;
-+      else
-+              mode = AT91_SMC_DBW_8;
-+      at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1));
++      at91_sys_write(AT91_SMC_MODE(3), AT91_SMC_DBW_8 | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1));
 +
 +      /* enable pin */
 +      if (data->enable_pin)
@@ -3955,9 +1648,13 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      if (data->det_pin)
 +              at91_set_gpio_input(data->det_pin, 1);
 +
++      at91_set_A_periph(AT91_PIN_PB4, 0);             /* NANDOE */
++      at91_set_A_periph(AT91_PIN_PB5, 0);             /* NANDWE */
++
 +      nand_data = *data;
-+      platform_device_register(&at91sam9260_nand_device);
++      platform_device_register(&at91_nand_device);
 +}
++
 +#else
 +void __init at91_add_device_nand(struct at91_nand_data *data) {}
 +#endif
@@ -3971,18 +1668,18 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static struct resource twi_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_TWI,
-+              .end    = AT91SAM9260_BASE_TWI + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_TWI0,
++              .end    = AT91SAM9RL_BASE_TWI0 + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_TWI,
-+              .end    = AT91SAM9260_ID_TWI,
++              .start  = AT91SAM9RL_ID_TWI0,
++              .end    = AT91SAM9RL_ID_TWI0,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
 +
-+static struct platform_device at91sam9260_twi_device = {
++static struct platform_device at91sam9rl_twi_device = {
 +      .name           = "at91_i2c",
 +      .id             = -1,
 +      .resource       = twi_resources,
@@ -3998,7 +1695,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      at91_set_A_periph(AT91_PIN_PA24, 0);            /* TWCK */
 +      at91_set_multi_drive(AT91_PIN_PA24, 1);
 +
-+      platform_device_register(&at91sam9260_twi_device);
++      platform_device_register(&at91sam9rl_twi_device);
 +}
 +#else
 +void __init at91_add_device_i2c(void) {}
@@ -4012,78 +1709,48 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
 +static u64 spi_dmamask = 0xffffffffUL;
 +
-+static struct resource spi0_resources[] = {
++static struct resource spi_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_SPI0,
-+              .end    = AT91SAM9260_BASE_SPI0 + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_SPI,
++              .end    = AT91SAM9RL_BASE_SPI + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_SPI0,
-+              .end    = AT91SAM9260_ID_SPI0,
++              .start  = AT91SAM9RL_ID_SPI,
++              .end    = AT91SAM9RL_ID_SPI,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
 +
-+static struct platform_device at91sam9260_spi0_device = {
++static struct platform_device at91sam9rl_spi_device = {
 +      .name           = "atmel_spi",
 +      .id             = 0,
 +      .dev            = {
 +                              .dma_mask               = &spi_dmamask,
 +                              .coherent_dma_mask      = 0xffffffff,
 +      },
-+      .resource       = spi0_resources,
-+      .num_resources  = ARRAY_SIZE(spi0_resources),
-+};
-+
-+static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PC11, AT91_PIN_PC16, AT91_PIN_PC17 };
-+
-+static struct resource spi1_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_BASE_SPI1,
-+              .end    = AT91SAM9260_BASE_SPI1 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_SPI1,
-+              .end    = AT91SAM9260_ID_SPI1,
-+              .flags  = IORESOURCE_IRQ,
-+      },
++      .resource       = spi_resources,
++      .num_resources  = ARRAY_SIZE(spi_resources),
 +};
 +
-+static struct platform_device at91sam9260_spi1_device = {
-+      .name           = "atmel_spi",
-+      .id             = 1,
-+      .dev            = {
-+                              .dma_mask               = &spi_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+      },
-+      .resource       = spi1_resources,
-+      .num_resources  = ARRAY_SIZE(spi1_resources),
-+};
++static const unsigned spi_standard_cs[4] = { AT91_PIN_PA28, AT91_PIN_PB7, AT91_PIN_PD8, AT91_PIN_PD9 };
 +
-+static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB3, AT91_PIN_PC5, AT91_PIN_PC4, AT91_PIN_PC3 };
 +
 +void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
 +{
 +      int i;
 +      unsigned long cs_pin;
-+      short enable_spi0 = 0;
-+      short enable_spi1 = 0;
 +
-+      /* Choose SPI chip-selects */
++      at91_set_A_periph(AT91_PIN_PA25, 0);    /* MISO */
++      at91_set_A_periph(AT91_PIN_PA26, 0);    /* MOSI */
++      at91_set_A_periph(AT91_PIN_PA27, 0);    /* SPCK */
++
++      /* Enable SPI chip-selects */
 +      for (i = 0; i < nr_devices; i++) {
 +              if (devices[i].controller_data)
 +                      cs_pin = (unsigned long) devices[i].controller_data;
-+              else if (devices[i].bus_num == 0)
-+                      cs_pin = spi0_standard_cs[devices[i].chip_select];
-+              else
-+                      cs_pin = spi1_standard_cs[devices[i].chip_select];
-+
-+              if (devices[i].bus_num == 0)
-+                      enable_spi0 = 1;
 +              else
-+                      enable_spi1 = 1;
++                      cs_pin = spi_standard_cs[devices[i].chip_select];
 +
 +              /* enable chip-select pin */
 +              at91_set_gpio_output(cs_pin, 1);
@@ -4093,27 +1760,86 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      }
 +
 +      spi_register_board_info(devices, nr_devices);
++      platform_device_register(&at91sam9rl_spi_device);
++}
++#else
++void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
++#endif
 +
-+      /* Configure SPI bus(es) */
-+      if (enable_spi0) {
-+              at91_set_A_periph(AT91_PIN_PA0, 0);     /* SPI0_MISO */
-+              at91_set_A_periph(AT91_PIN_PA1, 0);     /* SPI0_MOSI */
-+              at91_set_A_periph(AT91_PIN_PA2, 0);     /* SPI1_SPCK */
 +
-+              at91_clock_associate("spi0_clk", &at91sam9260_spi0_device.dev, "spi_clk");
-+              platform_device_register(&at91sam9260_spi0_device);
-+      }
-+      if (enable_spi1) {
-+              at91_set_A_periph(AT91_PIN_PB0, 0);     /* SPI1_MISO */
-+              at91_set_A_periph(AT91_PIN_PB1, 0);     /* SPI1_MOSI */
-+              at91_set_A_periph(AT91_PIN_PB2, 0);     /* SPI1_SPCK */
++/* --------------------------------------------------------------------
++ *  LCD Controller
++ * -------------------------------------------------------------------- */
++
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
++static u64 lcdc_dmamask = 0xffffffffUL;
++static struct atmel_lcdfb_info lcdc_data;
++
++static struct resource lcdc_resources[] = {
++      [0] = {
++              .start  = AT91SAM9RL_LCDC_BASE,
++              .end    = AT91SAM9RL_LCDC_BASE + SZ_4K - 1,
++              .flags  = IORESOURCE_MEM,
++      },
++      [1] = {
++              .start  = AT91SAM9RL_ID_LCDC,
++              .end    = AT91SAM9RL_ID_LCDC,
++              .flags  = IORESOURCE_IRQ,
++      },
++#if defined(CONFIG_FB_INTSRAM)
++      [2] = {
++              .start  = AT91SAM9RL_SRAM_BASE,
++              .end    = AT91SAM9RL_SRAM_BASE + AT91SAM9RL_SRAM_SIZE - 1,
++              .flags  = IORESOURCE_MEM,
++      },
++#endif
++};
++
++static struct platform_device at91_lcdc_device = {
++      .name           = "atmel_lcdfb",
++      .id             = 0,
++      .dev            = {
++                              .dma_mask               = &lcdc_dmamask,
++                              .coherent_dma_mask      = 0xffffffff,
++                              .platform_data          = &lcdc_data,
++      },
++      .resource       = lcdc_resources,
++      .num_resources  = ARRAY_SIZE(lcdc_resources),
++};
 +
-+              at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk");
-+              platform_device_register(&at91sam9260_spi1_device);
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data)
++{
++      if (!data) {
++              return;
 +      }
++
++#warning "Check this"
++      at91_set_B_periph(AT91_PIN_PC5, 0);     /* LCDHSYNC */
++      at91_set_B_periph(AT91_PIN_PC6, 0);     /* LCDDOTCK */
++      at91_set_B_periph(AT91_PIN_PC7, 0);     /* LCDDEN */
++      at91_set_B_periph(AT91_PIN_PC3, 0);     /* LCDCC */
++      at91_set_B_periph(AT91_PIN_PC9, 0);     /* LCDD3 */
++      at91_set_B_periph(AT91_PIN_PC10, 0);    /* LCDD4 */
++      at91_set_B_periph(AT91_PIN_PC11, 0);    /* LCDD5 */
++      at91_set_B_periph(AT91_PIN_PC12, 0);    /* LCDD6 */
++      at91_set_B_periph(AT91_PIN_PC13, 0);    /* LCDD7 */
++      at91_set_B_periph(AT91_PIN_PC15, 0);    /* LCDD11 */
++      at91_set_B_periph(AT91_PIN_PC16, 0);    /* LCDD12 */
++      at91_set_B_periph(AT91_PIN_PC17, 0);    /* LCDD13 */
++      at91_set_B_periph(AT91_PIN_PC18, 0);    /* LCDD14 */
++      at91_set_B_periph(AT91_PIN_PC19, 0);    /* LCDD15 */
++      at91_set_B_periph(AT91_PIN_PC20, 0);    /* LCDD18 */
++      at91_set_B_periph(AT91_PIN_PC21, 0);    /* LCDD19 */
++      at91_set_B_periph(AT91_PIN_PC22, 0);    /* LCDD20 */
++      at91_set_B_periph(AT91_PIN_PC23, 0);    /* LCDD21 */
++      at91_set_B_periph(AT91_PIN_PC24, 0);    /* LCDD22 */
++      at91_set_B_periph(AT91_PIN_PC25, 0);    /* LCDD23 */
++
++      lcdc_data = *data;
++      platform_device_register(&at91_lcdc_device);
 +}
 +#else
-+void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
++void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
 +#endif
 +
 +
@@ -4127,6 +1853,10 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +void __init at91_init_leds(u8 cpu_led, u8 timer_led)
 +{
++      /* Enable GPIO to access the LEDs */
++      at91_set_gpio_output(cpu_led, 1);
++      at91_set_gpio_output(timer_led, 1);
++
 +      at91_leds_cpu   = cpu_led;
 +      at91_leds_timer = timer_led;
 +}
@@ -4164,6 +1894,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +/* --------------------------------------------------------------------
 + *  UART
 + * -------------------------------------------------------------------- */
++
 +#if defined(CONFIG_SERIAL_ATMEL)
 +static struct resource dbgu_resources[] = {
 +      [0] = {
@@ -4184,7 +1915,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .regs           = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
 +};
 +
-+static struct platform_device at91sam9260_dbgu_device = {
++static struct platform_device at91sam9rl_dbgu_device = {
 +      .name           = "atmel_usart",
 +      .id             = 0,
 +      .dev            = {
@@ -4197,19 +1928,19 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static inline void configure_dbgu_pins(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PB14, 0);            /* DRXD */
-+      at91_set_A_periph(AT91_PIN_PB15, 1);            /* DTXD */
++      at91_set_A_periph(AT91_PIN_PA21, 0);            /* DRXD */
++      at91_set_A_periph(AT91_PIN_PA22, 1);            /* DTXD */
 +}
 +
 +static struct resource uart0_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_US0,
-+              .end    = AT91SAM9260_BASE_US0 + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_US0,
++              .end    = AT91SAM9RL_BASE_US0 + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_US0,
-+              .end    = AT91SAM9260_ID_US0,
++              .start  = AT91SAM9RL_ID_US0,
++              .end    = AT91SAM9RL_ID_US0,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
@@ -4219,7 +1950,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .use_dma_rx     = 1,
 +};
 +
-+static struct platform_device at91sam9260_uart0_device = {
++static struct platform_device at91sam9rl_uart0_device = {
 +      .name           = "atmel_usart",
 +      .id             = 1,
 +      .dev            = {
@@ -4232,25 +1963,21 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static inline void configure_usart0_pins(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PB4, 1);             /* TXD0 */
-+      at91_set_A_periph(AT91_PIN_PB5, 0);             /* RXD0 */
-+      at91_set_A_periph(AT91_PIN_PB26, 0);            /* RTS0 */
-+      at91_set_A_periph(AT91_PIN_PB27, 0);            /* CTS0 */
-+      at91_set_A_periph(AT91_PIN_PB24, 0);            /* DTR0 */
-+      at91_set_A_periph(AT91_PIN_PB22, 0);            /* DSR0 */
-+      at91_set_A_periph(AT91_PIN_PB23, 0);            /* DCD0 */
-+      at91_set_A_periph(AT91_PIN_PB25, 0);            /* RI0 */
++      at91_set_A_periph(AT91_PIN_PA6, 1);             /* TXD0 */
++      at91_set_A_periph(AT91_PIN_PA7, 0);             /* RXD0 */
++      at91_set_A_periph(AT91_PIN_PA9, 0);             /* RTS0 */
++      at91_set_A_periph(AT91_PIN_PA10, 0);            /* CTS0 */
 +}
 +
 +static struct resource uart1_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_US1,
-+              .end    = AT91SAM9260_BASE_US1 + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_US1,
++              .end    = AT91SAM9RL_BASE_US1 + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_US1,
-+              .end    = AT91SAM9260_ID_US1,
++              .start  = AT91SAM9RL_ID_US1,
++              .end    = AT91SAM9RL_ID_US1,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
@@ -4260,7 +1987,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .use_dma_rx     = 1,
 +};
 +
-+static struct platform_device at91sam9260_uart1_device = {
++static struct platform_device at91sam9rl_uart1_device = {
 +      .name           = "atmel_usart",
 +      .id             = 2,
 +      .dev            = {
@@ -4273,21 +2000,19 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static inline void configure_usart1_pins(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PB6, 1);             /* TXD1 */
-+      at91_set_A_periph(AT91_PIN_PB7, 0);             /* RXD1 */
-+      at91_set_A_periph(AT91_PIN_PB28, 0);            /* RTS1 */
-+      at91_set_A_periph(AT91_PIN_PB29, 0);            /* CTS1 */
++      at91_set_A_periph(AT91_PIN_PA11, 1);            /* TXD1 */
++      at91_set_A_periph(AT91_PIN_PA12, 0);            /* RXD1 */
 +}
 +
 +static struct resource uart2_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_US2,
-+              .end    = AT91SAM9260_BASE_US2 + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_US2,
++              .end    = AT91SAM9RL_BASE_US2 + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_US2,
-+              .end    = AT91SAM9260_ID_US2,
++              .start  = AT91SAM9RL_ID_US2,
++              .end    = AT91SAM9RL_ID_US2,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
@@ -4297,7 +2022,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .use_dma_rx     = 1,
 +};
 +
-+static struct platform_device at91sam9260_uart2_device = {
++static struct platform_device at91sam9rl_uart2_device = {
 +      .name           = "atmel_usart",
 +      .id             = 3,
 +      .dev            = {
@@ -4310,19 +2035,19 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static inline void configure_usart2_pins(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PB8, 1);             /* TXD2 */
-+      at91_set_A_periph(AT91_PIN_PB9, 0);             /* RXD2 */
++      at91_set_A_periph(AT91_PIN_PA13, 1);            /* TXD2 */
++      at91_set_A_periph(AT91_PIN_PA14, 0);            /* RXD2 */
 +}
 +
 +static struct resource uart3_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9260_BASE_US3,
-+              .end    = AT91SAM9260_BASE_US3 + SZ_16K - 1,
++              .start  = AT91SAM9RL_BASE_US3,
++              .end    = AT91SAM9RL_BASE_US3 + SZ_16K - 1,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
-+              .start  = AT91SAM9260_ID_US3,
-+              .end    = AT91SAM9260_ID_US3,
++              .start  = AT91SAM9RL_ID_US3,
++              .end    = AT91SAM9RL_ID_US3,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
@@ -4332,7 +2057,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +      .use_dma_rx     = 1,
 +};
 +
-+static struct platform_device at91sam9260_uart3_device = {
++static struct platform_device at91sam9rl_uart3_device = {
 +      .name           = "atmel_usart",
 +      .id             = 4,
 +      .dev            = {
@@ -4345,84 +2070,14 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +static inline void configure_usart3_pins(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PB10, 1);            /* TXD3 */
-+      at91_set_A_periph(AT91_PIN_PB11, 0);            /* RXD3 */
++      at91_set_A_periph(AT91_PIN_PB0, 1);             /* TXD3 */
++      at91_set_A_periph(AT91_PIN_PB1, 0);             /* RXD3 */
 +}
 +
-+static struct resource uart4_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_BASE_US4,
-+              .end    = AT91SAM9260_BASE_US4 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_US4,
-+              .end    = AT91SAM9260_ID_US4,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart4_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91sam9260_uart4_device = {
-+      .name           = "atmel_usart",
-+      .id             = 5,
-+      .dev            = {
-+                              .platform_data  = &uart4_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart4_resources,
-+      .num_resources  = ARRAY_SIZE(uart4_resources),
-+};
++struct platform_device *at91_uarts[ATMEL_MAX_UART];   /* the UARTs to use */
++struct platform_device *atmel_default_console_device; /* the serial console device */
 +
-+static inline void configure_usart4_pins(void)
-+{
-+      at91_set_B_periph(AT91_PIN_PA31, 1);            /* TXD4 */
-+      at91_set_B_periph(AT91_PIN_PA30, 0);            /* RXD4 */
-+}
-+
-+static struct resource uart5_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9260_BASE_US5,
-+              .end    = AT91SAM9260_BASE_US5 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9260_ID_US5,
-+              .end    = AT91SAM9260_ID_US5,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart5_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91sam9260_uart5_device = {
-+      .name           = "atmel_usart",
-+      .id             = 6,
-+      .dev            = {
-+                              .platform_data  = &uart5_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart5_resources,
-+      .num_resources  = ARRAY_SIZE(uart5_resources),
-+};
-+
-+static inline void configure_usart5_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PB12, 1);            /* TXD5 */
-+      at91_set_A_periph(AT91_PIN_PB13, 0);            /* RXD5 */
-+}
-+
-+struct platform_device *at91_uarts[ATMEL_MAX_UART];   /* the UARTs to use */
-+struct platform_device *atmel_default_console_device; /* the serial console device */
-+
-+void __init at91_init_serial(struct at91_uart_config *config)
++void __init at91_init_serial(struct at91_uart_config *config)
 +{
 +      int i;
 +
@@ -4431,38 +2086,28 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +              switch (config->tty_map[i]) {
 +                      case 0:
 +                              configure_usart0_pins();
-+                              at91_uarts[i] = &at91sam9260_uart0_device;
-+                              at91_clock_associate("usart0_clk", &at91sam9260_uart0_device.dev, "usart");
++                              at91_uarts[i] = &at91sam9rl_uart0_device;
++                              at91_clock_associate("usart0_clk", &at91sam9rl_uart0_device.dev, "usart");
 +                              break;
 +                      case 1:
 +                              configure_usart1_pins();
-+                              at91_uarts[i] = &at91sam9260_uart1_device;
-+                              at91_clock_associate("usart1_clk", &at91sam9260_uart1_device.dev, "usart");
++                              at91_uarts[i] = &at91sam9rl_uart1_device;
++                              at91_clock_associate("usart1_clk", &at91sam9rl_uart1_device.dev, "usart");
 +                              break;
 +                      case 2:
 +                              configure_usart2_pins();
-+                              at91_uarts[i] = &at91sam9260_uart2_device;
-+                              at91_clock_associate("usart2_clk", &at91sam9260_uart2_device.dev, "usart");
++                              at91_uarts[i] = &at91sam9rl_uart2_device;
++                              at91_clock_associate("usart2_clk", &at91sam9rl_uart2_device.dev, "usart");
 +                              break;
 +                      case 3:
 +                              configure_usart3_pins();
-+                              at91_uarts[i] = &at91sam9260_uart3_device;
-+                              at91_clock_associate("usart3_clk", &at91sam9260_uart3_device.dev, "usart");
++                              at91_uarts[i] = &at91sam9rl_uart3_device;
++                              at91_clock_associate("usart3_clk", &at91sam9rl_uart3_device.dev, "usart");
 +                              break;
 +                      case 4:
-+                              configure_usart4_pins();
-+                              at91_uarts[i] = &at91sam9260_uart4_device;
-+                              at91_clock_associate("usart4_clk", &at91sam9260_uart4_device.dev, "usart");
-+                              break;
-+                      case 5:
-+                              configure_usart5_pins();
-+                              at91_uarts[i] = &at91sam9260_uart5_device;
-+                              at91_clock_associate("usart5_clk", &at91sam9260_uart5_device.dev, "usart");
-+                              break;
-+                      case 6:
 +                              configure_dbgu_pins();
-+                              at91_uarts[i] = &at91sam9260_dbgu_device;
-+                              at91_clock_associate("mck", &at91sam9260_dbgu_device.dev, "usart");
++                              at91_uarts[i] = &at91sam9rl_dbgu_device;
++                              at91_clock_associate("mck", &at91sam9rl_dbgu_device.dev, "usart");
 +                              break;
 +                      default:
 +                              continue;
@@ -4493,6 +2138,7 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +
 +
 +/* -------------------------------------------------------------------- */
++
 +/*
 + * These devices are always present and don't need any board-specific
 + * setup.
@@ -4503,1933 +2149,1587 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9260_devices
 +}
 +
 +arch_initcall(at91_add_standard_devices);
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9261.c linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9261.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9261.c  Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9261.c        Thu Nov 23 15:41:39 2006
-@@ -0,0 +1,289 @@
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-cam60.c linux-2.6-stable/arch/arm/mach-at91/board-cam60.c
+--- linux-2.6.21/arch/arm/mach-at91/board-cam60.c      Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/board-cam60.c  Tue May  8 12:13:30 2007
+@@ -0,0 +1,148 @@
 +/*
-+ * arch/arm/mach-at91rm9200/at91sam9261.c
++ * KwikByte CAM60
 + *
-+ *  Copyright (C) 2005 SAN People
++ * based on board-sam9260ek.c
++ *   Copyright (C) 2005 SAN People
++ *   Copyright (C) 2006 Atmel
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 + */
 +
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/mm.h>
 +#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/flash.h>
++
++#include <asm/hardware.h>
++#include <asm/setup.h>
++#include <asm/mach-types.h>
++#include <asm/irq.h>
 +
 +#include <asm/mach/arch.h>
 +#include <asm/mach/map.h>
-+#include <asm/arch/at91sam9261.h>
-+#include <asm/arch/at91_pmc.h>
-+
-+#include "generic.h"
-+#include "clock.h"
-+
-+static struct map_desc at91sam9261_io_desc[] __initdata = {
-+      {
-+              .virtual        = AT91_VA_BASE_SYS,
-+              .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-+              .length         = SZ_16K,
-+              .type           = MT_DEVICE,
-+      }, {
-+              .virtual        = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE,
-+              .pfn            = __phys_to_pfn(AT91SAM9261_SRAM_BASE),
-+              .length         = AT91SAM9261_SRAM_SIZE,
-+              .type           = MT_DEVICE,
-+      },
-+};
++#include <asm/mach/irq.h>
 +
-+/* --------------------------------------------------------------------
-+ *  Clocks
-+ * -------------------------------------------------------------------- */
++#include <asm/arch/board.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/at91sam926x_mc.h>
 +
-+/*
-+ * The peripheral clocks.
-+ */
-+static struct clk pioA_clk = {
-+      .name           = "pioA_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_PIOA,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk pioB_clk = {
-+      .name           = "pioB_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_PIOB,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk pioC_clk = {
-+      .name           = "pioC_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_PIOC,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk usart0_clk = {
-+      .name           = "usart0_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_US0,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk usart1_clk = {
-+      .name           = "usart1_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_US1,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk usart2_clk = {
-+      .name           = "usart2_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_US2,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk mmc_clk = {
-+      .name           = "mci_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_MCI,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk udc_clk = {
-+      .name           = "udc_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_UDP,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk twi_clk = {
-+      .name           = "twi_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_TWI,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk spi0_clk = {
-+      .name           = "spi0_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_SPI0,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk spi1_clk = {
-+      .name           = "spi1_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_SPI1,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk ohci_clk = {
-+      .name           = "ohci_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_UHP,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
-+static struct clk lcdc_clk = {
-+      .name           = "lcdc_clk",
-+      .pmc_mask       = 1 << AT91SAM9261_ID_LCDC,
-+      .type           = CLK_TYPE_PERIPHERAL,
-+};
++#include "generic.h"
 +
-+static struct clk *periph_clocks[] __initdata = {
-+      &pioA_clk,
-+      &pioB_clk,
-+      &pioC_clk,
-+      &usart0_clk,
-+      &usart1_clk,
-+      &usart2_clk,
-+      &mmc_clk,
-+      &udc_clk,
-+      &twi_clk,
-+      &spi0_clk,
-+      &spi1_clk,
-+      // ssc 0 .. ssc2
-+      // tc0 .. tc2
-+      &ohci_clk,
-+      &lcdc_clk,
-+      // irq0 .. irq2
-+};
 +
 +/*
-+ * The four programmable clocks.
-+ * You must configure pin multiplexing to bring these signals out.
++ * Serial port configuration.
++ *    0 .. 5 = USART0 .. USART5
++ *    6      = DBGU
 + */
-+static struct clk pck0 = {
-+      .name           = "pck0",
-+      .pmc_mask       = AT91_PMC_PCK0,
-+      .type           = CLK_TYPE_PROGRAMMABLE,
-+      .id             = 0,
-+};
-+static struct clk pck1 = {
-+      .name           = "pck1",
-+      .pmc_mask       = AT91_PMC_PCK1,
-+      .type           = CLK_TYPE_PROGRAMMABLE,
-+      .id             = 1,
-+};
-+static struct clk pck2 = {
-+      .name           = "pck2",
-+      .pmc_mask       = AT91_PMC_PCK2,
-+      .type           = CLK_TYPE_PROGRAMMABLE,
-+      .id             = 2,
-+};
-+static struct clk pck3 = {
-+      .name           = "pck3",
-+      .pmc_mask       = AT91_PMC_PCK3,
-+      .type           = CLK_TYPE_PROGRAMMABLE,
-+      .id             = 3,
-+};
-+
-+/* HClocks */
-+static struct clk hck0 = {
-+      .name           = "hck0",
-+      .pmc_mask       = AT91_PMC_HCK0,
-+      .type           = CLK_TYPE_SYSTEM,
-+      .id             = 0,
-+};
-+static struct clk hck1 = {
-+      .name           = "hck1",
-+      .pmc_mask       = AT91_PMC_HCK1,
-+      .type           = CLK_TYPE_SYSTEM,
-+      .id             = 1,
++static struct at91_uart_config __initdata cam60_uart_config = {
++      .console_tty    = 0,                            /* ttyS0 */
++      .nr_tty         = 1,
++      .tty_map        = { 6, -1, -1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */
 +};
 +
-+static void __init at91sam9261_register_clocks(void)
++static void __init cam60_map_io(void)
 +{
-+      int i;
-+
-+      for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
-+              clk_register(periph_clocks[i]);
-+
-+      clk_register(&pck0);
-+      clk_register(&pck1);
-+      clk_register(&pck2);
-+      clk_register(&pck3);
++      /* Initialize processor: 10 MHz crystal */
++      at91sam9260_initialize(10000000);
 +
-+      clk_register(&hck0);
-+      clk_register(&hck1);
++      /* Setup the serial ports and console */
++      at91_init_serial(&cam60_uart_config);
 +}
 +
-+/* --------------------------------------------------------------------
-+ *  GPIO
-+ * -------------------------------------------------------------------- */
-+
-+static struct at91_gpio_bank at91sam9261_gpio[] = {
-+      {
-+              .id             = AT91SAM9261_ID_PIOA,
-+              .offset         = AT91_PIOA,
-+              .clock          = &pioA_clk,
-+      }, {
-+              .id             = AT91SAM9261_ID_PIOB,
-+              .offset         = AT91_PIOB,
-+              .clock          = &pioB_clk,
-+      }, {
-+              .id             = AT91SAM9261_ID_PIOC,
-+              .offset         = AT91_PIOC,
-+              .clock          = &pioC_clk,
-+      }
-+};
-+
-+static void at91sam9261_reset(void)
++static void __init cam60_init_irq(void)
 +{
-+#warning "Implement CPU reset"
++      at91sam9260_init_interrupts(NULL);
 +}
 +
 +
-+/* --------------------------------------------------------------------
-+ *  AT91SAM9261 processor initialization
-+ * -------------------------------------------------------------------- */
-+
-+void __init at91sam9261_initialize(unsigned long main_clock)
-+{
-+      /* Map peripherals */
-+      iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
-+
-+      at91_arch_reset = at91sam9261_reset;
-+      at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
-+                      | (1 << AT91SAM9261_ID_IRQ2);
-+
-+      /* Init clock subsystem */
-+      at91_clock_init(main_clock);
++/*
++ * SPI devices.
++ */
++#if defined(CONFIG_MTD_DATAFLASH)
++static struct mtd_partition __initdata cam60_spi_partitions[] = {
++      {
++              .name   = "BOOT1",
++              .offset = 0,
++              .size   = 4 * 1056,
++      },
++      {
++              .name   = "BOOT2",
++              .offset = MTDPART_OFS_NXTBLK,
++              .size   = 256 * 1056,
++      },
++      {
++              .name   = "kernel",
++              .offset = MTDPART_OFS_NXTBLK,
++              .size   = 2222 * 1056,
++      },
++      {
++              .name   = "file system",
++              .offset = MTDPART_OFS_NXTBLK,
++              .size   = MTDPART_SIZ_FULL,
++      },
++};
 +
-+      /* Register the processor-specific clocks */
-+      at91sam9261_register_clocks();
++static struct flash_platform_data __initdata cam60_spi_flash_platform_data = {
++      .name           = "spi_flash",
++      .parts          = cam60_spi_partitions,
++      .nr_parts       = ARRAY_SIZE(cam60_spi_partitions)
++};
++#endif
 +
-+      /* Register GPIO subsystem */
-+      at91_gpio_init(at91sam9261_gpio, 3);
-+}
++static struct spi_board_info cam60_spi_devices[] = {
++#if defined(CONFIG_MTD_DATAFLASH)
++      {       /* DataFlash chip */
++              .modalias       = "mtd_dataflash",
++              .chip_select    = 0,
++              .max_speed_hz   = 15 * 1000 * 1000,
++              .bus_num        = 0,
++              .platform_data  = &cam60_spi_flash_platform_data
++      },
++#endif
++};
 +
-+/* --------------------------------------------------------------------
-+ *  Interrupt initialization
-+ * -------------------------------------------------------------------- */
 +
 +/*
-+ * The default interrupt priority levels (0 = lowest, 7 = highest).
++ * MACB Ethernet device
 + */
-+static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
-+      7,      /* Advanced Interrupt Controller */
-+      7,      /* System Peripherals */
-+      0,      /* Parallel IO Controller A */
-+      0,      /* Parallel IO Controller B */
-+      0,      /* Parallel IO Controller C */
-+      0,
-+      6,      /* USART 0 */
-+      6,      /* USART 1 */
-+      6,      /* USART 2 */
-+      0,      /* Multimedia Card Interface */
-+      4,      /* USB Device Port */
-+      0,      /* Two-Wire Interface */
-+      6,      /* Serial Peripheral Interface 0 */
-+      6,      /* Serial Peripheral Interface 1 */
-+      5,      /* Serial Synchronous Controller 0 */
-+      5,      /* Serial Synchronous Controller 1 */
-+      5,      /* Serial Synchronous Controller 2 */
-+      0,      /* Timer Counter 0 */
-+      0,      /* Timer Counter 1 */
-+      0,      /* Timer Counter 2 */
-+      3,      /* USB Host port */
-+      3,      /* LCD Controller */
-+      0,
-+      0,
-+      0,
-+      0,
-+      0,
-+      0,
-+      0,
-+      0,      /* Advanced Interrupt Controller */
-+      0,      /* Advanced Interrupt Controller */
-+      0,      /* Advanced Interrupt Controller */
++static struct __initdata at91_eth_data cam60_macb_data = {
++      .phy_irq_pin    = AT91_PIN_PB5,
++      .is_rmii        = 0,
 +};
 +
-+void __init at91sam9261_init_interrupts(unsigned int priority[NR_AIC_IRQS])
-+{
-+      if (!priority)
-+              priority = at91sam9261_default_irq_priority;
-+
-+      /* Initialize the AIC interrupt controller */
-+      at91_aic_init(priority);
 +
-+      /* Enable GPIO interrupts */
-+      at91_gpio_irq_setup();
++static void __init cam60_board_init(void)
++{
++      /* Serial */
++      at91_add_device_serial();
++      /* SPI */
++      at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
++      /* Ethernet */
++      at91_add_device_eth(&cam60_macb_data);
 +}
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9261_devices.c linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9261_devices.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam9261_devices.c  Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91sam9261_devices.c        Sat Nov 25 11:14:00 2006
-@@ -0,0 +1,767 @@
++
++MACHINE_START(CAM60, "KwikByte CAM60")
++      /* Maintainer: KwikByte */
++      .phys_io        = AT91_BASE_SYS,
++      .io_pg_offst    = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
++      .boot_params    = AT91_SDRAM_BASE + 0x100,
++      .timer          = &at91sam926x_timer,
++      .map_io         = cam60_map_io,
++      .init_irq       = cam60_init_irq,
++      .init_machine   = cam60_board_init,
++MACHINE_END
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-chub.c linux-2.6-stable/arch/arm/mach-at91/board-chub.c
+--- linux-2.6.21/arch/arm/mach-at91/board-chub.c       Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/board-chub.c   Tue May  8 12:13:30 2007
+@@ -0,0 +1,132 @@
 +/*
-+ * arch/arm/mach-at91rm9200/at91sam9261_devices.c
++ * linux/arch/arm/mach-at91/board-chub.c
 + *
-+ *  Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
-+ *  Copyright (C) 2005 David Brownell
++ *  Copyright (C) 2005 SAN People, adapted for Promwad Chub board
++ *  by Kuten Ivan
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 + */
-+#include <asm/mach/arch.h>
-+#include <asm/mach/map.h>
 +
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/mm.h>
++#include <linux/module.h>
 +#include <linux/platform_device.h>
 +
++#include <asm/hardware.h>
++#include <asm/setup.h>
++#include <asm/mach-types.h>
++#include <asm/irq.h>
++
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/mach/irq.h>
++
 +#include <asm/arch/board.h>
 +#include <asm/arch/gpio.h>
-+#include <asm/arch/at91sam9261.h>
-+#include <asm/arch/at91sam9261_matrix.h>
-+#include <asm/arch/at91sam926x_mc.h>
 +
 +#include "generic.h"
 +
-+#define SZ_512        0x00000200
-+#define SZ_256        0x00000100
-+#define SZ_16 0x00000010
-+
-+/* --------------------------------------------------------------------
-+ *  USB Host
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-+static u64 ohci_dmamask = 0xffffffffUL;
-+static struct at91_usbh_data usbh_data;
-+
-+static struct resource usbh_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_UHP_BASE,
-+              .end    = AT91SAM9261_UHP_BASE + SZ_1M - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_UHP,
-+              .end    = AT91SAM9261_ID_UHP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91sam9261_usbh_device = {
-+      .name           = "at91_ohci",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &ohci_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &usbh_data,
-+      },
-+      .resource       = usbh_resources,
-+      .num_resources  = ARRAY_SIZE(usbh_resources),
++/*
++ * Serial port configuration.
++ *    0 .. 3 = USART0 .. USART3
++ *    4      = DBGU
++ */
++static struct at91_uart_config __initdata chub_uart_config = {
++      .console_tty    = 0,                            /* ttyS0 */
++      .nr_tty         = 5,
++      .tty_map        = { 4, 0, 1, 2, 3 }             /* ttyS0, ..., ttyS4 */
 +};
 +
-+void __init at91_add_device_usbh(struct at91_usbh_data *data)
++static void __init chub_init_irq(void)
 +{
-+      if (!data)
-+              return;
-+
-+      usbh_data = *data;
-+      platform_device_register(&at91sam9261_usbh_device);
++      at91rm9200_init_interrupts(NULL);
 +}
-+#else
-+void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
-+#endif
-+
 +
-+/* --------------------------------------------------------------------
-+ *  USB Device (Gadget)
-+ * -------------------------------------------------------------------- */
++static void __init chub_map_io(void)
++{
++      /* Initialize clocks: 18.432 MHz crystal */
++      at91rm9200_initialize(18432000, AT91RM9200_PQFP);
 +
-+#ifdef CONFIG_USB_GADGET_AT91
-+static struct at91_udc_data udc_data;
++      /* Setup the serial ports and console */
++      at91_init_serial(&chub_uart_config);
++}
 +
-+static struct resource udc_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_UDP,
-+              .end    = AT91SAM9261_BASE_UDP + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_UDP,
-+              .end    = AT91SAM9261_ID_UDP,
-+              .flags  = IORESOURCE_IRQ,
-+      },
++static struct at91_eth_data __initdata chub_eth_data = {
++      .phy_irq_pin    = AT91_PIN_PB29,
++      .is_rmii        = 0,
 +};
 +
-+static struct platform_device at91sam9261_udc_device = {
-+      .name           = "at91_udc",
-+      .id             = -1,
-+      .dev            = {
-+                              .platform_data          = &udc_data,
++static struct mtd_partition __initdata chub_nand_partition[] = {
++      {
++              .name   = "NAND Partition 1",
++              .offset = 0,
++              .size   = MTDPART_SIZ_FULL,
 +      },
-+      .resource       = udc_resources,
-+      .num_resources  = ARRAY_SIZE(udc_resources),
 +};
 +
-+void __init at91_add_device_udc(struct at91_udc_data *data)
++static struct mtd_partition *nand_partitions(int size, int *num_partitions)
 +{
-+      unsigned long x;
-+
-+      if (!data)
-+              return;
-+
-+      if (data->vbus_pin) {
-+              at91_set_gpio_input(data->vbus_pin, 0);
-+              at91_set_deglitch(data->vbus_pin, 1);
-+      }
-+
-+      /* Pullup pin is handled internally */
-+      x = at91_sys_read(AT91_MATRIX_USBPUCR);
-+      at91_sys_write(AT91_MATRIX_USBPUCR, x | AT91_MATRIX_USBPUCR_PUON);
-+
-+      udc_data = *data;
-+      platform_device_register(&at91sam9261_udc_device);
++      *num_partitions = ARRAY_SIZE(chub_nand_partition);
++      return chub_nand_partition;
 +}
-+#else
-+void __init at91_add_device_udc(struct at91_udc_data *data) {}
-+#endif
-+
-+/* --------------------------------------------------------------------
-+ *  MMC / SD
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
-+static u64 mmc_dmamask = 0xffffffffUL;
-+static struct at91_mmc_data mmc_data;
 +
-+static struct resource mmc_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_MCI,
-+              .end    = AT91SAM9261_BASE_MCI + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_MCI,
-+              .end    = AT91SAM9261_ID_MCI,
-+              .flags  = IORESOURCE_IRQ,
-+      },
++static struct at91_nand_data __initdata chub_nand_data = {
++      .ale            = 22,
++      .cle            = 21,
++      .enable_pin     = AT91_PIN_PA27,
++      .partition_info = nand_partitions,
 +};
 +
-+static struct platform_device at91sam9261_mmc_device = {
-+      .name           = "at91_mci",
-+      .id             = -1,
-+      .dev            = {
-+                              .dma_mask               = &mmc_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &mmc_data,
++static struct spi_board_info chub_spi_devices[] = {
++      {       /* DataFlash chip */
++              .modalias       = "mtd_dataflash",
++              .chip_select    = 0,
++              .max_speed_hz   = 15 * 1000 * 1000,
 +      },
-+      .resource       = mmc_resources,
-+      .num_resources  = ARRAY_SIZE(mmc_resources),
 +};
 +
-+void __init at91_add_device_mmc(struct at91_mmc_data *data)
++static void __init chub_board_init(void)
 +{
-+      if (!data)
-+              return;
-+
-+      /* input/irq */
-+      if (data->det_pin) {
-+              at91_set_gpio_input(data->det_pin, 1);
-+              at91_set_deglitch(data->det_pin, 1);
-+      }
-+      if (data->wp_pin)
-+              at91_set_gpio_input(data->wp_pin, 1);
-+      if (data->vcc_pin)
-+              at91_set_gpio_output(data->vcc_pin, 0);
-+
-+      /* CLK */
-+      at91_set_B_periph(AT91_PIN_PA2, 0);
-+
-+      /* CMD */
-+      at91_set_B_periph(AT91_PIN_PA1, 1);
-+
-+      /* DAT0, maybe DAT1..DAT3 */
-+      at91_set_B_periph(AT91_PIN_PA0, 1);
-+      if (data->wire4) {
-+              at91_set_B_periph(AT91_PIN_PA4, 1);
-+              at91_set_B_periph(AT91_PIN_PA5, 1);
-+              at91_set_B_periph(AT91_PIN_PA6, 1);
-+      }
-+
-+      mmc_data = *data;
-+      platform_device_register(&at91sam9261_mmc_device);
++      /* Serial */
++      at91_add_device_serial();
++      /* I2C */
++      at91_add_device_i2c();
++      /* Ethernet */
++      at91_add_device_eth(&chub_eth_data);
++      /* SPI */
++      at91_add_device_spi(chub_spi_devices, ARRAY_SIZE(chub_spi_devices));
++      /* NAND Flash */
++      at91_add_device_nand(&chub_nand_data);
++      /* Disable write protect for NAND */
++      at91_set_gpio_output(AT91_PIN_PB7, 1);
++      /* Power enable for 3x RS-232 and 1x RS-485 */
++      at91_set_gpio_output(AT91_PIN_PB9, 1);
++      /* Disable write protect for FRAM */
++      at91_set_gpio_output(AT91_PIN_PA21, 1);
++      /* Disable write protect for Dataflash */
++      at91_set_gpio_output(AT91_PIN_PA19, 1);
 +}
-+#else
-+void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
-+#endif
-+
-+
-+/* --------------------------------------------------------------------
-+ *  NAND / SmartMedia
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE)
-+static struct at91_nand_data nand_data;
 +
-+#define NAND_BASE     AT91_CHIPSELECT_3
-+
-+static struct resource nand_resources[] = {
++MACHINE_START(CHUB, "Promwad Chub")
++      /* Maintainer: Ivan Kuten AT Promwad DOT com */
++      .phys_io        = AT91_BASE_SYS,
++      .io_pg_offst    = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
++      .boot_params    = AT91_SDRAM_BASE + 0x100,
++      .timer          = &at91rm9200_timer,
++      .map_io         = chub_map_io,
++      .init_irq       = chub_init_irq,
++      .init_machine   = chub_board_init,
++MACHINE_END
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-csb337.c linux-2.6-stable/arch/arm/mach-at91/board-csb337.c
+--- linux-2.6.21/arch/arm/mach-at91/board-csb337.c     Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-csb337.c Tue May  8 12:13:30 2007
+@@ -24,6 +24,7 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/spi/spi.h>
++#include <linux/interrupt.h>
+ #include <linux/mtd/physmap.h>
+ #include <asm/hardware.h>
+@@ -59,6 +60,7 @@
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
++      at91_set_gpio_output(AT91_PIN_PB2, 1);          /* third (unused) LED */
+       /* Setup the serial ports and console */
+       at91_init_serial(&csb337_uart_config);
+@@ -149,6 +151,55 @@
+       .num_resources  = ARRAY_SIZE(csb_flash_resources),
+ };
++static struct at91_gpio_led csb337_leds[] = {
 +      {
-+              .start  = NAND_BASE,
-+              .end    = NAND_BASE + SZ_256M - 1,
-+              .flags  = IORESOURCE_MEM,
-+      }
-+};
-+
-+static struct platform_device at91_nand_device = {
-+      .name           = "at91_nand",
-+      .id             = -1,
-+      .dev            = {
-+                              .platform_data  = &nand_data,
++              .name           = "led0",
++              .gpio           = AT91_PIN_PB0,
++              .trigger        = "heartbeat",
 +      },
-+      .resource       = nand_resources,
-+      .num_resources  = ARRAY_SIZE(nand_resources),
++      {
++              .name           = "led1",
++              .gpio           = AT91_PIN_PB1,
++              .trigger        = "timer",
++      },
++      {
++              .name           = "led2",
++              .gpio           = AT91_PIN_PB2,
++      }
 +};
 +
-+void __init at91_add_device_nand(struct at91_nand_data *data)
++#if defined(CONFIG_CSB300_WAKE_SW0) || defined(CONFIG_CSB300_WAKE_SW1)
++static irqreturn_t switch_irq_handler(int irq, void *context)
 +{
-+      unsigned long csa, mode;
-+
-+      if (!data)
-+              return;
-+
-+      csa = at91_sys_read(AT91_MATRIX_EBICSA);
-+      at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC);
-+
-+      /* set the bus interface characteristics */
-+      at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0)
-+                      | AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
-+
-+      at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5)
-+                      | AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5));
-+
-+      at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
-+
-+      if (data->bus_width_16)
-+              mode = AT91_SMC_DBW_16;
-+      else
-+              mode = AT91_SMC_DBW_8;
-+      at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1));
-+
-+      /* enable pin */
-+      if (data->enable_pin)
-+              at91_set_gpio_output(data->enable_pin, 1);
-+
-+      /* ready/busy pin */
-+      if (data->rdy_pin)
-+              at91_set_gpio_input(data->rdy_pin, 1);
-+
-+      /* card detect pin */
-+      if (data->det_pin)
-+              at91_set_gpio_input(data->det_pin, 1);
++      return IRQ_HANDLED;
++}
 +
-+      at91_set_A_periph(AT91_PIN_PC0, 0);             /* NANDOE */
-+      at91_set_A_periph(AT91_PIN_PC1, 0);             /* NANDWE */
++static inline void __init switch_irq_setup(int irq, char *name, unsigned long mode)
++{
++      int res;
 +
-+      nand_data = *data;
-+      platform_device_register(&at91_nand_device);
++      res = request_irq(irq, switch_irq_handler, IRQF_SAMPLE_RANDOM | mode, name, NULL);
++      if (res == 0)
++              enable_irq_wake(irq);
 +}
 +
++static void __init csb300_switches(void)
++{
++#ifdef CONFIG_CSB300_WAKE_SW0
++      at91_set_A_periph(AT91_PIN_PB29, 1);            /* IRQ0 */
++      switch_irq_setup(AT91RM9200_ID_IRQ0, "csb300_sw0", IRQF_TRIGGER_FALLING);
++#endif
++#ifdef CONFIG_CSB300_WAKE_SW1
++      at91_set_gpio_input(AT91_PIN_PB28, 1);
++      at91_set_deglitch(AT91_PIN_PB28, 1);
++      switch_irq_setup(AT91_PIN_PB28, "csb300_sw1", IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
++#endif
++      /* there's also SW2 at PA21, GPIO or TIOA2 */
++}
 +#else
-+void __init at91_add_device_nand(struct at91_nand_data *data) {}
++static void __init csb300_switches(void) {}
 +#endif
 +
+ static void __init csb337_board_init(void)
+ {
+       /* Serial */
+@@ -168,8 +219,12 @@
+       at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
+       /* MMC */
+       at91_add_device_mmc(0, &csb337_mmc_data);
++      /* LEDS */
++      at91_gpio_leds(csb337_leds, ARRAY_SIZE(csb337_leds));
+       /* NOR flash */
+       platform_device_register(&csb_flash);
++      /* Switches on CSB300 */
++      csb300_switches();
+ }
+ MACHINE_START(CSB337, "Cogent CSB337")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-dk.c linux-2.6-stable/arch/arm/mach-at91/board-dk.c
+--- linux-2.6.21/arch/arm/mach-at91/board-dk.c Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-dk.c     Tue May  8 14:29:12 2007
+@@ -73,6 +73,185 @@
+       at91rm9200_init_interrupts(NULL);
+ }
++#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
++#include <video/s1d13xxxfb.h>
++#include <asm/arch/ics1523.h>
 +
-+/* --------------------------------------------------------------------
-+ *  TWI (i2c)
-+ * -------------------------------------------------------------------- */
++/* EPSON S1D13806 FB */
++#define AT91_FB_REG_BASE      0x30000000L
++#define AT91_FB_REG_SIZE      0x200
++#define AT91_FB_VMEM_BASE     0x30200000L
++#define AT91_FB_VMEM_SIZE     0x140000L
 +
-+#if defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE)
-+
-+static struct resource twi_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_TWI,
-+              .end    = AT91SAM9261_BASE_TWI + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_TWI,
-+              .end    = AT91SAM9261_ID_TWI,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct platform_device at91sam9261_twi_device = {
-+      .name           = "at91_i2c",
-+      .id             = -1,
-+      .resource       = twi_resources,
-+      .num_resources  = ARRAY_SIZE(twi_resources),
-+};
-+
-+void __init at91_add_device_i2c(void)
++static void __init dk_init_video(void)
 +{
-+      /* pins used for TWI interface */
-+      at91_set_A_periph(AT91_PIN_PA7, 0);             /* TWD */
-+      at91_set_multi_drive(AT91_PIN_PA7, 1);
++      /* NWAIT Signal */
++      at91_set_A_periph(AT91_PIN_PC6, 0);
 +
-+      at91_set_A_periph(AT91_PIN_PA8, 0);             /* TWCK */
-+      at91_set_multi_drive(AT91_PIN_PA8, 1);
++      /* Initialization of the Static Memory Controller for Chip Select 2 */
++      at91_sys_write(AT91_SMC_CSR(2), AT91_SMC_DBW_16                 /* 16 bit */
++                              | AT91_SMC_WSEN | AT91_SMC_NWS_(4)      /* wait states */
++                              | AT91_SMC_TDF_(1)                      /* float time */
++      );
 +
-+      platform_device_register(&at91sam9261_twi_device);
++      at91_ics1523_init();
 +}
-+#else
-+void __init at91_add_device_i2c(void) {}
-+#endif
-+
-+
-+/* --------------------------------------------------------------------
-+ *  SPI
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
-+static u64 spi_dmamask = 0xffffffffUL;
 +
-+static struct resource spi0_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_SPI0,
-+              .end    = AT91SAM9261_BASE_SPI0 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_SPI0,
-+              .end    = AT91SAM9261_ID_SPI0,
-+              .flags  = IORESOURCE_IRQ,
-+      },
++/* CRT:    (active)   640x480 60Hz (PCLK=CLKI=25.175MHz)
++   Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
++static const struct s1d13xxxfb_regval dk_s1dfb_initregs[] = {
++      {S1DREG_MISC,                   0x00},  /* Enable Memory/Register select bit */
++      {S1DREG_COM_DISP_MODE,          0x00},  /* disable display output */
++      {S1DREG_GPIO_CNF0,              0x00},
++      {S1DREG_GPIO_CNF1,              0x00},
++      {S1DREG_GPIO_CTL0,              0x08},
++      {S1DREG_GPIO_CTL1,              0x00},
++      {S1DREG_CLK_CNF,                0x01},  /* no divide, MCLK source is CLKI3 0x02*/
++      {S1DREG_LCD_CLK_CNF,            0x00},
++      {S1DREG_CRT_CLK_CNF,            0x00},
++      {S1DREG_MPLUG_CLK_CNF,          0x00},
++      {S1DREG_CPU2MEM_WST_SEL,        0x01},  /* 2*period(MCLK) - 4ns > period(BCLK) */
++      {S1DREG_SDRAM_REF_RATE,         0x03},  /* 32768 <= MCLK <= 50000 (MHz) */
++      {S1DREG_SDRAM_TC0,              0x00},  /* MCLK source freq (MHz): */
++      {S1DREG_SDRAM_TC1,              0x01},  /* 42 <= MCLK <= 50 */
++      {S1DREG_MEM_CNF,                0x80},  /* SDRAM Initialization - needed before mem access */
++      {S1DREG_PANEL_TYPE,             0x25},  /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
++      {S1DREG_MOD_RATE,               0x00},  /* toggle every FPFRAME */
++      {S1DREG_LCD_DISP_HWIDTH,        0x4F},  /* 680 pix */
++      {S1DREG_LCD_NDISP_HPER,         0x12},  /* 152 pix */
++      {S1DREG_TFT_FPLINE_START,       0x01},  /* 13 pix */
++      {S1DREG_TFT_FPLINE_PWIDTH,      0x0B},  /* 96 pix */
++      {S1DREG_LCD_DISP_VHEIGHT0,      0xDF},
++      {S1DREG_LCD_DISP_VHEIGHT1,      0x01},  /* 480 lines */
++      {S1DREG_LCD_NDISP_VPER,         0x2C},  /* 44 lines */
++      {S1DREG_TFT_FPFRAME_START,      0x0A},  /* 10 lines */
++      {S1DREG_TFT_FPFRAME_PWIDTH,     0x01},  /* 2 lines */
++      {S1DREG_LCD_DISP_MODE,          0x05},  /* 16 bpp */
++      {S1DREG_LCD_MISC,               0x00},  /* dithering enabled, dual panel buffer enabled */
++      {S1DREG_LCD_DISP_START0,        0x00},
++      {S1DREG_LCD_DISP_START1,        0xC8},
++      {S1DREG_LCD_DISP_START2,        0x00},
++      {S1DREG_LCD_MEM_OFF0,           0x80},
++      {S1DREG_LCD_MEM_OFF1,           0x02},
++      {S1DREG_LCD_PIX_PAN,            0x00},
++      {S1DREG_LCD_DISP_FIFO_HTC,      0x3B},
++      {S1DREG_LCD_DISP_FIFO_LTC,      0x3C},
++      {S1DREG_CRT_DISP_HWIDTH,        0x4F},  /* 680 pix */
++      {S1DREG_CRT_NDISP_HPER,         0x13},  /* 160 pix */
++      {S1DREG_CRT_HRTC_START,         0x01},  /* 13 pix */
++      {S1DREG_CRT_HRTC_PWIDTH,        0x0B},  /* 96 pix */
++      {S1DREG_CRT_DISP_VHEIGHT0,      0xDF},
++      {S1DREG_CRT_DISP_VHEIGHT1,      0x01},  /* 480 lines */
++      {S1DREG_CRT_NDISP_VPER,         0x2B},  /* 44 lines */
++      {S1DREG_CRT_VRTC_START,         0x09},  /* 10 lines */
++      {S1DREG_CRT_VRTC_PWIDTH,        0x01},  /* 2 lines */
++      {S1DREG_TV_OUT_CTL,             0x10},
++      {S1DREG_CRT_DISP_MODE,          0x05},  /* 16 bpp */
++      {S1DREG_CRT_DISP_START0,        0x00},
++      {S1DREG_CRT_DISP_START1,        0x00},
++      {S1DREG_CRT_DISP_START2,        0x00},
++      {S1DREG_CRT_MEM_OFF0,           0x80},
++      {S1DREG_CRT_MEM_OFF1,           0x02},
++      {S1DREG_CRT_PIX_PAN,            0x00},
++      {S1DREG_CRT_DISP_FIFO_HTC,      0x3B},
++      {S1DREG_CRT_DISP_FIFO_LTC,      0x3C},
++      {S1DREG_LCD_CUR_CTL,            0x00},  /* inactive */
++      {S1DREG_LCD_CUR_START,          0x01},
++      {S1DREG_LCD_CUR_XPOS0,          0x00},
++      {S1DREG_LCD_CUR_XPOS1,          0x00},
++      {S1DREG_LCD_CUR_YPOS0,          0x00},
++      {S1DREG_LCD_CUR_YPOS1,          0x00},
++      {S1DREG_LCD_CUR_BCTL0,          0x00},
++      {S1DREG_LCD_CUR_GCTL0,          0x00},
++      {S1DREG_LCD_CUR_RCTL0,          0x00},
++      {S1DREG_LCD_CUR_BCTL1,          0x1F},
++      {S1DREG_LCD_CUR_GCTL1,          0x3F},
++      {S1DREG_LCD_CUR_RCTL1,          0x1F},
++      {S1DREG_LCD_CUR_FIFO_HTC,       0x00},
++      {S1DREG_CRT_CUR_CTL,            0x00},  /* inactive */
++      {S1DREG_CRT_CUR_START,          0x01},
++      {S1DREG_CRT_CUR_XPOS0,          0x00},
++      {S1DREG_CRT_CUR_XPOS1,          0x00},
++      {S1DREG_CRT_CUR_YPOS0,          0x00},
++      {S1DREG_CRT_CUR_YPOS1,          0x00},
++      {S1DREG_CRT_CUR_BCTL0,          0x00},
++      {S1DREG_CRT_CUR_GCTL0,          0x00},
++      {S1DREG_CRT_CUR_RCTL0,          0x00},
++      {S1DREG_CRT_CUR_BCTL1,          0x1F},
++      {S1DREG_CRT_CUR_GCTL1,          0x3F},
++      {S1DREG_CRT_CUR_RCTL1,          0x1F},
++      {S1DREG_CRT_CUR_FIFO_HTC,       0x00},
++      {S1DREG_BBLT_CTL0,              0x00},
++      {S1DREG_BBLT_CTL0,              0x00},
++      {S1DREG_BBLT_CC_EXP,            0x00},
++      {S1DREG_BBLT_OP,                0x00},
++      {S1DREG_BBLT_SRC_START0,        0x00},
++      {S1DREG_BBLT_SRC_START1,        0x00},
++      {S1DREG_BBLT_SRC_START2,        0x00},
++      {S1DREG_BBLT_DST_START0,        0x00},
++      {S1DREG_BBLT_DST_START1,        0x00},
++      {S1DREG_BBLT_DST_START2,        0x00},
++      {S1DREG_BBLT_MEM_OFF0,          0x00},
++      {S1DREG_BBLT_MEM_OFF1,          0x00},
++      {S1DREG_BBLT_WIDTH0,            0x00},
++      {S1DREG_BBLT_WIDTH1,            0x00},
++      {S1DREG_BBLT_HEIGHT0,           0x00},
++      {S1DREG_BBLT_HEIGHT1,           0x00},
++      {S1DREG_BBLT_BGC0,              0x00},
++      {S1DREG_BBLT_BGC1,              0x00},
++      {S1DREG_BBLT_FGC0,              0x00},
++      {S1DREG_BBLT_FGC1,              0x00},
++      {S1DREG_LKUP_MODE,              0x00},  /* LCD LUT r | LCD and CRT/TV LUT w */
++      {S1DREG_LKUP_ADDR,              0x00},
++      {S1DREG_PS_CNF,                 0x00},  /* Power Save disable */
++      {S1DREG_PS_STATUS,              0x02},  /* LCD Panel down, mem up */
++      {S1DREG_CPU2MEM_WDOGT,          0x00},
++      {S1DREG_COM_DISP_MODE,          0x02},  /* enable CRT display output */
 +};
 +
-+static struct platform_device at91sam9261_spi0_device = {
-+      .name           = "atmel_spi",
-+      .id             = 0,
-+      .dev            = {
-+                              .dma_mask               = &spi_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+      },
-+      .resource       = spi0_resources,
-+      .num_resources  = ARRAY_SIZE(spi0_resources),
++static struct s1d13xxxfb_pdata dk_s1dfb_pdata = {
++      .initregs               = dk_s1dfb_initregs,
++      .initregssize           = ARRAY_SIZE(dk_s1dfb_initregs),
++      .platform_init_video    = dk_init_video,
 +};
 +
-+static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 };
++static u64 s1dfb_dmamask = 0xffffffffUL;
 +
-+static struct resource spi1_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_SPI1,
-+              .end    = AT91SAM9261_BASE_SPI1 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
++static struct resource dk_s1dfb_resource[] = {
++      [0] = { /* video mem */
++              .name   = "s1d13806 memory",
++              .start  = AT91_FB_VMEM_BASE,
++              .end    = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
++              .flags  = IORESOURCE_MEM,
 +      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_SPI1,
-+              .end    = AT91SAM9261_ID_SPI1,
-+              .flags  = IORESOURCE_IRQ,
++      [1] = { /* video registers */
++              .name   = "s1d13806 registers",
++              .start  = AT91_FB_REG_BASE,
++              .end    = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
++              .flags  = IORESOURCE_MEM,
 +      },
 +};
 +
-+static struct platform_device at91sam9261_spi1_device = {
-+      .name           = "atmel_spi",
-+      .id             = 1,
++static struct platform_device dk_s1dfb_device = {
++      .name           = "s1d13806fb",
++      .id             = -1,
 +      .dev            = {
-+                              .dma_mask               = &spi_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
++                      .dma_mask               = &s1dfb_dmamask,
++                      .coherent_dma_mask      = 0xffffffff,
++                      .platform_data          = &dk_s1dfb_pdata,
 +      },
-+      .resource       = spi1_resources,
-+      .num_resources  = ARRAY_SIZE(spi1_resources),
++      .resource       = dk_s1dfb_resource,
++      .num_resources  = ARRAY_SIZE(dk_s1dfb_resource),
 +};
 +
-+static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB28, AT91_PIN_PA24, AT91_PIN_PA25, AT91_PIN_PA26 };
-+
-+void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
++static void __init dk_add_device_video(void)
 +{
-+      int i;
-+      unsigned long cs_pin;
-+      short enable_spi0 = 0;
-+      short enable_spi1 = 0;
-+
-+      /* Choose SPI chip-selects */
-+      for (i = 0; i < nr_devices; i++) {
-+              if (devices[i].controller_data)
-+                      cs_pin = (unsigned long) devices[i].controller_data;
-+              else if (devices[i].bus_num == 0)
-+                      cs_pin = spi0_standard_cs[devices[i].chip_select];
-+              else
-+                      cs_pin = spi1_standard_cs[devices[i].chip_select];
-+
-+              if (devices[i].bus_num == 0)
-+                      enable_spi0 = 1;
-+              else
-+                      enable_spi1 = 1;
-+
-+              /* enable chip-select pin */
-+              at91_set_gpio_output(cs_pin, 1);
-+
-+              /* pass chip-select pin to driver */
-+              devices[i].controller_data = (void *) cs_pin;
-+      }
-+
-+      spi_register_board_info(devices, nr_devices);
-+
-+      /* Configure SPI bus(es) */
-+      if (enable_spi0) {
-+              at91_set_A_periph(AT91_PIN_PA0, 0);     /* SPI0_MISO */
-+              at91_set_A_periph(AT91_PIN_PA1, 0);     /* SPI0_MOSI */
-+              at91_set_A_periph(AT91_PIN_PA2, 0);     /* SPI0_SPCK */
-+
-+              at91_clock_associate("spi0_clk", &at91sam9261_spi0_device.dev, "spi_clk");
-+              platform_device_register(&at91sam9261_spi0_device);
-+      }
-+      if (enable_spi1) {
-+              at91_set_A_periph(AT91_PIN_PB30, 0);    /* SPI1_MISO */
-+              at91_set_A_periph(AT91_PIN_PB31, 0);    /* SPI1_MOSI */
-+              at91_set_A_periph(AT91_PIN_PB29, 0);    /* SPI1_SPCK */
-+
-+              at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk");
-+              platform_device_register(&at91sam9261_spi1_device);
-+      }
++      platform_device_register(&dk_s1dfb_device);
 +}
 +#else
-+void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
++static void __init dk_add_device_video(void) {}
 +#endif
 +
-+
-+/* --------------------------------------------------------------------
-+ *  LCD Controller
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_FB_AT91) || defined(CONFIG_FB_AT91_MODULE)
-+static u64 lcdc_dmamask = 0xffffffffUL;
-+static struct at91fb_info lcdc_data;
-+
-+static struct resource lcdc_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_LCDC_BASE,
-+              .end    = AT91SAM9261_LCDC_BASE + SZ_4K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_LCDC,
-+              .end    = AT91SAM9261_ID_LCDC,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+#if defined(CONFIG_FB_INTSRAM)
-+      [2] = {
-+              .start  = AT91SAM9261_SRAM_BASE,
-+              .end    = AT91SAM9261_SRAM_BASE + AT91SAM9261_SRAM_SIZE - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+#endif
+ static struct at91_eth_data __initdata dk_eth_data = {
+       .phy_irq_pin    = AT91_PIN_PC4,
+       .is_rmii        = 1,
+@@ -151,7 +330,7 @@
+ #define DK_FLASH_SIZE 0x200000
+ static struct physmap_flash_data dk_flash_data = {
+-      .width  = 2,
++      .width          = 2,
+ };
+ static struct resource dk_flash_resource = {
+@@ -170,6 +349,13 @@
+       .num_resources  = 1,
+ };
++static struct at91_gpio_led dk_leds[] = {
++      {
++              .name           = "led0",
++              .gpio           = AT91_PIN_PB2,
++              .trigger        = "timer",
++      }
 +};
+ static void __init dk_board_init(void)
+ {
+@@ -200,8 +386,10 @@
+       at91_add_device_nand(&dk_nand_data);
+       /* NOR Flash */
+       platform_device_register(&dk_flash);
++      /* LEDs */
++      at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
+       /* VGA */
+-//    dk_add_device_video();
++      dk_add_device_video();
+ }
+ MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-ek.c linux-2.6-stable/arch/arm/mach-at91/board-ek.c
+--- linux-2.6.21/arch/arm/mach-at91/board-ek.c Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-ek.c     Tue May  8 14:29:22 2007
+@@ -73,6 +73,187 @@
+       at91rm9200_init_interrupts(NULL);
+ }
++#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
++#include <video/s1d13xxxfb.h>
++#include <asm/arch/ics1523.h>
 +
-+static struct platform_device at91_lcdc_device = {
-+      .name           = "at91-fb",
-+      .id             = 0,
-+      .dev            = {
-+                              .dma_mask               = &lcdc_dmamask,
-+                              .coherent_dma_mask      = 0xffffffff,
-+                              .platform_data          = &lcdc_data,
-+      },
-+      .resource       = lcdc_resources,
-+      .num_resources  = ARRAY_SIZE(lcdc_resources),
-+};
-+
-+void __init at91_add_device_lcdc(struct at91fb_info *data)
-+{
-+      if (!data) {
-+              return;
-+      }
-+
-+      at91_set_A_periph(AT91_PIN_PB1, 0);     /* LCDHSYNC */
-+      at91_set_A_periph(AT91_PIN_PB2, 0);     /* LCDDOTCK */
-+      at91_set_A_periph(AT91_PIN_PB3, 0);     /* LCDDEN */
-+      at91_set_A_periph(AT91_PIN_PB4, 0);     /* LCDCC */
-+      at91_set_A_periph(AT91_PIN_PB7, 0);     /* LCDD2 */
-+      at91_set_A_periph(AT91_PIN_PB8, 0);     /* LCDD3 */
-+      at91_set_A_periph(AT91_PIN_PB9, 0);     /* LCDD4 */
-+      at91_set_A_periph(AT91_PIN_PB10, 0);    /* LCDD5 */
-+      at91_set_A_periph(AT91_PIN_PB11, 0);    /* LCDD6 */
-+      at91_set_A_periph(AT91_PIN_PB12, 0);    /* LCDD7 */
-+      at91_set_A_periph(AT91_PIN_PB15, 0);    /* LCDD10 */
-+      at91_set_A_periph(AT91_PIN_PB16, 0);    /* LCDD11 */
-+      at91_set_A_periph(AT91_PIN_PB17, 0);    /* LCDD12 */
-+      at91_set_A_periph(AT91_PIN_PB18, 0);    /* LCDD13 */
-+      at91_set_A_periph(AT91_PIN_PB19, 0);    /* LCDD14 */
-+      at91_set_A_periph(AT91_PIN_PB20, 0);    /* LCDD15 */
-+      at91_set_B_periph(AT91_PIN_PB23, 0);    /* LCDD18 */
-+      at91_set_B_periph(AT91_PIN_PB24, 0);    /* LCDD19 */
-+      at91_set_B_periph(AT91_PIN_PB25, 0);    /* LCDD20 */
-+      at91_set_B_periph(AT91_PIN_PB26, 0);    /* LCDD21 */
-+      at91_set_B_periph(AT91_PIN_PB27, 0);    /* LCDD22 */
-+      at91_set_B_periph(AT91_PIN_PB28, 0);    /* LCDD23 */
-+
-+      lcdc_data = *data;
-+      platform_device_register(&at91_lcdc_device);
-+}
-+#else
-+void __init at91_add_device_lcdc(struct at91fb_info *data) {}
-+#endif
-+
-+
-+/* --------------------------------------------------------------------
-+ *  LEDs
-+ * -------------------------------------------------------------------- */
-+
-+#if defined(CONFIG_LEDS)
-+u8 at91_leds_cpu;
-+u8 at91_leds_timer;
++/* EPSON S1D13806 FB */
++#define AT91_FB_REG_BASE      0x40000000L
++#define       AT91_FB_REG_SIZE        0x200
++#define AT91_FB_VMEM_BASE     0x40200000L
++#define AT91_FB_VMEM_SIZE     0x140000L
 +
-+void __init at91_init_leds(u8 cpu_led, u8 timer_led)
++static void __init ek_init_video(void)
 +{
-+      at91_leds_cpu   = cpu_led;
-+      at91_leds_timer = timer_led;
-+}
-+#else
-+void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
-+#endif
++      /* NWAIT Signal */
++      at91_set_A_periph(AT91_PIN_PC6, 0);
 +
++      /* Initialization of the Static Memory Controller for Chip Select 3 */
++      at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_DBW_16                 /* 16 bit */
++                              | AT91_SMC_WSEN | AT91_SMC_NWS_(5)      /* wait states */
++                              | AT91_SMC_TDF_(1)                      /* float time */
++      );
 +
-+#if defined(CONFIG_NEW_LEDS)
++      at91_ics1523_init();
++}
 +
-+static struct platform_device at91_leds = {
-+      .name           = "at91_leds",
-+      .id             = -1,
++/* CRT:    (active)   640x480 60Hz (PCLK=CLKI=25.175MHz)
++   Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
++static const struct s1d13xxxfb_regval ek_s1dfb_initregs[] = {
++      {S1DREG_MISC,                   0x00},  /* Enable Memory/Register select bit */
++      {S1DREG_COM_DISP_MODE,          0x00},  /* disable display output */
++      {S1DREG_GPIO_CNF0,              0xFF},  // 0x00
++      {S1DREG_GPIO_CNF1,              0x1F},  // 0x08
++      {S1DREG_GPIO_CTL0,              0x00},
++      {S1DREG_GPIO_CTL1,              0x00},
++      {S1DREG_CLK_CNF,                0x01},  /* no divide, MCLK source is CLKI3 0x02*/
++      {S1DREG_LCD_CLK_CNF,            0x00},
++      {S1DREG_CRT_CLK_CNF,            0x00},
++      {S1DREG_MPLUG_CLK_CNF,          0x00},
++      {S1DREG_CPU2MEM_WST_SEL,        0x01},  /* 2*period(MCLK) - 4ns > period(BCLK) */
++      {S1DREG_SDRAM_REF_RATE,         0x03},  /* 32768 <= MCLK <= 50000 (MHz) */
++      {S1DREG_SDRAM_TC0,              0x00},  /* MCLK source freq (MHz): */
++      {S1DREG_SDRAM_TC1,              0x01},  /* 42 <= MCLK <= 50 */
++      {S1DREG_MEM_CNF,                0x80},  /* SDRAM Initialization - needed before mem access */
++      {S1DREG_PANEL_TYPE,             0x25},  /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
++      {S1DREG_MOD_RATE,               0x00},  /* toggle every FPFRAME */
++      {S1DREG_LCD_DISP_HWIDTH,        0x4F},  /* 680 pix */
++      {S1DREG_LCD_NDISP_HPER,         0x12},  /* 152 pix */
++      {S1DREG_TFT_FPLINE_START,       0x01},  /* 13 pix */
++      {S1DREG_TFT_FPLINE_PWIDTH,      0x0B},  /* 96 pix */
++      {S1DREG_LCD_DISP_VHEIGHT0,      0xDF},
++      {S1DREG_LCD_DISP_VHEIGHT1,      0x01},  /* 480 lines */
++      {S1DREG_LCD_NDISP_VPER,         0x2C},  /* 44 lines */
++      {S1DREG_TFT_FPFRAME_START,      0x0A},  /* 10 lines */
++      {S1DREG_TFT_FPFRAME_PWIDTH,     0x01},  /* 2 lines */
++      {S1DREG_LCD_DISP_MODE,          0x05},  /* 16 bpp */
++      {S1DREG_LCD_MISC,               0x00},  /* dithering enabled, dual panel buffer enabled */
++      {S1DREG_LCD_DISP_START0,        0x00},
++      {S1DREG_LCD_DISP_START1,        0xC8},
++      {S1DREG_LCD_DISP_START2,        0x00},
++      {S1DREG_LCD_MEM_OFF0,           0x80},
++      {S1DREG_LCD_MEM_OFF1,           0x02},
++      {S1DREG_LCD_PIX_PAN,            0x00},
++      {S1DREG_LCD_DISP_FIFO_HTC,      0x3B},
++      {S1DREG_LCD_DISP_FIFO_LTC,      0x3C},
++      {S1DREG_CRT_DISP_HWIDTH,        0x4F},  /* 680 pix */
++      {S1DREG_CRT_NDISP_HPER,         0x13},  /* 160 pix */
++      {S1DREG_CRT_HRTC_START,         0x01},  /* 13 pix */
++      {S1DREG_CRT_HRTC_PWIDTH,        0x0B},  /* 96 pix */
++      {S1DREG_CRT_DISP_VHEIGHT0,      0xDF},
++      {S1DREG_CRT_DISP_VHEIGHT1,      0x01},  /* 480 lines */
++      {S1DREG_CRT_NDISP_VPER,         0x2B},  /* 44 lines */
++      {S1DREG_CRT_VRTC_START,         0x09},  /* 10 lines */
++      {S1DREG_CRT_VRTC_PWIDTH,        0x01},  /* 2 lines */
++      {S1DREG_TV_OUT_CTL,             0x10},
++      {0x005E,                        0x9F},
++      {0x005F,                        0x00},
++      {S1DREG_CRT_DISP_MODE,          0x05},  /* 16 bpp */
++      {S1DREG_CRT_DISP_START0,        0x00},
++      {S1DREG_CRT_DISP_START1,        0x00},
++      {S1DREG_CRT_DISP_START2,        0x00},
++      {S1DREG_CRT_MEM_OFF0,           0x80},
++      {S1DREG_CRT_MEM_OFF1,           0x02},
++      {S1DREG_CRT_PIX_PAN,            0x00},
++      {S1DREG_CRT_DISP_FIFO_HTC,      0x3B},
++      {S1DREG_CRT_DISP_FIFO_LTC,      0x3C},
++      {S1DREG_LCD_CUR_CTL,            0x00},  /* inactive */
++      {S1DREG_LCD_CUR_START,          0x01},
++      {S1DREG_LCD_CUR_XPOS0,          0x00},
++      {S1DREG_LCD_CUR_XPOS1,          0x00},
++      {S1DREG_LCD_CUR_YPOS0,          0x00},
++      {S1DREG_LCD_CUR_YPOS1,          0x00},
++      {S1DREG_LCD_CUR_BCTL0,          0x00},
++      {S1DREG_LCD_CUR_GCTL0,          0x00},
++      {S1DREG_LCD_CUR_RCTL0,          0x00},
++      {S1DREG_LCD_CUR_BCTL1,          0x1F},
++      {S1DREG_LCD_CUR_GCTL1,          0x3F},
++      {S1DREG_LCD_CUR_RCTL1,          0x1F},
++      {S1DREG_LCD_CUR_FIFO_HTC,       0x00},
++      {S1DREG_CRT_CUR_CTL,            0x00},  /* inactive */
++      {S1DREG_CRT_CUR_START,          0x01},
++      {S1DREG_CRT_CUR_XPOS0,          0x00},
++      {S1DREG_CRT_CUR_XPOS1,          0x00},
++      {S1DREG_CRT_CUR_YPOS0,          0x00},
++      {S1DREG_CRT_CUR_YPOS1,          0x00},
++      {S1DREG_CRT_CUR_BCTL0,          0x00},
++      {S1DREG_CRT_CUR_GCTL0,          0x00},
++      {S1DREG_CRT_CUR_RCTL0,          0x00},
++      {S1DREG_CRT_CUR_BCTL1,          0x1F},
++      {S1DREG_CRT_CUR_GCTL1,          0x3F},
++      {S1DREG_CRT_CUR_RCTL1,          0x1F},
++      {S1DREG_CRT_CUR_FIFO_HTC,       0x00},
++      {S1DREG_BBLT_CTL0,              0x00},
++      {S1DREG_BBLT_CTL0,              0x00},
++      {S1DREG_BBLT_CC_EXP,            0x00},
++      {S1DREG_BBLT_OP,                0x00},
++      {S1DREG_BBLT_SRC_START0,        0x00},
++      {S1DREG_BBLT_SRC_START1,        0x00},
++      {S1DREG_BBLT_SRC_START2,        0x00},
++      {S1DREG_BBLT_DST_START0,        0x00},
++      {S1DREG_BBLT_DST_START1,        0x00},
++      {S1DREG_BBLT_DST_START2,        0x00},
++      {S1DREG_BBLT_MEM_OFF0,          0x00},
++      {S1DREG_BBLT_MEM_OFF1,          0x00},
++      {S1DREG_BBLT_WIDTH0,            0x00},
++      {S1DREG_BBLT_WIDTH1,            0x00},
++      {S1DREG_BBLT_HEIGHT0,           0x00},
++      {S1DREG_BBLT_HEIGHT1,           0x00},
++      {S1DREG_BBLT_BGC0,              0x00},
++      {S1DREG_BBLT_BGC1,              0x00},
++      {S1DREG_BBLT_FGC0,              0x00},
++      {S1DREG_BBLT_FGC1,              0x00},
++      {S1DREG_LKUP_MODE,              0x00},  /* LCD LUT r | LCD and CRT/TV LUT w */
++      {S1DREG_LKUP_ADDR,              0x00},
++      {S1DREG_PS_CNF,                 0x10},  /* Power Save disable */
++      {S1DREG_PS_STATUS,              0x02},  /* LCD Panel down, mem up */
++      {S1DREG_CPU2MEM_WDOGT,          0x00},
++      {S1DREG_COM_DISP_MODE,          0x02},  /* enable CRT display output */
 +};
 +
-+void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr)
-+{
-+      if (!nr)
-+              return;
-+
-+      at91_leds.dev.platform_data = leds;
-+
-+      for ( ; nr; nr--, leds++) {
-+              leds->index = nr;       /* first record stores number of leds */
-+              at91_set_gpio_output(leds->gpio, (leds->flags & 1) == 0);
-+      }
-+
-+      platform_device_register(&at91_leds);
-+}
-+#else
-+void __init at91_gpio_leds(struct at91_gpio_led *leds, int nr) {}
-+#endif
-+
++static struct s1d13xxxfb_pdata ek_s1dfb_pdata = {
++      .initregs               = ek_s1dfb_initregs,
++      .initregssize           = ARRAY_SIZE(ek_s1dfb_initregs),
++      .platform_init_video    = ek_init_video,
++};
 +
-+/* --------------------------------------------------------------------
-+ *  UART
-+ * -------------------------------------------------------------------- */
++static u64 s1dfb_dmamask = 0xffffffffUL;
 +
-+#if defined(CONFIG_SERIAL_ATMEL)
-+static struct resource dbgu_resources[] = {
-+      [0] = {
-+              .start  = AT91_VA_BASE_SYS + AT91_DBGU,
-+              .end    = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
-+              .flags  = IORESOURCE_MEM,
++static struct resource ek_s1dfb_resource[] = {
++      [0] = { /* video mem */
++              .name   = "s1d13806 memory",
++              .start  = AT91_FB_VMEM_BASE,
++              .end    = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
++              .flags  = IORESOURCE_MEM,
 +      },
-+      [1] = {
-+              .start  = AT91_ID_SYS,
-+              .end    = AT91_ID_SYS,
-+              .flags  = IORESOURCE_IRQ,
++      [1] = { /* video registers */
++              .name   = "s1d13806 registers",
++              .start  = AT91_FB_REG_BASE,
++              .end    = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
++              .flags  = IORESOURCE_MEM,
 +      },
 +};
 +
-+static struct atmel_uart_data dbgu_data = {
-+      .use_dma_tx     = 0,
-+      .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
-+      .regs           = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
-+};
-+
-+static struct platform_device at91sam9261_dbgu_device = {
-+      .name           = "atmel_usart",
-+      .id             = 0,
++static struct platform_device ek_s1dfb_device = {
++      .name           = "s1d13806fb",
++      .id             = -1,
 +      .dev            = {
-+                              .platform_data  = &dbgu_data,
-+                              .coherent_dma_mask = 0xffffffff,
++                      .dma_mask               = &s1dfb_dmamask,
++                      .coherent_dma_mask      = 0xffffffff,
++                      .platform_data          = &ek_s1dfb_pdata,
 +      },
-+      .resource       = dbgu_resources,
-+      .num_resources  = ARRAY_SIZE(dbgu_resources),
++      .resource       = ek_s1dfb_resource,
++      .num_resources  = ARRAY_SIZE(ek_s1dfb_resource),
 +};
 +
-+static inline void configure_dbgu_pins(void)
++static void __init ek_add_device_video(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PA9, 0);             /* DRXD */
-+      at91_set_A_periph(AT91_PIN_PA10, 1);            /* DTXD */
++      platform_device_register(&ek_s1dfb_device);
 +}
++#else
++static void __init ek_add_device_video(void) {}
++#endif
 +
-+static struct resource uart0_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_US0,
-+              .end    = AT91SAM9261_BASE_US0 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_US0,
-+              .end    = AT91SAM9261_ID_US0,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
-+
-+static struct atmel_uart_data uart0_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91sam9261_uart0_device = {
-+      .name           = "atmel_usart",
-+      .id             = 1,
-+      .dev            = {
-+                              .platform_data  = &uart0_data,
-+                              .coherent_dma_mask = 0xffffffff,
+ static struct at91_eth_data __initdata ek_eth_data = {
+       .phy_irq_pin    = AT91_PIN_PC4,
+       .is_rmii        = 1,
+@@ -113,7 +294,7 @@
+ #define EK_FLASH_SIZE 0x200000
+ static struct physmap_flash_data ek_flash_data = {
+-      .width  = 2,
++      .width          = 2,
+ };
+ static struct resource ek_flash_resource = {
+@@ -132,6 +313,18 @@
+       .num_resources  = 1,
+ };
++static struct at91_gpio_led ek_leds[] = {
++      {
++              .name           = "led0",
++              .gpio           = AT91_PIN_PB1,
++              .trigger        = "heartbeat",
 +      },
-+      .resource       = uart0_resources,
-+      .num_resources  = ARRAY_SIZE(uart0_resources),
++      {
++              .name           = "led1",
++              .gpio           = AT91_PIN_PB2,
++              .trigger        = "timer",
++      }
 +};
+ static void __init ek_board_init(void)
+ {
+@@ -158,8 +351,10 @@
+ #endif
+       /* NOR Flash */
+       platform_device_register(&ek_flash);
++      /* LEDs */
++      at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
+       /* VGA */
+-//    ek_add_device_video();
++      ek_add_device_video();
+ }
+ MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-kb9202.c linux-2.6-stable/arch/arm/mach-at91/board-kb9202.c
+--- linux-2.6.21/arch/arm/mach-at91/board-kb9202.c     Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-kb9202.c Tue May  8 12:21:31 2007
+@@ -37,6 +37,8 @@
+ #include <asm/arch/board.h>
+ #include <asm/arch/gpio.h>
++#include <asm/arch/at91rm9200_mc.h>
 +
-+static inline void configure_usart0_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PC8, 1);             /* TXD0 */
-+      at91_set_A_periph(AT91_PIN_PC9, 0);             /* RXD0 */
-+      at91_set_A_periph(AT91_PIN_PC10, 0);            /* RTS0 */
-+      at91_set_A_periph(AT91_PIN_PC11, 0);            /* CTS0 */
-+}
+ #include "generic.h"
+@@ -111,6 +113,48 @@
+       .partition_info = nand_partitions,
+ };
 +
-+static struct resource uart1_resources[] = {
++#if defined(CONFIG_FB_S1D15605)
++#warning "Rather pass reset pin via platform_data"
++static struct resource kb9202_lcd_resources[] = {
 +      [0] = {
-+              .start  = AT91SAM9261_BASE_US1,
-+              .end    = AT91SAM9261_BASE_US1 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
++              .start  = AT91_CHIPSELECT_2,
++              .end    = AT91_CHIPSELECT_2 + 0x200FF,
++              .flags  = IORESOURCE_MEM
 +      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_US1,
-+              .end    = AT91SAM9261_ID_US1,
-+              .flags  = IORESOURCE_IRQ,
++      [1] = { /* reset pin */
++              .start  = AT91_PIN_PC22,
++              .end    = AT91_PIN_PC22,
++              .flags  = IORESOURCE_MEM
 +      },
 +};
 +
-+static struct atmel_uart_data uart1_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
-+
-+static struct platform_device at91sam9261_uart1_device = {
-+      .name           = "atmel_usart",
-+      .id             = 2,
-+      .dev            = {
-+                              .platform_data  = &uart1_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart1_resources,
-+      .num_resources  = ARRAY_SIZE(uart1_resources),
++static struct platform_device kb9202_lcd_device = {
++      .name           = "s1d15605fb",
++      .id             = 0,
++      .num_resources  = ARRAY_SIZE(kb9202_lcd_resources),
++      .resource       = kb9202_lcd_resources,
 +};
 +
-+static inline void configure_usart1_pins(void)
++static void __init kb9202_add_device_lcd(void)
 +{
-+      at91_set_A_periph(AT91_PIN_PC12, 1);            /* TXD1 */
-+      at91_set_A_periph(AT91_PIN_PC13, 0);            /* RXD1 */
-+}
-+
-+static struct resource uart2_resources[] = {
-+      [0] = {
-+              .start  = AT91SAM9261_BASE_US2,
-+              .end    = AT91SAM9261_BASE_US2 + SZ_16K - 1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = {
-+              .start  = AT91SAM9261_ID_US2,
-+              .end    = AT91SAM9261_ID_US2,
-+              .flags  = IORESOURCE_IRQ,
-+      },
-+};
++      /* In case the boot loader did not set the chip select mode and timing */
++      at91_sys_write(AT91_SMC_CSR(2),
++              AT91_SMC_WSEN | AT91_SMC_NWS_(18) | AT91_SMC_TDF_(1) | AT91_SMC_DBW_8 |
++              AT91_SMC_RWSETUP_(1) | AT91_SMC_RWHOLD_(1));
 +
-+static struct atmel_uart_data uart2_data = {
-+      .use_dma_tx     = 1,
-+      .use_dma_rx     = 1,
-+};
++      /* Backlight pin = output, off */
++      at91_set_gpio_output(AT91_PIN_PC23, 0);
 +
-+static struct platform_device at91sam9261_uart2_device = {
-+      .name           = "atmel_usart",
-+      .id             = 3,
-+      .dev            = {
-+                              .platform_data  = &uart2_data,
-+                              .coherent_dma_mask = 0xffffffff,
-+      },
-+      .resource       = uart2_resources,
-+      .num_resources  = ARRAY_SIZE(uart2_resources),
-+};
++      /* Reset pin = output, in reset */
++      at91_set_gpio_output(AT91_PIN_PC22, 0);
 +
-+static inline void configure_usart2_pins(void)
-+{
-+      at91_set_A_periph(AT91_PIN_PC15, 0);            /* RXD2 */
-+      at91_set_A_periph(AT91_PIN_PC14, 1);            /* TXD2 */
++      platform_device_register(&kb9202_lcd_device);
 +}
++#else
++static void __init kb9202_add_device_lcd(void) {}
++#endif
 +
-+struct platform_device *at91_uarts[ATMEL_MAX_UART];   /* the UARTs to use */
-+struct platform_device *atmel_default_console_device; /* the serial console device */
+ static void __init kb9202_board_init(void)
+ {
+       /* Serial */
+@@ -129,6 +173,8 @@
+       at91_add_device_spi(NULL, 0);
+       /* NAND */
+       at91_add_device_nand(&kb9202_nand_data);
++      /* LCD  */
++      kb9202_add_device_lcd();
+ }
+ MACHINE_START(KB9200, "KB920x")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-sam9260ek.c linux-2.6-stable/arch/arm/mach-at91/board-sam9260ek.c
+--- linux-2.6.21/arch/arm/mach-at91/board-sam9260ek.c  Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-sam9260ek.c      Tue May  8 12:13:30 2007
+@@ -104,9 +104,9 @@
+       },
+ #endif
+ #endif
+-#if defined(CONFIG_SND_AT73C213)
++#if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
+       {       /* AT73C213 DAC */
+-              .modalias       = "snd_at73c213",
++              .modalias       = "at73c213",
+               .chip_select    = 0,
+               .max_speed_hz   = 10 * 1000 * 1000,
+               .bus_num        = 1,
+@@ -118,7 +118,7 @@
+ /*
+  * MACB Ethernet device
+  */
+-static struct __initdata at91_eth_data ek_macb_data = {
++static struct at91_eth_data __initdata ek_macb_data = {
+       .phy_irq_pin    = AT91_PIN_PA7,
+       .is_rmii        = 1,
+ };
+@@ -188,6 +188,8 @@
+       at91_add_device_eth(&ek_macb_data);
+       /* MMC */
+       at91_add_device_mmc(0, &ek_mmc_data);
++      /* I2C */
++      at91_add_device_i2c();
+ }
+ MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-sam9261ek.c linux-2.6-stable/arch/arm/mach-at91/board-sam9261ek.c
+--- linux-2.6.21/arch/arm/mach-at91/board-sam9261ek.c  Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-sam9261ek.c      Wed May  9 12:37:19 2007
+@@ -25,7 +25,11 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/spi/spi.h>
++#include <linux/spi/ads7846.h>
+ #include <linux/dm9000.h>
++#include <linux/fb.h>
 +
-+void __init at91_init_serial(struct at91_uart_config *config)
-+{
-+      int i;
++#include <video/atmel_lcdc.h>
+ #include <asm/hardware.h>
+ #include <asm/setup.h>
+@@ -59,6 +63,9 @@
+       /* Initialize processor: 18.432 MHz crystal */
+       at91sam9261_initialize(18432000);
++      /* Setup the LEDs */
++      at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
 +
-+      /* Fill in list of supported UARTs */
-+      for (i = 0; i < config->nr_tty; i++) {
-+              switch (config->tty_map[i]) {
-+                      case 0:
-+                              configure_usart0_pins();
-+                              at91_uarts[i] = &at91sam9261_uart0_device;
-+                              at91_clock_associate("usart0_clk", &at91sam9261_uart0_device.dev, "usart");
-+                              break;
-+                      case 1:
-+                              configure_usart1_pins();
-+                              at91_uarts[i] = &at91sam9261_uart1_device;
-+                              at91_clock_associate("usart1_clk", &at91sam9261_uart1_device.dev, "usart");
-+                              break;
-+                      case 2:
-+                              configure_usart2_pins();
-+                              at91_uarts[i] = &at91sam9261_uart2_device;
-+                              at91_clock_associate("usart2_clk", &at91sam9261_uart2_device.dev, "usart");
-+                              break;
-+                      case 3:
-+                              configure_dbgu_pins();
-+                              at91_uarts[i] = &at91sam9261_dbgu_device;
-+                              at91_clock_associate("mck", &at91sam9261_dbgu_device.dev, "usart");
-+                              break;
-+                      default:
-+                              continue;
-+              }
-+              at91_uarts[i]->id = i;          /* update ID number to mapped ID */
-+      }
+       /* Setup the serial ports and console */
+       at91_init_serial(&ek_uart_config);
+ }
+@@ -195,6 +202,41 @@
+ };
+ /*
++ * ADS7846 Touchscreen
++ */
++#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
 +
-+      /* Set serial console device */
-+      if (config->console_tty < ATMEL_MAX_UART)
-+              atmel_default_console_device = at91_uarts[config->console_tty];
-+      if (!atmel_default_console_device)
-+              printk(KERN_INFO "AT91: No default serial console defined.\n");
++static int ads7843_pendown_state(void)
++{
++      return !at91_get_gpio_value(AT91_PIN_PC2);      /* Touchscreen PENIRQ */
 +}
 +
-+void __init at91_add_device_serial(void)
-+{
-+      int i;
++static struct ads7846_platform_data ads_info = {
++      .model                  = 7843,
++      .x_min                  = 150,
++      .x_max                  = 3830,
++      .y_min                  = 190,
++      .y_max                  = 3830,
++      .vref_delay_usecs       = 100,
++      .x_plate_ohms           = 450,
++      .y_plate_ohms           = 250,
++      .pressure_max           = 15000,
++      .debounce_max           = 1,
++      .debounce_rep           = 0,
++      .debounce_tol           = (~0),
++      .get_pendown_state      = ads7843_pendown_state,
++};
 +
-+      for (i = 0; i < ATMEL_MAX_UART; i++) {
-+              if (at91_uarts[i])
-+                      platform_device_register(at91_uarts[i]);
-+      }
++static void __init ek_add_device_ts(void)
++{
++      at91_set_B_periph(AT91_PIN_PC2, 1);     /* External IRQ0, with pullup */
++      at91_set_gpio_input(AT91_PIN_PA11, 1);  /* Touchscreen BUSY signal */
 +}
 +#else
-+void __init at91_init_serial(struct at91_uart_config *config) {}
-+void __init at91_add_device_serial(void) {}
++static void __init ek_add_device_ts(void) {}
 +#endif
 +
-+
-+/* -------------------------------------------------------------------- */
-+
 +/*
-+ * These devices are always present and don't need any board-specific
-+ * setup.
-+ */
-+static int __init at91_add_standard_devices(void)
-+{
-+      return 0;
-+}
-+
-+arch_initcall(at91_add_standard_devices);
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam926x_time.c linux-2.6.19/arch/arm/mach-at91rm9200/at91sam926x_time.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/at91sam926x_time.c     Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/at91sam926x_time.c   Mon Nov 20 10:52:16 2006
-@@ -0,0 +1,114 @@
+  * SPI devices
+  */
+ static struct spi_board_info ek_spi_devices[] = {
+@@ -204,6 +246,17 @@
+               .max_speed_hz   = 15 * 1000 * 1000,
+               .bus_num        = 0,
+       },
++#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
++      {
++              .modalias       = "ads7846",
++              .chip_select    = 2,
++              .max_speed_hz   = 125000 * 26,  /* (max sample rate @ 3V) * (cmd + data + overhead) */
++              .bus_num        = 0,
++              .platform_data  = &ads_info,
++              .irq            = AT91SAM9261_ID_IRQ0,
++              .controller_data = AT91_PIN_PA28,       /* CS pin */
++      },
++#endif
+ #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
+       {       /* DataFlash card - jumper (J12) configurable to CS3 or CS0 */
+               .modalias       = "mtd_dataflash",
+@@ -211,9 +264,9 @@
+               .max_speed_hz   = 15 * 1000 * 1000,
+               .bus_num        = 0,
+       },
+-#elif defined(CONFIG_SND_AT73C213)
++#elif defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
+       {       /* AT73C213 DAC */
+-              .modalias       = "snd_at73c213",
++              .modalias       = "at73c213",
+               .chip_select    = 3,
+               .max_speed_hz   = 10 * 1000 * 1000,
+               .bus_num        = 0,
+@@ -222,6 +275,65 @@
+ };
 +/*
-+ * linux/arch/arm/mach-at91rm9200/at91sam926x_time.c
-+ *
-+ * Copyright (C) 2005-2006 M. Amine SAYA, ATMEL Rousset, France
-+ * Revision    2005 M. Nicolas Diremdjian, ATMEL Rousset, France
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
++ * LCD Controller
 + */
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
++static struct fb_videomode at91_tft_vga_modes[] = {
++      {
++              .name           = "TX09D50VM1CCA @ 60",
++              .refresh        = 60,
++              .xres           = 240,          .yres           = 320,
++              .pixclock       = KHZ2PICOS(4965),
 +
-+#include <linux/init.h>
-+#include <linux/interrupt.h>
-+#include <linux/irq.h>
-+#include <linux/kernel.h>
-+#include <linux/sched.h>
-+#include <linux/time.h>
++              .left_margin    = 1,            .right_margin   = 33,
++              .upper_margin   = 1,            .lower_margin   = 0,
++              .hsync_len      = 5,            .vsync_len      = 1,
 +
-+#include <asm/hardware.h>
-+#include <asm/io.h>
-+#include <asm/mach/time.h>
++              .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++              .vmode          = FB_VMODE_NONINTERLACED,
++      },
++};
 +
-+#include <asm/arch/at91_pit.h>
++static struct fb_monspecs at91fb_default_monspecs = {
++      .manufacturer   = "HIT",
++      .monitor        = "TX09D50VM1CCA",
 +
++      .modedb         = at91_tft_vga_modes,
++      .modedb_len     = ARRAY_SIZE(at91_tft_vga_modes),
++      .hfmin          = 15000,
++      .hfmax          = 64000,
++      .vfmin          = 50,
++      .vfmax          = 150,
++};
 +
-+#define PIT_CPIV(x)   ((x) & AT91_PIT_CPIV)
-+#define PIT_PICNT(x)  (((x) & AT91_PIT_PICNT) >> 20)
++#define AT91SAM9261_DEFAULT_LCDCON2   (ATMEL_LCDC_MEMOR_LITTLE \
++                                      | ATMEL_LCDC_DISTYPE_TFT    \
++                                      | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
 +
-+/*
-+ * Returns number of microseconds since last timer interrupt.  Note that interrupts
-+ * will have been disabled by do_gettimeofday()
-+ *  'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
-+ *  'tick' is usecs per jiffy (linux/timex.h).
-+ */
-+static unsigned long at91sam926x_gettimeoffset(void)
++static void at91_lcdc_power_control(int on)
 +{
-+      unsigned long elapsed;
-+      unsigned long t = at91_sys_read(AT91_PIT_PIIR);
-+
-+      elapsed = (PIT_PICNT(t) * LATCH) + PIT_CPIV(t);         /* hardware clock cycles */
-+
-+      return (unsigned long)(elapsed * 1000000) / LATCH;
++      if (on)
++              at91_set_gpio_value(AT91_PIN_PA12, 0);  /* power up */
++      else
++              at91_set_gpio_value(AT91_PIN_PA12, 1);  /* power down */
 +}
 +
-+/*
-+ * IRQ handler for the timer.
-+ */
-+static irqreturn_t at91sam926x_timer_interrupt(int irq, void *dev_id)
-+{
-+      volatile long nr_ticks;
++/* Driver datas */
++static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
++      .default_bpp                    = 16,
++      .default_dmacon                 = ATMEL_LCDC_DMAEN,
++      .default_lcdcon2                = AT91SAM9261_DEFAULT_LCDCON2,
++      .default_monspecs               = &at91fb_default_monspecs,
++      .atmel_lcdfb_power_control      = at91_lcdc_power_control,
++      .guard_time                     = 1,
++};
 +
-+      if (at91_sys_read(AT91_PIT_SR) & AT91_PIT_PITS) {       /* This is a shared interrupt */
-+              write_seqlock(&xtime_lock);
++#else
++static struct atmel_lcdfb_info __initdata ek_lcdc_data;
++#endif
 +
-+              /* Get number to ticks performed before interrupt and clear PIT interrupt */
-+              nr_ticks = PIT_PICNT(at91_sys_read(AT91_PIT_PIVR));
-+              do {
-+                      timer_tick();
-+                      nr_ticks--;
-+              } while (nr_ticks);
 +
-+              write_sequnlock(&xtime_lock);
-+              return IRQ_HANDLED;
-+      } else
-+              return IRQ_NONE;                /* not handled */
+ static void __init ek_board_init(void)
+ {
+       /* Serial */
+@@ -241,10 +353,14 @@
+ #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
+       /* SPI */
+       at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
++      /* Touchscreen */
++      ek_add_device_ts();
+ #else
+       /* MMC */
+       at91_add_device_mmc(0, &ek_mmc_data);
+ #endif
++      /* LCD Controller */
++      at91_add_device_lcdc(&ek_lcdc_data);
+ }
+ MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-sam9263ek.c linux-2.6-stable/arch/arm/mach-at91/board-sam9263ek.c
+--- linux-2.6.21/arch/arm/mach-at91/board-sam9263ek.c  Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/board-sam9263ek.c      Tue May  8 12:56:33 2007
+@@ -25,6 +25,10 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/spi/spi.h>
++#include <linux/spi/ads7846.h>
++#include <linux/fb.h>
++
++#include <video/atmel_lcdc.h>
+ #include <asm/hardware.h>
+ #include <asm/setup.h>
+@@ -86,6 +90,40 @@
+ /*
++ * ADS7846 Touchscreen
++ */
++#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
++static int ads7843_pendown_state(void)
++{
++      return !at91_get_gpio_value(AT91_PIN_PA15);     /* Touchscreen PENIRQ */
 +}
 +
-+static struct irqaction at91sam926x_timer_irq = {
-+      .name           = "at91_tick",
-+      .flags          = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER,
-+      .handler        = at91sam926x_timer_interrupt
++static struct ads7846_platform_data ads_info = {
++      .model                  = 7843,
++      .x_min                  = 150,
++      .x_max                  = 3830,
++      .y_min                  = 190,
++      .y_max                  = 3830,
++      .vref_delay_usecs       = 100,
++      .x_plate_ohms           = 450,
++      .y_plate_ohms           = 250,
++      .pressure_max           = 15000,
++      .debounce_max           = 1,
++      .debounce_rep           = 0,
++      .debounce_tol           = (~0),
++      .get_pendown_state      = ads7843_pendown_state,
 +};
 +
-+void at91sam926x_timer_reset(void)
++static void __init ek_add_device_ts(void)
 +{
-+      /* Disable timer */
-+      at91_sys_write(AT91_PIT_MR, 0);
-+
-+      /* Clear any pending interrupts */
-+      (void) at91_sys_read(AT91_PIT_PIVR);
-+
-+      /* Set Period Interval timer and enable its interrupt */
-+      at91_sys_write(AT91_PIT_MR, (LATCH & AT91_PIT_PIV) | AT91_PIT_PITIEN | AT91_PIT_PITEN);
++      at91_set_B_periph(AT91_PIN_PA15, 1);    /* External IRQ1, with pullup */
++      at91_set_gpio_input(AT91_PIN_PA31, 1);  /* Touchscreen BUSY signal */
 +}
++#else
++static void __init ek_add_device_ts(void) {}
++#endif
 +
 +/*
-+ * Set up timer interrupt.
-+ */
-+void __init at91sam926x_timer_init(void)
-+{
-+      /* Initialize and enable the timer */
-+      at91sam926x_timer_reset();
+  * SPI devices.
+  */
+ static struct spi_board_info ek_spi_devices[] = {
+@@ -97,6 +135,16 @@
+               .bus_num        = 0,
+       },
+ #endif
++#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
++      {
++              .modalias       = "ads7846",
++              .chip_select    = 3,
++              .max_speed_hz   = 125000 * 26,  /* (max sample rate @ 3V) * (cmd + data + overhead) */
++              .bus_num        = 0,
++              .platform_data  = &ads_info,
++              .irq            = AT91SAM9263_ID_IRQ1,
++      },
++#endif
+ };
+@@ -112,6 +160,14 @@
+ /*
++ * MACB Ethernet device
++ */
++static struct at91_eth_data __initdata ek_macb_data = {
++      .is_rmii        = 1,
++};
 +
-+      /* Make IRQs happen for the system timer. */
-+      setup_irq(AT91_ID_SYS, &at91sam926x_timer_irq);
-+}
 +
-+#ifdef CONFIG_PM
-+static void at91sam926x_timer_suspend(void)
++/*
+  * NAND flash
+  */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+@@ -148,6 +204,73 @@
+ };
++/*
++ * LCD Controller
++ */
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
++static struct fb_videomode at91_tft_vga_modes[] = {
++      {
++              .name           = "TX09D50VM1CCA @ 60",
++              .refresh        = 60,
++              .xres           = 240,          .yres           = 320,
++              .pixclock       = KHZ2PICOS(4965),
++
++              .left_margin    = 1,            .right_margin   = 33,
++              .upper_margin   = 1,            .lower_margin   = 0,
++              .hsync_len      = 5,            .vsync_len      = 1,
++
++              .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++              .vmode          = FB_VMODE_NONINTERLACED,
++      },
++};
++
++static struct fb_monspecs at91fb_default_monspecs = {
++      .manufacturer   = "HIT",
++      .monitor        = "TX09D70VM1CCA",
++
++      .modedb         = at91_tft_vga_modes,
++      .modedb_len     = ARRAY_SIZE(at91_tft_vga_modes),
++      .hfmin          = 15000,
++      .hfmax          = 64000,
++      .vfmin          = 50,
++      .vfmax          = 150,
++};
++
++#define AT91SAM9263_DEFAULT_LCDCON2   (ATMEL_LCDC_MEMOR_LITTLE \
++                                      | ATMEL_LCDC_DISTYPE_TFT    \
++                                      | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
++
++static void at91_lcdc_power_control(int on)
 +{
-+      /* Disable timer */
-+      at91_sys_write(AT91_PIT_MR, 0);
++      if (on)
++              at91_set_gpio_value(AT91_PIN_PD12, 0);  /* power up */
++      else
++              at91_set_gpio_value(AT91_PIN_PD12, 1);  /* power down */
 +}
++
++/* Driver datas */
++static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
++      .default_bpp                    = 16,
++      .default_dmacon                 = ATMEL_LCDC_DMAEN,
++      .default_lcdcon2                = AT91SAM9263_DEFAULT_LCDCON2,
++      .default_monspecs               = &at91fb_default_monspecs,
++      .atmel_lcdfb_power_control      = at91_lcdc_power_control,
++      .guard_time                     = 1,
++};
++
 +#else
-+#define at91sam926x_timer_suspend     NULL
++static struct atmel_lcdfb_info __initdata ek_lcdc_data;
 +#endif
 +
-+struct sys_timer at91sam926x_timer = {
-+      .init           = at91sam926x_timer_init,
-+      .offset         = at91sam926x_gettimeoffset,
-+      .suspend        = at91sam926x_timer_suspend,
-+      .resume         = at91sam926x_timer_reset,
-+};
 +
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-1arm.c linux-2.6.19/arch/arm/mach-at91rm9200/board-1arm.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-1arm.c   Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-1arm.c Thu Nov 23 15:50:12 2006
-@@ -64,7 +64,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata onearm_eth_data = {
-+static struct eth_platform_data __initdata onearm_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
- };
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-carmeva.c linux-2.6.19/arch/arm/mach-at91rm9200/board-carmeva.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-carmeva.c        Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-carmeva.c      Thu Nov 23 15:50:12 2006
-@@ -65,8 +65,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--
--static struct at91_eth_data __initdata carmeva_eth_data = {
-+static struct eth_platform_data __initdata carmeva_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
- };
-@@ -89,8 +88,33 @@
- // };
- static struct at91_mmc_data __initdata carmeva_mmc_data = {
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
-+      .det_pin        = AT91_PIN_PB10,
-+      .wp_pin         = AT91_PIN_PC14,
++/*
++ * AC97
++ */
++static struct atmel_ac97_data ek_ac97_data = {
++      .reset_pin      = AT91_PIN_PA13,
 +};
 +
-+static struct spi_board_info carmeva_spi_devices[] = {
-+      { /* DataFlash chip */
-+              .modalias = "mtd_dataflash",
-+              .chip_select  = 0,
-+              .max_speed_hz = 10 * 1000 * 1000,
-+      },
-+      { /* User accessable spi - cs1 (250KHz) */
-+              .modalias = "spi-cs1",
-+              .chip_select  = 1,
-+              .max_speed_hz = 250 *  1000,
-+      },
-+      { /* User accessable spi - cs2 (1MHz) */
-+              .modalias = "spi-cs2",
-+              .chip_select  = 2,
-+              .max_speed_hz = 1 * 1000 *  1000,
-+      },
-+      { /* User accessable spi - cs3 (10MHz) */
-+              .modalias = "spi-cs3",
-+              .chip_select  = 3,
-+              .max_speed_hz = 10 * 1000 *  1000,
-+      },
- };
- static void __init carmeva_board_init(void)
-@@ -105,10 +129,10 @@
-       at91_add_device_udc(&carmeva_udc_data);
-       /* I2C */
-       at91_add_device_i2c();
-+      /* SPI */
-+      at91_add_device_spi(carmeva_spi_devices, ARRAY_SIZE(carmeva_spi_devices));
-       /* Compact Flash */
- //    at91_add_device_cf(&carmeva_cf_data);
--      /* SPI */
--//    at91_add_device_spi(NULL, 0);
++
+ static void __init ek_board_init(void)
+ {
+       /* Serial */
+@@ -157,11 +280,22 @@
+       /* USB Device */
+       at91_add_device_udc(&ek_udc_data);
+       /* SPI */
++      at91_set_gpio_output(AT91_PIN_PE20, 1);         /* select spi0 clock */
+       at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
++      /* Touchscreen */
++      ek_add_device_ts();
        /* MMC */
-       at91_add_device_mmc(&carmeva_mmc_data);
- }
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-csb337.c linux-2.6.19/arch/arm/mach-at91rm9200/board-csb337.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-csb337.c Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-csb337.c       Thu Nov 23 15:50:12 2006
-@@ -68,7 +68,7 @@
-       at91rm9200_init_interrupts(NULL);
+       at91_add_device_mmc(1, &ek_mmc_data);
++      /* Ethernet */
++      at91_add_device_eth(&ek_macb_data);
+       /* NAND */
+       at91_add_device_nand(&ek_nand_data);
++      /* I2C */
++      at91_add_device_i2c();
++      /* LCD Controller */
++      at91_add_device_lcdc(&ek_lcdc_data);
++      /* AC97 */
++      at91_add_device_ac97(&ek_ac97_data);
  }
  
--static struct at91_eth_data __initdata csb337_eth_data = {
-+static struct eth_platform_data __initdata csb337_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC2,
-       .is_rmii        = 0,
- };
-@@ -99,7 +99,7 @@
- static struct at91_mmc_data __initdata csb337_mmc_data = {
-       .det_pin        = AT91_PIN_PD5,
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
-       .wp_pin         = AT91_PIN_PD6,
- };
-@@ -112,6 +112,23 @@
-       },
- };
-+static struct at91_gpio_led csb337_leds[] = {
+ MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/board-sam9rlek.c linux-2.6-stable/arch/arm/mach-at91/board-sam9rlek.c
+--- linux-2.6.21/arch/arm/mach-at91/board-sam9rlek.c   Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/board-sam9rlek.c       Wed May  9 10:58:34 2007
+@@ -0,0 +1,204 @@
++/*
++ *  Copyright (C) 2005 SAN People
++ *  Copyright (C) 2007 Atmel Corporation
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file COPYING in the main directory of this archive for
++ * more details.
++ */
++
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/mm.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/spi/spi.h>
++#include <linux/fb.h>
++#include <linux/clk.h>
++
++#include <video/atmel_lcdc.h>
++
++#include <asm/hardware.h>
++#include <asm/setup.h>
++#include <asm/mach-types.h>
++#include <asm/irq.h>
++
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/mach/irq.h>
++
++#include <asm/arch/board.h>
++#include <asm/arch/gpio.h>
++#include <asm/arch/at91sam926x_mc.h>
++
++#include "generic.h"
++
++
++/*
++ * Serial port configuration.
++ *    0 .. 3 = USART0 .. USART3
++ *    4      = DBGU
++ */
++static struct at91_uart_config __initdata ek_uart_config = {
++      .console_tty    = 0,                            /* ttyS0 */
++      .nr_tty         = 2,
++      .tty_map        = { 4, 0, -1, -1, -1 }          /* ttyS0, ..., ttyS4 */
++};
++
++static void __init ek_map_io(void)
++{
++      /* Initialize processor: 12.000 MHz crystal */
++      at91sam9rl_initialize(12000000);
++
++      /* Setup the serial ports and console */
++      at91_init_serial(&ek_uart_config);
++}
++
++static void __init ek_init_irq(void)
++{
++      at91sam9rl_init_interrupts(NULL);
++}
++
++
++/*
++ * MCI (SD/MMC)
++ */
++static struct at91_mmc_data __initdata ek_mmc_data = {
++      .wire4          = 1,
++      .det_pin        = AT91_PIN_PA15,
++//    .wp_pin         = ... not connected
++//    .vcc_pin        = ... not connected
++};
++
++
++/*
++ * NAND flash
++ */
++static struct mtd_partition __initdata ek_nand_partition[] = {
 +      {
-+              .name           = "led0",
-+              .gpio           = AT91_PIN_PB0,
-+              .trigger        = "heartbeat",
++              .name   = "Partition 1",
++              .offset = 0,
++              .size   = 256 * 1024,
 +      },
 +      {
-+              .name           = "led1",
-+              .gpio           = AT91_PIN_PB1,
-+              .trigger        = "timer",
++              .name   = "Partition 2",
++              .offset = 256 * 1024 ,
++              .size   = MTDPART_SIZ_FULL,
++      },
++};
++
++static struct mtd_partition *nand_partitions(int size, int *num_partitions)
++{
++      *num_partitions = ARRAY_SIZE(ek_nand_partition);
++      return ek_nand_partition;
++}
++
++static struct at91_nand_data __initdata ek_nand_data = {
++      .ale            = 21,
++      .cle            = 22,
++//    .det_pin        = ... not connected
++      .rdy_pin        = AT91_PIN_PD17,
++      .enable_pin     = AT91_PIN_PB6,
++      .partition_info = nand_partitions,
++      .bus_width_16   = 0,
++};
++
++
++/*
++ * SPI devices
++ */
++static struct spi_board_info ek_spi_devices[] = {
++      {       /* DataFlash chip */
++              .modalias       = "mtd_dataflash",
++              .chip_select    = 0,
++              .max_speed_hz   = 15 * 1000 * 1000,
++              .bus_num        = 0,
 +      },
++};
++
++
++/*
++ * LCD Controller
++ */
++#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
++static struct fb_videomode at91_tft_vga_modes[] = {
 +      {
-+              .name           = "led2",
-+              .gpio           = AT91_PIN_PB2,
-+      }
++              .name           = "TX09D50VM1CCA @ 60",
++              .refresh        = 60,
++              .xres           = 240,          .yres           = 320,
++              .pixclock       = KHZ2PICOS(4965),
++
++              .left_margin    = 1,            .right_margin   = 33,
++              .upper_margin   = 1,            .lower_margin   = 0,
++              .hsync_len      = 5,            .vsync_len      = 1,
++
++              .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++              .vmode          = FB_VMODE_NONINTERLACED,
++      },
 +};
 +
- static void __init csb337_board_init(void)
- {
-       /* Serial */
-@@ -131,6 +148,8 @@
-       at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
-       /* MMC */
-       at91_add_device_mmc(&csb337_mmc_data);
-+      /* LEDS */
-+      at91_gpio_leds(csb337_leds, ARRAY_SIZE(csb337_leds));
- }
- MACHINE_START(CSB337, "Cogent CSB337")
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-csb637.c linux-2.6.19/arch/arm/mach-at91rm9200/board-csb637.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-csb637.c Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-csb637.c       Thu Nov 23 15:50:12 2006
-@@ -67,7 +67,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata csb637_eth_data = {
-+static struct eth_platform_data __initdata csb637_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC0,
-       .is_rmii        = 0,
- };
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-dk.c linux-2.6.19/arch/arm/mach-at91rm9200/board-dk.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-dk.c     Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-dk.c   Thu Nov 23 15:50:12 2006
-@@ -27,6 +27,7 @@
- #include <linux/module.h>
- #include <linux/platform_device.h>
- #include <linux/spi/spi.h>
-+#include <linux/mtd/physmap.h>
- #include <asm/hardware.h>
- #include <asm/setup.h>
-@@ -39,6 +40,7 @@
- #include <asm/arch/board.h>
- #include <asm/arch/gpio.h>
-+#include <asm/arch/at91rm9200_mc.h>
- #include "generic.h"
-@@ -71,7 +73,186 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata dk_eth_data = {
-+#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
-+#include <video/s1d13xxxfb.h>
-+#include <asm/arch/ics1523.h>
++static struct fb_monspecs at91fb_default_monspecs = {
++      .manufacturer   = "HIT",
++      .monitor        = "TX09D50VM1CCA",
 +
-+/* EPSON S1D13806 FB */
-+#define AT91_FB_REG_BASE      0x30000000L
-+#define AT91_FB_REG_SIZE      0x200
-+#define AT91_FB_VMEM_BASE     0x30200000L
-+#define AT91_FB_VMEM_SIZE     0x140000L
++      .modedb         = at91_tft_vga_modes,
++      .modedb_len     = ARRAY_SIZE(at91_tft_vga_modes),
++      .hfmin          = 15000,
++      .hfmax          = 64000,
++      .vfmin          = 50,
++      .vfmax          = 150,
++};
 +
-+static void __init dk_init_video(void)
++#define AT91SAM9RL_DEFAULT_LCDCON2    (ATMEL_LCDC_MEMOR_LITTLE \
++                                      | ATMEL_LCDC_DISTYPE_TFT \
++                                      | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
++
++static void at91_lcdc_power_control(int on)
 +{
-+      /* NWAIT Signal */
-+      at91_set_A_periph(AT91_PIN_PC6, 0);
++      if (on)
++              at91_set_gpio_value(AT91_PIN_PA30, 0);  /* power up */
++      else
++              at91_set_gpio_value(AT91_PIN_PA30, 1);  /* power down */
++}
 +
-+      /* Initialization of the Static Memory Controller for Chip Select 2 */
-+      at91_sys_write(AT91_SMC_CSR(2), AT91_SMC_DBW_16                 /* 16 bit */
-+                              | AT91_SMC_WSEN | AT91_SMC_NWS_(4)      /* wait states */
-+                              | AT91_SMC_TDF_(1)                      /* float time */
-+      );
++/* Driver datas */
++static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
++      .default_bpp                    = 16,
++      .default_dmacon                 = ATMEL_LCDC_DMAEN,
++      .default_lcdcon2                = AT91SAM9RL_DEFAULT_LCDCON2,
++      .default_monspecs               = &at91fb_default_monspecs,
++      .atmel_lcdfb_power_control      = at91_lcdc_power_control,
++      .guard_time                     = 1,
++};
 +
-+      AT91F_ICS1523_clockinit();
-+}
++#else
++static struct atmel_lcdfb_info __initdata ek_lcdc_data;
++#endif
 +
-+/* CRT:    (active)   640x480 60Hz (PCLK=CLKI=25.175MHz)
-+   Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
-+static const struct s1d13xxxfb_regval dk_s1dfb_initregs[] = {
-+      {S1DREG_MISC,                   0x00},  /* Enable Memory/Register select bit */
-+      {S1DREG_COM_DISP_MODE,          0x00},  /* disable display output */
-+      {S1DREG_GPIO_CNF0,              0x00},
-+      {S1DREG_GPIO_CNF1,              0x00},
-+      {S1DREG_GPIO_CTL0,              0x08},
-+      {S1DREG_GPIO_CTL1,              0x00},
-+      {S1DREG_CLK_CNF,                0x01},  /* no divide, MCLK source is CLKI3 0x02*/
-+      {S1DREG_LCD_CLK_CNF,            0x00},
-+      {S1DREG_CRT_CLK_CNF,            0x00},
-+      {S1DREG_MPLUG_CLK_CNF,          0x00},
-+      {S1DREG_CPU2MEM_WST_SEL,        0x01},  /* 2*period(MCLK) - 4ns > period(BCLK) */
-+      {S1DREG_SDRAM_REF_RATE,         0x03},  /* 32768 <= MCLK <= 50000 (MHz) */
-+      {S1DREG_SDRAM_TC0,              0x00},  /* MCLK source freq (MHz): */
-+      {S1DREG_SDRAM_TC1,              0x01},  /* 42 <= MCLK <= 50 */
-+      {S1DREG_MEM_CNF,                0x80},  /* SDRAM Initialization - needed before mem access */
-+      {S1DREG_PANEL_TYPE,             0x25},  /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
-+      {S1DREG_MOD_RATE,               0x00},  /* toggle every FPFRAME */
-+      {S1DREG_LCD_DISP_HWIDTH,        0x4F},  /* 680 pix */
-+      {S1DREG_LCD_NDISP_HPER,         0x12},  /* 152 pix */
-+      {S1DREG_TFT_FPLINE_START,       0x01},  /* 13 pix */
-+      {S1DREG_TFT_FPLINE_PWIDTH,      0x0B},  /* 96 pix */
-+      {S1DREG_LCD_DISP_VHEIGHT0,      0xDF},
-+      {S1DREG_LCD_DISP_VHEIGHT1,      0x01},  /* 480 lines */
-+      {S1DREG_LCD_NDISP_VPER,         0x2C},  /* 44 lines */
-+      {S1DREG_TFT_FPFRAME_START,      0x0A},  /* 10 lines */
-+      {S1DREG_TFT_FPFRAME_PWIDTH,     0x01},  /* 2 lines */
-+      {S1DREG_LCD_DISP_MODE,          0x05},  /* 16 bpp */
-+      {S1DREG_LCD_MISC,               0x00},  /* dithering enabled, dual panel buffer enabled */
-+      {S1DREG_LCD_DISP_START0,        0x00},
-+      {S1DREG_LCD_DISP_START1,        0xC8},
-+      {S1DREG_LCD_DISP_START2,        0x00},
-+      {S1DREG_LCD_MEM_OFF0,           0x80},
-+      {S1DREG_LCD_MEM_OFF1,           0x02},
-+      {S1DREG_LCD_PIX_PAN,            0x00},
-+      {S1DREG_LCD_DISP_FIFO_HTC,      0x3B},
-+      {S1DREG_LCD_DISP_FIFO_LTC,      0x3C},
-+      {S1DREG_CRT_DISP_HWIDTH,        0x4F},  /* 680 pix */
-+      {S1DREG_CRT_NDISP_HPER,         0x13},  /* 160 pix */
-+      {S1DREG_CRT_HRTC_START,         0x01},  /* 13 pix */
-+      {S1DREG_CRT_HRTC_PWIDTH,        0x0B},  /* 96 pix */
-+      {S1DREG_CRT_DISP_VHEIGHT0,      0xDF},
-+      {S1DREG_CRT_DISP_VHEIGHT1,      0x01},  /* 480 lines */
-+      {S1DREG_CRT_NDISP_VPER,         0x2B},  /* 44 lines */
-+      {S1DREG_CRT_VRTC_START,         0x09},  /* 10 lines */
-+      {S1DREG_CRT_VRTC_PWIDTH,        0x01},  /* 2 lines */
-+      {S1DREG_TV_OUT_CTL,             0x10},
-+      {S1DREG_CRT_DISP_MODE,          0x05},  /* 16 bpp */
-+      {S1DREG_CRT_DISP_START0,        0x00},
-+      {S1DREG_CRT_DISP_START1,        0x00},
-+      {S1DREG_CRT_DISP_START2,        0x00},
-+      {S1DREG_CRT_MEM_OFF0,           0x80},
-+      {S1DREG_CRT_MEM_OFF1,           0x02},
-+      {S1DREG_CRT_PIX_PAN,            0x00},
-+      {S1DREG_CRT_DISP_FIFO_HTC,      0x3B},
-+      {S1DREG_CRT_DISP_FIFO_LTC,      0x3C},
-+      {S1DREG_LCD_CUR_CTL,            0x00},  /* inactive */
-+      {S1DREG_LCD_CUR_START,          0x01},
-+      {S1DREG_LCD_CUR_XPOS0,          0x00},
-+      {S1DREG_LCD_CUR_XPOS1,          0x00},
-+      {S1DREG_LCD_CUR_YPOS0,          0x00},
-+      {S1DREG_LCD_CUR_YPOS1,          0x00},
-+      {S1DREG_LCD_CUR_BCTL0,          0x00},
-+      {S1DREG_LCD_CUR_GCTL0,          0x00},
-+      {S1DREG_LCD_CUR_RCTL0,          0x00},
-+      {S1DREG_LCD_CUR_BCTL1,          0x1F},
-+      {S1DREG_LCD_CUR_GCTL1,          0x3F},
-+      {S1DREG_LCD_CUR_RCTL1,          0x1F},
-+      {S1DREG_LCD_CUR_FIFO_HTC,       0x00},
-+      {S1DREG_CRT_CUR_CTL,            0x00},  /* inactive */
-+      {S1DREG_CRT_CUR_START,          0x01},
-+      {S1DREG_CRT_CUR_XPOS0,          0x00},
-+      {S1DREG_CRT_CUR_XPOS1,          0x00},
-+      {S1DREG_CRT_CUR_YPOS0,          0x00},
-+      {S1DREG_CRT_CUR_YPOS1,          0x00},
-+      {S1DREG_CRT_CUR_BCTL0,          0x00},
-+      {S1DREG_CRT_CUR_GCTL0,          0x00},
-+      {S1DREG_CRT_CUR_RCTL0,          0x00},
-+      {S1DREG_CRT_CUR_BCTL1,          0x1F},
-+      {S1DREG_CRT_CUR_GCTL1,          0x3F},
-+      {S1DREG_CRT_CUR_RCTL1,          0x1F},
-+      {S1DREG_CRT_CUR_FIFO_HTC,       0x00},
-+      {S1DREG_BBLT_CTL0,              0x00},
-+      {S1DREG_BBLT_CTL0,              0x00},
-+      {S1DREG_BBLT_CC_EXP,            0x00},
-+      {S1DREG_BBLT_OP,                0x00},
-+      {S1DREG_BBLT_SRC_START0,        0x00},
-+      {S1DREG_BBLT_SRC_START1,        0x00},
-+      {S1DREG_BBLT_SRC_START2,        0x00},
-+      {S1DREG_BBLT_DST_START0,        0x00},
-+      {S1DREG_BBLT_DST_START1,        0x00},
-+      {S1DREG_BBLT_DST_START2,        0x00},
-+      {S1DREG_BBLT_MEM_OFF0,          0x00},
-+      {S1DREG_BBLT_MEM_OFF1,          0x00},
-+      {S1DREG_BBLT_WIDTH0,            0x00},
-+      {S1DREG_BBLT_WIDTH1,            0x00},
-+      {S1DREG_BBLT_HEIGHT0,           0x00},
-+      {S1DREG_BBLT_HEIGHT1,           0x00},
-+      {S1DREG_BBLT_BGC0,              0x00},
-+      {S1DREG_BBLT_BGC1,              0x00},
-+      {S1DREG_BBLT_FGC0,              0x00},
-+      {S1DREG_BBLT_FGC1,              0x00},
-+      {S1DREG_LKUP_MODE,              0x00},  /* LCD LUT r | LCD and CRT/TV LUT w */
-+      {S1DREG_LKUP_ADDR,              0x00},
-+      {S1DREG_PS_CNF,                 0x00},  /* Power Save disable */
-+      {S1DREG_PS_STATUS,              0x02},  /* LCD Panel down, mem up */
-+      {S1DREG_CPU2MEM_WDOGT,          0x00},
-+      {S1DREG_COM_DISP_MODE,          0x02},  /* enable CRT display output */
-+};
-+
-+static struct s1d13xxxfb_pdata dk_s1dfb_pdata = {
-+      .initregs               = dk_s1dfb_initregs,
-+      .initregssize           = ARRAY_SIZE(dk_s1dfb_initregs),
-+      .platform_init_video    = dk_init_video,
-+};
-+
-+static u64 s1dfb_dmamask = 0xffffffffUL;
-+
-+static struct resource dk_s1dfb_resource[] = {
-+      [0] = { /* video mem */
-+              .name   = "s1d13806 memory",
-+              .start  = AT91_FB_VMEM_BASE,
-+              .end    = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = { /* video registers */
-+              .name   = "s1d13806 registers",
-+              .start  = AT91_FB_REG_BASE,
-+              .end    = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+};
-+
-+static struct platform_device dk_s1dfb_device = {
-+      .name           = "s1d13806fb",
-+      .id             = -1,
-+      .dev            = {
-+                      .dma_mask               = &s1dfb_dmamask,
-+                      .coherent_dma_mask      = 0xffffffff,
-+                      .platform_data          = &dk_s1dfb_pdata,
-+      },
-+      .resource       = dk_s1dfb_resource,
-+      .num_resources  = ARRAY_SIZE(dk_s1dfb_resource),
-+};
 +
-+static void __init dk_add_device_video(void)
++static void __init ek_board_init(void)
 +{
-+      platform_device_register(&dk_s1dfb_device);
++      /* Serial */
++      at91_add_device_serial();
++      /* I2C */
++      at91_add_device_i2c();
++      /* NAND */
++      at91_add_device_nand(&ek_nand_data);
++      /* SPI */
++      at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
++      /* MMC */
++      at91_add_device_mmc(0, &ek_mmc_data);
++      /* LCD Controller */
++      at91_add_device_lcdc(&ek_lcdc_data);
 +}
-+#else
-+static void __init dk_add_device_video(void) {}
-+#endif
 +
-+static struct eth_platform_data __initdata dk_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
- };
-@@ -93,7 +274,7 @@
- };
++MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
++      /* Maintainer: Atmel */
++      .phys_io        = AT91_BASE_SYS,
++      .io_pg_offst    = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
++      .boot_params    = AT91_SDRAM_BASE + 0x100,
++      .timer          = &at91sam926x_timer,
++      .map_io         = ek_map_io,
++      .init_irq       = ek_init_irq,
++      .init_machine   = ek_board_init,
++MACHINE_END
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/clock.c linux-2.6-stable/arch/arm/mach-at91/clock.c
+--- linux-2.6.21/arch/arm/mach-at91/clock.c    Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/clock.c        Tue May  8 12:13:30 2007
+@@ -32,6 +32,7 @@
+ #include <asm/arch/cpu.h>
  
- static struct at91_mmc_data __initdata dk_mmc_data = {
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
- };
+ #include "clock.h"
++#include "generic.h"
  
-@@ -145,6 +326,37 @@
-       .partition_info = nand_partitions,
- };
  
-+#define DK_FLASH_BASE AT91_CHIPSELECT_0
-+#define DK_FLASH_SIZE 0x200000
+ /*
+@@ -254,6 +255,23 @@
+ /*------------------------------------------------------------------------*/
++#ifdef CONFIG_PM
 +
-+static struct physmap_flash_data dk_flash_data = {
-+      .width  = 2,
-+};
++int clk_must_disable(struct clk *clk)
++{
++      if (!at91_suspend_entering_slow_clock())
++              return 0;
 +
-+static struct resource dk_flash_resource = {
-+      .start          = DK_FLASH_BASE,
-+      .end            = DK_FLASH_BASE + DK_FLASH_SIZE - 1,
-+      .flags          = IORESOURCE_MEM,
-+};
++      while (clk->parent)
++              clk = clk->parent;
++      return clk != &clk32k;
++}
++EXPORT_SYMBOL(clk_must_disable);
 +
-+static struct platform_device dk_flash = {
-+      .name           = "physmap-flash",
-+      .id             = 0,
-+      .dev            = {
-+                              .platform_data  = &dk_flash_data,
-+                      },
-+      .resource       = &dk_flash_resource,
-+      .num_resources  = 1,
-+};
++#endif
 +
-+static struct at91_gpio_led dk_leds[] = {
-+      {
-+              .name           = "led0",
-+              .gpio           = AT91_PIN_PB2,
-+              .trigger        = "timer",
-+      }
-+};
++/*------------------------------------------------------------------------*/
 +
- static void __init dk_board_init(void)
- {
-       /* Serial */
-@@ -172,8 +384,12 @@
- #endif
-       /* NAND */
-       at91_add_device_nand(&dk_nand_data);
-+      /* NOR Flash */
-+      platform_device_register(&dk_flash);
-+      /* LEDs */
-+      at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds)); 
-       /* VGA */
--//    dk_add_device_video();
-+      dk_add_device_video();
- }
- MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-eb9200.c linux-2.6.19/arch/arm/mach-at91rm9200/board-eb9200.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-eb9200.c Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-eb9200.c       Thu Nov 23 15:50:12 2006
-@@ -65,7 +65,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata eb9200_eth_data = {
-+static struct eth_platform_data __initdata eb9200_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
- };
-@@ -87,7 +87,7 @@
- };
- static struct at91_mmc_data __initdata eb9200_mmc_data = {
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
- };
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-ek.c linux-2.6.19/arch/arm/mach-at91rm9200/board-ek.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-ek.c     Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-ek.c   Thu Nov 23 15:50:12 2006
-@@ -27,6 +27,7 @@
- #include <linux/module.h>
- #include <linux/platform_device.h>
- #include <linux/spi/spi.h>
-+#include <linux/mtd/physmap.h> 
- #include <asm/hardware.h>
- #include <asm/setup.h>
-@@ -39,6 +40,7 @@
+ #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
  
- #include <asm/arch/board.h>
- #include <asm/arch/gpio.h>
-+#include <asm/arch/at91rm9200_mc.h>
+ /*
+@@ -375,6 +393,7 @@
+       seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
  
- #include "generic.h"
+       seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
++#warning "Hard-coded PCK"
+       for (i = 0; i < 4; i++)
+               seq_printf(s, "PCK%d = %8x\n", i, at91_sys_read(AT91_PMC_PCKR(i)));
+       seq_printf(s, "SR   = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/generic.h linux-2.6-stable/arch/arm/mach-at91/generic.h
+--- linux-2.6.21/arch/arm/mach-at91/generic.h  Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/generic.h      Wed May  9 10:20:54 2007
+@@ -13,12 +13,14 @@
+ extern void __init at91sam9260_initialize(unsigned long main_clock);
+ extern void __init at91sam9261_initialize(unsigned long main_clock);
+ extern void __init at91sam9263_initialize(unsigned long main_clock);
++extern void __init at91sam9rl_initialize(unsigned long main_clock);
  
-@@ -71,7 +73,188 @@
-       at91rm9200_init_interrupts(NULL);
- }
+  /* Interrupts */
+ extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
+ extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
+ extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
+ extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
++extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
+ extern void __init at91_aic_init(unsigned int priority[]);
  
--static struct at91_eth_data __initdata ek_eth_data = {
-+#if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE)
-+#include <video/s1d13xxxfb.h>
-+#include <asm/arch/ics1523.h>
-+
-+/* EPSON S1D13806 FB */
-+#define AT91_FB_REG_BASE      0x40000000L
-+#define       AT91_FB_REG_SIZE        0x200
-+#define AT91_FB_VMEM_BASE     0x40200000L
-+#define AT91_FB_VMEM_SIZE     0x140000L
-+
-+static void __init ek_init_video(void)
-+{
-+      /* NWAIT Signal */
-+      at91_set_A_periph(AT91_PIN_PC6, 0);
-+
-+      /* Initialization of the Static Memory Controller for Chip Select 3 */
-+      at91_sys_write(AT91_SMC_CSR(3), AT91_SMC_DBW_16                 /* 16 bit */
-+                              | AT91_SMC_WSEN | AT91_SMC_NWS_(5)      /* wait states */
-+                              | AT91_SMC_TDF_(1)                      /* float time */
-+      );
-+
-+      AT91F_ICS1523_clockinit();
-+}
-+
-+/* CRT:    (active)   640x480 60Hz (PCLK=CLKI=25.175MHz)
-+   Memory: Embedded SDRAM (MCLK=CLKI3=50.000MHz) (BUSCLK=60.000MHz) */
-+static const struct s1d13xxxfb_regval ek_s1dfb_initregs[] = {
-+      {S1DREG_MISC,                   0x00},  /* Enable Memory/Register select bit */
-+      {S1DREG_COM_DISP_MODE,          0x00},  /* disable display output */
-+      {S1DREG_GPIO_CNF0,              0xFF},  // 0x00
-+      {S1DREG_GPIO_CNF1,              0x1F},  // 0x08
-+      {S1DREG_GPIO_CTL0,              0x00},
-+      {S1DREG_GPIO_CTL1,              0x00},
-+      {S1DREG_CLK_CNF,                0x01},  /* no divide, MCLK source is CLKI3 0x02*/
-+      {S1DREG_LCD_CLK_CNF,            0x00},
-+      {S1DREG_CRT_CLK_CNF,            0x00},
-+      {S1DREG_MPLUG_CLK_CNF,          0x00},
-+      {S1DREG_CPU2MEM_WST_SEL,        0x01},  /* 2*period(MCLK) - 4ns > period(BCLK) */
-+      {S1DREG_SDRAM_REF_RATE,         0x03},  /* 32768 <= MCLK <= 50000 (MHz) */
-+      {S1DREG_SDRAM_TC0,              0x00},  /* MCLK source freq (MHz): */
-+      {S1DREG_SDRAM_TC1,              0x01},  /* 42 <= MCLK <= 50 */
-+      {S1DREG_MEM_CNF,                0x80},  /* SDRAM Initialization - needed before mem access */
-+      {S1DREG_PANEL_TYPE,             0x25},  /* std TFT 16bit, 8bit SCP format 2, single passive LCD */
-+      {S1DREG_MOD_RATE,               0x00},  /* toggle every FPFRAME */
-+      {S1DREG_LCD_DISP_HWIDTH,        0x4F},  /* 680 pix */
-+      {S1DREG_LCD_NDISP_HPER,         0x12},  /* 152 pix */
-+      {S1DREG_TFT_FPLINE_START,       0x01},  /* 13 pix */
-+      {S1DREG_TFT_FPLINE_PWIDTH,      0x0B},  /* 96 pix */
-+      {S1DREG_LCD_DISP_VHEIGHT0,      0xDF},
-+      {S1DREG_LCD_DISP_VHEIGHT1,      0x01},  /* 480 lines */
-+      {S1DREG_LCD_NDISP_VPER,         0x2C},  /* 44 lines */
-+      {S1DREG_TFT_FPFRAME_START,      0x0A},  /* 10 lines */
-+      {S1DREG_TFT_FPFRAME_PWIDTH,     0x01},  /* 2 lines */
-+      {S1DREG_LCD_DISP_MODE,          0x05},  /* 16 bpp */
-+      {S1DREG_LCD_MISC,               0x00},  /* dithering enabled, dual panel buffer enabled */
-+      {S1DREG_LCD_DISP_START0,        0x00},
-+      {S1DREG_LCD_DISP_START1,        0xC8},
-+      {S1DREG_LCD_DISP_START2,        0x00},
-+      {S1DREG_LCD_MEM_OFF0,           0x80},
-+      {S1DREG_LCD_MEM_OFF1,           0x02},
-+      {S1DREG_LCD_PIX_PAN,            0x00},
-+      {S1DREG_LCD_DISP_FIFO_HTC,      0x3B},
-+      {S1DREG_LCD_DISP_FIFO_LTC,      0x3C},
-+      {S1DREG_CRT_DISP_HWIDTH,        0x4F},  /* 680 pix */
-+      {S1DREG_CRT_NDISP_HPER,         0x13},  /* 160 pix */
-+      {S1DREG_CRT_HRTC_START,         0x01},  /* 13 pix */
-+      {S1DREG_CRT_HRTC_PWIDTH,        0x0B},  /* 96 pix */
-+      {S1DREG_CRT_DISP_VHEIGHT0,      0xDF},
-+      {S1DREG_CRT_DISP_VHEIGHT1,      0x01},  /* 480 lines */
-+      {S1DREG_CRT_NDISP_VPER,         0x2B},  /* 44 lines */
-+      {S1DREG_CRT_VRTC_START,         0x09},  /* 10 lines */
-+      {S1DREG_CRT_VRTC_PWIDTH,        0x01},  /* 2 lines */
-+      {S1DREG_TV_OUT_CTL,             0x10},
-+      {0x005E,                        0x9F},
-+      {0x005F,                        0x00},
-+      {S1DREG_CRT_DISP_MODE,          0x05},  /* 16 bpp */
-+      {S1DREG_CRT_DISP_START0,        0x00},
-+      {S1DREG_CRT_DISP_START1,        0x00},
-+      {S1DREG_CRT_DISP_START2,        0x00},
-+      {S1DREG_CRT_MEM_OFF0,           0x80},
-+      {S1DREG_CRT_MEM_OFF1,           0x02},
-+      {S1DREG_CRT_PIX_PAN,            0x00},
-+      {S1DREG_CRT_DISP_FIFO_HTC,      0x3B},
-+      {S1DREG_CRT_DISP_FIFO_LTC,      0x3C},
-+      {S1DREG_LCD_CUR_CTL,            0x00},  /* inactive */
-+      {S1DREG_LCD_CUR_START,          0x01},
-+      {S1DREG_LCD_CUR_XPOS0,          0x00},
-+      {S1DREG_LCD_CUR_XPOS1,          0x00},
-+      {S1DREG_LCD_CUR_YPOS0,          0x00},
-+      {S1DREG_LCD_CUR_YPOS1,          0x00},
-+      {S1DREG_LCD_CUR_BCTL0,          0x00},
-+      {S1DREG_LCD_CUR_GCTL0,          0x00},
-+      {S1DREG_LCD_CUR_RCTL0,          0x00},
-+      {S1DREG_LCD_CUR_BCTL1,          0x1F},
-+      {S1DREG_LCD_CUR_GCTL1,          0x3F},
-+      {S1DREG_LCD_CUR_RCTL1,          0x1F},
-+      {S1DREG_LCD_CUR_FIFO_HTC,       0x00},
-+      {S1DREG_CRT_CUR_CTL,            0x00},  /* inactive */
-+      {S1DREG_CRT_CUR_START,          0x01},
-+      {S1DREG_CRT_CUR_XPOS0,          0x00},
-+      {S1DREG_CRT_CUR_XPOS1,          0x00},
-+      {S1DREG_CRT_CUR_YPOS0,          0x00},
-+      {S1DREG_CRT_CUR_YPOS1,          0x00},
-+      {S1DREG_CRT_CUR_BCTL0,          0x00},
-+      {S1DREG_CRT_CUR_GCTL0,          0x00},
-+      {S1DREG_CRT_CUR_RCTL0,          0x00},
-+      {S1DREG_CRT_CUR_BCTL1,          0x1F},
-+      {S1DREG_CRT_CUR_GCTL1,          0x3F},
-+      {S1DREG_CRT_CUR_RCTL1,          0x1F},
-+      {S1DREG_CRT_CUR_FIFO_HTC,       0x00},
-+      {S1DREG_BBLT_CTL0,              0x00},
-+      {S1DREG_BBLT_CTL0,              0x00},
-+      {S1DREG_BBLT_CC_EXP,            0x00},
-+      {S1DREG_BBLT_OP,                0x00},
-+      {S1DREG_BBLT_SRC_START0,        0x00},
-+      {S1DREG_BBLT_SRC_START1,        0x00},
-+      {S1DREG_BBLT_SRC_START2,        0x00},
-+      {S1DREG_BBLT_DST_START0,        0x00},
-+      {S1DREG_BBLT_DST_START1,        0x00},
-+      {S1DREG_BBLT_DST_START2,        0x00},
-+      {S1DREG_BBLT_MEM_OFF0,          0x00},
-+      {S1DREG_BBLT_MEM_OFF1,          0x00},
-+      {S1DREG_BBLT_WIDTH0,            0x00},
-+      {S1DREG_BBLT_WIDTH1,            0x00},
-+      {S1DREG_BBLT_HEIGHT0,           0x00},
-+      {S1DREG_BBLT_HEIGHT1,           0x00},
-+      {S1DREG_BBLT_BGC0,              0x00},
-+      {S1DREG_BBLT_BGC1,              0x00},
-+      {S1DREG_BBLT_FGC0,              0x00},
-+      {S1DREG_BBLT_FGC1,              0x00},
-+      {S1DREG_LKUP_MODE,              0x00},  /* LCD LUT r | LCD and CRT/TV LUT w */
-+      {S1DREG_LKUP_ADDR,              0x00},
-+      {S1DREG_PS_CNF,                 0x10},  /* Power Save disable */
-+      {S1DREG_PS_STATUS,              0x02},  /* LCD Panel down, mem up */
-+      {S1DREG_CPU2MEM_WDOGT,          0x00},
-+      {S1DREG_COM_DISP_MODE,          0x02},  /* enable CRT display output */
-+};
-+
-+static struct s1d13xxxfb_pdata ek_s1dfb_pdata = {
-+      .initregs               = ek_s1dfb_initregs,
-+      .initregssize           = ARRAY_SIZE(ek_s1dfb_initregs),
-+      .platform_init_video    = ek_init_video,
-+};
-+
-+static u64 s1dfb_dmamask = 0xffffffffUL;
-+
-+static struct resource ek_s1dfb_resource[] = {
-+      [0] = { /* video mem */
-+              .name   = "s1d13806 memory",
-+              .start  = AT91_FB_VMEM_BASE,
-+              .end    = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+      [1] = { /* video registers */
-+              .name   = "s1d13806 registers",
-+              .start  = AT91_FB_REG_BASE,
-+              .end    = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
-+              .flags  = IORESOURCE_MEM,
-+      },
-+};
-+
-+static struct platform_device ek_s1dfb_device = {
-+      .name           = "s1d13806fb",
-+      .id             = -1,
-+      .dev            = {
-+                      .dma_mask               = &s1dfb_dmamask,
-+                      .coherent_dma_mask      = 0xffffffff,
-+                      .platform_data          = &ek_s1dfb_pdata,
-+      },
-+      .resource       = ek_s1dfb_resource,
-+      .num_resources  = ARRAY_SIZE(ek_s1dfb_resource),
-+};
-+
-+static void __init ek_add_device_video(void)
-+{
-+      platform_device_register(&ek_s1dfb_device);
-+}
-+#else
-+static void __init ek_add_device_video(void) {}
-+#endif
-+
-+static struct eth_platform_data __initdata ek_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 1,
- };
-@@ -87,7 +270,7 @@
- static struct at91_mmc_data __initdata ek_mmc_data = {
-       .det_pin        = AT91_PIN_PB27,
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
-       .wp_pin         = AT91_PIN_PA17,
- };
-@@ -107,6 +290,42 @@
- #endif
- };
-+#define EK_FLASH_BASE AT91_CHIPSELECT_0
-+#define EK_FLASH_SIZE 0x200000
-+
-+static struct physmap_flash_data ek_flash_data = {
-+      .width  = 2,
-+};
-+
-+static struct resource ek_flash_resource = {
-+      .start          = EK_FLASH_BASE,
-+      .end            = EK_FLASH_BASE + EK_FLASH_SIZE - 1,
-+      .flags          = IORESOURCE_MEM,
-+};
-+
-+static struct platform_device ek_flash = {
-+      .name           = "physmap-flash",
-+      .id             = 0,
-+      .dev            = {
-+                              .platform_data  = &ek_flash_data,
-+                      },
-+      .resource       = &ek_flash_resource,
-+      .num_resources  = 1,
-+};
-+
-+static struct at91_gpio_led ek_leds[] = {
-+      {
-+              .name           = "led0",
-+              .gpio           = AT91_PIN_PB1,
-+              .trigger        = "heartbeat",
-+      },
-+      {
-+              .name           = "led1",
-+              .gpio           = AT91_PIN_PB2,
-+              .trigger        = "timer",
-+      }
-+};
-+
- static void __init ek_board_init(void)
- {
-       /* Serial */
-@@ -130,8 +349,12 @@
-       at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
-       at91_add_device_mmc(&ek_mmc_data);
- #endif
-+      /* NOR Flash */
-+      platform_device_register(&ek_flash);
-+      /* LEDs */
-+      at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
-       /* VGA */
--//    ek_add_device_video();
-+      ek_add_device_video();
- }
- MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-kafa.c linux-2.6.19/arch/arm/mach-at91rm9200/board-kafa.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-kafa.c   Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-kafa.c Thu Nov 23 15:50:12 2006
-@@ -67,7 +67,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata kafa_eth_data = {
-+static struct eth_platform_data __initdata kafa_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PC4,
-       .is_rmii        = 0,
- };
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-kb9202.c linux-2.6.19/arch/arm/mach-at91rm9200/board-kb9202.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-kb9202.c Mon Dec  4 16:39:29 2006
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-kb9202.c       Thu Nov 23 15:50:12 2006
-@@ -68,7 +68,7 @@
-       at91rm9200_init_interrupts(NULL);
- }
--static struct at91_eth_data __initdata kb9202_eth_data = {
-+static struct eth_platform_data __initdata kb9202_eth_data = {
-       .phy_irq_pin    = AT91_PIN_PB29,
-       .is_rmii        = 0,
- };
-@@ -84,7 +84,7 @@
- static struct at91_mmc_data __initdata kb9202_mmc_data = {
-       .det_pin        = AT91_PIN_PB2,
--      .is_b           = 0,
-+      .slot_b         = 0,
-       .wire4          = 1,
- };
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-sam9260ek.c linux-2.6.19/arch/arm/mach-at91rm9200/board-sam9260ek.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-sam9260ek.c      Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-sam9260ek.c    Sat Nov 25 10:47:45 2006
-@@ -0,0 +1,201 @@
+  /* Timer */
+@@ -34,6 +36,7 @@
+  /* Power Management */
+ extern void at91_irq_suspend(void);
+ extern void at91_irq_resume(void);
++extern int at91_suspend_entering_slow_clock(void);
+  /* GPIO */
+ #define AT91RM9200_PQFP               3       /* AT91RM9200 PQFP package has 3 banks */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/ics1523.c linux-2.6-stable/arch/arm/mach-at91/ics1523.c
+--- linux-2.6.21/arch/arm/mach-at91/ics1523.c  Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/ics1523.c      Tue May  8 12:13:30 2007
+@@ -0,0 +1,207 @@
 +/*
-+ * linux/arch/arm/mach-at91rm9200/board-ek.c
++ * arch/arm/mach-at91rm9200/ics1523.c
 + *
-+ *  Copyright (C) 2005 SAN People
-+ *  Copyright (C) 2006 Atmel
++ *  Copyright (C) 2003 ATMEL Rousset
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -6446,1880 +3746,380 @@ diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-sam9260ek.c l
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 + */
 +
-+#include <linux/types.h>
-+#include <linux/init.h>
-+#include <linux/mm.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/spi/spi.h>
-+
 +#include <asm/hardware.h>
-+#include <asm/setup.h>
-+#include <asm/mach-types.h>
-+#include <asm/irq.h>
++#include <asm/io.h>
 +
-+#include <asm/mach/arch.h>
-+#include <asm/mach/map.h>
-+#include <asm/mach/irq.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/init.h>
 +
-+#include <asm/arch/board.h>
++#include <asm/arch/ics1523.h>
++#include <asm/arch/at91_twi.h>
 +#include <asm/arch/gpio.h>
-+#include <asm/arch/at91sam926x_mc.h>
 +
-+#include "generic.h"
++/* TWI Errors */
++#define       AT91_TWI_ERROR  (AT91_TWI_NACK | AT91_TWI_UNRE | AT91_TWI_OVRE)
 +
 +
-+/*
-+ * Serial port configuration.
-+ *    0 .. 5 = USART0 .. USART5
-+ *    6      = DBGU
-+ */
-+static struct at91_uart_config __initdata ek_uart_config = {
-+      .console_tty    = 0,                            /* ttyS0 */
-+      .nr_tty         = 3,
-+      .tty_map        = { 6, 0, 1, -1, -1, -1, -1 }   /* ttyS0, ..., ttyS6 */
-+};
-+
-+static void __init ek_map_io(void)
-+{
-+      /* Initialize processor: 18.432 MHz crystal */
-+      at91sam9260_initialize(18432000);
-+
-+      /* Setup the serial ports and console */
-+      at91_init_serial(&ek_uart_config);
-+}
-+
-+static void __init ek_init_irq(void)
-+{
-+      at91sam9260_init_interrupts(NULL);
-+}
-+
-+
-+/*
-+ * USB Host port
-+ */
-+static struct at91_usbh_data __initdata ek_usbh_data = {
-+      .ports          = 2,
-+};
++static void __iomem *twi_base;
 +
-+/*
-+ * USB Device port
-+ */
-+static struct at91_udc_data __initdata ek_udc_data = {
-+      .vbus_pin       = AT91_PIN_PC5,
-+      .pullup_pin     = 0,            /* pull-up driven by UDC */
-+};
++#define at91_twi_read(reg)            __raw_readl(twi_base + (reg))
++#define at91_twi_write(reg, val)      __raw_writel((val), twi_base + (reg))
 +
 +
-+/*
-+ * SPI devices.
-+ */
-+static struct spi_board_info ek_spi_devices[] = {
-+#if !defined(CONFIG_MMC_AT91)
-+      {       /* DataFlash chip */
-+              .modalias       = "mtd_dataflash",
-+              .chip_select    = 1,
-+              .max_speed_hz   = 15 * 1000 * 1000,
-+              .bus_num        = 0,
-+      },
-+#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
-+      {       /* DataFlash card */
-+              .modalias       = "mtd_dataflash",
-+              .chip_select    = 0,
-+              .max_speed_hz   = 15 * 1000 * 1000,
-+              .bus_num        = 0,
-+      },
-+#endif
-+#endif
-+#if defined(CONFIG_SND_AT73C213)
-+      {       /* AT73C213 DAC */
-+              .modalias       = "snd_at73c213",
-+              .chip_select    = 0,
-+              .max_speed_hz   = 10 * 1000 * 1000,
-+              .bus_num        = 1,
-+      },
-+#endif
-+};
++/* -----------------------------------------------------------------------------
++ * Initialization of TWI CLOCK
++ * ----------------------------------------------------------------------------- */
 +
++static void at91_ics1523_SetTwiClock(unsigned int mck_khz)
++{
++      int sclock;
 +
-+/*
-+ * MACB Ethernet device
-+ */
-+static struct __initdata eth_platform_data ek_macb_data = {
-+      .is_rmii        = 1,
-+};
++      /* Here, CKDIV = 1 and CHDIV = CLDIV  ==> CLDIV = CHDIV = 1/4*((Fmclk/FTWI) -6) */
++      sclock = (10*mck_khz / ICS_TRANSFER_RATE);
++      if (sclock % 10 >= 5)
++              sclock = (sclock /10) - 5;
++      else
++              sclock = (sclock /10)- 6;
++      sclock = (sclock + (4 - sclock %4)) >> 2;       /* div 4 */
 +
++      at91_twi_write(AT91_TWI_CWGR, 0x00010000 | sclock | (sclock << 8));
++}
 +
-+/*
-+ * NAND flash
-+ */
-+static struct mtd_partition __initdata ek_nand_partition[] = {
-+      {
-+              .name   = "Partition 1",
-+              .offset = 0,
-+              .size   = 256 * 1024,
-+      },
-+      {
-+              .name   = "Partition 2",
-+              .offset = 256 * 1024,
-+              .size   = MTDPART_SIZ_FULL,
-+      },
-+};
++/* -----------------------------------------------------------------------------
++ * Read a byte with TWI Interface from the Clock Generator ICS1523
++ * ----------------------------------------------------------------------------- */
 +
-+static struct mtd_partition *nand_partitions(int size, int *num_partitions)
++static int at91_ics1523_ReadByte(unsigned char reg_address, unsigned char *data_in)
 +{
-+      *num_partitions = ARRAY_SIZE(ek_nand_partition);
-+      return ek_nand_partition;
-+}
++      int Status, nb_trial;
 +
-+static struct at91_nand_data __initdata ek_nand_data = {
-+      .ale            = 21,
-+      .cle            = 22,
-+//    .det_pin        = ... not connected
-+      .rdy_pin        = AT91_PIN_PC13,
-+      .enable_pin     = AT91_PIN_PC14,
-+      .partition_info = nand_partitions,
-+#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
-+      .bus_width_16   = 1,
-+#else
-+      .bus_width_16   = 0,
-+#endif
-+};
++      at91_twi_write(AT91_TWI_MMR, AT91_TWI_MREAD | AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
++      at91_twi_write(AT91_TWI_IADR, reg_address);
++      at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
 +
++      /* Program temporizing period (300us) */
++      udelay(300);
 +
-+/*
-+ * MCI (SD/MMC)
-+ */
-+static struct at91_mmc_data __initdata ek_mmc_data = {
-+      .slot_b         = 1,
-+      .wire4          = 1,
-+//    .det_pin        = ... not connected
-+//    .wp_pin         = ... not connected
-+//    .vcc_pin        = ... not connected
-+};
++      /* Wait TXcomplete ... */
++      nb_trial = 0;
++      Status = at91_twi_read(AT91_TWI_SR);
++      while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
++              nb_trial++;
++              Status = at91_twi_read(AT91_TWI_SR);
++      }
 +
-+static void __init ek_board_init(void)
-+{
-+      /* Serial */
-+      at91_add_device_serial();
-+      /* USB Host */
-+      at91_add_device_usbh(&ek_usbh_data);
-+      /* USB Device */
-+      at91_add_device_udc(&ek_udc_data);
-+      /* SPI */
-+      at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
-+      /* NAND */
-+      at91_add_device_nand(&ek_nand_data);
-+      /* Ethernet */
-+      at91_add_device_eth(&ek_macb_data);
-+      /* MMC */
-+      at91_add_device_mmc(&ek_mmc_data);
++      if (Status & AT91_TWI_TXCOMP) {
++              *data_in = (unsigned char) at91_twi_read(AT91_TWI_RHR);
++              return ICS1523_ACCESS_OK;
++      }
++      else
++              return ICS1523_ACCESS_ERROR;
 +}
 +
-+MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
-+      /* Maintainer: Atmel */
-+      .phys_io        = AT91_BASE_SYS,
-+      .io_pg_offst    = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
-+      .boot_params    = AT91_SDRAM_BASE + 0x100,
-+      .timer          = &at91sam926x_timer,
-+      .map_io         = ek_map_io,
-+      .init_irq       = ek_init_irq,
-+      .init_machine   = ek_board_init,
-+MACHINE_END
-diff -urN -x CVS linux-2.6.19-final/arch/arm/mach-at91rm9200/board-sam9261ek.c linux-2.6.19/arch/arm/mach-at91rm9200/board-sam9261ek.c
---- linux-2.6.19-final/arch/arm/mach-at91rm9200/board-sam9261ek.c      Thu Jan  1 02:00:00 1970
-+++ linux-2.6.19/arch/arm/mach-at91rm9200/board-sam9261ek.c    Sat Nov 25 11:07:44 2006
-@@ -0,0 +1,259 @@
-+/*
-+ * linux/arch/arm/mach-at91rm9200/board-ek.c
-+ *
-+ *  Copyright (C) 2005 SAN People
-+ *  Copyright (C) 2006 Atmel
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+ */
++/* -----------------------------------------------------------------------------
++ * Write a byte with TWI Interface to the Clock Generator ICS1523
++ * ----------------------------------------------------------------------------- */
 +
-+#include <linux/types.h>
-+#include <linux/init.h>
-+#include <linux/mm.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/spi/spi.h>
-+#include <linux/dm9000.h>
++static int at91_ics1523_WriteByte(unsigned char reg_address, unsigned char data_out)
++{
++      int Status, nb_trial;
 +
-+#include <asm/hardware.h>
-+#include <asm/setup.h>
-+#include <asm/mach-types.h>
-+#include <asm/irq.h>
++      at91_twi_write(AT91_TWI_MMR, AT91_TWI_IADRSZ_1 | ((ICS_ADDR << 16) & AT91_TWI_DADR));
++      at91_twi_write(AT91_TWI_IADR, reg_address);
++      at91_twi_write(AT91_TWI_THR, data_out);
++      at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
 +
-+#include <asm/mach/arch.h>
-+#include <asm/mach/map.h>
-+#include <asm/mach/irq.h>
++      /* Program temporizing period (300us) */
++      udelay(300);
 +
-+#include <asm/arch/board.h>
-+#include <asm/arch/gpio.h>
-+#include <asm/arch/at91sam926x_mc.h>
++      nb_trial = 0;
++      Status = at91_twi_read(AT91_TWI_SR);
++      while (!(Status & AT91_TWI_TXCOMP) && (nb_trial < 10)) {
++              nb_trial++;
++              if (Status & AT91_TWI_ERROR) {
++                      /* If Underrun OR NACK - Start again */
++                      at91_twi_write(AT91_TWI_CR, AT91_TWI_START | AT91_TWI_STOP);
 +
-+#include "generic.h"
++                      /*  Program temporizing period (300us) */
++                      udelay(300);
++              }
++              Status = at91_twi_read(AT91_TWI_SR);
++      };
 +
++      if (Status & AT91_TWI_TXCOMP)
++              return ICS1523_ACCESS_OK;
++      else
++              return ICS1523_ACCESS_ERROR;
++}
 +
-+/*
-+ * Serial port configuration.
-+ *    0 .. 2 = USART0 .. USART2
-+ *    3      = DBGU
-+ */
-+static struct at91_uart_config __initdata ek_uart_config = {
-+      .console_tty    = 0,                            /* ttyS0 */
-+      .nr_tty         = 1,
-+      .tty_map        = { 3, -1, -1, -1 }             /* ttyS0, ..., ttyS3 */
-+};
++/* -----------------------------------------------------------------------------
++ * Initialization of the Clock Generator ICS1523
++ * ----------------------------------------------------------------------------- */
 +
-+static void __init ek_map_io(void)
++int at91_ics1523_init(void)
 +{
-+      /* Initialize processor: 18.432 MHz crystal */
-+      at91sam9261_initialize(18432000);
++      int             nb_trial;
++      int             ack = ICS1523_ACCESS_OK;
++      unsigned int    status = 0xffffffff;
++      struct clk      *twi_clk;
 +
-+      /* Setup the serial ports and console */
-+      at91_init_serial(&ek_uart_config);
-+}
++      /* Map in TWI peripheral */
++      twi_base = ioremap(AT91RM9200_BASE_TWI, SZ_16K);
++      if (!twi_base)
++              return -ENOMEM;
 +
-+static void __init ek_init_irq(void)
-+{
-+      at91sam9261_init_interrupts(NULL);
-+}
++      /* pins used for TWI interface */
++      at91_set_A_periph(AT91_PIN_PA25, 0);            /* TWD */
++      at91_set_multi_drive(AT91_PIN_PA25, 1);
++      at91_set_A_periph(AT91_PIN_PA26, 0);            /* TWCK */
++      at91_set_multi_drive(AT91_PIN_PA26, 1);
 +
++      /* Enable the TWI clock */
++      twi_clk = clk_get(NULL, "twi_clk");
++      if (IS_ERR(twi_clk))
++              return ICS1523_ACCESS_ERROR;
++      clk_enable(twi_clk);
 +
-+/*
-+ * DM9000 ethernet device
-+ */
-+#if defined(CONFIG_DM9000)
-+static struct resource at91sam9261_dm9000_resource[] = {
-+      [0] = {
-+              .start  = AT91_CHIPSELECT_2,
-+              .end    = AT91_CHIPSELECT_2 + 3,
-+              .flags  = IORESOURCE_MEM
-+      },
-+      [1] = {
-+              .start  = AT91_CHIPSELECT_2 + 0x44,
-+              .end    = AT91_CHIPSELECT_2 + 0xFF,
-+              .flags  = IORESOURCE_MEM
-+      },
-+      [2] = {
-+              .start  = AT91_PIN_PC11,
-+              .end    = AT91_PIN_PC11,
-+              .flags  = IORESOURCE_IRQ
-+      }
-+};
++      /* Disable interrupts */
++      at91_twi_write(AT91_TWI_IDR, -1);
 +
-+static struct dm9000_plat_data dm9000_platdata = {
-+      .flags          = DM9000_PLATF_16BITONLY,
-+};
++      /* Reset peripheral */
++      at91_twi_write(AT91_TWI_CR, AT91_TWI_SWRST);
 +
-+static struct platform_device at91sam9261_dm9000_device = {
-+      .name           = "dm9000",
-+      .id             = 0,
-+      .num_resources  = ARRAY_SIZE(at91sam9261_dm9000_resource),
-+      .resource       = at91sam9261_dm9000_resource,
-+      .dev            = {
-+              .platform_data  = &dm9000_platdata,
-+      }
-+};
++      /* Set Master mode */
++      at91_twi_write(AT91_TWI_CR, AT91_TWI_MSEN);
 +
-+static void __init ek_add_device_dm9000(void)
-+{
-+      /*
-+       * Configure Chip-Select 2 on SMC for the DM9000.
-+       * Note: These timings were calculated for MASTER_CLOCK = 100000000
-+       *  according to the DM9000 timings.
-+       */
-+      at91_sys_write(AT91_SMC_SETUP(2), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0));
-+      at91_sys_write(AT91_SMC_PULSE(2), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(8) | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(8));
-+      at91_sys_write(AT91_SMC_CYCLE(2), AT91_SMC_NWECYCLE_(16) | AT91_SMC_NRDCYCLE_(16));
-+      at91_sys_write(AT91_SMC_MODE(2), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16 | AT91_SMC_TDF_(1));
++      /* Set TWI Clock Waveform Generator Register */
++      at91_ics1523_SetTwiClock(60000);     /* MCK in KHz = 60000 KHz */
 +
-+      /* Configure Reset signal as output */
-+      at91_set_gpio_output(AT91_PIN_PC10, 0);
++      /* ICS1523 Initialisation */
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) 0);
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OE, (unsigned char) (ICS_OEF | ICS_OET2 | ICS_OETCK));
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_OD, (unsigned char) (ICS_INSEL | 0x7F));
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0);
 +
-+      /* Configure Interrupt pin as input, no pull-up */
-+      at91_set_gpio_input(AT91_PIN_PC11, 0);
++      nb_trial = 0;
++      do {
++              nb_trial++;
++              ack |= at91_ics1523_WriteByte ((unsigned char) ICS_ICR, (unsigned char) (ICS_ENDLS | ICS_ENPLS | ICS_PDEN /*| ICS_FUNCSEL*/));
++              ack |= at91_ics1523_WriteByte ((unsigned char) ICS_LCR, (unsigned char) (ICS_PSD | ICS_PFD));
++              ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD0, (unsigned char) 0x39) ; /* 0x7A */
++              ack |= at91_ics1523_WriteByte ((unsigned char) ICS_FD1, (unsigned char) 0x00);
++              ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_PLLR));
 +
-+      platform_device_register(&at91sam9261_dm9000_device);
-+}
-+#else
-+static void __init ek_add_device_dm9000(void) {}
-+#endif /* CONFIG_DM9000 */
++              /* Program 1ms temporizing period */
++              mdelay(1);
 +
++              at91_ics1523_ReadByte ((unsigned char) ICS_SR, (char *)&status);
++      } while (!((unsigned int) status & (unsigned int) ICS_PLLLOCK) && (nb_trial < 10));
 +
-+/*
-+ * USB Host Port
-+ */
-+static struct at91_usbh_data __initdata ek_usbh_data = {
-+      .ports          = 2,
-+};
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAC, (unsigned char) 0x03) ; /* 0x01 */
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_SWRST, (unsigned char) (ICS_DPAR));
 +
++      /* Program 1ms temporizing period */
++      mdelay(1);
 +
-+/*
-+ * USB Device Port
-+ */
-+static struct at91_udc_data __initdata ek_udc_data = {
-+      .vbus_pin       = AT91_PIN_PB29,
-+      .pullup_pin     = 0,            /* pull-up driven by UDC */
-+};
++      ack |= at91_ics1523_WriteByte ((unsigned char) ICS_DPAO, (unsigned char) 0x00);
 +
++      /* Program 1ms temporizing period */
++      mdelay(1);
++      
++      /* All done - cleanup */
++      iounmap(twi_base);
++      clk_disable(twi_clk);
++      clk_put(twi_clk);
 +
-+/*
-+ * MCI (SD/MMC)
-+ */
-+static struct at91_mmc_data __initdata ek_mmc_data = {
-+      .wire4          = 1,
-+//    .det_pin        = ... not connected
-+//    .wp_pin         = ... not connected
-+//    .vcc_pin        = ... not connected
-+};
-+
++      return ack;
++}
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/pm.c linux-2.6-stable/arch/arm/mach-at91/pm.c
+--- linux-2.6.21/arch/arm/mach-at91/pm.c       Thu Apr 26 05:08:32 2007
++++ linux-2.6-stable/arch/arm/mach-at91/pm.c   Tue May  8 12:13:31 2007
+@@ -63,6 +63,7 @@
+  * Verify that all the clocks are correct before entering
+  * slow-clock mode.
+  */
++#warning "SAM9260 only has 3 programmable clocks."
+ static int at91_pm_verify_clocks(void)
+ {
+       unsigned long scsr;
+@@ -104,20 +105,15 @@
+ }
+ /*
+- * Call this from platform driver suspend() to see how deeply to suspend.
++ * This is called from clk_must_disable(), to see how deeply to suspend.
+  * For example, some controllers (like OHCI) need one of the PLL clocks
+  * in order to act as a wakeup source, and those are not available when
+  * going into slow clock mode.
+- *
+- * REVISIT: generalize as clk_will_be_available(clk)?  Other platforms have
+- * the very same problem (but not using at91 main_clk), and it'd be better
+- * to add one generic API rather than lots of platform-specific ones.
+  */
+ int at91_suspend_entering_slow_clock(void)
+ {
+       return (target_state == PM_SUSPEND_MEM);
+ }
+-EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
+ static void (*slow_clock)(void);
+@@ -207,16 +203,23 @@
+       .enter          = at91_pm_enter,
+ };
++#ifdef CONFIG_AT91_SLOW_CLOCK
++extern void at91rm9200_slow_clock(void);
++extern u32 at91rm9200_slow_clock_sz;
++#endif
 +
+ static int __init at91_pm_init(void)
+ {
+-      printk("AT91: Power Management\n");
+-
+-#ifdef CONFIG_AT91_PM_SLOW_CLOCK
+-      /* REVISIT allocations of SRAM should be dynamically managed.
++#ifdef CONFIG_AT91_SLOW_CLOCK
++      /*
++       * REVISIT allocations of SRAM should be dynamically managed.
+        * FIQ handlers and other components will want SRAM/TCM too...
+        */
+-      slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
++      slow_clock = (void *) (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE + (3 * SZ_4K));
+       memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
++      printk("AT91: Power Management (with slow clock mode)\n");
++#else
++      printk("AT91: Power Management\n");
+ #endif
+       /* Disable SDRAM low-power mode.  Cannot be used with self-refresh. */
+diff -urN -x CVS linux-2.6.21/arch/arm/mach-at91/pm_slowclock.S linux-2.6-stable/arch/arm/mach-at91/pm_slowclock.S
+--- linux-2.6.21/arch/arm/mach-at91/pm_slowclock.S     Thu Jan  1 02:00:00 1970
++++ linux-2.6-stable/arch/arm/mach-at91/pm_slowclock.S Tue May  8 12:13:31 2007
+@@ -0,0 +1,172 @@
 +/*
-+ * NAND flash
++ * arch/arm/mach-at91/pm_slow_clock.S
++ *
++ *  Copyright (C) 2006 Savin Zlobec
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
 + */
-+static struct mtd_partition __initdata ek_nand_partition[] = {
-+      {
-+              .name   = "Partition 1",
-+              .offset = 0,
-+              .size   = 256 * 1024,
-+      },
-+      {
-+              .name   = "Partition 2",
-+              .offset = 256 * 1024 ,
-+              .size   = MTDPART_SIZ_FULL,
-+      },
-+};
 +
-+static struct mtd_partition *nand_partitions(int size, int *num_partitions)
-+{
-+      *num_partitions = ARRAY_SIZE(ek_nand_partition);
-+      return ek_nand_partition;
-+}
++#include <linux/linkage.h>
++#include <asm/hardware.h>
++#include <asm/arch/at91_pmc.h>
++#include <asm/arch/at91rm9200_mc.h>
 +
-+static struct at91_nand_data __initdata ek_nand_data = {
-+      .ale            = 22,
-+      .cle            = 21,
-+//    .det_pin        = ... not connected
-+      .rdy_pin        = AT91_PIN_PC15,
-+      .enable_pin     = AT91_PIN_PC14,
-+      .partition_info = nand_partitions,
-+#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
-+      .bus_width_16   = 1,
-+#else
-+      .bus_width_16   = 0,
-+#endif
-+};
++#define MCKRDY_TIMEOUT                1000
++#define MOSCRDY_TIMEOUT       1000
++#define PLLALOCK_TIMEOUT      1000
 +
-+/*
-+ * SPI devices
-+ */
-+static struct spi_board_info ek_spi_devices[] = {
-+      {       /* DataFlash chip */
-+              .modalias       = "mtd_dataflash",
-+              .chip_select    = 0,
-+              .max_speed_hz   = 15 * 1000 * 1000,
-+              .bus_num        = 0,
-+      },
-+#if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
-+      {       /* DataFlash card - jumper (J12) configurable to CS3 or CS0 */
-+              .modalias       = "mtd_dataflash",
-+              .chip_select    = 3,
-+              .max_speed_hz   = 15 * 1000 * 1000,
-+              .bus_num        = 0,
-+      },
-+#elif defined(CONFIG_SND_AT73C213)
-+      {       /* AT73C213 DAC */
-+              .modalias       = "snd_at73c213",
-+              .chip_select    = 3,
-+              .max_speed_hz   = 10 * 1000 * 1000,
-+              .bus_num        = 0,
-+      },
-+#endif
-+};
++      .macro wait_mckrdy
++      mov     r2, #MCKRDY_TIMEOUT
++1:    sub     r2, r2, #1
++      cmp     r2, #0
++      beq     2f
++      ldr     r3, [r1, #AT91_PMC_SR]
++      tst     r3, #AT91_PMC_MCKRDY
++      beq     1b
++2:
++      .endm
 +
++      .macro wait_moscrdy
++      mov     r2, #MOSCRDY_TIMEOUT
++1:    sub     r2, r2, #1
++      cmp     r2, #0
++      beq     2f
++      ldr     r3, [r1, #AT91_PMC_SR]
++      tst     r3, #AT91_PMC_MOSCS
++      beq     1b
++2:
++      .endm
 +
-+static void __init ek_board_init(void)
-+{
-+      /* Serial */
-+      at91_add_device_serial();
-+      /* USB Host */
-+      at91_add_device_usbh(&ek_usbh_data);
-+      /* USB Device */
-+      at91_add_device_udc(&ek_udc_data);
-+      /* I2C */
-+      at91_add_device_i2c();
-+      /* NAND */
-+      at91_add_device_nand(&ek_nand_data);
-+      /* DM9000 ethernet */
-+      ek_add_device_dm9000();
++      .macro wait_pllalock
++      mov     r2, #PLLALOCK_TIMEOUT
++1:    sub     r2, r2, #1
++      cmp     r2, #0
++      beq     2f
++      ldr     r3, [r1, #AT91_PMC_SR]
++      tst     r3, #AT91_PMC_LOCKA
++      beq     1b
++2:
++      .endm
 +
-+      /* spi0 and mmc/sd share the same PIO pins */
-+#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
-+      /* SPI */
-+      at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
-+#else
-+      /* MMC */