From 780a6961c7d0dff22782f428d3a5acf9e68497ad Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sun, 2 May 2004 20:52:15 +0000 Subject: Merge bk://openembedded@openembedded.bkbits.net/packages into r2d2.tm.informatik.uni-frankfurt.de:/home/projekte/packages 2004/05/02 22:52:09+02:00 uni-frankfurt.de!mickey kernel-simpad: add BOOT_PARAMS(0xc0000100) to give the bootloader a chance to hand over the CMDLINE BKrev: 40955f7fUi-grhrAxYjmOSrMPLO2OA --- .../2.4.25-vrs2-pxa1-jpm1.patch | 8760 ++++++++++++++++++++ 1 file changed, 8760 insertions(+) diff --git a/linux/opensimpad-2.4.25-vrs2-pxa1-jpm1/2.4.25-vrs2-pxa1-jpm1.patch b/linux/opensimpad-2.4.25-vrs2-pxa1-jpm1/2.4.25-vrs2-pxa1-jpm1.patch index e69de29bb2..7ae04c21a6 100644 --- a/linux/opensimpad-2.4.25-vrs2-pxa1-jpm1/2.4.25-vrs2-pxa1-jpm1.patch +++ b/linux/opensimpad-2.4.25-vrs2-pxa1-jpm1/2.4.25-vrs2-pxa1-jpm1.patch @@ -0,0 +1,8760 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- linux-2.4.25/Makefile~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/Makefile 2004-05-02 22:47:57.000000000 +0200 +@@ -1,7 +1,7 @@ + VERSION = 2 + PATCHLEVEL = 4 + SUBLEVEL = 25 +-EXTRAVERSION =-vrs2-pxa1 ++EXTRAVERSION =-vrs2-pxa1-jpm1 + + KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) + +--- linux-2.4.25/arch/arm/mach-sa1100/Makefile~2.4.25-vrs2-pxa1-jpm1.patch 2003-08-25 13:44:39.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/Makefile 2004-05-02 22:45:42.000000000 +0200 +@@ -18,7 +18,8 @@ + export-objs := assabet.o consus.o badge4.o dma-sa1100.o dma-sa1111.o \ + flexanet.o freebird.o frodo.o generic.o h3600.o \ + huw_webpanel.o irq.o sa1111.o sa1111-pcibuf.o \ +- system3.o yopy.o usb_ctl.o usb_recv.o usb_send.o simputer.o ssp.o ++ system3.o yopy.o usb_ctl.o usb_recv.o usb_send.o simputer.o ssp.o \ ++ simpad.o + + # These aren't present yet, and prevents a plain -ac kernel building. + # hwtimer.o +@@ -30,7 +31,6 @@ + ifeq ($(CONFIG_CPU_FREQ),y) + obj-$(CONFIG_SA1100_ASSABET) += cpu-sa1110.o + obj-$(CONFIG_SA1100_CEP) += cpu-sa1110.o +-obj-$(CONFIG_SA1100_CONSUS) += cpu-sa1110.o + obj-$(CONFIG_SA1100_CERF) += cpu-sa1110.o + obj-$(CONFIG_SA1100_HACKKIT) += cpu-sa1110.o + obj-$(CONFIG_SA1100_PT_SYSTEM3) += cpu-sa1110.o +@@ -52,7 +52,6 @@ + obj-$(CONFIG_SA1100_BRUTUS) += brutus.o + obj-$(CONFIG_SA1100_CEP) += cep.o + obj-$(CONFIG_SA1100_CERF) += cerf.o +-obj-$(CONFIG_SA1100_CONSUS) += consus.o + obj-$(CONFIG_SA1100_EMPEG) += empeg.o + obj-$(CONFIG_SA1100_FLEXANET) += flexanet.o + obj-$(CONFIG_SA1100_FREEBIRD) += freebird.o +@@ -87,7 +86,6 @@ + leds-$(CONFIG_SA1100_ASSABET) += leds-assabet.o + leds-$(CONFIG_SA1100_BRUTUS) += leds-brutus.o + leds-$(CONFIG_SA1100_CERF) += leds-cerf.o +-leds-$(CONFIG_SA1100_CONSUS) += leds-consus.o + leds-$(CONFIG_SA1100_FLEXANET) += leds-flexanet.o + leds-$(CONFIG_SA1100_FRODO) += leds-frodo.o + leds-$(CONFIG_SA1100_GRAPHICSCLIENT) += leds-graphicsclient.o +@@ -108,7 +106,12 @@ + + # Miscelaneous functions + obj-$(CONFIG_PM) += pm.o sleep.o ++obj-$(CONFIG_APM) += apm.o + ++# SIMpad specific ++export-objs += simpad_pm.o ++obj-$(CONFIG_SIMPAD_PM) += simpad_pm.o ++ + obj-$(CONFIG_SA1100_SSP) += ssp.o + + include $(TOPDIR)/Rules.make +--- linux-2.4.25/drivers/video/fbmem.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/video/fbmem.c 2004-05-02 22:45:42.000000000 +0200 +@@ -109,6 +109,7 @@ + extern int chips_init(void); + extern int g364fb_init(void); + extern int sa1100fb_init(void); ++extern int mq200fb_init(void); + extern int pxafb_init(void); + extern int fm2fb_init(void); + extern int fm2fb_setup(char*); +@@ -306,6 +307,9 @@ + #ifdef CONFIG_FB_SA1100 + { "sa1100", sa1100fb_init, NULL }, + #endif ++#ifdef CONFIG_FB_MQ200 ++ { "mq200fb", mq200fb_init, NULL }, ++#endif + #ifdef CONFIG_FB_PXA + { "pxa", pxafb_init, NULL }, + #endif +--- linux-2.4.25/arch/arm/config.in~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/arch/arm/config.in 2004-05-02 22:45:42.000000000 +0200 +@@ -128,6 +128,9 @@ + dep_bool ' Shannon' CONFIG_SA1100_SHANNON $CONFIG_ARCH_SA1100 + dep_bool ' Sherman' CONFIG_SA1100_SHERMAN $CONFIG_ARCH_SA1100 + dep_bool ' Simpad' CONFIG_SA1100_SIMPAD $CONFIG_ARCH_SA1100 ++if [ "$CONFIG_SA1100_SIMPAD" = "y" ]; then ++ bool ' T-Sinus PAD' CONFIG_SA1100_SIMPAD_SINUSPAD ++fi + dep_bool ' Simputer' CONFIG_SA1100_SIMPUTER $CONFIG_ARCH_SA1100 + dep_bool ' Tulsa' CONFIG_SA1100_PFS168 $CONFIG_ARCH_SA1100 + dep_bool ' Victor' CONFIG_SA1100_VICTOR $CONFIG_ARCH_SA1100 +@@ -587,6 +590,10 @@ + tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF + tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC + dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL ++dep_tristate 'Advanced power management emulation support' CONFIG_APM $CONFIG_PM ++if [ "$CONFIG_APM" != "n" ]; then ++ bool ' SIMpad power management' CONFIG_SIMPAD_PM ++fi + dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32 + string 'Default kernel command string' CONFIG_CMDLINE "" + +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/arch/arm/def-configs/simpad 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,967 @@ ++# ++# Automatically generated by make menuconfig: 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 is not set ++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_OMAHA is not set ++# CONFIG_ARCH_L7200 is not set ++# CONFIG_ARCH_MX1ADS is not set ++# CONFIG_ARCH_RPC is not set ++# CONFIG_ARCH_RISCSTATION is not set ++CONFIG_ARCH_SA1100=y ++# CONFIG_ARCH_SHARK is not set ++# CONFIG_ARCH_AT91RM9200DK is not set ++ ++# ++# Archimedes/A5000 Implementations ++# ++# 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_ACCELENT is not set ++# CONFIG_SA1100_ASSABET is not set ++# CONFIG_ASSABET_NEPONSET is not set ++# CONFIG_SA1100_ADSAGC is not set ++# CONFIG_SA1100_ADSBITSY is not set ++# CONFIG_SA1100_ADSBITSYPLUS is not set ++# CONFIG_SA1100_BRUTUS is not set ++# CONFIG_SA1100_CEP 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_H3600_SLEEVE 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_HACKKIT 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=y ++# CONFIG_SA1100_SIMPAD_SINUSPAD is not set ++# CONFIG_SA1100_SIMPUTER 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=m ++CONFIG_SA1100_USB_NETLINK=m ++CONFIG_SA1100_USB_CHAR=m ++# CONFIG_SA1100_SSP 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_FORTUNET is not set ++# CONFIG_ARCH_GUIDEA07 is not set ++# CONFIG_ARCH_P720T is not set ++# CONFIG_ARCH_EP7211 is not set ++# CONFIG_ARCH_EP7212 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 ++# CONFIG_CPU_ARM610 is not set ++# CONFIG_CPU_ARM710 is not set ++# CONFIG_CPU_ARM720T is not set ++# CONFIG_CPU_ARM920T is not set ++# CONFIG_CPU_ARM922T is not set ++# CONFIG_PLD is not set ++# CONFIG_CPU_ARM926T is not set ++# CONFIG_CPU_ARM1020 is not set ++# CONFIG_CPU_ARM1026 is not set ++# CONFIG_CPU_SA110 is not set ++CONFIG_CPU_SA1100=y ++# CONFIG_CPU_32v3 is not set ++CONFIG_CPU_32v4=y ++CONFIG_DISCONTIGMEM=y ++ ++# ++# General setup ++# ++# CONFIG_PCI is not set ++CONFIG_ISA=y ++# CONFIG_ISA_DMA is not set ++# CONFIG_ZBOOT_ROM is not set ++CONFIG_ZBOOT_ROM_TEXT=0 ++CONFIG_ZBOOT_ROM_BSS=0 ++CONFIG_CPU_FREQ=y ++CONFIG_HOTPLUG=y ++ ++# ++# PCMCIA/CardBus support ++# ++CONFIG_PCMCIA=y ++CONFIG_PCMCIA_PROBE=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=y ++CONFIG_NET=y ++CONFIG_SYSVIPC=y ++# CONFIG_BSD_PROCESS_ACCT is not set ++CONFIG_SYSCTL=y ++CONFIG_FPE_NWFPE=y ++# CONFIG_FPE_FASTFPE is not set ++CONFIG_KCORE_ELF=y ++# CONFIG_KCORE_AOUT is not set ++# CONFIG_BINFMT_AOUT is not set ++CONFIG_BINFMT_ELF=y ++CONFIG_BINFMT_MISC=m ++CONFIG_PM=y ++CONFIG_APM=y ++CONFIG_SIMPAD_PM=y ++# CONFIG_ARTHUR is not set ++CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA root=1f02 noinitrd mem=64M" ++CONFIG_LEDS=y ++CONFIG_LEDS_TIMER=y ++CONFIG_LEDS_CPU=y ++CONFIG_ALIGNMENT_TRAP=y ++ ++# ++# Parallel port support ++# ++# CONFIG_PARPORT is not set ++ ++# ++# Memory Technology Devices (MTD) ++# ++CONFIG_MTD=y ++# CONFIG_MTD_DEBUG is not set ++CONFIG_MTD_PARTITIONS=y ++# CONFIG_MTD_CONCAT is not set ++CONFIG_MTD_REDBOOT_PARTS=y ++CONFIG_MTD_CMDLINE_PARTS=y ++# CONFIG_MTD_AFS_PARTS is not set ++CONFIG_MTD_CHAR=y ++CONFIG_MTD_BLOCK=y ++# CONFIG_FTL is not set ++# CONFIG_NFTL is not set ++ ++# ++# RAM/ROM/Flash chip drivers ++# ++CONFIG_MTD_CFI=y ++CONFIG_MTD_JEDECPROBE=y ++CONFIG_MTD_GEN_PROBE=y ++CONFIG_MTD_CFI_ADV_OPTIONS=y ++CONFIG_MTD_CFI_NOSWAP=y ++# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set ++# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set ++CONFIG_MTD_CFI_GEOMETRY=y ++# CONFIG_MTD_CFI_B1 is not set ++CONFIG_MTD_CFI_B2=y ++# CONFIG_MTD_CFI_B4 is not set ++# CONFIG_MTD_CFI_B8 is not set ++CONFIG_MTD_CFI_I1=y ++# CONFIG_MTD_CFI_I2 is not set ++# CONFIG_MTD_CFI_I4 is not set ++# CONFIG_MTD_CFI_I8 is not set ++CONFIG_MTD_CFI_INTELEXT=y ++# CONFIG_MTD_CFI_AMDSTD is not set ++# CONFIG_MTD_RAM is not set ++CONFIG_MTD_ROM=y ++# CONFIG_MTD_ABSENT is not set ++# CONFIG_MTD_OBSOLETE_CHIPS is not set ++# CONFIG_MTD_AMDSTD is not set ++# CONFIG_MTD_SHARP is not set ++# CONFIG_MTD_JEDEC is not set ++ ++# ++# Mapping drivers for chip access ++# ++# CONFIG_MTD_PHYSMAP is not set ++# CONFIG_MTD_NORA is not set ++# CONFIG_MTD_ARM_INTEGRATOR is not set ++# CONFIG_MTD_CDB89712 is not set ++CONFIG_MTD_SA1100=y ++# CONFIG_MTD_DC21285 is not set ++# CONFIG_MTD_IQ80310 is not set ++# CONFIG_MTD_FORTUNET is not set ++# CONFIG_MTD_EPXA is not set ++# CONFIG_MTD_AUTCPU12 is not set ++# CONFIG_MTD_EDB7312 is not set ++# CONFIG_MTD_IMPA7 is not set ++# CONFIG_MTD_PCI is not set ++ ++# ++# Self-contained MTD device drivers ++# ++# CONFIG_MTD_PMC551 is not set ++# CONFIG_MTD_SLRAM is not set ++CONFIG_MTD_MTDRAM=y ++CONFIG_MTDRAM_TOTAL_SIZE=32768 ++CONFIG_MTDRAM_ERASE_SIZE=1 ++CONFIG_MTDRAM_ABS_POS=C2000000 ++# CONFIG_MTD_BLKMTD is not set ++# CONFIG_MTD_DOC1000 is not set ++# CONFIG_MTD_DOC2000 is not set ++# CONFIG_MTD_DOC2001 is not set ++# CONFIG_MTD_DOCPROBE is not set ++ ++# ++# NAND Flash Device Drivers ++# ++# CONFIG_MTD_NAND 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_CISS_SCSI_TAPE is not set ++# CONFIG_BLK_DEV_DAC960 is not set ++# CONFIG_BLK_DEV_UMEM is not set ++CONFIG_BLK_DEV_LOOP=y ++# CONFIG_BLK_DEV_NBD is not set ++CONFIG_BLK_DEV_RAM=y ++CONFIG_BLK_DEV_RAM_SIZE=8192 ++# CONFIG_BLK_DEV_INITRD is not set ++ ++# ++# 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=y ++# 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=y ++# CONFIG_IP_PNP_RARP is not set ++# CONFIG_NET_IPIP is not set ++# CONFIG_NET_IPGRE is not set ++# CONFIG_ARPD is not set ++# CONFIG_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 ++ ++# ++# Appletalk devices ++# ++# CONFIG_DEV_APPLETALK 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 testing ++# ++# CONFIG_NET_PKTGEN is not set ++ ++# ++# Network device support ++# ++CONFIG_NETDEVICES=y ++ ++# ++# ARCnet devices ++# ++# CONFIG_ARCNET is not set ++CONFIG_DUMMY=y ++# 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_ARM_CIRRUS 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_AT1700 is not set ++# CONFIG_DEPCA is not set ++# CONFIG_HP100 is not set ++# CONFIG_NET_ISA is not set ++CONFIG_NET_PCI=y ++# CONFIG_PCNET32 is not set ++# CONFIG_ADAPTEC_STARFIRE is not set ++# CONFIG_AC3200 is not set ++# CONFIG_APRICOT is not set ++# CONFIG_CS89x0 is not set ++# CONFIG_TULIP is not set ++# CONFIG_TC35815 is not set ++# CONFIG_DM9102 is not set ++# CONFIG_EEPRO100 is not set ++# CONFIG_LNE390 is not set ++# CONFIG_FEALNX is not set ++# CONFIG_NATSEMI is not set ++# CONFIG_NE2K_PCI is not set ++# CONFIG_NE3210 is not set ++# CONFIG_ES3210 is not set ++# CONFIG_8139CP is not set ++# CONFIG_8139TOO is not set ++# CONFIG_8139TOO_PIO is not set ++# CONFIG_8139TOO_TUNE_TWISTER is not set ++# CONFIG_8139TOO_8129 is not set ++# CONFIG_8139_NEW_RX_RESET is not set ++# CONFIG_SIS900 is not set ++# CONFIG_EPIC100 is not set ++# CONFIG_SUNDANCE is not set ++# CONFIG_VIA_RHINE is not set ++# CONFIG_VIA_RHINE_MMIO is not set ++# CONFIG_WINBOND_840 is not set ++# CONFIG_NET_POCKET 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_TIGON3 is not set ++# CONFIG_FDDI is not set ++# CONFIG_HIPPI is not set ++# CONFIG_PLIP is not set ++# CONFIG_PPP is not set ++# CONFIG_SLIP is not set ++ ++# ++# Wireless LAN (non-hamradio) ++# ++CONFIG_NET_RADIO=y ++# CONFIG_STRIP is not set ++# CONFIG_WAVELAN is not set ++# CONFIG_ARLAN is not set ++# CONFIG_AIRONET4500 is not set ++# CONFIG_AIRONET4500_NONCS is not set ++# CONFIG_AIRONET4500_PROC is not set ++CONFIG_AIRO=m ++# CONFIG_HERMES is not set ++# CONFIG_PCMCIA_HERMES is not set ++CONFIG_AIRO_CS=m ++CONFIG_NET_WIRELESS=y ++ ++# ++# 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=m ++CONFIG_PCMCIA_3C574=m ++# 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=m ++CONFIG_PCMCIA_XIRC2PS=m ++# CONFIG_ARCNET_COM20020_CS is not set ++# CONFIG_PCMCIA_IBMTR is not set ++CONFIG_NET_PCMCIA_RADIO=y ++# CONFIG_PCMCIA_RAYCS is not set ++# CONFIG_PCMCIA_NETWAVE is not set ++CONFIG_PCMCIA_WAVELAN=m ++# CONFIG_AIRONET4500_CS is not set ++ ++# ++# Amateur Radio support ++# ++# CONFIG_HAMRADIO is not set ++ ++# ++# IrDA (infrared) support ++# ++CONFIG_IRDA=m ++CONFIG_IRLAN=m ++# CONFIG_IRNET is not set ++CONFIG_IRCOMM=m ++# CONFIG_IRDA_ULTRA is not set ++# CONFIG_IRDA_CACHE_LAST_LSAP is not set ++# CONFIG_IRDA_FAST_RR is not set ++# CONFIG_IRDA_DEBUG is not set ++ ++# ++# Infrared-port device drivers ++# ++CONFIG_IRTTY_SIR=m ++CONFIG_IRPORT_SIR=m ++# CONFIG_DONGLE is not set ++# 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 ++CONFIG_SA1100_FIR=m ++ ++# ++# ATA/ATAPI/MFM/RLL support ++# ++CONFIG_IDE=m ++ ++# ++# IDE, ATA and ATAPI Block devices ++# ++CONFIG_BLK_DEV_IDE=m ++# CONFIG_BLK_DEV_HD_IDE is not set ++# CONFIG_BLK_DEV_HD is not set ++CONFIG_BLK_DEV_IDEDISK=m ++# CONFIG_IDEDISK_MULTI_MODE is not set ++# CONFIG_IDEDISK_STROKE 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=m ++# 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 ++# CONFIG_IDE_TASK_IOCTL is not set ++# 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 ++ ++# ++# 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=y ++# 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=m ++# 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_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=y ++CONFIG_SERIAL_SA1100_CONSOLE=y ++CONFIG_SA1100_DEFAULT_BAUDRATE=115200 ++# CONFIG_SERIAL_OMAHA is not set ++# CONFIG_SERIAL_OMAHA_CONSOLE is not set ++# CONFIG_SERIAL_AT91US3 is not set ++# CONFIG_SERIAL_AT91US3_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 ++CONFIG_UNIX98_PTYS=y ++CONFIG_UNIX98_PTY_COUNT=32 ++ ++# ++# 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 ++# 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 ++# CONFIG_INPUT_NS558 is not set ++# CONFIG_INPUT_LIGHTNING is not set ++# CONFIG_INPUT_PCIGAME is not set ++# CONFIG_INPUT_CS461X is not set ++# CONFIG_INPUT_EMU10K1 is not set ++# CONFIG_INPUT_SERIO is not set ++# CONFIG_INPUT_SERPORT is not set ++# CONFIG_INPUT_ANALOG is not set ++# CONFIG_INPUT_A3D is not set ++# CONFIG_INPUT_ADI is not set ++# CONFIG_INPUT_COBRA is not set ++# CONFIG_INPUT_GF2K is not set ++# CONFIG_INPUT_GRIP is not set ++# CONFIG_INPUT_INTERACT is not set ++# CONFIG_INPUT_TMDC is not set ++# CONFIG_INPUT_SIDEWINDER is not set ++# CONFIG_INPUT_IFORCE_USB is not set ++# CONFIG_INPUT_IFORCE_232 is not set ++# CONFIG_INPUT_WARRIOR is not set ++# CONFIG_INPUT_MAGELLAN is not set ++# CONFIG_INPUT_SPACEORB is not set ++# CONFIG_INPUT_SPACEBALL is not set ++# CONFIG_INPUT_STINGER is not set ++# CONFIG_INPUT_DB9 is not set ++# CONFIG_INPUT_GAMECON is not set ++# CONFIG_INPUT_TURBOGRAFX is not set ++# CONFIG_QIC02_TAPE is not set ++ ++# ++# Watchdog Cards ++# ++# CONFIG_WATCHDOG is not set ++# CONFIG_NVRAM is not set ++# CONFIG_RTC is not set ++CONFIG_SA1100_RTC=y ++# 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 ++# ++CONFIG_PCMCIA_SERIAL_CS=m ++CONFIG_TDA8007=m ++ ++# ++# 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=m ++# CONFIG_REISERFS_CHECK is not set ++CONFIG_REISERFS_PROC_INFO=y ++# 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=m ++CONFIG_JBD=m ++# CONFIG_JBD_DEBUG is not set ++CONFIG_FAT_FS=m ++CONFIG_MSDOS_FS=m ++CONFIG_UMSDOS_FS=m ++CONFIG_VFAT_FS=m ++# CONFIG_EFS_FS is not set ++CONFIG_JFFS_FS=m ++CONFIG_JFFS_FS_VERBOSE=0 ++CONFIG_JFFS_PROC_FS=y ++CONFIG_JFFS2_FS=y ++CONFIG_JFFS2_FS_DEBUG=0 ++CONFIG_CRAMFS=m ++# CONFIG_TMPFS is not set ++CONFIG_RAMFS=y ++# 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=y ++CONFIG_DEVFS_MOUNT=y ++CONFIG_DEVFS_DEBUG=y ++# CONFIG_DEVPTS_FS is not set ++# CONFIG_QNX4FS_FS is not set ++# CONFIG_QNX4FS_RW is not set ++# CONFIG_ROMFS_FS is not set ++CONFIG_EXT2_FS=m ++# 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=m ++# CONFIG_SMB_NLS_DEFAULT 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=m ++ ++# ++# Partition Types ++# ++# CONFIG_PARTITION_ADVANCED is not set ++CONFIG_MSDOS_PARTITION=y ++CONFIG_SMB_NLS=y ++CONFIG_NLS=y ++ ++# ++# Native Language Support ++# ++CONFIG_NLS_DEFAULT="iso8859-1" ++CONFIG_NLS_CODEPAGE_437=y ++# CONFIG_NLS_CODEPAGE_737 is not set ++# CONFIG_NLS_CODEPAGE_775 is not set ++CONFIG_NLS_CODEPAGE_850=y ++# CONFIG_NLS_CODEPAGE_852 is not set ++# CONFIG_NLS_CODEPAGE_855 is not set ++# CONFIG_NLS_CODEPAGE_857 is not set ++# CONFIG_NLS_CODEPAGE_860 is not set ++# CONFIG_NLS_CODEPAGE_861 is not set ++# CONFIG_NLS_CODEPAGE_862 is not set ++# CONFIG_NLS_CODEPAGE_863 is not set ++# CONFIG_NLS_CODEPAGE_864 is not set ++# CONFIG_NLS_CODEPAGE_865 is not set ++# CONFIG_NLS_CODEPAGE_866 is not set ++# CONFIG_NLS_CODEPAGE_869 is not set ++# CONFIG_NLS_CODEPAGE_936 is not set ++# CONFIG_NLS_CODEPAGE_950 is not set ++# CONFIG_NLS_CODEPAGE_932 is not set ++# CONFIG_NLS_CODEPAGE_949 is not set ++# CONFIG_NLS_CODEPAGE_874 is not set ++# CONFIG_NLS_ISO8859_8 is not set ++# CONFIG_NLS_CODEPAGE_1250 is not set ++# CONFIG_NLS_CODEPAGE_1251 is not set ++CONFIG_NLS_ISO8859_1=y ++# CONFIG_NLS_ISO8859_2 is not set ++# CONFIG_NLS_ISO8859_3 is not set ++# CONFIG_NLS_ISO8859_4 is not set ++# CONFIG_NLS_ISO8859_5 is not set ++# CONFIG_NLS_ISO8859_6 is not set ++# CONFIG_NLS_ISO8859_7 is not set ++# CONFIG_NLS_ISO8859_9 is not set ++# CONFIG_NLS_ISO8859_13 is not set ++# CONFIG_NLS_ISO8859_14 is not set ++CONFIG_NLS_ISO8859_15=y ++# CONFIG_NLS_KOI8_R is not set ++# CONFIG_NLS_KOI8_U is not set ++# CONFIG_NLS_UTF8 is not set ++ ++# ++# Console drivers ++# ++CONFIG_PC_KEYMAP=y ++# 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_SA1100 is not set ++# CONFIG_FB_CYBER2000 is not set ++CONFIG_FB_MQ200=y ++# CONFIG_FB_VIRTUAL is not set ++CONFIG_FBCON_ADVANCED=y ++# CONFIG_FBCON_MFB is not set ++# CONFIG_FBCON_CFB2 is not set ++CONFIG_FBCON_CFB4=y ++CONFIG_FBCON_CFB8=y ++CONFIG_FBCON_CFB16=y ++# 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_SA1100=y ++# CONFIG_SOUND_UDA1341 is not set ++# CONFIG_SOUND_ASSABET_UDA1341 is not set ++# CONFIG_SOUND_H3600_UDA1341 is not set ++# CONFIG_SOUND_PANGOLIN_UDA1341 is not set ++# CONFIG_SOUND_SA1111_UDA1341 is not set ++# CONFIG_SOUND_SA1111_AC97 is not set ++# CONFIG_SOUND_SA1100SSP is not set ++# CONFIG_SOUND_OSS is not set ++# CONFIG_SOUND_VIDC is not set ++# CONFIG_SOUND_WAVEARTIST is not set ++# CONFIG_SOUND_TVMIXER is not set ++ ++# ++# Multimedia Capabilities Port drivers ++# ++CONFIG_MCP=y ++CONFIG_MCP_SA1100=y ++CONFIG_MCP_UCB1200=y ++CONFIG_MCP_UCB1200_AUDIO=y ++CONFIG_MCP_UCB1200_TS=y ++ ++# ++# Console Switches ++# ++CONFIG_SWITCHES=y ++CONFIG_SWITCHES_SA1100=y ++CONFIG_SWITCHES_UCB1X00=y ++ ++# ++# USB support ++# ++# CONFIG_USB 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 is not set ++# CONFIG_DEBUG_SLAB is not set ++# CONFIG_MAGIC_SYSRQ is not set ++# 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 +--- linux-2.4.25/arch/arm/kernel/head-armv.S~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/arch/arm/kernel/head-armv.S 2004-05-02 22:45:42.000000000 +0200 +@@ -93,6 +93,8 @@ + .section ".text.init",#alloc,#execinstr + .type stext, #function + ENTRY(stext) ++ mov r1, #87 ++ mov r0, #0 + mov r12, r0 + /* + * NOTE! Any code which is placed here should be done for one of +--- linux-2.4.25/arch/arm/kernel/irq.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:37.000000000 +0200 ++++ linux-2.4.25/arch/arm/kernel/irq.c 2004-05-02 22:45:42.000000000 +0200 +@@ -82,9 +82,9 @@ + + spin_lock_irqsave(&irq_controller_lock, flags); + if (!desc->disable_depth++) { +-#ifndef CONFIG_CPU_SA1100 ++// #ifndef CONFIG_CPU_SA1100 + desc->mask(irq); +-#endif ++// #endif + } + spin_unlock_irqrestore(&irq_controller_lock, flags); + } +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/apm.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,520 @@ ++/* ++ * bios-less APM driver for ARM Linux ++ * Jamey Hicks ++ * adapted from the APM BIOS driver for Linux by Stephen Rothwell (sfr@linuxcare.com) ++ * ++ * APM 1.2 Reference: ++ * Intel Corporation, Microsoft Corporation. Advanced Power Management ++ * (APM) BIOS Interface Specification, Revision 1.2, February 1996. ++ * ++ * [This document is available from Microsoft at: ++ * http://www.microsoft.com/hwdev/busbios/amp_12.htm] ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#if FIXME ++#include ++#endif ++ ++#ifdef CONFIG_IPAQ_HANDHELD ++#include ++#endif ++ ++#ifdef CONFIG_SA1100_SIMPAD ++#include ++#endif ++ ++#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) ++extern int (*console_blank_hook)(int); ++#endif ++ ++struct apm_bios_info apm_bios_info = { ++ /* this driver simulates APM version 1.2 */ ++ version: 0x102, ++ flags: APM_32_BIT_SUPPORT ++}; ++ ++/* ++ * The apm_bios device is one of the misc char devices. ++ * This is its minor number. ++ */ ++#define APM_MINOR_DEV 134 ++ ++/* ++ * See Documentation/Config.help for the configuration options. ++ * ++ * Various options can be changed at boot time as follows: ++ * (We allow underscores for compatibility with the modules code) ++ * apm=on/off enable/disable APM ++ * [no-]debug log some debugging messages ++ * [no-]power[-_]off power off on shutdown ++ */ ++ ++/* ++ * Need to poll the APM BIOS every second ++ */ ++#define APM_CHECK_TIMEOUT (HZ) ++ ++/* ++ * Ignore suspend events for this amount of time after a resume ++ */ ++#define DEFAULT_BOUNCE_INTERVAL (3 * HZ) ++ ++/* ++ * Maximum number of events stored ++ */ ++#define APM_MAX_EVENTS 20 ++ ++/* ++ * The per-file APM data ++ */ ++struct apm_user { ++ int magic; ++ struct apm_user * next; ++ int suser: 1; ++ int suspend_wait: 1; ++ int suspend_result; ++ int suspends_pending; ++ int standbys_pending; ++ int suspends_read; ++ int standbys_read; ++ int event_head; ++ int event_tail; ++ apm_event_t events[APM_MAX_EVENTS]; ++}; ++ ++/* ++ * The magic number in apm_user ++ */ ++#define APM_BIOS_MAGIC 0x4101 ++ ++/* ++ * Local variables ++ */ ++//static int suspends_pending; ++//static int standbys_pending; ++//static int ignore_normal_resume; ++ ++#ifdef CONFIG_APM_RTC_IS_GMT ++# define clock_cmos_diff 0 ++# define got_clock_diff 1 ++#else ++//static long clock_cmos_diff; ++//static int got_clock_diff; ++#endif ++static int debug; ++static int apm_disabled; ++#ifdef CONFIG_SMP ++static int power_off; ++#else ++static int power_off = 1; ++#endif ++static int exit_kapmd; ++static int kapmd_running; ++ ++static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); ++static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); ++static struct apm_user * user_list = NULL; ++ ++static char driver_version[] = "1.13"; /* no spaces */ ++ ++typedef struct lookup_t { ++ int key; ++ char * msg; ++} lookup_t; ++ ++static const lookup_t error_table[] = { ++/* N/A { APM_SUCCESS, "Operation succeeded" }, */ ++ { APM_DISABLED, "Power management disabled" }, ++ { APM_CONNECTED, "Real mode interface already connected" }, ++ { APM_NOT_CONNECTED, "Interface not connected" }, ++ { APM_16_CONNECTED, "16 bit interface already connected" }, ++/* N/A { APM_16_UNSUPPORTED, "16 bit interface not supported" }, */ ++ { APM_32_CONNECTED, "32 bit interface already connected" }, ++ { APM_32_UNSUPPORTED, "32 bit interface not supported" }, ++ { APM_BAD_DEVICE, "Unrecognized device ID" }, ++ { APM_BAD_PARAM, "Parameter out of range" }, ++ { APM_NOT_ENGAGED, "Interface not engaged" }, ++ { APM_BAD_FUNCTION, "Function not supported" }, ++ { APM_RESUME_DISABLED, "Resume timer disabled" }, ++ { APM_BAD_STATE, "Unable to enter requested state" }, ++/* N/A { APM_NO_EVENTS, "No events pending" }, */ ++ { APM_NO_ERROR, "BIOS did not set a return code" }, ++ { APM_NOT_PRESENT, "No APM present" } ++}; ++#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) ++ ++static int apm_get_power_status(u_char *ac_line_status, ++ u_char *battery_status, ++ u_char *battery_flag, ++ u_char *battery_percentage, ++ u_short *battery_life) ++{ ++#ifdef CONFIG_IPAQ_HANDHELD ++ h3600_apm_get_power_status(ac_line_status, battery_status, battery_flag, battery_percentage, battery_life); ++#endif ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_apm_get_power_status(ac_line_status, battery_status, battery_flag, battery_percentage, battery_life); ++#endif ++ return APM_SUCCESS; ++} ++ ++static int queue_empty(struct apm_user *as) ++{ ++ return as->event_head == as->event_tail; ++} ++ ++static apm_event_t get_queued_event(struct apm_user *as) ++{ ++ as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; ++ return as->events[as->event_tail]; ++} ++ ++static int check_apm_user(struct apm_user *as, const char *func) ++{ ++ if ((as == NULL) || (as->magic != APM_BIOS_MAGIC)) { ++ printk(KERN_ERR "apm: %s passed bad filp\n", func); ++ return 1; ++ } ++ return 0; ++} ++ ++static ssize_t do_read(struct file *fp, char *buf, size_t count, loff_t *ppos) ++{ ++ struct apm_user * as; ++ int i; ++ apm_event_t event; ++ DECLARE_WAITQUEUE(wait, current); ++ ++ as = fp->private_data; ++ if (check_apm_user(as, "read")) ++ return -EIO; ++ if (count < sizeof(apm_event_t)) ++ return -EINVAL; ++ if (queue_empty(as)) { ++ if (fp->f_flags & O_NONBLOCK) ++ return -EAGAIN; ++ add_wait_queue(&apm_waitqueue, &wait); ++ printk("do_read: waiting\n"); ++repeat: ++ set_current_state(TASK_INTERRUPTIBLE); ++ if (queue_empty(as) && !signal_pending(current)) { ++ schedule(); ++ goto repeat; ++ } ++ set_current_state(TASK_RUNNING); ++ remove_wait_queue(&apm_waitqueue, &wait); ++ } ++ i = count; ++ while ((i >= sizeof(event)) && !queue_empty(as)) { ++ event = get_queued_event(as); ++ printk(" do_read: event=%d\n", event); ++ if (copy_to_user(buf, &event, sizeof(event))) { ++ if (i < count) ++ break; ++ return -EFAULT; ++ } ++ switch (event) { ++ case APM_SYS_SUSPEND: ++ case APM_USER_SUSPEND: ++ as->suspends_read++; ++ break; ++ ++ case APM_SYS_STANDBY: ++ case APM_USER_STANDBY: ++ as->standbys_read++; ++ break; ++ } ++ buf += sizeof(event); ++ i -= sizeof(event); ++ } ++ if (i < count) ++ return count - i; ++ if (signal_pending(current)) ++ return -ERESTARTSYS; ++ return 0; ++} ++ ++static unsigned int do_poll(struct file *fp, poll_table * wait) ++{ ++ struct apm_user * as; ++ ++ as = fp->private_data; ++ if (check_apm_user(as, "poll")) ++ return 0; ++ poll_wait(fp, &apm_waitqueue, wait); ++ if (!queue_empty(as)) ++ return POLLIN | POLLRDNORM; ++ return 0; ++} ++ ++static int do_ioctl(struct inode * inode, struct file *filp, ++ u_int cmd, u_long arg) ++{ ++ struct apm_user * as; ++ ++ as = filp->private_data; ++ if (check_apm_user(as, "ioctl")) ++ return -EIO; ++ if (!as->suser) ++ return -EPERM; ++ switch (cmd) { ++ case APM_IOC_SUSPEND: ++#if FIXME ++ pm_suggest_suspend(); ++#endif ++ break; ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int do_release(struct inode * inode, struct file * filp) ++{ ++ struct apm_user * as; ++ ++ as = filp->private_data; ++ if (check_apm_user(as, "release")) ++ return 0; ++ filp->private_data = NULL; ++ lock_kernel(); ++ unlock_kernel(); ++ kfree(as); ++ return 0; ++} ++ ++static int do_open(struct inode * inode, struct file * filp) ++{ ++ struct apm_user * as; ++ ++ as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); ++ if (as == NULL) { ++ printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n", ++ sizeof(*as)); ++ return -ENOMEM; ++ } ++ as->magic = APM_BIOS_MAGIC; ++ as->event_tail = as->event_head = 0; ++ as->suspends_pending = as->standbys_pending = 0; ++ as->suspends_read = as->standbys_read = 0; ++ /* ++ * XXX - this is a tiny bit broken, when we consider BSD ++ * process accounting. If the device is opened by root, we ++ * instantly flag that we used superuser privs. Who knows, ++ * we might close the device immediately without doing a ++ * privileged operation -- cevans ++ */ ++ as->suser = capable(CAP_SYS_ADMIN); ++ as->next = user_list; ++ user_list = as; ++ filp->private_data = as; ++ return 0; ++} ++ ++static int apm_get_info(char *buf, char **start, off_t fpos, int length) ++{ ++ char * p; ++ unsigned short dx; ++ unsigned short error; ++ unsigned char ac_line_status = 0xff; ++ unsigned char battery_status = 0xff; ++ unsigned char battery_flag = 0xff; ++ unsigned char percentage = 0xff; ++ int time_units = -1; ++ char *units = "?"; ++ ++ p = buf; ++ ++ if ((smp_num_cpus == 1) && ++ !(error = apm_get_power_status(&ac_line_status, ++ &battery_status, &battery_flag, &percentage, &dx))) { ++ if (apm_bios_info.version > 0x100) { ++ if (dx != 0xffff) { ++ units = (dx & 0x8000) ? "min" : "sec"; ++ time_units = dx & 0x7fff; ++ } ++ } ++ } ++ /* Arguments, with symbols from linux/apm_bios.h. Information is ++ from the Get Power Status (0x0a) call unless otherwise noted. ++ ++ 0) Linux driver version (this will change if format changes) ++ 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2. ++ 2) APM flags from APM Installation Check (0x00): ++ bit 0: APM_16_BIT_SUPPORT ++ bit 1: APM_32_BIT_SUPPORT ++ bit 2: APM_IDLE_SLOWS_CLOCK ++ bit 3: APM_BIOS_DISABLED ++ bit 4: APM_BIOS_DISENGAGED ++ 3) AC line status ++ 0x00: Off-line ++ 0x01: On-line ++ 0x02: On backup power (BIOS >= 1.1 only) ++ 0xff: Unknown ++ 4) Battery status ++ 0x00: High ++ 0x01: Low ++ 0x02: Critical ++ 0x03: Charging ++ 0x04: Selected battery not present (BIOS >= 1.2 only) ++ 0xff: Unknown ++ 5) Battery flag ++ bit 0: High ++ bit 1: Low ++ bit 2: Critical ++ bit 3: Charging ++ bit 7: No system battery ++ 0xff: Unknown ++ 6) Remaining battery life (percentage of charge): ++ 0-100: valid ++ -1: Unknown ++ 7) Remaining battery life (time units): ++ Number of remaining minutes or seconds ++ -1: Unknown ++ 8) min = minutes; sec = seconds */ ++ ++ p += sprintf(p, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", ++ driver_version, ++ (apm_bios_info.version >> 8) & 0xff, ++ apm_bios_info.version & 0xff, ++ apm_bios_info.flags, ++ ac_line_status, ++ battery_status, ++ battery_flag, ++ percentage, ++ time_units, ++ units); ++ ++ return p - buf; ++} ++ ++#ifndef MODULE ++static int __init apm_setup(char *str) ++{ ++ int invert; ++ ++ while ((str != NULL) && (*str != '\0')) { ++ if (strncmp(str, "off", 3) == 0) ++ apm_disabled = 1; ++ if (strncmp(str, "on", 2) == 0) ++ apm_disabled = 0; ++ invert = (strncmp(str, "no-", 3) == 0); ++ if (invert) ++ str += 3; ++ if (strncmp(str, "debug", 5) == 0) ++ debug = !invert; ++ if ((strncmp(str, "power-off", 9) == 0) || ++ (strncmp(str, "power_off", 9) == 0)) ++ power_off = !invert; ++ str = strchr(str, ','); ++ if (str != NULL) ++ str += strspn(str, ", \t"); ++ } ++ return 1; ++} ++ ++__setup("apm=", apm_setup); ++#endif ++ ++static struct file_operations apm_bios_fops = { ++ owner: THIS_MODULE, ++ read: do_read, ++ poll: do_poll, ++ ioctl: do_ioctl, ++ open: do_open, ++ release: do_release, ++}; ++ ++static struct miscdevice apm_device = { ++ APM_MINOR_DEV, ++ "apm_bios", ++ &apm_bios_fops ++}; ++ ++#define APM_INIT_ERROR_RETURN return -1 ++ ++/* ++ * Just start the APM thread. We do NOT want to do APM BIOS ++ * calls from anything but the APM thread, if for no other reason ++ * than the fact that we don't trust the APM BIOS. This way, ++ * most common APM BIOS problems that lead to protection errors ++ * etc will have at least some level of being contained... ++ * ++ * In short, if something bad happens, at least we have a choice ++ * of just killing the apm thread.. ++ */ ++static int __init apm_init(void) ++{ ++ if (apm_bios_info.version == 0) { ++ printk(KERN_INFO "apm: BIOS not found.\n"); ++ APM_INIT_ERROR_RETURN; ++ } ++ printk(KERN_INFO ++ "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", ++ ((apm_bios_info.version >> 8) & 0xff), ++ (apm_bios_info.version & 0xff), ++ apm_bios_info.flags, ++ driver_version); ++ ++ if (apm_disabled) { ++ printk(KERN_NOTICE "apm: disabled on user request.\n"); ++ APM_INIT_ERROR_RETURN; ++ } ++ ++ if (PM_IS_ACTIVE()) { ++ printk(KERN_NOTICE "apm: overridden by ACPI.\n"); ++ APM_INIT_ERROR_RETURN; ++ } ++ pm_active = 1; ++ ++ create_proc_info_entry("apm", 0, NULL, apm_get_info); ++ ++ misc_register(&apm_device); ++ ++ return 0; ++} ++ ++static void __exit apm_exit(void) ++{ ++ misc_deregister(&apm_device); ++ remove_proc_entry("apm", NULL); ++ if (power_off) ++ pm_power_off = NULL; ++ exit_kapmd = 1; ++ while (kapmd_running) ++ schedule(); ++ pm_active = 0; ++} ++ ++module_init(apm_init); ++module_exit(apm_exit); ++ ++MODULE_AUTHOR("Jamey Hicks, pulling bits from original by Stephen Rothwell"); ++MODULE_DESCRIPTION("A minimal emulation of APM"); ++MODULE_PARM(debug, "i"); ++MODULE_PARM_DESC(debug, "Enable debug mode"); ++MODULE_PARM(power_off, "i"); ++MODULE_PARM_DESC(power_off, "Enable power off"); ++ ++EXPORT_NO_SYMBOLS; +--- linux-2.4.25/arch/arm/mach-sa1100/leds.c~2.4.25-vrs2-pxa1-jpm1.patch 2003-08-25 13:44:39.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/leds.c 2004-05-02 22:45:42.000000000 +0200 +@@ -45,6 +45,8 @@ + leds_event = pfs168_leds_event; + if (machine_is_pt_system3()) + leds_event = system3_leds_event; ++ if (machine_is_simpad()) ++ leds_event = simpad_leds_event; + + leds_event(led_start); + return 0; +--- linux-2.4.25/arch/arm/mach-sa1100/leds.h~2.4.25-vrs2-pxa1-jpm1.patch 2003-08-25 13:44:39.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/leds.h 2004-05-02 22:45:42.000000000 +0200 +@@ -12,4 +12,6 @@ + extern void hackkit_leds_event(led_event_t evt); + extern void lart_leds_event(led_event_t evt); + extern void pfs168_leds_event(led_event_t evt); ++extern void simpad_leds_event(led_event_t evt); + extern void system3_leds_event(led_event_t evt); ++ +--- linux-2.4.25/arch/arm/mach-sa1100/pm.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:37.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/pm.c 2004-05-02 22:45:42.000000000 +0200 +@@ -63,6 +63,7 @@ + SLEEP_SAVE_PPDR, SLEEP_SAVE_PPSR, SLEEP_SAVE_PPAR, SLEEP_SAVE_PSDR, + + SLEEP_SAVE_ICMR, ++ SLEEP_SAVE_MECR, + SLEEP_SAVE_Ser1SDCR0, + + SLEEP_SAVE_SIZE +@@ -109,6 +110,8 @@ + + SAVE(ICMR); + ++ SAVE(MECR); ++ + /* ... maybe a global variable initialized by arch code to set this? */ + GRER = PWER; + GFER = 0; +@@ -163,6 +166,8 @@ + ICCR = 1; + RESTORE(ICMR); + ++ RESTORE(MECR); ++ + /* restore current time */ + xtime.tv_sec = RCNR + delta; + +--- linux-2.4.25/arch/arm/mach-sa1100/simpad.c~2.4.25-vrs2-pxa1-jpm1.patch 2003-06-13 16:51:29.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/simpad.c 2004-05-02 22:48:26.000000000 +0200 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -28,6 +29,11 @@ + return cs3_shadow; + } + ++void set_cs3(long value) ++{ ++ *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow = value; ++} ++ + void set_cs3_bit(int value) + { + cs3_shadow |= value; +@@ -40,31 +46,62 @@ + *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; + } + ++EXPORT_SYMBOL(set_cs3_bit); ++EXPORT_SYMBOL(clear_cs3_bit); ++ ++static void simpad_power_off(void) ++{ ++ cli(); ++ set_cs3(0x800); /* only SD_MEDIAQ */ ++ ++ /* disable internal oscillator, float CS lines */ ++ PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS); ++ /* enable wake-up on GPIO0 (Assabet...) */ ++ PWER = GFER = GRER = 1; ++ /* ++ * set scratchpad to zero, just in case it is used as a ++ * restart address by the bootloader. ++ */ ++ PSPR = 0; ++ PGSR = 0; ++ /* enter sleep mode */ ++ PMCR = PMCR_SF; ++ while(1); ++} ++ ++static int __init simpad_init(void) ++{ ++ pm_power_off = simpad_power_off; ++ return 0; ++} ++ ++__initcall(simpad_init); ++ + static void __init + fixup_simpad(struct machine_desc *desc, struct param_struct *params, + char **cmdline, struct meminfo *mi) + { +-#ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */ +- SET_BANK( 0, 0xc0000000, 64*1024*1024 ); +-#else ++#ifdef CONFIG_SA1100_SIMPAD_SINUSPAD + SET_BANK( 0, 0xc0000000, 32*1024*1024 ); ++#else ++ SET_BANK( 0, 0xc0000000, 64*1024*1024 ); + #endif + mi->nr_banks = 1; +- ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); ++ + setup_ramdisk( 1, 0, 0, 8192 ); + setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 ); + } + +- + static struct map_desc simpad_io_desc[] __initdata = { +- /* virtual physical length domain r w c b */ +- { 0xe8000000, 0x00000000, 0x02000000, DOMAIN_IO, 0, 1, 0, 0 }, +- { 0xf2800000, 0x4b800000, 0x00800000, DOMAIN_IO, 0, 1, 0, 0 }, /* MQ200 */ +- { 0xf1000000, 0x18000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, /* Paules CS3, write only */ ++ /* virtual physical length domain r w c b */ ++ { 0xe8000000, 0x00000000, 0x01000000, DOMAIN_IO, 0, 1, 0, 0 }, ++ { 0xe9000000, 0x08000000, 0x01000000, DOMAIN_IO, 0, 1, 0, 0 }, ++ { 0xf1000000, 0x18000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, /* CS3, write only */ ++ { 0xf2000000, 0x40000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, /* CS4, tda8007 */ ++ { 0xf2800000, 0x4b800000, 0x00800000, DOMAIN_IO, 0, 1, 0, 0 }, /* MQ200 */ + LAST_DESC + }; + +- + static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate) + { + if (port->mapbase == (u_int)&Ser1UTCR0) { +@@ -81,20 +118,32 @@ + + static void __init simpad_map_io(void) + { +- sa1100_map_io(); +- iotable_init(simpad_io_desc); ++ sa1100_map_io(); ++ iotable_init(simpad_io_desc); + +- PSPR = 0xc0008000; +- GPDR &= ~GPIO_GPIO0; +- cs3_shadow = (EN1 | EN0 | LED2_ON | DISPLAY_ON | RS232_ON | +- ENABLE_5V | RESET_SIMCARD); +- *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; ++ set_cs3_bit (EN1 | EN0 | LED2_ON | DISPLAY_ON | RS232_ON | ++ ENABLE_5V | nRESET_SIMCARD); + +- //It is only possible to register 3 UART in serial_sa1100.c +- sa1100_register_uart(0, 3); +- sa1100_register_uart(1, 1); ++ //It is only possible to register 3 UART in serial_sa1100.c ++ sa1100_register_uart(0, 3); ++ sa1100_register_uart(1, 1); + +- set_GPIO_IRQ_edge(GPIO_UCB1300_IRQ, GPIO_RISING_EDGE); ++ GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); ++ GPDR |= GPIO_UART_TXD; ++ GPDR &= ~GPIO_UART_RXD; ++ PPAR |= PPAR_UPR; ++ ++ set_GPIO_IRQ_edge(GPIO_UCB1300_IRQ, GPIO_RISING_EDGE); ++ set_GPIO_IRQ_edge(GPIO_POWER_BUTTON, GPIO_FALLING_EDGE); ++ ++ /* ++ * Set up registers for sleep mode. ++ */ ++ ++ PWER = PWER_GPIO0; ++ PGSR = 0x818; ++ PCFR = 0; ++ PSDR = 0; + } + + #ifdef CONFIG_PROC_FS +@@ -140,7 +189,17 @@ + + return len; + } +- ++ ++static int proc_cs3_write(struct file * file, const char * buffer, ++ size_t count, loff_t *ppos) ++{ ++ unsigned long newRegValue; ++ char *endp; ++ ++ newRegValue = simple_strtoul(buffer,&endp,0); ++ set_cs3( newRegValue ); ++ return (count+endp-buffer); ++} + + static struct proc_dir_entry *proc_cs3; + +@@ -148,7 +207,10 @@ + { + proc_cs3 = create_proc_entry("cs3", 0, 0); + if (proc_cs3) ++ { + proc_cs3->read_proc = proc_cs3_read; ++ proc_cs3->write_proc = (void*)proc_cs3_write; ++ } + return 0; + } + +@@ -165,6 +227,7 @@ + MACHINE_START(SIMPAD, "Simpad") + MAINTAINER("Juergen Messerer") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) ++ BOOT_PARAMS(0xc0000100) + FIXUP(fixup_simpad) + MAPIO(simpad_map_io) + INITIRQ(sa1100_init_irq) +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/arch/arm/mach-sa1100/simpad_pm.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,147 @@ ++/* ++* Powermanagement layer for SIMPad. ++* ++* Copyright 2003 Peter Pregler ++* Copyright 2000,2001 Compaq Computer Corporation. ++* ++* Use consistent with the GNU GPL is permitted, ++* provided that this copyright notice is ++* preserved in its entirety in all copies and derived works. ++* ++* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, ++* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS ++* FITNESS FOR ANY PARTICULAR PURPOSE. ++* ++* Author: Peter Pregler (based on work for ipaq by Andrew Christian) ++* May, 2003 ++*/ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include /* get_user,copy_to_user */ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++MODULE_AUTHOR("Peter Pregler"); ++MODULE_DESCRIPTION("Power manamgement abstraction layer for the SIMpad"); ++ ++/****************************************************************************/ ++/* Functions exported for use by the kernel and kernel modules */ ++/****************************************************************************/ ++ ++int simpad_apm_get_power_status(u_char *ac_line_status, ++ u_char *battery_status, ++ u_char *battery_flag, ++ u_char *battery_percentage, ++ u_short *battery_life) ++{ ++ struct simpad_battery bstat; ++ unsigned char ac = APM_AC_UNKNOWN; ++ unsigned char level = APM_BATTERY_STATUS_UNKNOWN; ++ int status, result; ++ ++ result = simpad_get_battery(&bstat); ++ if (result) { ++ printk("%s: unable to access battery information: result=%d\n", __FUNCTION__, result); ++ return 0; ++ } ++ ++ switch (bstat.ac_status) { ++ case SIMPAD_AC_STATUS_AC_OFFLINE: ++ ac = APM_AC_OFFLINE; ++ break; ++ case SIMPAD_AC_STATUS_AC_ONLINE: ++ ac = APM_AC_ONLINE; ++ break; ++ case SIMPAD_AC_STATUS_AC_BACKUP: ++ ac = APM_AC_BACKUP; ++ break; ++ } ++ ++ if (ac_line_status != NULL) ++ *ac_line_status = ac; ++ ++ status = bstat.status; ++ if (status & (SIMPAD_BATT_STATUS_CHARGING | SIMPAD_BATT_STATUS_CHARGE_MAIN)) ++ level = APM_BATTERY_STATUS_CHARGING; ++ else if (status & (SIMPAD_BATT_STATUS_HIGH | SIMPAD_BATT_STATUS_FULL)) ++ level = APM_BATTERY_STATUS_HIGH; ++ else if (status & SIMPAD_BATT_STATUS_LOW) ++ level = APM_BATTERY_STATUS_LOW; ++ else if (status & SIMPAD_BATT_STATUS_CRITICAL) ++ level = APM_BATTERY_STATUS_CRITICAL; ++ ++ if (battery_status != NULL) ++ *battery_status = level; ++ ++ if (battery_percentage != NULL) ++ *battery_percentage = bstat.percentage; ++ ++ /* we have a dumb battery - so we know nothing */ ++ if (battery_life != NULL) { ++ *battery_life = APM_BATTERY_LIFE_UNKNOWN; ++ } ++ ++#if 0 ++ printk("apm_get_power: ac: %02x / bs: %02x / bf: %02x / perc: %02x / life: %d\n", ++ *ac_line_status, *battery_status, *battery_flag, ++ *battery_percentage, *battery_life ); ++#endif ++ return 1; ++} ++ ++EXPORT_SYMBOL(simpad_apm_get_power_status); ++ ++ ++/***********************************************************************************/ ++/* Initialization */ ++/***********************************************************************************/ ++ ++#ifdef CONFIG_FB_MQ200 ++extern void (*mq200_blank_helper)(int blank); ++#endif ++ ++int __init simpad_hal_init_module(void) ++{ ++ int i; ++ printk(KERN_INFO "SIMpad Registering HAL abstraction layer\n"); ++ ++ /* Request the appropriate underlying module to provide services */ ++ ++#ifdef CONFIG_FB_SA1100 ++ sa1100fb_blank_helper = simpad_hal_backlight_helper; ++#endif ++ ++ return 0; ++} ++ ++void simpad_hal_cleanup_module(void) ++{ ++ int i; ++ printk(KERN_INFO "SIMpad shutting down HAL abstraction layer\n"); ++ ++#ifdef CONFIG_FB_SA1100 ++ sa1100fb_blank_helper = NULL; ++#endif ++} ++ ++module_init(simpad_hal_init_module); ++module_exit(simpad_hal_cleanup_module); +--- linux-2.4.25/drivers/char/Config.in~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/char/Config.in 2004-05-02 22:45:42.000000000 +0200 +@@ -425,4 +425,7 @@ + tristate ' MT6N TTL I/O suport' CONFIG_TRIZEPS2_TTLIO + fi + ++if [ "$CONFIG_SA1100_SIMPAD" = "y" ]; then ++ tristate 'Smartcardreader(TDA8007) support' CONFIG_TDA8007 ++fi + endmenu +--- linux-2.4.25/drivers/char/Makefile~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/char/Makefile 2004-05-02 22:45:42.000000000 +0200 +@@ -376,6 +376,8 @@ + obj-y += ipmi/ipmi.o + endif + ++obj-$(CONFIG_TDA8007) += tda8007.o ++ + include $(TOPDIR)/Rules.make + + fastdep: +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/char/tda8007.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,514 @@ ++/* ++ * linux/drivers/char/tda8007.c ++ * ++ * Copyright (C) 2001 juergen.messerer@freesurf.ch, All Rights Reserved. ++ * ++ * 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. ++ * ++ * The TDA8007B driver provides basic services for handling IO, ++ * interrupts, and accessing registers. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "tda8007b.h" ++ ++#define TDA8007_DIRNAME "driver/tda8007" ++#define REG_DIRNAME "registers" ++ ++extern void clear_cs3_bit(int value); ++ ++static struct proc_dir_entry *regdir; ++static struct proc_dir_entry *tda8007dir; ++ ++static ssize_t proc_tda8007_read(struct file * file, char * buf, ++ size_t nbytes, loff_t *ppos); ++static ssize_t proc_tda8007_write(struct file * file, const char * buffer, ++ size_t count, loff_t *ppos); ++ ++static struct file_operations proc_reg_operations = { ++ read: proc_tda8007_read, ++ write: proc_tda8007_write ++}; ++ ++static int __init tda8007_init(); ++ ++/* ------------------------------------------------------------------------- */ ++void tda8007_reg_write(int reg, int val) ++{ ++ printk("Address:%x \n", CS4_BASE+reg); ++ printk("Value:%x \n", val); ++ TDA_REG_WRITE(reg,val); ++} ++/* ------------------------------------------------------------------------- */ ++int tda8007_reg_read(int reg) ++{ ++ printk("Address:%x \n", CS4_BASE+reg); ++ return(TDA_REG_READ(reg)&0xff); ++} ++/* ------------------------------------------------------------------------- */ ++int tdaregs[16]; ++/* ------------------------------------------------------------------------- */ ++static void tda8007_irq(int irqnr, void *devid, struct pt_regs *regs) ++{ ++ printk("\n****tda8007_irq****\n"); ++} ++/* ------------------------------------------------------------------------- */ ++static int tda_card_present( uint cardport ) ++{ ++ int val=0; ++ ++ switch( cardport ) ++ { ++ case CARD_PORT1: ++ if( tda8007_reg_read(TDA_MSR) & TDA_MSR_PR1 ) ++ val = 1; ++ break; ++ case CARD_PORT2: ++ if( tda8007_reg_read(TDA_MSR) & TDA_MSR_PR2 ) ++ val = 1; ++ break; ++ default: ++ val =0; ++ break; ++ } ++ ++ return val; ++} ++/* ------------------------------------------------------------------------- */ ++void tda_inituart(void) ++{ ++ int hsr_reg, fcr_reg; ++ ++ printk("Init TDA8007 Uart\n"); ++ hsr_reg = tda8007_reg_read(TDA_HSR); ++ tda8007_reg_write(TDA_PCR, 0x00); ++ ++ tda8007_reg_write(TDA_CSR, 0x00); ++ tda8007_reg_write(TDA_CSR, TDA_CSR_SC1); /* select Card 1 */ ++ ++ tda8007_reg_write(TDA_CSR, TDA_CSR_nRIU|TDA_CSR_SC1); ++ tda8007_reg_write(TDA_PCR, 0x00); ++ ++ tda8007_reg_write(TDA_PDR, TDA_PDR_VAL); /* Rat v. jandu 8.9.2000 */ ++ tda8007_reg_write(TDA_UCR2, TDA_UCR2_DIV); ++ ++ tda8007_reg_write(TDA_CCR, 0x40|TDA_CCR_AC1); /*1=XTAL/2 2=XTAL/4 3=XTAL/8 */ ++ tda8007_reg_write(TDA_GTR, TDA_GTR_GT1); ++ ++ fcr_reg = tda8007_reg_read(TDA_FCR); ++ tda8007_reg_write(TDA_FCR, (fcr_reg & 0xf0) | TDA_FCR_FL1); ++ ++ tda8007_reg_write(TDA_FCR, TDA_FCR_FL2|TDA_FCR_FL1|TDA_FCR_FL0); ++ tda8007_reg_write(TDA_UCR1, TDA_UCR_SS|TDA_UCR_CONV); ++ tda8007_reg_write(TDA_PCR, 0x00); ++ ++ while( tda8007_reg_read(TDA_USR) & TDA_USR_TBE_RBF ) ++ { ++ hsr_reg = tda8007_reg_read(TDA_URR); ++ udelay(5); ++ } ++} ++/* ------------------------------------------------------------------------- */ ++void start_tda8007_sync(int volt) ++{ ++ int i=0,j=0; ++ if( tda_card_present( CARD_PORT1 ) ) ++ { ++ printk("Card Present "); ++ tda8007_reg_write(TDA_TOR1, TDA_TOR1_TOL2|TDA_TOR1_TOL3); ++ tda8007_reg_write(TDA_TOR2, TDA_TOR2_TOL16|TDA_TOR2_TOL15| ++ TDA_TOR2_TOL13|TDA_TOR2_TOL12| ++ TDA_TOR2_TOL11); ++ tda8007_reg_write(TDA_TOR3, 0x00); ++ tda8007_reg_write(TDA_TOC, TDA_TOC_MODE2); ++ tda_inituart(); ++ tda8007_reg_write(TDA_UCR2, TDA_UCR_DISAUX|TDA_UCR2_DIV); // DIS_AUX ASYNC MODE ++ ++ if( volt == 3 ) ++ volt = TDA_PCR_3V_5V; ++ else ++ volt = 0x00; ++ ++ tda8007_reg_write(TDA_PCR, 0x00|volt); // Set /Reset,3V ++ udelay(1000); ++ tda8007_reg_write(TDA_PCR, TDA_PCR_START|volt); // /Reset,3V,Start ++ udelay(2000); ++ tda8007_reg_write(TDA_PCR, TDA_PCR_RSTIN|TDA_PCR_START|volt); // Set Reset High ++ i=0; ++ while( 1 )// !serstat() ++ { ++ if( ((msr[i]=tda8007_reg_read(TDA_MSR)) & TDA_MSR_FE) == 0 ) ++ { ++ hsr[i]=tda8007_reg_read(TDA_HSR); ++ usr[i]=tda8007_reg_read(TDA_USR); ++ csr[i]=tda8007_reg_read(TDA_CSR); ++ urr[i]=tda8007_reg_read(TDA_URR); ++ i++; ++ } ++ if( i == 1 ) ++ { ++ /* Reset SS */ ++ tda8007_reg_write(TDA_UCR1, ++ tda8007_reg_read(TDA_UCR1) & ~TDA_UCR_SS); ++ /* Set Autoconv high */ ++ tda8007_reg_write(TDA_UCR2, ++ tda8007_reg_read(TDA_UCR2) | TDA_UCR_nAUTOCONV); ++ } ++ ++ if( i >= BUFFSIZE ) ++ { ++ printk("Buffer Overflow"); ++ break; ++ } ++ // tda8007_reg_write(TDA_FCR, TDA_FCR_PEC0|TDA_FCR_FL0); ++ } ++ hsr[i]=tda8007_reg_read(TDA_HSR); ++ msr[i]=tda8007_reg_read(TDA_MSR); ++ csr[i]=tda8007_reg_read(TDA_CSR); ++ urr[i]=tda8007_reg_read(TDA_URR); ++ i++; ++ //serin(); ++ if( i==1 ) ++ printk("No Characters received\n"); ++ else ++ for(j=0;jf_dentry->d_inode)->i_ino; ++ tda8007_reg_entry_t* current_reg = NULL; ++ ++ if ((*ppos) > 0) /* Assume reading completed in previous read*/ ++ return 0; ++ ++ for (i=0; idescription); ++ count += sprintf(outputbuf, "%s: 0x%x\n", current_reg->name, ++ tda8007_reg_read( current_reg->addr )); ++ /* count = sprintf(outputbuf, "value: 0x%x\n", ++ tda8007_reg_read( current_reg->addr ));*/ ++ ++ *ppos+=count; ++ ++ if (count>nbytes) /* Assume output can be read at one time */ ++ return -EINVAL; ++ ++ if (copy_to_user(buf, outputbuf, count)) ++ return -EFAULT; ++ ++ return count; ++} ++/* ------------------------------------------------------------------------- */ ++static ssize_t proc_tda8007_write(struct file * file, const char * buffer, ++ size_t count, loff_t *ppos) ++{ ++ int i; ++ unsigned long newRegValue; ++ char *endp; ++ int i_ino = (file->f_dentry->d_inode)->i_ino; ++ tda8007_reg_entry_t* current_reg=NULL; ++ ++ for (i=0; iaddr, newRegValue); ++ return (count+endp-buffer); ++} ++/* ------------------------------------------------------------------------- */ ++static int __init tda8007_init() ++{ ++ int i, hsr_reg, res; ++ int ret = -ENODEV; ++ struct proc_dir_entry *entry; ++ int tda8007_major = 60; ++ ++ res = register_chrdev( tda8007_major, "tda8007", NULL ); ++ ++ if(res < 0){ ++ printk(KERN_WARNING "tda8007: can't get major%d\n", tda8007_major); ++ return res; ++ } ++ ++ if( tda8007_major == 0 ) ++ tda8007_major = res; ++ ++ set_GPIO_IRQ_edge(GPIO_SMART_CARD, GPIO_RISING_EDGE); ++ ++ ret = request_irq( IRQ_GPIO_SMART_CARD, tda8007_irq, ++ SA_INTERRUPT, "SMARTCARD_CD", NULL ); ++ if (ret) { ++ printk(KERN_ERR "tda8007: unable to grab irq%d: %d\n", ++ IRQ_GPIO_SMART_CARD, ret); ++ return ret; ++ } ++ ++ printk("\nInit TDA8007 IRQ=%s\n", ++ (GPLR&(1<<10) ? "HIGH":"LOW")); ++ ++// clear_cs3_bit(RESET_SIMCARD); ++ ++ ++#ifdef CONFIG_PROC_FS ++ /* Create two dir entries for the TDA8007 */ ++ tda8007dir = proc_mkdir("tda8007"/*TDA8007_DIRNAME*/, NULL); ++ if (tda8007dir == NULL) { ++ printk(KERN_ERR "tda80007: can't create /proc/" TDA8007_DIRNAME "\n"); ++ return(-ENOMEM); ++ } ++ ++ regdir = proc_mkdir(REG_DIRNAME, tda8007dir); ++ if (regdir == NULL) { ++ printk(KERN_ERR "tda8007: can't create /proc/" TDA8007_DIRNAME "/" REG_DIRNAME "\n"); ++ return(-ENOMEM); ++ } ++ ++ for(i=0;ilow_ino; ++ entry->proc_fops = &proc_reg_operations; ++ } ++ else { ++ printk( KERN_ERR ++ "tda8007: can't create /proc/" REG_DIRNAME ++ "/%s\n", tda8007_regs[i].name); ++ return(-ENOMEM); ++ } ++ } ++ ++#endif // CONFIG_PROC_FS ++ ++ ++ tda8007_reg_write(TDA_CSR, 0); ++ tda8007_reg_write(TDA_CSR, TDA_CSR_nRIU); ++ for( i=0; i < 16; i++ ) ++ tda8007_reg_write(i,0); ++ ++ tda8007_reg_write(TDA_CSR, TDA_CSR_nRIU|TDA_CSR_SC2); ++ tda8007_reg_write(TDA_PCR, 0); /* START=0 */ ++ tda8007_reg_write(TDA_CSR, TDA_CSR_nRIU|TDA_CSR_SC1); ++ tda8007_reg_write(TDA_PCR, 0); /* START=0 */ ++ tda8007_reg_write(TDA_TOC, 0); ++ tda8007_reg_write(TDA_FCR, TDA_FCR_FL2|TDA_FCR_FL1|TDA_FCR_FL0); ++ ++ tda8007_reg_write(TDA_UCR2, TDA_UCR_DISAUX|TDA_UCR2_DIV); // DIS_AUX DIS_CLK ++ tda8007_reg_write(TDA_UCR2, TDA_UCR_DISAUX|TDA_UCR2_DIV); // DIS_AUX CLK SYNC-MODE ++ hsr_reg = tda8007_reg_read(TDA_HSR); ++ ++ tda8007_reg_write(TDA_CCR, TDA_CCR_AC1|TDA_CCR_AC0); /* XTAL/8 */ ++ ++ return 0; ++} ++/* ------------------------------------------------------------------------- */ ++static void __exit tda8007_exit(void) ++{ ++ int i; ++ ++ free_irq(IRQ_GPIO_SMART_CARD, NULL); ++ /* kfree(my_ucb);*/ ++ ++ if (regdir) ++ { ++ for(i=0;i"); ++MODULE_DESCRIPTION("TDA8007 driver"); ++MODULE_LICENSE("GPL"); +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/char/tda8007b.h 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,312 @@ ++/* ++ * Double multiprotocol IC car interface (Philips SmartCard reader) ++ * ++ * linux/drivers/char/tda8007b.h ++ * ++ * Copyright (C) 2002 juergen.messerer@freesurf.ch, All Rights Reserved. ++ * ++ * 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. ++ */ ++#ifndef TDA8007B_H ++#define TDA8007B_H ++ ++#define CS4BUSTYPE unsigned volatile long ++#define CS4_BASE 0xf2000000 ++ ++#define CARD_PORT1 1 ++#define CARD_PORT2 2 ++#define CARD_PORT3 3 ++ ++#define TDA_REG_READ(reg) *(CS4BUSTYPE *)(CS4_BASE+reg) ++#define TDA_REG_WRITE(reg,val) *(CS4BUSTYPE *)(CS4_BASE+reg)=val ++ ++#define TDA_MULTIPLEXED_MODE 0 ++ ++#define TDA_UCR2_DIV 0 ++#define TDA_PDR_VAL 12 ++ ++#define pascii(i) ((i>=' ' && i < 0x7f) ? (i):'.') ++ ++#define BUFFSIZE 128 ++ ++#define TDA_READ 1 ++#define TDA_WRITE 2 ++ ++#define TDA_INFO 1 ++#define TDA_INIT 2 ++#define TDA_SET 3 ++#define TDA_CARD_PRESENT 4 ++#define TDA_CARD_VOLT 5 ++ ++int hsr[BUFFSIZE]; ++int msr[BUFFSIZE]; ++int csr[BUFFSIZE]; ++int urr[BUFFSIZE]; ++int usr[BUFFSIZE]; ++ ++/*************************** Control Register ********************************/ ++ ++/* ++ * Card select register (read/write) ++ * all significant bits are cleared execept SC1 which is set (xxxx'0001) ++ */ ++#define TDA_CSR 0x00 ++#define TDA_CSR_SC1 (1 << 0) ++#define TDA_CSR_SC2 (1 << 1) ++#define TDA_CSR_SC3 (1 << 2) ++#define TDA_CSR_nRIU (1 << 3) ++ ++/* ++ * Clock configuration register (read/write) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_CCR 0x01 ++#define TDA_CCR_AC0 (1 << 0) ++#define TDA_CCR_AC1 (1 << 1) ++#define TDA_CCR_AC2 (1 << 2) ++#define TDA_CCR_SC (1 << 3) ++#define TDA_CCR_CST (1 << 4) ++#define TDA_CCR_SHL (1 << 5) ++ ++/* ++ * Programmable divider register (read/write) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_PDR 0x02 ++#define TDA_PDR_PD0 (1 << 0) ++#define TDA_PDR_PD1 (1 << 1) ++#define TDA_PDR_PD2 (1 << 2) ++#define TDA_PDR_PD3 (1 << 3) ++#define TDA_PDR_PD4 (1 << 4) ++#define TDA_PDR_PD5 (1 << 5) ++#define TDA_PDR_PD6 (1 << 6) ++#define TDA_PDR_PD7 (1 << 7) ++ ++/* ++ * UART configuration register 2(read/write) ++ * all relevant bits are cleared after reset (x000'0000) ++ */ ++#define TDA_UCR2 0x03 ++#define TDA_UCR_PSC (1 << 0) ++#define TDA_UCR_CKU (1 << 1) ++#define TDA_UCR_nAUTOCONV (1 << 2) ++#define TDA_UCR_SAN (1 << 3) ++#define TDA_UCR_PDWN (1 << 4) ++#define TDA_UCR_DISAUX (1 << 5) ++#define TDA_UCR_DISTBE_RBF (1 << 6) ++ ++/* ++ * Guard time register (read/write) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_GTR 0x05 ++#define TDA_GTR_GT0 (1 << 0) ++#define TDA_GTR_GT1 (1 << 1) ++#define TDA_GTR_GT2 (1 << 2) ++#define TDA_GTR_GT3 (1 << 3) ++#define TDA_GTR_GT4 (1 << 4) ++#define TDA_GTR_GT5 (1 << 5) ++#define TDA_GTR_GT6 (1 << 6) ++#define TDA_GTR_GT7 (1 << 7) ++ ++/* ++ * UART configuration register 1(read/write) ++ * all relevant bits are cleared after reset (x000'0000) ++ */ ++#define TDA_UCR1 0x06 ++#define TDA_UCR_CONV (1 << 0) ++#define TDA_UCR_SS (1 << 1) ++#define TDA_UCR_LCT (1 << 2) ++#define TDA_UCR_T_R (1 << 3) ++#define TDA_UCR_PROT (1 << 4) ++#define TDA_UCR_FC (1 << 5) ++#define TDA_UCR_FIP (1 << 6) ++ ++/* ++ * Power control register (read/write) ++ * all relevant bits are cleared after reset (xx11'0000) ++ */ ++#define TDA_PCR 0x07 ++#define TDA_PCR_START (1 << 0) ++#define TDA_PCR_3V_5V (1 << 1) ++#define TDA_PCR_RSTIN (1 << 2) ++#define TDA_PCR_1V8 (1 << 3) ++#define TDA_PCR_C4 (1 << 4) ++#define TDA_PCR_C8 (1 << 5) ++ ++/* ++ * Time-out configuration register (read/write) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_TOC 0x08 ++#define TDA_TOC_STOP_ALL 0x00 ++#define TDA_TOC_MODE1 0x61 ++#define TDA_TOC_MODE2 0x65 ++#define TDA_TOC_MODE3 0x68 ++#define TDA_TOC_MODE4 0x7c ++#define TDA_TOC_MODE5 0xe5 ++ ++/* ++ * Time-out register 1(write only) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_TOR1 0x09 ++#define TDA_TOR1_TOL0 (1 << 0) ++#define TDA_TOR1_TOL1 (1 << 1) ++#define TDA_TOR1_TOL2 (1 << 2) ++#define TDA_TOR1_TOL3 (1 << 3) ++#define TDA_TOR1_TOL4 (1 << 4) ++#define TDA_TOR1_TOL5 (1 << 5) ++#define TDA_TOR1_TOL6 (1 << 6) ++#define TDA_TOR1_TOL7 (1 << 7) ++ ++/* ++ * Time-out register 2(write only) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_TOR2 0x0a ++#define TDA_TOR2_TOL10 (1 << 0) ++#define TDA_TOR2_TOL11 (1 << 1) ++#define TDA_TOR2_TOL12 (1 << 2) ++#define TDA_TOR2_TOL13 (1 << 3) ++#define TDA_TOR2_TOL14 (1 << 4) ++#define TDA_TOR2_TOL15 (1 << 5) ++#define TDA_TOR2_TOL16 (1 << 6) ++#define TDA_TOR2_TOL17 (1 << 7) ++ ++/* ++ * Time-out register 3(write only) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_TOR3 0x0b ++#define TDA_TOR3_TOL16 (1 << 0) ++#define TDA_TOR3_TOL17 (1 << 1) ++#define TDA_TOR3_TOL18 (1 << 2) ++#define TDA_TOR3_TOL19 (1 << 3) ++#define TDA_TOR3_TOL20 (1 << 4) ++#define TDA_TOR3_TOL21 (1 << 5) ++#define TDA_TOR3_TOL22 (1 << 6) ++#define TDA_TOR3_TOL23 (1 << 7) ++ ++/* ++ * Mixed status register (read only) ++ * bits TBE, RBF and BGT are cleared, bit FE is set after reset (x10x'xxx0) ++ */ ++#define TDA_MSR 0x0c ++#define TDA_MSR_TBE_RBF (1 << 0) ++#define TDA_MSR_INTAUX (1 << 1) ++#define TDA_MSR_PR1 (1 << 2) ++#define TDA_MSR_PR2 (1 << 3) ++#define TDA_MSR_BGT (1 << 5) ++#define TDA_MSR_FE (1 << 6) ++ ++/* ++ * FIFO control register (write only) ++ * all relevant bits are cleared after reset (x000'x000) ++ */ ++#define TDA_FCR 0x0c ++#define TDA_FCR_FL0 (1 << 0) ++#define TDA_FCR_FL1 (1 << 1) ++#define TDA_FCR_FL2 (1 << 2) ++#define TDA_FCR_PEC0 (1 << 4) ++#define TDA_FCR_PEC1 (1 << 5) ++#define TDA_FCR_PEC2 (1 << 6) ++ ++/* ++ * UART transmit register (write only) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_UTR 0x0d ++#define TDA_UTR_UT0 (1 << 0) ++#define TDA_UTR_UT1 (1 << 1) ++#define TDA_UTR_UT2 (1 << 2) ++#define TDA_UTR_UT3 (1 << 3) ++#define TDA_UTR_UT4 (1 << 4) ++#define TDA_UTR_UT5 (1 << 5) ++#define TDA_UTR_UT6 (1 << 6) ++#define TDA_UTR_UT7 (1 << 7) ++ ++/* ++ * UART receive register (read only) ++ * all bits are cleared (0000'0000) ++ */ ++#define TDA_URR 0x0d ++#define TDA_URR_UR0 (1 << 0) ++#define TDA_URR_UR1 (1 << 1) ++#define TDA_URR_UR2 (1 << 2) ++#define TDA_URR_UR3 (1 << 3) ++#define TDA_URR_UR4 (1 << 4) ++#define TDA_URR_UR5 (1 << 5) ++#define TDA_URR_UR6 (1 << 6) ++#define TDA_URR_UR7 (1 << 7) ++ ++/* ++ * UART status register (read only) ++ * all bits are cleared (0x00'0000) ++ */ ++#define TDA_USR 0x0e ++#define TDA_USR_TBE_RBF (1 << 0) ++#define TDA_USR_FER (1 << 1) ++#define TDA_USR_OVR (1 << 2) ++#define TDA_USR_PE (1 << 3) ++#define TDA_USR_EA (1 << 4) ++#define TDA_USR_TO1 (1 << 5) ++#define TDA_USR_TO3 (1 << 7) ++ ++/* ++ * Hardware status register (read only) ++ * all significant bits are cleared, except SUPL (x001'0000) ++ */ ++#define TDA_HSR 0x0f ++#define TDA_HSR_PTL (1 << 0) ++#define TDA_HSR_INTAUXL (1 << 1) ++#define TDA_HSR_PRL1 (1 << 2) ++#define TDA_HSR_PRL2 (1 << 3) ++#define TDA_HSR_SUPL (1 << 4) ++#define TDA_HSR_PRTL1 (1 << 5) ++#define TDA_HSR_PRTL2 (1 << 6) ++ ++typedef struct tda8007_reg_entry { ++ u32 addr; ++ char* name; ++ char* description; ++ u8 mode; ++ unsigned short low_ino; ++} tda8007_reg_entry_t; ++ ++ ++/* ++ * Read : 1 ++ * Write : 2 ++ * Read/Write : 3 ++ */ ++ ++static tda8007_reg_entry_t tda8007_regs[] = ++{ ++ {TDA_CSR, "TDA_CSR", "Card select register (read/write)", 3}, ++ {TDA_CCR, "TDA_CCR", "Clock configuration register (read/write)", 3}, ++ {TDA_PDR, "TDA_PDR", "Programmable divider register (read/write)", 3}, ++ {TDA_UCR2, "TDA_UCR2", "UART configuration register 2(read/write)", 3}, ++ {TDA_GTR, "TDA_GTR", "Guard time register (read/write)", 3}, ++ {TDA_UCR1, "TDA_UCR1", "UART configuration register 1(read/write)", 3}, ++ {TDA_PCR, "TDA_PCR", "Power control register (read/write)", 3}, ++ {TDA_TOC, "TDA_TOC", "Time-out configuration register (read/write)", 3}, ++ {TDA_MSR, "TDA_MSR", "Mixed status register (read only)", 1}, ++ {TDA_URR, "TDA_URR", "UART receive register (read only)", 1}, ++ {TDA_USR, "TDA_USR", "UART status register (read only)", 1}, ++ {TDA_HSR, "TDA_HSR", "Hardware status register (read only)", 1}, ++ {TDA_TOR1, "TDA_TOR1", "Time-out register 1(write only)", 2}, ++ {TDA_TOR2, "TDA_TOR2", "Time-out register 2(write only)", 2}, ++ {TDA_TOR3, "TDA_TOR3", "Time-out register 3(write only)", 2}, ++ {TDA_FCR, "TDA_FCR", "FIFO control register (write only)", 2}, ++ {TDA_UTR, "TDA_UTR", "UART transmit register (write only)", 2} ++}; ++#define NUM_OF_TDA8007_REG_ENTRY (sizeof(tda8007_regs)/sizeof(tda8007_reg_entry_t)) ++/* ++struct tda8007 { ++ ++}; ++*/ ++#endif /* TDA8007B_H */ +--- linux-2.4.25/drivers/misc/Config.in~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/misc/Config.in 2004-05-02 22:45:42.000000000 +0200 +@@ -16,3 +16,15 @@ + dep_tristate ' UCB1400 Touchscreen support' CONFIG_MCP_UCB1400_TS $CONFIG_ARCH_PXA $CONFIG_SOUND + + endmenu ++mainmenu_option next_comment ++comment 'Console Switches' ++ ++tristate 'Console Switch Support' CONFIG_SWITCHES ++if [ "$CONFIG_SWITCHES" != "n" ]; then ++ dep_bool ' SA-1100 switches' CONFIG_SWITCHES_SA1100 $CONFIG_ARCH_SA1100 ++ if [ "$CONFIG_MCP_UCB1200" != "n" ]; then ++ bool ' UCB1x00 switches' CONFIG_SWITCHES_UCB1X00 ++ fi ++fi ++ ++endmenu +--- linux-2.4.25/drivers/misc/Makefile~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/misc/Makefile 2004-05-02 22:45:42.000000000 +0200 +@@ -21,6 +21,24 @@ + obj-$(CONFIG_MCP_UCB1400_TS) += mcp-pxa.o ucb1x00-core.o ucb1x00-ts.o + obj-$(CONFIG_PXA_CERF_PDA) += cerf_ucb1400gpio.o + ++ifeq ($(CONFIG_SA1100_ASSABET),y) ++obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o ++endif ++ ++ifeq ($(CONFIG_SA1100_SIMPAD),y) ++export-objs += ucb1x00-simpad.o ++obj-$(CONFIG_MCP_UCB1200) += ucb1x00-simpad.o ++endif ++ ++obj-$(CONFIG_SWITCHES) += switches.o ++ ++switches-objs-y += switches-core.o ++switches-objs-$(CONFIG_SWITCHES_SA1100) += switches-sa1100.o ++switches-objs-$(CONFIG_SWITCHES_UCB1X00) += switches-ucb1x00.o ++ + include $(TOPDIR)/Rules.make + ++switches.o: $(switches-objs-y) ++ $(LD) $(LD_RFLAG) -r -o $@ $(switches-objs-y) ++ + fastdep: +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/switches-core.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,226 @@ ++/* ++ * linux/drivers/misc/switches-core.c ++ * ++ * Copyright (C) 2000-2001 John Dorsey ++ * ++ * 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. ++ * ++ * 5 October 2000 - created. ++ * ++ * 25 October 2000 - userland file interface added. ++ * ++ * 13 January 2001 - added support for Spot. ++ * ++ * 11 September 2001 - UCB1200 driver framework support added. ++ * ++ * 19 December 2001 - separated out SA-1100 and UCB1x00 code. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "switches.h" ++ ++ ++MODULE_AUTHOR("John Dorsey"); ++MODULE_DESCRIPTION("Console switch support"); ++MODULE_LICENSE("GPL"); ++ ++ ++struct switches_action { ++ struct list_head list; ++ switches_mask_t mask; ++}; ++ ++ ++static int switches_users = 0; ++ ++static spinlock_t switches_lock = SPIN_LOCK_UNLOCKED; ++ ++DECLARE_WAIT_QUEUE_HEAD(switches_wait); ++LIST_HEAD(switches_event_queue); ++ ++ ++static ssize_t switches_read(struct file *file, char *buffer, ++ size_t count, loff_t *pos) ++{ ++ unsigned long flags; ++ struct list_head *event; ++ struct switches_action *action; ++ ++ if (count < sizeof(struct switches_mask_t)) ++ return -EINVAL; ++ ++ while (list_empty(&switches_event_queue)) { ++ ++ if (file->f_flags & O_NDELAY) ++ return -EAGAIN; ++ ++ interruptible_sleep_on(&switches_wait); ++ ++ if (signal_pending(current)) ++ return -ERESTARTSYS; ++ ++ } ++ ++ if (verify_area(VERIFY_WRITE, buffer, sizeof(struct switches_mask_t))) ++ return -EFAULT; ++ ++ spin_lock_irqsave(&switches_lock, flags); ++ ++ event = switches_event_queue.next; ++ action = list_entry(event, struct switches_action, list); ++ copy_to_user(buffer, &(action->mask), sizeof(struct switches_mask_t)); ++ list_del(event); ++ kfree(action); ++ ++ spin_unlock_irqrestore(&switches_lock, flags); ++ ++ return sizeof(struct switches_mask_t); ++ ++} ++ ++static ssize_t switches_write(struct file *file, const char *buffer, ++ size_t count, loff_t *ppos) ++{ ++ return -EINVAL; ++} ++ ++static unsigned int switches_poll(struct file *file, poll_table *wait) ++{ ++ ++ poll_wait(file, &switches_wait, wait); ++ ++ if (!list_empty(&switches_event_queue)) ++ return POLLIN | POLLRDNORM; ++ ++ return 0; ++ ++} ++ ++static int switches_open(struct inode *inode, struct file *file) ++{ ++ ++ if (switches_users > 0) ++ return -EBUSY; ++ ++ MOD_INC_USE_COUNT; ++ ++switches_users; ++ return 0; ++ ++} ++ ++static int switches_release(struct inode *inode, struct file *file) ++{ ++ ++ --switches_users; ++ MOD_DEC_USE_COUNT; ++ return 0; ++ ++} ++ ++static struct file_operations switches_ops = { ++ read: switches_read, ++ write: switches_write, ++ poll: switches_poll, ++ open: switches_open, ++ release: switches_release ++}; ++ ++static struct miscdevice switches_misc = { ++ MISC_DYNAMIC_MINOR, SWITCHES_NAME, &switches_ops ++}; ++ ++int switches_event(switches_mask_t *mask) ++{ ++ struct switches_action *action; ++ ++ if ((switches_users > 0) && (SWITCHES_COUNT(mask) > 0)) { ++ ++ if ((action = (struct switches_action *) ++ kmalloc(sizeof(struct switches_action), ++ GFP_ATOMIC)) == NULL) { ++ printk(KERN_ERR "%s: unable to allocate action " ++ "descriptor\n", SWITCHES_NAME); ++ return -1; ++ } ++ ++ action->mask = *mask; ++ ++ spin_lock(&switches_lock); ++ list_add_tail(&action->list, &switches_event_queue); ++ spin_unlock(&switches_lock); ++ ++ wake_up_interruptible(&switches_wait); ++ ++ } ++ ++ return 0; ++ ++} ++ ++static int __init switches_init(void) ++{ ++ ++#ifdef CONFIG_SWITCHES_SA1100 ++ if (switches_sa1100_init() < 0) { ++ printk(KERN_ERR "%s: unable to initialize SA-1100 switches\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++#endif ++ ++#ifdef CONFIG_SWITCHES_UCB1X00 ++ if (switches_ucb1x00_init() < 0) { ++ printk(KERN_ERR "%s: unable to initialize UCB1x00 switches\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++#endif ++ ++ if (misc_register(&switches_misc) < 0) { ++ printk(KERN_ERR "%s: unable to register misc device\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++ ++ printk("Console switches initialized\n"); ++ ++ return 0; ++ ++} ++ ++static void __exit switches_exit(void) ++{ ++ ++#ifdef CONFIG_SWITCHES_SA1100 ++ switches_sa1100_exit(); ++#endif ++ ++#ifdef CONFIG_SWITCHES_UCB1X00 ++ switches_ucb1x00_exit(); ++#endif ++ ++ if (misc_deregister(&switches_misc) < 0) ++ printk(KERN_ERR "%s: unable to deregister misc device\n", ++ SWITCHES_NAME); ++ ++} ++ ++module_init(switches_init); ++module_exit(switches_exit); ++ ++EXPORT_NO_SYMBOLS; +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/switches-sa1100.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,311 @@ ++/* ++ * linux/drivers/misc/switches-sa1100.c ++ * ++ * Copyright (C) 2001 John Dorsey ++ * ++ * 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. ++ * ++ * 19 December 2001 - created from sa1100_switches.c. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#ifdef CONFIG_SA1100_ASSABET ++#include ++#endif ++ ++#ifdef CONFIG_SA1100_SIMPAD ++#include ++#endif ++ ++#include "switches.h" ++ ++ ++static void switches_sa1100_handler(int irq, void *dev_id, ++ struct pt_regs *regs); ++ ++ ++#ifdef CONFIG_SA1100_ASSABET ++ ++/* Assabet ++ * ^^^^^^^ ++ * We have two general-purpose switches, S1 and S2, available via GPIO ++ * on Assabet. This code sets bits in the range [1, 2] in the mask that ++ * we return to userland. ++ */ ++ ++static int assabet_switches_sa1100_init(void) ++{ ++ ++ if (machine_has_neponset()) ++ NCR_0 |= NCR_GP01_OFF; ++ ++ set_irq_type(IRQ_GPIO0, IRQT_BOTHEDGE); ++ set_irq_type(IRQ_GPIO1, IRQT_BOTHEDGE); ++ ++ if (request_irq(IRQ_GPIO0, switches_sa1100_handler, SA_INTERRUPT, ++ SWITCHES_NAME, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to register IRQ for GPIO 0\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++ ++ if (request_irq(IRQ_GPIO1, switches_sa1100_handler, SA_INTERRUPT, ++ SWITCHES_NAME, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to register IRQ for GPIO 1\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++ ++ return 0; ++ ++} ++ ++static void assabet_switches_sa1100_shutdown(void) ++{ ++ ++ free_irq(IRQ_GPIO1, NULL); ++ free_irq(IRQ_GPIO0, NULL); ++ ++} ++ ++static void assabet_switches_sa1100_handler(int irq, switches_mask_t *mask) ++{ ++ unsigned int s, last, this; ++ static unsigned int states = 0; ++ ++ switch (irq) { ++ ++ case IRQ_GPIO0: s = 0; break; ++ ++ case IRQ_GPIO1: s = 1; break; ++ ++ default: return; ++ ++ } ++ ++ last = ((states & (1 << s)) != 0); ++ this = ((GPLR & GPIO_GPIO(s)) != 0); ++ ++ if (last == this) /* debounce */ ++ return; ++ ++ SWITCHES_SET(mask, s + 1, this); ++ ++ states = this ? (states | (1 << s)) : (states & ~(1 << s)); ++ ++} ++#endif /* CONFIG_SA1100_ASSABET */ ++ ++ ++#ifdef CONFIG_SA1100_SPOT ++ ++/* Spot ++ * ^^^^ ++ * Spot (R2, R3) has a single general-purpose switch (S1), which is ++ * also the power-on switch. We set bit [1] in the mask we return to ++ * userland. ++ */ ++ ++static int spot_switches_sa1100_init(void) ++{ ++ ++ set_GPIO_IRQ_edge(GPIO_SW1, GPIO_BOTH_EDGES); ++ ++ if (request_irq(IRQ_GPIO_SW1, switches_sa1100_handler, SA_INTERRUPT, ++ SWITCHES_NAME, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to register IRQ for SW1\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++ ++ return 0; ++ ++} ++ ++static void spot_switches_sa1100_shutdown(void) ++{ ++ ++ free_irq(IRQ_GPIO_SW1, NULL); ++ ++} ++ ++static void spot_switches_sa1100_handler(int irq, switches_mask_t *mask) ++{ ++ unsigned int s, last, this; ++ static unsigned int states = 0; ++ ++ switch (irq) { ++ ++ case IRQ_GPIO_SW1: s = 0; break; ++ ++ default: return; ++ ++ } ++ ++ last = ((states & (1 << s)) != 0); ++ this = ((GPLR & GPIO_GPIO(s)) != 0); ++ ++ if (last == this) /* debounce */ ++ return; ++ ++ SWITCHES_SET(mask, s + 1, this); ++ ++ states = this ? (states | (1 << s)) : (states & ~(1 << s)); ++ ++} ++#endif /* CONFIG_SA1100_SPOT */ ++ ++#ifdef CONFIG_SA1100_SIMPAD ++ ++/* SIMpad ++ * ^^^^ ++ * SIMpad has a single general-purpose switch (S0), which is ++ * also the power-on switch. We set bit [1] in the mask we return to ++ * userland. ++ */ ++ ++static int simpad_switches_sa1100_init(void) ++{ ++ ++ set_GPIO_IRQ_edge(GPIO_GPIO0, GPIO_BOTH_EDGES); ++ ++ if (request_irq(IRQ_GPIO0, switches_sa1100_handler, SA_INTERRUPT, ++ SWITCHES_NAME, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to register IRQ for SW0\n", ++ SWITCHES_NAME); ++ return -EIO; ++ } ++ ++ return 0; ++ ++} ++ ++static void simpad_switches_sa1100_shutdown(void) ++{ ++ ++ free_irq(IRQ_GPIO0, NULL); ++ ++} ++ ++static void simpad_switches_sa1100_handler(int irq, switches_mask_t *mask) ++{ ++ unsigned int s, last, this; ++ static unsigned int states = 0; ++ ++ switch (irq) { ++ ++ case IRQ_GPIO0: s = 0; break; ++ ++ default: return; ++ ++ } ++ ++ last = ((states & (1 << s)) != 0); ++ this = ((GPLR & GPIO_GPIO(s)) != 0); ++ ++ if (last == this) /* debounce */ ++ return; ++ ++ SWITCHES_SET(mask, s + 1, this); ++ ++ states = this ? (states | (1 << s)) : (states & ~(1 << s)); ++ ++} ++#endif /* CONFIG_SA1100_SIMPAD */ ++ ++ ++ ++/* switches_sa1100_handler() ++ * ^^^^^^^^^^^^^^^^^^^^^^^^^ ++ * This routine is a generalized handler for SA-1100 switches ++ * which manages action descriptors and calls a board-specific ++ * service routine. This routine is appropriate for GPIO switches ++ * or other primary interrupt sources, and can be registered as a ++ * first-class IRQ handler using request_irq(). ++ */ ++static void switches_sa1100_handler(int irq, void *dev_id, ++ struct pt_regs *regs) ++{ ++ switches_mask_t mask; ++ ++ SWITCHES_ZERO(&mask); ++ ++ /* Porting note: call a board-specific switch interrupt handler ++ * here. The handler can assume that sufficient storage for ++ * `mask' has been allocated, and that the corresponding ++ * switches_mask_t structure has been zeroed. ++ */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ assabet_switches_sa1100_handler(irq, &mask); ++#endif ++ } else if (machine_is_spot()) { ++#ifdef CONFIG_SA1100_SPOT ++ spot_switches_sa1100_handler(irq, &mask); ++#endif ++ } else if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_switches_sa1100_handler(irq, &mask); ++#endif ++ } ++ ++ switches_event(&mask); ++ ++} ++ ++int __init switches_sa1100_init(void) ++{ ++ ++ /* Porting note: call a board-specific init routine here. */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ if (assabet_switches_sa1100_init() < 0) ++ return -EIO; ++#endif ++ } else if (machine_is_spot()) { ++#ifdef CONFIG_SA1100_SPOT ++ if (spot_switches_sa1100_init() < 0) ++ return -EIO; ++#endif ++ } else if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ if (simpad_switches_sa1100_init() < 0) ++ return -EIO; ++#endif ++ } ++ ++ return 0; ++ ++} ++ ++void __exit switches_sa1100_exit(void) ++{ ++ ++ /* Porting note: call a board-specific shutdown routine here. */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ assabet_switches_sa1100_shutdown(); ++#endif ++ } else if (machine_is_spot()) { ++#ifdef CONFIG_SA1100_SPOT ++ spot_switches_sa1100_shutdown(); ++#endif ++ } else if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_switches_sa1100_shutdown(); ++#endif ++ } ++ ++} +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/switches-ucb1x00.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,331 @@ ++/* ++ * linux/drivers/misc/switches-ucb1x00.c ++ * ++ * Copyright (C) 2001 John Dorsey ++ * ++ * 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. ++ * ++ * 19 December 2001 - created from sa1100_switches.c. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#ifdef CONFIG_SA1100_ASSABET ++#include ++#endif ++ ++#ifdef CONFIG_SA1100_SIMPAD ++#include ++#endif ++ ++#include "switches.h" ++#include "ucb1x00.h" ++ ++ ++static struct ucb1x00 *ucb1x00; ++ ++static void switches_ucb1x00_handler(int irq, void *devid); ++ ++ ++#ifdef CONFIG_SA1100_ASSABET ++ ++/* Assabet ++ * ^^^^^^^ ++ * Six switches are routed to GPIO pins on the UCB1300: S3 -- S8. ++ * This code sets bits in the range [3, 8] in the mask that we ++ * return to userland. Note that we transpose signals SW7 and SW8; ++ * see assabet_switches_ucb1x00_handler(). ++ */ ++ ++static int assabet_switches_ucb1x00_init(void) ++{ ++ int i; ++ ++ /* Note that ucb1x00_init() must complete before this point: */ ++ ++ if ((ucb1x00 = ucb1x00_get()) == NULL) { ++ printk(KERN_ERR "%s: UCB1300 driver not ready; switches " ++ "3 -- 8 will not be available\n", ++ SWITCHES_NAME); ++ return 0; ++ } ++ ++ ucb1x00_enable(ucb1x00); ++ ++ ucb1x00_io_set_dir(ucb1x00, ++ UCB_IO_0 | UCB_IO_1 | UCB_IO_2 | ++ UCB_IO_3 | UCB_IO_4 | UCB_IO_5, 0); ++ ++ for (i = 0; i < 6; ++i) { ++ ++ ucb1x00_enable_irq(ucb1x00, i, UCB_RISING | UCB_FALLING); ++ ++ if (ucb1x00_hook_irq(ucb1x00, i, ++ switches_ucb1x00_handler, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to hook IRQ for " ++ "UCB1300 IO_%d\n", SWITCHES_NAME, i); ++ return -EBUSY; ++ } ++ ++ } ++ ++ return 0; ++ ++} ++ ++static void assabet_switches_ucb1x00_shutdown(void) ++{ ++ int i; ++ ++ for (i = 5; i >= 0; --i) { ++ ++ ucb1x00_disable_irq(ucb1x00, i, UCB_RISING | UCB_FALLING); ++ ++ /* Only error conditions are ENOENT and EINVAL; silently ++ * ignore: ++ */ ++ ucb1x00_free_irq(ucb1x00, i, NULL); ++ ++ } ++ ++} ++ ++static void assabet_switches_ucb1x00_handler(int irq, switches_mask_t *mask) ++{ ++ unsigned int last, this; ++ static unsigned int states = 0; ++ ++ last = ((states & (1 << irq)) != 0); ++ this = ((ucb1x00_io_read(ucb1x00) & (1 << irq)) != 0); ++ ++ if (last == this) /* debounce */ ++ return; ++ ++ /* Intel StrongARM SA-1110 Development Board ++ * Schematics Figure 5, Sheet 5 of 12 ++ * ++ * See switches S8 and S7. Notice their ++ * relationship to signals SW7 and SW8. Hmmm. ++ */ ++ ++ switch (irq) { ++ ++ case 4: ++ ++ SWITCHES_SET(mask, 8, this); ++ break; ++ ++ case 5: ++ ++ SWITCHES_SET(mask, 7, this); ++ break; ++ ++ default: ++ ++ SWITCHES_SET(mask, irq + 3, this); ++ ++ } ++ ++ states = this ? (states | (1 << irq)) : (states & ~(1 << irq)); ++ ++} ++#endif /* CONFIG_SA1100_ASSABET */ ++ ++#ifdef CONFIG_SA1100_SIMPAD ++ ++/* SIMpad ++ * ^^^^^^ ++ * Six switches are routed to GPIO pins on the UCB1300: S3 -- S8. ++ * This code sets bits in the range [3, 8] in the mask that we ++ * return to userland. ++ */ ++ ++static int simpad_switches_ucb1x00_init(void) ++{ ++ int i; ++ ++ /* Note that ucb1x00_init() must complete before this point: */ ++ ++ if ((ucb1x00 = ucb1x00_get()) == NULL) { ++ printk(KERN_ERR "%s: UCB1300 driver not ready; switches " ++ "3 -- 8 will not be available\n", ++ SWITCHES_NAME); ++ return 0; ++ } ++ ++ ucb1x00_enable(ucb1x00); ++ ++ ucb1x00_io_set_dir(ucb1x00, ++ UCB_IO_0 | UCB_IO_1 | UCB_IO_2 | ++ UCB_IO_3 | UCB_IO_4 | UCB_IO_5, ++ UCB_IO_8 | UCB_IO_9); ++ ++ ucb1x00_disable(ucb1x00); ++ ++ for (i = 0; i < 6; ++i) { ++ ++ if (ucb1x00_hook_irq(ucb1x00, i, ++ switches_ucb1x00_handler, NULL) < 0) { ++ printk(KERN_ERR "%s: unable to hook IRQ for " ++ "UCB1300 IO_%d\n", SWITCHES_NAME, i); ++ return -EBUSY; ++ } ++ ++ ucb1x00_enable_irq(ucb1x00, i, UCB_RISING | UCB_FALLING); ++ } ++ ++ return 0; ++ ++} ++ ++int simpad_switches_ucb1x00_reinit(void) ++{ ++ int i; ++ ucb1x00_enable(ucb1x00); ++ ++ ucb1x00_io_set_dir(ucb1x00, ++ UCB_IO_0 | UCB_IO_1 | UCB_IO_2 | ++ UCB_IO_3 | UCB_IO_4 | UCB_IO_5, ++ UCB_IO_8 | UCB_IO_9); ++ ++ ucb1x00_disable(ucb1x00); ++ ++ for (i = 0; i < 6; ++i) ++ ucb1x00_enable_irq(ucb1x00, i, UCB_RISING | UCB_FALLING); ++ ++ return 0; ++} ++ ++static void simpad_switches_ucb1x00_shutdown(void) ++{ ++ int i; ++ ++ for (i = 5; i >= 0; --i) { ++ ++ ucb1x00_disable_irq(ucb1x00, i, UCB_RISING | UCB_FALLING); ++ ++ /* Only error conditions are ENOENT and EINVAL; silently ++ * ignore: ++ */ ++ ucb1x00_free_irq(ucb1x00, i, NULL); ++ ++ } ++ ++} ++ ++static void simpad_switches_ucb1x00_handler(int irq, switches_mask_t *mask) ++{ ++ unsigned int last, this; ++ static unsigned int states = 0; ++ ++ last = ((states & (1 << irq)) != 0); ++ this = ((~ucb1x00_io_read(ucb1x00) & (1 << irq)) != 0); ++ ++ if (last == this) /* debounce */ ++ return; ++ ++ switch (irq) { ++ ++ case 4: ++ ++ ++ ++ case 5: ++ ++ ++ ++ default: ++ ++ SWITCHES_SET(mask, irq + 3, this); ++ ++ } ++ ++ states = this ? (states | (1 << irq)) : (states & ~(1 << irq)); ++ ++} ++#endif /* CONFIG_SA1100_SIMPAD */ ++ ++ ++/* switches_ucb1x00_handler() ++ * ^^^^^^^^^^^^^^^^^^^^^^^^^^ ++ * This routine is a generalized handler for UCB1x00 GPIO switches ++ * which calls a board-specific service routine and passes an event ++ * mask to the core event handler. This routine is appropriate for ++ * systems which use the ucb1x00 framework, and can be registered ++ * using ucb1x00_hook_irq(). ++ */ ++static void switches_ucb1x00_handler(int irq, void *devid) ++{ ++ switches_mask_t mask; ++ ++ SWITCHES_ZERO(&mask); ++ ++ /* Porting note: call a board-specific UCB1x00 switch handler here. ++ * The handler can assume that sufficient storage for `mask' has ++ * been allocated, and that the corresponding switches_mask_t ++ * structure has been zeroed. ++ */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ assabet_switches_ucb1x00_handler(irq, &mask); ++#endif ++ } ++ if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_switches_ucb1x00_handler(irq, &mask); ++#endif ++ } ++ ++ switches_event(&mask); ++ ++} ++ ++int __init switches_ucb1x00_init(void) ++{ ++ ++ /* Porting note: call a board-specific init routine here. */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ if (assabet_switches_ucb1x00_init() < 0) ++ return -EIO; ++#endif ++ } ++ if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ if (simpad_switches_ucb1x00_init() < 0) ++ return -EIO; ++#endif ++ } ++ ++ return 0; ++ ++} ++ ++void __exit switches_ucb1x00_exit(void) ++{ ++ ++ /* Porting note: call a board-specific shutdown routine here. */ ++ ++ if (machine_is_assabet()) { ++#ifdef CONFIG_SA1100_ASSABET ++ assabet_switches_ucb1x00_shutdown(); ++#endif ++ } ++ if (machine_is_simpad()) { ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_switches_ucb1x00_shutdown(); ++#endif ++ } ++ ++} +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/switches.h 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,28 @@ ++/* ++ * linux/drivers/misc/switches.h ++ * ++ * Copyright (C) 2001 John Dorsey ++ * ++ * 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. ++ * ++ * 19 December 2001 - created. ++ */ ++ ++#if !defined(_SWITCHES_H) ++# define _SWITCHES_H ++ ++#include ++ ++#define SWITCHES_NAME "switches" ++ ++extern int switches_event(switches_mask_t *mask); ++ ++extern int switches_sa1100_init(void); ++extern void switches_sa1100_exit(void); ++ ++extern int switches_ucb1x00_init(void); ++extern void switches_ucb1x00_exit(void); ++ ++#endif /* !defined(_SWITCHES_H) */ +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/ucb1x00-assabet.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,114 @@ ++/* ++ * linux/drivers/misc/ucb1x00-assabet.c ++ * ++ * Copyright (C) 2001 Russell King, All Rights Reserved. ++ * ++ * 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. ++ * ++ * We handle the machine-specific bits of the UCB1x00 driver here. ++ */ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "ucb1x00.h" ++ ++static struct proc_dir_entry *dir; ++static struct ucb1x00 *ucb; ++ ++static int ucb1x00_assabet_read_vbatt(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return val; ++} ++ ++static int ucb1x00_assabet_read_vcharger(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD0, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return val; ++} ++ ++static int ucb1x00_assabet_read_batt_temp(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD2, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return val; ++} ++ ++static int ucb_read(char *page, char **start, off_t off, int count, int *eof, void *data) ++{ ++ char *p = page; ++ int (*fn)(struct ucb1x00 *) = data; ++ int v, len; ++ ++ v = fn(ucb); ++ ++ p += sprintf(p, "%d\n", v); ++ ++ len = (p - page) - off; ++ if (len < 0) ++ len = 0; ++ ++ *eof = (len <= count) ? 1 : 0; ++ *start = page + off; ++ ++ return len; ++} ++ ++static int __init ucb1x00_assabet_init(void) ++{ ++ struct proc_dir_entry *res; ++ ++ ucb = ucb1x00_get(); ++ ++ if (!ucb) ++ return -ENODEV; ++ ++ dir = proc_mkdir("ucb1x00", NULL); ++ if (!dir) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("vbatt", S_IRUGO, dir, ucb_read, ucb1x00_assabet_read_vbatt); ++ if (!res) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("vcharger", S_IRUGO, dir, ucb_read, ucb1x00_assabet_read_vcharger); ++ if (!res) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("batt_temp", S_IRUGO, dir, ucb_read, ucb1x00_assabet_read_batt_temp); ++ if (!res) ++ return -ENOMEM; ++ ++ return 0; ++} ++ ++static void __exit ucb1x00_assabet_exit(void) ++{ ++ remove_proc_entry("vbatt", dir); ++ remove_proc_entry("vcharger", dir); ++ remove_proc_entry("batt_temp", dir); ++} ++ ++module_init(ucb1x00_assabet_init); ++module_exit(ucb1x00_assabet_exit); ++ ++MODULE_AUTHOR("Russell King "); ++MODULE_DESCRIPTION("Assabet noddy testing only example ADC driver"); ++MODULE_LICENSE("GPL"); +--- linux-2.4.25/drivers/misc/ucb1x00-audio.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:37.000000000 +0200 ++++ linux-2.4.25/drivers/misc/ucb1x00-audio.c 2004-05-02 22:48:00.000000000 +0200 +@@ -283,7 +283,7 @@ + { + struct ucb1x00_audio *ucba; + +- ucba = kmalloc(sizeof(*ucba), GFP_KERNEL); ++ ucba = kmalloc(sizeof(*ucba), GFP_ATOMIC); + if (ucba) { + memset(ucba, 0, sizeof(*ucba)); + +--- linux-2.4.25/drivers/misc/ucb1x00-core.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/misc/ucb1x00-core.c 2004-05-02 22:45:42.000000000 +0200 +@@ -215,6 +215,9 @@ + ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr); + ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0); + ucb1x00_disable(ucb); ++#ifdef CONFIG_SA1100_SIMPAD ++ simpad_switches_ucb1x00_reinit(); ++#endif + } + + return 0; +@@ -561,8 +564,10 @@ + default_irq = IRQ_GPIO_UCB1300_IRQ; + #endif + #ifdef CONFIG_SA1100_SIMPAD +- if (machine_is_simpad()) ++ if (machine_is_simpad()) { + default_irq = IRQ_GPIO_UCB1300_IRQ; ++ irq_gpio_pin = GPIO_UCB1300_IRQ; ++ } + #endif + #ifdef CONFIG_SA1100_SIMPUTER + if (machine_is_simputer()) { +@@ -660,7 +665,7 @@ + if (id == UCB_ID_1400 && mcp_reg_read(mcp, 0x00) == 0x002a) + id = UCB_ID_1400_BUGGY; + +- my_ucb = kmalloc(sizeof(struct ucb1x00), GFP_KERNEL); ++ my_ucb = kmalloc(sizeof(struct ucb1x00), GFP_ATOMIC); + ret = -ENOMEM; + if (!my_ucb) + goto out; +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/misc/ucb1x00-simpad.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,241 @@ ++/* ++ * linux/drivers/misc/ucb1x00-simpad.c ++ * ++ * Modified by Juergen Messerer for SIMpad ++ * Copyright (C) 2001 Russell King, All Rights Reserved. ++ * ++ * 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. ++ * ++ * We handle the machine-specific bits of the UCB1x00 driver here. ++ */ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++#include "ucb1x00.h" ++ ++/* ++ * Conversion from AD -> mV ++ * 7.5V = 1023 7.3313mV/Digit ++ * ++ * 400 Units == 9.7V ++ * a = ADC value ++ * 21 = ADC error ++ * 12600 = Divident to get 2*7.3242 ++ * 860 = Divider to get 2*7.3242 ++ * 170 = Voltagedrop over ++ */ ++#define CALIBRATE_BATTERY(a) ((((a + 21)*12600)/860) + 170) ++ ++/* ++ * We have two types of batteries a small and a large one ++ * To get the right value we to distinguish between those two ++ * 450 Units == 15 V ++ */ ++#ifdef SMALL_BATTERY ++#define CALIBRATE_SUPPLY(a) (((a) * 1500) / 51) ++#define MIN_SUPPLY 8500 /* Less then 8.5V means no powersupply */ ++#else ++#define CALIBRATE_SUPPLY(a) (((a) * 1500) / 45) ++//#define MIN_SUPPLY 14000 /* Less then 14V means no powersupply */ ++#define MIN_SUPPLY 12000 /* Less then 12V means no powersupply */ ++#endif ++ ++/* ++ * Charging Current ++ * if value is >= 50 then charging is on ++ */ ++#define CALIBRATE_CHARGING(a) (((a)* 1000)/(152/4))) ++//#define CHARGING_LED_LEVEL 50 ++ ++#ifdef CONFIG_SA1100_SIMPAD_SINUSPAD ++ ++#define CHARGING_LED_LEVEL 12 ++#define CHARGING_MAX_LEVEL 120 ++#define BATT_FULL 8100 ++#define BATT_LOW 7300 ++#define BATT_CRITICAL 6700 ++#define BATT_EMPTY 6400 ++ ++ ++#else // CONFIG_SA1100_SIMPAD_SINUSPAD ++ ++#define CHARGING_LED_LEVEL 28 ++#define CHARGING_MAX_LEVEL 265 ++#define BATT_FULL 8300 ++#define BATT_LOW 7400 ++#define BATT_CRITICAL 6800 ++#define BATT_EMPTY 6500 ++ ++#endif // CONFIG_SA1100_SIMPAD_SINUSPAD ++ ++ ++static struct proc_dir_entry *dir; ++static struct ucb1x00 *ucb; ++ ++static int ucb1x00_simpad_read_vbatt(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return CALIBRATE_BATTERY(val); ++} ++ ++static int ucb1x00_simpad_read_vcharger(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD2, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return CALIBRATE_SUPPLY(val); ++} ++ ++static int ucb1x00_simpad_read_icharger(struct ucb1x00 *ucb) ++{ ++ int val; ++ ucb1x00_adc_enable(ucb); ++ val = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD3, UCB_NOSYNC); ++ ucb1x00_adc_disable(ucb); ++ ++ return val; ++} ++ ++static int ucb_read(char *page, char **start, off_t off, int count, int *eof, void *data) ++{ ++ char *p = page; ++ int (*fn)(struct ucb1x00 *) = data; ++ int v, len; ++ ++ v = fn(ucb); ++ ++ p += sprintf(p, "%d\n", v); ++ ++ len = (p - page) - off; ++ if (len < 0) ++ len = 0; ++ ++ *eof = (len <= count) ? 1 : 0; ++ *start = page + off; ++ ++ return len; ++} ++ ++/****************************************************************************/ ++/* Functions exported for use by the kernel and kernel modules */ ++/****************************************************************************/ ++ ++int simpad_get_battery(struct simpad_battery *bstat) ++{ ++ int icharger, vcharger, vbatt; ++ ++ if ( ucb ) { ++ icharger = ucb1x00_simpad_read_icharger( ucb ); ++ vcharger = ucb1x00_simpad_read_vcharger( ucb ); ++ vbatt = ucb1x00_simpad_read_vbatt( ucb ); ++ } else { ++ bstat->ac_status = SIMPAD_AC_STATUS_AC_UNKNOWN; ++ bstat->status = SIMPAD_BATT_STATUS_UNKNOWN; ++ bstat->percentage = 0x64; /* lets say 100% */ ++ bstat->life = 360; /* lets say a long time */ ++ return 0; ++ } ++ ++ /* AC status */ ++ bstat->ac_status = SIMPAD_AC_STATUS_AC_OFFLINE; ++ if ( vcharger>MIN_SUPPLY ) { ++ bstat->ac_status = SIMPAD_AC_STATUS_AC_ONLINE; ++ } ++ ++ /* charging */ ++ bstat->status = 0x0; ++ if ( icharger > CHARGING_LED_LEVEL ) { ++ bstat->status = SIMPAD_BATT_STATUS_CHARGING; ++ } ++ ++ if ( vbatt > BATT_LOW ) ++ bstat->status |= SIMPAD_BATT_STATUS_HIGH; ++ else if ( vbatt < BATT_CRITICAL ) ++ bstat->status |= SIMPAD_BATT_STATUS_CRITICAL; ++ else ++ bstat->status |= SIMPAD_BATT_STATUS_LOW; ++ ++ if (bstat->status & SIMPAD_BATT_STATUS_CHARGING) { ++ if (icharger > CHARGING_MAX_LEVEL) icharger = CHARGING_MAX_LEVEL; ++ if (icharger < CHARGING_LED_LEVEL) icharger = CHARGING_LED_LEVEL; ++ bstat->percentage = 100 - 100 * (icharger - CHARGING_LED_LEVEL) / ++ (CHARGING_MAX_LEVEL - CHARGING_LED_LEVEL); ++ } else { ++ if (vbatt > BATT_FULL) vbatt = BATT_FULL; ++ if (vbatt < BATT_EMPTY) vbatt = BATT_EMPTY; ++ bstat->percentage = 100 * (vbatt - BATT_EMPTY) / (BATT_FULL - BATT_EMPTY); ++ } ++ ++ /* let's assume: full load is 7h */ ++ /* bstat->life = 420*bstat->percentage/100; */ ++ bstat->life = 0; ++ ++#if 0 ++ printk("get_battery: ac: %02x / ch: %02x / perc: %02x / life: %d\n", ++ bstat->ac_status, bstat->status, ++ bstat->percentage, bstat->life ); ++#endif ++ ++ return 0; ++} ++ ++EXPORT_SYMBOL(simpad_get_battery); ++ ++/****************************************************************************/ ++/* sample proc interface */ ++/****************************************************************************/ ++static int __init ucb1x00_simpad_init(void) ++{ ++ struct proc_dir_entry *res; ++ ++ ucb = ucb1x00_get(); ++ ++ if (!ucb) ++ return -ENODEV; ++ ++ dir = proc_mkdir("ucb1x00", NULL); ++ if (!dir) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("vbatt", S_IRUGO, dir, ucb_read, ucb1x00_simpad_read_vbatt); ++ if (!res) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("vcharger", S_IRUGO, dir, ucb_read, ucb1x00_simpad_read_vcharger); ++ if (!res) ++ return -ENOMEM; ++ ++ res = create_proc_read_entry("icharger", S_IRUGO, dir, ucb_read, ucb1x00_simpad_read_icharger); ++ if (!res) ++ return -ENOMEM; ++ ++ return 0; ++} ++ ++static void __exit ucb1x00_simpad_exit(void) ++{ ++ remove_proc_entry("vbatt", dir); ++ remove_proc_entry("vcharger", dir); ++ remove_proc_entry("icharger", dir); ++} ++ ++module_init(ucb1x00_simpad_init); ++module_exit(ucb1x00_simpad_exit); ++ ++MODULE_AUTHOR("Juergen Messerer "); ++MODULE_DESCRIPTION("SIMpad noddy testing only example ADC driver"); ++MODULE_LICENSE("GPL"); +--- linux-2.4.25/drivers/misc/ucb1x00-ts.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/misc/ucb1x00-ts.c 2004-05-02 22:45:42.000000000 +0200 +@@ -356,7 +356,7 @@ + UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); + +- udelay(55); ++ udelay(250); /*former 55*/ + + return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync); + } +@@ -379,7 +379,7 @@ + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | + UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); + +- udelay(55); ++ udelay(250); /*former 55*/ + + return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPX, ts->adcsync); + } +--- linux-2.4.25/drivers/mtd/Config.in~2.4.25-vrs2-pxa1-jpm1.patch 2003-06-13 16:51:34.000000000 +0200 ++++ linux-2.4.25/drivers/mtd/Config.in 2004-05-02 22:45:42.000000000 +0200 +@@ -11,6 +11,9 @@ + if [ "$CONFIG_MTD_DEBUG" = "y" ]; then + int ' Debugging verbosity (0 = quiet, 3 = noisy)' CONFIG_MTD_DEBUG_VERBOSE 0 + fi ++ if [ "$CONFIG_CRAMFS" = "y" ]; then ++ bool ' Cramfs root partition' CONFIG_ROOT_CRAMFS ++ fi + dep_tristate ' MTD partitioning support' CONFIG_MTD_PARTITIONS $CONFIG_MTD + dep_tristate ' MTD concatenating support' CONFIG_MTD_CONCAT $CONFIG_MTD + dep_tristate ' RedBoot partition table parsing' CONFIG_MTD_REDBOOT_PARTS $CONFIG_MTD_PARTITIONS +--- linux-2.4.25/drivers/mtd/maps/sa1100-flash.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:37.000000000 +0200 ++++ linux-2.4.25/drivers/mtd/maps/sa1100-flash.c 2004-05-02 22:45:42.000000000 +0200 +@@ -767,40 +767,38 @@ + #endif + + #ifdef CONFIG_SA1100_SIMPAD +-#define SIMPAD_FLASH_SIZE 0x02000000 +-static struct mtd_partition simpad_partitions[] = { +- { +- name: "SIMpad boot firmware", +- size: 0x00080000, +- offset: 0, +- mask_flags: MTD_WRITEABLE, /* force read-only */ +- }, { +- name: "SIMpad kernel", +- size: 0x00100000, +- offset: 0x00080000, +- }, { +-#ifdef CONFIG_JFFS2_FS +- name: "SIMpad root jffs2", +- size: MTDPART_SIZ_FULL, +- offset: 0x00180000, ++ ++#ifdef CONFIG_SA1100_SIMPAD_SINUSPAD ++#define SIMPAD_FLASH_SIZE 0x01000000 + #else +- name: "SIMpad initrd", +- size: 0x00300000, +- offset: 0x00180000, +- }, { +- name: "SIMpad root cramfs", +- size: 0x00300000, +- offset: 0x00480000, +- }, { +- name: "SIMpad usr cramfs", +- size: 0x005c0000, +- offset: 0x00780000, +- }, { +- name: "SIMpad usr local", +- size: MTDPART_SIZ_FULL, +- offset: 0x00d40000, ++#define SIMPAD_FLASH_SIZE 0x02000000 + #endif +- } ++ ++static struct mtd_partition simpad_partitions[] = { ++ { ++ name: "SIMpad boot firmware", ++ offset: 0, ++ size: 0x00080000, ++ mask_flags: MTD_WRITEABLE /* force read-only */ ++ },{ ++ name: "SIMpad kernel", ++ offset: MTDPART_OFS_APPEND, ++ size: 0x00100000 ++ },{ ++#ifdef CONFIG_ROOT_CRAMFS ++ name: "SIMpad root cramfs", ++ offset: MTDPART_OFS_APPEND, ++ size: 0x00D80000 ++ },{ ++ name: "SIMpad local jffs", ++ offset: MTDPART_OFS_APPEND, ++ size: MTDPART_SIZ_FULL ++#else ++ name: "SIMpad root jffs2", ++ offset: MTDPART_OFS_APPEND, ++ size: MTDPART_SIZ_FULL ++#endif /* CONFIG_CRAM_FS */ ++ } + }; + #endif /* CONFIG_SA1100_SIMPAD */ + +--- linux-2.4.25/drivers/pcmcia/sa1100_simpad.c~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:37.000000000 +0200 ++++ linux-2.4.25/drivers/pcmcia/sa1100_simpad.c 2004-05-02 22:45:42.000000000 +0200 +@@ -9,20 +9,18 @@ + + #include + #include ++#include ++ + #include "sa1100_generic.h" +- ++ + extern long get_cs3_shadow(void); +-extern void set_cs3_bit(int value); ++extern void set_cs3_bit(int value); + extern void clear_cs3_bit(int value); + + + static int simpad_pcmcia_init(struct pcmcia_init *init){ + int irq, res; + +- set_cs3_bit(PCMCIA_RESET); +- clear_cs3_bit(PCMCIA_BUFF_DIS); +- clear_cs3_bit(PCMCIA_RESET); +- + clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); + + /* Set transition detect */ +@@ -63,6 +61,9 @@ + + if(state_array->size<2) return -1; + ++ memset(state_array->state, 0, ++ (state_array->size)*sizeof(struct pcmcia_state)); ++ + levels=GPLR; + + state_array->state[1].detect=((levels & GPIO_CF_CD)==0)?1:0; +@@ -100,13 +101,15 @@ + static int simpad_pcmcia_configure_socket(const struct pcmcia_configure + *configure) + { +- unsigned long value, flags; ++ static int irq_disabled = 0; + +- if(configure->sock>1) return -1; ++ if(configure->sock>1) ++ return -1; + +- if(configure->sock==0) return 0; ++ if(configure->sock==0) ++ return 0; + +- save_flags_cli(flags); ++ //local_irq_save(flags); + + /* Murphy: see table of MIC2562a-1 */ + +@@ -116,8 +119,8 @@ + break; + + case 33: +- clear_cs3_bit(VCC_3V_EN|EN0); +- set_cs3_bit(VCC_5V_EN|EN1); ++ clear_cs3_bit(VCC_3V_EN|EN1); ++ set_cs3_bit(VCC_5V_EN|EN0); + break; + + case 50: +@@ -129,26 +132,50 @@ + printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__, + configure->vcc); + clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); +- restore_flags(flags); ++ //restore_flags(flags); + return -1; + } + +- /* Silently ignore Vpp, output enable, speaker enable. */ ++ if(configure->reset) ++ set_cs3_bit(PCMCIA_RESET); ++ else ++ clear_cs3_bit(PCMCIA_RESET); ++ ++ if(configure->output) ++ clear_cs3_bit(PCMCIA_BUFF_DIS); ++ else ++ set_cs3_bit(PCMCIA_BUFF_DIS); + +- restore_flags(flags); ++ if(configure->irq) { ++ enable_irq(IRQ_GPIO_CF_IRQ); ++ irq_disabled = 0; ++ } ++ else { ++ if (!irq_disabled) { ++ disable_irq(IRQ_GPIO_CF_IRQ); ++ irq_disabled = 1; ++ } ++ } ++ ++ //local_irq_restore(flags); + + return 0; + } + + static int simpad_pcmcia_socket_init(int sock) + { +- set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_BOTH_EDGES); ++ if(sock == 1) ++ set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_BOTH_EDGES); + return 0; + } + + static int simpad_pcmcia_socket_suspend(int sock) + { +- set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_NO_EDGES); ++ if(sock == 1) ++ { ++ set_GPIO_IRQ_edge(GPIO_CF_CD, GPIO_NO_EDGES); ++ set_cs3_bit(PCMCIA_RESET); ++ } + return 0; + } + +--- linux-2.4.25/drivers/video/Config.in~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/video/Config.in 2004-05-02 22:45:42.000000000 +0200 +@@ -61,6 +61,10 @@ + fi + fi + dep_tristate ' CyberPro 2000/2010/5000 support' CONFIG_FB_CYBER2000 $CONFIG_PCI ++ if [ "$CONFIG_SA1100_SIMPAD" = "y" -o \ ++ "$CONFIGG_SA1100_GDS2200" = "y" ]; then ++ bool ' MQ200 VGA support' CONFIG_FB_MQ200 ++ fi + if [ "$CONFIG_APOLLO" = "y" ]; then + define_bool CONFIG_FB_APOLLO y + fi +--- linux-2.4.25/drivers/video/Makefile~2.4.25-vrs2-pxa1-jpm1.patch 2004-05-02 22:45:40.000000000 +0200 ++++ linux-2.4.25/drivers/video/Makefile 2004-05-02 22:45:42.000000000 +0200 +@@ -141,6 +141,7 @@ + obj-$(CONFIG_FB_PVR2) += pvr2fb.o + obj-$(CONFIG_FB_VOODOO1) += sstfb.o + obj-$(CONFIG_FB_ANAKIN) += anakinfb.o ++obj-$(CONFIG_FB_MQ200) += mq200fb.o + + # Generic Low Level Drivers + +--- /dev/null 2003-09-23 19:59:22.000000000 +0200 ++++ linux-2.4.25/drivers/video/mq200fb.c 2004-05-02 22:45:42.000000000 +0200 +@@ -0,0 +1,1963 @@ ++/* MQ200 console frame buffer driver---mq200fb.c ++ * ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file COPYING in the main directory of this archive for ++ * more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include /* all the /proc functions */ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include