ts-7000
[Top] [All Lists]

[ts-7000] kernel 2.6.24.4 for TS-72XX

To:
Subject: [ts-7000] kernel 2.6.24.4 for TS-72XX
From: Matthieu Crapet <>
Date: Sat, 05 Apr 2008 19:27:58 +0200
Here is a kernel 2.6.24.4 patch (against mainline Linux kernel) for my 
TS-7200.
It includes:
- Flash mapping driver for 8mo nor flash
  (physmap mapping driver can be used too)
- Ethernet
- RTC (ep93xx and ts5620: RTC daughterboard)
- Leds (red and green)
- I2C
- Watchdog (CPLD of TS-7200)
- Compact flash (pio mode only) [/dev/sda]
- TS-SER1 (PC/104 peripheral) support [/dev/ttyS0]
- USB tested ok

Your comments and help are welcome.
Hope TS-72xx is still widely used around !

To compile (one the patched is applied):
$ make ts7200_defconfig
$ vi +/^CROSS Makefile  // fix path of your toolchain
$ make
$ #INSTALL_MOD_PATH=/your-path-to/nfsroot make modules_install

Credits: All of the work is based on:
- Technologic Systems kernel tree (tskernel-2.6.21-ts-src.tar.gz)
- Old "derevoXX" patch from Lennert Buytenhek
- Miscellaneous patch (Alessandro Zummo, Petr Stetiar, ...)

Regards,
Matthieu

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

diff -Naurp linux-2.6.24.4-orig/arch/arm/configs/ts7200_defconfig 
linux-2.6.24.4/arch/arm/configs/ts7200_defconfig
--- linux-2.6.24.4-orig/arch/arm/configs/ts7200_defconfig       1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/arch/arm/configs/ts7200_defconfig    2008-04-05 
19:06:39.000000000 +0200
@@ -0,0 +1,1125 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24.4
+# Sat Apr  5 19:00:33 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_GENERIC_GPIO is not set
+# CONFIG_GENERIC_TIME is not set
+# CONFIG_GENERIC_CLOCKEVENTS is not set
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION="-matt"
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# 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_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# 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 is not set
+# 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=y
+# 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_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC 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_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Cirrus EP93xx Implementation Options
+#
+# CONFIG_CRUNCH is not set
+CONFIG_CR1_NFBIT=y
+
+#
+# EP93xx Platforms
+#
+# CONFIG_MACH_ADSSPHERE is not set
+# CONFIG_MACH_EDB9302 is not set
+# CONFIG_MACH_EDB9302A is not set
+# CONFIG_MACH_EDB9307 is not set
+# CONFIG_MACH_EDB9312 is not set
+# CONFIG_MACH_EDB9315 is not set
+# CONFIG_MACH_EDB9315A is not set
+# CONFIG_MACH_GESBC9312 is not set
+# CONFIG_MACH_MICRO9 is not set
+# CONFIG_MACH_MICRO9H is not set
+# CONFIG_MACH_MICRO9M is not set
+# CONFIG_MACH_MICRO9L is not set
+CONFIG_MACH_TS72XX=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=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=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_ARM_VIC=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+CONFIG_PREEMPT=y
+# CONFIG_NO_IDLE_HZ is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/nfs ip=192.168.1.50 
nfsroot=192.168.1.48:/home/matt/TS-7200/nfsroot"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+CONFIG_FPE_NWFPE_XP=y
+# CONFIG_FPE_FASTFPE 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_SUSPEND_UP_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# 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 is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# 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
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# 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
+# 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_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# 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
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS 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_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+CONFIG_MTD_TS7200_NOR=y
+# 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
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# 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=m
+# 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=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# 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_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_PATA_TS7200=y
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_EP93XX_ETH=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 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 is not set
+# 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
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV 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_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_TABLET 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=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=1
+# CONFIG_SERIAL_8250_EXTENDED is not set
+CONFIG_SERIAL_8250_TS_SER1=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_AMBA_PL010=y
+CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
+# CONFIG_SERIAL_AMBA_PL011 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+CONFIG_I2C_EP93XX=y
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+CONFIG_DS1682=m
+# CONFIG_SENSORS_EEPROM is not set
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCA9539=m
+CONFIG_SENSORS_PCF8591=m
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+CONFIG_I2C_DEBUG_CORE=y
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+CONFIG_I2C_DEBUG_CHIP=y
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_EP93XX_WATCHDOG is not set
+CONFIG_TS72XX_WATCHDOG=m
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+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=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# 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_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_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 is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 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 Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# 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_BERRY_CHARGE 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_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_EP93XX=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+CONFIG_RTC_DRV_M48T86=y
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_EP93XX=y
+# CONFIG_RTC_DRV_PL031 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_EXT4DEV_FS=m
+CONFIG_EXT4DEV_FS_XATTR=y
+CONFIG_EXT4DEV_FS_POSIX_ACL=y
+CONFIG_EXT4DEV_FS_SECURITY=y
+CONFIG_JBD=y
+CONFIG_JBD2=m
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# 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=m
+# CONFIG_INOTIFY is not set
+# CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+# 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=y
+CONFIG_NTFS_DEBUG=y
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+# 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_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 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
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# 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=m
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC16=m
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff -Naurp linux-2.6.24.4-orig/arch/arm/Kconfig linux-2.6.24.4/arch/arm/Kconfig
--- linux-2.6.24.4-orig/arch/arm/Kconfig        2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/arch/arm/Kconfig     2008-03-29 10:48:39.000000000 +0100
@@ -217,6 +217,7 @@ config ARCH_EP93XX
        bool "EP93xx-based"
        select ARM_AMBA
        select ARM_VIC
+  select ARCH_DISCONTIGMEM_ENABLE
        help
          This enables support for the Cirrus EP93xx series of CPUs.
 
diff -Naurp linux-2.6.24.4-orig/arch/arm/mach-ep93xx/core.c 
linux-2.6.24.4/arch/arm/mach-ep93xx/core.c
--- linux-2.6.24.4-orig/arch/arm/mach-ep93xx/core.c     2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/arch/arm/mach-ep93xx/core.c  2008-03-30 12:26:45.000000000 
+0200
@@ -498,6 +498,25 @@ static struct platform_device ep93xx_ohc
 };
 
 
+static struct platform_device ep93xx_led_device = {
+  .name   = "ep93xx-led",
+  .id     = -1,
+};
+
+
+static struct ep93xx_i2c_pins ep93xx_i2c_gpio_pins = {
+  .sda_pin                = EP93XX_GPIO_LINE_EEDAT,
+  .scl_pin                = EP93XX_GPIO_LINE_EECLK,
+};
+
+static struct platform_device ep93xx_i2c_device = {
+  .name                   = "ep93xx-i2c",
+  .id                     = 0,
+  .dev.platform_data      = &ep93xx_i2c_gpio_pins,
+  .num_resources          = 0,
+};
+
+
 void __init ep93xx_init_devices(void)
 {
        unsigned int v;
@@ -515,5 +534,7 @@ void __init ep93xx_init_devices(void)
        amba_device_register(&uart3_device, &iomem_resource);
 
        platform_device_register(&ep93xx_rtc_device);
+       platform_device_register(&ep93xx_led_device);
+       platform_device_register(&ep93xx_i2c_device);
        platform_device_register(&ep93xx_ohci_device);
 }
diff -Naurp linux-2.6.24.4-orig/arch/arm/mach-ep93xx/Kconfig 
linux-2.6.24.4/arch/arm/mach-ep93xx/Kconfig
--- linux-2.6.24.4-orig/arch/arm/mach-ep93xx/Kconfig    2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/arch/arm/mach-ep93xx/Kconfig 2008-03-29 12:50:40.000000000 
+0100
@@ -7,6 +7,15 @@ config CRUNCH
        help
          Enable kernel support for MaverickCrunch.
 
+config CR1_NFBIT
+        bool "Turn on nF bit in ControlRegister 1"
+        help
+         Say 'Y' here to force the nF bit on.  Usually this is set
+         by the bootrom.  If it is not set, then the CPU core will
+         run from HCLK instead of FCLK, and performance will suffer.
+         If you see BogoMIPS of about 1/4 of your CPU clock, try
+         turning this on; your performance should double.
+
 comment "EP93xx Platforms"
 
 config MACH_ADSSPHERE
diff -Naurp linux-2.6.24.4-orig/arch/arm/mach-ep93xx/ts72xx.c 
linux-2.6.24.4/arch/arm/mach-ep93xx/ts72xx.c
--- linux-2.6.24.4-orig/arch/arm/mach-ep93xx/ts72xx.c   2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/arch/arm/mach-ep93xx/ts72xx.c        2008-04-05 
11:58:55.000000000 +0200
@@ -51,6 +51,18 @@ static struct map_desc ts72xx_io_desc[] 
                .pfn            = __phys_to_pfn(TS72XX_RTC_DATA_PHYS_BASE),
                .length         = TS72XX_RTC_DATA_SIZE,
                .type           = MT_DEVICE,
+       },
+  /* PC/104 (8-bit) bus */
+  {
+               .virtual        = TS72XX_PC104_8BIT_IO_VIRT_BASE,
+               .pfn            = __phys_to_pfn(TS72XX_PC104_8BIT_IO_PHYS_BASE),
+               .length         = TS72XX_PC104_8BIT_IO_SIZE,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = TS72XX_PC104_8BIT_MEM_VIRT_BASE,
+               .pfn            = 
__phys_to_pfn(TS72XX_PC104_8BIT_MEM_PHYS_BASE),
+               .length         = TS72XX_PC104_8BIT_MEM_SIZE,
+               .type           = MT_DEVICE,
        }
 };
 
@@ -92,24 +104,7 @@ static struct map_desc ts72xx_alternate_
        }
 };
 
-static void __init ts72xx_map_io(void)
-{
-       ep93xx_map_io();
-       iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
-
-       /*
-        * The TS-7200 has NOR flash, the other models have NAND flash.
-        */
-       if (!board_is_ts7200()) {
-               if (is_ts9420_installed()) {
-                       iotable_init(ts72xx_alternate_nand_io_desc,
-                               ARRAY_SIZE(ts72xx_alternate_nand_io_desc));
-               } else {
-                       iotable_init(ts72xx_nand_io_desc,
-                               ARRAY_SIZE(ts72xx_nand_io_desc));
-               }
-       }
-}
+/* NOR flash resource (used by mtd/maps/physmap driver) */
 
 static struct physmap_flash_data ts72xx_flash_data = {
        .width          = 1,
@@ -117,7 +112,7 @@ static struct physmap_flash_data ts72xx_
 
 static struct resource ts72xx_flash_resource = {
        .start          = TS72XX_NOR_PHYS_BASE,
-       .end            = TS72XX_NOR_PHYS_BASE + 0x00ffffff,
+       .end              = TS72XX_NOR_PHYS_BASE + 0x007fffff,
        .flags          = IORESOURCE_MEM,
 };
 
@@ -131,6 +126,39 @@ static struct platform_device ts72xx_fla
        .resource       = &ts72xx_flash_resource,
 };
 
+/* CF resource */
+
+static struct resource ts7200_cf_resources[] = {
+       [0] = {
+               .start  = TS7200_CF_CMD_PHYS_BASE,
+               .end    = TS7200_CF_CMD_PHYS_BASE + 8,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = TS7200_CF_AUX_PHYS_BASE,
+               .end    = TS7200_CF_AUX_PHYS_BASE + 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start  = TS7200_CF_DATA_PHYS_BASE,
+               .end    = TS7200_CF_DATA_PHYS_BASE + 2,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device ts7200_cf_device = {
+       .name   = "ts7200-cf",
+       .id     = -1,
+       .dev    = {
+               .dma_mask               = (void *)0xffffffff,
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(ts7200_cf_resources),
+       .resource       = ts7200_cf_resources,
+};
+
+/* RTC resource (used by rtc/rtc-m48t86 driver) */
+
 static unsigned char ts72xx_rtc_readbyte(unsigned long addr)
 {
        __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE);
@@ -157,6 +185,8 @@ static struct platform_device ts72xx_rtc
        .num_resources          = 0,
 };
 
+/* ETH resource (used by net/arm/ep93xx_eth driver) */
+
 static struct ep93xx_eth_data ts72xx_eth_data = {
        .phy_id                 = 1,
 };
@@ -183,16 +213,63 @@ static struct platform_device ts72xx_eth
        .resource       = ts72xx_eth_resource,
 };
 
+/* Watchdog resource */
+
+static struct resource ts72xx_watchdog_resources[] = {
+   [0] = {
+     .start  = TS72XX_WATCHDOG_CONTROL_PHYS_BASE,
+     .end  = TS72XX_WATCHDOG_CONTROL_PHYS_BASE + 0x0fff,
+     .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+     .start  = TS72XX_WATCHDOG_FEED_PHYS_BASE,
+     .end  = TS72XX_WATCHDOG_FEED_PHYS_BASE + 0x0fff,
+     .flags  = IORESOURCE_MEM,
+   },
+ };
+
+static struct platform_device ts72xx_watchdog_device = {
+  .name   = "ts72xx-wdt",
+  .id   = -1,
+  .num_resources  = ARRAY_SIZE(ts72xx_watchdog_resources),
+  .resource = ts72xx_watchdog_resources,
+};
+
+/* - */
+
+static void __init ts72xx_map_io(void)
+{
+       ep93xx_map_io();
+       iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+
+       /*
+        * The TS-7200 has NOR flash, the other models have NAND flash.
+        */
+       if (!board_is_ts7200()) {
+               if (is_ts9420_installed()) {
+                       iotable_init(ts72xx_alternate_nand_io_desc,
+                               ARRAY_SIZE(ts72xx_alternate_nand_io_desc));
+               } else {
+                       iotable_init(ts72xx_nand_io_desc,
+                               ARRAY_SIZE(ts72xx_nand_io_desc));
+               }
+       }
+}
+
 static void __init ts72xx_init_machine(void)
 {
        ep93xx_init_devices();
-       if (board_is_ts7200())
+       if (board_is_ts7200()) {
                platform_device_register(&ts72xx_flash);
+    platform_device_register(&ts7200_cf_device);
+  }
+
        platform_device_register(&ts72xx_rtc_device);
 
        memcpy(ts72xx_eth_data.dev_addr,
                (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
        platform_device_register(&ts72xx_eth_device);
+       platform_device_register(&ts72xx_watchdog_device);
 }
 
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
diff -Naurp linux-2.6.24.4-orig/arch/arm/mm/proc-arm920.S 
linux-2.6.24.4/arch/arm/mm/proc-arm920.S
--- linux-2.6.24.4-orig/arch/arm/mm/proc-arm920.S       2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/arch/arm/mm/proc-arm920.S    2007-11-16 00:25:00.000000000 
+0100
@@ -198,7 +198,7 @@ ENTRY(arm920_coherent_kern_range)
  */
 ENTRY(arm920_coherent_user_range)
        bic     r0, r0, #CACHE_DLINESIZE - 1
-1:     mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
+1:     mcr     p15, 0, r0, c7, c14, 1          @ clean+invalidate D entry
        mcr     p15, 0, r0, c7, c5, 1           @ invalidate I entry
        add     r0, r0, #CACHE_DLINESIZE
        cmp     r0, r1
@@ -395,6 +395,9 @@ __arm920_setup:
        mrc     p15, 0, r0, c1, c0              @ get control register v4
        bic     r0, r0, r5
        orr     r0, r0, r6
+#ifdef CONFIG_CR1_NFBIT
+        orr     r0, r0, #0x40000000             @ set nF
+#endif
        mov     pc, lr
        .size   __arm920_setup, . - __arm920_setup
 
diff -Naurp linux-2.6.24.4-orig/drivers/ata/Kconfig 
linux-2.6.24.4/drivers/ata/Kconfig
--- linux-2.6.24.4-orig/drivers/ata/Kconfig     2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/ata/Kconfig  2008-04-05 12:08:11.000000000 +0200
@@ -650,4 +650,11 @@ config PATA_BF54X
 
          If unsure, say N.
 
+config PATA_TS7200
+  tristate "TS7200 Compact Flash support"
+  depends on ARCH_EP93XX
+  help
+    This option enables support for the compact flash control on
+    Technologic Systems SBC : TS-7200.
+
 endif # ATA
diff -Naurp linux-2.6.24.4-orig/drivers/ata/Makefile 
linux-2.6.24.4/drivers/ata/Makefile
--- linux-2.6.24.4-orig/drivers/ata/Makefile    2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/ata/Makefile 2008-04-05 12:08:38.000000000 +0200
@@ -68,6 +68,7 @@ obj-$(CONFIG_PATA_SCC)                += pata_scc.o
 obj-$(CONFIG_PATA_BF54X)       += pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)    += pata_platform.o
 obj-$(CONFIG_PATA_ICSIDE)      += pata_icside.o
+obj-$(CONFIG_PATA_TS7200)      += pata_ts7200.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)                += pata_acpi.o
 # Should be last but one libata driver
diff -Naurp linux-2.6.24.4-orig/drivers/ata/pata_ts7200.c 
linux-2.6.24.4/drivers/ata/pata_ts7200.c
--- linux-2.6.24.4-orig/drivers/ata/pata_ts7200.c       1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/ata/pata_ts7200.c    2008-04-05 15:13:23.000000000 
+0200
@@ -0,0 +1,189 @@
+/*
+ *  TS-7200 Compact Flash Driver for Technologic Systems boards.
+ *
+ *  Based on pata_platform.c by Paul Mundt &
+ *      Alessandro Zummo <>
+ *  and old pata-ts7200.c by Alessandro Zummo <>
+ *
+ *     (c) Copyright 2008  Matthieu Crapet <>
+ *
+ *     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 <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/libata.h>
+#include <scsi/scsi_host.h>
+#include <linux/platform_device.h>
+
+#define DRV_NAME  "pata_ts7200"
+#define DRV_VERSION "1.0"
+
+
+/*
+ * Provide our own set_mode() as we don't want to change anything that has
+ * already been configured..
+ */
+static int ts7200_set_mode(struct ata_link *link, struct ata_device **unused)
+{
+  struct ata_device *dev;
+
+  ata_link_for_each_dev(dev, link) {
+    if (ata_dev_enabled(dev)) {
+      /* We don't really care */
+      dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
+      dev->xfer_shift = ATA_SHIFT_PIO;
+      dev->flags |= ATA_DFLAG_PIO;
+      ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
+    }
+  }
+  return 0;
+}
+
+static struct scsi_host_template ts7200_sht = {
+  .module          = THIS_MODULE,
+  .name            = DRV_NAME,
+  .ioctl           = ata_scsi_ioctl,
+  .queuecommand    = ata_scsi_queuecmd,
+  .can_queue       = ATA_DEF_QUEUE,
+  .this_id         = ATA_SHT_THIS_ID,
+  .sg_tablesize    = LIBATA_MAX_PRD,
+  .cmd_per_lun     = ATA_SHT_CMD_PER_LUN,
+  .emulated        = ATA_SHT_EMULATED,
+  .use_clustering  = ATA_SHT_USE_CLUSTERING,
+  .proc_name       = DRV_NAME,
+  .dma_boundary    = ATA_DMA_BOUNDARY,
+  .slave_configure = ata_scsi_slave_config,
+  .slave_destroy   = ata_scsi_slave_destroy,
+  .bios_param      = ata_std_bios_param,
+};
+
+static struct ata_port_operations ts7200_port_ops = {
+  .set_mode          = ts7200_set_mode,
+
+  .tf_load           = ata_tf_load,
+  .tf_read           = ata_tf_read,
+  .check_status      = ata_check_status,
+  .exec_command      = ata_exec_command,
+  .dev_select        = ata_std_dev_select,
+
+  .freeze            = ata_bmdma_freeze,
+  .thaw              = ata_bmdma_thaw,
+  .error_handler     = ata_bmdma_error_handler,
+  .post_internal_cmd = ata_bmdma_post_internal_cmd,
+  .cable_detect      = ata_cable_unknown,
+
+  .qc_prep           = ata_qc_prep,
+  .qc_issue          = ata_qc_issue_prot,
+
+  .data_xfer         = ata_data_xfer_noirq,
+
+  .irq_clear         = ata_bmdma_irq_clear,
+  .irq_on            = ata_irq_on,
+
+  .port_start        = ata_port_start,
+};
+
+static __devinit int ts7200_pata_probe(struct platform_device *pdev)
+{
+  struct ata_host *host;
+  struct ata_port *ap;
+  int irq;
+
+  struct resource *pata_cmd  = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+  struct resource *pata_aux  = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+  struct resource *pata_data = platform_get_resource(pdev, IORESOURCE_MEM, 2);
+
+  if (!pata_cmd || !pata_aux || !pata_data) {
+    dev_err(&pdev->dev, "missing resource(s)\n");
+    return -EINVAL;
+  }
+
+  irq = platform_get_irq(pdev, 0);
+  if (irq < 0)
+    irq = 0;  /* no irq */
+
+  /*
+   * Now that that's out of the way, wire up the port..
+   */
+  host = ata_host_alloc(&pdev->dev, 1);
+  if (!host)
+    return -ENOMEM;
+  ap = host->ports[0];
+
+  ap->ops = &ts7200_port_ops;
+  ap->pio_mask = 0x1f; /* PIO4 */
+  ap->flags |= ATA_FLAG_SLAVE_POSS;
+
+  /*
+   * Use polling mode if there's no IRQ
+   */
+  if (!irq) {
+    ap->flags |= ATA_FLAG_PIO_POLLING;
+    ata_port_desc(ap, "no IRQ, using PIO polling");
+  }
+
+  ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, pata_cmd->start,
+      pata_cmd->end - pata_cmd->start + 1);
+  ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, pata_aux->start,
+      pata_aux->end - pata_aux->start + 1);
+
+  if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) {
+    dev_err(&pdev->dev, "failed to map IO/CTL base\n");
+    return -ENOMEM;
+  }
+
+  ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
+
+  ata_std_ports(&ap->ioaddr);
+  ap->ioaddr.data_addr = devm_ioremap(&pdev->dev, pata_data->start,
+      pata_data->end - pata_data->start + 1);
+
+  ata_port_desc(ap, "mmio cmd 0x%llx ctl 0x%llx",
+      (unsigned long long)pata_cmd->start,
+      (unsigned long long)pata_aux->start);
+
+  /* activate */
+  return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
+      0 /* irq flags */, &ts7200_sht);
+}
+
+static __devexit int ts7200_pata_remove(struct platform_device *pdev)
+{
+  struct device *dev = &pdev->dev;
+  struct ata_host *host = dev_get_drvdata(dev);
+
+  ata_host_detach(host);
+
+  return 0;
+}
+
+static struct platform_driver ts7200_pata_platform_driver = {
+  .probe    = ts7200_pata_probe,
+  .remove   = __devexit_p(ts7200_pata_remove),
+  .driver = {
+    .name   = "ts7200-cf",
+    .owner  = THIS_MODULE,
+  },
+};
+
+static int __init ts7200_pata_init(void)
+{
+  return platform_driver_register(&ts7200_pata_platform_driver);
+}
+
+static void __exit ts7200_pata_exit(void)
+{
+  platform_driver_unregister(&ts7200_pata_platform_driver);
+}
+
+MODULE_AUTHOR("Matthieu Crapet <>");
+MODULE_DESCRIPTION("low-level driver for TS-7200 CF device ATA");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+
+module_init(ts7200_pata_init);
+module_exit(ts7200_pata_exit);
diff -Naurp linux-2.6.24.4-orig/drivers/i2c/busses/i2c-ep93xx.c 
linux-2.6.24.4/drivers/i2c/busses/i2c-ep93xx.c
--- linux-2.6.24.4-orig/drivers/i2c/busses/i2c-ep93xx.c 1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/i2c/busses/i2c-ep93xx.c      2008-03-30 
12:58:22.000000000 +0200
@@ -0,0 +1,173 @@
+/*
+ * Intel's IXP4xx XScale NPU chipsets (IXP420, 421, 422, 425) do not have
+ * an on board I2C controller but provide 16 GPIO pins that are often
+ * used to create an I2C bus. This driver provides an i2c_adapter
+ * interface that plugs in under algo_bit and drives the GPIO pins
+ * as instructed by the alogorithm driver.
+ *
+ * Based on i2x-ixp4xx.c
+ * Author: Deepak Saxena <>
+ * Copyright (c) 2003-2004 MontaVista Software Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ *
+ * NOTE: Since different platforms will use different GPIO pins for
+ *       I2C, this driver uses an ep93xx specific platform_data
+ *       pointer to pass the GPIO numbers to the driver. This
+ *       allows us to support all the different boards
+ *       w/o having to put #ifdefs in this driver.
+ *
+ *       See arch/arm/mach-ep93xx/core.c for an example of building a
+ *       device list and filling in the ep93xx_i2c_pins data structure
+ *       that is passed as the platform_data to this driver.
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+
+#include <asm/hardware.h>
+#include <asm/arch/gpio.h>
+
+static inline int ep93xx_scl_pin(void *data)
+{
+  return ((struct ep93xx_i2c_pins *)data)->scl_pin;
+}
+
+static inline int ep93xx_sda_pin(void *data)
+{
+  return ((struct ep93xx_i2c_pins *)data)->sda_pin;
+}
+
+static void ep93xx_bit_setscl(void *data, int val)
+{
+  gpio_line_set(ep93xx_scl_pin(data), 0);
+  gpio_line_config(ep93xx_scl_pin(data),
+      val ? GPIO_IN : GPIO_OUT);
+}
+
+static void ep93xx_bit_setsda(void *data, int val)
+{
+  gpio_line_set(ep93xx_sda_pin(data), 0);
+  gpio_line_config(ep93xx_sda_pin(data),
+      val ? GPIO_IN : GPIO_OUT);
+}
+
+static int ep93xx_bit_getscl(void *data)
+{
+  int scl;
+
+  gpio_line_config(ep93xx_scl_pin(data), GPIO_IN);
+  scl = gpio_line_get(ep93xx_scl_pin(data));
+
+  return scl;
+}
+
+static int ep93xx_bit_getsda(void *data)
+{
+  int sda;
+
+  gpio_line_config(ep93xx_sda_pin(data), GPIO_IN);
+  sda = gpio_line_get(ep93xx_sda_pin(data));
+
+  return sda;
+}
+
+struct ep93xx_i2c_data {
+  struct ep93xx_i2c_pins *gpio_pins;
+  struct i2c_adapter adapter;
+  struct i2c_algo_bit_data algo_data;
+};
+
+static int ep93xx_i2c_remove(struct platform_device *plat_dev)
+{
+  struct ep93xx_i2c_data *drv_data = platform_get_drvdata(plat_dev);
+
+  platform_set_drvdata(plat_dev, NULL);
+
+  i2c_del_adapter(&drv_data->adapter);
+
+  kfree(drv_data);
+
+  return 0;
+}
+
+static int ep93xx_i2c_probe(struct platform_device *plat_dev)
+{
+  int err;
+  struct ep93xx_i2c_pins *gpio = plat_dev->dev.platform_data;
+  struct ep93xx_i2c_data *drv_data =
+    kzalloc(sizeof(struct ep93xx_i2c_data), GFP_KERNEL);
+
+  if (!drv_data)
+    return -ENOMEM;
+
+  drv_data->gpio_pins = gpio;
+
+  /*
+   * We could make a lot of these structures static, but
+   * certain platforms may have multiple GPIO-based I2C
+   * buses for various device domains, so we need per-device
+   * algo_data->data.
+   */
+  drv_data->algo_data.data = gpio;
+  drv_data->algo_data.setsda = ep93xx_bit_setsda;
+  drv_data->algo_data.setscl = ep93xx_bit_setscl;
+  drv_data->algo_data.getsda = ep93xx_bit_getsda;
+  drv_data->algo_data.getscl = ep93xx_bit_getscl;
+  drv_data->algo_data.udelay = 10;
+  drv_data->algo_data.timeout = 100; /* in jiffies */
+
+  strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name,
+      I2C_NAME_SIZE);
+  drv_data->adapter.algo_data = &drv_data->algo_data;
+  drv_data->adapter.class = I2C_CLASS_ALL;
+
+  drv_data->adapter.dev.parent = &plat_dev->dev;
+
+  gpio_line_config(gpio->scl_pin, GPIO_IN);
+  gpio_line_config(gpio->sda_pin, GPIO_IN);
+  gpio_line_set(gpio->scl_pin, 0);
+  gpio_line_set(gpio->sda_pin, 0);
+
+  if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
+    printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id);
+
+    kfree(drv_data);
+    return err;
+  }
+
+  platform_set_drvdata(plat_dev, drv_data);
+
+  return 0;
+}
+
+static struct platform_driver ep93xx_i2c_driver = {
+  .probe    = ep93xx_i2c_probe,
+  .remove   = ep93xx_i2c_remove,
+  .driver   = {
+    .name = "ep93xx-i2c",
+    .owner  = THIS_MODULE,
+  },
+};
+
+static int __init ep93xx_i2c_init(void)
+{
+  return platform_driver_register(&ep93xx_i2c_driver);
+}
+
+static void __exit ep93xx_i2c_exit(void)
+{
+  platform_driver_unregister(&ep93xx_i2c_driver);
+}
+
+module_init(ep93xx_i2c_init);
+module_exit(ep93xx_i2c_exit);
+
+MODULE_DESCRIPTION("GPIO-based I2C adapter for EP93XX systems");
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Alessandro Zummo <>");
diff -Naurp linux-2.6.24.4-orig/drivers/i2c/busses/Kconfig 
linux-2.6.24.4/drivers/i2c/busses/Kconfig
--- linux-2.6.24.4-orig/drivers/i2c/busses/Kconfig      2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/i2c/busses/Kconfig   2008-03-30 12:29:50.000000000 
+0200
@@ -675,4 +675,15 @@ config I2C_PMCMSP
          This driver can also be built as module. If so, the module
          will be called i2c-pmcmsp.
 
+config I2C_EP93XX
+  tristate "Cirrus Logic EP93XX GPIO-based I2C interface"
+  depends on I2C && ARCH_EP93XX
+  select I2C_ALGOBIT
+  help
+    Say Y here if you have an Cirrus Logic EP93XX based
+    system and are using GPIO lines for an I2C bus.
+
+    This support is also available as a module. If so, the module
+    will be called i2c-ep93xx.
+
 endmenu
diff -Naurp linux-2.6.24.4-orig/drivers/i2c/busses/Makefile 
linux-2.6.24.4/drivers/i2c/busses/Makefile
--- linux-2.6.24.4-orig/drivers/i2c/busses/Makefile     2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/i2c/busses/Makefile  2008-03-30 12:30:31.000000000 
+0200
@@ -53,6 +53,7 @@ obj-$(CONFIG_I2C_VIAPRO)      += i2c-viapro.o
 obj-$(CONFIG_I2C_VOODOO3)      += i2c-voodoo3.o
 obj-$(CONFIG_SCx200_ACB)       += scx200_acb.o
 obj-$(CONFIG_SCx200_I2C)       += scx200_i2c.o
+obj-$(CONFIG_I2C_EP93XX)       += i2c-ep93xx.o
 
 ifeq ($(CONFIG_I2C_DEBUG_BUS),y)
 EXTRA_CFLAGS += -DDEBUG
diff -Naurp linux-2.6.24.4-orig/drivers/leds/Kconfig 
linux-2.6.24.4/drivers/leds/Kconfig
--- linux-2.6.24.4-orig/drivers/leds/Kconfig    2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/leds/Kconfig 2008-03-29 15:26:49.000000000 +0100
@@ -114,6 +114,12 @@ config LEDS_CM_X270
        help
          This option enables support for the CM-X270 LEDs.
 
+config LEDS_EP93XX
+  tristate "LED Support for Cirrus Logic EP93xx"
+  depends on LEDS_CLASS && ARCH_EP93XX
+  help
+    This option enables support for the Cirrus Logic EP93xx based boards.
+
 comment "LED Triggers"
 
 config LEDS_TRIGGERS
diff -Naurp linux-2.6.24.4-orig/drivers/leds/leds-ep93xx.c 
linux-2.6.24.4/drivers/leds/leds-ep93xx.c
--- linux-2.6.24.4-orig/drivers/leds/leds-ep93xx.c      1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/leds/leds-ep93xx.c   2008-03-30 12:22:47.000000000 
+0200
@@ -0,0 +1,119 @@
+/*
+ * LEDs driver for Cirrus Logic EP93xx
+ *
+ * Author: Petr Stetiar <>
+ *
+ * Based on leds-corgi.c by Richard Purdie
+ *
+ * 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.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <asm/mach-types.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/gpio.h>
+
+static void ep93xx_green_led_set(struct led_classdev *led_cdev, enum 
led_brightness value)
+{
+       if (value)
+               gpio_line_set(EP93XX_GPIO_LINE_GRLED, EP93XX_GPIO_HIGH);
+       else
+               gpio_line_set(EP93XX_GPIO_LINE_GRLED, EP93XX_GPIO_LOW);
+}
+
+static void ep93xx_red_led_set(struct led_classdev *led_cdev, enum 
led_brightness value)
+{
+       if (value)
+               gpio_line_set(EP93XX_GPIO_LINE_RDLED, EP93XX_GPIO_HIGH);
+       else
+               gpio_line_set(EP93XX_GPIO_LINE_RDLED, EP93XX_GPIO_LOW);
+}
+
+
+static struct led_classdev ep93xx_green_led = {
+       .name                   = "ep93xx:green",
+       .default_trigger        = "none",
+       .brightness_set         = ep93xx_green_led_set,
+};
+
+static struct led_classdev ep93xx_red_led = {
+       .name                   = "ep93xx:red",
+       .default_trigger        = "heartbeat",
+       .brightness_set         = ep93xx_red_led_set,
+};
+
+#ifdef CONFIG_PM
+static int ep93xx_led_suspend(struct platform_device *dev, pm_message_t state)
+{
+       led_classdev_suspend(&ep93xx_green_led);
+       led_classdev_suspend(&ep93xx_red_led);
+       return 0;
+}
+
+static int ep93xx_led_resume(struct platform_device *dev)
+{
+       led_classdev_resume(&ep93xx_red_led);
+       led_classdev_resume(&ep93xx_green_led);
+       return 0;
+}
+#endif
+
+static int __devinit ep93xx_led_probe(struct platform_device *pdev)
+{
+       int ret;
+
+       gpio_line_config(EP93XX_GPIO_LINE_GRLED, GPIO_OUT);
+       gpio_line_config(EP93XX_GPIO_LINE_RDLED, GPIO_OUT);
+
+       ret = led_classdev_register(&pdev->dev, &ep93xx_green_led);
+       if (ret < 0)
+               return ret;
+
+       ret = led_classdev_register(&pdev->dev, &ep93xx_red_led);
+       if (ret < 0)
+               led_classdev_unregister(&ep93xx_green_led);
+
+       return ret;
+}
+
+static int ep93xx_led_remove(struct platform_device *pdev)
+{
+       led_classdev_unregister(&ep93xx_green_led);
+       led_classdev_unregister(&ep93xx_red_led);
+       return 0;
+}
+
+static struct platform_driver ep93xx_led_driver = {
+       .probe          = ep93xx_led_probe,
+       .remove         = ep93xx_led_remove,
+#ifdef CONFIG_PM
+       .suspend        = ep93xx_led_suspend,
+       .resume         = ep93xx_led_resume,
+#endif
+       .driver         = {
+               .name           = "ep93xx-led",
+       },
+};
+
+static int __init ep93xx_led_init(void)
+{
+       return platform_driver_register(&ep93xx_led_driver);
+}
+
+static void __exit ep93xx_led_exit(void)
+{
+       platform_driver_unregister(&ep93xx_led_driver);
+}
+
+module_init(ep93xx_led_init);
+module_exit(ep93xx_led_exit);
+
+MODULE_AUTHOR("Petr Stetiar <>");
+MODULE_DESCRIPTION("Cirrus Logic EP93xx LED driver");
+MODULE_LICENSE("GPL");
diff -Naurp linux-2.6.24.4-orig/drivers/leds/Makefile 
linux-2.6.24.4/drivers/leds/Makefile
--- linux-2.6.24.4-orig/drivers/leds/Makefile   2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/leds/Makefile        2008-03-29 18:50:53.000000000 
+0100
@@ -19,6 +19,7 @@ obj-$(CONFIG_LEDS_COBALT_QUBE)                += leds-
 obj-$(CONFIG_LEDS_COBALT_RAQ)          += leds-cobalt-raq.o
 obj-$(CONFIG_LEDS_GPIO)                        += leds-gpio.o
 obj-$(CONFIG_LEDS_CM_X270)              += leds-cm-x270.o
+obj-$(CONFIG_LEDS_EP93XX)              += leds-ep93xx.o
 
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o
diff -Naurp linux-2.6.24.4-orig/drivers/mtd/maps/Kconfig 
linux-2.6.24.4/drivers/mtd/maps/Kconfig
--- linux-2.6.24.4-orig/drivers/mtd/maps/Kconfig        2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/mtd/maps/Kconfig     2008-03-29 14:40:08.000000000 
+0100
@@ -500,6 +500,14 @@ config MTD_OMAP_NOR
          These boards include the Innovator, H2, H3, OSK, Perseus2, and
          more.  If you have such a board, say 'Y'.
 
+config MTD_TS7200_NOR
+       tristate "Technologic Systems TS-7200 flash 8Mb"
+       depends on MTD_CFI && MTD_PARTITIONS && ARCH_EP93XX
+       help
+         This provides a driver for the on-board flash of the Technologic
+         System's TS-7200 board. The 8MB flash is splitted into 3 partitions
+         which are accessed as separate MTD devices.
+
 # This needs CFI or JEDEC, depending on the cards found.
 config MTD_PCI
        tristate "PCI MTD driver"
diff -Naurp linux-2.6.24.4-orig/drivers/mtd/maps/Makefile 
linux-2.6.24.4/drivers/mtd/maps/Makefile
--- linux-2.6.24.4-orig/drivers/mtd/maps/Makefile       2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/mtd/maps/Makefile    2008-03-29 14:35:52.000000000 
+0100
@@ -69,3 +69,4 @@ obj-$(CONFIG_MTD_PLATRAM)     += plat-ram.o
 obj-$(CONFIG_MTD_OMAP_NOR)     += omap_nor.o
 obj-$(CONFIG_MTD_MTX1)         += mtx-1_flash.o
 obj-$(CONFIG_MTD_INTEL_VR_NOR) += intel_vr_nor.o
+obj-$(CONFIG_MTD_TS7200_NOR)           += ts7200_flash.o
diff -Naurp linux-2.6.24.4-orig/drivers/mtd/maps/ts7200_flash.c 
linux-2.6.24.4/drivers/mtd/maps/ts7200_flash.c
--- linux-2.6.24.4-orig/drivers/mtd/maps/ts7200_flash.c 1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/mtd/maps/ts7200_flash.c      2008-04-05 
11:17:47.000000000 +0200
@@ -0,0 +1,92 @@
+/*
+ * ts7200_flash.c - mapper for TS-7200 8mb board
+ * Note: no platform_device resource is used here. All is hardcoded.
+ *
+ * Copyright (C) 09.06.2006 13:53 Matt
+ * This code is GPL
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+
+#define WINDOW_ADDR 0x60000000
+#define WINDOW_SIZE 0x00800000
+
+static struct mtd_info *mymtd;
+
+struct map_info ts7200nor_map = {
+  .name = "Full TS-7200 NOR flash",
+  .size = WINDOW_SIZE,
+  .bankwidth = 2,
+  .phys = WINDOW_ADDR,
+};
+
+/*
+ * MTD partitioning stuff
+ */
+static struct mtd_partition static_partitions[3] =
+{
+  {
+    .name = "TS-BOOTROM",
+    .size = 0x20000,
+    .offset = 0,
+    .mask_flags = MTD_WRITEABLE,  /* force read-only */
+  },
+  {
+    .name = "RootFS",
+    .size = 0x600000,
+    .offset = 0x20000
+  },
+  {
+    .name = "Redboot",
+    .size = 0x1E0000,
+    .offset = 0x620000
+  },
+};
+
+int __init init_ts7200nor(void)
+{
+  printk(KERN_NOTICE "TS-7200 flash mapping: 0x%x at 0x%x\n", WINDOW_SIZE, 
WINDOW_ADDR);
+
+  ts7200nor_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
+  if (!ts7200nor_map.virt) {
+    printk("ts7200_flash: failed to ioremap\n");
+    return -EIO;
+  }
+
+  simple_map_init(&ts7200nor_map);
+  mymtd = do_map_probe("cfi_probe", &ts7200nor_map);
+  if (mymtd) {
+    mymtd->owner = THIS_MODULE;
+    add_mtd_device(mymtd);
+    return add_mtd_partitions(mymtd, static_partitions, 3);
+  }
+
+  iounmap((void *)ts7200nor_map.virt);
+  return -ENXIO;
+}
+
+static void __exit cleanup_ts7200nor(void)
+{
+  if (mymtd) {
+    del_mtd_device(mymtd);
+    map_destroy(mymtd);
+  }
+  if (ts7200nor_map.virt) {
+    iounmap((void *)ts7200nor_map.virt);
+    ts7200nor_map.virt = 0;
+  }
+}
+
+module_init(init_ts7200nor);
+module_exit(cleanup_ts7200nor);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Matthieu Crapet <>");
+MODULE_DESCRIPTION("MTD map driver for TS-7200 board (8MB flash version)");
diff -Naurp linux-2.6.24.4-orig/drivers/serial/8250_ts_ser1.c 
linux-2.6.24.4/drivers/serial/8250_ts_ser1.c
--- linux-2.6.24.4-orig/drivers/serial/8250_ts_ser1.c   1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/serial/8250_ts_ser1.c        2008-03-29 
18:42:00.000000000 +0100
@@ -0,0 +1,127 @@
+/*
+ *  linux/drivers/serial/8250_ts_ser1.c
+ *
+ *  Copyright (C) 2006 Matthieu Crapet.
+ *  Data taken from include/asm-i386/serial.h
+ *
+ * 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.
+ *
+ * Pin Number:
+ * 1 DCD
+ * 2 Receive data
+ * 3 Trasmit data
+ * 4 DTR
+ * 5 Signal Ground
+ * 6 DSR
+ * 7 RTS
+ * 8 CTS
+ * 9 RI
+ *
+ * IRQ6 (written on pcb) is IRQ_EP93XX_EXT1 (33)
+ * IRQ7 (written on pcb) is IRQ_EP93XX_EXT3 (40)
+ */
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/serial_8250.h>
+#include <asm/hardware.h>
+#include <asm/arch/irqs.h>
+
+
+#define TS72XX_SER1_IO_VIRT_BASE  (TS72XX_PC104_8BIT_IO_VIRT_BASE)
+#define TS72XX_SER1_IO_PHYS_BASE  (TS72XX_PC104_8BIT_IO_PHYS_BASE)
+#define TS72XX_SER1_IO_SIZE       (TS72XX_PC104_8BIT_IO_SIZE)
+#define TS72XX_SER1_MEM_VIRT_BASE (TS72XX_PC104_8BIT_MEM_VIRT_BASE)
+
+#define TS_SER1_PORT_COM3 0x3E8
+#define TS_SER1_PORT_COM4 0x2E8
+#define TS_SER1_PORT_COM5 0x3A8
+
+#define MARKER_BYTE 0xAA /* or 0x55 */
+
+#define PORT(_base,_irq)            \
+  {                                 \
+    .iobase   = TS72XX_SER1_IO_VIRT_BASE + _base,  \
+    .membase  = (void __iomem *)(TS72XX_SER1_MEM_VIRT_BASE + _base), \
+    .irq      = _irq,               \
+    .uartclk  = 1843200,            \
+    .iotype   = UPIO_PORT,          \
+    .flags    = UPF_BOOT_AUTOCONF,  \
+  }
+
+static struct plat_serial8250_port ts72xx_ser1_data_com3[] = {
+  PORT(TS_SER1_PORT_COM3, IRQ_EP93XX_EXT3),
+  { },
+};
+
+static struct plat_serial8250_port ts72xx_ser1_data_com4[] = {
+  PORT(TS_SER1_PORT_COM4, IRQ_EP93XX_EXT3),
+  { },
+};
+
+static struct plat_serial8250_port ts72xx_ser1_data_com5[] = {
+  PORT(TS_SER1_PORT_COM5, IRQ_EP93XX_EXT3),
+  { },
+};
+
+static struct platform_device ts72xx_ser1_device = {
+  .name     = "serial8250",
+  .id       =  123,
+  .dev      = {
+    .platform_data  = ts72xx_ser1_data_com3,
+  },
+};
+
+static int __init ts_ser1_init(void)
+{
+  static struct plat_serial8250_port *comX = NULL;
+  void *iomem;
+  int n; // COM number as printed on TS-SER1 pcb
+
+  /* Just in case, if TS72XX_SER1_IO_VIRT_BASE is not mapped */
+  iomem = ioremap(TS72XX_SER1_IO_PHYS_BASE, TS72XX_SER1_IO_SIZE);
+
+  if (iomem != NULL) {
+    __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM3 + 7);
+    if (__raw_readb(iomem + TS_SER1_PORT_COM3 + 7) == MARKER_BYTE) {
+      comX = ts72xx_ser1_data_com3;
+      n = 3;
+    } else {
+      __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM4 + 7);
+      if (__raw_readb(iomem + TS_SER1_PORT_COM4 + 7) == MARKER_BYTE) {
+        comX = ts72xx_ser1_data_com4;
+        n = 4;
+      } else {
+        __raw_writeb(MARKER_BYTE, iomem + TS_SER1_PORT_COM5 + 7);
+        if (__raw_readb(iomem + TS_SER1_PORT_COM5 + 7) == MARKER_BYTE) {
+          comX = ts72xx_ser1_data_com5;
+          n = 5;
+        }
+      }
+    }
+
+    //if (comX) {
+    //  printk(KERN_INFO "8250_ts_ser1: COM%d at MMIO 0x%x (irq = %d)\n",
+    //      n, comX->iobase, comX->irq);
+    //}
+
+    ts72xx_ser1_device.dev.platform_data = comX;
+    iounmap(iomem);
+  }
+
+  return ((comX == NULL) ? -ENODEV :
+      platform_device_register(&ts72xx_ser1_device));
+}
+
+static void __exit ts_ser1_exit(void)
+{
+  platform_device_unregister(&ts72xx_ser1_device);
+}
+
+module_init(ts_ser1_init);
+module_exit(ts_ser1_exit);
+
+MODULE_AUTHOR("Matthieu Crapet");
+MODULE_DESCRIPTION("8250 serial probe module for TS-SER1 (TS-72xx)");
+MODULE_LICENSE("GPL");
diff -Naurp linux-2.6.24.4-orig/drivers/serial/Kconfig 
linux-2.6.24.4/drivers/serial/Kconfig
--- linux-2.6.24.4-orig/drivers/serial/Kconfig  2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/serial/Kconfig       2008-03-29 16:43:24.000000000 
+0100
@@ -278,6 +278,15 @@ config SERIAL_8250_RM9K
          port hardware found on MIPS RM9122 and similar processors.
          If unsure, say N.
 
+config SERIAL_8250_TS_SER1
+       tristate "Support TS-SER1 (for TS-72XX SBC)"
+       depends on SERIAL_8250 != n && ARCH_EP93XX
+       help
+         Say Y here if you have a TS-SER1 PC/104 peripheral.
+
+         To compile this driver as a module, choose M here: the module
+         will be called 8250_ts_ser1.
+
 comment "Non-8250 serial port support"
 
 config SERIAL_AMBA_PL010
diff -Naurp linux-2.6.24.4-orig/drivers/serial/Makefile 
linux-2.6.24.4/drivers/serial/Makefile
--- linux-2.6.24.4-orig/drivers/serial/Makefile 2008-03-24 19:49:18.000000000 
+0100
+++ linux-2.6.24.4/drivers/serial/Makefile      2008-03-29 16:05:21.000000000 
+0100
@@ -21,6 +21,7 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) 
 obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
 obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
 obj-$(CONFIG_SERIAL_8250_AU1X00) += 8250_au1x00.o
+obj-$(CONFIG_SERIAL_8250_TS_SER1) += 8250_ts_ser1.o
 obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
 obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
 obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
diff -Naurp linux-2.6.24.4-orig/drivers/watchdog/Kconfig 
linux-2.6.24.4/drivers/watchdog/Kconfig
--- linux-2.6.24.4-orig/drivers/watchdog/Kconfig        2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/watchdog/Kconfig     2008-03-29 13:26:00.000000000 
+0100
@@ -217,6 +217,18 @@ config DAVINCI_WATCHDOG
          NOTE: once enabled, this timer cannot be disabled.
          Say N if you are unsure.
 
+config TS72XX_WATCHDOG
+       tristate "TS-72xx Watchdog"
+       depends on WATCHDOG && ARCH_EP93XX && MACH_TS72XX
+       help
+         Say Y here if to include support for the CPLD watchdog
+         included on Technologic Systems SBC.
+
+         NOTE: timeout value is given in milliseconds, not in seconds.
+
+         To compile this driver as a module, choose M here: the
+         module will be called ts72xx_wdt.
+
 # ARM26 Architecture
 
 # AVR32 Architecture
diff -Naurp linux-2.6.24.4-orig/drivers/watchdog/Makefile 
linux-2.6.24.4/drivers/watchdog/Makefile
--- linux-2.6.24.4-orig/drivers/watchdog/Makefile       2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/drivers/watchdog/Makefile    2008-03-29 13:24:55.000000000 
+0100
@@ -39,6 +39,7 @@ obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_
 obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
 obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o
 obj-$(CONFIG_DAVINCI_WATCHDOG) += davinci_wdt.o
+obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
 
 # ARM26 Architecture
 
diff -Naurp linux-2.6.24.4-orig/drivers/watchdog/ts72xx_wdt.c 
linux-2.6.24.4/drivers/watchdog/ts72xx_wdt.c
--- linux-2.6.24.4-orig/drivers/watchdog/ts72xx_wdt.c   1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.24.4/drivers/watchdog/ts72xx_wdt.c        2008-04-05 
11:59:30.000000000 +0200
@@ -0,0 +1,332 @@
+/*
+ *     TS-72xx Watchdog Driver for Technologic Systems boards.
+ *
+ *  Based on ep93xx_wdt.c by Lehtiniemi <> &
+ *      Alessandro Zummo <>
+ *  and ib700wdt.c by Charles Howes <>
+ *  and mpc83xx_wdt.c by Dave Updegraff <> &
+ *      Kumar Gala <>
+ *
+ *     (c) Copyright 2006  Matthieu Crapet <>
+ *
+ *     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 driver only deals with native timeout provided by CPLD :
+ * 1/4s, 1/2s, 1s, 2s, 4s and 8s. No external timer is used.
+ * Notice that we must ping before modifying the control register.
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/miscdevice.h>
+#include <linux/platform_device.h>
+#include <linux/init.h>
+#include <linux/watchdog.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/mach-types.h>
+
+#define WATCHDOG_VERSION "0.2"
+#define PFX "ts72xx_wdt: "
+
+#define WATCHDOG_TIMEOUT 8000 /* 8 seconds */
+#define WDT_IN_USE      0
+#define WDT_OK_TO_CLOSE 1
+
+static unsigned long ts72xx_wdt_status;
+static unsigned char ts72xx_wdt_cpld_value = 0x7;
+static int nowayout = WATCHDOG_NOWAYOUT;
+static int timeout = WATCHDOG_TIMEOUT;
+
+static int ts72xx_wdt_times[12] = {
+       6000, 3000, 1500, 750, 275, 0,
+       8000, 4000, 2000, 1000, 500, 250
+};
+
+static void __iomem *control_register;
+static void __iomem *feed_register;
+
+
+/*
+ *     Kernel methods.
+ */
+
+static inline void ts72xx_wdt_ping(void)
+{
+       __raw_writew(0x05, feed_register);
+}
+
+static inline void ts72xx_wdt_enable(void)
+{
+       __raw_writew(0x05, feed_register);
+       __raw_writew(ts72xx_wdt_cpld_value, control_register);
+}
+
+static inline void ts72xx_wdt_disable(void)
+{
+       __raw_writew(0x05, feed_register);
+       __raw_writew(0, control_register);
+}
+
+static inline void ts72xx_parse_timeout(int value)
+{
+       unsigned char cpld_value = 0x7;
+       int i;
+
+       if ((value > 8000) || (value < 250)) {
+               timeout = WATCHDOG_TIMEOUT;
+               printk(KERN_INFO PFX "Timeout value out of range, set to %d\n", 
timeout);
+       } else {
+               for (i = 0; i < 6; i++) {
+                       if (value >= ts72xx_wdt_times[i]) {
+                               timeout = ts72xx_wdt_times[i+6];
+
+                               if (value != timeout)
+                                       printk(KERN_INFO PFX "Timeout value 
rounded to %d\n", timeout);
+
+                               if (i >= 3) /* cpld_value can't be 4 */
+                                       i++;
+
+                               cpld_value = 7 - i;
+                               break;
+                       }
+               }
+       }
+
+       ts72xx_wdt_cpld_value = cpld_value;
+}
+
+static ssize_t ts72xx_wdt_write(struct file *file, const char __user *buf,
+                                size_t count, loff_t *ppos)
+{
+       /* Can't seek (pwrite) on this device */
+       if (*ppos != file->f_pos)
+               return -ESPIPE;
+
+       if (count) {
+               if (!nowayout) {
+                       size_t i;
+
+                       clear_bit(WDT_OK_TO_CLOSE, &ts72xx_wdt_status);
+
+                       for (i = 0; i != count; i++) {
+                               char c;
+
+                               if (get_user(c, buf + i))
+                                       return -EFAULT;
+
+                               if (c == 'V')
+                                       set_bit(WDT_OK_TO_CLOSE, 
&ts72xx_wdt_status);
+                               else
+                                       clear_bit(WDT_OK_TO_CLOSE, 
&ts72xx_wdt_status);
+                       }
+               }
+               ts72xx_wdt_ping();
+       }
+
+       return count;
+}
+
+static int ts72xx_wdt_ioctl(struct inode *inode, struct file *file,
+                            unsigned int cmd, unsigned long arg)
+{
+       int new_margin;
+       int ret = -ENOIOCTLCMD;
+
+       static struct watchdog_info ident = {
+               .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | 
WDIOF_MAGICCLOSE,
+               .firmware_version = 1,
+               .identity = "TS-72xx Watchdog",
+       };
+
+       switch (cmd) {
+               case WDIOC_GETSUPPORT:
+                       ret = copy_to_user((struct watchdog_info __user *)arg, 
&ident,
+                       sizeof(ident)) ? -EFAULT : 0;
+                       break;
+
+               case WDIOC_GETSTATUS:
+               case WDIOC_GETBOOTSTATUS:
+                       ret = put_user(0, (int __user *)arg);
+                       break;
+
+               case WDIOC_KEEPALIVE:
+                       ts72xx_wdt_ping();
+                       ret = 0;
+                       break;
+
+               case WDIOC_SETTIMEOUT:
+                       if (get_user(new_margin, (int __user *)arg))
+                               return -EFAULT;
+
+                       ts72xx_parse_timeout(new_margin);
+                       ts72xx_wdt_enable();
+                       /* Fall */
+
+               case WDIOC_GETTIMEOUT:
+                       ret = put_user(timeout, (int __user *)arg);
+                       break;
+       }
+
+       return ret;
+}
+
+static int ts72xx_wdt_open(struct inode *inode, struct file *file)
+{
+       if (test_and_set_bit(WDT_IN_USE, &ts72xx_wdt_status))
+               return -EBUSY;
+
+       if (nowayout) {
+               __module_get(THIS_MODULE);
+       }
+
+       ts72xx_wdt_enable();
+       ts72xx_wdt_ping();
+
+       return nonseekable_open(inode, file);
+}
+
+static int ts72xx_wdt_close(struct inode *inode, struct file *file)
+{
+       if (test_bit(WDT_OK_TO_CLOSE, &ts72xx_wdt_status))
+               ts72xx_wdt_disable();
+       else
+               printk(KERN_CRIT PFX "Device file closed unexpectedly. "
+                      "Will not stop the WDT!\n");
+
+       clear_bit(WDT_IN_USE, &ts72xx_wdt_status);
+
+       return 0;
+}
+
+/*
+ *     Kernel Interfaces
+ */
+
+static struct file_operations ts72xx_wdt_fops = {
+       .owner          = THIS_MODULE,
+       .llseek         = no_llseek,
+       .write          = ts72xx_wdt_write,
+       .ioctl          = ts72xx_wdt_ioctl,
+       .open           = ts72xx_wdt_open,
+       .release        = ts72xx_wdt_close,
+};
+
+static struct miscdevice ts72xx_wdt_miscdev = {
+       .minor = WATCHDOG_MINOR,
+       .name = "watchdog",
+       .fops = &ts72xx_wdt_fops,
+};
+
+static void ts72xx_wdt_shutdown(struct platform_device *dev)
+{
+       ts72xx_wdt_disable();
+}
+
+static int __devinit ts72xx_wdt_probe(struct platform_device *dev)
+{
+       struct resource *r;
+       int ret;
+
+       if (!machine_is_ts72xx())
+               return -ENODEV;
+
+       r = platform_get_resource(dev, IORESOURCE_MEM, 0);
+
+       if (!r) {
+               ret = -ENODEV;
+               goto err_out;
+       }
+
+       control_register = ioremap(r->start, r->end - r->start + 1);
+
+       if (control_register == NULL) {
+               ret = -ENOMEM;
+               goto err_out;
+       }
+
+       r = platform_get_resource(dev, IORESOURCE_MEM, 1);
+
+       if (!r) {
+               ret = -ENODEV;
+               goto err_unmap1;
+       }
+
+       feed_register = ioremap(r->start, r->end - r->start + 1);
+
+       if (feed_register == NULL) {
+               ret = -ENOMEM;
+               goto err_unmap1;
+       }
+
+       ret = misc_register(&ts72xx_wdt_miscdev);
+       if (ret) {
+               printk(KERN_ERR PFX "cannot register miscdev on minor=%d "
+                      "(err=%d)\n", WATCHDOG_MINOR, ret);
+               goto err_unmap2;
+       }
+
+       printk(KERN_INFO PFX "TS-72xx watchdog driver, v%s\n", 
WATCHDOG_VERSION);
+       ts72xx_parse_timeout(timeout);
+
+       return 0;
+
+err_unmap2:
+       iounmap(feed_register);
+err_unmap1:
+       iounmap(control_register);
+err_out:
+       return ret;
+}
+
+static int __devexit ts72xx_wdt_remove(struct platform_device *dev)
+{
+       misc_deregister(&ts72xx_wdt_miscdev);
+       iounmap(feed_register);
+       iounmap(control_register);
+
+       return 0;
+}
+
+static struct platform_driver ts72xx_wdt_driver = {
+       .probe          = ts72xx_wdt_probe,
+       .remove         = __devexit_p(ts72xx_wdt_remove),
+       .shutdown       = ts72xx_wdt_shutdown,
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "ts72xx-wdt",
+       },
+};
+
+static int __init ts72xx_wdt_init(void)
+{
+       return platform_driver_register(&ts72xx_wdt_driver);
+}
+
+static void __exit ts72xx_wdt_exit(void)
+{
+       platform_driver_unregister(&ts72xx_wdt_driver);
+}
+
+module_init(ts72xx_wdt_init);
+module_exit(ts72xx_wdt_exit);
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started 
(default=CONFIG_WATCHDOG_NOWAYOUT)");
+#endif
+
+module_param(timeout, int, 0);
+MODULE_PARM_DESC(timeout,"Watchdog timeout in milliseconds (250..8000, 
default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
+
+MODULE_AUTHOR("Matthieu Crapet <>");
+MODULE_DESCRIPTION("TS-72xx watchdog driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff -Naurp linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/memory.h 
linux-2.6.24.4/include/asm-arm/arch-ep93xx/memory.h
--- linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/memory.h    2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/include/asm-arm/arch-ep93xx/memory.h 2008-03-29 
11:24:41.000000000 +0100
@@ -1,14 +1,225 @@
 /*
- * linux/include/asm-arm/arch-ep93xx/memory.h
+ *  linux/include/asm-arm/arch-ep93xx/memory.h
+ *
+ *  ******************************************************
+ *     *    CONFUSED?  Read Documentation/IO-mapping.txt        *
+ *  ******************************************************
+ *
+ *
+ *  Copyright (C) 1999 ARM Limited
+ *  Copyright (C) 2002-2003 Cirrus Logic Corp.
+ *
+ * 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
  */
-
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET            UL(0x00000000)
+/*
+ * For EP93xx, SDRAM can be discontiguous, in a set number of blocks
+ * of equal size and (usually) equal spacing.  The 9301 spacing isn't equal.
+ *
+ * SDRAM_START is the physical address of the start of SDRAM.
+ * SDRAM_NUMBER_OF_BLOCKS = # of blocks of SDRAM.
+ * Each block is of size SDRAM_BLOCK_SIZE and starts at a boundary
+ * of SDRAM_BLOCK_START_BOUNDARY.
+ *
+ * So memory blocks are at:
+ *  SDRAM_START
+ *  SDRAM_START + SDRAM_BLOCK_START_BOUNDARY
+ *  SDRAM_START + (SDRAM_BLOCK_START_BOUNDARY * 2)
+ *  SDRAM_START + (SDRAM_BLOCK_START_BOUNDARY * 3)
+ *  so on
+ */
 
-#define __bus_to_virt(x)       __phys_to_virt(x)
-#define __virt_to_bus(x)       __virt_to_phys(x)
+#ifndef CONFIG_DISCONTIGMEM
 
+/*
+ * Single 32Meg block of physical memory physically located at 0 .
+ */
+#define SDRAM_START                         0x00000000
+#define SDRAM_NUMBER_OF_BLOCKS              1
+#define SDRAM_BLOCK_SIZE                    0x02000000
+#define SDRAM_BLOCK_START_BOUNDARY          0x00000000
+
+#else /* CONFIG_DISCONTIGMEM */
+
+#ifdef CONFIG_ARCH_EP9301
+
+/*
+ * The 9301 memory map doesn't have regular gaps because two
+ * address pins aren't connected - see asm-arm/mach-ep93xx/arch.c to
+ * see how it is.
+ */
+#define SDRAM_START                         0x00000000
+#define SDRAM_NUMBER_OF_BLOCKS              4
+#define SDRAM_BLOCK_SIZE                    0x00800000
+#define SDRAM_BLOCK_START_BOUNDARY          0x01000000
+
+#else /* CONFIG_ARCH_EP9312 or CONFIG_ARCH_EP9315 */
+
+/*
+ * 2 32Meg blocks that are located physically at 0 and 64Meg.
+ */
+#define SDRAM_START                         0x00000000
+#define SDRAM_NUMBER_OF_BLOCKS              2
+#define SDRAM_BLOCK_SIZE                    0x02000000
+#define SDRAM_BLOCK_START_BOUNDARY          0x04000000
 
 #endif
+
+/*
+ * Here we are assuming EP93xx is configured to have two 32MB SDRAM
+ * areas with 32MB of empty space between them.  So use 24 for the node
+ * max shift to get 64MB node sizes.
+ */
+#define NODE_MAX_MEM_SHIFT     26
+#define NODE_MAX_MEM_SIZE      (1<<NODE_MAX_MEM_SHIFT)
+
+#endif /* CONFIG_DISCONTIGMEM */
+
+
+/*
+ * MEM_SIZE and PHYS_OFFSET are used to set size of SDRAM for
+ * initial page table in arch/arm/kernel/setup.c
+ * For ep93xx, PHYS_OFFSET is set to be SDRAM_START.
+ */
+#define MEM_SIZE                            (SDRAM_BLOCK_SIZE)
+
+/*
+ * Task size: 2GB (from 0 to base of IO in virtual space)
+ */
+#define TASK_SIZE              UL(0x80000000)
+/*  HASH define TASK_SIZE_26   (0x04000000UL) */
+
+/*
+ * This decides where the kernel will search for a free chunk of vm
+ * space during mmap's.
+ */
+#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
+
+/*
+ * Page offset: 3GB (start of kernel memory in virtual space)
+ * Phys offset: 0   (start of kernel memory in physical space)
+ */
+#define PAGE_OFFSET            UL(0xC0000000)
+#define PHYS_OFFSET            (SDRAM_START)
+
+#ifndef __ASSEMBLY__
+/*
+ * Given a page frame number, convert it to a node id.
+ */
+static inline unsigned long PFN_TO_NID(unsigned long pfn) {
+       unsigned long block = (pfn >> 12);
+
+       switch(block) {
+       case 0x0:
+               return 0;
+       case 0x1:
+               return 1;
+       case 0x2:
+               return 2;
+       case 0x3:
+               return 3;
+       case 0x4:
+               return 4;
+       case 0x5:
+               return 5;
+       case 0x6:
+               return 6;
+       case 0x7:
+               return 7;
+       case 0xc0:
+               return 8;
+       case 0xc1:
+               return 9;
+       case 0xc4:
+               return 10;
+       case 0xc5:
+               return 11;
+       case 0xd0:
+               return 12;
+       case 0xd1:
+               return 13;
+       case 0xd4:
+               return 14;
+       case 0xd5:
+               return 15;
+       case 0xe0:
+               return 16;
+       case 0xe1:
+               return 17;
+       case 0xe4:
+               return 18;
+       case 0xe5:
+               return 19;
+       default:
+               return 0xff;
+       }
+}
+#endif
+
+/*
+ * Virtual view <-> DMA view memory address translations
+ * virt_to_bus: Used to translate the virtual address to an
+ *              address suitable to be passed to set_dma_addr
+ * bus_to_virt: Used to convert an address for DMA operations
+ *              to an address that the kernel can use.
+ */
+#define __virt_to_bus__is_a_macro
+#define __virt_to_bus(x)        __virt_to_phys(x)
+
+#define __bus_to_virt__is_a_macro
+#define __bus_to_virt(x)        __phys_to_virt(x)
+
+
+/*
+ * Note that this file is included by include/asm-arm/memory.h so
+ * the macros in this file have to play nice with those.
+ */
+#ifdef CONFIG_DISCONTIGMEM
+
+/*
+ * Given a kernel address, find the home node of the underlying memory.
+ */
+#define KVADDR_TO_NID(addr) \
+               ((unsigned long)(PFN_TO_NID(__virt_to_phys((unsigned long)addr) 
>> PAGE_SHIFT)))
+
+/*
+ * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
+ * and returns the mem_map of that node.
+ */
+#define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID((unsigned 
long)(kaddr)))
+
+#define PFN_TO_MAPBASE(pfn)    NODE_MEM_MAP(PFN_TO_NID(pfn))
+
+/*
+ * Given a kaddr, LOCAL_MAR_NR finds the owning node of the memory
+ * and returns the index corresponding to the appropriate page in the
+ * node's mem_map.
+ */
+
+
+#define LOCAL_MAP_NR(kaddr)                                    \
+       (((unsigned long)(kaddr) & (0xffffffUL)) >> PAGE_SHIFT)
+
+
+
+
+
+
+#endif /* CONFIG_DISCONTIGMEM */
+
+#endif
+
diff -Naurp linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/platform.h 
linux-2.6.24.4/include/asm-arm/arch-ep93xx/platform.h
--- linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/platform.h  2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/include/asm-arm/arch-ep93xx/platform.h       2008-03-30 
12:47:35.000000000 +0200
@@ -10,6 +10,12 @@ void ep93xx_init_time(unsigned long);
 void ep93xx_init_devices(void);
 extern struct sys_timer ep93xx_timer;
 
+struct ep93xx_i2c_pins
+{
+  unsigned long sda_pin;
+  unsigned long scl_pin;
+};
+
 struct ep93xx_eth_data
 {
        unsigned char   dev_addr[6];
diff -Naurp linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/ts72xx.h 
linux-2.6.24.4/include/asm-arm/arch-ep93xx/ts72xx.h
--- linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/ts72xx.h    2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/include/asm-arm/arch-ep93xx/ts72xx.h 2008-04-05 
16:11:23.000000000 +0200
@@ -14,6 +14,10 @@
  * febfa000    [67]0800000     4K      NAND busy register
  * febf9000    10800000        4K      TS-5620 RTC index register
  * febf8000    11700000        4K      TS-5620 RTC data register
+ * febf7000 23800000  4K  CPLD watchdog (control register)
+ * febf6000 23c00000  4K  CPLD watchdog (feed register)
+ * febf5000 11e00000  4K  PC/104 8-bit I/O
+ * febf4000 11a00000 1MB  PC/104 8-bit memory
  */
 
 #define TS72XX_MODEL_PHYS_BASE         0x22000000
@@ -68,6 +72,33 @@
 #define TS72XX_RTC_DATA_PHYS_BASE      0x11700000
 #define TS72XX_RTC_DATA_SIZE           0x00001000
 
+#define TS72XX_WATCHDOG_CONTROL_VIRT_BASE  0xfebf7000
+#define TS72XX_WATCHDOG_CONTROL_PHYS_BASE  0x23800000
+#define TS72XX_WATCHDOG_CONTROL_SIZE  0x00001000
+
+#define TS72XX_WATCHDOG_FEED_VIRT_BASE  0xfebf6000
+#define TS72XX_WATCHDOG_FEED_PHYS_BASE  0x23c00000
+#define TS72XX_WATCHDOG_FEED_SIZE  0x00001000
+
+#define TS72XX_PC104_8BIT_IO_VIRT_BASE  0xfebf5000
+#define TS72XX_PC104_8BIT_IO_PHYS_BASE  0x11e00000
+#define TS72XX_PC104_8BIT_IO_SIZE       0x00001000
+#define TS72XX_PC104_8BIT_MEM_VIRT_BASE 0xfea00000
+#define TS72XX_PC104_8BIT_MEM_PHYS_BASE 0x11a00000
+#define TS72XX_PC104_8BIT_MEM_SIZE      0x00100000
+
+/*
+ * TS7200 CF memory map:
+ *
+ * phys                size    description
+ * 11000000    7       CF registers (8-bit each), starting at 11000001
+ * 10400006    2       CF aux registers (8-bit)
+ * 21000000    2       CF data register (16-bit)
+ */
+
+#define TS7200_CF_CMD_PHYS_BASE  0x11000000
+#define TS7200_CF_AUX_PHYS_BASE  0x10400006
+#define TS7200_CF_DATA_PHYS_BASE 0x21000000
 
 #ifndef __ASSEMBLY__
 #include <asm/io.h>
diff -Naurp linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/uncompress.h 
linux-2.6.24.4/include/asm-arm/arch-ep93xx/uncompress.h
--- linux-2.6.24.4-orig/include/asm-arm/arch-ep93xx/uncompress.h        
2008-03-24 19:49:18.000000000 +0100
+++ linux-2.6.24.4/include/asm-arm/arch-ep93xx/uncompress.h     2007-11-16 
00:25:00.000000000 +0100
@@ -77,9 +77,74 @@ static void ethernet_reset(void)
 }
 
 
+/*
+ * We don't have clock management for the UARTs (amba-pl010)
+ * yet, so hackily enable all UART clocks here for now.
+ */
+#define PHYS_SYSCON_DEVICE_CONFIG      0x80930080
+#define PHYS_SYSCON_SWLOCK             0x809300c0
+
+static void enable_all_uart_clocks(void)
+{
+       unsigned int v;
+
+       v = __raw_readl(PHYS_SYSCON_DEVICE_CONFIG);
+       __raw_writel(0xaa, PHYS_SYSCON_SWLOCK);
+       __raw_writel(v | 0x01140000, PHYS_SYSCON_DEVICE_CONFIG);
+}
+
+
+/*
+ * Some bootloaders don't turn on the UARTBAUD bit, which means that
+ * the UARTs will be running off a divided 7.3728 MHz clock instead of
+ * the 14.7456 MHz peripheral clock when linux boots.
+ *
+ * We detect that condition here and fix it by turning on UARTBAUD, and
+ * then reprogramming the divisors on all enabled UARTs to twice what
+ * they were before we turned UARTBAUD on, to preserve the programmed
+ * baud rate.
+ */
+#define PHYS_SYSCON_CLOCK_CONTROL      0x80930004
+#define SYSCON_CLOCK_UARTBAUD          0x20000000
+#define PHYS_UART1_BASE                        0x808c0000
+#define PHYS_UART2_BASE                        0x808d0000
+#define PHYS_UART3_BASE                        0x808e0000
+
+static void uart_divisor_times_two(unsigned int base)
+{
+       u16 divisor;
+
+       divisor = __raw_readb(base + 0x0c) << 8;
+       divisor |= __raw_readb(base + 0x10);
+       if (divisor) {
+               divisor = (2 * (divisor + 1)) - 1;
+               __raw_writeb(divisor >> 8, base + 0x0c);
+               __raw_writeb(divisor & 0xff, base + 0x10);
+               __raw_writeb(__raw_readb(base + 0x08), base + 0x08);
+       }
+}
+
+static void fix_uart_base(void)
+{
+       unsigned int v;
+
+       v = __raw_readl(PHYS_SYSCON_CLOCK_CONTROL);
+       if ((v & SYSCON_CLOCK_UARTBAUD) == 0) {
+               v |= SYSCON_CLOCK_UARTBAUD;
+               __raw_writel(v, PHYS_SYSCON_CLOCK_CONTROL);
+
+               uart_divisor_times_two(PHYS_UART1_BASE);
+               uart_divisor_times_two(PHYS_UART2_BASE);
+               uart_divisor_times_two(PHYS_UART3_BASE);
+       }
+}
+
+
 static void arch_decomp_setup(void)
 {
        ethernet_reset();
+       enable_all_uart_clocks();
+       fix_uart_base();
 }
 
 #define arch_decomp_wdog()
diff -Naurp linux-2.6.24.4-orig/include/asm-arm/memory.h 
linux-2.6.24.4/include/asm-arm/memory.h
--- linux-2.6.24.4-orig/include/asm-arm/memory.h        2008-03-24 
19:49:18.000000000 +0100
+++ linux-2.6.24.4/include/asm-arm/memory.h     2008-03-29 11:25:35.000000000 
+0100
@@ -262,7 +262,8 @@ static inline __deprecated void *bus_to_
  * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
  * and returns the mem_map of that node.
  */
-#define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr))
+// Crude hack: see include/asm-arm/arch-ep93xx/memory.h
+//#define ADDR_TO_MAPBASE(kaddr)       NODE_MEM_MAP(KVADDR_TO_NID(kaddr))
 
 /*
  * Given a page frame number, find the owning node of the memory
diff -Naurp linux-2.6.24.4-orig/Makefile linux-2.6.24.4/Makefile
--- linux-2.6.24.4-orig/Makefile        2008-03-24 19:49:18.000000000 +0100
+++ linux-2.6.24.4/Makefile     2008-03-28 21:33:50.000000000 +0100
@@ -190,8 +190,11 @@ SUBARCH := $(shell uname -m | sed -e s/i
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
 
-ARCH           ?= $(SUBARCH)
-CROSS_COMPILE  ?=
+#ARCH          ?= $(SUBARCH)
+#CROSS_COMPILE ?=
+ARCH           ?= arm
+CROSS_COMPILE  ?= 
/home/matt/TS-7200/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
+
 
 # Architecture as present in compile.h
 UTS_MACHINE    := $(ARCH)
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU