diff -urN -X dontdiff linux-2.4.27/Makefile linux-2.4.27-5mx/Makefile --- linux-2.4.27/Makefile 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/Makefile 2005-01-02 09:59:19.000000000 +0100 @@ -1,11 +1,12 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 27 -EXTRAVERSION = -vrs1 +EXTRAVERSION = -vrs1-5mx1 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +#ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +ARCH := arm KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g") CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -19,7 +20,7 @@ HOSTCC = gcc HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -CROSS_COMPILE = +CROSS_COMPILE = arm-linux- # # Include the make variables (CC, etc...) diff -urN -X dontdiff linux-2.4.27/arch/arm/Makefile linux-2.4.27-5mx/arch/arm/Makefile --- linux-2.4.27/arch/arm/Makefile 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/Makefile 2004-12-04 17:53:46.000000000 +0100 @@ -156,6 +156,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 dontdiff linux-2.4.27/arch/arm/config.in linux-2.4.27-5mx/arch/arm/config.in --- linux-2.4.27/arch/arm/config.in 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/config.in 2004-12-04 09:40:36.000000000 +0100 @@ -45,6 +45,7 @@ Omaha CONFIG_ARCH_OMAHA \ 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 \ @@ -182,6 +183,18 @@ 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 @@ -294,6 +307,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 @@ -440,6 +454,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" -o \ "$CONFIG_ARCH_RISCSTATION" = "y" ]; then define_bool CONFIG_DISCONTIGMEM y @@ -538,6 +553,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" -o \ @@ -550,6 +566,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" -o \ "$CONFIG_ARCH_OMAHA" = "y" -o \ @@ -628,7 +645,8 @@ fi endmenu -if [ "$CONFIG_ARCH_CLPS711X" = "y" ]; then +if [ "$CONFIG_ARCH_CLPS711X" = "y" -o \ + "$CONFIG_ARCH_PSIONW" = "y" ]; then # This is _meant_ to be ssi _not_ scsi. It is not a spelling error. source drivers/ssi/Config.in fi @@ -707,6 +725,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 dontdiff linux-2.4.27/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb linux-2.4.27-5mx/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb --- linux-2.4.27/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/def-configs/psion_5mx_ericsson_mc218_16mb 2004-12-04 09:29:27.000000000 +0100 @@ -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 dontdiff linux-2.4.27/arch/arm/def-configs/psion_revo_8mb linux-2.4.27-5mx/arch/arm/def-configs/psion_revo_8mb --- linux-2.4.27/arch/arm/def-configs/psion_revo_8mb 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/def-configs/psion_revo_8mb 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,915 @@ +# +# 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 is not set +# CONFIG_PSIONW_5MXPRO24MB is not set +# CONFIG_PSIONW_5MXPRO32MB is not set +CONFIG_PSIONW_REVO=y +# 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 is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +# CONFIG_PCMCIA_ETNA is not set +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 + +# +# 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 is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD 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 + +# +# 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 dontdiff linux-2.4.27/arch/arm/def-configs/psion_revo_plus_diamond_mako_16mb linux-2.4.27-5mx/arch/arm/def-configs/psion_revo_plus_diamond_mako_16mb --- linux-2.4.27/arch/arm/def-configs/psion_revo_plus_diamond_mako_16mb 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/def-configs/psion_revo_plus_diamond_mako_16mb 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,915 @@ +# +# 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 is not set +# CONFIG_PSIONW_5MXPRO24MB is not set +# CONFIG_PSIONW_5MXPRO32MB is not set +# CONFIG_PSIONW_REVO is not set +CONFIG_PSIONW_REVOPLUS=y +# 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 is not set +# CONFIG_PCMCIA_CLPS6700 is not set +# CONFIG_PCMCIA_SA1100 is not set +# CONFIG_PCMCIA_ETNA is not set +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 + +# +# 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 is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD 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 + +# +# 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 dontdiff linux-2.4.27/arch/arm/kernel/Makefile linux-2.4.27-5mx/arch/arm/kernel/Makefile --- linux-2.4.27/arch/arm/kernel/Makefile 2003-08-25 13:44:39.000000000 +0200 +++ linux-2.4.27-5mx/arch/arm/kernel/Makefile 2005-01-02 10:00:02.000000000 +0100 @@ -45,7 +45,7 @@ $(CONFIG_FOOTBRIDGE) $(CONFIG_ARCH_EBSA110) \ $(CONFIG_ARCH_SA1100) $(CONFIG_ARCH_CAMELOT) \ $(CONFIG_ARCH_MX1ADS) $(CONFIG_ARCH_OMAHA) \ - $(CONFIG_ARCH_AT91RM9200) + $(CONFIG_ARCH_AT91RM9200) $(CONFIG_ARCH_PSIONW) ifneq ($(findstring y,$(no-irq-arch)),y) obj-y += irq-arch.o @@ -54,6 +54,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 dontdiff linux-2.4.27/arch/arm/kernel/debug-armv.S linux-2.4.27-5mx/arch/arm/kernel/debug-armv.S --- linux-2.4.27/arch/arm/kernel/debug-armv.S 2003-08-25 13:44:39.000000000 +0200 +++ linux-2.4.27-5mx/arch/arm/kernel/debug-armv.S 2004-12-04 09:29:27.000000000 +0100 @@ -470,6 +470,37 @@ +#elif defined(CONFIG_ARCH_PSIONW) + +#include + + .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 dontdiff linux-2.4.27/arch/arm/kernel/entry-armv.S linux-2.4.27-5mx/arch/arm/kernel/entry-armv.S --- linux-2.4.27/arch/arm/kernel/entry-armv.S 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/kernel/entry-armv.S 2004-12-04 09:29:27.000000000 +0100 @@ -566,7 +566,42 @@ .macro irq_prio_table .endm - + +#elif defined(CONFIG_ARCH_PSIONW) + +#include + + .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 #undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */ diff -urN -X dontdiff linux-2.4.27/arch/arm/kernel/head-armv.S linux-2.4.27-5mx/arch/arm/kernel/head-armv.S --- linux-2.4.27/arch/arm/kernel/head-armv.S 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/kernel/head-armv.S 2004-12-27 15:51:44.000000000 +0100 @@ -130,7 +130,22 @@ */ mov r1, #MACH_TYPE_L7200 #endif - +#if defined(CONFIG_ARCH_PSIONW) /* PSIONW_NONSTANDARD */ + /* + * FIXME5MX Interrupts should be disabled in the boot loader. + * This will cause the kernel not to boot after early 2.4 + * kernels, as the save_and_disable_irqs assumes that fiqs + * are on. If the interrupts are not turned off, this will + * cause the system to hang. Hard to track down too, btw. + * For development, you may want to temporarily use + * mov \temp, #I_BIT | F_BIT | MODE_SVC in function + * save_and_disable_irqs if you are having trouble booting. + */ + mov r8, #0x80000000 @ physical base + mov r9, #0xff00 @ create 0xffff + add r9, r9, #0x00ff @ with two steps + str r9, [r8, #0x050c] @ write to INTENC +#endif mov r0, #F_BIT | I_BIT | MODE_SVC @ make sure svc mode msr cpsr_c, r0 @ and all irqs disabled bl __lookup_processor_type diff -urN -X dontdiff linux-2.4.27/arch/arm/kernel/irq.c linux-2.4.27-5mx/arch/arm/kernel/irq.c --- linux-2.4.27/arch/arm/kernel/irq.c 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/kernel/irq.c 2004-12-04 09:29:27.000000000 +0100 @@ -145,7 +145,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 dontdiff linux-2.4.27/arch/arm/kernel/psionw_pm.c linux-2.4.27-5mx/arch/arm/kernel/psionw_pm.c --- linux-2.4.27/arch/arm/kernel/psionw_pm.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/kernel/psionw_pm.c 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,116 @@ +/* + * Psion battery FIQ handler. Copyright 2002 Tony Lindgren + * + * Modeled after Russell King's dma-rpc.c + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include + +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(®s); + + 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(®s); + 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 dontdiff linux-2.4.27/arch/arm/lib/Makefile linux-2.4.27-5mx/arch/arm/lib/Makefile --- linux-2.4.27/arch/arm/lib/Makefile 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/lib/Makefile 2004-12-04 09:29:27.000000000 +0100 @@ -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 dontdiff linux-2.4.27/arch/arm/lib/psionwfiqs.S linux-2.4.27-5mx/arch/arm/lib/psionwfiqs.S --- linux-2.4.27/arch/arm/lib/psionwfiqs.S 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/lib/psionwfiqs.S 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,37 @@ +/* + * linux/arch/arm/lib/psionwblint.S + * + * Copyright (C) 2002 Tony Lindgren + * + * 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 +#include +#include + .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 dontdiff linux-2.4.27/arch/arm/mach-psionw/Makefile linux-2.4.27-5mx/arch/arm/mach-psionw/Makefile --- linux-2.4.27/arch/arm/mach-psionw/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/Makefile 2004-12-04 09:29:27.000000000 +0100 @@ -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 dontdiff linux-2.4.27/arch/arm/mach-psionw/irq.c linux-2.4.27-5mx/arch/arm/mach-psionw/irq.c --- linux-2.4.27/arch/arm/mach-psionw/irq.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/irq.c 2004-12-04 19:42:49.000000000 +0100 @@ -0,0 +1,217 @@ +/* + * linux/arch/arm/mach-psionw/irq.c + * + * Copyright (C) 2001 Yuji Shinokawa + * Copyright (C) 2001 Tony Lindgren + * + * 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 + +#include +#include +#include +#include + +#include +#include + +#include + +#include + +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 +unmask_irq_int(unsigned int irq); + +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 dontdiff linux-2.4.27/arch/arm/mach-psionw/mm.c linux-2.4.27-5mx/arch/arm/mach-psionw/mm.c --- linux-2.4.27/arch/arm/mach-psionw/mm.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/mm.c 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,50 @@ +/* + * linux/arch/arm/mach-psionw/mm.c + * + * Copyright (C) 2000 Tony Lindgren + * + * 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 +#include +#include + +#include +#include +#include + +#include + +#include + +#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 dontdiff linux-2.4.27/arch/arm/mach-psionw/psionw-arch.c linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-arch.c --- linux-2.4.27/arch/arm/mach-psionw/psionw-arch.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-arch.c 2004-12-27 10:11:07.000000000 +0100 @@ -0,0 +1,109 @@ +/* + * linux/arch/arm/mach-psionw/psionw.c + * + * Copyright (C) 2001 Tony Lindgren + * + * Based on the mach-sa1100 code, some portions of the code + * Copyright (C) 2000 Nicolas Pitre . + * + * 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 +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +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 */ + 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 */ + 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 */ + 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 + LCD_MEM_SIZE) + +/* 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 dontdiff linux-2.4.27/arch/arm/mach-psionw/psionw-hardware.c linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-hardware.c --- linux-2.4.27/arch/arm/mach-psionw/psionw-hardware.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-hardware.c 2004-12-04 09:29:27.000000000 +0100 @@ -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 +#include + +#include +#include + +#include + +/* + * 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 dontdiff linux-2.4.27/arch/arm/mach-psionw/psionw-leds.c linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-leds.c --- linux-2.4.27/arch/arm/mach-psionw/psionw-leds.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-leds.c 2004-12-04 09:29:27.000000000 +0100 @@ -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 +#include + +#include +#include +#include +#include +#include + +#include + +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 dontdiff linux-2.4.27/arch/arm/mach-psionw/psionw-power.c linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-power.c --- linux-2.4.27/arch/arm/mach-psionw/psionw-power.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-power.c 2005-02-05 13:38:42.000000000 +0100 @@ -0,0 +1,252 @@ +/* + * arch/arm/mach-psionw/psionw-power.c - Psion power managemenent + * + * Copyright (C) 2002 Tony Lindgren + * + * Contrast restore after sleep fix (C) 2002 by Simon Howard + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +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); +extern int psion_set_contrast(int new_contrast, int lock); +extern int psion_get_contrast(void); + + +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__("\n" + "mov r0, r0\n" + "mov r0, r0\n" + "mov r0, r0\n" + ); + + /* 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 dontdiff linux-2.4.27/arch/arm/mach-psionw/psionw-time.c linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-time.c --- linux-2.4.27/arch/arm/mach-psionw/psionw-time.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/psionw-time.c 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,171 @@ +/* + * linux/arch/arm/mach-psionw/time.c + * + * RTC handler for Psion 5mx. + * + * Copyright (C) 2001 Yuji Shinokawa + * + * 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 +#include +#include +#include +#include + +#include +#include + +#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 dontdiff linux-2.4.27/arch/arm/mach-psionw/serial-debug.c linux-2.4.27-5mx/arch/arm/mach-psionw/serial-debug.c --- linux-2.4.27/arch/arm/mach-psionw/serial-debug.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mach-psionw/serial-debug.c 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,35 @@ +#include +#include + +#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 dontdiff linux-2.4.27/arch/arm/mm/init.c linux-2.4.27-5mx/arch/arm/mm/init.c --- linux-2.4.27/arch/arm/mm/init.c 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mm/init.c 2005-01-02 10:15:44.000000000 +0100 @@ -383,6 +383,13 @@ reserve_bootmem_node(pgdat, 0xc0000000, 0x00020000); if (machine_is_p720t()) reserve_bootmem_node(pgdat, PHYS_OFFSET, 0x00014000); + +#ifdef CONFIG_ARCH_PSIONW +#include + /* 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 diff -urN -X dontdiff linux-2.4.27/arch/arm/mm/proc-arm720.S linux-2.4.27-5mx/arch/arm/mm/proc-arm720.S --- linux-2.4.27/arch/arm/mm/proc-arm720.S 2004-12-27 15:56:05.000000000 +0100 +++ linux-2.4.27-5mx/arch/arm/mm/proc-arm720.S 2004-12-26 12:17:51.000000000 +0100 @@ -447,7 +447,7 @@ cpu_arm720_name: - .asciz "ARM720T" + .asciz "ARM720T/710T" .align .section ".text.init", #alloc, #execinstr @@ -461,7 +461,7 @@ mrc p15, 0, r0, c1, c0 @ get control register bic r0, r0, #0x0e00 @ ..V. ..RS BLDP WCAM - orr r0, r0, #0x2100 @ .... .... .111 .... (old) + orr r0, r0, #0x0100 @ .... .... .111 .... (old) orr r0, r0, #0x003d @ ..1. ..01 ..11 1101 (new) mov pc, lr @ __ret (head-armv.S) @@ -521,14 +521,16 @@ /* * See linux/include/asm-arm/procinfo.h for a definition of this structure. + * Supports both ARM720T and 710T processors. The cpu_val can be something + * like: 0x41807200 for 720T or 0x41807101 for 710T. What about 740T? */ .section ".proc.info", #alloc, #execinstr .type __arm720_proc_info, #object __arm720_proc_info: - .long 0x41807200 @ cpu_val - .long 0xffffff00 @ cpu_mask + .long 0x41807000 @ cpu_val 720T or 710T + .long 0xfffff000 @ cpu_mask .long 0x00000c1e @ section_mmu_flags b __arm720_setup @ cpu_flush .long cpu_arch_name @ arch_name diff -urN -X dontdiff linux-2.4.27/drivers/char/Config.in linux-2.4.27-5mx/drivers/char/Config.in --- linux-2.4.27/drivers/char/Config.in 2004-12-27 15:56:06.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/Config.in 2004-12-04 09:29:27.000000000 +0100 @@ -166,6 +166,18 @@ tristate 'Anakin touchscreen support' CONFIG_TOUCHSCREEN_ANAKIN fi +if [ "$CONFIG_ARCH_PSIONW" = "y" ]; then + mainmenu_option next_comment + comment 'Psion Windermere Keyboard Locale' + choice 'Psion-Windermere Keyboard Locale' \ + "Psion-UK-Keyboard CONFIG_PSION_KBD_UK \ + Psion-US-Keyboard CONFIG_PSION_KBD_US \ + Psion-DE-Keyboard CONFIG_PSION_KBD_DE \ + Psion-FR-Keyboard CONFIG_PSION_KBD_FR" CONFIG_PSION_KBD_UK + endmenu + bool '/proc/psionw support' CONFIG_PROCFS_PSION +fi + bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256 @@ -299,6 +311,9 @@ if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ] ; then bool 'SGI SN2 fetchop support' CONFIG_FETCHOP fi +if [ "$CONFIG_ARCH_PSIONW" = "y" ]; then + tristate 'Psion Windermere Real Time Clock' CONFIG_PSIONW_RTC +fi if [ "$CONFIG_X86" = "y" -o "$CONFIG_X86_64" = "y" ]; then dep_tristate 'AMD 768/8111 Random Number Generator support' CONFIG_AMD_RNG $CONFIG_PCI diff -urN -X dontdiff linux-2.4.27/drivers/char/Makefile linux-2.4.27-5mx/drivers/char/Makefile --- linux-2.4.27/drivers/char/Makefile 2004-12-27 15:56:06.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/Makefile 2005-02-05 13:37:12.000000000 +0100 @@ -281,6 +281,7 @@ obj-$(CONFIG_MIPS_RTC) += mips_rtc.o obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o obj-$(CONFIG_SA1100_RTC) += sa1100-rtc.o +obj-$(CONFIG_PSIONW_RTC) += psionw-rtc.o obj-$(CONFIG_OMAHA_RTC) += omaha-rtc.o ifeq ($(CONFIG_PPC),) obj-$(CONFIG_NVRAM) += nvram.o @@ -375,6 +376,31 @@ obj-y += ipmi/ipmi.o endif +ifeq ($(CONFIG_ARCH_PSIONW),y) + KEYBD =keyboard_psion.o + CONSOLE =console.o + obj-y += keyboard_psion.o + ifeq ($(CONFIG_PSION_KBD_UK),y) + KEYMAP =keymap_psion.o + obj-y += keymap_psion.o + endif + ifeq ($(CONFIG_PSION_KBD_US),y) + KEYMAP =keymap_psion_us.o + obj-y += keymap_psion_us.o + endif + ifeq ($(CONFIG_PSION_KBD_DE),y) + KEYMAP =keymap_psion_de.o + obj-y += keymap_psion_de.o + endif + ifeq ($(CONFIG_PSION_KBD_FR),y) + KEYMAP =keymap_psion_fr.o + obj-y += keymap_psion_fr.o + endif + ifeq ($(CONFIG_PROCFS_PSION),y) + obj-y += psionw_procfs.o + endif +endif + include $(TOPDIR)/Rules.make fastdep: @@ -390,7 +416,20 @@ .DELETE_ON_ERROR: defkeymap.c: defkeymap.map - set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ qtronixmap.c: qtronixmap.map - set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ + +keymap_psion.c: keymap_psion.map + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ + +keymap_psion_us.c: keymap_psion_us.map + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ + +keymap_psion_de.c: keymap_psion_de.map + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ + +keymap_psion_fr.c: keymap_psion_fr.map + set -e ; loadkeys -u --mktable $< | sed -e 's/^static *//' > $@ + diff -urN -X dontdiff linux-2.4.27/drivers/char/console.c linux-2.4.27-5mx/drivers/char/console.c --- linux-2.4.27/drivers/char/console.c 2004-12-27 15:56:07.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/console.c 2004-12-04 09:29:27.000000000 +0100 @@ -2523,7 +2523,14 @@ vc_cons[currcons].d->vc_palette[k++] = default_grn[j] ; vc_cons[currcons].d->vc_palette[k++] = default_blu[j] ; } + +#ifdef CONFIG_ARCH_PSIONW /* PSIONW_NONSTANDARD */ + /* setterm -foreground 9 should do, but doesn't */ + def_color = 0x0f; /* really white */ +#else def_color = 0x07; /* white */ +#endif + ulcolor = 0x0f; /* bold white */ halfcolor = 0x08; /* grey */ init_waitqueue_head(&vt_cons[currcons]->paste_wait); diff -urN -X dontdiff linux-2.4.27/drivers/char/keyboard.c linux-2.4.27-5mx/drivers/char/keyboard.c --- linux-2.4.27/drivers/char/keyboard.c 2004-12-27 15:56:07.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keyboard.c 2004-12-26 12:00:10.000000000 +0100 @@ -122,17 +122,17 @@ static k_handfn do_self, do_fn, do_spec, do_pad, do_dead, do_cons, do_cur, do_shift, do_meta, do_ascii, do_lock, do_lowercase, do_slock, do_dead2, - do_ignore; + do_ignore, do_arch; /* PSIONW_NONSTANDARD */ static k_hand key_handler[16] = { do_self, do_fn, do_spec, do_pad, do_dead, do_cons, do_cur, do_shift, do_meta, do_ascii, do_lock, do_lowercase, do_slock, do_dead2, - do_ignore, do_ignore + do_ignore, do_arch }; /* Key types processed even in raw modes */ -#define TYPES_ALLOWED_IN_RAW_MODE ((1 << KT_SPEC) | (1 << KT_SHIFT)) +#define TYPES_ALLOWED_IN_RAW_MODE ((1 << KT_SPEC) | (1 << KT_CONS) | (1 << KT_SLOCK) | (1 << KT_SHIFT) | (1 << KT_ARCH1) | (1 << KT_ARCH2) | (1 << KT_ARCH3)) typedef void (*void_fnp)(void); typedef void (void_fn)(void); @@ -156,7 +156,7 @@ 255, SIZE(func_table) - 1, SIZE(spec_fn_table) - 1, NR_PAD - 1, NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1, 255, - NR_LOCK - 1, 255 + NR_LOCK - 1, 255, 0, 11 }; const int NR_TYPES = SIZE(max_vals); @@ -169,7 +169,7 @@ struct pt_regs * kbd_pt_regs; #ifdef CONFIG_MAGIC_SYSRQ -static int sysrq_pressed; +int sysrq_pressed; #endif static struct pm_dev *pm_kbd; @@ -376,8 +376,15 @@ if (type >= 0xf0) { type -= 0xf0; - if (raw_mode && ! (TYPES_ALLOWED_IN_RAW_MODE & (1 << type))) - goto out; + +#if 0 + printk("keysym=0x%x type=0x%x 0x%x && 0x%x\n", + keysym, type, raw_mode, !(TYPES_ALLOWED_IN_RAW_MODE & (1<slockstate = 0; } else { /* maybe only if (kbd->kbdmode == VC_UNICODE) ? */ @@ -616,6 +625,13 @@ compute_shiftstate(); } +static void do_arch(unsigned char value, char up_flag) +{ +#ifdef kbd_arch_handler + kbd_arch_handler(value,up_flag); +#endif +} + static void do_spec(unsigned char value, char up_flag) { if (up_flag) diff -urN -X dontdiff linux-2.4.27/drivers/char/keyboard_psion.c linux-2.4.27-5mx/drivers/char/keyboard_psion.c --- linux-2.4.27/drivers/char/keyboard_psion.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keyboard_psion.c 2004-12-19 20:51:52.000000000 +0100 @@ -0,0 +1,337 @@ +/* + * arch/arm/drivers/char/keyboard_psion.c - Keyboard Driver for Psion + * + * Copyright (C) 1998 Roger Gammans + * Copyright (C) 2001 Tony Lindgren + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "keyboard_psion.h" + +/* callback function for auto sleep */ +void (*psion_sleep_set_callback)(void); + +extern void psionw_lcd_powerdown(int lock); +extern void psionw_lcd_powerup(int lock); + +unsigned int kbd_delay[] = KB_DELAY; +static int keysdown = 0; +static struct tq_struct kbdhw_task; + +#ifdef CONFIG_MAGIC_SYSRQ +unsigned char kbdpsion_sysrq_xlate[] = + "\000" "6" "5" "4" "3" "2" "1" "\000" + "\000" "'" "\000" "0" "9" "8" "7" "\000" + "\000" "y" "t" "r" "e" "w" "q" "\000" + "\000" "\012" "l" "p" "o" "i" "u" "\000" + "\000" "g" "f" "d" "s" "a" "\011" "\000" + "\000" "\000" "." "m" "k" "j" "h" "\000" + "\000" "n" "b" "v" "c" "x" "z" "\000" + "\000" "\000" "\000" "," "\000" " " "\000"; +#endif + +void psion_cleartable(void) +{ + int key; + unsigned int t; + + for (key = 0; key < NR_KEYCODES; key++) { + if (!kbdstate[key].in) + continue; + + /* + * dont worry these ops are commutative and + * assoicative + */ + t = (jiffies - kbdstate[key].jif) & KB_JIFMASK; + if (t>KB_DEB_JIFFY) { + + /* Keboard could have changed meanwhile */ + kbdstate[key].in = 0; + keysdown--; + /* printk("Releasing key:%x\n",key); */ + handle_scancode(key, 0); + } + } +} + +static void kbd_press(int keycode) +{ + unsigned char newpress = 0; + + if (!kbdstate[keycode].in) { + keysdown++; + newpress = 1; + /* printk("Keycode: %d (0x%x)\n", keycode, keycode); */ + } + + /* + * We approximate a retriggable monostable + * action. + */ + kbdstate[keycode].in=1; + + /* We only need to ensure keysdown consistent */ + kbdstate[keycode].jif = jiffies & KB_JIFMASK; + if (newpress) { + handle_scancode(keycode, 1); + if (psion_sleep_set_callback != 0) + (*psion_sleep_set_callback)(); + } +} + +static void psion_tick(void* dummy) +{ + int col,row; + int rowd; + int count=0; + unsigned char state; + + /* + * Check if any keys are depressed + */ + for (col = 0; col < 8; col++) { + udelay(kbd_delay[8]); + state = psionw_readl(KSCAN); + state &= ~KBDSCAN; + state |= (KBSC_COL0 + col); + psionw_writel(state, KSCAN); + udelay(kbd_delay[col]); + rowd = psionw_readl(PADR) & 0xff; + if (!rowd) + continue; + for (row=0; row < KB_LASTROW; row++) { + if (rowd & KB_ROWMASK(row)) { + kbd_press(KEYCODE(row,col)); + count++; + } + } + }; + + if (count != keysdown) { + psion_cleartable(); + } + + /* + * Re-queue ourselves + */ + queue_task(&kbdhw_task,&tq_timer); +} + +void kbdpsion_hw_init(void) +{ + kbdhw_task.routine = psion_tick; + kbdhw_task.sync = 0; + queue_task(&kbdhw_task,&tq_timer); +} + +int kbdpsion_translate(unsigned char scancode, unsigned char *keycode_p) +{ + *keycode_p = scancode & ~(KBDOWN | KBUP); + return 1; +} + +#if defined(CONFIG_VT) && defined(CONFIG_MAGIC_SYSRQ) +extern int sysrq_pressed; +#endif + +void psion_arch_handler(unsigned char value, char up_flag) +{ +#if defined(CONFIG_VT) && defined(CONFIG_MAGIC_SYSRQ) + if (value == 1) { + sysrq_pressed = !up_flag; + return; + } +#endif + if (up_flag) return; + switch (value) { + +#ifdef KBD_ARCHKEY_2 + case 2: + KBD_ARCHKEY_2; + break; +#endif +#ifdef KBD_ARCHKEY_3 + case 3: + KBD_ARCHKEY_3; + break; +#endif +#ifdef KBD_ARCHKEY_4 + case 4: + KBD_ARCHKEY_4; + break; +#endif +#ifdef KBD_ARCHKEY_5 + case 5: + KBD_ARCHKEY_5; + break; +#endif +#ifdef KBD_ARCHKEY_6 + case 6: + KBD_ARCHKEY_6; + break; +#endif +#ifdef KBD_ARCHKEY_7 + case 7: + KBD_ARCHKEY_7; + break; +#endif +#ifdef KBD_ARCHKEY_8 + case 8: + KBD_ARCHKEY_8; + break; +#endif +#ifdef KBD_ARCHKEY_9 + case 9: + KBD_ARCHKEY_9; + break; +#endif +#ifdef KBD_ARCHKEY_10 + case 10: + KBD_ARCHKEY_10; + break; +#endif +#ifdef KBD_ARCHKEY_11 + case 11: + KBD_ARCHKEY_11; + break; +#endif + + default: + return; + } +} + +void psion_toggle_backlight() +{ + int pcdr; + long flags; + + if ((psionw_readl(LCDCTL) & LCDCTL_EN) == 0) + psionw_lcd_powerup(1); + + save_flags_cli(flags); + pcdr = psionw_readl(PCDR); + pcdr ^= PCDR_LIGHT; + psionw_writel(pcdr, PCDR); + restore_flags(flags); +} + +/* + * Contrast table. Upper four bits: output value, lower four bits: direction + * (0 = in = Z) + */ +#define V0 0 +#define V1 1 +#define VZ 0 +#define D0 1 +#define D1 1 +#define DZ 0 + +#define C(a,b,c,d) \ + ((V##a << 7) | (V##b << 6) | (V##c << 5) | (V##d << 4) | \ + (D##a << 3) | (D##b << 2) | (D##c << 1) | D##d) + +static __u8 contrast_table[] = { + C(1,1,1,1), C(1,1,1,Z), C(1,1,1,0), C(1,1,Z,1), /* 1- 4 */ + C(1,1,Z,Z), C(1,1,0,1), C(1,1,Z,0), C(1,Z,1,1), /* 5- 8 */ + C(1,1,0,0), C(1,Z,1,Z), C(1,Z,1,0), C(1,Z,Z,1), /* 9-12 */ + C(1,0,1,1), C(1,Z,Z,Z), C(1,Z,0,1), C(1,0,1,Z), /* 13-16 */ + C(1,0,1,0), C(1,0,Z,1), C(1,Z,0,0), C(Z,1,1,Z), /* 17-20 */ + C(1,0,Z,Z), C(1,0,0,1), C(1,0,Z,0), C(1,0,0,Z), /* 21-24 */ + C(Z,1,Z,Z), C(1,0,0,0), C(Z,1,Z,0), C(Z,1,0,Z), /* 25-28 */ + C(Z,1,0,0), C(Z,Z,1,Z), C(Z,Z,1,0), C(Z,Z,Z,1), /* 29-32 */ + C(0,1,1,0), C(0,1,Z,1), C(Z,Z,0,1), C(Z,0,1,Z), /* 33-36 */ + C(0,1,Z,Z), C(Z,Z,0,Z), C(0,1,Z,0), C(Z,Z,0,0), /* 37-40 */ + C(0,1,0,Z), C(Z,0,Z,Z), C(0,1,0,0), C(Z,0,Z,0), /* 41-44 */ + C(0,Z,1,0), C(0,Z,Z,1), C(Z,0,0,0), C(0,0,1,1), /* 45-48 */ + C(0,Z,Z,Z), C(0,Z,0,1), C(0,Z,Z,0), C(0,0,1,0), /* 49-52 */ + C(0,0,Z,1), C(0,Z,0,0), C(0,0,Z,Z), C(0,0,0,1), /* 53-56 */ + C(0,0,Z,0), C(0,0,0,Z), C(0,0,0,0) /* 57-60 */ +}; + +static int contrast = 40; + +int psion_get_contrast(void) +{ + return contrast; +} + +int psion_set_contrast(int new_contrast, int lock) +{ + long flags = 0; + + if ((new_contrast >= 0) && (new_contrast < sizeof(contrast_table))) { + contrast = new_contrast; + } + else { + printk("Bad contrast value: %i, should be between 0 - %d\n", + new_contrast, sizeof(contrast_table) - 1); + return -EINVAL; + } + + if (lock) + save_flags_cli(flags); + + psionw_writeb((psionw_readb(PBDR) & ~PBDR_VLD_MASK) | + ((contrast_table[contrast] >> 4) << PBDR_VLD_SHIFT), + PBDR); + psionw_writeb((psionw_readb(PBDDR) & ~PBDR_VLD_MASK) | + ((contrast_table[contrast] & 0xf) << PBDR_VLD_SHIFT), + PBDDR); + + if (lock) + restore_flags(flags); + + return 0; +} + +void psion_contrast(int increase) +{ + + if (increase) + if (contrast == sizeof(contrast_table)-1) return; + else contrast++; + else if (!contrast) return; + else contrast--; + + psion_set_contrast(contrast, 1); +} + +void debug_gpio(void) +{ + printk("\nPADR=0x%02x PBDR=0x%02x PCDR=0x%02x PDDR=0x%02x PEDR=0x%02x ", + psionw_readb(PADR), + psionw_readb(PBDR), + psionw_readb(PCDR), + psionw_readb(PDDR), + psionw_readb(PEDR)); + + printk("PADDR=0x%02x PBDDR=0x%02x\n", + psionw_readb(PADDR), + psionw_readb(PBDDR)); +} diff -urN -X dontdiff linux-2.4.27/drivers/char/keyboard_psion.h linux-2.4.27-5mx/drivers/char/keyboard_psion.h --- linux-2.4.27/drivers/char/keyboard_psion.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keyboard_psion.h 2005-02-05 13:51:07.000000000 +0100 @@ -0,0 +1,127 @@ +/* + * arch/arm/drivers/char/keyboard_psion.h + * + * Psion keyboard definitions. + * + * Copyright (C) 1998 Roger Gammans + * Copyright (C) 2000 Tony Lindgren + * + * 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_PSION_H +#define __ASM_ARCH_PSION_H + +#include + +#define KBDSCAN 0x0000000f /* Keyboard scan */ +#define KBSC_HI 0x0 /* All driven high */ +#define KBSC_LO 0x1 /* All driven low */ +#define KBSC_X 0x2 /* All high impedance */ +#define KBSC_COL0 0x8 /* Col 0 high, others high impedance */ +#define KBSC_COL1 0x9 /* Col 1 high, others high impedance */ +#define KBSC_COL2 0xa /* Col 2 high, others high impedance */ +#define KBSC_COL3 0xb /* Col 3 high, others high impedance */ +#define KBSC_COL4 0xc /* Col 4 high, others high impedance */ +#define KBSC_COL5 0xd /* Col 5 high, others high impedance */ +#define KBSC_COL6 0xe /* Col 6 high, others high impedance */ +#define KBSC_COL7 0xf /* Col 7 high, others high impedance */ + +#define KB_JIFMASK (127) + +/* + * Arm's keyboard is active high row select... + * (must try to remember) + */ +#define KB_ALLCOLS KBSC_HI +#define KB_DISCHARGE KBSC_LO +#define KB_LASTROW 7 + +#define KBUP (0x80) +#define KBDOWN (0) + +/* + * Later on we'll try a struct of + * two arrays then the existing keyboard.c can + * test our array directly but until then.... + */ +typedef struct { + int in:1; /* If the key down */ + int jif:7; /* how long has key been down for (approx) */ +} kbd_keyinfo; + +static kbd_keyinfo kbdstate[NR_KEYCODES]; + +#ifdef KB_DELAY +extern unsigned int kbd_delay[]; +#endif + +/* + * Be sure to change the if you increase the + * number of kbd rows... + */ +#define KEYCODE(r,c) ( ((c)<<3) + (r)+1) +#define KB_ROWMASK(r) (1 << (r)) + +/* + * KB_DELAY is used to allow the matrix + * to stabilize.., value is determined via + * experimentation. + */ + +#define KB_DELAY {16 ,16 ,16 ,16 ,16 ,16 ,16 ,16 ,16} + +/* + * Not sure whether this trick works yet! + * + */ +#undef KBD_SUPPORTS_WIREOR + +/* + * treat debounce monostable as 30ms + */ + +#define KB_DEB_JIFFY (30/HZ) + +extern void psion_off(void); +void psion_toggle_backlight(void); +void psion_contrast(int increase); +void psion_debug_cf(void); + +/* + * Architecture-specific keys. Value 0 is invalid. 1 is SysRq. + * Ctrl-Alt = Ctrl-Menu on Psion, For example: SysRq = Ctrl-Menu-, + */ +#define KBD_ARCHKEY_2 psion_off() /* Fn-Off */ +#define KBD_ARCHKEY_3 psion_toggle_backlight() /* Fn-Space */ +#define KBD_ARCHKEY_4 psion_contrast(0) /* Fn-- */ +#define KBD_ARCHKEY_5 psion_contrast(1) /* Fn-+ */ + +/* KBD_ARCHKEY_6 to KBD_ARCHKEY_11 reserved for debugging */ +#define KBD_ARCHKEY_6 0 /* Ctrl-Menu-z */ + +#ifdef CONFIG_PCMCIA_ETNA +extern void psion_debug_etna(void); +#define KBD_ARCHKEY_7 psion_debug_etna() /* Ctrl-Menu-x */ +#else +#define KBD_ARCHKEY_7 debug_gpio() /* Ctrl-Menu-x */ +#endif + +#define KBD_ARCHKEY_8 0 /* Ctrl-Menu-c */ +#define KBD_ARCHKEY_9 0 /* Ctrl-Menu-v */ +#define KBD_ARCHKEY_8 0 +#define KBD_ARCHKEY_9 0 + +#endif diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion.c linux-2.4.27-5mx/drivers/char/keymap_psion.c --- linux-2.4.27/drivers/char/keymap_psion.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion.c 2005-02-05 15:39:38.000000000 +0100 @@ -0,0 +1,374 @@ +/* Do not edit this file! It was automatically generated by */ +/* loadkeys --mktable defkeymap.map > defkeymap.c */ + +#include +#include +#include + +u_short plain_map[NR_KEYS] = { + 0xf200, 0xf036, 0xf035, 0xf034, 0xf033, 0xf032, 0xf031, 0xf10c, + 0xf200, 0xf027, 0xf07f, 0xf030, 0xf039, 0xf038, 0xf037, 0xf10e, + 0xf200, 0xfb79, 0xfb74, 0xfb72, 0xfb65, 0xfb77, 0xfb71, 0xf01b, + 0xf200, 0xf201, 0xfb6c, 0xfb70, 0xfb6f, 0xfb69, 0xfb75, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb61, 0xf009, 0xfc02, + 0xf200, 0xf600, 0xf02e, 0xfb6d, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb7a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf02c, 0xf603, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_map[NR_KEYS] = { + 0xf200, 0xf05e, 0xf025, 0xf024, 0x00a3, 0xf022, 0xf021, 0xf10c, + 0xf200, 0xf07e, 0xf07f, 0xf029, 0xf028, 0xf02a, 0xf026, 0xf10e, + 0xf200, 0xfb59, 0xfb54, 0xfb52, 0xfb45, 0xfb57, 0xfb51, 0xf01b, + 0xf200, 0xf201, 0xfb4c, 0xfb50, 0xfb4f, 0xfb49, 0xfb55, 0xfc03, + 0xf200, 0xfb47, 0xfb46, 0xfb44, 0xfb53, 0xfb41, 0xf009, 0xfc02, + 0xf200, 0xf20b, 0xf03f, 0xfb4d, 0xfb4b, 0xfb4a, 0xfb48, 0xfc01, + 0xf200, 0xfb4e, 0xfb42, 0xfb56, 0xfb43, 0xfb58, 0xfb5a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf02f, 0xf20a, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf03e, 0xf03c, 0xf040, 0xf05c, 0xf023, 0xf05f, 0xf10c, + 0xf200, 0xf03a, 0xf060, 0xf07d, 0xf07b, 0xf05d, 0xf05b, 0xf10e, + 0xf200, 0xf30c, 0xf07c, 0xfb72, 0xfb65, 0xfb77, 0xfb71, 0xff02, + 0xf200, 0xf201, 0xf03b, 0xf03d, 0xf02d, 0xf02b, 0xf30d, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb61, 0xf207, 0xfc02, + 0xf200, 0xf118, 0xff05, 0xff04, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb7a, 0xfc00, + 0xf200, 0xf117, 0xf114, 0xf200, 0xf119, 0xff03, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf01e, 0xf200, 0xf200, 0xf01c, 0xf200, 0xf01f, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf01d, 0xf01b, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf01a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf01a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short alt_map[NR_KEYS] = { + 0xf200, 0xf505, 0xf504, 0xf503, 0xf502, 0xf501, 0xf500, 0xf10c, + 0xf200, 0xf200, 0xf116, 0xf509, 0xf508, 0xf507, 0xf506, 0xf10e, + 0xf200, 0xf879, 0xf874, 0xf872, 0xf865, 0xf877, 0xf871, 0xf81b, + 0xf200, 0xf201, 0xf86c, 0xf870, 0xf86f, 0xf869, 0xf875, 0xfc03, + 0xf200, 0xf867, 0xf866, 0xf864, 0xf873, 0xf861, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf86d, 0xf86b, 0xf86a, 0xf868, 0xfc01, + 0xf200, 0xf86e, 0xf862, 0xf876, 0xf863, 0xf878, 0xf87a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf20c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf819, 0xf814, 0xf812, 0xf805, 0xf817, 0xf811, 0xf200, + 0xf200, 0xf201, 0xf80c, 0xf810, 0xf80f, 0xf809, 0xf815, 0xfc03, + 0xf200, 0xf807, 0xf806, 0xf804, 0xf813, 0xf801, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf80d, 0xf80b, 0xf80a, 0xf808, 0xfc01, + 0xf200, 0xff0b, 0xff0a, 0xff09, 0xff08, 0xff07, 0xff06, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xff01, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +ushort *key_maps[MAX_NR_KEYMAPS] = { + plain_map, shift_map, altgr_map, 0, + ctrl_map, shift_ctrl_map, 0, 0, + alt_map, 0, 0, 0, + ctrl_alt_map, 0 +}; + +unsigned int keymap_count = 7; + +/* + * Philosophy: most people do not define more strings, but they who do + * often want quite a lot of string space. So, we statically allocate + * the default and allocate dynamically in chunks of 512 bytes. + */ + +char func_buf[] = { + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, +}; + +char *funcbufptr = func_buf; +int funcbufsize = sizeof(func_buf); +int funcbufleft = 0; /* space left */ + +char *func_table[MAX_NR_FUNC] = { + func_buf + 0, + func_buf + 5, + func_buf + 10, + func_buf + 15, + func_buf + 20, + func_buf + 25, + func_buf + 31, + func_buf + 37, + func_buf + 43, + func_buf + 49, + func_buf + 55, + func_buf + 61, + func_buf + 67, + func_buf + 73, + func_buf + 79, + func_buf + 85, + func_buf + 91, + func_buf + 97, + func_buf + 103, + func_buf + 109, + func_buf + 115, + func_buf + 120, + func_buf + 125, + func_buf + 130, + func_buf + 135, + func_buf + 140, + func_buf + 145, + 0, + 0, + func_buf + 149, + 0, +}; + +struct kbdiacr accent_table[MAX_DIACR] = { + {'`', 'A', '\300'}, {'`', 'a', '\340'}, + {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, + {'^', 'A', '\302'}, {'^', 'a', '\342'}, + {'~', 'A', '\303'}, {'~', 'a', '\343'}, + {'"', 'A', '\304'}, {'"', 'a', '\344'}, + {'O', 'A', '\305'}, {'o', 'a', '\345'}, + {'0', 'A', '\305'}, {'0', 'a', '\345'}, + {'A', 'A', '\305'}, {'a', 'a', '\345'}, + {'A', 'E', '\306'}, {'a', 'e', '\346'}, + {',', 'C', '\307'}, {',', 'c', '\347'}, + {'`', 'E', '\310'}, {'`', 'e', '\350'}, + {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, + {'^', 'E', '\312'}, {'^', 'e', '\352'}, + {'"', 'E', '\313'}, {'"', 'e', '\353'}, + {'`', 'I', '\314'}, {'`', 'i', '\354'}, + {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, + {'^', 'I', '\316'}, {'^', 'i', '\356'}, + {'"', 'I', '\317'}, {'"', 'i', '\357'}, + {'-', 'D', '\320'}, {'-', 'd', '\360'}, + {'~', 'N', '\321'}, {'~', 'n', '\361'}, + {'`', 'O', '\322'}, {'`', 'o', '\362'}, + {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, + {'^', 'O', '\324'}, {'^', 'o', '\364'}, + {'~', 'O', '\325'}, {'~', 'o', '\365'}, + {'"', 'O', '\326'}, {'"', 'o', '\366'}, + {'/', 'O', '\330'}, {'/', 'o', '\370'}, + {'`', 'U', '\331'}, {'`', 'u', '\371'}, + {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, + {'^', 'U', '\333'}, {'^', 'u', '\373'}, + {'"', 'U', '\334'}, {'"', 'u', '\374'}, + {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, + {'T', 'H', '\336'}, {'t', 'h', '\376'}, + {'s', 's', '\337'}, {'"', 'y', '\377'}, + {'s', 'z', '\337'}, {'i', 'j', '\377'}, +}; + +unsigned int accent_table_size = 68; diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion.map linux-2.4.27-5mx/drivers/char/keymap_psion.map --- linux-2.4.27/drivers/char/keymap_psion.map 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion.map 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,234 @@ +# arch/arm/drivers/char/keymap_psion.map - UK (default) keyboard map +# +# Written 1998,1999 by Werner Almesberger +# +# based on keymap_geo.map, string and compose def's taken from +# drivers/char/defkeymap.map +# +# Special keys: +# F13 REC F14 STOP F15 PLAY +# F16 Contrast-- F17 Contrast++ F18 Backlight + +# Default kernel keymap. This uses 7 modifier combinations. +keymaps 0-2,4-5,8,12 + + keycode 1 = six asciicircum +alt keycode 1 = Console_6 +altgr keycode 1 = greater +control keycode 1 = Control_asciicircum + keycode 2 = five percent +alt keycode 2 = Console_5 +altgr keycode 2 = less + keycode 3 = four dollar +alt keycode 3 = Console_4 +altgr keycode 3 = at + keycode 4 = three sterling +alt keycode 4 = Console_3 +altgr keycode 4 = backslash +control keycode 4 = Control_backslash + keycode 5 = two quotedbl +alt keycode 5 = Console_2 +altgr keycode 5 = numbersign + keycode 6 = one exclam +alt keycode 6 = Console_1 +altgr keycode 6 = underscore +control keycode 6 = Control_underscore + keycode 7 = F13 # REC + + keycode 8 = VoidSymbol + keycode 9 = apostrophe asciitilde +altgr keycode 9 = colon + keycode 10 = Delete +alt keycode 10 = Remove +altgr keycode 10 = grave +control alt keycode 10 = Boot + keycode 11 = zero parenright +alt keycode 11 = Console_10 +altgr keycode 11 = braceright + keycode 12 = nine parenleft +alt keycode 12 = Console_9 +altgr keycode 12 = braceleft + keycode 13 = eight asterisk +alt keycode 13 = Console_8 +altgr keycode 13 = bracketright +control keycode 13 = Control_bracketright + keycode 14 = seven ampersand +alt keycode 14 = Console_7 +altgr keycode 14 = bracketleft +control keycode 14 = Escape + keycode 15 = F15 # PLAY + + keycode 16 = VoidSymbol + keycode 17 = y +altgr keycode 17 = KP_Multiply + keycode 18 = t +altgr keycode 18 = bar + keycode 19 = r + keycode 20 = e + keycode 21 = w + keycode 22 = q + keycode 23 = Escape Escape +alt keycode 23 = Meta_Escape +altgr keycode 23 = 0xf02 # OFF + + keycode 24 = VoidSymbol + keycode 25 = Return + keycode 26 = l +altgr keycode 26 = semicolon + keycode 27 = p +altgr keycode 27 = equal + keycode 28 = o +altgr keycode 28 = minus + keycode 29 = i +altgr keycode 29 = plus + keycode 30 = u +altgr keycode 30 = KP_Divide + keycode 31 = SAlt # Menu + + keycode 32 = VoidSymbol + keycode 33 = g + keycode 34 = f + keycode 35 = d + keycode 36 = s + keycode 37 = a + keycode 38 = Tab +altgr keycode 38 = Caps_Lock + keycode 39 = SControl + + keycode 40 = VoidSymbol + keycode 41 = Down Scroll_Backward +altgr keycode 41 = Prior + keycode 42 = period question +altgr keycode 42 = 0xf05 # Contrast++ + keycode 43 = m +altgr keycode 43 = 0xf04 # Contrast-- + keycode 44 = k + keycode 45 = j + keycode 46 = h + keycode 47 = SAltGr # Fn + + keycode 48 = VoidSymbol + keycode 49 = n +control alt keycode 49 = 0xf0b # Debug 5 + keycode 50 = b +control alt keycode 50 = 0xf0a # Debug 4 + keycode 51 = v +control alt keycode 51 = 0xf09 # Debug 3 + keycode 52 = c +control alt keycode 52 = 0xf08 # Debug 2 + keycode 53 = x +control alt keycode 53 = 0xf07 # Debug 1 + keycode 54 = z +control alt keycode 54 = 0xf06 # Debug 0 + keycode 55 = SShift + + keycode 56 = VoidSymbol + keycode 57 = Right +altgr keycode 57 = Select # End + keycode 58 = Left +altgr keycode 58 = Find # Home + keycode 59 = comma slash +control alt keycode 59 = 0xf01 # SysRq + keycode 60 = Up Scroll_Forward +altgr keycode 60 = Next + keycode 61 = space +altgr keycode 61 = 0xf03 # Backlight + keycode 62 = F14 # STOP + keycode 63 = SShift + +string F1 = "\033[[A" +string F2 = "\033[[B" +string F3 = "\033[[C" +string F4 = "\033[[D" +string F5 = "\033[[E" +string F6 = "\033[17~" +string F7 = "\033[18~" +string F8 = "\033[19~" +string F9 = "\033[20~" +string F10 = "\033[21~" +string F11 = "\033[23~" +string F12 = "\033[24~" +string F13 = "\033[25~" +string F14 = "\033[26~" +string F15 = "\033[28~" +string F16 = "\033[29~" +string F17 = "\033[31~" +string F18 = "\033[32~" +string F19 = "\033[33~" +string F20 = "\033[34~" +string Find = "\033[1~" +string Insert = "\033[2~" +string Remove = "\033[3~" +string Select = "\033[4~" +string Prior = "\033[5~" +string Next = "\033[6~" +string Macro = "\033[M" +string Pause = "\033[P" +compose '`' 'A' to 'À' +compose '`' 'a' to 'à' +compose '\'' 'A' to 'Á' +compose '\'' 'a' to 'á' +compose '^' 'A' to 'Â' +compose '^' 'a' to 'â' +compose '~' 'A' to 'Ã' +compose '~' 'a' to 'ã' +compose '"' 'A' to 'Ä' +compose '"' 'a' to 'ä' +compose 'O' 'A' to 'Å' +compose 'o' 'a' to 'å' +compose '0' 'A' to 'Å' +compose '0' 'a' to 'å' +compose 'A' 'A' to 'Å' +compose 'a' 'a' to 'å' +compose 'A' 'E' to 'Æ' +compose 'a' 'e' to 'æ' +compose ',' 'C' to 'Ç' +compose ',' 'c' to 'ç' +compose '`' 'E' to 'È' +compose '`' 'e' to 'è' +compose '\'' 'E' to 'É' +compose '\'' 'e' to 'é' +compose '^' 'E' to 'Ê' +compose '^' 'e' to 'ê' +compose '"' 'E' to 'Ë' +compose '"' 'e' to 'ë' +compose '`' 'I' to 'Ì' +compose '`' 'i' to 'ì' +compose '\'' 'I' to 'Í' +compose '\'' 'i' to 'í' +compose '^' 'I' to 'Î' +compose '^' 'i' to 'î' +compose '"' 'I' to 'Ï' +compose '"' 'i' to 'ï' +compose '-' 'D' to 'Ð' +compose '-' 'd' to 'ð' +compose '~' 'N' to 'Ñ' +compose '~' 'n' to 'ñ' +compose '`' 'O' to 'Ò' +compose '`' 'o' to 'ò' +compose '\'' 'O' to 'Ó' +compose '\'' 'o' to 'ó' +compose '^' 'O' to 'Ô' +compose '^' 'o' to 'ô' +compose '~' 'O' to 'Õ' +compose '~' 'o' to 'õ' +compose '"' 'O' to 'Ö' +compose '"' 'o' to 'ö' +compose '/' 'O' to 'Ø' +compose '/' 'o' to 'ø' +compose '`' 'U' to 'Ù' +compose '`' 'u' to 'ù' +compose '\'' 'U' to 'Ú' +compose '\'' 'u' to 'ú' +compose '^' 'U' to 'Û' +compose '^' 'u' to 'û' +compose '"' 'U' to 'Ü' +compose '"' 'u' to 'ü' +compose '\'' 'Y' to 'Ý' +compose '\'' 'y' to 'ý' +compose 'T' 'H' to 'Þ' +compose 't' 'h' to 'þ' +compose 's' 's' to 'ß' +compose '"' 'y' to 'ÿ' +compose 's' 'z' to 'ß' +compose 'i' 'j' to 'ÿ' diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_de.c linux-2.4.27-5mx/drivers/char/keymap_psion_de.c --- linux-2.4.27/drivers/char/keymap_psion_de.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_de.c 2005-02-05 15:38:50.000000000 +0100 @@ -0,0 +1,374 @@ +/* Do not edit this file! It was automatically generated by */ +/* loadkeys --mktable defkeymap.map > defkeymap.c */ + +#include +#include +#include + +u_short plain_map[NR_KEYS] = { + 0xf200, 0xf036, 0xf035, 0xf034, 0xf033, 0xf032, 0xf031, 0xf10c, + 0xf200, 0xf023, 0xf07f, 0xf030, 0xf039, 0xf038, 0xf037, 0xf10e, + 0xf200, 0xfb7a, 0xfb74, 0xfb72, 0xfb65, 0xfb77, 0xfb71, 0xf01b, + 0xf200, 0xf201, 0xfb6c, 0xfb70, 0xfb6f, 0xfb69, 0xfb75, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb61, 0xf009, 0xfc02, + 0xf200, 0xf600, 0xf02c, 0xfb6d, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb79, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf02e, 0xf603, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_map[NR_KEYS] = { + 0xf200, 0xf026, 0xf025, 0xf024, 0x00a7, 0xf022, 0xf021, 0xf10c, + 0xf200, 0xf02a, 0xf07f, 0xf027, 0xf029, 0xf028, 0xf03f, 0xf10e, + 0xf200, 0xfb5a, 0xfb54, 0xfb52, 0xfb45, 0xfb57, 0xfb51, 0xf01b, + 0xf200, 0xf201, 0xfb4c, 0xfb50, 0xfb4f, 0xfb49, 0xfb55, 0xfc03, + 0xf200, 0xfb47, 0xfb46, 0xfb44, 0xfb53, 0xfb41, 0xf009, 0xfc02, + 0xf200, 0xf20b, 0xf03b, 0xfb4d, 0xfb4b, 0xfb4a, 0xfb48, 0xfc01, + 0xf200, 0xfb4e, 0xfb42, 0xfb56, 0xfb43, 0xfb58, 0xfb59, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf03a, 0xf20a, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf03e, 0xf03c, 0xf07e, 0xf05c, 0xf02f, 0xf05f, 0xf10c, + 0xf200, 0xf03d, 0xf060, 0xf07d, 0xf07b, 0xf05d, 0xf05b, 0xf10e, + 0xf200, 0xfb7a, 0xf07c, 0x00ba, 0x00a4, 0xf05e, 0xf040, 0xff02, + 0xf200, 0xf201, 0xf02d, 0x00df, 0x00f6, 0x00b5, 0x00fc, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0x00e4, 0xf207, 0xfc02, + 0xf200, 0xf119, 0xff05, 0xff04, 0xf02b, 0x00f7, 0x00d7, 0xfc01, + 0xf200, 0xfb6e, 0xf402, 0xf403, 0x00b4, 0xf060, 0x00a8, 0xfc00, + 0xf200, 0xf117, 0xf114, 0xf200, 0xf118, 0xff03, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf01c, 0xf200, 0xf01f, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf01d, 0xf01b, 0xf10e, + 0xf200, 0xf01a, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf019, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf01a, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf019, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short alt_map[NR_KEYS] = { + 0xf200, 0xf505, 0xf504, 0xf503, 0xf502, 0xf501, 0xf500, 0xf10c, + 0xf200, 0xf200, 0xf116, 0xf509, 0xf508, 0xf507, 0xf506, 0xf10e, + 0xf200, 0xf87a, 0xf874, 0xf872, 0xf865, 0xf877, 0xf871, 0xf81b, + 0xf200, 0xf201, 0xf86c, 0xf870, 0xf86f, 0xf869, 0xf875, 0xfc03, + 0xf200, 0xf867, 0xf866, 0xf864, 0xf873, 0xf861, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf86d, 0xf86b, 0xf86a, 0xf868, 0xfc01, + 0xf200, 0xf86e, 0xf862, 0xf876, 0xf863, 0xf878, 0xf879, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf20c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf81a, 0xf814, 0xf812, 0xf805, 0xf817, 0xf811, 0xf200, + 0xf200, 0xf201, 0xf80c, 0xf810, 0xf80f, 0xf809, 0xf815, 0xfc03, + 0xf200, 0xf807, 0xf806, 0xf804, 0xf813, 0xf801, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf80d, 0xf80b, 0xf80a, 0xf808, 0xfc01, + 0xf200, 0xff0b, 0xff0a, 0xff09, 0xff08, 0xff07, 0xff06, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xff01, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +ushort *key_maps[MAX_NR_KEYMAPS] = { + plain_map, shift_map, altgr_map, 0, + ctrl_map, shift_ctrl_map, 0, 0, + alt_map, 0, 0, 0, + ctrl_alt_map, 0 +}; + +unsigned int keymap_count = 7; + +/* + * Philosophy: most people do not define more strings, but they who do + * often want quite a lot of string space. So, we statically allocate + * the default and allocate dynamically in chunks of 512 bytes. + */ + +char func_buf[] = { + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, +}; + +char *funcbufptr = func_buf; +int funcbufsize = sizeof(func_buf); +int funcbufleft = 0; /* space left */ + +char *func_table[MAX_NR_FUNC] = { + func_buf + 0, + func_buf + 5, + func_buf + 10, + func_buf + 15, + func_buf + 20, + func_buf + 25, + func_buf + 31, + func_buf + 37, + func_buf + 43, + func_buf + 49, + func_buf + 55, + func_buf + 61, + func_buf + 67, + func_buf + 73, + func_buf + 79, + func_buf + 85, + func_buf + 91, + func_buf + 97, + func_buf + 103, + func_buf + 109, + func_buf + 115, + func_buf + 120, + func_buf + 125, + func_buf + 130, + func_buf + 135, + func_buf + 140, + func_buf + 145, + 0, + 0, + func_buf + 149, + 0, +}; + +struct kbdiacr accent_table[MAX_DIACR] = { + {'`', 'A', '\300'}, {'`', 'a', '\340'}, + {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, + {'^', 'A', '\302'}, {'^', 'a', '\342'}, + {'~', 'A', '\303'}, {'~', 'a', '\343'}, + {'"', 'A', '\304'}, {'"', 'a', '\344'}, + {'O', 'A', '\305'}, {'o', 'a', '\345'}, + {'0', 'A', '\305'}, {'0', 'a', '\345'}, + {'A', 'A', '\305'}, {'a', 'a', '\345'}, + {'A', 'E', '\306'}, {'a', 'e', '\346'}, + {',', 'C', '\307'}, {',', 'c', '\347'}, + {'`', 'E', '\310'}, {'`', 'e', '\350'}, + {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, + {'^', 'E', '\312'}, {'^', 'e', '\352'}, + {'"', 'E', '\313'}, {'"', 'e', '\353'}, + {'`', 'I', '\314'}, {'`', 'i', '\354'}, + {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, + {'^', 'I', '\316'}, {'^', 'i', '\356'}, + {'"', 'I', '\317'}, {'"', 'i', '\357'}, + {'-', 'D', '\320'}, {'-', 'd', '\360'}, + {'~', 'N', '\321'}, {'~', 'n', '\361'}, + {'`', 'O', '\322'}, {'`', 'o', '\362'}, + {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, + {'^', 'O', '\324'}, {'^', 'o', '\364'}, + {'~', 'O', '\325'}, {'~', 'o', '\365'}, + {'"', 'O', '\326'}, {'"', 'o', '\366'}, + {'/', 'O', '\330'}, {'/', 'o', '\370'}, + {'`', 'U', '\331'}, {'`', 'u', '\371'}, + {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, + {'^', 'U', '\333'}, {'^', 'u', '\373'}, + {'"', 'U', '\334'}, {'"', 'u', '\374'}, + {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, + {'T', 'H', '\336'}, {'t', 'h', '\376'}, + {'s', 's', '\337'}, {'"', 'y', '\377'}, + {'s', 'z', '\337'}, {'i', 'j', '\377'}, +}; + +unsigned int accent_table_size = 68; diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_de.map linux-2.4.27-5mx/drivers/char/keymap_psion_de.map --- linux-2.4.27/drivers/char/keymap_psion_de.map 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_de.map 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,321 @@ +# arch/arm/drivers/char/keymap_psion_de.map +# +# Written 1999 by Ian E. Morgan +# +# largely based on keymap_psion.map by Werner Almesberger +# for UK keyboard layout +# +# based on keymap_geo.map, string and compose def's taken from +# drivers/char/defkeymap.map +# +# Special keys: +# F13 REC F14 STOP F15 PLAY +# F16 Contrast-- F17 Contrast++ F18 Backlight + + +# IEM: This is the mapping of US keyboard to keycodes: +# +# esc 1 2 3 4 5 6 7 8 9 0 del +# 23 6 5 4 3 2 1 14 13 12 11 10 +# +# q w e r t y u i o p enter +# 22 21 20 19 18 17 30 29 28 27 25 +# +# tab a s d f g h j k l : +# 38 37 36 35 34 33 46 45 44 26 9 +# +# shift z x c v b n m . up shift +# 55 54 53 52 51 50 49 43 42 60 63 +# +# ctrl fn menu space , left down right +# 39 47 31 61 59 58 41 47 + + +# Default kernel keymap. This uses 7 modifier combinations. +keymaps 0-2,4-5,8,12 + + keycode 1 = six ampersand +alt keycode 1 = Console_6 +altgr keycode 1 = greater + + keycode 2 = five percent +alt keycode 2 = Console_5 +altgr keycode 2 = less + + keycode 3 = four dollar +alt keycode 3 = Console_4 +altgr keycode 3 = asciitilde + + keycode 4 = three section +alt keycode 4 = Console_3 +altgr keycode 4 = backslash +control keycode 4 = Control_backslash + + keycode 5 = two quotedbl +alt keycode 5 = Console_2 +altgr keycode 5 = slash + + keycode 6 = one exclam +alt keycode 6 = Console_1 +altgr keycode 6 = underscore +control keycode 6 = Control_underscore + + keycode 7 = F13 # REC + + keycode 8 = VoidSymbol + + keycode 9 = numbersign asterisk +altgr keycode 9 = equal + + keycode 10 = Delete +alt keycode 10 = Remove +altgr keycode 10 = grave +control alt keycode 10 = Boot + + keycode 11 = zero apostrophe +alt keycode 11 = Console_10 +altgr keycode 11 = braceright + + keycode 12 = nine parenright +alt keycode 12 = Console_9 +altgr keycode 12 = braceleft + + keycode 13 = eight parenleft +alt keycode 13 = Console_8 +altgr keycode 13 = bracketright +control keycode 13 = Control_bracketright + + keycode 14 = seven question +alt keycode 14 = Console_7 +altgr keycode 14 = bracketleft +control keycode 14 = Escape + + keycode 15 = F15 # PLAY + + keycode 16 = VoidSymbol + + keycode 17 = z + + keycode 18 = t +altgr keycode 18 = bar + + keycode 19 = r +altgr keycode 19 = masculine + + keycode 20 = e +altgr keycode 20 = currency + + keycode 21 = w +altgr keycode 21 = asciicircum + + keycode 22 = q +altgr keycode 22 = at + + keycode 23 = Escape Escape +alt keycode 23 = Meta_Escape +altgr keycode 23 = 0xf02 # OFF + + keycode 24 = VoidSymbol + + keycode 25 = Return + + keycode 26 = l +altgr keycode 26 = minus + + keycode 27 = p +altgr keycode 27 = ssharp + + keycode 28 = o +altgr keycode 28 = odiaeresis + + keycode 29 = i +altgr keycode 29 = mu + + keycode 30 = u +altgr keycode 30 = udiaeresis + + keycode 31 = SAlt # Menu + + keycode 32 = VoidSymbol + + keycode 33 = g + + keycode 34 = f + + keycode 35 = d + + keycode 36 = s + + keycode 37 = a +altgr keycode 37 = adiaeresis + + keycode 38 = Tab +altgr keycode 38 = Caps_Lock + + keycode 39 = SControl + + keycode 40 = VoidSymbol + + keycode 41 = Down Scroll_Backward +altgr keycode 41 = Next + + keycode 42 = comma semicolon +altgr keycode 42 = 0xf05 # Contrast++ + + keycode 43 = m +altgr keycode 43 = 0xf04 # Contrast-- + + keycode 44 = k +altgr keycode 44 = plus + + keycode 45 = j +altgr keycode 45 = division + + keycode 46 = h +altgr keycode 46 = multiply + + keycode 47 = SAltGr # Fn + + keycode 48 = VoidSymbol + + keycode 49 = n +control alt keycode 49 = 0xf0b # Debug 5 + + keycode 50 = b +altgr keycode 50 = dead_caron +control alt keycode 50 = 0xf0a # Debug 4 + + keycode 51 = v +altgr keycode 51 = dead_breve +control alt keycode 51 = 0xf09 # Debug 3 + + keycode 52 = c +altgr keycode 52 = acute +control alt keycode 52 = 0xf08 # Debug 2 + + keycode 53 = x +altgr keycode 53 = grave +control alt keycode 53 = 0xf07 # Debug 1 + + keycode 54 = y +altgr keycode 54 = diaeresis +control alt keycode 54 = 0xf06 # Debug 0 + + keycode 55 = SShift + + keycode 56 = VoidSymbol + + keycode 57 = Right +altgr keycode 57 = Select # End + + keycode 58 = Left +altgr keycode 58 = Find # Home + + keycode 59 = period colon +control alt keycode 59 = 0xf01 # SysRq + + keycode 60 = Up Scroll_Forward +altgr keycode 60 = Prior + + keycode 61 = space +altgr keycode 61 = 0xf03 # Backlight + + keycode 62 = F14 # STOP + keycode 63 = SShift + +string F1 = "\033[[A" +string F2 = "\033[[B" +string F3 = "\033[[C" +string F4 = "\033[[D" +string F5 = "\033[[E" +string F6 = "\033[17~" +string F7 = "\033[18~" +string F8 = "\033[19~" +string F9 = "\033[20~" +string F10 = "\033[21~" +string F11 = "\033[23~" +string F12 = "\033[24~" +string F13 = "\033[25~" +string F14 = "\033[26~" +string F15 = "\033[28~" +string F16 = "\033[29~" +string F17 = "\033[31~" +string F18 = "\033[32~" +string F19 = "\033[33~" +string F20 = "\033[34~" +string Find = "\033[1~" +string Insert = "\033[2~" +string Remove = "\033[3~" +string Select = "\033[4~" +string Prior = "\033[5~" +string Next = "\033[6~" +string Macro = "\033[M" +string Pause = "\033[P" +compose '`' 'A' to 'À' +compose '`' 'a' to 'à' +compose '\'' 'A' to 'Á' +compose '\'' 'a' to 'á' +compose '^' 'A' to 'Â' +compose '^' 'a' to 'â' +compose '~' 'A' to 'Ã' +compose '~' 'a' to 'ã' +compose '"' 'A' to 'Ä' +compose '"' 'a' to 'ä' +compose 'O' 'A' to 'Å' +compose 'o' 'a' to 'å' +compose '0' 'A' to 'Å' +compose '0' 'a' to 'å' +compose 'A' 'A' to 'Å' +compose 'a' 'a' to 'å' +compose 'A' 'E' to 'Æ' +compose 'a' 'e' to 'æ' +compose ',' 'C' to 'Ç' +compose ',' 'c' to 'ç' +compose '`' 'E' to 'È' +compose '`' 'e' to 'è' +compose '\'' 'E' to 'É' +compose '\'' 'e' to 'é' +compose '^' 'E' to 'Ê' +compose '^' 'e' to 'ê' +compose '"' 'E' to 'Ë' +compose '"' 'e' to 'ë' +compose '`' 'I' to 'Ì' +compose '`' 'i' to 'ì' +compose '\'' 'I' to 'Í' +compose '\'' 'i' to 'í' +compose '^' 'I' to 'Î' +compose '^' 'i' to 'î' +compose '"' 'I' to 'Ï' +compose '"' 'i' to 'ï' +compose '-' 'D' to 'Ð' +compose '-' 'd' to 'ð' +compose '~' 'N' to 'Ñ' +compose '~' 'n' to 'ñ' +compose '`' 'O' to 'Ò' +compose '`' 'o' to 'ò' +compose '\'' 'O' to 'Ó' +compose '\'' 'o' to 'ó' +compose '^' 'O' to 'Ô' +compose '^' 'o' to 'ô' +compose '~' 'O' to 'Õ' +compose '~' 'o' to 'õ' +compose '"' 'O' to 'Ö' +compose '"' 'o' to 'ö' +compose '/' 'O' to 'Ø' +compose '/' 'o' to 'ø' +compose '`' 'U' to 'Ù' +compose '`' 'u' to 'ù' +compose '\'' 'U' to 'Ú' +compose '\'' 'u' to 'ú' +compose '^' 'U' to 'Û' +compose '^' 'u' to 'û' +compose '"' 'U' to 'Ü' +compose '"' 'u' to 'ü' +compose '\'' 'Y' to 'Ý' +compose '\'' 'y' to 'ý' +compose 'T' 'H' to 'Þ' +compose 't' 'h' to 'þ' +compose 's' 's' to 'ß' +compose '"' 'y' to 'ÿ' +compose 's' 'z' to 'ß' +compose 'i' 'j' to 'ÿ' diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_fr.c linux-2.4.27-5mx/drivers/char/keymap_psion_fr.c --- linux-2.4.27/drivers/char/keymap_psion_fr.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_fr.c 2005-02-05 15:39:49.000000000 +0100 @@ -0,0 +1,374 @@ +/* Do not edit this file! It was automatically generated by */ +/* loadkeys --mktable defkeymap.map > defkeymap.c */ + +#include +#include +#include + +u_short plain_map[NR_KEYS] = { + 0xf200, 0xf029, 0xf028, 0xf027, 0xf022, 0x00e9, 0xf026, 0xf10c, + 0xf200, 0xfb6d, 0xf07f, 0x00e0, 0x00e7, 0xf05f, 0x00e9, 0xf10e, + 0xf200, 0xfb79, 0xfb74, 0xfb72, 0xfb65, 0xfb7a, 0xfb61, 0xf01b, + 0xf200, 0xf201, 0xfb6c, 0xfb70, 0xfb6f, 0xfb69, 0xfb75, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb71, 0xf009, 0xfc02, + 0xf200, 0xf600, 0xf03b, 0xf02c, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb77, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf03a, 0xf603, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_map[NR_KEYS] = { + 0xf200, 0xf036, 0xf035, 0xf034, 0xf033, 0xf032, 0xf031, 0xf10c, + 0xf200, 0xfb4d, 0xf07f, 0xf030, 0xf039, 0xf038, 0xf037, 0xf10e, + 0xf200, 0xfb59, 0xfb54, 0xfb52, 0xfb45, 0xfb5a, 0xfb41, 0xf01b, + 0xf200, 0xf201, 0xfb4c, 0xfb50, 0xfb4f, 0xfb49, 0xfb55, 0xfc03, + 0xf200, 0xfb47, 0xfb46, 0xfb44, 0xfb53, 0xfb51, 0xf009, 0xfc02, + 0xf200, 0xf20b, 0xf02e, 0xf03f, 0xfb4b, 0xfb4a, 0xfb48, 0xfc01, + 0xf200, 0xfb4e, 0xfb42, 0xfb56, 0xfb43, 0xfb58, 0xfb57, 0xfc00, + 0xf200, 0xf602, 0xf601, 0x00b5, 0xf20a, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf024, 0x00b0, 0xf403, 0xf023, 0xf025, 0xf021, 0xf10c, + 0xf200, 0xf02d, 0xf07f, 0xf040, 0xf402, 0xf05c, 0x00a3, 0xf10e, + 0xf200, 0xf07d, 0xf07b, 0xf05d, 0xf05b, 0xf03e, 0xf03c, 0xff02, + 0xf200, 0xf201, 0xf02b, 0xf03d, 0xf30c, 0xf07c, 0x00f9, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb71, 0xf207, 0xfc02, + 0xf200, 0xf119, 0xf02f, 0xf30c, 0xf30d, 0xff05, 0xff04, 0xfc01, + 0xf200, 0xfb6e, 0xf402, 0xf403, 0xf027, 0xf060, 0xf404, 0xf02f, + 0xf200, 0xf117, 0xf114, 0xf200, 0xf118, 0xff03, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf01d, 0xf200, 0xf200, 0xf01b, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf00d, 0xf07f, 0xf200, 0xf200, 0xf01c, 0xf200, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf01a, 0xf001, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf011, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf017, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf00d, 0xf07f, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf01a, 0xf001, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf011, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf017, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short alt_map[NR_KEYS] = { + 0xf200, 0xf505, 0xf504, 0xf503, 0xf502, 0xf501, 0xf500, 0xf10c, + 0xf200, 0xf86d, 0xf116, 0xf509, 0xf508, 0xf507, 0xf506, 0xf10e, + 0xf200, 0xf879, 0xf874, 0xf872, 0xf865, 0xf87a, 0xf861, 0xf81b, + 0xf200, 0xf201, 0xf86c, 0xf870, 0xf86f, 0xf869, 0xf875, 0xfc03, + 0xf200, 0xf867, 0xf866, 0xf864, 0xf873, 0xf871, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf86b, 0xf86a, 0xf868, 0xfc01, + 0xf200, 0xf86e, 0xf862, 0xf876, 0xf863, 0xf878, 0xf877, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf80d, 0xf20c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf819, 0xf814, 0xf812, 0xf805, 0xf81a, 0xf801, 0xf200, + 0xf200, 0xf201, 0xf80c, 0xf810, 0xf80f, 0xf809, 0xf815, 0xfc03, + 0xf200, 0xf807, 0xf806, 0xf804, 0xf813, 0xf811, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf80b, 0xf80a, 0xf808, 0xfc01, + 0xf200, 0xff0b, 0xff0a, 0xff09, 0xff08, 0xff07, 0xff06, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xff01, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +ushort *key_maps[MAX_NR_KEYMAPS] = { + plain_map, shift_map, altgr_map, 0, + ctrl_map, shift_ctrl_map, 0, 0, + alt_map, 0, 0, 0, + ctrl_alt_map, 0 +}; + +unsigned int keymap_count = 7; + +/* + * Philosophy: most people do not define more strings, but they who do + * often want quite a lot of string space. So, we statically allocate + * the default and allocate dynamically in chunks of 512 bytes. + */ + +char func_buf[] = { + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, +}; + +char *funcbufptr = func_buf; +int funcbufsize = sizeof(func_buf); +int funcbufleft = 0; /* space left */ + +char *func_table[MAX_NR_FUNC] = { + func_buf + 0, + func_buf + 5, + func_buf + 10, + func_buf + 15, + func_buf + 20, + func_buf + 25, + func_buf + 31, + func_buf + 37, + func_buf + 43, + func_buf + 49, + func_buf + 55, + func_buf + 61, + func_buf + 67, + func_buf + 73, + func_buf + 79, + func_buf + 85, + func_buf + 91, + func_buf + 97, + func_buf + 103, + func_buf + 109, + func_buf + 115, + func_buf + 120, + func_buf + 125, + func_buf + 130, + func_buf + 135, + func_buf + 140, + func_buf + 145, + 0, + 0, + func_buf + 149, + 0, +}; + +struct kbdiacr accent_table[MAX_DIACR] = { + {'`', 'A', '\300'}, {'`', 'a', '\340'}, + {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, + {'^', 'A', '\302'}, {'^', 'a', '\342'}, + {'~', 'A', '\303'}, {'~', 'a', '\343'}, + {'"', 'A', '\304'}, {'"', 'a', '\344'}, + {'O', 'A', '\305'}, {'o', 'a', '\345'}, + {'0', 'A', '\305'}, {'0', 'a', '\345'}, + {'A', 'A', '\305'}, {'a', 'a', '\345'}, + {'A', 'E', '\306'}, {'a', 'e', '\346'}, + {',', 'C', '\307'}, {',', 'c', '\347'}, + {'`', 'E', '\310'}, {'`', 'e', '\350'}, + {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, + {'^', 'E', '\312'}, {'^', 'e', '\352'}, + {'"', 'E', '\313'}, {'"', 'e', '\353'}, + {'`', 'I', '\314'}, {'`', 'i', '\354'}, + {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, + {'^', 'I', '\316'}, {'^', 'i', '\356'}, + {'"', 'I', '\317'}, {'"', 'i', '\357'}, + {'-', 'D', '\320'}, {'-', 'd', '\360'}, + {'~', 'N', '\321'}, {'~', 'n', '\361'}, + {'`', 'O', '\322'}, {'`', 'o', '\362'}, + {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, + {'^', 'O', '\324'}, {'^', 'o', '\364'}, + {'~', 'O', '\325'}, {'~', 'o', '\365'}, + {'"', 'O', '\326'}, {'"', 'o', '\366'}, + {'/', 'O', '\330'}, {'/', 'o', '\370'}, + {'`', 'U', '\331'}, {'`', 'u', '\371'}, + {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, + {'^', 'U', '\333'}, {'^', 'u', '\373'}, + {'"', 'U', '\334'}, {'"', 'u', '\374'}, + {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, + {'T', 'H', '\336'}, {'t', 'h', '\376'}, + {'s', 's', '\337'}, {'"', 'y', '\377'}, + {'s', 'z', '\337'}, {'i', 'j', '\377'}, +}; + +unsigned int accent_table_size = 68; diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_fr.map linux-2.4.27-5mx/drivers/char/keymap_psion_fr.map --- linux-2.4.27/drivers/char/keymap_psion_fr.map 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_fr.map 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,274 @@ +keymaps 0-2,4-5,8,12 + + keycode 1 = parenright six dollar Control_bracketright +alt keycode 1 = Console_6 + + keycode 2 = parenleft five degree +alt keycode 2 = Console_5 + + keycode 3 = apostrophe four dead_tilde +alt keycode 3 = Console_4 + + keycode 4 = quotedbl three numbersign Escape +alt keycode 4 = Console_3 + + keycode 5 = eacute two percent +alt keycode 5 = Console_2 + + keycode 6 = ampersand one exclam +alt keycode 6 = Console_1 + + keycode 7 = F13 + + keycode 8 = VoidSymbol + + keycode 9 = m +AltGr keycode 9 = minus + + keycode 10 = Delete +alt keycode 10 = Remove +control alt keycode 10 = Boot + + keycode 11 = agrave zero at +alt keycode 11 = Console_10 + + keycode 12 = ccedilla nine dead_circumflex +alt keycode 12 = Console_9 + + keycode 13 = underscore eight backslash Control_backslash +alt keycode 13 = Console_8 + + keycode 14 = eacute seven sterling +alt keycode 14 = Console_7 + + keycode 15 = F15 + + keycode 16 = VoidSymbol + + keycode 17 = y +AltGr keycode 17 = braceright + + keycode 18 = t +AltGr keycode 18 = braceleft + + keycode 19 = r +AltGr keycode 19 = bracketright + + keycode 20 = e +AltGr keycode 20 = bracketleft + + keycode 21 = z +AltGr keycode 21 = greater + + keycode 22 = a +altgr keycode 22 = less + + keycode 23 = Escape Escape +alt keycode 23 = Meta_Escape +altgr keycode 23 = 0xf02 # OFF + + keycode 24 = VoidSymbol + + keycode 25 = Return + + keycode 26 = l +altgr keycode 26 = plus + + keycode 27 = p +altgr keycode 27 = equal + + keycode 28 = o +altgr keycode 28 = KP_Multiply + + keycode 29 = i +altgr keycode 29 = bar + + keycode 30 = u +altgr keycode 30 = ugrave + + keycode 31 = SAlt # Menu + + keycode 32 = VoidSymbol + + keycode 33 = g + + keycode 34 = f + + keycode 35 = d + + keycode 36 = s + + keycode 37 = q + + keycode 38 = Tab +altgr keycode 38 = Caps_Lock + + keycode 39 = SControl + + keycode 40 = VoidSymbol + + keycode 41 = Down Scroll_Backward +AltGr keycode 41 = Next + + keycode 42 = semicolon period +AltGr keycode 42 = slash + + keycode 43 = comma question +AltGr keycode 43 = KP_Multiply + + keycode 44 = k +AltGr keycode 44 = KP_Divide + + keycode 45 = j +altgr keycode 45 = 0xf05 # Contrast++ + + keycode 46 = h +altgr keycode 46 = 0xf04 # Contrast-- + + keycode 47 = SAltGr # Fn + + keycode 48 = VoidSymbol + + keycode 49 = n +control alt keycode 49 = 0xf0b # Debug 5 + + keycode 50 = b +AltGr keycode 50 = dead_circumflex +control alt keycode 50 = 0xf0a # Debug 4 + + keycode 51 = v +AltGr keycode 51 = dead_tilde +control alt keycode 51 = 0xf09 # Debug 3, ARCHKEY_9 + + keycode 52 = c +AltGr keycode 52 = apostrophe +control alt keycode 52 = 0xf08 # Debug 2, ARCHKEY_8 + + keycode 53 = x +AltGr keycode 53 = grave +control alt keycode 53 = 0xf07 # Debug 1, ARCHKEY_7 + + keycode 54 = w +AltGr keycode 54 = dead_diaeresis +control alt keycode 54 = 0xf06 # Debug 0, ARCHKEY_6 + + keycode 55 = SShift +altgr keycode 55 = slash + + keycode 56 = VoidSymbol + + keycode 57 = Right +altgr keycode 57 = Select + + keycode 58 = Left +altgr keycode 58 = Find + + keycode 59 = colon mu +control alt keycode 59 = 0xf01 # SysRq + + keycode 60 = Up Scroll_Forward +altgr keycode 60 = Prior + + keycode 61 = space +altgr keycode 61 = 0xf03 # Backlight + + keycode 62 = F14 + keycode 63 = SShift + + +string F1 = "\033[[A" +string F2 = "\033[[B" +string F3 = "\033[[C" +string F4 = "\033[[D" +string F5 = "\033[[E" +string F6 = "\033[17~" +string F7 = "\033[18~" +string F8 = "\033[19~" +string F9 = "\033[20~" +string F10 = "\033[21~" +string F11 = "\033[23~" +string F12 = "\033[24~" +string F13 = "\033[25~" +string F14 = "\033[26~" +string F15 = "\033[28~" +string F16 = "\033[29~" +string F17 = "\033[31~" +string F18 = "\033[32~" +string F19 = "\033[33~" +string F20 = "\033[34~" +string Find = "\033[1~" +string Insert = "\033[2~" +string Remove = "\033[3~" +string Select = "\033[4~" +string Prior = "\033[5~" +string Next = "\033[6~" +string Macro = "\033[M" +string Pause = "\033[P" +compose '`' 'A' to 'À' +compose '`' 'a' to 'à' +compose '\'' 'A' to 'Á' +compose '\'' 'a' to 'á' +compose '^' 'A' to 'Â' +compose '^' 'a' to 'â' +compose '~' 'A' to 'Ã' +compose '~' 'a' to 'ã' +compose '"' 'A' to 'Ä' +compose '"' 'a' to 'ä' +compose 'O' 'A' to 'Å' +compose 'o' 'a' to 'å' +compose '0' 'A' to 'Å' +compose '0' 'a' to 'å' +compose 'A' 'A' to 'Å' +compose 'a' 'a' to 'å' +compose 'A' 'E' to 'Æ' +compose 'a' 'e' to 'æ' +compose ',' 'C' to 'Ç' +compose ',' 'c' to 'ç' +compose '`' 'E' to 'È' +compose '`' 'e' to 'è' +compose '\'' 'E' to 'É' +compose '\'' 'e' to 'é' +compose '^' 'E' to 'Ê' +compose '^' 'e' to 'ê' +compose '"' 'E' to 'Ë' +compose '"' 'e' to 'ë' +compose '`' 'I' to 'Ì' +compose '`' 'i' to 'ì' +compose '\'' 'I' to 'Í' +compose '\'' 'i' to 'í' +compose '^' 'I' to 'Î' +compose '^' 'i' to 'î' +compose '"' 'I' to 'Ï' +compose '"' 'i' to 'ï' +compose '-' 'D' to 'Ð' +compose '-' 'd' to 'ð' +compose '~' 'N' to 'Ñ' +compose '~' 'n' to 'ñ' +compose '`' 'O' to 'Ò' +compose '`' 'o' to 'ò' +compose '\'' 'O' to 'Ó' +compose '\'' 'o' to 'ó' +compose '^' 'O' to 'Ô' +compose '^' 'o' to 'ô' +compose '~' 'O' to 'Õ' +compose '~' 'o' to 'õ' +compose '"' 'O' to 'Ö' +compose '"' 'o' to 'ö' +compose '/' 'O' to 'Ø' +compose '/' 'o' to 'ø' +compose '`' 'U' to 'Ù' +compose '`' 'u' to 'ù' +compose '\'' 'U' to 'Ú' +compose '\'' 'u' to 'ú' +compose '^' 'U' to 'Û' +compose '^' 'u' to 'û' +compose '"' 'U' to 'Ü' +compose '"' 'u' to 'ü' +compose '\'' 'Y' to 'Ý' +compose '\'' 'y' to 'ý' +compose 'T' 'H' to 'Þ' +compose 't' 'h' to 'þ' +compose 's' 's' to 'ß' +compose '"' 'y' to 'ÿ' +compose 's' 'z' to 'ß' +compose 'i' 'j' to 'ÿ' diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_us.c linux-2.4.27-5mx/drivers/char/keymap_psion_us.c --- linux-2.4.27/drivers/char/keymap_psion_us.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_us.c 2005-02-05 15:39:18.000000000 +0100 @@ -0,0 +1,374 @@ +/* Do not edit this file! It was automatically generated by */ +/* loadkeys --mktable defkeymap.map > defkeymap.c */ + +#include +#include +#include + +u_short plain_map[NR_KEYS] = { + 0xf200, 0xf036, 0xf035, 0xf034, 0xf033, 0xf032, 0xf031, 0xf10c, + 0xf200, 0xf03a, 0xf07f, 0xf030, 0xf039, 0xf038, 0xf037, 0xf10e, + 0xf200, 0xfb79, 0xfb74, 0xfb72, 0xfb65, 0xfb77, 0xfb71, 0xf01b, + 0xf200, 0xf201, 0xfb6c, 0xfb70, 0xfb6f, 0xfb69, 0xfb75, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb61, 0xf009, 0xfc02, + 0xf200, 0xf600, 0xf02e, 0xfb6d, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb7a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf02c, 0xf603, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_map[NR_KEYS] = { + 0xf200, 0xf05e, 0xf025, 0xf024, 0xf023, 0xf040, 0xf021, 0xf10c, + 0xf200, 0xf022, 0xf07f, 0xf029, 0xf028, 0xf02a, 0xf026, 0xf10e, + 0xf200, 0xfb59, 0xfb54, 0xfb52, 0xfb45, 0xfb57, 0xfb51, 0xf01b, + 0xf200, 0xf201, 0xfb4c, 0xfb50, 0xfb4f, 0xfb49, 0xfb55, 0xfc03, + 0xf200, 0xfb47, 0xfb46, 0xfb44, 0xfb53, 0xfb41, 0xf009, 0xfc02, + 0xf200, 0xf20b, 0xf027, 0xfb4d, 0xfb4b, 0xfb4a, 0xfb48, 0xfc01, + 0xf200, 0xfb4e, 0xfb42, 0xfb56, 0xfb43, 0xfb58, 0xfb5a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf03f, 0xf20a, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf03e, 0xf03c, 0xf02f, 0xf05c, 0xf07e, 0xf05f, 0xf10c, + 0xf200, 0xf03b, 0xf060, 0xf07d, 0xf07b, 0xf05d, 0xf05b, 0xf10e, + 0xf200, 0xf30c, 0xf07c, 0xfb72, 0xfb65, 0xfb77, 0xfb71, 0xff02, + 0xf200, 0xf201, 0xfb6c, 0xf03d, 0xf02d, 0xf02b, 0xf30d, 0xfc03, + 0xf200, 0xfb67, 0xfb66, 0xfb64, 0xfb73, 0xfb61, 0xf207, 0xfc02, + 0xf200, 0xf119, 0xff05, 0xff04, 0xfb6b, 0xfb6a, 0xfb68, 0xfc01, + 0xf200, 0xfb6e, 0xfb62, 0xfb76, 0xfb63, 0xfb78, 0xfb7a, 0xf02f, + 0xf200, 0xf117, 0xf114, 0xf200, 0xf118, 0xff03, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf01e, 0xf200, 0xf200, 0xf01c, 0xf200, 0xf01f, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf01d, 0xf01b, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf01a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf07f, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf019, 0xf014, 0xf012, 0xf005, 0xf017, 0xf011, 0xf200, + 0xf200, 0xf201, 0xf00c, 0xf010, 0xf00f, 0xf009, 0xf015, 0xfc03, + 0xf200, 0xf007, 0xf006, 0xf004, 0xf013, 0xf001, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf00d, 0xf00b, 0xf00a, 0xf008, 0xfc01, + 0xf200, 0xf00e, 0xf002, 0xf016, 0xf003, 0xf018, 0xf01a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short alt_map[NR_KEYS] = { + 0xf200, 0xf505, 0xf504, 0xf503, 0xf502, 0xf501, 0xf500, 0xf10c, + 0xf200, 0xf200, 0xf116, 0xf509, 0xf508, 0xf507, 0xf506, 0xf10e, + 0xf200, 0xf879, 0xf874, 0xf872, 0xf865, 0xf877, 0xf871, 0xf81b, + 0xf200, 0xf201, 0xf86c, 0xf870, 0xf86f, 0xf869, 0xf875, 0xfc03, + 0xf200, 0xf867, 0xf866, 0xf864, 0xf873, 0xf861, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf86d, 0xf86b, 0xf86a, 0xf868, 0xfc01, + 0xf200, 0xf86e, 0xf862, 0xf876, 0xf863, 0xf878, 0xf87a, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xf200, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10c, + 0xf200, 0xf200, 0xf20c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf10e, + 0xf200, 0xf819, 0xf814, 0xf812, 0xf805, 0xf817, 0xf811, 0xf200, + 0xf200, 0xf201, 0xf80c, 0xf810, 0xf80f, 0xf809, 0xf815, 0xfc03, + 0xf200, 0xf807, 0xf806, 0xf804, 0xf813, 0xf801, 0xf009, 0xfc02, + 0xf200, 0xf200, 0xf200, 0xf80d, 0xf80b, 0xf80a, 0xf808, 0xfc01, + 0xf200, 0xff0b, 0xff0a, 0xff09, 0xff08, 0xff07, 0xff06, 0xfc00, + 0xf200, 0xf602, 0xf601, 0xff01, 0xf200, 0xf020, 0xf10d, 0xfc00, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +ushort *key_maps[MAX_NR_KEYMAPS] = { + plain_map, shift_map, altgr_map, 0, + ctrl_map, shift_ctrl_map, 0, 0, + alt_map, 0, 0, 0, + ctrl_alt_map, 0 +}; + +unsigned int keymap_count = 7; + +/* + * Philosophy: most people do not define more strings, but they who do + * often want quite a lot of string space. So, we statically allocate + * the default and allocate dynamically in chunks of 512 bytes. + */ + +char func_buf[] = { + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, +}; + +char *funcbufptr = func_buf; +int funcbufsize = sizeof(func_buf); +int funcbufleft = 0; /* space left */ + +char *func_table[MAX_NR_FUNC] = { + func_buf + 0, + func_buf + 5, + func_buf + 10, + func_buf + 15, + func_buf + 20, + func_buf + 25, + func_buf + 31, + func_buf + 37, + func_buf + 43, + func_buf + 49, + func_buf + 55, + func_buf + 61, + func_buf + 67, + func_buf + 73, + func_buf + 79, + func_buf + 85, + func_buf + 91, + func_buf + 97, + func_buf + 103, + func_buf + 109, + func_buf + 115, + func_buf + 120, + func_buf + 125, + func_buf + 130, + func_buf + 135, + func_buf + 140, + func_buf + 145, + 0, + 0, + func_buf + 149, + 0, +}; + +struct kbdiacr accent_table[MAX_DIACR] = { + {'`', 'A', '\300'}, {'`', 'a', '\340'}, + {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, + {'^', 'A', '\302'}, {'^', 'a', '\342'}, + {'~', 'A', '\303'}, {'~', 'a', '\343'}, + {'"', 'A', '\304'}, {'"', 'a', '\344'}, + {'O', 'A', '\305'}, {'o', 'a', '\345'}, + {'0', 'A', '\305'}, {'0', 'a', '\345'}, + {'A', 'A', '\305'}, {'a', 'a', '\345'}, + {'A', 'E', '\306'}, {'a', 'e', '\346'}, + {',', 'C', '\307'}, {',', 'c', '\347'}, + {'`', 'E', '\310'}, {'`', 'e', '\350'}, + {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, + {'^', 'E', '\312'}, {'^', 'e', '\352'}, + {'"', 'E', '\313'}, {'"', 'e', '\353'}, + {'`', 'I', '\314'}, {'`', 'i', '\354'}, + {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, + {'^', 'I', '\316'}, {'^', 'i', '\356'}, + {'"', 'I', '\317'}, {'"', 'i', '\357'}, + {'-', 'D', '\320'}, {'-', 'd', '\360'}, + {'~', 'N', '\321'}, {'~', 'n', '\361'}, + {'`', 'O', '\322'}, {'`', 'o', '\362'}, + {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, + {'^', 'O', '\324'}, {'^', 'o', '\364'}, + {'~', 'O', '\325'}, {'~', 'o', '\365'}, + {'"', 'O', '\326'}, {'"', 'o', '\366'}, + {'/', 'O', '\330'}, {'/', 'o', '\370'}, + {'`', 'U', '\331'}, {'`', 'u', '\371'}, + {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, + {'^', 'U', '\333'}, {'^', 'u', '\373'}, + {'"', 'U', '\334'}, {'"', 'u', '\374'}, + {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, + {'T', 'H', '\336'}, {'t', 'h', '\376'}, + {'s', 's', '\337'}, {'"', 'y', '\377'}, + {'s', 'z', '\337'}, {'i', 'j', '\377'}, +}; + +unsigned int accent_table_size = 68; diff -urN -X dontdiff linux-2.4.27/drivers/char/keymap_psion_us.map linux-2.4.27-5mx/drivers/char/keymap_psion_us.map --- linux-2.4.27/drivers/char/keymap_psion_us.map 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/keymap_psion_us.map 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,311 @@ +# arch/arm/drivers/char/keymap_psion_us.map +# +# Written 1999 by Ian E. Morgan +# +# largely based on keymap_psion.map by Werner Almesberger +# for UK keyboard layout +# +# based on keymap_geo.map, string and compose def's taken from +# drivers/char/defkeymap.map +# +# Special keys: +# F13 REC F14 STOP F15 PLAY +# F16 Contrast-- F17 Contrast++ F18 Backlight + + +# IEM: This is the mapping of US keyboard to keycodes: +# +# esc 1 2 3 4 5 6 7 8 9 0 del +# 23 6 5 4 3 2 1 14 13 12 11 10 +# +# q w e r t y u i o p enter +# 22 21 20 19 18 17 30 29 28 27 25 +# +# tab a s d f g h j k l : +# 38 37 36 35 34 33 46 45 44 26 9 +# +# shift z x c v b n m . up shift +# 63 54 53 52 51 50 49 43 42 60 55 +# +# ctrl fn menu space , left down right +# 39 47 31 61 59 58 41 47 + + +# Default kernel keymap. This uses 7 modifier combinations. +keymaps 0-2,4-5,8,12 + + keycode 1 = six asciicircum +alt keycode 1 = Console_6 +altgr keycode 1 = greater +control keycode 1 = Control_asciicircum + + keycode 2 = five percent +alt keycode 2 = Console_5 +altgr keycode 2 = less + + keycode 3 = four dollar +alt keycode 3 = Console_4 +altgr keycode 3 = slash + + keycode 4 = three numbersign +alt keycode 4 = Console_3 +altgr keycode 4 = backslash +control keycode 4 = Control_backslash + + keycode 5 = two at +alt keycode 5 = Console_2 +altgr keycode 5 = asciitilde + + keycode 6 = one exclam +alt keycode 6 = Console_1 +altgr keycode 6 = underscore +control keycode 6 = Control_underscore + + keycode 7 = F13 # REC + + keycode 8 = VoidSymbol + + keycode 9 = colon quotedbl +altgr keycode 9 = semicolon + + keycode 10 = Delete +alt keycode 10 = Remove +altgr keycode 10 = grave +control alt keycode 10 = Boot + + keycode 11 = zero parenright +alt keycode 11 = Console_10 +altgr keycode 11 = braceright + + keycode 12 = nine parenleft +alt keycode 12 = Console_9 +altgr keycode 12 = braceleft + + keycode 13 = eight asterisk +alt keycode 13 = Console_8 +altgr keycode 13 = bracketright +control keycode 13 = Control_bracketright + + keycode 14 = seven ampersand +alt keycode 14 = Console_7 +altgr keycode 14 = bracketleft +control keycode 14 = Escape + + keycode 15 = F15 # PLAY + + keycode 16 = VoidSymbol + + keycode 17 = y +altgr keycode 17 = KP_Multiply + + keycode 18 = t +altgr keycode 18 = bar + + keycode 19 = r + + keycode 20 = e + + keycode 21 = w + + keycode 22 = q + + keycode 23 = Escape Escape +alt keycode 23 = Meta_Escape +altgr keycode 23 = 0xf02 # OFF + + keycode 24 = VoidSymbol + + keycode 25 = Return + + keycode 26 = l + + keycode 27 = p +altgr keycode 27 = equal + + keycode 28 = o +altgr keycode 28 = minus + + keycode 29 = i +altgr keycode 29 = plus + + keycode 30 = u +altgr keycode 30 = KP_Divide + + keycode 31 = SAlt # Menu + + keycode 32 = VoidSymbol + + keycode 33 = g + + keycode 34 = f + + keycode 35 = d + + keycode 36 = s + + keycode 37 = a + + keycode 38 = Tab +altgr keycode 38 = Caps_Lock + + keycode 39 = SControl + + keycode 40 = VoidSymbol + + keycode 41 = Down Scroll_Backward +altgr keycode 41 = Next + + keycode 42 = period apostrophe +altgr keycode 42 = 0xf05 # Contrast++ + + keycode 43 = m +altgr keycode 43 = 0xf04 # Contrast-- + + keycode 44 = k + + keycode 45 = j + + keycode 46 = h + + keycode 47 = SAltGr # Fn + + keycode 48 = VoidSymbol + + keycode 49 = n +control alt keycode 49 = 0xf0b # Debug 5 + + keycode 50 = b +control alt keycode 50 = 0xf0a # Debug 4 + + keycode 51 = v +control alt keycode 51 = 0xf09 # Debug 3, ARCHKEY_9 + + keycode 52 = c +control alt keycode 52 = 0xf08 # Debug 2, ARCHKEY_8 + + keycode 53 = x +control alt keycode 53 = 0xf07 # Debug 1, ARCHKEY_7 + + keycode 54 = z +control alt keycode 54 = 0xf06 # Debug 0, ARCHKEY_6 + + keycode 55 = SShift +altgr keycode 55 = slash + + keycode 56 = VoidSymbol + + keycode 57 = Right +altgr keycode 57 = Select # End + + keycode 58 = Left +altgr keycode 58 = Find # Home + + keycode 59 = comma question +control alt keycode 59 = 0xf01 # SysRq + + keycode 60 = Up Scroll_Forward +altgr keycode 60 = Prior + + keycode 61 = space +altgr keycode 61 = 0xf03 # Backlight + + keycode 62 = F14 # STOP + + keycode 63 = SShift + +string F1 = "\033[[A" +string F2 = "\033[[B" +string F3 = "\033[[C" +string F4 = "\033[[D" +string F5 = "\033[[E" +string F6 = "\033[17~" +string F7 = "\033[18~" +string F8 = "\033[19~" +string F9 = "\033[20~" +string F10 = "\033[21~" +string F11 = "\033[23~" +string F12 = "\033[24~" +string F13 = "\033[25~" +string F14 = "\033[26~" +string F15 = "\033[28~" +string F16 = "\033[29~" +string F17 = "\033[31~" +string F18 = "\033[32~" +string F19 = "\033[33~" +string F20 = "\033[34~" +string Find = "\033[1~" +string Insert = "\033[2~" +string Remove = "\033[3~" +string Select = "\033[4~" +string Prior = "\033[5~" +string Next = "\033[6~" +string Macro = "\033[M" +string Pause = "\033[P" +compose '`' 'A' to 'À' +compose '`' 'a' to 'à' +compose '\'' 'A' to 'Á' +compose '\'' 'a' to 'á' +compose '^' 'A' to 'Â' +compose '^' 'a' to 'â' +compose '~' 'A' to 'Ã' +compose '~' 'a' to 'ã' +compose '"' 'A' to 'Ä' +compose '"' 'a' to 'ä' +compose 'O' 'A' to 'Å' +compose 'o' 'a' to 'å' +compose '0' 'A' to 'Å' +compose '0' 'a' to 'å' +compose 'A' 'A' to 'Å' +compose 'a' 'a' to 'å' +compose 'A' 'E' to 'Æ' +compose 'a' 'e' to 'æ' +compose ',' 'C' to 'Ç' +compose ',' 'c' to 'ç' +compose '`' 'E' to 'È' +compose '`' 'e' to 'è' +compose '\'' 'E' to 'É' +compose '\'' 'e' to 'é' +compose '^' 'E' to 'Ê' +compose '^' 'e' to 'ê' +compose '"' 'E' to 'Ë' +compose '"' 'e' to 'ë' +compose '`' 'I' to 'Ì' +compose '`' 'i' to 'ì' +compose '\'' 'I' to 'Í' +compose '\'' 'i' to 'í' +compose '^' 'I' to 'Î' +compose '^' 'i' to 'î' +compose '"' 'I' to 'Ï' +compose '"' 'i' to 'ï' +compose '-' 'D' to 'Ð' +compose '-' 'd' to 'ð' +compose '~' 'N' to 'Ñ' +compose '~' 'n' to 'ñ' +compose '`' 'O' to 'Ò' +compose '`' 'o' to 'ò' +compose '\'' 'O' to 'Ó' +compose '\'' 'o' to 'ó' +compose '^' 'O' to 'Ô' +compose '^' 'o' to 'ô' +compose '~' 'O' to 'Õ' +compose '~' 'o' to 'õ' +compose '"' 'O' to 'Ö' +compose '"' 'o' to 'ö' +compose '/' 'O' to 'Ø' +compose '/' 'o' to 'ø' +compose '`' 'U' to 'Ù' +compose '`' 'u' to 'ù' +compose '\'' 'U' to 'Ú' +compose '\'' 'u' to 'ú' +compose '^' 'U' to 'Û' +compose '^' 'u' to 'û' +compose '"' 'U' to 'Ü' +compose '"' 'u' to 'ü' +compose '\'' 'Y' to 'Ý' +compose '\'' 'y' to 'ý' +compose 'T' 'H' to 'Þ' +compose 't' 'h' to 'þ' +compose 's' 's' to 'ß' +compose '"' 'y' to 'ÿ' +compose 's' 'z' to 'ß' +compose 'i' 'j' to 'ÿ' diff -urN -X dontdiff linux-2.4.27/drivers/char/psionw-rtc.c linux-2.4.27-5mx/drivers/char/psionw-rtc.c --- linux-2.4.27/drivers/char/psionw-rtc.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/psionw-rtc.c 2004-12-04 09:29:27.000000000 +0100 @@ -0,0 +1,445 @@ +/* + * Real Time Clock interface for Psion Windermere + * + * Copyright (c) 2002 Tony Lindgren + * + * Modified from the sa1100-rtc.c. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_VERSION "1.00" + +#define TIMER_FREQ 3686400 + +#define RTC_DEF_DIVIDER 32768 - 1 +#define RTC_DEF_TRIM 0 + +/* Those are the bits from a classic RTC we want to mimic */ +#define RTC_IRQF 0x80 /* any of the following 3 is active */ +#define RTC_PF 0x40 +#define RTC_AF 0x20 +#define RTC_UF 0x10 + +static unsigned long rtc_status; +static unsigned long rtc_irq_data; +static unsigned long rtc_freq = 1024; + +static struct fasync_struct *rtc_async_queue; +static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); + +extern spinlock_t rtc_lock; + +static const unsigned char days_in_mo[] = + {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + +#define is_leap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) + +/* + * Converts seconds since 1970-01-01 00:00:00 to Gregorian date. + */ +static void decodetime (unsigned int t, struct rtc_time *tval) +{ + unsigned int days, month, year, rem; + + days = t / 86400; + rem = t % 86400; + tval->tm_hour = rem / 3600; + rem %= 3600; + tval->tm_min = rem / 60; + tval->tm_sec = rem % 60; + tval->tm_wday = (4 + days) % 7; + +#define LEAPS_THRU_END_OF(y) ((y)/4 - (y)/100 + (y)/400) + + year = 1970 + days / 365; + days -= ((year - 1970) * 365 + + LEAPS_THRU_END_OF (year - 1) + - LEAPS_THRU_END_OF (1970 - 1)); + if (days < 0) { + year -= 1; + days += 365 + is_leap(year); + } + tval->tm_year = year - 1900; + tval->tm_yday = days + 1; + + month = 0; + if (days >= 31) { + days -= 31; + month++; + if (days >= (28 + is_leap(year))) { + days -= (28 + is_leap(year)); + month++; + while (days >= days_in_mo[month]) { + days -= days_in_mo[month]; + month++; + } + } + } + tval->tm_mon = month; + tval->tm_mday = days + 1; +} + +static void timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + /* + * If we match for the first time, the periodic interrupt flag won't + * be set. If it is, then we did wrap around (very unlikely but + * still possible) and compute the amount of missed periods. + * The match reg is updated only when the data is actually retrieved + * to avoid unnecessary interrupts. + */ + if (rtc_irq_data & RTC_PF) { + rtc_irq_data += (rtc_freq * ((1<<30)/(TIMER_FREQ>>2))) << 8; + } else { + rtc_irq_data += (0x100|RTC_PF|RTC_IRQF); + } + + wake_up_interruptible(&rtc_wait); + kill_fasync (&rtc_async_queue, SIGIO, POLL_IN); +} + +static void rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + /* update irq data & counter */ + rtc_irq_data |= (RTC_AF|RTC_IRQF); + rtc_irq_data += 0x100; + + /* wake up waiting process */ + wake_up_interruptible(&rtc_wait); + kill_fasync (&rtc_async_queue, SIGIO, POLL_IN); +} + +static int rtc_set_timer(int frequency) { + unsigned int timer = 0; + unsigned int multiplier = 2000; + + if (frequency == 0) { + psionw_writel(0, TC1CTRL); + psionw_writel(0, TC1LOAD); + return 0; + } + + timer = psionw_readl(TC1CTRL); + timer |= TC_MODE; /* Periodic mode */ + + if (frequency > 1900) { + multiplier = 512000; + timer |= TC_CLKSEL; /* 512kHz mode */ + } else { + timer &= ~TC_CLKSEL; /* 2kHz mode */ + } + + timer |= TC_ENABLE; + psionw_writel(timer, TC1CTRL); + + psionw_writel((multiplier / frequency) - 1, TC1LOAD); + + return 0; +} + +static int rtc_open(struct inode *inode, struct file *file) +{ + if (test_and_set_bit (1, &rtc_status)) + return -EBUSY; + rtc_irq_data = 0; + return 0; +} + +static int rtc_release(struct inode *inode, struct file *file) +{ + spin_lock_irq (&rtc_lock); + rtc_set_timer(0); + spin_unlock_irq (&rtc_lock); + rtc_status = 0; + return 0; +} + +static int rtc_fasync (int fd, struct file *filp, int on) +{ + return fasync_helper (fd, filp, on, &rtc_async_queue); +} + +static unsigned int rtc_poll(struct file *file, poll_table *wait) +{ + poll_wait (file, &rtc_wait, wait); + return (rtc_irq_data) ? 0 : POLLIN | POLLRDNORM; +} + +static loff_t rtc_llseek(struct file *file, loff_t offset, int origin) +{ + return -ESPIPE; +} + +ssize_t rtc_read(struct file *file, char *buf, size_t count, loff_t *ppos) +{ + DECLARE_WAITQUEUE(wait, current); + unsigned long data; + ssize_t retval; + + if (count < sizeof(unsigned long)) + return -EINVAL; + + add_wait_queue(&rtc_wait, &wait); + set_current_state(TASK_INTERRUPTIBLE); + for (;;) { + spin_lock_irq (&rtc_lock); + data = rtc_irq_data; + if (data != 0) { + rtc_irq_data = 0; + break; + } + spin_unlock_irq (&rtc_lock); + + if (file->f_flags & O_NONBLOCK) { + retval = -EAGAIN; + goto out; + } + + if (signal_pending(current)) { + retval = -ERESTARTSYS; + goto out; + } + + schedule(); + } + +#if 0 + if (data & RTC_PF) { + /* interpolate missed periods and set match for the next one */ + unsigned long period = TIMER_FREQ/rtc_freq; + unsigned long oscr = OSCR; + unsigned long osmr1 = OSMR1; + unsigned long missed = (oscr - osmr1)/period; + data += missed << 8; + OSSR = OSSR_M1; /* clear match on timer 1 */ + OSMR1 = osmr1 + (missed + 1)*period; + /* ensure we didn't miss another match in the mean time */ + while( (signed long)((osmr1 = OSMR1) - OSCR) <= 0 ) { + data += 0x100; + OSSR = OSSR_M1; /* clear match on timer 1 */ + OSMR1 = osmr1 + period; + } + } +#endif + spin_unlock_irq (&rtc_lock); + + data -= 0x100; /* the first IRQ wasn't actually missed */ + + retval = put_user(data, (unsigned long *)buf); + if (!retval) + retval = sizeof(unsigned long); + +out: + set_current_state(TASK_RUNNING); + remove_wait_queue(&rtc_wait, &wait); + return retval; +} + +static int rtc_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct rtc_time tm, tm2; + + switch (cmd) { + case RTC_AIE_OFF: + spin_lock_irq(&rtc_lock); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_AIE_ON: + spin_lock_irq(&rtc_lock); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_UIE_OFF: + spin_lock_irq(&rtc_lock); + rtc_set_timer(0); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_UIE_ON: + spin_lock_irq(&rtc_lock); + rtc_set_timer(1); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_PIE_OFF: + spin_lock_irq(&rtc_lock); + rtc_set_timer(0); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_PIE_ON: + if ((rtc_freq > 64) && !capable(CAP_SYS_RESOURCE)) + return -EACCES; + spin_lock_irq(&rtc_lock); + rtc_set_timer(rtc_freq); + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + return 0; + case RTC_ALM_READ: + decodetime(psionw_read_rtc_alarm(), &tm); + break; + case RTC_ALM_SET: + if (copy_from_user (&tm2, (struct rtc_time*)arg, sizeof (tm2))) + return -EFAULT; + decodetime(psionw_read_rtc(), &tm); + if ((unsigned)tm2.tm_hour < 24) + tm.tm_hour = tm2.tm_hour; + if ((unsigned)tm2.tm_min < 60) + tm.tm_min = tm2.tm_min; + if ((unsigned)tm2.tm_sec < 60) + tm.tm_sec = tm2.tm_sec; + psionw_write_rtc_alarm(mktime(tm.tm_year + 1900, tm.tm_mon + 1, + tm.tm_mday, tm.tm_hour, + tm.tm_min, tm.tm_sec)); + return 0; + case RTC_RD_TIME: + decodetime(psionw_read_rtc(), &tm); + break; + case RTC_SET_TIME: + if (!capable(CAP_SYS_TIME)) + return -EACCES; + if (copy_from_user (&tm, (struct rtc_time*)arg, sizeof (tm))) + return -EFAULT; + tm.tm_year += 1900; + if (tm.tm_year < 1970 || (unsigned)tm.tm_mon >= 12 || + tm.tm_mday < 1 || tm.tm_mday > (days_in_mo[tm.tm_mon] + + (tm.tm_mon == 1 && is_leap(tm.tm_year))) || + (unsigned)tm.tm_hour >= 24 || + (unsigned)tm.tm_min >= 60 || + (unsigned)tm.tm_sec >= 60) + return -EINVAL; + psionw_write_rtc(mktime(tm.tm_year, tm.tm_mon + 1, + tm.tm_mday, tm.tm_hour, + tm.tm_min, tm.tm_sec)); + return 0; + case RTC_IRQP_READ: + return put_user(rtc_freq, (unsigned long *)arg); + case RTC_IRQP_SET: + if (arg < 1 || arg > TIMER_FREQ) + return -EINVAL; + if ((arg > 64) && (!capable(CAP_SYS_RESOURCE))) + return -EACCES; + rtc_freq = arg; + return 0; + case RTC_EPOCH_READ: + return put_user (1970, (unsigned long *)arg); + default: + return -EINVAL; + } + return copy_to_user ((void *)arg, &tm, sizeof (tm)) ? -EFAULT : 0; +} + +static struct file_operations rtc_fops = { + owner: THIS_MODULE, + llseek: rtc_llseek, + read: rtc_read, + poll: rtc_poll, + ioctl: rtc_ioctl, + open: rtc_open, + release: rtc_release, + fasync: rtc_fasync, +}; + +static struct miscdevice psionwrtc_miscdev = { + RTC_MINOR, + "rtc", + &rtc_fops +}; + +static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + char *p = page; + int len; + struct rtc_time tm; + + decodetime(psionw_read_rtc(), &tm); + p += sprintf(p, "rtc_time\t: %02d:%02d:%02d\n" + "rtc_date\t: %04d-%02d-%02d\n" + "rtc_epoch\t: %04d\n", + tm.tm_hour, tm.tm_min, tm.tm_sec, + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, 1970); + decodetime(psionw_read_rtc_alarm(), &tm); + p += sprintf(p, "alrm_time\t: %02d:%02d:%02d\n" + "alrm_date\t: %04d-%02d-%02d\n", + tm.tm_hour, tm.tm_min, tm.tm_sec, + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + ////p += sprintf(p, "trim/divider\t: 0x%08x\n", RTTR); + ////p += sprintf(p, "alarm_IRQ\t: %s\n", (RTSR & RTSR_ALE) ? "yes" : "no" ); + ////p += sprintf(p, "update_IRQ\t: %s\n", (RTSR & RTSR_HZE) ? "yes" : "no"); + ////p += sprintf(p, "periodic_IRQ\t: %s\n", (OIER & OIER_E1) ? "yes" : "no"); + p += sprintf(p, "periodic_freq\t: %ld\n", rtc_freq); + + len = (p - page) - off; + if (len < 0) + len = 0; + + *eof = (len <= count) ? 1 : 0; + *start = page + off; + + return len; +} + +static int __init rtc_init(void) +{ + int ret; + + misc_register (&psionwrtc_miscdev); + create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL); + + ret = request_irq (IRQ_TC1OI, timer1_interrupt, SA_INTERRUPT, "rtc timer", NULL); + if (ret) { + printk (KERN_ERR "rtc: IRQ %d already in use.\n", IRQ_TC1OI); + goto IRQ_TC1OI_failed; + } + + ret = request_irq (IRQ_RTCMI, rtc_interrupt, SA_INTERRUPT, "rtc alarm", NULL); + if (ret) { + printk(KERN_ERR "rtc: IRQ %d already in use.\n", IRQ_RTCMI); + goto IRQ_RTCMI_failed; + } + + rtc_set_timer(0); + + printk (KERN_INFO "Psion Windermere Real Time Clock driver v" DRIVER_VERSION "\n"); + + return 0; + +IRQ_RTCMI_failed: + free_irq (IRQ_TC1OI, NULL); +IRQ_TC1OI_failed: + remove_proc_entry ("driver/rtc", NULL); + misc_deregister (&psionwrtc_miscdev); + return ret; +} + +static void __exit rtc_exit(void) +{ + rtc_set_timer(0); + free_irq (IRQ_TC1OI, NULL); + free_irq (IRQ_RTCMI, NULL); + remove_proc_entry ("driver/rtc", NULL); + misc_deregister (&psionwrtc_miscdev); +} + +module_init(rtc_init); +module_exit(rtc_exit); + +MODULE_AUTHOR("Tony Lindgren "); +MODULE_DESCRIPTION("Psion Windermere Realtime Clock Driver (RTC)"); +EXPORT_NO_SYMBOLS; diff -urN -X dontdiff linux-2.4.27/drivers/char/psionw_procfs.c linux-2.4.27-5mx/drivers/char/psionw_procfs.c --- linux-2.4.27/drivers/char/psionw_procfs.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/char/psionw_procfs.c 2005-01-23 13:41:54.000000000 +0100 @@ -0,0 +1,684 @@ +/* + * linux/drivers/chars/psionw_utils.c + * + * Psion procfs entries for manipulating backlight, contrast, power off + * and auto-sleep on Psion Windermere based Computers (Psion5mx(Pro), + * Revo(Plus), Mako). + * + * Copyright (C) 2002 Thilo Hille + * Vaclav Kulakovsky + * Tony Lindgren + * Simon Howard + * + * 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 +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include <../drivers/pcmcia/psion_etna.h> + +#define MODULE_VERSION "0.2" +#define MODULE_NAME "procfs_psionw" +#define MODULE_DIR_NAME "psionw" +#define COREAD 3 + +extern void psion_off(void); +extern void psionw_lcd_powerdown(int lock); +extern void psionw_lcd_powerup(int lock); + +extern int psion_get_contrast(void); +extern int psion_set_contrast(int new_contrast, int lock); +extern unsigned int psionw_get_cpu_speed(int cpu); +extern void psionw_set_cpu_speed(int speed); +/*extern int psionw_battery_proc_read(char *page, char **start, + off_t off, int count, + int *eof, void *data); */ + +/* Psion sleep variables */ + +//#define PSLEEP_DEBUG 1 +#ifdef PSLEEP_DEBUG + #define DEBUG_PSLEEP(x...) printk(x) +#else + #define DEBUG_PSLEEP(x...) do { ; } while(0) +#endif + +#define PROC_SLEEP_MAX_LEN 8 + +static struct timer_list psion_sleep_timer; +static int psionblankinterval = 0; + +struct fb_data_t { + char name[PROC_SLEEP_MAX_LEN + 1]; + char value[PROC_SLEEP_MAX_LEN + 1]; +}; + +struct fb_data_t psion_sleep_data; + +static struct proc_dir_entry *psion_sleep_file; +extern void (*psion_sleep_set_callback)(void); +void psion_sleep_set(void); + +static int psionw_proc_lcdpower_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_lcdpower_write(struct file *file, + const char *buffer, unsigned long count, void *data); + +static int psionw_proc_backlight_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_backlight_write(struct file *file, + const char *buffer, unsigned long count, void *data); +static int psionw_proc_contrast_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_contrast_write(struct file *file, + const char *buffer, unsigned long count, void *data); +static int psionw_proc_state_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_state_write(struct file *file, + const char *buffer, unsigned long count, void *data); +static int psionw_proc_uart_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_uart_write(struct file *file, + const char *buffer, unsigned long count, void *data); +static int psionw_proc_cpu_read(char *page, char **start, off_t off, + int count, int *eof, void *data); +static int psionw_proc_cpu_write(struct file *file, + const char *buffer, unsigned long count, void *data); + +static struct proc_dir_entry *psionw_proc_dir, + *psionw_lcdpower_proc_entry, + *psionw_backlight_proc_entry, + *psionw_contrast_proc_entry, + *psionw_state_proc_entry, + *psionw_uart1_proc_entry, + *psionw_uart2_proc_entry, + *psionw_mains_proc_entry, + *psionw_case_proc_entry; + + +struct uart_data_t { + short uart; +}; + +struct uart_data_t uart1_data, uart2_data; + +static int +psionw_proc_lcdpower_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return sprintf(page, "%d\n", + (psionw_readl(LCDCTL) & LCDCTL_EN)? 1 : 0 ); +} + +static int +psionw_proc_lcdpower_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + unsigned char char_value; + int value; + + if (count < 1) { + return -EINVAL; + } + + if (copy_from_user(&char_value, buffer, 1)) + return -EFAULT; + + value = char_value - '0'; + + if (value) { + psionw_lcd_powerup(1); + } else { + psionw_lcd_powerdown(1); + } + + return count; +} + +static int +psionw_proc_contrast_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return sprintf(page, "%i\n", psion_get_contrast()); +} + +static int damn_atoi(const char *name) +{ + int val = 0; + + for (;; name++) { + switch (*name) { + case '0'...'9': + val = 10*val+(*name-'0'); + break; + default: + return val; + } + } +} + +static int +psionw_proc_contrast_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + char rbuffer[COREAD + 1]; + int new_contrast; + int len; + + if (count < 1) + return -EINVAL; + + if (count > COREAD){ + len = COREAD; + } + else { + len = count; + } + + if (copy_from_user(&rbuffer, buffer, len)) + return -EFAULT; + + rbuffer[len]='\0'; + new_contrast = damn_atoi(rbuffer); + + psion_set_contrast(new_contrast, 1); + + return len; +} + + +static int +psionw_proc_backlight_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return sprintf(page, "%d\n", + (psionw_readl(PCDR) & PCDR_LIGHT)? 1 : 0 ); +} + +static int +psionw_proc_backlight_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + unsigned char char_value; + int value; + int pcdr; + long flags; + + if (count < 1) { + return -EINVAL; + } + + if (copy_from_user(&char_value, buffer, 1)) + return -EFAULT; + + value = char_value - '0'; + + save_flags_cli(flags); + pcdr = psionw_readl(PCDR); + if (value) { + pcdr |= PCDR_LIGHT; + } else { + pcdr &= ~PCDR_LIGHT; + } + psionw_writel(pcdr, PCDR); + restore_flags(flags); + + return count; +} + +static int +psionw_proc_uart_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int psionw_proc_uart_state; + struct uart_data_t *uart_data = (struct uart_data_t *)data; + int pcdr; + + if (uart_data->uart == 1) { + pcdr = PCDR_UART1; + } + else if (uart_data->uart == 2) { + pcdr = PCDR_UART2; + } + else + return -EINVAL; + + psionw_proc_uart_state = (psionw_readb(PCDR) & pcdr); + + return sprintf(page, "%i\n",(psionw_proc_uart_state) ? 1 : 0); +} + +static int +psionw_proc_uart_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + struct uart_data_t *uart_data = (struct uart_data_t *)data; + unsigned char char_value; + int value; + int pcdr; + long flags; + + if (copy_from_user(&char_value, buffer, 1)) + return -EFAULT; + + value = char_value - '0'; + if (count < 1) { + return -EINVAL; + } + if (uart_data->uart==1){ + pcdr=PCDR_UART1; + } + else if (uart_data->uart==2){ + pcdr=PCDR_UART2; + } + else + return -EINVAL; + + save_flags_cli(flags); + if (value) { + printk("uart%i: powerup: \n",uart_data->uart); + psionw_writeb(psionw_readb(PCDR) | pcdr, PCDR); + } + else { + printk("uart%i: powerdown: \n",uart_data->uart); + psionw_writeb(psionw_readb(PCDR) & ~pcdr, PCDR); + } + restore_flags(flags); + + return count; +} + +static int +psionw_proc_state_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ +/* + * SlothAttack! + * If i had invented the refrigerator, their lights would remain on even with their door closed . + * We should output 0 if the machine is in sleepmode. But since noone will ever be able to read it + * it always sends 1 + */ + return sprintf(page, "1\n"); + +} + +static int +psionw_proc_state_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + unsigned char char_value; + int value; + int pcdr; + + if (count < 1) { + return -EINVAL; + } + + if (copy_from_user(&char_value, buffer, 1)) + return -EFAULT; + + value = char_value - '0'; + + pcdr = psionw_readl(PCDR); + if (!value){ + psion_off(); + } + + return count; +} + +static int +psionw_proc_cpu_read(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int speed = 0; + + speed = psionw_get_cpu_speed(0) / 100000; + return sprintf(page, "%d.%d\n", speed/10, speed%10); +} + +static int +psionw_proc_cpu_write(struct file *file, const char *buffer, + unsigned long count, void *data) +{ + unsigned char char_value; + int value; + int pcdr; + + if (count < 1) { + return -EINVAL; + } + + if (copy_from_user(&char_value, buffer, 1)) + return -EFAULT; + + value = char_value - '0'; + + psionw_set_cpu_speed(value); + + return count; +} + +static void psion_sleep_timer_func(unsigned long dummy) +{ + psion_off(); + psion_sleep_set(); +} + +/* Called from keyboard_psion.c on a key press */ +void psion_sleep_set(void) +{ + /* modify timer*/ + psion_sleep_timer.function = psion_sleep_timer_func; + if (psionblankinterval) { + mod_timer(&psion_sleep_timer, jiffies + psionblankinterval); + } else { + del_timer(&psion_sleep_timer); + } +} + +static int psion_sleep_proc_read(char *page, char **start, + off_t off, int count, + int *eof, void *data) +{ + int len; + struct fb_data_t *fb_data = (struct fb_data_t *)data; + + len = sprintf(page, "%s\n", fb_data->value); + return len; +} + +static int psion_sleep_proc_write(struct file *file, + const char *buffer, + unsigned long count, + void *data) +{ + int len, interval; + struct fb_data_t *fb_data = (struct fb_data_t *)data; + + if (count > PROC_SLEEP_MAX_LEN) len = PROC_SLEEP_MAX_LEN; + else len = count; + + if (copy_from_user(fb_data->value, buffer, len)) { + return 0; + } + fb_data->value[len] = '\0'; + + /* read new timeout */ + sscanf( fb_data->value, "%d", &interval ); + if( interval ) + if( interval < 10 ) { + interval = 10; + printk( "Minimal sleep inerval is 10 sec.\n" ); + } + snprintf(fb_data->value, PROC_SLEEP_MAX_LEN, "%d", interval); + fb_data->value[len] = '\0'; + + psionblankinterval = interval * HZ; + psion_sleep_set(); + DEBUG_PSLEEP("Psion sleep after %d s. \n", psionblankinterval/HZ ); + + return len; +} + + +static int psionw_proc_mains_read(char *page, char **start, + off_t off, int count, + int *eof, void *data) { + return sprintf(page, "%i\n", (psionw_readb(PWRSR) & DCDET) != 0); +} + +static int psionw_proc_mains_write(struct file *file, + const char *buffer, + unsigned long count, + void *data) { + /* i cant do that */ + return 0; +} + +static int psionw_proc_case_read(char *page, char **start, + off_t off, int count, + int *eof, void *data) { + + /* Make sure the data direction is set for read */ + if (psionw_readb(PBDDR) & PBDR_OPEN) { + long flags; + save_flags_cli(flags); + psionw_writeb(psionw_readb(PBDDR) & ~PBDR_OPEN, PBDDR); + restore_flags(flags); + } + + /* 0 on PBDR_OPEN = open, 1 = closed, invert this + (seems more intuitive this way) */ + return sprintf(page, "%i\n", (psionw_readb(PBDR) & PBDR_OPEN) == 0); +} + +static int psionw_proc_case_write(struct file *file, + const char *buffer, + unsigned long count, + void *data) { + /* i cant close the case for you! */ + return 0; +} + + +int __init psionwbl_init(void) +{ + int rv = 0; + + /* Create directory */ + psionw_proc_dir = proc_mkdir(MODULE_DIR_NAME, NULL); + if(psionw_proc_dir == NULL) { + printk("Couldn't create the procfs dir for psionw \n"); + rv = -ENOMEM; + goto out; + } + psionw_proc_dir->owner = THIS_MODULE; + + /* Register the /proc/psionw/lcd entry */ + psionw_lcdpower_proc_entry = create_proc_entry("lcd", 0444, + psionw_proc_dir); + if (psionw_lcdpower_proc_entry == NULL) { + printk("Couldn't create the procfs entry for lcd. \n"); + rv = -EINVAL; + goto out; + } + psionw_lcdpower_proc_entry->read_proc = + &psionw_proc_lcdpower_read; + psionw_lcdpower_proc_entry->write_proc = + &psionw_proc_lcdpower_write; + + /* Register the /proc/psionw/backlight entry. */ + psionw_backlight_proc_entry = create_proc_entry("backlight", 0444, + psionw_proc_dir); + if (psionw_backlight_proc_entry == NULL) { + printk("Couldn't create the procfs entry for backlight.\n"); + rv = -EINVAL; + goto out; + } + psionw_backlight_proc_entry->read_proc = + &psionw_proc_backlight_read; + psionw_backlight_proc_entry->write_proc = + &psionw_proc_backlight_write; + + /* Register the /proc/psionw/contrast entry. */ + psionw_contrast_proc_entry = create_proc_entry("contrast", 0444, + psionw_proc_dir); + if (psionw_contrast_proc_entry == NULL) { + printk("Couldn't create the procfs entry for the psionw-contrast.\n"); + rv = -EINVAL; + goto out; + } + + psionw_contrast_proc_entry->read_proc = + &psionw_proc_contrast_read; + psionw_contrast_proc_entry->write_proc = + &psionw_proc_contrast_write; + + /* Register the /proc/psionw/state entry. */ + psionw_state_proc_entry = create_proc_entry("state", 0444, + psionw_proc_dir); + if (psionw_state_proc_entry == NULL) { + printk("Couldn't create the procfs entry for the psionw-state.\n"); + rv = -EINVAL; + goto out; + } + psionw_state_proc_entry->read_proc = + &psionw_proc_state_read; + psionw_state_proc_entry->write_proc = + &psionw_proc_state_write; + + /* Register the /proc/psionw/cpu entry. */ + psionw_state_proc_entry = create_proc_entry("cpu", 0644, + psionw_proc_dir); + if (psionw_state_proc_entry == NULL) { + printk("Couldn't create the procfs entry for the psionw-cpu.\n"); + rv = -EINVAL; + goto out; + } + psionw_state_proc_entry->read_proc = + &psionw_proc_cpu_read; + psionw_state_proc_entry->write_proc = + &psionw_proc_cpu_write; + + /* Register the /proc/psionw/sleep entry. */ + psion_sleep_file = create_proc_entry("sleep", 0644, psionw_proc_dir ); + if( psion_sleep_file == NULL) { + printk("Couldn't create the procfs entry for the psionw-sleep.\n"); + } else { + strcpy(psion_sleep_data.name, "sleep"); + strcpy(psion_sleep_data.value, "0"); + psion_sleep_file->data = &psion_sleep_data; + psion_sleep_file->read_proc = psion_sleep_proc_read; + psion_sleep_file->write_proc = psion_sleep_proc_write; + psion_sleep_file->owner = THIS_MODULE; + } + + /* Init timer */ + psion_sleep_set(); + + /* Autosleep is initialised from keyboard_psion.c */ + psion_sleep_set_callback = psion_sleep_set; + DEBUG_PSLEEP("SLEEP: Callback registered.\n"); + + /* Register the /proc/psionw/uart entries for uart1 */ + psionw_uart1_proc_entry = create_proc_entry("uart1", 0444, + psionw_proc_dir); + if (psionw_uart1_proc_entry == NULL) { + printk("Couldn't create the procfs entry for the psionw-uart1.\n"); + rv = -EINVAL; + goto out; + } + uart1_data.uart = 1; + psionw_uart1_proc_entry->data = &uart1_data; + psionw_uart1_proc_entry->read_proc = + &psionw_proc_uart_read; + psionw_uart1_proc_entry->write_proc = + &psionw_proc_uart_write; + + /* Uart2 */ + psionw_uart2_proc_entry = create_proc_entry("uart2", 0444, + psionw_proc_dir); + if (psionw_uart2_proc_entry == NULL) { + printk("Couldn't create the procfs entry for the psionw-uart2.\n"); + rv = -EINVAL; + goto out; + } + uart2_data.uart = 2; + psionw_uart2_proc_entry->data = &uart2_data; + psionw_uart2_proc_entry->read_proc = + &psionw_proc_uart_read; + psionw_uart2_proc_entry->write_proc = + &psionw_proc_uart_write; + + psionw_mains_proc_entry = create_proc_entry("mains", 0444, + psionw_proc_dir); + + if (psionw_mains_proc_entry == NULL) { + printk("Couldn't create the procfs entry for mains\n"); + rv = -EINVAL; + goto out; + } else { + psionw_mains_proc_entry->read_proc = &psionw_proc_mains_read; + psionw_mains_proc_entry->write_proc = &psionw_proc_mains_write; + } + + psionw_case_proc_entry = create_proc_entry("case", 0444, + psionw_proc_dir); + + if (psionw_case_proc_entry == NULL) { + printk("Couldn't create the procfs entry for case\n"); + rv = -EINVAL; + goto out; + } else { + psionw_case_proc_entry->read_proc = &psionw_proc_case_read; + psionw_case_proc_entry->write_proc = &psionw_proc_case_write; + } + +#if 0 + psionw_battery_proc_entry = create_proc_entry("voltage", 0444, + psionw_proc_dir); + + if (psionw_battery_proc_entry == NULL) { + printk("Couldn't create the procfs entry for voltage\n"); + rv = -EINVAL; + goto out; + } else { + psionw_battery_proc_entry->read_proc = &psionw_battery_proc_read; + } +#endif + return 0; + out: + return rv; +} + +static void __exit psionwbl_exit(void) +{ + del_timer(&psion_sleep_timer); + + /* Unregister sleep callback function */ + psion_sleep_set_callback = 0; + + remove_proc_entry("lcd", psionw_proc_dir); + remove_proc_entry("backlight", psionw_proc_dir); + remove_proc_entry("contrast", psionw_proc_dir); + remove_proc_entry("state", psionw_proc_dir); + remove_proc_entry("cpu", psionw_proc_dir); + remove_proc_entry("sleep", psionw_proc_dir); + remove_proc_entry("uart1", psionw_proc_dir); + remove_proc_entry("uart2", psionw_proc_dir); + remove_proc_entry("mains", psionw_proc_dir); + remove_proc_entry("case", psionw_proc_dir); + remove_proc_entry("voltage", psionw_proc_dir); + + remove_proc_entry(MODULE_NAME, NULL); +} + +module_init(psionwbl_init); +module_exit(psionwbl_exit); +MODULE_AUTHOR("Thilo Hille/Vaclac Kulakovsky"); +MODULE_DESCRIPTION("procfs utils for Psion5mx(Pro)/Revo(Plus)/Mako"); +EXPORT_NO_SYMBOLS; + diff -urN -X dontdiff linux-2.4.27/drivers/pcmcia/Config.in linux-2.4.27-5mx/drivers/pcmcia/Config.in --- linux-2.4.27/drivers/pcmcia/Config.in 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/pcmcia/Config.in 2004-12-04 09:29:27.000000000 +0100 @@ -45,6 +45,7 @@ if [ "$CONFIG_ARM" = "y" ]; then dep_tristate ' CLPS6700 support' CONFIG_PCMCIA_CLPS6700 $CONFIG_ARCH_CLPS711X $CONFIG_PCMCIA dep_tristate ' SA1100 support' CONFIG_PCMCIA_SA1100 $CONFIG_ARCH_SA1100 $CONFIG_PCMCIA + dep_tristate ' Psion ETNA support' CONFIG_PCMCIA_ETNA $CONFIG_ARCH_PSIONW $CONFIG_PCMCIA fi endmenu diff -urN -X dontdiff linux-2.4.27/drivers/pcmcia/Makefile linux-2.4.27-5mx/drivers/pcmcia/Makefile --- linux-2.4.27/drivers/pcmcia/Makefile 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/pcmcia/Makefile 2004-12-04 09:37:05.000000000 +0100 @@ -67,6 +67,7 @@ obj-$(CONFIG_PCMCIA_CLPS6700) += clps6700.o obj-$(CONFIG_PCMCIA_SA1100) += sa1100_cs.o +obj-$(CONFIG_PCMCIA_ETNA) += psion_etna.o obj-$(CONFIG_PCMCIA_SIBYTE) += sibyte_generic.o sa1100_cs-objs-y := sa1100_generic.o diff -urN -X dontdiff linux-2.4.27/drivers/pcmcia/psion_etna.c linux-2.4.27-5mx/drivers/pcmcia/psion_etna.c --- linux-2.4.27/drivers/pcmcia/psion_etna.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/pcmcia/psion_etna.c 2004-12-04 19:47:41.000000000 +0100 @@ -0,0 +1,652 @@ +/* + * psion_etna.c - Psion-specific PCMCIA functions + * + * Copyright (C) 2001 Tony Lindgren + * Copyright (C) 2001 Shane Nay + * + * Contains code from the clps6700 driver for linux, + * Copyright (C) 2000 Deep Blue Solutions Ltd + * + * Contains code from the Psion 5 ETNA driver for linux, + * Copyright (C) 1999 Werner Almesberger. + * + * This driver is currently a big mess, so a rewrite is needed. + * But, it works, so we'll clean it up later. + * + * ETNA only has one interrupt that is shared with the card and + * the socket. The ETNA interrupt handler schedules a socket + * interrupt only if the interrupt is not a card interrupt. + * See irq.c on the ETNA interrupt handler. + * + * The code is currently all over the place. See also ide.h and + * irq.c. + * + * Psion is configured to trigger IRQ_MCINT with the CF card door + * switch. Epoc uses this, we don't. + * + * The various ETNA registers are not fully deciphered, mostly + * just working Epoc values are written to the registers without + * really knowing what they do. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include + +#include "psion_etna.h" + +MODULE_AUTHOR("Tony Lindgren"); +MODULE_DESCRIPTION("PSION ETNA PCMCIA socket driver"); + +#define NR_ETNA 1 + +static u8 cur_cfg = 0x1; /* Current card configuration */ +static u8 initialized; + +struct etna_skt { + u_int nr; + u_int physbase; + u_int regbase; + u_int pmr; + u_int cpcr; + u_int cpcr_3v3; + u_int cpcr_5v0; + u_int cur_pmr; + u_int cur_cicr; + u_int cur_pcimr; + u_int cur_cpcr; + void (*handler)(void *, u_int); + void *handler_info; + + u_int ev_pending; + spinlock_t ev_lock; +}; +void etna_powerdown(int lock); +void etna_powerup(int lock); + +static struct etna_skt *skts[NR_ETNA]; + +static int etna_sock_init(u_int sock) +{ + struct etna_skt *skt = skts[sock]; + + skt->cur_cicr = 0; /* PC card interface config reg */ + skt->cur_pmr = skt->pmr; /* Power mgmt reg */ + skt->cur_pcimr = 0; /* PC card mask reg */ + skt->cur_cpcr = skt->cpcr; /* Card power ctrl reg */ + + DEBUG_ETNA("ETNA skt%d: sock_init()\n", sock); + return 0; +} + +static int etna_suspend(u_int sock) +{ + DEBUG_ETNA("ETNA: etna_suspend\n"); + etna_powerdown(1); + return 0; +} + +static int etna_register_callback(u_int sock, void (*handler)(void *, u_int), + void *info) +{ + struct etna_skt *skt = skts[sock]; + + DEBUG_ETNA("ETNA: skt%d: register_callback: %p (%p)\n", sock, handler, info); + skt->handler_info = info; + skt->handler = handler; + + return 0; +} + +static int etna_inquire_socket(u_int sock, socket_cap_t *cap) +{ + + DEBUG_ETNA("ETNA: etna_inquire_socket\n"); + +#if 0 + /* Leaving out SS_CAP_SATIC_MAP makes the card detection not to work*/ + cap->features = (SS_CAP_PAGE_REGS | SS_CAP_PCCARD | + SS_CAP_STATIC_MAP); +#endif + + cap->features = (SS_CAP_PAGE_REGS | SS_CAP_PCCARD | + SS_CAP_STATIC_MAP | SS_CAP_MEM_ALIGN); + + cap->irq_mask = 0; + cap->map_size = PAGE_SIZE; + cap->pci_irq = IRQ_EINT1; + cap->cb_dev = NULL; + cap->bus = NULL; + cap->io_offset = 0; + + return 0; +} + + +static int __etna_get_status(struct etna_skt *skt) +{ + unsigned int etna_state = 0; + int cardint, status, sktpower; + + DEBUG_ETNA("ETNA: __etna_get_status\n"); + + etna_state = (SS_DETECT | SS_READY); + + sktpower = etna_readb(ETNA_SKT_ACTIVE); + status = etna_readb(ETNA_SKT_STATUS); + + // Check if there is a card in the socket + if (status & SKT_CARD_OUT) { + DEBUG_ETNA("ETNA: Int: Card is not inserted: 0x%02x\n", status); + etna_state &= ~SS_DETECT; + etna_state &= ~SS_READY; + } + + // Check that the card has power if in socket + if (!sktpower) { + DEBUG_ETNA("ETNA: Int: No socket power\n"); + etna_state &= ~SS_READY; + etna_powerup(0); + } + + // Test for socket ready + if ( (status & SKT_BUSY) || (status & SKT_NOT_READY) ) { + DEBUG_ETNA("ETNA: Int: Socket busy or not ready: 0x%02x\n", status); + etna_state &= ~SS_READY; + } + + /* Force some unknown values ready */ + etna_state &= ~SS_BATWARN; + etna_state &= ~SS_BATDEAD; + etna_state &= ~SS_XVCARD; + etna_state |= SS_3VCARD; + + // Clear pending status. What sets this on? + etna_state &= ~SS_PENDING; + + DEBUG_ETNA("ETNA: Status: skt%d: status: %08x -> %s %s %s %s %s %s)\n", + skt->nr, status, + etna_state & SS_READY ? "rdy" : "---", + etna_state & SS_DETECT ? "det" : "---", + etna_state & SS_BATWARN ? "bw" : "--", + etna_state & SS_BATDEAD ? "bd" : "--", + etna_state & SS_3VCARD ? "3v" : "--", + etna_state & SS_XVCARD ? "xv" : "--"); + + return etna_state; +} + +static int etna_get_status(u_int sock, u_int *valp) +{ + struct etna_skt *skt = skts[sock]; + *valp = __etna_get_status(skt); + return 0; /* not used! */ +} + +static int etna_get_socket(u_int sock, socket_state_t *state) +{ + DEBUG_ETNA("ETNA: etna_get_socket\n"); + return -EINVAL; +} + +static int etna_set_socket(u_int sock, socket_state_t *state) +{ + struct etna_skt *skt = skts[sock]; + unsigned long flags; + u_int cpcr = skt->cur_cpcr, pmr = skt->cur_pmr, cicr = skt->cur_cicr; + u_int pcimr = 0; + DEBUG_ETNA("ETNA: etna_set_socket with sock=%d\n", sock); + + if (state->flags & SS_RESET) { + DEBUG_ETNA("ETNA Socket: SS_RESET\n"); + } else if (state->flags & SS_OUTPUT_ENA) { + DEBUG_ETNA("ETNA Socket: SS_OUTPUT_ENA\n"); + } + + if (state->flags & SS_IOCARD) { + DEBUG_ETNA("ETNA Socket: SS_IOCARD\n"); + } else { + if (state->csc_mask & SS_BATDEAD) { + DEBUG_ETNA("ETNA Socket: SS_BATDEAD\n"); + pcimr = 0; + } + if (state->csc_mask & SS_BATWARN) { + DEBUG_ETNA("ETNA Socket: SS_BATWARN\n"); + pcimr = 0; + } + if (state->csc_mask & SS_READY) { + DEBUG_ETNA("ETNA Socket: SS_READY\n"); + pcimr = 0x41; + } + } + + if (state->csc_mask & SS_DETECT) { + DEBUG_ETNA("ETNA Socket: SS_DETECT\n"); + pcimr = 0x41; + } + + switch (state->Vcc) { + case 0: break; + case 33: cpcr |= skt->cpcr_3v3; break; + case 50: cpcr |= skt->cpcr_5v0; break; + default: return -EINVAL; + } + + DEBUG_ETNA("skt%d: PMR: %04x, CPCR: %04x, CICR: %04x PCIMR: %04x " + "(Vcc = %d, flags = %c%c%c%c, csc = %c%c%c%c%c)\n", + sock, pmr, cpcr, cicr, pcimr, state->Vcc, + state->flags & SS_RESET ? 'r' : '-', + state->flags & SS_PWR_AUTO ? 'p' : '-', + state->flags & SS_IOCARD ? 'i' : '-', + state->flags & SS_OUTPUT_ENA ? 'o' : '-', + state->csc_mask & SS_STSCHG ? 's' : '-', + state->csc_mask & SS_BATDEAD ? 'd' : '-', + state->csc_mask & SS_BATWARN ? 'w' : '-', + state->csc_mask & SS_READY ? 'r' : '-', + state->csc_mask & SS_DETECT ? 'c' : '-'); + + save_flags_cli(flags); + + if (skt->cur_cpcr != cpcr) { + skt->cur_cpcr = cpcr; + //__raw_writel(skt->cur_cpcr, skt->regbase + CPCR); + } + + if (skt->cur_pmr != pmr) { + skt->cur_pmr = pmr; + //__raw_writel(skt->cur_pmr, skt->regbase + PMR); + } + + /* Enable card interrutps */ + if (skt->cur_pcimr != pcimr) { + skt->cur_pcimr = pcimr; + __raw_writeb(skt->cur_pcimr, skt->regbase + PCIMR); + } + if (skt->cur_cicr != cicr) { + skt->cur_cicr = cicr; + //__raw_writel(skt->cur_cicr, skt->regbase + CICR); + } + + restore_flags(flags); + + return 0; +} + +static int etna_get_io_map(u_int sock, struct pccard_io_map *io) +{ + return -EINVAL; +} + +static int etna_set_io_map(u_int sock, struct pccard_io_map *map) +{ + + unsigned long start; + + DEBUG_ETNA("ETNA: etna_set_io_map\n"); + + DEBUG_ETNA("ETNA: card speed: %u\n", map->speed); + + start=map->start; + if(map->stop==1) + map->stop=PAGE_SIZE-1; + + map->start = CF1_V_BASE; + map->stop=map->start+(map->stop-start); + + return 0; +} + +static int etna_get_mem_map(u_int sock, struct pccard_mem_map *mem) +{ + DEBUG_ETNA("ETNA: etna_get_mem_map\n"); + return -EINVAL; +} + +/* + * Set the memory map attributes for this socket. (ie, mem->speed) + * Note that since we have SS_CAP_STATIC_MAP set, we don't need to do + * any mapping here at all; we just need to return the address (suitable + * for ioremap) to map the requested space in mem->sys_start. + * + * flags & MAP_ATTRIB indicates whether we want attribute space. + */ +static int etna_set_mem_map(u_int sock, struct pccard_mem_map *mem) +{ + struct etna_skt *skt = skts[sock]; + u_int off; + unsigned long start; + + start = mem->sys_start; + if(mem->sys_stop==0) + mem->sys_stop=PAGE_SIZE-1; + + // Only CF_ATTR_BASE 0x00000000 makes dump_cis work + if (mem->flags & MAP_ATTRIB) + off = CF_ATTR_BASE; + else + off = CF_MEM_BASE; /* This may not be right */ + + mem->sys_start = skt->physbase + off; + mem->sys_start += mem->card_start; + + ////mem->sys_stop=mem->sys_start+(mem->sys_stop-start); + + return 0; +} + +static void etna_proc_setup(u_int sock, struct proc_dir_entry *base) +{ +} + +static struct pccard_operations etna_operations = { + init: etna_sock_init, + suspend: etna_suspend, + register_callback: etna_register_callback, + inquire_socket: etna_inquire_socket, + get_status: etna_get_status, + get_socket: etna_get_socket, + set_socket: etna_set_socket, + get_io_map: etna_get_io_map, + set_io_map: etna_set_io_map, + get_mem_map: etna_get_mem_map, + set_mem_map: etna_set_mem_map, + proc_setup: etna_proc_setup +}; + +static void etna_bh(void *dummy) +{ + int i; + + DEBUG_ETNA("ETNA: etna_bh\n"); + for (i = 0; i < NR_ETNA; i++) { + struct etna_skt *skt = skts[i]; + unsigned long flags; + u_int events; + + if (!skt) + continue; + + /* + * Note! We must read the pending event state + * with interrupts disabled, otherwise we race + * with our own interrupt routine! + */ + spin_lock_irqsave(&skt->ev_lock, flags); + events = skt->ev_pending; + skt->ev_pending = 0; + spin_unlock_irqrestore(&skt->ev_lock, flags); + + if (skt->handler && events) + skt->handler(skt->handler_info, events); + } +} + +static struct tq_struct etna_task = { + routine: etna_bh +}; + +/* + * Handles card insert and eject. + * Scheduled from mask_etna_irq, as there seems to be only + * one interrupt for ETNA and the CF card. + */ +void etna_interrupt(void *p) +{ + struct etna_skt *skt = skts[0]; + int status, sktpower, cardpower; + int events; + + DEBUG_ETNA("ETNA: etna_interrupt\n"); + + /* We may get called from ide init */ + if (!initialized) { + return; + } + + events = __etna_get_status(skt); + + if ( (events & SS_DETECT) && (events & SS_READY) ) { + DEBUG_ETNA("ETNA: Int: Nothing to do, returning\n"); + return; + } + + spin_lock(&skt->ev_lock); + skt->ev_pending |= events; + spin_unlock(&skt->ev_lock); + schedule_task(&etna_task); +} + + +static int __init etna_init_skt(int nr) +{ + struct etna_skt *skt; + + DEBUG_ETNA("ETNA: etna_init_skt\n"); + skt = kmalloc(sizeof(struct etna_skt), GFP_KERNEL); + if (!skt) + return -ENOMEM; + + memset(skt, 0, sizeof(struct etna_skt)); + + spin_lock_init(&skt->ev_lock); + + skt->nr = nr; + //skt->physbase = nr ? 0x50000000 : 0x40000000; + skt->physbase = CF1_P_BASE; + DEBUG_ETNA("ETNA: skt->physbase=0x%x\n", skt->physbase); + + skt->cur_pmr = skt->pmr; + //skt->regbase = (u_int)__ioremap(skt->physbase + CF_REG_BASE, + // CF_REG_SIZE, 0); + skt->regbase = ETNA_V_BASE; + + if (!skt->regbase) + goto err_free; + + skts[nr] = skt; + return 0; + +err_unmap: + iounmap((void *)skt->regbase); +err_free: + kfree(skt); + skts[nr] = NULL; + return 1; +} + +static void etna_free_resources(void) +{ + int i; + + DEBUG_ETNA("ETNA: etna_free_resources\n"); + for (i = NR_ETNA; i >= 0; i--) { + struct etna_skt *skt = skts[i]; + skts[i] = NULL; + if (skt == NULL) + continue; + //free_irq(IRQ_EINT1, skt); /* Socket interrupt */ + if (skt->regbase) { + __raw_writeb(0, skt->regbase + PCIMR); /* Card int mask */ + + } + + //iounmap((void *)skt->regbase); /* Using ETNA_V_BASE for now */ + kfree(skt); + } +} + +static int __init etna_init(void) +{ + int err, nr; + + printk("ETNA: Initializing CF controller\n"); + + for (nr = 0; nr < NR_ETNA; nr++) { + err = etna_init_skt(nr); + if (err) + goto free; + } + + err = register_ss_entry(nr, &etna_operations); + if (err) + goto free; + + + initialized = 1; + etna_powerup(0); + + return 0; + +free: + printk("ETNA: Failed to initialize\n"); + etna_free_resources(); + /* + * An error occurred. Unmap and free all ETNA + */ + return err; +} + +void etna_powerup(int lock) +{ + DEBUG_ETNA("ETNA: CompactFlash PCMCIA controller warm init\n"); + + /* Turn on the power if it is not already on */ + start_pump(lock); + mdelay(30); /* Needed for some cards */ + etna_init_hw(); + + /* Restore the card configuration */ + etna_set_cf(cur_cfg); + + /* Clear the ETNA interrupts */ + __raw_writeb(0x01, ETNA_V_BASE + ETNA_INT_CLEAR); + + /* Turn on ETNA interrupt */ + __raw_writeb(0x01, ETNA_V_BASE + ETNA_INT_MASK); + + //enable_irq(IRQ_EINT1); +} + +/* + * Powers down the card and ETNA. + * Some of these steps may not be necessary. + */ +void etna_powerdown(int lock) +{ + int cfg; + long flags; + + DEBUG_ETNA("ETNA: Powering down the CF controller\n"); + + if (lock) + save_flags_cli(flags); + + //disable_irq(IRQ_EINT1); + + /* Save the current card configuration */ + cur_cfg = CF1_READB(CF_CUR_CFG); + + /* Turn off card interrupts */ + __raw_writeb(0, ETNA_V_BASE + ETNA_INT_MASK); + + /* Clear card interrupts */ + __raw_writeb(0xff, ETNA_V_BASE + ETNA_INT_CLEAR); + + /* + * Writing this makes power up fail with garbage + * if something does not come up right. + */ + __raw_writeb(0, ETNA_V_BASE + ETNA_SKT_CTRL); + + __raw_writeb(0, ETNA_V_BASE + ETNA_SKT_ACTIVE); + __raw_writeb(0, ETNA_V_BASE + ETNA_SKT_CFG); + __raw_writeb(0, ETNA_V_BASE + ETNA_WAKE_1); + __raw_writeb(0, ETNA_V_BASE + ETNA_WAKE_2); + + /* Power down the CF card */ + cfg = psionw_readb(PBDR); + if (!(cfg & PBDR_VPCEN)) { + psionw_writeb(cfg | PBDR_VPCEN, PBDR); + } + + /* Delay is needed here */ + mdelay(20); + +#if 0 + /* Power down the ETNA socket */ + cfg = psionw_readb(PDDR); + if (cfg & PDDR_ETNA_PWR) { + //psionw_writeb(cfg & ~PDDR_ETNA_PWR, PDDR); + } +#endif + + if (lock) + restore_flags(flags); +} + +void psion_debug_etna(void) +{ + debug_gpio(); + + printk("ETNA: ATTR_BASE = 0x%08x ATTR_BASE + 4 = 0x%08x\n", + CF1_READL(0), + CF1_READL(4)); + + printk("ETNA: MEM_BASE = 0x%08x MEM_BASE + 4 = 0x%08x\n", + CF1_MEM_READL(0), + CF1_MEM_READL(4)); + + printk("ETNA: SKT_STATUS=0x%02x SKT_CFG=0x%02x SKT_CTRL=0x%02x SKT_ACTIVE=0x%02x\n", + __raw_readb(ETNA_V_BASE + ETNA_SKT_STATUS), + __raw_readb(ETNA_V_BASE + ETNA_SKT_CFG), + __raw_readb(ETNA_V_BASE + ETNA_SKT_CTRL), + __raw_readb(ETNA_V_BASE + ETNA_SKT_ACTIVE)); + + printk("ETNA: ETNA_INT_STATUS=0x%02x ETNA_INT_MASK=0x%02x\n", + __raw_readb(ETNA_V_BASE + ETNA_INT_STATUS), + __raw_readb(ETNA_V_BASE + ETNA_INT_MASK)); + + printk("CF1: 0x200=0x%02x 0x202=0x%02x 0x204=0x%02x\n", + CF1_READB(CF_CUR_CFG), + CF1_READB(0x202), + CF1_READB(0x204)); + DEBUG_CF1_REG("CFG_REG", CF_CFG_REG); + + printk("MEMCFG1: 0x%08x MEMCFG2=0x%08x\n", + psionw_readl(MEMCFG1), psionw_readl(MEMCFG2)); + + printk("CF1 READ TEST: 0x%x\n", + CF1_INB(0x3f6)); +} + +static void __exit etna_exit(void) +{ + unregister_ss_entry(&etna_operations); + etna_free_resources(); +} + +module_init(etna_init); +module_exit(etna_exit); diff -urN -X dontdiff linux-2.4.27/drivers/pcmcia/psion_etna.h linux-2.4.27-5mx/drivers/pcmcia/psion_etna.h --- linux-2.4.27/drivers/pcmcia/psion_etna.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/pcmcia/psion_etna.h 2005-02-05 14:00:22.000000000 +0100 @@ -0,0 +1,175 @@ +#include + +extern void debug_gpio(void); + +#define GET_ETNA_UNKNOWN_0 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_0) +#define GET_ETNA_UNKNOWN_1 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_1) +#define GET_ETNA_UNKNOWN_2 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_2) +#define GET_ETNA_UNKNOWN_3 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_3) +#define GET_ETNA_UNKNOWN_4 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_4) +#define GET_ETNA_UNKNOWN_5 __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_5) +#define GET_ETNA_INT_STATUS __raw_readb(ETNA_V_BASE + ETNA_INT_STATUS) +#define GET_ETNA_INT_MASK __raw_readb(ETNA_V_BASE + ETNA_INT_MASK) +#define GET_ETNA_INT_CLEAR __raw_readb(ETNA_V_BASE + ETNA_INT_CLEAR) +#define GET_ETNA_SKT_STATUS __raw_readb(ETNA_V_BASE + ETNA_SKT_STATUS) +#define GET_ETNA_SKT_CFG __raw_readb(ETNA_V_BASE + ETNA_SKT_CFG) +#define GET_ETNA_SKT_WAKE1 __raw_readb(ETNA_V_BASE + ETNA_SKT_WAKE1) +#define GET_ETNA_SKT_ACTIVE __raw_readb(ETNA_V_BASE + ETNA_SKT_ACTIVE) +#define GET_ETNA_UNKNOWN_E __raw_readb(ETNA_V_BASE + ETNA_UNKNOWN_E) +#define GET_ETNA_SKT_WAKE2 __raw_readb(ETNA_V_BASE + ETNA_SKT_WAKE2) + +//#define ETNA_DEBUG 1 + +#ifdef ETNA_DEBUG +#define DEBUG_ETNA(x...) printk(x) + +#define DEBUG_ETNA_REG(desc, p) printk("ETNA: %s: Port 0x%08x = 0x%02x\n", \ + (desc), \ + skt->regbase + (p), \ + __raw_readb(skt->regbase + (p))) + +#define DEBUG_CF1_REG(desc, p) printk("CF: %s: Port 0x%08x = 0x%02x\n", \ + (desc), \ + CF1_V_BASE + CF_ATTR_BASE + (p), \ + __raw_readl(CF1_V_BASE + CF_ATTR_BASE + (p))) + +#define DEBUG_READ_TEST(desc) printk("CF: %s: Port 0x3f6 = 0x%02x\n", (desc), CF1_INB(0x3f6)) + +#else +#define DEBUG_ETNA(x...) do { ; } while(0) +#define DEBUG_ETNA_REG(desc,p) do { ; } while(0) +#define DEBUG_CF1_REG(desc,p) do { ; } while(0) +#define DEBUG_READ_TEST(desc) do { ; } while(0) +#endif + +#define CF1_READB(p) (*(volatile u8 *)(CF1_V_BASE + CF_ATTR_BASE + (p))) +#define CF1_WRITEB(v,p) (*(volatile u8 *)(CF1_V_BASE + CF_ATTR_BASE + (p)) = (v)) + +#define CF1_READL(p) __raw_readl(CF1_V_BASE + CF_ATTR_BASE + (p)) +#define CF1_WRITEL(v,p) __raw_writel((v), CF1_V_BASE + CF_ATTR_BASE + (p)) + +#define CF1_INB(p) (*(volatile uint8_t *)(CF1_V_BASE + CF_IO8_BASE + (p))) +#define CF1_INW(p) (*(volatile uint32_t *)(CF1_V_BASE + CF_IO16_BASE + (p)) & 0xffff) + +#define CF1_MEM_READB(p) (*(volatile u8 *)(CF1_V_BASE + CF_MEM_BASE + (p))) +#define CF1_MEM_READL(p) __raw_readl(CF1_V_BASE + CF_MEM_BASE + (p)) + +#define CF_DEF_CONFIG 0x1 /* Use the first one the CF card */ + +#define PCISR 0x06 /* PC card int status reg */ +#define PCIMR 0x07 /* PC card int mask reg */ +#define PCICR 0x08 /* PC card int clear reg */ + + +/* + * Sets up the ETNA hardware + */ +static __inline__ +void etna_init_hw(void) +{ + int cfg; + unsigned long flags; + + save_flags_cli(flags); + +#if defined(CONFIG_PSIONW_5MXPRO24MB) | defined(CONFIG_PSIONW_5MXPRO32MB) + /* Set the memory wait states to PCMCIA */ + // FIXME5MX: Should be checked... + psionw_writel(0x93930002, MEMCFG1); +#endif + + /* Clear the door switch interrupt (not in use) */ + psionw_writel(1, MCEOI); + + /* Power up the CF card */ + cfg = psionw_readb(PBDR); + DEBUG_ETNA("PBDR = 0x%x\n", cfg); + if (cfg & PBDR_VPCEN) { + DEBUG_ETNA("Clearing no CF power bit in PBDR\n"); + psionw_writeb(cfg & ~PBDR_VPCEN, PBDR); + } + + /* Wake up the socket */ + __raw_writeb(0x88, ETNA_V_BASE + ETNA_WAKE_1); + __raw_writeb(0x10, ETNA_V_BASE + ETNA_WAKE_2); + + /* Configure the ETNA socket */ + __raw_writeb(0x41, ETNA_V_BASE + ETNA_SKT_CTRL); + + /* Activate the socket */ + __raw_writeb(0x66, ETNA_V_BASE + ETNA_SKT_ACTIVE); + + restore_flags(flags); +} + +/* + * Sets the CF card configuration to selected value. + */ +static __inline__ +void etna_set_cf(int cf_config) +{ + int loops; + + //static int count = 0; + //count++; + //cpu_cache_clean_invalidate_all(); + //printk("XXX\n"); + again: + loops = 0; + + DEBUG_ETNA("ETNA: Restoring selected card configuration to: 0x%x\n", cf_config); + + while (CF1_READB(CF_CUR_CFG) != cf_config) { + loops++; + + /* Clear pending interrupts for both sockets at CCSR */ + CF1_WRITEB(0, 0x202); + + /* Restore the selected card configuration */ + CF1_WRITEB(cf_config, 0x200); + + mdelay(100); + + if (loops > 20) { + printk("ETNA: Unable to restore card configuration: 0x%02x != 0x%02x\n", + CF1_READB(CF_CUR_CFG), cf_config); + return; + } + } + + /* + * Did the configuration stay? + */ + while (CF1_READB(CF_CUR_CFG) != cf_config) { + //printk("XXX etna_cf_called total %d times\n", count); + printk("XXX Trying again\n"); + goto again; + } +} + +/* + * Initializes the ETNA hardware. Any previous card configuration + * is lost. Needed on 5mx Pro when booting without Epoc. Called + * from ide.h + */ +static __inline__ +void etna_cold_init(void) +{ + printk("ETNA: CompactFlash PCMCIA controller hard init\n"); + + /* Turn on the power if it is not already on */ + start_pump(1); + mdelay(30); /* Needed for some cards */ + etna_init_hw(); + + /* Set the card configuration */ + etna_set_cf(CF_DEF_CONFIG); + + /* Clear the ETNA interrupts */ + __raw_writeb(0x01, ETNA_V_BASE + ETNA_INT_CLEAR); + + /* Turn on ETNA interrupt */ + __raw_writeb(0x01, ETNA_V_BASE + ETNA_INT_MASK); + + //enable_irq(IRQ_EINT1); +} diff -urN -X dontdiff linux-2.4.27/drivers/serial/Config.in linux-2.4.27-5mx/drivers/serial/Config.in --- linux-2.4.27/drivers/serial/Config.in 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/serial/Config.in 2004-12-04 09:29:27.000000000 +0100 @@ -23,6 +23,9 @@ dep_tristate 'CLPS711X serial port support' CONFIG_SERIAL_CLPS711X $CONFIG_ARCH_CLPS711X dep_bool ' Support for console on CLPS711X serial port' CONFIG_SERIAL_CLPS711X_CONSOLE $CONFIG_SERIAL_CLPS711X + dep_tristate 'Psion serial port support' CONFIG_SERIAL_PSIONW $CONFIG_ARCH_PSIONW + dep_bool ' Support for console on Psion serial port' CONFIG_SERIAL_PSIONW_CONSOLE $CONFIG_SERIAL_PSIONW + dep_bool 'DC21285 serial port support' CONFIG_SERIAL_21285 $CONFIG_FOOTBRIDGE dep_bool ' Use /dev/ttyS0 device (OBSOLETE)' CONFIG_SERIAL_21285_OLD $CONFIG_SERIAL_21285 $CONFIG_OBSOLETE dep_bool ' Console on DC21285 serial port' CONFIG_SERIAL_21285_CONSOLE $CONFIG_SERIAL_21285 @@ -58,6 +61,7 @@ if [ "$CONFIG_SERIAL_AMBA" = "y" -o \ "$CONFIG_SERIAL_CLPS711X" = "y" -o \ + "$CONFIG_SERIAL_PSIONW" = "y" -o \ "$CONFIG_SERIAL_SA1100" = "y" -o \ "$CONFIG_SERIAL_ANAKIN" = "y" -o \ "$CONFIG_SERIAL_UART00" = "y" -o \ @@ -68,6 +72,7 @@ else if [ "$CONFIG_SERIAL_AMBA" = "m" -o \ "$CONFIG_SERIAL_CLPS711X" = "m" -o \ + "$CONFIG_SERIAL_PSIONW" = "m" -o \ "$CONFIG_SERIAL_SA1100" = "m" -o \ "$CONFIG_SERIAL_ANAKIN" = "m" -o \ "$CONFIG_SERIAL_UART00" = "m" -o \ @@ -79,6 +84,7 @@ fi if [ "$CONFIG_SERIAL_AMBA_CONSOLE" = "y" -o \ "$CONFIG_SERIAL_CLPS711X_CONSOLE" = "y" -o \ + "$CONFIG_SERIAL_PSIONW_CONSOLE" = "y" -o \ "$CONFIG_SERIAL_SA1100_CONSOLE" = "y" -o \ "$CONFIG_SERIAL_ANAKIN_CONSOLE" = "y" -o \ "$CONFIG_SERIAL_UART00_CONSOLE" = "y" -o \ diff -urN -X dontdiff linux-2.4.27/drivers/serial/Makefile linux-2.4.27-5mx/drivers/serial/Makefile --- linux-2.4.27/drivers/serial/Makefile 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/serial/Makefile 2004-12-04 09:37:35.000000000 +0100 @@ -28,6 +28,7 @@ obj-$(CONFIG_SERIAL_ANAKIN) += anakin.o obj-$(CONFIG_SERIAL_AMBA) += amba.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o +obj-$(CONFIG_SERIAL_PSIONW) += serial_psionw.o obj-$(CONFIG_SERIAL_SA1100) += sa1100.o obj-$(CONFIG_SERIAL_UART00) += uart00.o obj-$(CONFIG_SERIAL_OMAHA) += omaha.o diff -urN -X dontdiff linux-2.4.27/drivers/serial/core.c linux-2.4.27-5mx/drivers/serial/core.c --- linux-2.4.27/drivers/serial/core.c 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/serial/core.c 2004-12-04 09:38:37.000000000 +0100 @@ -1940,6 +1940,7 @@ extern void ambauart_console_init(void); extern void anakin_console_init(void); extern void clps711xuart_console_init(void); +extern void psionw_console_init(void); extern void sa1100_rs_console_init(void); extern void serial8250_console_init(void); extern void at91_console_init(void); @@ -1958,6 +1959,9 @@ #ifdef CONFIG_SERIAL_CLPS711X_CONSOLE clps711xuart_console_init(); #endif +#ifdef CONFIG_SERIAL_PSIONW_CONSOLE + psionwuart_console_init(); +#endif #ifdef CONFIG_SERIAL_SA1100_CONSOLE sa1100_rs_console_init(); #endif diff -urN -X dontdiff linux-2.4.27/drivers/serial/serial_psionw.c linux-2.4.27-5mx/drivers/serial/serial_psionw.c --- linux-2.4.27/drivers/serial/serial_psionw.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/serial/serial_psionw.c 2005-01-05 17:57:11.000000000 +0100 @@ -0,0 +1,815 @@ +/* + * linux/drivers/char/serial_psionw.c + * + * Copyright (C) 2001 Yuji Shinokawa + * + * Written by Yuji Shinokawa, Irda port support and generic + * updates by Tony Lindgren + * + * Based on the clps711x code, some portions of the code + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#if defined(CONFIG_SERIAL_AMBA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + +#include +#include "serial_psionw.h" + +#define UART_NR 2 + +#define SERIAL_PSIONW_NAME "ttyAM" +#define SERIAL_PSIONW_MAJOR 204 +#define SERIAL_PSIONW_MINOR 16 +#define SERIAL_PSIONW_NR UART_NR + +#define CALLOUT_PSIONW_NAME "cuaam" +#define CALLOUT_PSIONW_MAJOR 205 +#define CALLOUT_PSIONW_MINOR 16 +#define CALLOUT_PSIONW_NR UART_NR + +static struct tty_driver normal, callout; +static struct tty_struct *psionw_table[UART_NR]; +static struct termios *psionw_termios[UART_NR],*psionw_termios_locked[UART_NR]; +#ifdef SUPPORT_SYSRQ +static struct console psionw_console; +#endif + +/* + * Access macros for the AMBA UARTs + */ +#define UART_RX_DATA(s) (((s) & AMBA_UARTFR_RXFE) == 0) +#define UART_TX_READY(s) (((s) & AMBA_UARTFR_TXFF) == 0) + +static void +psionwuart_stop_tx(struct uart_port *port, u_int from_tty) +{ + u_int uartintm; + + uartintm = UART_GET_INT_MASK(port); + uartintm &= ~PSIONW_UART_TXINT; + UART_PUT_INT_MASK(port, uartintm); +} + +static void +psionwuart_start_tx(struct uart_port *port, u_int from_tty) +{ + u_int uartintm; + + uartintm = UART_GET_INT_MASK(port); + uartintm |= PSIONW_UART_TXINT; + UART_PUT_INT_MASK(port, uartintm); +} + +static void +psionwuart_stop_rx(struct uart_port *port) +{ + u_int uartintm; + + uartintm = UART_GET_INT_MASK(port); + uartintm &= ~PSIONW_UART_RXINT; + UART_PUT_INT_MASK(port, uartintm); +} + +static void +psionwuart_enable_ms(struct uart_port *port) +{ + u_int uartintm; + + uartintm = UART_GET_INT_MASK(port); + uartintm |= PSIONW_UART_MSINT; + UART_PUT_INT_MASK(port, uartintm); +} + +static void +#ifdef SUPPORT_SYSRQ +psionwuart_rx_chars(struct uart_info *info, struct pt_regs *regs) +#else +psionwuart_rx_chars(struct uart_port *port) +#endif +{ + struct uart_info *info = port->info; + struct tty_struct *tty = info->tty; + unsigned int status, ch, rsr, max_count = 256; + + status = UART_GET_FR(port); + while (UART_RX_DATA(status) && max_count--) { + if (tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty->flip.tqueue.routine((void *) tty); + if (tty->flip.count >= TTY_FLIPBUF_SIZE) { + printk(KERN_WARNING "TTY_DONT_FLIP set\n"); + return; + } + } + + /* Get the data plus 3 error bits */ + rsr = UART_GET_CHAR(port); + ch = (rsr & 0xff); + + *tty->flip.char_buf_ptr = ch; + *tty->flip.flag_buf_ptr = TTY_NORMAL; + port->icount.rx++; + + /* + * Note that the error handling code is + * out of the main execution path. + * Note also that psionw has the error bits + * in the data register. + */ + //rsr = UART_GET_RSR(port) | UART_DUMMY_RSR_RX; + //rsr |= UART_DUMMY_RSR_RX; + if (rsr & PSIONW_UARTRSR_ANY) { + if (rsr & PSIONW_UARTRSR_PE) { + port->icount.parity++; + } else if (rsr & PSIONW_UARTRSR_FE) { + port->icount.frame++; + } + if (rsr & PSIONW_UARTRSR_OE) { + port->icount.overrun++; + } + rsr &= port->read_status_mask; + if (rsr & PSIONW_UARTRSR_PE) + *tty->flip.flag_buf_ptr = TTY_PARITY; + else if (rsr & PSIONW_UARTRSR_FE) + *tty->flip.flag_buf_ptr = TTY_FRAME; + } + + if (uart_handle_sysrq_char(info, ch, regs)) + goto ignore_char; + + if ((rsr & port->ignore_status_mask) == 0) { + tty->flip.flag_buf_ptr++; + tty->flip.char_buf_ptr++; + tty->flip.count++; + } + if ((rsr & PSIONW_UARTRSR_OE) && + tty->flip.count < TTY_FLIPBUF_SIZE) { + /* + * Overrun is special, since it's reported + * immediately, and doesn't affect the current + * character + */ + *tty->flip.char_buf_ptr++ = 0; + *tty->flip.flag_buf_ptr++ = TTY_OVERRUN; + tty->flip.count++; + } + ignore_char: + status = UART_GET_FR(port); + } + tty_flip_buffer_push(tty); + return; +} + +static void +psionwuart_tx_chars(struct uart_port *port) +{ + struct circ_buf *xmit = &port->info->xmit; + int count; + + if (port->x_char) { + UART_PUT_CHAR(port, port->x_char); + port->icount.tx++; + port->x_char = 0; + return; + } + if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { + psionwuart_stop_tx(port, 0); + return; + } + + count = port->fifosize >> 1; + do { + UART_PUT_CHAR(port, xmit->buf[xmit->tail]); + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + port->icount.tx++; + if (uart_circ_empty(xmit)) + break; + } while (--count > 0); + + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + uart_write_wakeup(port); + + if (uart_circ_empty(xmit)) + psionwuart_stop_tx(port, 0); +} + +/* + * Only used for the UART1, the Irda port does not support this. + */ +static void +psionwuart_modem_status(struct uart_port *port) +{ + struct uart_info *info = port->info; + unsigned int status, delta; + + status = UART_GET_FR(port) & PSIONW_UARTFR_MODEM_ANY; + psionw_writel(0, UMSEOI); + + delta = status ^ info->driver_priv; + info->driver_priv = status; + + if (!delta) + return; + + if (delta & AMBA_UARTFR_DCD) + uart_handle_dcd_change(port, status & AMBA_UARTFR_DCD); + + if (delta & AMBA_UARTFR_DSR) + port->icount.dsr++; + + if (delta & AMBA_UARTFR_CTS) + uart_handle_cts_change(port, status & AMBA_UARTFR_CTS); + + wake_up_interruptible(&info->delta_msr_wait); +} + +/* + * Serial interrupts + */ +static void +psionwuart_int(int irq, void *dev_id, struct pt_regs *regs) +{ + struct uart_port *port = dev_id; + unsigned int status, pass_counter = AMBA_ISR_PASS_LIMIT; + unsigned int psionwuart_int_mask = + (PSIONW_UART_RXINT | PSIONW_UART_TXINT | PSIONW_UART_MSINT); + + /* Irda port does not support modem status */ + if (port->mapbase == PSIONW_UART0_V_BASE) + psionwuart_int_mask = (PSIONW_UART_RXINT | PSIONW_UART_TXINT); + + status = UART_GET_INT_STATUS(port); + do { + if (status & PSIONW_UART_RXINT) { +#ifdef SUPPORT_SYSRQ + psionwuart_rx_chars(port, regs); +#else + psionwuart_rx_chars(port); +#endif + } + if (status & PSIONW_UART_TXINT) { + psionwuart_tx_chars(port); + } + if ((status & PSIONW_UART_MSINT) + && (port->mapbase == PSIONW_UART1_V_BASE)) { + + /* Clear modem status interrupt */ + UART_CLEAR_INT(port, 1); + + psionwuart_modem_status(port); + } + if (pass_counter-- == 0) { + break; + } + status = UART_GET_INT_STATUS(port); + } while (status & psionwuart_int_mask); +} + +static u_int +psionwuart_tx_empty(struct uart_port *port) +{ + u_int status = UART_GET_FR(port); + return status & AMBA_UARTFR_BUSY ? 0 : TIOCSER_TEMT; +} + +static unsigned int +psionwuart_get_mctrl(struct uart_port *port) +{ + unsigned int result = 0; + unsigned int status; + + status = UART_GET_FR(port); + if (status & AMBA_UARTFR_DCD) + result |= TIOCM_CAR; + if (status & AMBA_UARTFR_DSR) + result |= TIOCM_DSR; + if (status & AMBA_UARTFR_CTS) + result |= TIOCM_CTS; + + return result; +} + +static void +psionwuart_set_mctrl(struct uart_port *port, u_int mctrl) +{ + unsigned int pcdr = 0; + + /* NOTE: printk's here will corrupt the terminal */ + if ((mctrl & TIOCM_RTS) == TIOCM_RTS) { + pcdr = psionw_readl(PCDR); + if (port->mapbase == PSIONW_UART0_V_BASE) { + pcdr |= PCDR_UART1; + } else if (port->mapbase == PSIONW_UART1_V_BASE) { + pcdr |= PCDR_UART2; + } + psionw_writel(pcdr, PCDR); + } +} + +static void +psionwuart_break_ctl(struct uart_port *port, int break_state) +{ + unsigned int ubrfcr; + + ubrfcr = UART_GET_FCR(port); + if (break_state == -1) + ubrfcr |= PSIONW_UARTFCR_BREAK; + else + ubrfcr &= ~PSIONW_UARTFCR_BREAK; + UART_PUT_FCR(port, ubrfcr); +} + +static int +psionwuart_startup(struct uart_port *port) +{ + struct uart_info *info = port->info; + u_int cfg; + int retval; + u_int uartintm; + + /* + * Allocate the IRQs + */ + retval = request_irq(port->irq, psionwuart_int, 0, "psionwuart", port); + if (retval) + return retval; + + /* + * initialise the old status of the modem signals + */ + info->driver_priv = UART_GET_FR(port) & PSIONW_UARTFR_MODEM_ANY; + + /* + * enable the port + */ + UART_PUT_CR(port, PSIONW_UARTCR_UARTEN); + + uartintm = UART_GET_INT_MASK(port); + uartintm |= PSIONW_UART_TXINT | PSIONW_UART_RXINT | PSIONW_UART_MSINT; + UART_PUT_INT_MASK(port, uartintm); + + // Enable the irda for uart0 + if (port->mapbase == PSIONW_UART0_V_BASE) { + cfg = UART_GET_CR(port); + cfg &= ~PSIONW_UARTCR_SIREN; + cfg |= PSIONW_UARTCR_IRTXM; // power friendly tx encoding + UART_PUT_CR(port, cfg); + +#if 0 + /* + * Unblock irda rx while tx (full duplex) + * Won't work with IrTTY because of + * duplicate packets + */ + cfg = readl(port->membase + PSIONW_UARTTR3); + cfg |= PSIONW_UARTTR3_IRUBLOCK; + writel(cfg, port->membase + PSIONW_UARTTR3); +#endif + + } + + return 0; +} + +static void +psionwuart_shutdown(struct uart_port *port) +{ + u_int pcdr; + u_int uartintm; + + /* + * Free the interrupt + */ + free_irq(port->irq, port); /* UART interrupt */ + + uartintm = UART_GET_INT_MASK(port); + uartintm &= ~(PSIONW_UART_TXINT | PSIONW_UART_RXINT | PSIONW_UART_MSINT); + UART_PUT_INT_MASK(port, uartintm); + + /* + * disable the port + */ + UART_PUT_CR(port, 0); + + /* + * disable break condition and fifos + */ + UART_PUT_FCR(port, UART_GET_FCR(port) & + ~(PSIONW_UARTFCR_UFIFOEN | PSIONW_UARTFCR_BREAK)); + + /* + * Don't forget to disable port in PCDR + */ + pcdr = psionw_readl(PCDR); + if (port->mapbase == PSIONW_UART0_V_BASE) { + pcdr &= ~PCDR_UART1; + } else if (port->mapbase == PSIONW_UART1_V_BASE) { + pcdr &= ~PCDR_UART2; + } + psionw_writel(pcdr, PCDR); + +} + +static void +psionwuart_change_speed(struct uart_port *port, u_int cflag, + u_int iflag, u_int quot) +{ + u_int fcr; + unsigned long flags; + +#if DEBUG + printk("psionwuart_set_cflag(0x%x) called\n", cflag); +#endif + /* byte size and parity */ + switch (cflag & CSIZE) { + case CS5: + fcr = PSIONW_UARTFCR_WLEN_5; + break; + case CS6: + fcr = PSIONW_UARTFCR_WLEN_6; + break; + case CS7: + fcr = PSIONW_UARTFCR_WLEN_7; + break; + default: // CS8 + fcr = PSIONW_UARTFCR_WLEN_8; + break; + } + if (cflag & CSTOPB) + fcr |= PSIONW_UARTFCR_XSTOP; + if (cflag & PARENB) { + fcr |= PSIONW_UARTFCR_PRTEN; + if (!(cflag & PARODD)) + fcr |= PSIONW_UARTFCR_EVENPRT; + } + if (port->fifosize > 1) + fcr |= PSIONW_UARTFCR_UFIFOEN; + + port->read_status_mask = PSIONW_UARTRSR_OE; + if (iflag & INPCK) + port->read_status_mask |= PSIONW_UARTRSR_FE | PSIONW_UARTRSR_PE; + + /* + * Characters to ignore + */ + port->ignore_status_mask = 0; + if (iflag & IGNPAR) + port->ignore_status_mask |= + PSIONW_UARTRSR_FE | PSIONW_UARTRSR_PE; + if (iflag & IGNBRK) { + /* + * If we're ignoring parity and break indicators, + * ignore overruns too (for real raw support). + */ + if (iflag & IGNPAR) + port->ignore_status_mask |= PSIONW_UARTRSR_OE; + } + + /* + * Ignore all characters if CREAD is not set. + */ +// if ((cflag & CREAD) == 0) +// port->ignore_status_mask |= UART_DUMMY_RSR_RX; + + /* first, disable everything */ + save_flags(flags); + cli(); + + /* Set baud rate */ + quot -= 1; + UART_PUT_LCR(port, quot); + + /* Set the frame control */ + UART_PUT_FCR(port, fcr); + + restore_flags(flags); +} + +static const char *psionwuart_type(struct uart_port *port) +{ + return port->type == PORT_PSIONW ? "PSIONW" : NULL; +} + +/* + * Release the memory region(s) being used by 'port' + */ +static void +psionwuart_release_port(struct uart_port *port) +{ + release_mem_region(port->mapbase, UART_PORT_SIZE); +} + +/* + * Request the memory region(s) being used by 'port' + */ +static int +psionwuart_request_port(struct uart_port *port) +{ + return request_region(port->mapbase, UART_PORT_SIZE, "serial_psionw") + != NULL ? 0 : -EBUSY; +} + +/* + * Configure/autoconfigure the port. + */ +static void +psionwuart_config_port(struct uart_port *port, int flags) +{ + if (flags & UART_CONFIG_TYPE) { + port->type = PORT_PSIONW; + psionwuart_request_port(port); + } +} + +/* + * verify the new serial_struct (for TIOCSSERIAL). + */ +static int +psionwuart_verify_port(struct uart_port *port, struct serial_struct *ser) +{ + int ret = 0; + if (ser->type != PORT_UNKNOWN && ser->type != PORT_PSIONW) + ret = -EINVAL; + if (ser->irq < 0 || ser->irq >= NR_IRQS) + ret = -EINVAL; + if (ser->baud_base < 9600) + ret = -EINVAL; + return ret; +} + +static struct uart_ops psionw_pops = { + .tx_empty = psionwuart_tx_empty, + .set_mctrl = psionwuart_set_mctrl, + .get_mctrl = psionwuart_get_mctrl, + .stop_tx = psionwuart_stop_tx, + .start_tx = psionwuart_start_tx, + .stop_rx = psionwuart_stop_rx, + .enable_ms = psionwuart_enable_ms, + .break_ctl = psionwuart_break_ctl, + .startup = psionwuart_startup, + .shutdown = psionwuart_shutdown, + .change_speed = psionwuart_change_speed, + .type = psionwuart_type, + .release_port = psionwuart_release_port, + .request_port = psionwuart_request_port, + .config_port = psionwuart_config_port, + .verify_port = psionwuart_verify_port, +}; + +static struct uart_port psionw_ports[UART_NR] = { + { + .membase = (void *) PSIONW_UART0_V_BASE, + .mapbase = PSIONW_UART0_V_BASE, + .iotype = SERIAL_IO_MEM, + .irq = IRQ_UART1, + .uartclk = 7372800, + .fifosize = 16, + .ops = &psionw_pops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 0, + }, + { + .membase = (void *) PSIONW_UART1_V_BASE, + .mapbase = PSIONW_UART1_V_BASE, + .iotype = SERIAL_IO_MEM, + .irq = IRQ_UART2, + .uartclk = 7372800, + .fifosize = 16, + .ops = &psionw_pops, + .flags = ASYNC_BOOT_AUTOCONF, + .line = 1, + } +}; + +#ifdef CONFIG_SERIAL_PSIONW_CONSOLE +/* + * Print a string to the serial port trying not to disturb + * any possible real use of the port... + * + * The console_lock must be held when we get here. + * + * Note that this is called with interrupts already disabled + */ +static void +psionwuart_console_write(struct console *co, const char *s, u_int count) +{ + struct uart_port *port = psionw_ports + co->index; + unsigned int status, old_cr; + int i; + + /* + * Ensure that the port is enabled. + */ + old_cr = UART_GET_CR(port); + UART_PUT_CR(port, PSIONW_UARTCR_UARTEN); + + /* + * Now, do each character + */ + for (i = 0; i < count; i++) { + do { + status = UART_GET_FR(port); + } while (!UART_TX_READY(status)); + UART_PUT_CHAR(port, s[i]); + if (s[i] == '\n') { + do { + status = UART_GET_FR(port); + } while (!UART_TX_READY(status)); + UART_PUT_CHAR(port, '\r'); + } + } + + /* + * Finally, wait for transmitter to become empty + * and restore the uart state. + */ + do { + status = UART_GET_FR(port); + } while (status & AMBA_UARTFR_BUSY); + + UART_PUT_CR(port, old_cr); +} + +static kdev_t +psionwuart_console_device(struct console *co) +{ + return MKDEV(SERIAL_PSIONW_MAJOR, SERIAL_PSIONW_MINOR + co->index); +} + +static void __init +psionwuart_console_get_options(struct uart_port *port, int *baud, int *parity, + int *bits) +{ + if (UART_GET_CR(port) & PSIONW_UARTCR_UARTEN) { + u_int ubrfcr, quot; + + ubrfcr = UART_GET_FCR(port); + + *parity = 'n'; + if (ubrfcr & PSIONW_UARTFCR_PRTEN) { + if (ubrfcr & PSIONW_UARTFCR_EVENPRT) + *parity = 'e'; + else + *parity = 'o'; + } + + if ((ubrfcr & PSIONW_UARTFCR_WRDLEN_MASK) == PSIONW_UARTFCR_WLEN_7) + *bits = 7; + else + *bits = 8; + quot = UART_GET_LCR(port) & PSIONW_UART_BAUD_MASK; + + *baud = port->uartclk / (16 * (quot + 1)); + } +} + +static int __init +psionwuart_console_setup(struct console *co, char *options) +{ + struct uart_port *port; + int baud = 38400; + int bits = 8; + int parity = 'n'; + int flow = 'n'; + + /* + * Check whether an invalid uart number has been specified, and + * if so, search for the first available port that does have + * console support. + */ + if (co->index >= UART_NR) + co->index = 0; + port = uart_get_console(psionw_ports, UART_NR, co); + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + else + psionwuart_console_get_options(port, &baud, &parity, &bits); + + return uart_set_options(port, co, baud, parity, bits, flow); +} + +static struct console psionw_console = { + .name = SERIAL_PSIONW_NAME, + .write = psionwuart_console_write, +#ifdef used_and_not_const_char_pointer + .read = psionwuart_console_read, +#endif + .device = psionwuart_console_device, + .setup = psionwuart_console_setup, + .flags = CON_PRINTBUFFER, + .index = -1, +}; + +void __init +psionwuart_console_init(void) +{ + register_console(&psionw_console); +} + +#define PSIONW_CONSOLE &psionw_console +#else +#define PSIONW_CONSOLE NULL +#endif + +static struct uart_driver psionw_reg = { + .owner = THIS_MODULE, + .normal_major = SERIAL_PSIONW_MAJOR, +#ifdef CONFIG_DEVFS_FS + .normal_name = SERIAL_PSIONW_NAME "%d", + .callout_name = CALLOUT_PSIONW_NAME "%d", +#else + .normal_name = SERIAL_PSIONW_NAME, + .callout_name = CALLOUT_PSIONW_NAME, +#endif + + .normal_driver = &normal, + .callout_major = CALLOUT_PSIONW_MAJOR, + .callout_driver = &callout, + + .table = psionw_table, + .termios = psionw_termios, + .termios_locked = psionw_termios_locked, + + .minor = SERIAL_PSIONW_MINOR, + .nr = UART_NR, + + .cons = PSIONW_CONSOLE, +}; + +static int __init +psionwuart_init(void) +{ + int ret; + ret = uart_register_driver(&psionw_reg); + if (ret == 0) { + int i; + + for (i = 0; i < UART_NR; i++) + uart_add_one_port(&psionw_reg, &psionw_ports[i]); + } + return ret; +} + +static void __exit +psionwuart_exit(void) +{ + int i; + + for (i = 0; i < UART_NR; i++) + uart_remove_one_port(&psionw_reg, &psionw_ports[i]); + + uart_unregister_driver(&psionw_reg); +} + +module_init(psionwuart_init); +module_exit(psionwuart_exit); + +EXPORT_NO_SYMBOLS; + +MODULE_AUTHOR + ("Yuji Shinokawa Tony Lindgren "); +MODULE_DESCRIPTION("Psion Windermere serial driver"); +MODULE_LICENSE("GPL"); diff -urN -X dontdiff linux-2.4.27/drivers/serial/serial_psionw.h linux-2.4.27-5mx/drivers/serial/serial_psionw.h --- linux-2.4.27/drivers/serial/serial_psionw.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/serial/serial_psionw.h 2004-12-04 09:30:09.000000000 +0100 @@ -0,0 +1,93 @@ +/* + * linux/drivers/char/serial_psionw.h + */ + +/* Common with AMBA */ +#define AMBA_ISR_PASS_LIMIT 256 +#define AMBA_UARTIIR 0x1C /* Same as Psion UARTINTR (Read only) */ +#define AMBA_UARTDR 0x00 /* Data read or written from the interface. */ +#define AMBA_UARTRSR 0x04 /* Receive status register (Read only). */ +#define AMBA_UARTFR_TXFF 0x20 /* Same as Psion UTXFF */ +#define AMBA_UARTFR_RXFE 0x10 /* Same as Psion URXFE */ +#define AMBA_UARTFR_BUSY 0x08 /* Same as Psion UBUSY */ +#define AMBA_UARTFR_DCD 0x04 /* Same as Psion DCD */ +#define AMBA_UARTFR_DSR 0x02 /* Same as Psion DSR */ +#define AMBA_UARTFR_CTS 0x01 /* Same as Psion CTS */ +#define AMBA_UARTFR_TMSK (AMBA_UARTFR_TXFF + AMBA_UARTFR_BUSY) + +/* Psion specific port base addresses */ +#define PSIONW_UART0_BASE (0x0600) +#define PSIONW_UART1_BASE (0x0700) +#define PSIONW_UART0_V_BASE (PSIONW_BASE + PSIONW_UART0_BASE) +#define PSIONW_UART1_V_BASE (PSIONW_BASE + PSIONW_UART1_BASE) + +/* Offsets from the base address for each port */ +#define PSIONW_UARTDR (0x00) /* Data register */ +#define PSIONW_UARTFCR (0x04) /* Frame control register */ +#define PSIONW_UARTLCR (0x08) /* Line control register, UBRCR */ +#define PSIONW_UARTCON (0x0c) /* Port control register */ +#define PSIONW_UARTFR (0x10) /* Flag register (Read only) UARTFLG */ +#define PSIONW_UARTINT (0x14) /* Second level interrupt register */ +#define PSIONW_UARTINTM (0x18) /* Interrupt mask register */ +#define PSIONW_UARTINTR (0x1c) /* Interrupt raw status register (Read only) */ +#define PSIONW_UARTTR1 (0x20) /* Test register */ +#define PSIONW_UARTTR2 (0x24) /* Test register */ +#define PSIONW_UARTTR3 (0x28) /* Test register */ + +#define PSIONW_UART_RXINT (1 << 0) /* Rx interrupt */ +#define PSIONW_UART_TXINT (1 << 1) /* Tx interrupt */ +#define PSIONW_UART_MSINT (1 << 2) /* Modem status interrupt */ + +#define PSIONW_UART_BAUD_MASK ((1 << 16) - 1) +#define PSIONW_UARTTR3_IRUBLOCK (1 << 1) /* Unblock irda rx */ + +#define PSIONW_UARTCR_UARTEN (1 << 0) /* Uart enable */ +#define PSIONW_UARTCR_SIREN (1 << 1) /* SiR disable, clear to enable IrDA */ +#define PSIONW_UARTCR_IRTXM (1 << 2) /* IrDA Tx mode bit, set for power savings */ + +#define PSIONW_UARTRSR_FE (1 << 8) /* Frame error */ +#define PSIONW_UARTRSR_PE (1 << 9) /* Parity error */ +#define PSIONW_UARTRSR_OE (1 << 10) /* Overrun error */ + +#define PSIONW_UARTFCR_BREAK (1 << 0) +#define PSIONW_UARTFCR_PRTEN (1 << 1) +#define PSIONW_UARTFCR_EVENPRT (1 << 2) +#define PSIONW_UARTFCR_XSTOP (1 << 3) +#define PSIONW_UARTFCR_UFIFOEN (1 << 4) +#define PSIONW_UARTFCR_WLEN_5 (0 << 5) +#define PSIONW_UARTFCR_WLEN_6 (1 << 5) +#define PSIONW_UARTFCR_WLEN_7 (2 << 5) +#define PSIONW_UARTFCR_WLEN_8 (3 << 5) +#define PSIONW_UARTFCR_WRDLEN_MASK (3 << 5) + +#define UART_PORT_SIZE 64 + +#define PSIONW_UARTFR_MODEM_ANY (AMBA_UARTFR_DCD|AMBA_UARTFR_DSR|AMBA_UARTFR_CTS) + +/* No modem break in Psion */ +#define PSIONW_UARTRSR_ANY (PSIONW_UARTRSR_OE|PSIONW_UARTRSR_PE|PSIONW_UARTRSR_FE) + +#define UART_GET_INT_MASK(p) readb((p)->membase + PSIONW_UARTINTM) +#define UART_PUT_INT_MASK(p,c) writeb((c), (p)->membase + PSIONW_UARTINTM) +#define UART_CLEAR_INT(p,c) writeb((c), (p)->membase + PSIONW_UARTINT) +#define UART_GET_INT_STATUS(p) readb((p)->membase + PSIONW_UARTINTR) + +#define UART_GET_FR(p) readb((p)->membase + PSIONW_UARTFR) + +#define UART_GET_CR(p) readb((p)->membase + PSIONW_UARTCON) +#define UART_PUT_CR(p,c) writeb((c), (p)->membase + PSIONW_UARTCON) + +#define UART_PUT_CHAR(p, c) writeb((c), (p)->membase + AMBA_UARTDR) + +/* Must be readl for error bits */ +#define UART_GET_CHAR(p) readl((p)->membase + AMBA_UARTDR) +#define UART_RX_DATA(s) (((s) & AMBA_UARTFR_RXFE) == 0) +#define UART_TX_READY(s) (((s) & AMBA_UARTFR_TXFF) == 0) +#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & AMBA_UARTFR_TMSK) == 0) +#define UART_GET_RSR(p) readb((p)->membase + AMBA_UARTRSR) + +#define UART_GET_FCR(p) readb((p)->membase + PSIONW_UARTFCR) +#define UART_PUT_FCR(p,c) writeb((c), (p)->membase + PSIONW_UARTFCR) + +#define UART_GET_LCR(p) readl((p)->membase + PSIONW_UARTLCR) +#define UART_PUT_LCR(p,c) writel((c), (p)->membase + PSIONW_UARTLCR) diff -urN -X dontdiff linux-2.4.27/drivers/sound/Config.in linux-2.4.27-5mx/drivers/sound/Config.in --- linux-2.4.27/drivers/sound/Config.in 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/sound/Config.in 2004-12-04 09:30:09.000000000 +0100 @@ -142,6 +142,10 @@ dep_tristate ' Generic DAC on the SA11x0 SSP port' CONFIG_SOUND_SA1100SSP $CONFIG_SOUND_SA1100 fi +if [ "$CONFIG_ARCH_PSIONW" = "y" ]; then + bool ' Psion Windermere audio support' CONFIG_SOUND_PSIONW +fi + dep_tristate ' OSS sound modules' CONFIG_SOUND_OSS $CONFIG_SOUND if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then diff -urN -X dontdiff linux-2.4.27/drivers/sound/Makefile linux-2.4.27-5mx/drivers/sound/Makefile --- linux-2.4.27/drivers/sound/Makefile 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/sound/Makefile 2004-12-04 09:30:10.000000000 +0100 @@ -85,6 +85,7 @@ obj-$(CONFIG_SOUND_SA1111_UDA1341) += sa1111-uda1341.o obj-$(CONFIG_SOUND_SA1111_AC97) += sa1111-ac97.o ac97_codec.o obj-$(CONFIG_SOUND_SA1100SSP) += sa1100ssp.o +obj-$(CONFIG_SOUND_PSIONW) += psionw_sound.o obj-$(CONFIG_SOUND_EMU10K1) += ac97_codec.o obj-$(CONFIG_SOUND_BCM_CS4297A) += swarm_cs4297a.o obj-$(CONFIG_SOUND_RME96XX) += rme96xx.o diff -urN -X dontdiff linux-2.4.27/drivers/sound/psionw_sound.c linux-2.4.27-5mx/drivers/sound/psionw_sound.c --- linux-2.4.27/drivers/sound/psionw_sound.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/sound/psionw_sound.c 2004-12-24 10:29:33.000000000 +0100 @@ -0,0 +1,468 @@ +/* + Driver for PsionW Sound output + + (c) 2002 Simon Howard + + Microphone support by Simon Kagstrom + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* TODO: + * + * - Microphone support + * - /dev/mixer support + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "ulaw.h" + +/* these ought to be in the hardware headers: */ + +#define CODOUTEN (1 << 0) +#define CODINEN (1 << 1) + +#define CTXFF (1 << 1) +#define CRXFF (1 << 0) + +#define SAMPLE_RATE 8000 /* this cant be changed */ + +static int users; +static struct semaphore users_lock; +static int is_read; +static int is_write; + +extern void enable_irq(unsigned int irq); +extern void disable_irq(unsigned int irq); + +static int audio_dev; + +/* buffer size */ + +#define BUFSIZE 128 + +/* lock for access to writebuf. the interrupt handler does not check + * for this but interrupts are also disabled while we access writebuf + * in write + */ + +static struct semaphore writebuf_lock; +static struct semaphore readbuf_lock; + +/* freelist for buffering data */ + +static unsigned char writebuf[BUFSIZE]; +static int writebuf_head, writebuf_tail, writebuf_size; +static unsigned char readbuf[BUFSIZE]; +static int readbuf_head, readbuf_tail, readbuf_size; + +/* interrupt routine */ + +void psionw_sound_isr(unsigned int irq) +{ + int i, count; + + /* write some more data to the speaker */ + + count = writebuf_size < 8 ? writebuf_size : 8; + + for (i=0; i BUFSIZE) { + readbuf_size = BUFSIZE; + } + } + + /* if we had nothing left, stop interrupts until we + * get more (set in the write function) + */ + + if (count == 0) + disable_irq(IRQ_CSINT); + + /* clear interrupt */ + + psionw_writel(1, COEOI); + +} + +static ssize_t psionw_sound_read(struct file *file, char *buffer, + size_t count, loff_t *ppos) +{ + ssize_t i, n, ret = 0; + + while (count > 0) + { + if (readbuf_size == 0) { + if (file->f_flags & O_NONBLOCK) + break; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(1); + continue; + } + + + if (count > BUFSIZE - readbuf_size) + n = BUFSIZE - readbuf_size; + else + n = count; + + down(&readbuf_lock); + + /* disable irq while we do this */ + disable_irq(IRQ_CSINT); + + /* Read from head towards tail. n is the number of + * bytes to read (less or equal to readbuf_size). + * + * Case 1: head <= tail Case 2: head > tail + * _____________________ _____________________ + * | XXXXXXXXXXXXXXX | |XXX XXXXX| + * |__XXXXXXXXXXXXXXX____| |XXX_____________XXXXX| + * | | | | + * head---n-> tail tail head-n-> + */ + if (readbuf_head > readbuf_tail) { /* Case 2 */ + + /* fill in as much as possible at the end */ + + i = BUFSIZE - readbuf_head; + + if (i >= n) { + + /* we can fit them all at the end */ + + memcpy(buffer, readbuf + readbuf_head, n); + } else { + + /* first part at the end of buffer */ + + memcpy(buffer, readbuf + readbuf_head, i); + + /* second part at the beginning */ + + memcpy(buffer+i, readbuf, n-i); + } + } else { + + /* just fit in as much as we can */ + + memcpy(buffer, readbuf + readbuf_head, n); + } + readbuf_head = (readbuf_head + n) % BUFSIZE; + readbuf_size -= n; + + /* enable irq again */ + enable_irq(IRQ_CSINT); + up(&readbuf_lock); + + count -= n; + buffer += n; + ret += n; + } + + return ret; +} + +static ssize_t psionw_sound_write(struct file *file, const char *buffer, + size_t count, loff_t *ppos) +{ + int i, n, ret = 0; + + while (count > 0) { + + /* check we can fit anything into the buffer */ + + if (writebuf_size >= BUFSIZE) { + if (file->f_flags & O_NONBLOCK) + break; + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(1); + continue; + } + + down(&writebuf_lock); + + /* disable irq while we do this */ + + disable_irq(IRQ_CSINT); + + /* fit in as much as we can to the write buffer */ + + if (count > BUFSIZE - writebuf_size) + n = BUFSIZE - writebuf_size; + else + n = count; + + /* this is complicated stuff to add to the buffer in blocks + * rather than byte-by-byte, for speed + * we dont want to disable the sound IRQ for too long or we + * get nasty breaks in the sound + */ + + if (writebuf_tail >= writebuf_head) { + + /* fill in as much as possible at the end */ + + i = BUFSIZE - writebuf_tail; + + if (i >= n) { + + /* we can fit them all at the end */ + + memcpy(writebuf + writebuf_tail, buffer, n); + } else { + + /* first part at the end of buffer */ + + memcpy(writebuf + writebuf_tail, buffer, i); + + /* second part at the beginning */ + + memcpy(writebuf, buffer+i, n-i); + } + } else { + + /* just fit in as much as we can */ + + memcpy(writebuf + writebuf_tail, buffer, n); + } + + writebuf_tail = (writebuf_tail + n) % BUFSIZE; + writebuf_size += n; + + count -= n; + buffer += n; + ret += n; + + /* enable irq again */ + + enable_irq(IRQ_CSINT); + + up(&writebuf_lock); + } + + if (file->f_flags & O_NONBLOCK && ret == 0) + return -EAGAIN; + + return ret; +} + +static int psionw_sound_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int val; + + switch (cmd) { + case OSS_GETVERSION: + return put_user(SOUND_VERSION, (int *)arg); + + case SNDCTL_DSP_RESET: + return 0; + + case SNDCTL_DSP_SYNC: + /* we cant really do this, but we'll pretend + * we can, to keep programs that use it happy + */ + return 0; + + case SNDCTL_DSP_SPEED: /* set sample rate */ + /* we cant change it */ + + if (get_user(val, (int *)arg)) + return -EFAULT; + + if (val >= 0) + return put_user(SAMPLE_RATE, (int *)arg); + else + return -EFAULT; + + case SNDCTL_DSP_STEREO: /* set stereo or mono */ + + if (get_user(val, (int *)arg)) + return -EFAULT; + + /* we are stuck in mono mode */ + + if (val) + printk("psionw_sound: attempt to put in stereo mode (unsupported)\n"); + + return 0; + + case SNDCTL_DSP_GETBLKSIZE: + return put_user(8, (int *)arg); /* 8 byte block size (?) */ + + case SNDCTL_DSP_GETFMTS: + return put_user(AFMT_U8, (int *)arg); + + case SNDCTL_DSP_SETFMT: + return put_user(AFMT_U8, (int *)arg); + + case SNDCTL_DSP_CHANNELS: /* set channels */ + return put_user(1, (int *) arg); + + + case SNDCTL_DSP_NONBLOCK: + file->f_flags |= O_NONBLOCK; + + } + + return -EINVAL; +} + +static int psionw_sound_open(struct inode *inode, struct file *file) +{ + down(&users_lock); + + if (users > 0) { + up(&users_lock); + return -EBUSY; + } + + ++users; + + /* Check read/write */ + + is_read = file->f_mode & FMODE_READ; + is_write = file->f_mode & FMODE_WRITE; + + /* empty list */ + + writebuf_head = writebuf_tail = writebuf_size = 0; + readbuf_head = readbuf_tail = readbuf_size = 0; + + /* enable codec */ + + psionw_writeb(psionw_readb(PDDR) | PDDR_AMPEN | PDDR_CDE, PDDR); + psionw_writel(psionw_readl(CONFG) | CODINEN | CODOUTEN, CONFG); + + /* enable sound irq */ + + irq_desc[IRQ_CSINT].mask_ack = psionw_sound_isr; + + enable_irq(IRQ_CSINT); + + up(&users_lock); + + return 0; +} + +static int psionw_sound_release(struct inode *inode, struct file *file) +{ + down(&users_lock); + + --users; + + /* disable codec */ + + psionw_writeb(psionw_readb(PDDR) & ~(PDDR_AMPEN|PDDR_CDE), PDDR); + psionw_writel(psionw_readl(CONFG) & ~(CODINEN|CODOUTEN), CONFG); + + /* disable sound irq */ + + disable_irq(IRQ_CSINT); + + up(&users_lock); + + return 0; +} + +static int psionw_sound_mmap(struct file *file, struct vm_area_struct *vma) +{ + return -ENODEV; +} + +static struct file_operations sound_ops = { + owner: THIS_MODULE, + llseek: no_llseek, + read: psionw_sound_read, + write: psionw_sound_write, + ioctl: psionw_sound_ioctl, + mmap: psionw_sound_mmap, + open: psionw_sound_open, + release: psionw_sound_release, +}; + +int __init init_psionw_sound(void) +{ + audio_dev = register_sound_dsp(&sound_ops, -1); + + if (audio_dev < 0) { + printk(KERN_ERR "psionw_sound: cannot register sound device\n"); + return -ENODEV; + } + + init_MUTEX(&writebuf_lock); + init_MUTEX(&users_lock); + + printk("psionw_sound: initialised sound output\n"); + + return 0; +} + +void __exit cleanup_psionw_sound(void) +{ + unregister_sound_dsp(audio_dev); +} + + +MODULE_DESCRIPTION("psionw sound output driver"); +MODULE_AUTHOR("Simon Howard"); +MODULE_LICENSE("GPL"); + +module_init(init_psionw_sound); +module_exit(cleanup_psionw_sound); + diff -urN -X dontdiff linux-2.4.27/drivers/ssi/Config.in linux-2.4.27-5mx/drivers/ssi/Config.in --- linux-2.4.27/drivers/ssi/Config.in 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/Config.in 2005-01-19 09:03:07.000000000 +0100 @@ -5,7 +5,9 @@ comment 'SSI Bus Drivers' dep_tristate ' CLPS711X SSI support' CONFIG_SSI_CLPS711X $CONFIG_SSI $CONFIG_ARCH_CLPS711X +dep_tristate ' Psion 5mx SSI support' CONFIG_SSI_PS5MX $CONFIG_SSI $CONFIG_ARCH_PSIONW comment 'SSI Device Drivers' dep_tristate ' JUNO keyboard support' CONFIG_SSI_JUNO $CONFIG_SSI +dep_tristate ' Psion 5mx touchpanel and battery support' CONFIG_SSI_ADC7843 $CONFIG_SSI endmenu diff -urN -X dontdiff linux-2.4.27/drivers/ssi/Makefile linux-2.4.27-5mx/drivers/ssi/Makefile --- linux-2.4.27/drivers/ssi/Makefile 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/Makefile 2005-01-19 08:50:33.000000000 +0100 @@ -21,7 +21,9 @@ obj-$(CONFIG_SSI) += ssi_core.o obj-$(CONFIG_SSI_CLPS711X) += clps711x_ssi1.o -obj-y += juno.o +obj-$(CONFIG_SSI_PS5MX) += ps5mx_ssi.o +obj-$(CONFIG_SSI_ADC7843) += ads7843.o +obj-$(CONFIG_SSI_JUNO) += juno.o # Extract lists of the multi-part drivers. # The 'int-*' lists are intermediate files used to build the multi's. diff -urN -X dontdiff linux-2.4.27/drivers/ssi/ads7843.c linux-2.4.27-5mx/drivers/ssi/ads7843.c --- linux-2.4.27/drivers/ssi/ads7843.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/ads7843.c 2005-01-23 14:04:10.000000000 +0100 @@ -0,0 +1,550 @@ +/* drivers/ssi/ads7843.c + * + * Driver for the ADS7843 in the Psion 5mx + * Copyright 2004 Petr Kristan + * Special thanks to Lumir Bezstarosti + * + * Inspired on adc7843.c, thanks to: + * Shane R. Nay + * Thomas A. de Ruiter + * Simon Kagstrom + * + */ + +/* /dev/tpanel 10 11 + * Every read from tpanel driver should produce *3* shorts, first is + * pen status, either 1 or 0. The other in order are x coord, and + * then y coord. If less than 3 shorts are requested, then it will + * give the requested amount of information starting at the top, and + * will abandon the rest, and move it's pointer up to the next set + * of coordinates. + * It will only return one pen up info set. + * + * /proc/apm + * Returns AC - online/offline, and battery capacity. + * Highly depends on bat_* parameters + * + * /proc/battery + * Returns main/backup battery voltage + * + */ + +/* TODO + * + * backup battery voltage does not work for me and i do not know why :( + * maybe pen filtration + * enable to write battery parameters to /proc/apm: + * bat_capacity bat_avg_current bat_min_voltage bat_max_voltage + * + * try why apmd does not work + * move /proc/battery do /proc/psionw, but modularity must be preserved + * + * try if gpm works + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "ssi_dev.h" +#include "ssi_bus.h" + +extern struct ssi_bus psionw_ssi5mx_bus; +static struct ssi_dev ads7843_dev; + +#define TPANEL_BUF_SIZE 32 //Must be power of 2 + +static wait_queue_head_t wait_q; +static struct tasklet_struct ads_rcv_t, tpanel_irq_t; + +static int pen_irq_disabled; +static int pen_down; +static struct timer_list sample_timer, settle_timer; + +//request bit queue +static unsigned long req_q; +static int req_q_pos; + +static int tpanel_readers; +//tpanel circular buffer +static u_int tpanel_buf[TPANEL_BUF_SIZE][2]; //x, y +static int tpanel_buf_head, tpanel_buf_size; + +//battery +static u_int battery[2]; +static int battery_ready; + +static struct fasync_struct *fasync; + +//rcv +static u_int rcv_buf[2]; +static int rcv_req_type; + + +//Assume default NiMh battery +static int bat_max_voltage = 2600; //[mV] +static int bat_min_voltage = 2400; //[mV] +static int bat_capacity = 1300; //[mAh] +static int bat_avg_current = 100; //[mA] + +#define BAT_OFF 1800 //1.8V psion is switched off + +#define VERSION "1.0" +#define REQ_BATT 0 +#define REQ_TPANEL 1 +#define BAT_VREF 4500 //mV +#define SAMPLE_INTERVAL HZ/10 +#define SETTLE_TIME HZ/50 +#define FILTER_PEN_SPEED_Y 4000/SAMPLE_INTERVAL +#define FILTER_PEN_SPEED_X 2000/SAMPLE_INTERVAL + +static int ads7843_send_req(int req_type) +{ + u_int flags; + + + if (req_q_pos>=sizeof(req_q)*8) + printk("ads7843: req_q overflow\n"); + + //ssi_select_device(&psionw_ssi5mx_bus, &ads7843_dev); + save_flags(flags); + cli(); + switch (req_type) { + case REQ_TPANEL: + ssi_transmit_data(&ads7843_dev, 0xd000); //X + ssi_transmit_data(&ads7843_dev, 0x9000); //Y + break; + case REQ_BATT: + ssi_transmit_data(&ads7843_dev, 0xa400); //Main battery + /* + * FIXME This code 0xe4 for backup battery does not work for me. + * I do not know why? + * Return is always zero. In epoc, backup battery voltage works good. + */ + ssi_transmit_data(&ads7843_dev, 0xe400); //Backup battery + break; + default: + printk("ads7843: invalid send req_type\n"); + break; + } + //enqueue request + req_q |= req_type << req_q_pos++; + restore_flags(flags); + + return 0; +} + +static inline void enqueue_tpanel_buf(u_int *b) +{ + //enqueue tpanel result + tpanel_buf[tpanel_buf_head][0] = b[0]; + tpanel_buf[tpanel_buf_head][1] = b[1]; + tpanel_buf_head++; + tpanel_buf_head &= (TPANEL_BUF_SIZE-1); + if (tpanel_buf_size < TPANEL_BUF_SIZE-1) + tpanel_buf_size++; +} + +static int ads7843_store_result(int req_type, u_int *b) +{ + u_int flags; + + save_flags(flags); + cli(); + + switch (req_type) { + case REQ_TPANEL: + enqueue_tpanel_buf(b); + break; + case REQ_BATT: + //store battery result + battery[0]=b[0]; + battery[1]=b[1]; + battery_ready++; + break; + default: + printk("ads7843: invalid store req_type\n"); + break; + } + + restore_flags(flags); + + return 0; +} + +static inline void dequeue_tpanel_buf(u_int *b) +{ + int i; + + i = tpanel_buf_head - tpanel_buf_size; + if (i<0) + i = TPANEL_BUF_SIZE + i; + if (tpanel_buf_size) + tpanel_buf_size--; + b[0] = tpanel_buf[i][0]; + b[1] = tpanel_buf[i][1]; +} + +static int ads7843_retrieve_result(int req_type, u_int *b) +{ + u_int flags; + + save_flags(flags); + cli(); + + switch (req_type) { + case REQ_TPANEL: + //dequeue tpanel result + if (!tpanel_buf_size) { //Buffer is empty + restore_flags(flags); + return 1; + } + dequeue_tpanel_buf(b); + break; + case REQ_BATT: + //retrieve battery result + b[0]=battery[0]; + b[1]=battery[1]; + battery_ready=0; + break; + default: + printk("ads7843: invalid retrieve req_type\n"); + break; + } + + restore_flags(flags); + + return 0; +} + +/* Recieve byte from SSI bus, ISR no concurrency*/ +static void ads7843_dev_rcv(struct ssi_dev* dev, u_int dat) +{ + static u_int buf[2]; + static int cnt; + + //printk("ads7843: rcv: %x\n", dat); + + buf[cnt++] = dat; + if (cnt==2) { + cnt=0; + + //dequeue request + rcv_req_type = req_q & 0x1; + if (!req_q_pos) + printk("ads7843: req_q underflow\n"); + req_q_pos--; + req_q >>= 1; + + //Only 12 bits and second word is inverted, I do not know why + buf[0] &= 0xfff; + if (rcv_req_type==REQ_TPANEL) { + buf[1] = ~ buf[1] & 0xfff; + pen_down = ( (!buf[0] || !buf[1]) ? 0 : 1 ); + } + else + buf[1] = buf[1] & 0xfff; + + rcv_buf[0] = buf[0]; + rcv_buf[1] = buf[1]; + + tasklet_schedule(&ads_rcv_t); + } +} + +static void ads_rcv_bh(unsigned long data) +{ + ads7843_store_result(rcv_req_type, rcv_buf); + + kill_fasync(&fasync, SIGIO, POLL_IN); + wake_up(&wait_q); + + //delay enable tpanel irq + mod_timer(&sample_timer, jiffies + SAMPLE_INTERVAL); +} + +static int ads7843_read_battery(u_int *b, u_int *ac) +{ + int retval; + + ads7843_send_req(REQ_BATT); + retval = wait_event_interruptible(wait_q, battery_ready); + if (retval) + return retval; + ads7843_retrieve_result(REQ_BATT, b); + + *ac = (psionw_readb(PWRSR) & DCDET) ? 1 : 0; + + return 0; +} + +static int tpanel_open(struct inode *node, struct file *file) +{ + tpanel_readers++; + return 0; +} + +static int tpanel_read(struct file *file, char *buf, size_t size, loff_t *pos) +{ + char ret[6]; + u_int b[2]; + int retval; + + int cnt=sizef_flags & O_NONBLOCK)) + return -EAGAIN; + + retval = wait_event_interruptible(wait_q, tpanel_buf_size); + if (retval) + return retval; + ads7843_retrieve_result(REQ_TPANEL, b); + + ret[0]=0; + if (!b[0] || !b[1]) { + ret[1]=0; + + ret[2]=0; + ret[3]=0; + ret[4]=0; + ret[5]=0; + } else + ret[1]=1; + ret[2]=b[0]>>8; + ret[3]=b[0] & 0xff; + ret[4]=b[1]>>8; + ret[5]=b[1] & 0xff; + if (copy_to_user(buf, &ret[0], cnt)) + return -EFAULT; + return cnt; +} + +static unsigned int tpanel_poll(struct file *file, poll_table *wait) +{ + poll_wait(file, &wait_q, wait); + if (tpanel_buf_size) + return POLLIN | POLLRDNORM; + + return 0; +} + +static int tpanel_fasync(int fd, struct file *file, int on) +{ + int retval; + retval = fasync_helper(fd, file, on, &fasync); + if (retval) + return retval; + + return 0; +} + +static int tpanel_release(struct inode *inode, struct file *file) +{ + tpanel_fasync(-1, file, 0); + tpanel_readers--; + + return 0; +} + +static struct file_operations ads7843_fops = { + read: tpanel_read, + open: tpanel_open, + release: tpanel_release, + poll: tpanel_poll, + fasync: tpanel_fasync, + }; + +static struct miscdevice ads7843_tpanel = { + PS5MX_TPANEL_MINOR, "ads7843", &ads7843_fops + }; + +static int apm_proc_read(char *buf, char **start, off_t offs, int count, int *eof, void *data) +{ + int len; + u_int b[2], mv, ac; + int cap, min; + + ads7843_read_battery(b, &ac); + mv = BAT_VREF*b[0]/4096; + + cap = (mv - bat_min_voltage)*100/(bat_max_voltage - bat_min_voltage); + if (cap<0) + cap=0; + if (cap>100) + cap=100; + + min = bat_capacity/bat_avg_current*cap/100*60; + + len = snprintf(buf, count, "%s 1.0 0x3 0x%02x 0x00 0x01 %d%% %d min\n", + VERSION, ac, cap, min); + + *eof = 1; + return len; +} + +static char *batt_rem(int mv) +{ + static char rem[][8] = {"Good", "Low", "Replace", "Off"}; + if (mv>2200) + return rem[0]; + if (mv>2100) + return rem[1]; + if (mv>BAT_OFF) + return rem[2]; + return rem[3]; +} + +static int batt_proc_read(char *buf, char **start, off_t offs, int count, int *eof, void *data) +{ + int len; + u_int b[2], ac; + u_int mv[2]; + char *rem[2]; + + ads7843_read_battery(b, &ac); + + mv[0] = BAT_VREF*b[0]/4096; + mv[1] = BAT_VREF*b[1]/4096; + rem[0] = batt_rem(mv[0]); + rem[1] = batt_rem(mv[1]); + + len = snprintf(buf, count, "AC: %d\nMain: (%d) %d.%dV %s\nBackup: (%d) %d.%dV %s\n", + ac, + b[0], mv[0]/1000, mv[0]%1000, rem[0], + b[1], mv[1]/1000, mv[1]%1000, rem[1]); + + *eof = 1; + return len; +} + +/* Initialization routine called by bus when registered device */ +static int ads7843_dev_init(struct ssi_dev* dev) +{ + return 0; +} + +static void pen_down_int(int irq, void *dev_id, struct pt_regs *regs) +{ + if (!tpanel_readers) + return; + + //This interrupt is too fast - now disabled and enabled in adc int. handler + pen_irq_disabled++; + disable_irq_nosync(IRQ_EINT3); + + if (! pen_down) { + pen_down++; + mod_timer(&settle_timer, jiffies + SETTLE_TIME); + } +} + +static void tpanel_sample(unsigned long data) +{ + ads7843_send_req(REQ_TPANEL); +} + +static void settle_timer_func(unsigned long data) +{ + tasklet_schedule(&tpanel_irq_t); +} + +static void sample_timer_func(unsigned long data) +{ + if (pen_irq_disabled) { + pen_irq_disabled=0; //Before enable irq!! + enable_irq(IRQ_EINT3); + } + + if (pen_down) + tasklet_schedule(&tpanel_irq_t); +} + +static struct ssi_dev ads7843_dev = { + name: "ADS7843", + id: 1, + proto: SSI_MICROWIRE, + cfglen: 8, + framelen: 12, + clkpol: 0, + clkfreq: 7200, /*7.2kHz-1.8432Mhz*/ + init: ads7843_dev_init, + rcv: ads7843_dev_rcv, + bus: NULL, +}; + +static int __init ads7843_init(void) +{ + int retval; + + retval = ssi_register_device(&psionw_ssi5mx_bus, &ads7843_dev); + if (retval < 0) + return retval; + + ssi_select_device(&psionw_ssi5mx_bus, &ads7843_dev); + + retval = request_irq(IRQ_EINT3, pen_down_int, SA_SAMPLE_RANDOM, + "ads7843", &ads7843_dev); + if (retval) + return retval; + + SET_MODULE_OWNER(&ads7843_fops); + + init_waitqueue_head(&wait_q); + + tpanel_irq_t.func=tpanel_sample; + ads_rcv_t.func=ads_rcv_bh; + + misc_register(&ads7843_tpanel); + create_proc_read_entry("battery", 0444, NULL, batt_proc_read, NULL); + create_proc_read_entry("apm", 0444, NULL, apm_proc_read, NULL); + + init_timer(&sample_timer); + sample_timer.function = sample_timer_func; + sample_timer.expires = jiffies - 1; //do not exec event now + add_timer(&sample_timer); + + init_timer(&settle_timer); + settle_timer.function = settle_timer_func; + settle_timer.expires = jiffies - 1; //do not exec event now + add_timer(&settle_timer); + + return 0; +} + +static void __exit ads7843_exit(void) +{ + free_irq(IRQ_EINT3, &ads7843_dev); + del_timer(&sample_timer); + del_timer(&settle_timer); + + ssi_select_device(&psionw_ssi5mx_bus, NULL); + + misc_deregister(&ads7843_tpanel); + remove_proc_entry("battery", NULL); + remove_proc_entry("apm", NULL); + + ssi_unregister_device(&ads7843_dev); +} + +module_init(ads7843_init); +module_exit(ads7843_exit); + +MODULE_AUTHOR("Petr Kristan "); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("ADS7843 Psion touch screen and battery driver"); diff -urN -X dontdiff linux-2.4.27/drivers/ssi/ps5mx_ssi.c linux-2.4.27-5mx/drivers/ssi/ps5mx_ssi.c --- linux-2.4.27/drivers/ssi/ps5mx_ssi.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/ps5mx_ssi.c 2005-01-19 08:43:06.000000000 +0100 @@ -0,0 +1,208 @@ +/* + * linux/drivers/ssi/ps5mx_ssi.c + * + * SSI bus driver for the Psion 5MX SSI bus. + * + * Copyright (c) 2001 Shane R. Nay (shane@minirl.com) + * Based on the clps driver. Opted to + * do interupt based writers/readers. + * + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#include "ssi_bus.h" +#include "ssi_dev.h" + +#define TX_QUEUE_SIZE 16 /* Must be some 2^n */ + +struct ssi5mx_txdat { + u_int head; + u_int tail; + u_int buf[TX_QUEUE_SIZE]; +}; + +static struct ssi5mx_txdat* queue; + +static void add_txqueue(u_int dat) { + unsigned long flags; + int head=queue->head; + save_flags(flags); /* No save_and_cli..?, what gives linux-arm? */ + cli(); + queue->buf[head]=dat; + if(head != ((queue->tail-1)&(TX_QUEUE_SIZE-1))) { + head++; + head &= (TX_QUEUE_SIZE-1); + } + queue->head=head; + restore_flags(flags); +} + +/* Always happens in ISR, no need to deal with concurrency */ +static u_int pop_txqueue(void) { + u_int ret; + ret=queue->buf[queue->tail]; + queue->tail=(queue->tail+1) & (TX_QUEUE_SIZE-1); + return ret; +} + +#define IS_EMPTY(queue) queue->head==queue->tail + +void ssi5mx_powerdown(void) +{ + psionw_writel(psionw_readl(SSCR0) & ~(1<<7), SSCR0); +} + +void ssi5mx_powerup(void) +{ + psionw_writel(psionw_readl(SSCR0) | (1<<7), SSCR0); +} + + +/* + * Select the specified device - set appropriate comm. params + */ +static int ssi5mx_select(struct ssi_bus *bus, struct ssi_dev *dev) +{ + int cr0; + + if (! dev) { + ssi5mx_powerdown(); + return 0; + } + + cr0 = ((1843200 / dev->clkfreq - 1) & 0x0ff) << 8; /*SCR*/ + cr0 |= (dev->proto & 0x03) << 4; /*FRF*/ + cr0 |= (dev->framelen-1) & 0x0f; /*DSS*/ + psionw_writel(cr0, SSCR0); + psionw_writel(0x1, SSCR1); /*RIM=1*/ + ssi5mx_powerup(); + + return 0; +} + +/* + * Interrupt routine + */ +static void ssi5mx_int(int irq, void *dev_id, struct pt_regs *regs) +{ + struct ssi_bus *bus = (struct ssi_bus *)dev_id; + u_int sssr; + sssr=psionw_readl(SSSR); + /* Do recieve first */ + while(sssr & 1<<2) { + ssi_core_rcv(bus, psionw_readl(SSDR)); + sssr=psionw_readl(SSSR); + } + /* Do transmit of queued data */ + while((!(IS_EMPTY(queue))) && (sssr & 1<<1)) { + //printk("ssi send word: %x\n", queue->buf[queue->tail]); + psionw_writel(pop_txqueue(),SSDR); + sssr=psionw_readl(SSSR); + } + /* Finally, yank tx empty interrupt if our TX queue is empty */ + if(IS_EMPTY(queue)) { + sssr=psionw_readl(SSCR1); + sssr &= ~(0x2); /* TIM = 0 */ + psionw_writel(sssr,SSCR1); + } +} + +/* + * Every transmission follows with a reciept. So we + * have to enable the bus interrupt for transmission if + * necessary, and queue up the bottom half transmissions + * and the later bottom have reciepts. + */ +static int ssi5mx_trans(struct ssi_bus *bus, u_int data) +{ + if(IS_EMPTY(queue)) { + /* Startup transmit irq after adding to queue */ + u_int sssr; + add_txqueue(data); + sssr=psionw_readl(SSCR1); + sssr |= 0x2; /*TIM=1*/ + psionw_writel(sssr,SSCR1); + return 0; + } + add_txqueue(data); + + return 0; +} + +/* + * Initialise the SSI bus. + */ +static int ssi5mx_bus_init(struct ssi_bus *bus) +{ + int retval; + + retval = request_irq(IRQ_SSEOTI, ssi5mx_int, 0, "ssi5mx", bus); + if (retval) + return retval; + if((queue = kmalloc(sizeof(*queue), GFP_KERNEL))==NULL) + { + free_irq(IRQ_SSEOTI, bus); + printk(KERN_ERR "ssi5mx: no queue memory.\n"); + return -ENOMEM; + } + memset(queue,0,sizeof(*queue)); + printk("5mx SSI bus initialized\n"); + + psionw_writel(0x0,SSSR); /*reset all flags*/ + + return 0; +} + +static void ssi5mx_bus_exit(struct ssi_bus *bus) +{ + kfree(queue); + ssi5mx_select(bus, NULL); + free_irq(IRQ_SSEOTI, bus); + printk("5mx SSI bus deinitialized\n"); +} + + +struct ssi_bus psionw_ssi5mx_bus = { + name: "psionw_ssi5mx", + init: ssi5mx_bus_init, + exit: ssi5mx_bus_exit, + select: ssi5mx_select, + trans: ssi5mx_trans, + cfglen: 0, + framelen: 0, + clkpol: 0, + proto: 0, + dev: NULL, + devices: 0 + }; + +static int __init psionw_ssi5mx_init(void) +{ + return ssi_register_bus(&psionw_ssi5mx_bus); +} + +static void __exit psionw_ssi5mx_exit(void) +{ + ssi_unregister_bus(&psionw_ssi5mx_bus); +} + +module_init(psionw_ssi5mx_init); +module_exit(psionw_ssi5mx_exit); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Psion 5MX SSI bus driver"); + diff -urN -X dontdiff linux-2.4.27/drivers/ssi/ssi_bus.h linux-2.4.27-5mx/drivers/ssi/ssi_bus.h --- linux-2.4.27/drivers/ssi/ssi_bus.h 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/ssi_bus.h 2005-01-19 08:43:07.000000000 +0100 @@ -19,3 +19,4 @@ extern int ssi_core_rcv(struct ssi_bus *bus, u_int data); extern int ssi_register_bus(struct ssi_bus *bus); extern int ssi_unregister_bus(struct ssi_bus *bus); +extern int ssi_transmit_data(struct ssi_dev *dev, u_int data); diff -urN -X dontdiff linux-2.4.27/drivers/ssi/ssi_core.c linux-2.4.27-5mx/drivers/ssi/ssi_core.c --- linux-2.4.27/drivers/ssi/ssi_core.c 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/ssi_core.c 2005-01-19 08:43:07.000000000 +0100 @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include @@ -157,7 +157,11 @@ { int retval = -EBUSY; if (bus->devices == 0) { + bus->exit(bus); retval = 0; +#ifdef DEBUG + printk("SSI: unregistered bus %s\n", bus->name); +#endif } return retval; } @@ -173,3 +177,16 @@ module_init(ssi_init); module_exit(ssi_exit); + +/* +EXPORT_SYMBOL(ssi_core_rcv); +EXPORT_SYMBOL(ssi_transmit_data); +EXPORT_SYMBOL(ssi_register_bus); +EXPORT_SYMBOL(ssi_unregister_bus); +EXPORT_SYMBOL(ssi_register_device); +EXPORT_SYMBOL(ssi_unregister_device); +EXPORT_SYMBOL(ssi_select_device); +*/ + +MODULE_LICENSE("GPL"); + diff -urN -X dontdiff linux-2.4.27/drivers/ssi/ssi_dev.h linux-2.4.27-5mx/drivers/ssi/ssi_dev.h --- linux-2.4.27/drivers/ssi/ssi_dev.h 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/ssi/ssi_dev.h 2005-01-19 08:43:08.000000000 +0100 @@ -19,3 +19,6 @@ }; +int ssi_select_device(struct ssi_bus *bus, struct ssi_dev *dev); +int ssi_register_device(struct ssi_bus *bus, struct ssi_dev *dev); +int ssi_unregister_device(struct ssi_dev *dev); diff -urN -X dontdiff linux-2.4.27/drivers/video/Config.in linux-2.4.27-5mx/drivers/video/Config.in --- linux-2.4.27/drivers/video/Config.in 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/video/Config.in 2004-12-04 09:30:10.000000000 +0100 @@ -38,6 +38,7 @@ fi dep_bool ' Anakin LCD support' CONFIG_FB_ANAKIN $CONFIG_ARCH_ANAKIN dep_bool ' CLPS711X LCD support' CONFIG_FB_CLPS711X $CONFIG_ARCH_CLPS711X + dep_bool ' Psion LCD support' CONFIG_FB_PSIONW $CONFIG_ARCH_PSIONW dep_bool ' SA-1100 LCD support' CONFIG_FB_SA1100 $CONFIG_ARCH_SA1100 dep_bool ' MX1ADS LCD support' CONFIG_FB_DBMX1 $CONFIG_ARCH_MX1ADS if [ "$CONFIG_FB_SA1100" = "y" -a "$CONFIG_SA1100_CERF" = "y" ]; then diff -urN -X dontdiff linux-2.4.27/drivers/video/Makefile linux-2.4.27-5mx/drivers/video/Makefile --- linux-2.4.27/drivers/video/Makefile 2004-12-27 15:56:08.000000000 +0100 +++ linux-2.4.27-5mx/drivers/video/Makefile 2004-12-04 09:30:10.000000000 +0100 @@ -56,6 +56,7 @@ obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o obj-$(CONFIG_FB_CT65550) += chipsfb.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o +obj-$(CONFIG_FB_PSIONW) += psionwfb.o obj-$(CONFIG_FB_CYBER) += cyberfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o obj-$(CONFIG_FB_SGIVW) += sgivwfb.o diff -urN -X dontdiff linux-2.4.27/drivers/video/fbcon.c linux-2.4.27-5mx/drivers/video/fbcon.c --- linux-2.4.27/drivers/video/fbcon.c 2003-08-25 13:44:42.000000000 +0200 +++ linux-2.4.27-5mx/drivers/video/fbcon.c 2005-01-02 10:17:46.000000000 +0100 @@ -2340,6 +2340,56 @@ done = 1; } #endif +#if defined(CONFIG_FBCON_CFB2) + if (depth == 2 && p->type == FB_TYPE_PACKED_PIXELS) { + /* + * Depth 2, created for Psion 5mx, not very efficient + * not tested on other platforms + */ + u8 arrv, bit1, bit2, outv, prev, scnd; + arrv = 0; + outv = 0; + scnd = 0; + src = logo; + for( y1 = 0; y1 < LOGO_H; y1++ ) { + dst = fb + y1*line + x/8; + for( x1 = 0; x1 < LOGO_W/2; x1++ ) { + arrv = *src++; + bit1 = (arrv / 16); + bit2 = arrv & 0xf; + /* Add 2 to make rounding work */ + bit1 = (bit1 + 2) / 4; +#ifndef __LITTLE_ENDIAN + bit1 = (bit1 << 2); +#endif + /* Add 2 to make rounding work */ + bit2 = (bit2 + 2) / 4; +#ifdef __LITTLE_ENDIAN + bit2 = (bit2 << 2); +#endif + outv = bit1 | bit2; + /* We write out only every second time */ + if (scnd >= 1) { +#ifdef __LITTLE_ENDIAN + outv = (outv * 16); +#endif + outv = prev + outv; + /* Write out previous and current value */ + fb_writeb (outv, dst++); + prev = 0; + scnd = 0; + } else { + prev = outv; +#ifndef __LITTLE_ENDIAN + prev = (prev * 16); +#endif + scnd++; + } + } + } + done = 1; + } +#endif #if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_ILBM) || \ defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \ defined(CONFIG_FBCON_IPLAN2P8) diff -urN -X dontdiff linux-2.4.27/drivers/video/fbmem.c linux-2.4.27-5mx/drivers/video/fbmem.c --- linux-2.4.27/drivers/video/fbmem.c 2004-12-27 15:56:09.000000000 +0100 +++ linux-2.4.27-5mx/drivers/video/fbmem.c 2004-12-04 09:30:10.000000000 +0100 @@ -62,6 +62,7 @@ extern int pm3fb_init(void); extern int pm3fb_setup(char*); extern int clps711xfb_init(void); +extern int psionwfb_init(void); extern int cyber2000fb_init(void); extern int cyber2000fb_setup(char*); extern int retz3fb_init(void); @@ -177,6 +178,9 @@ #ifdef CONFIG_FB_CLPS711X { "clps711xfb", clps711xfb_init, NULL }, #endif +#ifdef CONFIG_FB_PSIONW + { "psionwfb", psionwfb_init, NULL }, +#endif #ifdef CONFIG_FB_CYBER { "cyber", cyberfb_init, cyberfb_setup }, #endif diff -urN -X dontdiff linux-2.4.27/drivers/video/psionwfb.c linux-2.4.27-5mx/drivers/video/psionwfb.c --- linux-2.4.27/drivers/video/psionwfb.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.4.27-5mx/drivers/video/psionwfb.c 2004-12-04 20:13:36.000000000 +0100 @@ -0,0 +1,949 @@ +/* + * linux/drivers/video/psionwfb.c + * + * Copyright (C) 2001 Shane Nay + * Copyright (C) 2001 Tony Lindgren + * + * Based on the EP7212 driver, some portions of code + * 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 +#include +#include +#include +#include +#include + +#include + +#include