Psion patch for linux/arch/arm files

This patch contains updates to the following files:
./arch/arm/Makefile
./arch/arm/config.in
./arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb
./arch/arm/kernel/Makefile
./arch/arm/kernel/debug-armv.S
./arch/arm/kernel/entry-armv.S
./arch/arm/kernel/irq.c
./arch/arm/kernel/psionw_pm.c
./arch/arm/lib/Makefile
./arch/arm/lib/psionwfiqs.S
./arch/arm/mach-psionw/Makefile
./arch/arm/mach-psionw/irq.c
./arch/arm/mach-psionw/mm.c
./arch/arm/mach-psionw/psionw-arch.c
./arch/arm/mach-psionw/psionw-hardware.c
./arch/arm/mach-psionw/psionw-leds.c
./arch/arm/mach-psionw/psionw-power.c
./arch/arm/mach-psionw/psionw-time.c
./arch/arm/mach-psionw/serial-debug.c
./arch/arm/mm/init.c


diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/Makefile linux-2.4.19-rmk2/arch/arm/Makefile
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/Makefile linux-2.4.19-rmk2/arch/arm/Makefile
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/Makefile	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/Makefile	2002-10-02 22:07:30.000000000 -0700
@@ -152,6 +152,11 @@
 TEXTADDR	 = 0xc0208000
 endif
 
+ifeq ($(CONFIG_ARCH_PSIONW),y)
+TEXTADDR         = 0xc0048000
+MACHINE          = psionw
+endif
+
 ifeq ($(CONFIG_ARCH_ANAKIN),y)
 MACHINE		 = anakin
 endif
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/config.in linux-2.4.19-rmk2/arch/arm/config.in
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/config.in linux-2.4.19-rmk2/arch/arm/config.in
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/config.in	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/config.in	2002-10-02 22:07:30.000000000 -0700
@@ -44,6 +44,7 @@
 	 Integrator		CONFIG_ARCH_INTEGRATOR \
 	 LinkUp-L7200		CONFIG_ARCH_L7200 \
 	 Motorola-MX1ADS        CONFIG_ARCH_MX1ADS \
+	 Psion-Windermere	CONFIG_ARCH_PSIONW \
 	 RiscPC			CONFIG_ARCH_RPC \
 	 RiscStation		CONFIG_ARCH_RISCSTATION \
 	 SA1100-based		CONFIG_ARCH_SA1100 \
@@ -163,6 +164,18 @@
 fi
 endmenu
 
+if [ "$CONFIG_ARCH_PSIONW" = "y" ]; then
+mainmenu_option next_comment
+comment 'Psion Windermere Implementations'
+choice 'Psion-Windermere Implementations'                    \
+        "Psion-5MX-16MB-and-Ericsson-MC218 CONFIG_PSIONW_5MX \
+         Psion-5MX-Pro-24MB CONFIG_PSIONW_5MXPRO24MB         \
+         Psion-5MX-Pro-32MB CONFIG_PSIONW_5MXPRO32MB         \
+         Psion-Revo-8MB CONFIG_PSIONW_REVO                   \
+         Psion-Revo-Plus-16MB-and-Diamond-Mako CONFIG_PSIONW_REVOPLUS" CONFIG_PSIONW_5MX
+endmenu
+fi
+
 # Definitions to make life easier
 if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \
      "$CONFIG_ARCH_RPC" = "y" ]; then
@@ -260,6 +273,7 @@
 
 # ARM720T
 if [ "$CONFIG_ARCH_CLPS711X" = "y" -o \
+     "$CONFIG_ARCH_PSIONW" = "y" -o \
      "$CONFIG_ARCH_L7200"    = "y" -o \
      "$CONFIG_ARCH_CDB89712" = "y" ]; then
    define_bool CONFIG_CPU_ARM720T y
@@ -374,6 +388,7 @@
 
 # Select various configuration options depending on the machine type
 if [ "$CONFIG_ARCH_EDB7211" = "y" -o \
+     "$CONFIG_ARCH_PSIONW" = "y" -o \
      "$CONFIG_ARCH_SA1100" = "y" ]; then
    define_bool CONFIG_DISCONTIGMEM y
 else
@@ -468,6 +483,7 @@
      "$CONFIG_ARCH_SHARK" = "y" -o      \
      "$CONFIG_ARCH_CO285" = "y" -o      \
      "$CONFIG_ARCH_SA1100" = "y" -o     \
+     "$CONFIG_ARCH_PSIONW" = "y" -o     \
      "$CONFIG_ARCH_INTEGRATOR" = "y" -o \
      "$CONFIG_ARCH_CDB89712" = "y" -o   \
      "$CONFIG_ARCH_P720T" = "y" ]; then
@@ -478,6 +494,7 @@
 	   "$CONFIG_ARCH_SHARK" = "y" -o      \
 	   "$CONFIG_ARCH_CO285" = "y" -o      \
 	   "$CONFIG_ARCH_SA1100" = "y" -o     \
+	   "$CONFIG_ARCH_PSIONW" = "y" -o     \
            "$CONFIG_ARCH_INTEGRATOR" = "y" -o \
 	   "$CONFIG_ARCH_P720T" = "y" ]; then
          bool '  Timer LED' CONFIG_LEDS_TIMER
@@ -555,7 +572,8 @@
 fi
 endmenu
 
-if [ "$CONFIG_ARCH_CLPS711X" = "y" ]; then
+if [ "$CONFIG_ARCH_CLPS711X" = "y" -o \
+     "$CONFIG_ARCH_PSIONW" = "y" ]; then
    source drivers/ssi/Config.in
 fi
 
@@ -633,6 +651,7 @@
      "$CONFIG_ARCH_TBOX" = "y" -o \
      "$CONFIG_ARCH_SHARK" = "y" -o \
      "$CONFIG_ARCH_SA1100" = "y" -o \
+     "$CONFIG_ARCH_PSIONW" = "y" -o \
      "$CONFIG_PCI" = "y" ]; then
    mainmenu_option next_comment
    comment 'Sound'
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb linux-2.4.19-rmk2/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb linux-2.4.19-rmk2/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,977 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+# CONFIG_GENERIC_BUST_SPINLOCK is not set
+# CONFIG_GENERIC_ISA_DMA is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_OBSOLETE is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODVERSIONS=y
+CONFIG_KMOD=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_ANAKIN is not set
+# CONFIG_ARCH_ARCA5K 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_CAMELOT is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_MX1ADS is not set
+CONFIG_ARCH_PSIONW=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_SHARK is not set
+
+#
+# Archimedes/A5000 Implementations
+#
+
+#
+# Archimedes/A5000 Implementations (select only ONE)
+#
+# CONFIG_ARCH_ARC is not set
+# CONFIG_ARCH_A5K is not set
+
+#
+# Footbridge Implementations
+#
+# CONFIG_ARCH_CATS is not set
+# CONFIG_ARCH_PERSONAL_SERVER is not set
+# CONFIG_ARCH_EBSA285_ADDIN is not set
+# CONFIG_ARCH_EBSA285_HOST is not set
+# CONFIG_ARCH_NETWINDER is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_ASSABET_NEPONSET is not set
+# CONFIG_SA1100_ADSBITSY is not set
+# CONFIG_SA1100_BRUTUS is not set
+# CONFIG_SA1100_CERF is not set
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_H3XXX is not set
+# CONFIG_SA1100_EXTENEX1 is not set
+# CONFIG_SA1100_FLEXANET is not set
+# CONFIG_SA1100_FREEBIRD is not set
+# CONFIG_SA1100_FRODO is not set
+# CONFIG_SA1100_GRAPHICSCLIENT is not set
+# CONFIG_SA1100_GRAPHICSMASTER is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_HUW_WEBPANEL is not set
+# CONFIG_SA1100_ITSY is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_NANOENGINE is not set
+# CONFIG_SA1100_OMNIMETER is not set
+# CONFIG_SA1100_PANGOLIN is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_PT_SYSTEM3 is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SHERMAN is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_PFS168 is not set
+# CONFIG_SA1100_VICTOR is not set
+# CONFIG_SA1100_XP860 is not set
+# CONFIG_SA1100_YOPY is not set
+# CONFIG_SA1100_USB is not set
+# CONFIG_SA1100_USB_NETLINK is not set
+# CONFIG_SA1100_USB_CHAR is not set
+# CONFIG_H3600_SLEEVE is not set
+
+#
+# CLPS711X/EP721X Implementations
+#
+# CONFIG_ARCH_AUTCPU12 is not set
+# CONFIG_ARCH_CDB89712 is not set
+# CONFIG_ARCH_CLEP7312 is not set
+# CONFIG_ARCH_EDB7211 is not set
+# CONFIG_ARCH_P720T is not set
+# CONFIG_ARCH_FORTUNET is not set
+# CONFIG_ARCH_EP7211 is not set
+# CONFIG_ARCH_EP7212 is not set
+
+#
+# Psion Windermere Implementations
+#
+CONFIG_PSIONW_5MX=y
+# CONFIG_PSIONW_5MXPRO24MB is not set
+# CONFIG_PSIONW_5MXPRO32MB is not set
+# CONFIG_PSIONW_REVO is not set
+# CONFIG_PSIONW_REVOPLUS is not set
+# CONFIG_ARCH_ACORN is not set
+# CONFIG_FOOTBRIDGE is not set
+# CONFIG_FOOTBRIDGE_HOST is not set
+# CONFIG_FOOTBRIDGE_ADDIN is not set
+CONFIG_CPU_32=y
+# CONFIG_CPU_26 is not set
+
+#
+# Processor Type
+#
+# CONFIG_CPU_32v3 is not set
+# CONFIG_CPU_32v4 is not set
+# CONFIG_CPU_ARM610 is not set
+# CONFIG_CPU_ARM710 is not set
+CONFIG_CPU_ARM720T=y
+# CONFIG_CPU_ARM920T is not set
+# CONFIG_CPU_ARM922T is not set
+# CONFIG_CPU_ARM926T is not set
+# CONFIG_CPU_ARM1020 is not set
+# CONFIG_CPU_SA110 is not set
+# CONFIG_CPU_SA1100 is not set
+CONFIG_ARM_THUMB=y
+CONFIG_DISCONTIGMEM=y
+
+#
+# General setup
+#
+# CONFIG_PCI is not set
+# CONFIG_ISA is not set
+# CONFIG_ISA_DMA is not set
+# CONFIG_ZBOOT_ROM is not set
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_HOTPLUG=y
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=y
+# CONFIG_I82092 is not set
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+# CONFIG_PCMCIA_CLPS6700 is not set
+# CONFIG_PCMCIA_SA1100 is not set
+CONFIG_PCMCIA_ETNA=y
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+
+#
+# At least one math emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_PM is not set
+# CONFIG_ARTHUR is not set
+CONFIG_CMDLINE="dummy=dummy"
+CONFIG_LEDS=y
+CONFIG_LEDS_TIMER=y
+CONFIG_LEDS_CPU=y
+# CONFIG_ALIGNMENT_TRAP is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# 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_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+
+#
+#  
+#
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_ARM_AM79C961A is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+CONFIG_NET_POCKET=y
+# CONFIG_DE600 is not set
+# CONFIG_DE620 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=y
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=y
+CONFIG_PPP_BSDCOMP=y
+# CONFIG_PPPOE is not set
+CONFIG_SLIP=y
+CONFIG_SLIP_COMPRESSED=y
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# PCMCIA network device support
+#
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_ARCNET_COM20020_CS is not set
+# CONFIG_PCMCIA_IBMTR is not set
+# CONFIG_NET_PCMCIA_RADIO is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=y
+CONFIG_IRNET=y
+CONFIG_IRCOMM=y
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=y
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_DONGLE is not set
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_FIR is not set
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_BLK_DEV_IDEDISK_VENDOR is not set
+# CONFIG_BLK_DEV_IDEDISK_FUJITSU is not set
+# CONFIG_BLK_DEV_IDEDISK_IBM is not set
+# CONFIG_BLK_DEV_IDEDISK_MAXTOR is not set
+# CONFIG_BLK_DEV_IDEDISK_QUANTUM is not set
+# CONFIG_BLK_DEV_IDEDISK_SEAGATE is not set
+# CONFIG_BLK_DEV_IDEDISK_WD is not set
+# CONFIG_BLK_DEV_COMMERIAL is not set
+# CONFIG_BLK_DEV_TIVO is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_ISAPNP is not set
+# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_ATARAID is not set
+# CONFIG_BLK_DEV_ATARAID_PDC is not set
+# CONFIG_BLK_DEV_ATARAID_HPT is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Synchronous Serial Interface
+#
+CONFIG_SSI=y
+
+#
+# SSI Bus Drivers
+#
+# CONFIG_SSI_CLPS711X is not set
+CONFIG_SSI_PS5MX=y
+
+#
+# SSI Device Drivers
+#
+# CONFIG_SSI_JUNO is not set
+CONFIG_SSI_ADC7843=y
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+# CONFIG_INPUT_KEYBDEV is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_SERIAL is not set
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_ANAKIN is not set
+# CONFIG_SERIAL_ANAKIN_CONSOLE is not set
+# CONFIG_SERIAL_AMBA is not set
+# CONFIG_SERIAL_AMBA_CONSOLE is not set
+# CONFIG_SERIAL_CLPS711X is not set
+# CONFIG_SERIAL_CLPS711X_CONSOLE is not set
+CONFIG_SERIAL_PSIONW=y
+CONFIG_SERIAL_PSIONW_CONSOLE=y
+# CONFIG_SERIAL_21285 is not set
+# CONFIG_SERIAL_21285_OLD is not set
+# CONFIG_SERIAL_21285_CONSOLE is not set
+# CONFIG_SERIAL_UART00 is not set
+# CONFIG_SERIAL_UART00_CONSOLE is not set
+# CONFIG_SERIAL_SA1100 is not set
+# CONFIG_SERIAL_SA1100_CONSOLE is not set
+# CONFIG_SERIAL_8250 is not set
+# CONFIG_SERIAL_8250_CONSOLE is not set
+# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+# CONFIG_SERIAL_8250_SHARE_IRQ is not set
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_MULTIPORT is not set
+# CONFIG_SERIAL_8250_HUB6 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+
+#
+# Psion Windermere Keyboard Locale
+#
+# CONFIG_PSION_KBD_DE is not set
+CONFIG_PSION_KBD_UK=y
+# CONFIG_PSION_KBD_US is not set
+CONFIG_PROCFS_PSION=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+# CONFIG_L3_ALGOBIT is not set
+# CONFIG_L3_BIT_SA1100_GPIO is not set
+
+#
+# Other L3 adapters
+#
+# CONFIG_L3_SA1111 is not set
+# CONFIG_BIT_SA1100_GPIO is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_GAMEPORT is not set
+
+#
+# Input core support is needed for gameports
+#
+
+#
+# Input core support is needed for joysticks
+#
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+
+#
+# PCMCIA character devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+# CONFIG_UMSDOS_FS is not set
+CONFIG_VFAT_FS=y
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_TMPFS is not set
+# CONFIG_RAMFS is not set
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_ROOT_NFS is not set
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+# CONFIG_ZLIB_FS_INFLATE is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_SMB_NLS is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# 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_ISO8859_1 is not set
+# 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
+
+#
+# Console drivers
+#
+# CONFIG_VGA_CONSOLE is not set
+
+#
+# Frame-buffer support
+#
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_ACORN is not set
+# CONFIG_FB_ANAKIN is not set
+# CONFIG_FB_CLPS711X is not set
+CONFIG_FB_PSIONW=y
+# CONFIG_FB_SA1100 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FBCON_ADVANCED=y
+CONFIG_FBCON_MFB=y
+CONFIG_FBCON_CFB2=y
+CONFIG_FBCON_CFB4=y
+# CONFIG_FBCON_CFB8 is not set
+# CONFIG_FBCON_CFB16 is not set
+# CONFIG_FBCON_CFB24 is not set
+# CONFIG_FBCON_CFB32 is not set
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA_PLANES is not set
+# CONFIG_FBCON_VGA is not set
+# CONFIG_FBCON_HGA is not set
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+CONFIG_FBCON_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_MIDI_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_MIDI_VIA82CXXX is not set
+CONFIG_SOUND_PSIONW=y
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_WAVEARTIST is not set
+# CONFIG_SOUND_TVMIXER is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP is not set
+# CONFIG_MCP_SA1100 is not set
+# CONFIG_MCP_UCB1200 is not set
+# CONFIG_MCP_UCB1200_AUDIO is not set
+# CONFIG_MCP_UCB1200_TS is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# USB Controllers
+#
+# CONFIG_USB_UHCI is not set
+# CONFIG_USB_UHCI_ALT is not set
+# CONFIG_USB_OHCI is not set
+# CONFIG_USB_OHCI_SA1111 is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_AUDIO is not set
+# CONFIG_USB_BLUETOOTH is not set
+
+#
+#   SCSI support is needed for USB Storage
+#
+# CONFIG_USB_STORAGE is not set
+# 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_HP8200e is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# USB Human Interface Devices (HID)
+#
+
+#
+#   Input core support is needed for USB HID
+#
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_DC2XX is not set
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_SCANNER is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_HPUSBSCSI is not set
+
+#
+# USB Multimedia devices
+#
+
+#
+#   Video4Linux support is needed for USB Multimedia device support
+#
+
+#
+# USB Network adaptors
+#
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_CDCETHER is not set
+# CONFIG_USB_USBNET is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_RIO500 is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_NO_PGT_CACHE is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_WAITQ is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+# CONFIG_DEBUG_DC21285_PORT is not set
+# CONFIG_DEBUG_CLPS711X_UART2 is not set
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/Makefile linux-2.4.19-rmk2/arch/arm/kernel/Makefile
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/Makefile linux-2.4.19-rmk2/arch/arm/kernel/Makefile
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/Makefile	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/kernel/Makefile	2002-10-02 22:15:31.000000000 -0700
@@ -1,4 +1,3 @@
-#
 # Makefile for the linux kernel.
 #
 # Note! Dependencies are done automagically by 'make dep', which also
@@ -44,7 +43,7 @@
 no-irq-arch	:= $(CONFIG_ARCH_INTEGRATOR) $(CONFIG_ARCH_CLPS711X) \
 		   $(CONFIG_FOOTBRIDGE) $(CONFIG_ARCH_EBSA110) \
 		   $(CONFIG_ARCH_SA1100) $(CONFIG_ARCH_CAMELOT) \
-		   $(CONFIG_ARCH_MX1ADS)
+		   $(CONFIG_ARCH_MX1ADS) $(CONFIG_ARCH_PSIONW)
 
 ifneq ($(findstring y,$(no-irq-arch)),y)
   obj-y		+= irq-arch.o
@@ -53,6 +52,7 @@
 obj-$(CONFIG_ARCH_ACORN) += ecard.o fiq.o time-acorn.o
 obj-$(CONFIG_ARCH_CLPS7500) += time-acorn.o
 obj-$(CONFIG_ARCH_RISCSTATION) += time-acorn.o
+obj-$(CONFIG_ARCH_PSIONW) += fiq.o psionw_pm.o
 obj-$(CONFIG_DEBUG_LL)	+= debug-$(PROCESSOR).o
 obj-$(CONFIG_MODULES)	+= armksyms.o
 obj-$(CONFIG_ARTHUR)	+= arthur.o
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/debug-armv.S linux-2.4.19-rmk2/arch/arm/kernel/debug-armv.S
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/debug-armv.S linux-2.4.19-rmk2/arch/arm/kernel/debug-armv.S
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/debug-armv.S	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/kernel/debug-armv.S	2002-10-02 22:07:30.000000000 -0700
@@ -396,6 +396,37 @@
 		bne	1001b
 		.endm
 
+#elif defined(CONFIG_ARCH_PSIONW)
+
+#include <asm/hardware/psionw.h>
+
+                .macro  addruart,rx
+                mrc     p15, 0, \rx, c1, c0
+                tst     \rx, #1                 @ MMU enabled?
+                moveq   \rx, #PSIONW_PHYS_BASE
+                movne   \rx, #PSIONW_VIRT_BASE
+                orr     \rx, \rx, #0x0700       @ UART2
+                .endm
+
+                .macro  senduart,rd,rx
+                str     \rd, [\rx]     		@ UARTDR
+                .endm
+
+                .macro  waituart,rd,rx
+1001:           ldr     \rd, [\rx, #0x0010]     @ SYSFLGx
+                tst     \rd, #1 << 3            @ UBUSYx
+                bne     1001b
+                .endm
+
+                .macro  busyuart,rd,rx
+                tst     \rx, #0x0000            @ UART2 does not have CTS here
+                bne     1002f
+1001:           ldr     \rd, [\rx, #0x0010]     @ SYSFLGx
+                tst     \rd, #1 << 0            @ CTS
+                bne     1001b
+1002:
+                .endm
+
 #else
 #error Unknown architecture
 #endif
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/entry-armv.S linux-2.4.19-rmk2/arch/arm/kernel/entry-armv.S
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/entry-armv.S linux-2.4.19-rmk2/arch/arm/kernel/entry-armv.S
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/entry-armv.S	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/kernel/entry-armv.S	2002-10-02 22:07:30.000000000 -0700
@@ -524,7 +524,42 @@
 
 		.macro	irq_prio_table
 		.endm
-	
+
+#elif defined(CONFIG_ARCH_PSIONW)
+
+#include <asm/hardware/psionw.h>
+
+		.macro	disable_fiq
+		.endm
+
+		.macro	get_irqnr_and_base, irqnr, stat, base, mask
+		mov	\base, #PSIONW_BASE
+		ldr	\stat, [\base, #INTRSR]
+		ldr	\mask, [\base, #INTENS]
+		mov	\irqnr, #4
+		mov	\mask, \mask, lsl #16
+		and	\stat, \stat, \mask, lsr #16
+		movs	\stat, \stat, lsr #4
+		bne	1001f
+
+1001:		tst	\stat, #255
+		addeq	\irqnr, \irqnr, #8
+		moveq	\stat, \stat, lsr #8
+		tst	\stat, #15
+		addeq	\irqnr, \irqnr, #4
+		moveq	\stat, \stat, lsr #4
+		tst	\stat, #3
+		addeq	\irqnr, \irqnr, #2
+		moveq	\stat, \stat, lsr #2
+		tst	\stat, #1
+		addeq	\irqnr, \irqnr, #1
+		moveq	\stat, \stat, lsr #1
+		tst	\stat, #1			@ bit 0 should be set
+		.endm
+
+		.macro	irq_prio_table
+		.endm
+
 #elif defined (CONFIG_ARCH_CAMELOT)
 #include <asm/arch/platform.h>
 #undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/irq.c linux-2.4.19-rmk2/arch/arm/kernel/irq.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/irq.c linux-2.4.19-rmk2/arch/arm/kernel/irq.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/irq.c	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/kernel/irq.c	2002-10-02 22:07:30.000000000 -0700
@@ -113,7 +113,7 @@
 		*p++ = '\n';
 	}
 
-#ifdef CONFIG_ARCH_ACORN
+#if defined(CONFIG_ARCH_ACORN) || defined(CONFIG_ARCH_PSIONW)
 	p += get_fiq_list(p);
 #endif
 	p += sprintf(p, "Err: %10lu\n", irq_err_count);
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/psionw_pm.c linux-2.4.19-rmk2/arch/arm/kernel/psionw_pm.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/psionw_pm.c linux-2.4.19-rmk2/arch/arm/kernel/psionw_pm.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/kernel/psionw_pm.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/kernel/psionw_pm.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,116 @@
+/*
+ * Psion battery FIQ handler. Copyright 2002 Tony Lindgren <tony@atomide.com>
+ *
+ * Modeled after Russell King's dma-rpc.c
+ */
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/fs.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/delay.h>
+#include <linux/proc_fs.h>
+#include <linux/sched.h>
+#include <linux/miscdevice.h>
+#include <linux/spinlock.h>
+#include <linux/rwsem.h>
+#include <linux/init.h>
+
+#include <asm/hardware/psionw.h>
+#include <asm/io.h>
+#include <asm/leds.h>
+#include <asm/mach-types.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+
+#include <asm/fiq.h>
+
+#include <asm/arch/irqs.h>
+
+static struct fiq_handler extfiq_fh = {
+	name:	"extfiq"
+};
+
+static struct fiq_handler blint_fh = {
+	name:	"blint"
+};
+
+/*
+ * Sets up a handler for the external fiq
+ * NOTE: Not currently in use as Linux does not
+ * currently support sharing the fiq vector.
+ */
+static void extfiq_handler_setup(void)
+{
+	void *fiqhandler_start;
+	unsigned int fiqhandler_length;
+	struct pt_regs regs;
+	extern unsigned char extfiq_handler_start, extfiq_handler_end;
+
+	printk("FIQ: Setting up handler for external fast interrupt\n");
+
+	fiqhandler_start = &extfiq_handler_start;
+	fiqhandler_length = &extfiq_handler_end - &extfiq_handler_start;
+
+	if (claim_fiq(&extfiq_fh)) {
+		printk("FIQ: Could not claim fast interrupt\n");
+		return;
+	}
+
+	set_fiq_handler(fiqhandler_start, fiqhandler_length);
+	set_fiq_regs(&regs);
+	
+	enable_fiq(IRQ_EXTFIQ);
+}
+
+/*
+ * Sets up a handler for the battery low fiq
+ */
+static void blint_fiq_handler_setup(void)
+{
+	void *fiqhandler_start;
+	unsigned int fiqhandler_length;
+	struct pt_regs regs;
+	extern unsigned char blint_fiq_handler_start, blint_fiq_handler_end;
+
+	printk("FIQ: Setting up handler for battery low fast interrupt\n");
+
+	fiqhandler_start = &blint_fiq_handler_start;
+	fiqhandler_length = &blint_fiq_handler_end - &blint_fiq_handler_start;
+
+	if (claim_fiq(&blint_fh)) {
+		printk("FIQ: Could not claim fast interrupt\n");
+		return;
+	}
+
+	set_fiq_handler(fiqhandler_start, fiqhandler_length);
+	set_fiq_regs(&regs);
+	psionw_writel(1, BLEOI);
+	enable_fiq(IRQ_BLINT);
+}
+
+static int __init psionw_pm_init(void)
+{
+	printk("FIQ: Initializing Psion fast interrupts\n");
+	//extfiq_handler_setup();
+	blint_fiq_handler_setup();
+}
+
+static void __exit psionw_pm_exit(void)
+{
+	printk("FIQ: Disabling Psion fast interrupts\n");
+
+	//disable_fiq(IRQ_EXTFIQ);
+	//release_fiq(&extfiq_fh);
+
+	disable_fiq(IRQ_BLINT);
+	release_fiq(&blint_fh);
+}
+
+
+EXPORT_NO_SYMBOLS;
+
+MODULE_LICENSE("GPL");
+
+module_init(psionw_pm_init);
+module_exit(psionw_pm_exit);
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/Makefile linux-2.4.19-rmk2/arch/arm/lib/Makefile
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/Makefile linux-2.4.19-rmk2/arch/arm/lib/Makefile
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/Makefile	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/lib/Makefile	2002-10-02 22:07:30.000000000 -0700
@@ -26,6 +26,7 @@
 obj-clps7500	:= io-acorn.o
 obj-l7200     	:= io-acorn.o
 obj-shark	:= io-shark.o
+obj-psionw	:= psionwfiqs.o
 obj-edb7211	:= io-acorn.o
 obj-riscstation := io-acorn.o floppydma.o
 
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/psionwfiqs.S linux-2.4.19-rmk2/arch/arm/lib/psionwfiqs.S
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/psionwfiqs.S linux-2.4.19-rmk2/arch/arm/lib/psionwfiqs.S
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/lib/psionwfiqs.S	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/lib/psionwfiqs.S	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,37 @@
+/*
+ *  linux/arch/arm/lib/psionwblint.S
+ *
+ *  Copyright (C) 2002 Tony Lindgren <tony@atomide.com>
+ *
+ *  Modeled after Russel King's floppydma.S
+ *
+ * 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/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware/psionw.h>
+		.text
+
+		.global	SYMBOL_NAME(extfiq_handler_end)
+ENTRY(extfiq_handler_start)
+		mov	r11, #0xdf000000	@ VBASE
+		mov	r12,  #'E'
+	        strb	r12, [r11, #0x700]	@ UART2
+		subs    pc,   lr,  #4		@ return
+SYMBOL_NAME(extfiq_handler_end):
+
+		.global	SYMBOL_NAME(blint_fiq_handler_end)
+ENTRY(blint_fiq_handler_start)
+		mov	r11, #0xdf000000	@ VBASE
+		str	r11, [r11, #0x0410]	@ write to BLEOI
+
+		ldr	r12, [r11, #0x0e08]	@ load PCDR
+		bic	r12, r12, #0x10		@ clear PCDR_LIGHT
+		str	r12, [r11, #0x0e08]	@ write PCDR
+
+		mov	r12,  #'B'
+	        strb	r12, [r11, #0x700]	@ UART2
+		subs    pc,   lr,  #4		@ return
+SYMBOL_NAME(blint_fiq_handler_end):
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/Makefile linux-2.4.19-rmk2/arch/arm/mach-psionw/Makefile
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/Makefile linux-2.4.19-rmk2/arch/arm/mach-psionw/Makefile
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/Makefile	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/Makefile	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,27 @@
+#
+# Makefile for the linux kernel.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+
+USE_STANDARD_AS_RULE := true
+
+O_TARGET		:= psionw.o
+
+# Object file lists.
+
+obj-y			:= irq.o mm.o psionw-arch.o psionw-hardware.o
+obj-m			:=
+obj-n			:=
+obj-			:=
+
+export-objs		:= psionw-time.o psionw-leds.o psionw-power.o serial-debug.o
+
+obj-$(CONFIG_ARCH_PSIONW) += psionw-time.o psionw-leds.o psionw-power.o serial-debug.o
+
+leds-$(CONFIG_ARCH_PSIONW) += psionw-leds.o
+obj-$(CONFIG_LEDS)	+= $(leds-y)
+
+include $(TOPDIR)/Rules.make
+
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/irq.c linux-2.4.19-rmk2/arch/arm/mach-psionw/irq.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/irq.c linux-2.4.19-rmk2/arch/arm/mach-psionw/irq.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/irq.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/irq.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,214 @@
+/*
+ *  linux/arch/arm/mach-psionw/irq.c
+ *
+ *  Copyright (C) 2001 Yuji Shinokawa <ysh@mob.or.jp>
+ *  Copyright (C) 2001 Tony Lindgren <tony@atomide.com>
+ *
+ * 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/init.h>
+
+#include <asm/mach/irq.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#include <linux/delay.h>
+#include <linux/sched.h>
+
+#include <asm/hardware/ioc.h>
+
+#include <asm/hardware/psionw.h>
+
+static int debug_on;
+static struct irqaction *etna_action = NULL;
+
+#if CONFIG_PCMCIA_ETNA
+extern void etna_interrupt(void);
+
+static struct tq_struct etna_int_task = {
+	routine:etna_interrupt
+};
+#endif
+
+static void
+mask_irq_int(unsigned int irq)
+{
+	u32 intmr;
+	intmr = (1 << irq);
+	psionw_writel(intmr, INTENC);
+}
+
+#ifdef CONFIG_PCMCIA_ETNA
+static void
+mask_etna_irq(unsigned int irq)
+{
+	int etna_int, count = 0;
+	mask_irq_int(irq);
+
+	etna_int = etna_readb(ETNA_INT_STATUS);
+	etna_action = irq_desc[irq].action;
+
+	//printk("i0x%x ", etna_int);
+
+	switch (etna_int) {
+	case (0x00):		/* Card removed interrupt */
+		irq_desc[irq].action = NULL;
+		printk("ETNA: Card removed\n");
+		schedule_task(&etna_int_task);
+		break;
+	case (0x01):		/* Card got hosed */
+		irq_desc[irq].action = NULL;
+		while (etna_int == 0x01) {
+			count++;
+			schedule_task(&etna_int_task);
+			mdelay(500);
+			etna_int = etna_readb(ETNA_INT_STATUS);
+			if (count >= 5) {
+				printk("ETNA: Socket stuck, reinsert the card\n");
+				break;
+			}
+		}
+		break;
+	case (0x03):
+		break;		/* Network after nfs mount */
+	case (0x05):		/* Normal IDE interrupt */
+		break;
+	case (0x07):		/* Normal network interrupt */
+		break;
+	case (0x3f):		/* First write after sleep mode */
+	case (0x35):		/* First write after sleep mode */
+		//irq_desc[IRQ_EINT1].action = NULL;
+		break;
+	default:
+		printk("ETNA: Unknown interrupt status: 0x%x\n",  etna_int);
+		schedule_task(&etna_int_task);
+	}
+
+	/* 
+	 * You would assume that we need to disable Etna interrupt 
+	 * until we're done? Nope, that causes delays in waking up
+	 * the card for 16-bit writes in etna_outsw_ide.
+	 */
+	//etna_writeb(0, ETNA_INT_MASK);
+
+	/* Clear the Etna interrupt */
+	etna_writeb(ETNA_CLEAR_MASK, ETNA_INT_CLEAR);
+}
+
+static void
+unmask_etna_irq(unsigned int irq)
+{
+	int etna_int_mask;
+
+	etna_int_mask = etna_readb(ETNA_INT_MASK);
+	while (etna_int_mask & (1 << 2)) {
+		printk("ETNA: Bad ETNA_INT_MASK: 0x%02x\n", 
+		       etna_readb(ETNA_INT_STATUS));
+		etna_writeb(0, ETNA_INT_MASK);
+		etna_writeb(ETNA_CF_IRQ, ETNA_INT_CLEAR);
+		etna_int_mask = etna_readb(ETNA_INT_MASK);
+	}
+
+	if (irq_desc[irq].action == NULL)
+		irq_desc[irq].action = etna_action;
+
+	/* Let's enable the Etna interrupt again */
+	etna_writeb(ETNA_CF_IRQ, ETNA_INT_MASK);
+	unmask_irq_int(irq);
+}
+#endif /* CONFIG_PCMCIA_ETNA */
+
+static void
+mask_ack_irq_int(unsigned int irq)
+{
+	switch (irq) {
+	case IRQ_CSINT:
+		psionw_writel(1, COEOI);
+		printk("Received and cleared CSINT irq %d\n", irq);
+		break;
+	case IRQ_EINT2:
+		psionw_writel(1, E2EOI);
+		printk("Received and cleared EINT2 irq %d\n", irq);
+		break;
+	case IRQ_TC1OI:
+		psionw_writel(1, TC1EOI); /* Cleared here, handled in rtc */
+		break;
+	case IRQ_TC2OI:
+		psionw_writel(1, TC2EOI); /* Cleared here, handled in timer */
+		break;
+	case IRQ_RTCMI:
+		psionw_writel(1, RTCEOI); /* Cleared here, handled in rtc*/
+		break;
+	case IRQ_TINT:
+		psionw_writel(1, TEOI);
+		printk("Received and cleared TINT irq %d\n", irq);
+		break;
+	}
+}
+
+static void
+unmask_irq_int(unsigned int irq)
+{
+	u32 intmr;
+	intmr = (1 << irq);
+	psionw_writel(intmr, INTENS);
+}
+
+void __init
+psionw_init_irq(void)
+{
+	unsigned int i;
+
+	for (i = 0; i < NR_IRQS; i++) {
+		if (INT1_IRQS & (1 << i)) {
+			irq_desc[i].valid = 1;
+			irq_desc[i].probe_ok = 1;
+			irq_desc[i].mask_ack = (INT1_ACK_IRQS & (1 << i)) ?
+			    mask_ack_irq_int : mask_irq_int;
+			irq_desc[i].mask = mask_irq_int;
+			irq_desc[i].unmask = unmask_irq_int;
+		}
+	}
+
+	/*
+	 * Disable interrupts
+	 */
+	psionw_writel(~0, INTENC);
+
+	/*
+	 * Clear down any pending interrupts
+	 */
+	psionw_writel(0, MCEOI);
+	psionw_writel(0, BLEOI);
+	psionw_writel(0, COEOI);
+	psionw_writel(0, TC1EOI);
+	psionw_writel(0, TC2EOI);
+	psionw_writel(0, RTCEOI);
+	psionw_writel(0, TEOI);
+	psionw_writel(0, UMSEOI);
+	psionw_writel(0, SSCR0);
+
+#ifdef CONFIG_PCMCIA_ETNA
+	irq_desc[IRQ_EINT1].mask_ack = mask_etna_irq;
+	irq_desc[IRQ_EINT1].unmask = unmask_etna_irq;
+
+	/* Enable the ETNA interrupts */
+	__raw_writeb(ETNA_CF_IRQ, ETNA_V_BASE + ETNA_INT_MASK);
+#endif
+
+	init_FIQ();
+}
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/mm.c linux-2.4.19-rmk2/arch/arm/mach-psionw/mm.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/mm.c linux-2.4.19-rmk2/arch/arm/mach-psionw/mm.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/mm.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/mm.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,50 @@
+/*
+ *  linux/arch/arm/mach-psionw/mm.c
+ *
+ *  Copyright (C) 2000 Tony Lindgren <tony@atomide.com>
+ *
+ * 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/sched.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+
+#include <asm/mach/map.h>
+
+#include <asm/hardware/psionw.h>
+
+#define HOLE 0x000
+
+/*
+ * Logical      Physical
+ */
+static struct map_desc psionw_io_desc[] __initdata = {
+	{PSIONW_VIRT_BASE, PSIONW_PHYS_BASE, 0x10000, DOMAIN_IO, 0, 1},
+	{ETNA_V_BASE, ETNA_P_BASE, ETNA_SIZE, DOMAIN_IO, 0, 1},
+	{CF1_V_BASE, CF1_P_BASE, CF_SIZE, DOMAIN_IO, 0, 1},
+	{PSION_V_BR, PSION_P_BR, PSION_BR_SIZE, DOMAIN_IO, 0, 1},
+	{PSION_V_BF, PSION_P_BF, PSION_BF_SIZE, DOMAIN_IO, 0, 1},
+	LAST_DESC
+};
+
+void __init
+psionw_map_io(void)
+{
+	iotable_init(psionw_io_desc);
+}
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-arch.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-arch.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-arch.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-arch.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-arch.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-arch.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,109 @@
+/*
+ *  linux/arch/arm/mach-psionw/psionw.c
+ *
+ *  Copyright (C) 2001 Tony Lindgren <tony@atomide.com>
+ *
+ *  Based on the mach-sa1100 code, some portions of the code
+ *  Copyright (C) 2000 Nicolas Pitre <nico@cam.org>.
+ *  
+ * 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/config.h>
+#include <linux/tty.h>
+#include <linux/delay.h>
+#include <linux/pm.h>
+#include <linux/init.h>
+
+#include <asm/elf.h>
+#include <asm/hardware.h>
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/psionw.h>
+
+extern void psionw_init_irq(void);
+extern void psionw_map_io(void);
+
+#define SET_BANK(__nr,__start,__size) \
+	mi->bank[__nr].start = (__start), \
+	mi->bank[__nr].size = (__size), \
+	mi->bank[__nr].node = (((unsigned)(__start) - PHYS_OFFSET) >> 27)
+
+static void __init
+fixup_psionw(struct machine_desc *desc, struct param_struct *params,
+	     char **cmdline, struct meminfo *mi)
+{
+
+#ifdef CONFIG_PSIONW_5MX
+	SET_BANK(0, 0xc0000000, 8 * 1024 * 1024);
+	SET_BANK(1, 0xc1000000, 8 * 1024 * 1024);
+	mi->nr_banks = 2;
+#elif CONFIG_PSIONW_5MXPRO24MB
+	/* Chris Halls <chris.halls@nikocity.de> */
+	SET_BANK(0, 0xc0000000, 8 * 1024 * 1024);
+	SET_BANK(1, 0xc1000000, 8 * 1024 * 1024);
+	SET_BANK(2, 0xd0000000, 4 * 1024 * 1024);
+	SET_BANK(3, 0xd0800000, 4 * 1024 * 1024);
+	mi->nr_banks = 4;
+#elif CONFIG_PSIONW_5MXPRO32MB
+	/* Provided by Thilo Hille <thilo@resourcery.de> */
+	SET_BANK(0, 0xc0000000, 8 * 1024 * 1024);
+	SET_BANK(1, 0xc1000000, 8 * 1024 * 1024);
+	SET_BANK(2, 0xd0000000, 8 * 1024 * 1024);
+	SET_BANK(3, 0xd1000000, 8 * 1024 * 1024);
+	mi->nr_banks = 4;
+#elif CONFIG_PSIONW_REVO
+	/* This seems to be correct */
+	SET_BANK(0, 0xc0000000, 4 * 1024 * 1024);
+	SET_BANK(1, 0xc0800000, 4 * 1024 * 1024);
+	mi->nr_banks = 2;
+#elif CONFIG_PSIONW_REVOPLUS
+	/* Provided by Ilmar Kotte <i.f.a.kotte@altavista.net> */
+	SET_BANK(0, 0xc0000000, 4 * 1024 * 1024);
+	SET_BANK(1, 0xc0800000, 4 * 1024 * 1024);
+	SET_BANK(2, 0xd0000000, 4 * 1024 * 1024);
+	SET_BANK(3, 0xd0800000, 4 * 1024 * 1024);
+	mi->nr_banks = 4;
+#else
+#error Unknown machine type!
+#endif
+
+	ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
+
+	/* Merge the command line options from kernel and boot loader */
+	strcat(*cmdline, " ");
+	strcat(*cmdline, params->commandline);
+	strcpy(params->commandline, *cmdline);
+}
+
+MACHINE_START(PSIONW, "Psion Windermere NEC ARM-710T")
+MAINTAINER("Tony Lindgren")
+BOOT_MEM(0xc0000000, 0x80000000, 0xdf000000)
+
+/*
+ * VIDEO() does not poke a hole to bootmem.
+ * See arch/arm/arm/mm/init.c. 
+ */
+VIDEO(0xc000d000, 0xc000d000 + (PSION_LCD_W * PSION_LCD_H * 4 / 8))
+
+/* Must sync with TEXTADDR */
+BOOT_PARAMS(0xc0048000 - (128 * 1024))
+
+FIXUP(fixup_psionw)
+MAPIO(psionw_map_io)
+INITIRQ(psionw_init_irq)
+MACHINE_END
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-hardware.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-hardware.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-hardware.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-hardware.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-hardware.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-hardware.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,45 @@
+/*
+ *  linux/arch/arm/mach-psionw/hardware.c
+ *
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * 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/config.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+
+#include <asm/arch/psionw-power.h>
+
+/*
+ * Shut down all unnecessary hardware
+ */
+static int
+psionw_hw_init(void)
+{
+	if (psionw_readb(PCDR) & PCDR_UART1) {
+		psionw_writeb(psionw_readb(PCDR) & ~PCDR_UART1, PCDR);
+	}
+
+        if (psionw_readb(PCDR) & PCDR_UART2) {
+                //psionw_writeb(psionw_readb(PCDR) & ~PCDR_UART2, PCDR);
+        }
+
+	return 0;
+}
+
+__initcall(psionw_hw_init);
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-leds.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-leds.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-leds.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-leds.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-leds.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-leds.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,74 @@
+/*
+ *  linux/arch/arm/mach-psionw/leds.c
+ *
+ *  Psionw LED control routines
+ *
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd
+ *
+ * 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/kernel.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/leds.h>
+#include <asm/system.h>
+#include <asm/mach-types.h>
+
+#include <asm/hardware/psionw.h>
+
+static void psionw_leds_event(led_event_t ledevt)
+{
+	unsigned long flags;
+	u32 port;
+
+	local_irq_save(flags);
+	switch(ledevt) {
+	case led_idle_start:
+		/* 
+		 * Turn off red front led when entering idle.
+		 * The led then shows the current CPU load.
+		 */
+		port = psionw_readb(PDDR);
+		psionw_writeb(port & ~PDDR_SLED, PDDR);
+		break;
+
+	case led_idle_end:
+		/* Turn on red front led when not idle*/
+		port = psionw_readb(PDDR);
+		psionw_writeb(port | PDDR_SLED, PDDR);
+		break;
+
+	case led_timer:
+		/* FIXME5MX Blink the green top led, does not work */
+		port = psionw_readb(PCDR);
+		//psionw_writeb(port ^ PCDR_PLED, PCDR);
+		break;
+
+	default:
+		break;
+	}
+
+	local_irq_restore(flags);
+}
+
+static int __init leds_init(void)
+{
+	leds_event = psionw_leds_event;
+	return 0;
+}
+
+__initcall(leds_init);
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-power.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-power.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-power.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-power.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-power.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-power.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,249 @@
+/*
+ * arch/arm/mach-psionw/psionw-power.c - Psion power managemenent
+ *
+ * Copyright (C) 2002 Tony Lindgren <tony@atomide.com>
+ *
+ * Contrast restore after sleep fix (C) 2002 by Simon Howard
+ */
+
+#include <linux/delay.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/hardware/psionw.h>
+#include <asm/arch/irqs.h>
+#include <asm/arch/psionw-power.h>
+#include <linux/proc_fs.h>
+#include <linux/module.h>
+
+extern void disable_irq(unsigned int irq);
+extern void enable_irq(unsigned int irq);
+extern void psionw_lcd_powerdown(int lock);
+extern void psionw_lcd_powerup(int lock);
+extern void etna_powerdown(int lock);
+extern void etna_powerup(int lock);
+extern void ssi5mx_powerdown(int lock);
+extern void ssi5mx_powerup(int lock);
+
+static int psion_rtc_off;
+
+/*
+ * Stops the DC to DC converter
+ */
+void stop_pump(int lock)
+{
+	long flags = 0;
+
+	if (lock)
+		save_flags_cli(flags);
+
+	psionw_writel(PUMP_STOP_VAL,PUMPCON);
+	psionw_writeb(psionw_readb(PDDR) & ~PDDR_PUMP_PWR1, PDDR);
+
+	if (lock)
+		restore_flags(flags);
+}
+
+void stop_timer(int lock)
+{
+	unsigned int cfg;
+	unsigned long goto_sleep;
+	long flags = 0;
+
+	if (lock)
+		save_flags_cli(flags);
+
+	psion_rtc_off = xtime.tv_sec - RTCTIME;
+
+	goto_sleep = jiffies;
+	do {
+		disable_irq(IRQ_TC2OI);
+	} while (time_after(jiffies, goto_sleep + HZ/50));
+	cfg = psionw_readl(TC2CTRL);
+	cfg &= ~TC_ENABLE;
+	psionw_writel(cfg, TC2CTRL);
+	
+	if (lock)
+		restore_flags(flags);
+}
+
+void start_timer(int lock)
+{
+	unsigned int cfg;
+	long flags = 0;
+
+	if (lock)
+		save_flags_cli(flags);
+
+	cfg = psionw_readl(TC2CTRL);
+
+	/* These bits need to initialized to 0 */
+	cfg &= ~TC_BIT2;
+	cfg &= ~TC_BIT4;
+	cfg &= ~TC_BIT5;
+	cfg |= TC_CLKSEL;		// 512kHz mode
+	cfg |= TC_MODE;
+	cfg |= TC_ENABLE;
+
+	psionw_writel(cfg, TC2CTRL);
+	psionw_writel(5119, TC2LOAD);	/* 512kHz / 100Hz - 1 */
+
+	psionw_writel(1, TC2EOI);
+	enable_irq(IRQ_TC2OI);
+
+	if (lock)
+		restore_flags(flags);
+
+	/* Set the correct time from RTC */
+	xtime.tv_sec = RTCTIME;
+	xtime.tv_sec += psion_rtc_off;
+}
+
+/*
+ * Puts the Psion into sleep mode until a keyboard, serial,
+ * touch panel, or RTC interrupt is received.
+ */
+void psion_off(void)
+{
+	int adc_clock = 0, rfdiv = 0, rtcdiv1 = 0, rtcdiv2 = 0;
+	int uart1 = 0, uart2 = 0;
+	long flags;
+
+	if (psionw_readl(PDDR) & PDDR_PUMP_PWR1) {
+
+		save_flags_cli(flags);
+		if (psionw_readb(PCDR) & PCDR_UART1) {
+			uart1 = 1;
+			//printk("Looks like UART1 is on\n");
+			psionw_writeb(psionw_readb(PCDR) & ~PCDR_UART1, PCDR);
+		}
+
+		if (psionw_readb(PCDR) & PCDR_UART2) {
+			uart2 = 1;
+			//printk("Looks like UART2 is on\n");
+			psionw_writeb(psionw_readb(PCDR) & ~PCDR_UART2, PCDR);
+		}
+		restore_flags(flags);
+
+		/* First we must stop the timer */
+		stop_timer(1);
+
+		/* 
+		 * We establish a long lock for the whole sleep-wake procedure
+		 */
+		save_flags_cli(flags);
+
+		psionw_writeb(psionw_readb(PDDR) & ~PDDR_SLED, PDDR);
+		psionw_writel(0, KSCAN);
+		ssi5mx_powerdown(0);		/* SSI, saves only about 0.1mA */
+
+#ifdef CONFIG_PCMCIA_ETNA
+		etna_powerdown(0);
+#endif
+
+		psionw_lcd_powerdown(0);
+		stop_pump(0);			/* DC to DC, saves about 0.5mA */
+
+		/* Lower the DRAM refresh to 1 KHz, no real savings */
+		rfdiv = psionw_readl(DRAM_CFG) & 0x7f;
+		psionw_writel(psionw_readl(DRAM_CFG) | 0x7f, DRAM_CFG);
+
+		/* Disable the ADC clock, no real savings */
+		adc_clock = (psionw_readl(PWRCNT) >> 8) & 0xff;
+		psionw_writel(psionw_readl(PWRCNT) | (0xff << 8), PWRCNT);
+
+		cpu_cache_clean_invalidate_all();
+
+		rtcdiv1 = psionw_readb(PWRSR) & 0x3f;
+		while(rtcdiv1 == rtcdiv2) {
+			rtcdiv2 = psionw_readb(PWRSR) & 0x3f;
+		}
+		while(rtcdiv2 == rtcdiv1) {
+			rtcdiv1 = psionw_readb(PWRSR) & 0x3f;
+		}
+
+		/* Now go to sleep */
+		psionw_writel(1, STBY);
+		__asm__ __volatile__("
+			mov     r0, r0
+			mov     r0, r0 
+			mov     r0, r0
+		");
+
+		/* We're back from sleep */
+
+		/* Restore the ADC clock */
+		psionw_writel(psionw_readl(PWRCNT) &  ~(0xff << 8), PWRCNT);
+		psionw_writel(psionw_readl(PWRCNT) | (adc_clock << 8), PWRCNT);
+
+		/* Restore DRAM refresh rate */
+		psionw_writel(psionw_readl(DRAM_CFG) & ~0x7f, DRAM_CFG);
+		psionw_writel(psionw_readl(DRAM_CFG) | rfdiv, DRAM_CFG);
+
+		start_pump(0);
+		psionw_lcd_powerup(0);
+
+		/* Restore contrast */
+		psion_set_contrast(psion_get_contrast(), 1);
+
+#ifdef CONFIG_PCMCIA_ETNA
+		etna_powerup(0);
+#endif
+
+		ssi5mx_powerup(0);
+
+		/* 
+		 * And finally we release the long lock 
+		 */
+		restore_flags(flags);
+		start_timer(1);
+
+		save_flags_cli(flags);
+		if (uart1)
+			psionw_writeb(psionw_readb(PCDR) | PCDR_UART1, PCDR);
+
+		if (uart2)
+			psionw_writeb(psionw_readb(PCDR) | PCDR_UART2, PCDR);
+		restore_flags(flags);
+
+	} else {
+		/* Just in case the LCD is off */
+		psionw_lcd_powerup(1);
+	}
+}
+
+/*
+ * Returns the CPU speed
+ */
+unsigned int psionw_get_cpu_speed(int cpu)
+{
+	int speed;
+	speed = (psionw_readl(PWRCNT) & 0x7) >> 2;
+	if (speed) {
+		return 36864000;
+	} else {
+		return 11432000;
+	}
+}
+
+/*
+ * Changes the CPU speed
+ */
+void psionw_set_cpu_speed(int speed)
+{
+	int pwrcnt;
+	long flags = 0;
+
+	save_flags_cli(flags);
+	cpu_cache_clean_invalidate_all();
+	pwrcnt = psionw_readl(PWRCNT);
+	if (speed) {
+		pwrcnt |= (1 << 2);
+		printk("Setting the CPU speed to 36Mhz\n");
+		psionw_writel(pwrcnt, PWRCNT);
+	} else {
+		pwrcnt &= ~(1 << 2);
+		printk("Setting the CPU speed to 18Mhz\n");
+		psionw_writel(pwrcnt, PWRCNT);
+	}
+	restore_flags(flags);
+}		   
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-time.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-time.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-time.c linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-time.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/psionw-time.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/psionw-time.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,171 @@
+/*
+ * linux/arch/arm/mach-psionw/time.c
+ *
+ * RTC handler for Psion 5mx.
+ *
+ * Copyright (C) 2001 Yuji Shinokawa <ysh@mob.or.jp>
+ *
+ * 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/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+#include <asm/hardware/psionw.h>
+
+#undef DEBUG_RTC
+
+/*
+ * Offset to compatible with EPOC time handling.
+ * In EPOC, it seems a time for rtc = 0 is "00:00:00 1 Jan 2000 UTC"
+ * and rtc has signed value.
+ *
+ *     RTC         Time & date
+ * 0x00000000 = 00:00:00  1 Jan 2000 (London Inner, United Kingdom)
+ *
+ * You can get this offset by following perl script;
+ *   #!/usr/bin/perl
+ *   require 'timelocal.pl';
+ *   $time = timegm (0, 0, 0, 1, 0, 2000);
+ *   print "$time\n";
+ */
+#define EPOC_RTC_OFFSET		946684800
+
+extern int (*set_rtc) (void);
+extern unsigned long (*gettimeoffset) (void);
+
+unsigned int psionw_read_rtc(void)
+{
+	int try_count, rtc1, rtc2;
+	u_int xrtc;
+
+	try_count = 3;
+	do {
+		rtc1 =
+		    (psionw_readl(RTCDRU) << 16) | (psionw_readl(RTCDRL) &
+						    0xffff);
+		rtc2 =
+		    (psionw_readl(RTCDRU) << 16) | (psionw_readl(RTCDRL) &
+						    0xffff);
+	} while (rtc1 != rtc2 && --try_count);
+
+#if DEBUG_RTC
+	printk("DEBUG: (psionw_get_rtc) read rtc = %08x\n", rtc1);
+#endif
+
+	xrtc = rtc1 + EPOC_RTC_OFFSET;
+
+	return xrtc;
+}
+
+void psionw_write_rtc(u_int xrtc)
+{
+	int rtc;
+
+	rtc = xrtc - EPOC_RTC_OFFSET;
+
+#if DEBUG_RTC
+	printk("DEBUG: (psionw_set_rtc) write rtc = %08x\n", rtc);
+#endif
+
+	/* Writing order is important.  */
+	psionw_writel((rtc >> 16), RTCDRU);
+	psionw_writel((rtc & 0xffff), RTCDRL);
+}
+
+unsigned int psionw_read_rtc_alarm(void)
+{
+	int try_count, rtc1, rtc2;
+	u_int xrtc;
+
+	try_count = 3;
+	do {
+		rtc1 =
+		    (psionw_readl(RTCMRU) << 16) | (psionw_readl(RTCMRL) &
+						    0xffff);
+		rtc2 =
+		    (psionw_readl(RTCMRU) << 16) | (psionw_readl(RTCMRL) &
+						    0xffff);
+	} while (rtc1 != rtc2 && --try_count);
+
+#if DEBUG_RTC
+	printk("DEBUG: (psionw_get_rtc_alarm) read rtc alarm = %08x\n", rtc1);
+#endif
+
+	xrtc = rtc1 + EPOC_RTC_OFFSET;
+
+	return xrtc;
+}
+
+void psionw_write_rtc_alarm(u_int xrtc)
+{
+	int rtc;
+
+	rtc = xrtc - EPOC_RTC_OFFSET;
+
+#if DEBUG_RTC
+	printk("DEBUG: (psionw_set_rtc_alarm) write rtc alarm = %08x\n", rtc);
+#endif
+
+	/* Writing order is important.  */
+	psionw_writel((rtc >> 16), RTCMRU);
+	psionw_writel((rtc & 0xffff), RTCMRL);
+}
+
+EXPORT_SYMBOL(psionw_read_rtc);
+EXPORT_SYMBOL(psionw_write_rtc);
+EXPORT_SYMBOL(psionw_read_rtc_alarm);
+EXPORT_SYMBOL(psionw_write_rtc_alarm);
+
+static int
+psionw_set_rtc(void)
+{
+	u_int xrtc, rtc;
+
+	xrtc = (u_int) xtime.tv_sec;
+
+	psionw_write_rtc(xrtc);
+
+	rtc = psionw_read_rtc();
+	if (xrtc > rtc || rtc - xrtc > 1)
+		return 1;	/* Write failed.  */
+
+	return 0;
+}
+
+static unsigned long
+psionw_gettimeoffset(void)
+{
+	return 0;
+}
+
+static int
+psionw_rtc_init(void)
+{
+	/* Set the initial RTC value.  */
+	xtime.tv_sec = (time_t) psionw_read_rtc();
+
+	/* Setup hook.  */
+	set_rtc = psionw_set_rtc;
+	gettimeoffset = psionw_gettimeoffset;
+
+	return 0;
+}
+
+__initcall(psionw_rtc_init);
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/serial-debug.c linux-2.4.19-rmk2/arch/arm/mach-psionw/serial-debug.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/serial-debug.c linux-2.4.19-rmk2/arch/arm/mach-psionw/serial-debug.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mach-psionw/serial-debug.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.19-rmk2/arch/arm/mach-psionw/serial-debug.c	2002-10-02 22:07:30.000000000 -0700
@@ -0,0 +1,35 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+
+#define DEBUG 1
+
+/*
+ * Allows printing debug information over the serial
+ * line even before the console is initialized. Uses
+ * the low level debug functions.
+ * To use in the code, just add:
+ *
+ * 	extern void serial_printf(char *fmt, ...);
+ *
+ * For debugging only, do not leave serial_printf
+ * statements in the code.
+ *
+ * Copied from the drivers/video/cyber2000fb.h
+ */
+#if defined(DEBUG) && defined(CONFIG_DEBUG_LL)
+void
+serial_printf(char *fmt, ...)
+{
+	extern void printascii(const char *);
+	char buffer[128];
+	va_list ap;
+
+	va_start(ap, fmt);
+	vsprintf(buffer, fmt, ap);
+	va_end(ap);
+
+	printascii(buffer);
+}
+#else
+#define serial_printf(x...) do { } while (0)
+#endif
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mm/init.c linux-2.4.19-rmk2/arch/arm/mm/init.c
diff -urN -X /home/arm/dontdiff_tml_arm /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mm/init.c linux-2.4.19-rmk2/arch/arm/mm/init.c
--- /home/download/kernels/linux-2.4.19-rmk2-vanilla/arch/arm/mm/init.c	2002-10-02 22:05:30.000000000 -0700
+++ linux-2.4.19-rmk2/arch/arm/mm/init.c	2002-10-02 22:07:30.000000000 -0700
@@ -384,6 +384,13 @@
 		reserve_bootmem_node(pgdat, 0xc0000000, 0x00020000);
 	if (machine_is_p720t())
 		reserve_bootmem_node(pgdat, PHYS_OFFSET, 0x00014000);
+
+#ifdef CONFIG_ARCH_PSIONW
+#include <asm/hardware/psionw.h>
+        /* Reserve the video memory area */
+        reserve_bootmem_node(pgdat, LCD_MEM_START, LCD_MEM_SIZE);
+#endif
+
 #ifdef CONFIG_SA1111
 	/*
 	 * Because of the SA1111 DMA bug, we want to preserve
