diff -ruN linux-2.4.26-vrs1/Documentation/Configure.help linux-2.4.26-vrs1-kvd1/Documentation/Configure.help --- linux-2.4.26-vrs1/Documentation/Configure.help Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/Documentation/Configure.help Fri Jul 2 16:22:36 2004 @@ -325,24 +325,25 @@ If you say Y here, the LEDs on your machine will be used to provide useful information about your current system status. - If you are compiling a kernel for a NetWinder or EBSA-285, you will - be able to select which LEDs are active using the options below. If - you are compiling a kernel for the EBSA-110 or the LART however, the - red LED will simply flash regularly to indicate that the system is - still functional. It is safe to say Y here if you have a CATS - system, but the driver will do nothing. + If you are compiling a kernel for a NetWinder, EBSA-285 or Psion + netBook/Series 7, you will be able to select which LEDs are active + using the options below. If you are compiling a kernel for the + EBSA-110 or the LART however, the red LED will simply flash + regularly to indicate that the system is still functional. It is + safe to say Y here if you have a CATS system, but the driver will + do nothing. Timer LED CONFIG_LEDS_TIMER If you say Y here, one of the system LEDs (the green one on the - NetWinder, the amber one on the EBSA285, or the red one on the LART) - will flash regularly to indicate that the system is still - operational. This is mainly useful to kernel hackers who are - debugging unstable kernels. - - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. + NetWinder, the amber one on the EBSA285, or the red one on the LART + and Psion netBook/Series 7) will flash regularly to indicate that the + system is still operational. This is mainly useful to kernel hackers + who are debugging unstable kernels. + + The LART and Psion netBook/Series 7 use the same LED for both Timer + and CPU usage LED functions. You may choose to use both, but the + Timer LED function will overrule the CPU usage LED. CPU usage LED CONFIG_LEDS_CPU @@ -350,9 +351,9 @@ time indication of CPU usage, by lighting whenever the idle task is not currently executing. - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. + The LART and Psion netBook/Series 7 use the same LED for both Timer + and CPU usage LED functions. You may choose to use both, but the + Timer LED function will overrule the CPU usage LED. Kernel FP software completion CONFIG_MATHEMU @@ -25676,6 +25677,36 @@ CONFIG_SA1100_BRUTUS Say Y here if you are using the Intel(R) StrongARM(R) SA-1100 Microprocessor Development Board (also known as the Brutus). + +Psion Netbook/Series 7 +CONFIG_SA1100_PSION_SERIES7 + Say Y here if you are using the Psion Netbook and/or Series 7. + See , and + for more information on + running Linux on these machines. + +# Choice: Netbook_series7_ram +Netbook/Series 7 available RAM +CONFIG_SA1100_NETBOOK_SERIES7_RAM_DEF + Options here are: + - default: use default random-access memory size (16MB); + if the bootloader provides memory layout information, + that will be used instead. + - fixed random-access memory layout (32 or 64 MB) + This will force any information from the bootloader + regarding memory layout to be ignored. + +Netbook/Series 7 with 32MB RAM +CONFIG_SA1100_NETBOOK_SERIES7_RAM_32MB + Declare that the Netbook/Series 7 has 32MB RAM. + This will force any information from the bootloader + regarding memory layout to be ignored. + +Netbook/Series 7 with 64MB RAM +CONFIG_SA1100_NETBOOK_SERIES7_RAM_64MB + Declare that the Netbook/Series 7 has 64MB RAM. + This will force any information from the bootloader + regarding memory layout to be ignored. LART CONFIG_SA1100_LART diff -ruN linux-2.4.26-vrs1/Documentation/arm/SA1100/Netbook_Series7 linux-2.4.26-vrs1-kvd1/Documentation/arm/SA1100/Netbook_Series7 --- linux-2.4.26-vrs1/Documentation/arm/SA1100/Netbook_Series7 Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/Documentation/arm/SA1100/Netbook_Series7 Fri Jul 2 21:43:23 2004 @@ -0,0 +1,134 @@ +Psion Netbook and Series 7 +========================== + +Status +------ + +* working: +- serial +- keyboard +- lcd (when booting through arlo) +- red LED (green/amber LED is hardware controlled) +- rtc (with an offset) +- cf card (not tested with bookboot yet) +- pcmcia card (not tested with bookboot yet) +- brightness and contrast (either from /proc/netbook/(contrast|brightness) + or use the controls on the keyboard (fn+space cycles brightness)). + +* doesn't work yet: +- touchscreen (being worked on) + +* known issues: +- the lcd only works when booting via arlo +- values of TEXTADDR other than 0xc0008000 appear not to work + hint: the kernel fails near flush_tlb_all and paging_init +- only compressed (zImage) kernels will work with arlo + this is directly related to the above problem with TEXTADDR + and the fact that arlo assumes 0xc0208000. (the decompression + code automatically resolves this inconsistency). +- the location of the bootparameters is weird, and purely based on + compatibility with arlo v1.0.2. Very large kernels (near 2MB + or larger) will cause problems. +- PCMCIA interrupts are not handled properly yet (but they work for + some, YMMV) +- if you define NETBOOK_PROC_DEBUG in + arch/arm/mach-sa1100/netbook_series7_proc.c, + there's /proc/netbook which has several registers that can be + read or written to +- it hasn't been tested whether /proc/netbook/flash is a valid dump. + +Intro: +------ + +The Netbook and Series 7 are SA1100-based machines produced by Psion Ltd. +(www.psion.com). + +Three different variants are known to exist: +1. the standard netbook +2. the 'malaybook', a version of the netbook produced for a discontinued + Malaysian school project. +3. the Series 7. + +The known differences between these models appear to be located +in a small removable expansion board, called a 'personality module'. +Exchanging the expansion boards makes the Series 7 act much like a Netbook +and vice versa. + +The Netbook is designed to boot its operating system from compact flash card +[from a file called 'os.img' located on the first (FAT) partition of the CF +card], while the Series 7 boots EPOC32 from ROM. It appears +that the bootloader of the Malaybook is slightly different from the bootloader +in the standard netbook. As a result, the os.img files can not be directly +interchanged. + +The standard netbook and malaybook come with 32MB of RAM. +The basic Series 7 comes with 16MB RAM, and a similar amount of ROM, containing +the EPOC32 operating system, on the personality module. Expansion modules +(which will work with all three variants) with an additional 32MB are +commercially available. + +Linux should run just fine on these machines (if only we had the docs...). +More information is available from the website http://linux-7110.sf.net, +and the mailing list linux-7110-psion@lists.sourceforge.net + +Compiling: +---------- + +- if you are cross-compiling, first make sure the toplevel Makefile is properly + setup for this; i.e., make sure the ARCH and CROSS_COMPILE lines read: + ARCH := arm + CROSS_COMPILE = arm-linux- +- next, do: + make netbook_series7_config + make oldconfig # or: make menuconfig + make dep + make zImage + +Booting: +-------- + +Two cases can be distinguished: +1. booting Linux via EPOC32 (for the Series 7 this is the only option) +2. booting Linux directly from an os.img file + +To boot linux on via EPOC32 a bootloader called Arlo is available. +It contains a second-stage bootloader called boot2nd. Both were +developed by Peter van Sebille. See linux-7110.sf.net and www.yipton.net +Note that among other things EPOC32 enables the built-in watchdog of the +SA-1100 CPU, and this can not be disabled subsequently. + +To boot Linux directly from compact flash card you will need an os.img file. +A package called 'bookboot' exists that will produce an os.img file from the +necessary input (zImage, initrd, etc). Note that there are differences in the +format of the os.img file depending on whether you have the standard netbook +or the malaybook. At present, only the malaybook is known to work. +Bookboot should be available from linux-7110.sf.net. + +Developer's info: +----------------- + +Documentation on the StrongARM SA-1100 processor +(the basis of the Netbook), including GPIOs, serial ports etc can be found +in the SA-1100 Microprocessor Developer's Manual, available from the +LART website: +http://www.lart.tudelft.nl/doc.php3 + +Extensive information on the ARM architecture is also available from ARM +Ltd (fill in a web form, and they'll mail you a cd full of pdf +documentation). +http://www.arm.com/documentation/cd_request.html + +History: +-------- + +- Peter van Sebille made the initial port to linux-2.4.2-rmk1 + He got the serial port, lcd, keyboard and watchdog working. +- based on Peter's work, Quentin Gunn and Klaasjan van Druten moved over to + linux-2.4.19-rmk7 and 2.4.21-rmk2 +- Brian Dushaw improved keyboard support by adding the menu, fn, on/off + and external keys +- Matthew Lewis added red LED support. +- Taneli Leppa added CompactFlash, PCMCIA, /proc, brightness + and contrast support. + +- Last update: July 2, 2004, by Klaasjan van Druten diff -ruN linux-2.4.26-vrs1/Makefile linux-2.4.26-vrs1-kvd1/Makefile --- linux-2.4.26-vrs1/Makefile Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/Makefile Fri Jul 2 21:36:39 2004 @@ -1,11 +1,11 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 26 -EXTRAVERSION =-vrs1 +EXTRAVERSION =-vrs1-kvd1 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +ARCH := arm KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g") CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -19,7 +19,7 @@ HOSTCC = gcc HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -CROSS_COMPILE = +CROSS_COMPILE = arm-linux- # # Include the make variables (CC, etc...) @@ -421,7 +421,7 @@ endif .PHONY: _modinst_post _modinst_post: _modinst_post_pcmcia - if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE) || /bin/true; fi # Backwards compatibilty symlinks for people still using old versions # of pcmcia-cs with hard coded pathnames on insmod. Remove diff -ruN linux-2.4.26-vrs1/arch/arm/config.in linux-2.4.26-vrs1-kvd1/arch/arm/config.in --- linux-2.4.26-vrs1/arch/arm/config.in Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/arch/arm/config.in Fri Jul 2 16:22:36 2004 @@ -79,6 +79,13 @@ dep_bool ' ADS Bitsy' CONFIG_SA1100_ADSBITSY $CONFIG_ARCH_SA1100 dep_bool ' ADS Bitsy Plus' CONFIG_SA1100_ADSBITSYPLUS $CONFIG_ARCH_SA1100 dep_bool ' Brutus' CONFIG_SA1100_BRUTUS $CONFIG_ARCH_SA1100 +dep_bool ' Psion Series 7 and Netbook' CONFIG_SA1100_PSION_SERIES7 $CONFIG_ARCH_SA1100 +if [ "$CONFIG_SA1100_PSION_SERIES7" = "y" ]; then + choice 'Psion Netbook/Series 7 RAM available' \ + "default CONFIG_SA1100_NETBOOK_SERIES7_RAM_DEF \ + 32MB CONFIG_SA1100_NETBOOK_SERIES7_RAM_32MB \ + 64MB CONFIG_SA1100_NETBOOK_SERIES7_RAM_64MB" default +fi dep_bool ' Cep' CONFIG_SA1100_CEP $CONFIG_ARCH_SA1100 dep_bool ' CerfBoard' CONFIG_SA1100_CERF $CONFIG_ARCH_SA1100 if [ "$CONFIG_SA1100_CERF" = "y" ]; then diff -ruN linux-2.4.26-vrs1/arch/arm/def-configs/netbook_series7 linux-2.4.26-vrs1-kvd1/arch/arm/def-configs/netbook_series7 --- linux-2.4.26-vrs1/arch/arm/def-configs/netbook_series7 Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/arch/arm/def-configs/netbook_series7 Fri Jul 2 17:15:17 2004 @@ -0,0 +1,870 @@ +# +# 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 is not set + +# +# 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_AT91RM9200 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_PSION_SERIES7=y +# CONFIG_SA1100_NETBOOK_SERIES7_RAM_DEF is not set +CONFIG_SA1100_NETBOOK_SERIES7_RAM_32MB=y +# CONFIG_SA1100_NETBOOK_SERIES7_RAM_64MB 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 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 is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 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_PLD 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_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 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 is not set +CONFIG_FPE_FASTFPE=y +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="keepinitrd" +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 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_CISS_MONITOR_THREAD 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=16384 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_STATS 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 is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP 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 is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_ARM_AM79C961A is not set +# CONFIG_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_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_AC3200 is not set +# CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_CS89x0 is not set +# CONFIG_TULIP is not set +# CONFIG_DM9102 is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 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_FORCEDETH 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_OLD_RX_RESET is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNDANCE_MMIO 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_E1000 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_R8169 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=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +# CONFIG_PPPOE is not set +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# PCMCIA network device support +# +CONFIG_NET_PCMCIA=y +# CONFIG_PCMCIA_3C589 is not set +# CONFIG_PCMCIA_3C574 is not set +# CONFIG_PCMCIA_FMVJ18X is not set +CONFIG_PCMCIA_PCNET=m +# CONFIG_PCMCIA_AXNET is not set +# CONFIG_PCMCIA_NMCLAN is not set +# CONFIG_PCMCIA_SMC91C92 is not set +# CONFIG_PCMCIA_XIRC2PS is not set +# CONFIG_ARCNET_COM20020_CS is not set +# CONFIG_PCMCIA_IBMTR is not set +# CONFIG_NET_PCMCIA_RADIO is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +CONFIG_IRDA=y +# CONFIG_IRLAN is not set +# CONFIG_IRNET is not set +CONFIG_IRCOMM=y +# 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=y +CONFIG_IRPORT_SIR=y +# 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_OLD 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_VIA_IRCC_FIR is not set +CONFIG_SA1100_FIR=y + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y +# CONFIG_BLK_DEV_HD_IDE is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_IDEDISK_STROKE 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_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set +# CONFIG_BLK_DEV_ATARAID_SII 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 is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_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_AT91 is not set +# CONFIG_SERIAL_AT91_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_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +CONFIG_RTC=y +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 + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=m +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +CONFIG_TMPFS=y +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_NFS_FS is not set +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +# CONFIG_SUNRPC is not set +# CONFIG_LOCKD is not set +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Console drivers +# +CONFIG_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=y +# CONFIG_FB_DBMX1 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_FBCON_ADVANCED=y +# CONFIG_FBCON_MFB is not set +CONFIG_FBCON_CFB2=y +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=y +CONFIG_FBCON_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Support for USB gadgets +# +# CONFIG_USB_GADGET is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_INFO=y +# CONFIG_NO_PGT_CACHE is not set +CONFIG_DEBUG_KERNEL=y +# 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=y +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +# CONFIG_FW_LOADER is not set diff -ruN linux-2.4.26-vrs1/arch/arm/kernel/irq.c linux-2.4.26-vrs1-kvd1/arch/arm/kernel/irq.c --- linux-2.4.26-vrs1/arch/arm/kernel/irq.c Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/arch/arm/kernel/irq.c Fri Jul 2 16:22:36 2004 @@ -80,6 +80,9 @@ struct irqdesc *desc = irq_desc + irq; unsigned long flags; + if (!desc) + return; + spin_lock_irqsave(&irq_controller_lock, flags); if (!desc->disable_depth++) { #ifndef CONFIG_CPU_SA1100 @@ -103,6 +106,9 @@ { struct irqdesc *desc = irq_desc + irq; unsigned long flags; + + if (!desc) + return; spin_lock_irqsave(&irq_controller_lock, flags); if (!desc->disable_depth) { diff -ruN linux-2.4.26-vrs1/arch/arm/kernel/time.c linux-2.4.26-vrs1-kvd1/arch/arm/kernel/time.c --- linux-2.4.26-vrs1/arch/arm/kernel/time.c Mon Aug 25 13:44:39 2003 +++ linux-2.4.26-vrs1-kvd1/arch/arm/kernel/time.c Fri Jul 2 16:22:36 2004 @@ -201,9 +201,17 @@ write_unlock_irq(&xtime_lock); } +#ifdef CONFIG_SA1100_PSION_SERIES7 +static char *netbook_timer_dev_id = "netbook_timer"; +#endif + static struct irqaction timer_irq = { .name = "timer", +#ifndef CONFIG_SA1100_PSION_SERIES7 .flags = SA_INTERRUPT, +#else + .flags = SA_SHIRQ, +#endif }; /* @@ -221,6 +229,8 @@ { xtime.tv_usec = 0; xtime.tv_sec = 0; - +#ifdef CONFIG_SA1100_PSION_SERIES7 + timer_irq.dev_id = (void *)netbook_timer_dev_id; +#endif setup_timer(); } diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/Makefile linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/Makefile --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/Makefile Mon Aug 25 13:44:39 2003 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/Makefile Fri Jul 2 16:22:36 2004 @@ -78,6 +78,7 @@ obj-$(CONFIG_SA1100_VICTOR) += victor.o obj-$(CONFIG_SA1100_XP860) += xp860.o obj-$(CONFIG_SA1100_YOPY) += yopy.o +obj-$(CONFIG_SA1100_PSION_SERIES7) += netbook_series7.o netbook_series7_proc.o # LEDs support leds-y := leds.o @@ -97,6 +98,7 @@ leds-$(CONFIG_SA1100_PFS168) += leds-pfs168.o leds-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o leds-$(CONFIG_SA1100_PT_SYSTEM3) += leds-system3.o +leds-$(CONFIG_SA1100_PSION_SERIES7) += leds-series7.o obj-$(CONFIG_LEDS) += $(leds-y) # SA1110 USB client support diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds-series7.c linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds-series7.c --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds-series7.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds-series7.c Fri Jul 2 16:22:36 2004 @@ -0,0 +1,165 @@ +/* + * linux/arch/arm/mach-sa1100/leds-series7.c + * + * By Matthew Lewis + * Copyright (C) 2004 Mobile Innovation Ltd, www.mobileinnovation.co.uk + * + * small cosmetic changes (moved definition of netbook/series7-specific + * LED bit to include file) + * by Klaasjan van Druten, July 2004 + * + * Use of red LED depends on macros: + * CONFIG_LEDS_TIMER: Toggle every 50 timer interrupts + * CONFIG_LEDS_CPU: LED on when CPU not in idle + * + * If both are defined then the timer wins - the timer can be stopped + * (with event led_stop_timer_mode) in which case the CPU LED starts. + * + * The LEDs can also be "claimed": the timer/CPU behaviour stops and + * the LEDs respond to on/off requests. + */ + +#include +#include +#include +#include "leds.h" + + +#define LED_STATE_ENABLED 1 +#define LED_STATE_CLAIMED 2 +#ifdef CONFIG_LEDS_TIMER +#define LED_STATE_TIMER_STOPPED 4 +#endif + +static unsigned int led_state; +static unsigned int hw_led_state; + +#define LED_RED NETBOOK_GPIO_LED_RED +#define LED_MASK (NETBOOK_GPIO_LED_RED) + +/* + * Helper functions + */ + +static inline void init_unclaimed_led(void) +{ +#if defined CONFIG_LEDS_TIMER || defined CONFIG_LEDS_CPU + hw_led_state |= LED_RED; +#else + hw_led_state = 0; +#endif +} + + +#ifdef CONFIG_LEDS_CPU +static inline int cpu_led_available(void) +{ +# ifdef CONFIG_LEDS_TIMER + return !(led_state & LED_STATE_CLAIMED) + && (led_state & LED_STATE_TIMER_STOPPED); +# else + return !(led_state & LED_STATE_CLAIMED); +# endif +} +#endif + + +static void series7_led_update(unsigned int state) +{ + GPSR = state; + GPCR = state ^ LED_MASK; +} + + +/* + * The function that does the work + */ +void series7_leds_event(led_event_t evt) +{ + unsigned long flags; + + local_irq_save(flags); + + switch (evt) { /* The set of events is defined in include/asm-arm/leds.h */ + + case led_start: + if (!(led_state & (LED_STATE_ENABLED | LED_STATE_CLAIMED))) + init_unclaimed_led(); + led_state |= LED_STATE_ENABLED; + break; + + case led_stop: + /* Leave hw_led_state flags unchanged, but switch off LEDs */ + series7_led_update(0); + led_state &= ~LED_STATE_ENABLED; + break; + + case led_claim: + if (!(led_state & LED_STATE_CLAIMED)) + hw_led_state = 0; + led_state |= LED_STATE_CLAIMED; + break; + + case led_release: + if (led_state & LED_STATE_CLAIMED) { + if (led_state & LED_STATE_ENABLED) + init_unclaimed_led(); + else + hw_led_state = 0; + } + led_state &= ~LED_STATE_CLAIMED; + break; + +#ifdef CONFIG_LEDS_TIMER + case led_start_timer_mode: + /* Just leave LED in current state - it will toggle soon enough */ + led_state &= ~LED_STATE_TIMER_STOPPED; + break; + + case led_stop_timer_mode: + if (!(led_state & (LED_STATE_CLAIMED|LED_STATE_TIMER_STOPPED))) +#ifdef CONFIG_LEDS_CPU + hw_led_state |= LED_RED; +#else + hw_led_state &= ~LED_RED; +#endif + led_state |= LED_STATE_TIMER_STOPPED; + break; + + case led_timer: + if (!(led_state & (LED_STATE_CLAIMED|LED_STATE_TIMER_STOPPED))) + hw_led_state ^= LED_RED; + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + if (cpu_led_available()) + hw_led_state &= ~LED_RED; + break; + + case led_idle_end: + if (cpu_led_available()) + hw_led_state |= LED_RED; + break; +#endif + + case led_red_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= LED_RED; + break; + + case led_red_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~LED_RED; + break; + + default: + break; + } + + if (led_state & LED_STATE_ENABLED) + series7_led_update(hw_led_state); + + local_irq_restore(flags); +} diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds.c linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds.c --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds.c Mon Aug 25 13:44:39 2003 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds.c Fri Jul 2 16:22:36 2004 @@ -43,6 +43,8 @@ leds_event = lart_leds_event; if (machine_is_pfs168()) leds_event = pfs168_leds_event; + if (machine_is_psion_series7()) + leds_event = series7_leds_event; if (machine_is_pt_system3()) leds_event = system3_leds_event; diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds.h linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds.h --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/leds.h Mon Aug 25 13:44:39 2003 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/leds.h Fri Jul 2 16:22:36 2004 @@ -12,4 +12,5 @@ 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 series7_leds_event(led_event_t evt); extern void system3_leds_event(led_event_t evt); diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/netbook_series7.c linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/netbook_series7.c --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/netbook_series7.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/netbook_series7.c Fri Jul 2 16:22:36 2004 @@ -0,0 +1,95 @@ +/* + * linux/arch/arm/mach-sa1100/netbook_series7.c + * + * This file contains the basic tweaks specific to the + * Psion Netbook and Series 7 machines. + * + * Copyright (C) 2003 Klaasjan van Druten + * + * initial version, heavily based on similar files in this directory, + * and on the initial port to linux 2.4.2-rmk1 by Peter van Sebille. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "generic.h" + +static void __init +fixup_psion_series7(struct machine_desc *desc, struct param_struct *params, + char **cmdline, struct meminfo *mi) +{ +#ifdef CONFIG_SA1100_NETBOOK_SERIES7_RAM_DEF + /* default memory config: no info needed */ +#elif CONFIG_SA1100_NETBOOK_SERIES7_RAM_32MB + SET_BANK(0, 0xc0000000, 16*1024*1024); + SET_BANK(1, 0xc8000000, 16*1024*1024); + mi->nr_banks = 2; +#elif CONFIG_SA1100_NETBOOK_SERIES7_RAM_64MB + SET_BANK(0, 0xc0000000, 16*1024*1024); + SET_BANK(1, 0xc8000000, 16*1024*1024); + SET_BANK(2, 0xd0000000, 16*1024*1024); + SET_BANK(3, 0xd8000000, 16*1024*1024); + mi->nr_banks = 4; +#else +# error Unknown Netbook/Series 7 memory layout! +#endif +} + +static struct map_desc psion_series7_io_desc[] __initdata = { + /* virtual physical length domain r w c b */ + { NETBOOK_ASIC14_V, NETBOOK_ASIC14_P, NETBOOK_ASIC14_LENGTH, DOMAIN_IO, 1, 1, 0, 0 }, +#ifdef CONFIG_PROC_FS + { NETBOOK_FLASH_V, NETBOOK_FLASH_P, NETBOOK_FLASH_SIZE, DOMAIN_IO, 1, 0, 0, 0 }, +#endif + LAST_DESC +}; + +static void __init psion_series7_map_io(void) +{ + u32 lcd_mask=0; + int i; + + for (i = 8; i < 16; i++){ + lcd_mask |= GPIO_LDD(i); + } + sa1100_map_io(); + iotable_init(psion_series7_io_desc); + + sa1100_register_uart(0, 3); + sa1100_register_uart(1, 2); /* or exchange 0 and 1 ? */ + + GAFR = lcd_mask | GPIO_32_768kHz; + GPDR = lcd_mask | NETBOOK_GPIO_LED_RED | NETBOOK_GPIO_LCD; + GPDR |= NETBOOK_GPIO_UNKNOWN_OUTPUT; + + GPSR = NETBOOK_GPIO_LCD; + +} + + +MACHINE_START(PSION_SERIES7, "Psion Netbook/Series 7") + MAINTAINER("The psilinux team: http://linux-7110.sf.net") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) + FIXUP(fixup_psion_series7) + +/* should match with bootloader */ +/* for arlo v1.0.2: 0xc0208000 - 128*1024 */ + BOOT_PARAMS(0xc01e8000) + + MAPIO(psion_series7_map_io) + INITIRQ(sa1100_init_irq) +MACHINE_END diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/netbook_series7_proc.c linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/netbook_series7_proc.c --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/netbook_series7_proc.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/netbook_series7_proc.c Fri Jul 2 16:22:36 2004 @@ -0,0 +1,549 @@ +/* /proc interface for Netbook, + * + * based on simpad.c, sa1100_generic.c, sm_osl.c, kcore.c + * + * Series7/Netbook specific stuff + * Copyright (C) 2004 Taneli Leppa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#ifdef CONFIG_PROC_FS +#include +#include +#include + +#define NETBOOK_PROC_REGISTERS 32 +#define NETBOOK_PROC_DEBUG 1 + +static struct proc_dir_entry *proc_netbook = NULL; + +static struct proc_dir_entry *proc_netbook_contrast = NULL; +static struct proc_dir_entry *proc_netbook_brightness = NULL; +static struct proc_dir_entry *proc_netbook_flash = NULL; + +#ifdef NETBOOK_PROC_DEBUG +static struct proc_dir_entry *proc_netbook_regdir = NULL; +static struct proc_dir_entry *proc_netbook_regs[NETBOOK_PROC_REGISTERS*2]; +static struct proc_dir_entry *proc_netbook_allregs = NULL; +static struct proc_dir_entry *proc_netbook_touchscreen = NULL; +static struct proc_dir_entry *proc_netbook_touchscreen_var1 = NULL; +static struct proc_dir_entry *proc_netbook_touchscreen_var2 = NULL; + +static struct proc_dir_entry *proc_netbook_gplr = NULL; +static struct proc_dir_entry *proc_netbook_gpsr = NULL; +static struct proc_dir_entry *proc_netbook_gpcr = NULL; +static struct proc_dir_entry *proc_netbook_grer = NULL; +static struct proc_dir_entry *proc_netbook_gfer = NULL; +static struct proc_dir_entry *proc_netbook_icmr = NULL; + +u16 netbook_touchscreen_var = 0x0000; +u16 netbook_touchscreen_var2 = 0x0001; +#endif + +u16 netbook_get_contrast() +{ + return 33 - (1 + (NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_CONTRAST_REG))); +} + +/* contrast: 1-32 */ +void netbook_set_contrast(u16 contrast) +{ + if (contrast > 0 && contrast < 33) + { + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_CONTRAST_REG) = (33 - contrast) - 1; + } +} + +u16 netbook_get_brightness() +{ + return 1 + (NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_BRIGHTNESS_REG) / 4); +} + +/* brightness: 1-9 */ +void netbook_set_brightness(u16 brightness) +{ + if (brightness > 0 && brightness < 10) + { + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_BRIGHTNESS_REG) = ((brightness - 1) * 4); + } +} + +#ifdef NETBOOK_PROC_DEBUG +static int netbook_proc_write(struct file *file, const char *buf, + unsigned long count, void *data) +{ + char cdata[7]; + unsigned int val; + u16 value; + u32 reg; + int ret; + + reg = (u32) data; + + if (count > sizeof(cdata) - 1) + return -EINVAL; + + if (copy_from_user(cdata, buf, count)) + return -EFAULT; + + cdata[count] = '\0'; + if ((ret = sscanf(cdata, "%x", &val)) == 1) + { + value = (u16) val; + NETBOOK_ASIC14_MEM16(reg) = value; + } else + return -EINVAL; + + return count; +} + +static int netbook_proc_read(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + int reg = (int) data; + char *p = buf; + u16 regdata = 0; + + regdata = NETBOOK_ASIC14_MEM16(reg); + p += sprintf(p, "%04x\n", regdata); + + return p - buf; +} + +static int netbook_proc_sareg_write(struct file *file, const char *buf, + unsigned long count, void *data) +{ + char cdata[16]; + unsigned int val; + u32 value; + u32 reg; + int ret; + + reg = (u32) data; + + if (count > sizeof(cdata) - 1) + return -EINVAL; + + if (copy_from_user(cdata, buf, count)) + return -EFAULT; + + cdata[count] = '\0'; + if ((ret = sscanf(cdata, "%x", &val)) == 1) + { + value = (u32) val; + switch (reg) + { + case 1: + break; + case 2: + printk("Writing %08x to GPCR.\n", value); + GPCR = value; + break; + case 3: + printk("Writing %08x to GPSR.\n", value); + GPSR = value; + break; + case 4: + printk("Writing %08x to GRER.\n", value); + GRER = value; + break; + case 5: + printk("Writing %08x to GFER.\n", value); + GFER = value; + break; + case 6: + printk("Writing %08x to ICMR.\n", value); + ICMR = value; + break; + } + } else + return -EINVAL; + + return count; +} + +static int netbook_proc_sareg_read(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + int reg = (int) data; + char *p = buf; + u32 regdata = 0; + switch (reg) + { + case 1: + regdata = GPLR; + break; + case 2: + regdata = GPCR; + break; + case 3: + regdata = GPSR; + break; + case 4: + regdata = GRER; + break; + case 5: + regdata = GFER; + break; + case 6: + regdata = ICMR; + break; + } + + p += sprintf(p, "%08x\n", regdata); + return p - buf; +} + +static int netbook_proc_write_touchscreen_var(struct file *file, + const char *buf, + unsigned long count, void *data) +{ + char cdata[16]; + unsigned int val; + u16 value; + u32 reg; + int ret; + + reg = (u32) data; + + if (count > sizeof(cdata) - 1) + return -EINVAL; + + if (copy_from_user(cdata, buf, count)) + return -EFAULT; + + cdata[count] = '\0'; + if ((ret = sscanf(cdata, "%x", &val)) == 1) + { + value = (u16) val; + if (reg == 1) + netbook_touchscreen_var = value; + else + netbook_touchscreen_var2 = value; + } else + return -EINVAL; + + return count; +} + +static int netbook_proc_read_touchscreen_var(char *buf, char **start, + off_t pos, + int count, int *eof, void *data) +{ + int reg = (int) data; + char *p = buf; + + if (reg == 1) + p += sprintf(p, "%04x\n", netbook_touchscreen_var); + else + p += sprintf(p, "%04x\n", netbook_touchscreen_var2); + return p - buf; +} + + +static int netbook_proc_read_touchscreen(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + char *p = buf; + u16 regdata = 0; + u16 lines = 0; + u16 line_var = 0; + + printk("Invoked touchscreen read\n"); + + line_var = 0; + do { + udelay(10); +// NETBOOK_ASIC14_MEM16(72) = netbook_touchscreen_var; + NETBOOK_ASIC14_MEM16(72) = (line_var << 8) | netbook_touchscreen_var; + NETBOOK_ASIC14_MEM16(76) = netbook_touchscreen_var2; + + regdata = NETBOOK_ASIC14_MEM16(64); + line_var++; + lines += 2; + if (regdata != 0x1704 && regdata != 0x1706) + printk("%04x at %u (%04x)\n", regdata, lines, NETBOOK_ASIC14_MEM16(72)); + } while (lines < 0x0fff/* && regdata != 0x1702 && regdata != 0x1700*/); + + if (regdata != 0x1702 && regdata != 0x1700) + printk("Touchscreen reading failed.\n"); + else { + printk("Strike at %04x (%04x)\n", line_var, regdata); + } + + +// regdata = NETBOOK_ASIC14_MEM16(72); +// regdata <<= 4; /* Discard last 4 bits */ +// regdata >>= 4; + + if (eof) + *eof = 1; + + p += sprintf(p, "%04x\n", NETBOOK_ASIC14_MEM16(72)); + p += sprintf(p, "%04x\n", NETBOOK_ASIC14_MEM16(76)); + p += sprintf(p, "%04x\n", NETBOOK_ASIC14_MEM16(64)); + + return p - buf; +} + +static int netbook_proc_read_all(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + char *p = buf; + u32 regdata = 0; + int i; + + for (i = 0; i < NETBOOK_PROC_REGISTERS; i++) + { + regdata = NETBOOK_ASIC14_MEM32(i * 4); + p += sprintf(p, "%08x ", regdata); + if (i % 6 == 5) + p += sprintf(p, "\n"); + } + p += sprintf(p, "\n"); + return p - buf; +} +#endif + +static ssize_t netbook_proc_flash_read(struct file *file, char *buf, + size_t count, loff_t *ppos) +{ + loff_t p = *ppos; + ssize_t read; + + if (p > NETBOOK_FLASH_SIZE) + return 0; + if (count > (NETBOOK_FLASH_SIZE - p)) + count = NETBOOK_FLASH_SIZE - p; + + read = 0; + if (count > 0) + { + if (copy_to_user(buf, (void *) (NETBOOK_FLASH_V + p), count)) + return -EFAULT; + read += count; + } + *ppos += read; + return read; + +} + +static int netbook_proc_flash_open(struct inode * inode, struct file * filp) +{ + return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; +} + +struct file_operations proc_netbook_flash_operations = { + read: netbook_proc_flash_read, + open: netbook_proc_flash_open, +}; + + +static int netbook_proc_bc_read(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + int reg = (int) data; + char *p = buf; + + switch (reg) + { + case 1: /* Brightness */ + p += sprintf(p, "%u\n", netbook_get_brightness()); + break; + case 2: /* Contrast */ + p += sprintf(p, "%u\n", netbook_get_contrast()); + break; + } + return p - buf; +} + +static int netbook_proc_bc_write(struct file *file, const char *buf, + unsigned long count, void *data) +{ + char cdata[4]; + unsigned int val; + int reg = (int) data; + int ret; + + if (count > sizeof(cdata) - 1) + return -EINVAL; + + if (copy_from_user(cdata, buf, count)) + return -EFAULT; + + cdata[count] = '\0'; + if ((ret = sscanf(cdata, "%u", &val)) == 1) + { + switch (reg) + { + case 1: /* Brightness */ + netbook_set_brightness((u16) val); + break; + case 2: /* Contrast */ + netbook_set_contrast((u16) val); + break; + } + } else + return -EINVAL; + + return count; +} + + +static int __init netbook_proc_init(void) +{ + int i; + char name[6]; + + /* Create /proc/netbook */ + proc_netbook = proc_mkdir("netbook", 0); + if (proc_netbook) + { + proc_netbook_flash = create_proc_entry("flash", S_IRUSR, + proc_netbook); + if (proc_netbook_flash) + { + proc_netbook_flash->proc_fops = &proc_netbook_flash_operations; + proc_netbook_flash->size = (size_t) NETBOOK_FLASH_SIZE; + } + + proc_netbook_brightness = create_proc_entry("brightness", 0, + proc_netbook); + if (proc_netbook_brightness) + { + proc_netbook_brightness->read_proc = netbook_proc_bc_read; + proc_netbook_brightness->write_proc = netbook_proc_bc_write; + proc_netbook_brightness->data = (void *) 1; + } + + proc_netbook_contrast = create_proc_entry("contrast", 0, + proc_netbook); + if (proc_netbook_contrast) + { + proc_netbook_contrast->read_proc = netbook_proc_bc_read; + proc_netbook_contrast->write_proc = netbook_proc_bc_write; + proc_netbook_contrast->data = (void *) 2; + } + + +#ifdef NETBOOK_PROC_DEBUG + proc_netbook_regdir = proc_mkdir("regs", proc_netbook); + if (proc_netbook_regdir) + { + for (i = 0; i < (NETBOOK_PROC_REGISTERS * 2); i++) + { + sprintf(name, "%d", i * 2); + proc_netbook_regs[i] = + create_proc_entry(name, 0, proc_netbook_regdir); + if (proc_netbook_regs[i]) + { + proc_netbook_regs[i]->read_proc = netbook_proc_read; + proc_netbook_regs[i]->write_proc = netbook_proc_write; + proc_netbook_regs[i]->data = (void *)(i * 2); + } else + printk("Could not create /proc/netbook/regs/%s\n", name); + } + } + + proc_netbook_allregs = create_proc_entry("registers", 0, proc_netbook); + proc_netbook_allregs->read_proc = netbook_proc_read_all; + + proc_netbook_touchscreen = create_proc_entry("touchscreen", 0, + proc_netbook); + proc_netbook_touchscreen->read_proc = netbook_proc_read_touchscreen; + + proc_netbook_touchscreen_var1 = create_proc_entry("tsvar1", 0, proc_netbook); + proc_netbook_touchscreen_var1->read_proc = netbook_proc_read_touchscreen_var; + proc_netbook_touchscreen_var1->write_proc = netbook_proc_write_touchscreen_var; + proc_netbook_touchscreen_var1->data = (void *) 1; + + proc_netbook_touchscreen_var2 = create_proc_entry("tsvar2", 0, proc_netbook); + proc_netbook_touchscreen_var2->read_proc = netbook_proc_read_touchscreen_var; + proc_netbook_touchscreen_var2->write_proc = netbook_proc_write_touchscreen_var; + proc_netbook_touchscreen_var2->data = (void *) 2; + + /* These are /proc entries for SA-1100 registers. */ + proc_netbook_gplr = create_proc_entry("gplr", 0, proc_netbook_regdir); + proc_netbook_gplr->read_proc = netbook_proc_sareg_read; + proc_netbook_gplr->write_proc = netbook_proc_sareg_write; + proc_netbook_gplr->data = (void *)1; + + proc_netbook_gpcr = create_proc_entry("gpcr", 0, proc_netbook_regdir); + proc_netbook_gpcr->read_proc = netbook_proc_sareg_read; + proc_netbook_gpcr->write_proc = netbook_proc_sareg_write; + proc_netbook_gpcr->data = (void *)2; + + proc_netbook_gpsr = create_proc_entry("gpsr", 0, proc_netbook_regdir); + proc_netbook_gpsr->read_proc = netbook_proc_sareg_read; + proc_netbook_gpsr->write_proc = netbook_proc_sareg_write; + proc_netbook_gpsr->data = (void *)3; + + proc_netbook_grer = create_proc_entry("grer", 0, proc_netbook_regdir); + proc_netbook_grer->read_proc = netbook_proc_sareg_read; + proc_netbook_grer->write_proc = netbook_proc_sareg_write; + proc_netbook_grer->data = (void *)4; + + proc_netbook_gfer = create_proc_entry("gfer", 0, proc_netbook_regdir); + proc_netbook_gfer->read_proc = netbook_proc_sareg_read; + proc_netbook_gfer->write_proc = netbook_proc_sareg_write; + proc_netbook_gfer->data = (void *)5; + + proc_netbook_icmr = create_proc_entry("icmr", 0, proc_netbook_regdir); + proc_netbook_icmr->read_proc = netbook_proc_sareg_read; + proc_netbook_icmr->write_proc = netbook_proc_sareg_write; + proc_netbook_icmr->data = (void *)6; +#endif + } else + printk(KERN_WARNING "Unable to create /proc interface for Netbook\n"); + return 0; +} + +static int __exit netbook_exit(void) +{ + int i; + char name[4]; + + if (proc_netbook) + { +#ifdef NETBOOK_PROC_DEBUG + for (i = 0; i < NETBOOK_PROC_REGISTERS; i++) + { + sprintf(name, "%d", i * 2); + remove_proc_entry(name, proc_netbook_regdir); + } + remove_proc_entry("regs", proc_netbook); + remove_proc_entry("registers", proc_netbook); +#endif + remove_proc_entry("flash", proc_netbook); + remove_proc_entry("brightness", proc_netbook); + remove_proc_entry("contrast", proc_netbook); + + remove_proc_entry("netbook", 0); + + } + return 0; +} + +__initcall(netbook_proc_init); +#endif + +EXPORT_SYMBOL(netbook_get_brightness); +EXPORT_SYMBOL(netbook_set_brightness); +EXPORT_SYMBOL(netbook_get_contrast); +EXPORT_SYMBOL(netbook_set_contrast); + diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/pm.c linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/pm.c --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/pm.c Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/pm.c Fri Jul 2 16:22:36 2004 @@ -185,6 +185,50 @@ return virt_to_phys(sp); } +#ifdef CONFIG_SA1100_PSION_SERIES7 +int pm_do_idle(void) +{ + u32 icmr_save, grer_save, gfer_save; + + icmr_save = ICMR; + grer_save = GRER; + gfer_save = GFER; + + cli(); + + ICMR = GFER = GRER = 0x3; + + printk("\nGoing into idle mode... "); + + /* disable LCD */ + // LCCR0 ^= 1; + + /* We can turn the screen off here by pulling pin 15 down + (or was it 17, can't remember). + + Now, as for turning off the backlight: don't know yet. + */ + + /* go to happy idle */ + sa1100_cpu_idle(); + + /* enable LCD */ + // LCCR0 |= 1; + printk(" and back.\n"); + + + + GPDR = 0; + ICMR = icmr_save; + GRER = grer_save; + GFER = gfer_save; + + sti(); + + return 0; +} +#endif + #ifdef CONFIG_SYSCTL /* * ARGH! ACPI people defined CTL_ACPI in linux/acpi.h rather than @@ -196,6 +240,10 @@ #warning ACPI broke the kernel, this interface needs to be fixed up. #define CTL_ACPI 9999 #define ACPI_S1_SLP_TYP 19 +#ifdef CONFIG_SA1100_PSION_SERIES7 +/* Actually I don't have an idea what this means */ +#define ACPI_S2_SLP_TYP 20 +#endif /* * Send us to sleep. @@ -215,9 +263,20 @@ return retval; } +#ifdef CONFIG_SA1100_PSION_SERIES7 +static int sysctl_pm_do_idle(void) +{ + pm_do_idle(); + return 0; +} +#endif + static struct ctl_table pm_table[] = { {ACPI_S1_SLP_TYP, "suspend", NULL, 0, 0600, NULL, (proc_handler *)&sysctl_pm_do_suspend}, +#ifdef CONFIG_SA1100_PSION_SERIES7 + {ACPI_S2_SLP_TYP, "idle", NULL, 0, 0600, NULL, (proc_handler *)&sysctl_pm_do_idle}, +#endif {0} }; diff -ruN linux-2.4.26-vrs1/arch/arm/mach-sa1100/sleep.S linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/sleep.S --- linux-2.4.26-vrs1/arch/arm/mach-sa1100/sleep.S Mon Aug 25 13:44:39 2003 +++ linux-2.4.26-vrs1-kvd1/arch/arm/mach-sa1100/sleep.S Fri Jul 2 16:22:36 2004 @@ -210,3 +210,12 @@ ldmfd sp!, {r4 - r12, pc} @ return to caller +ENTRY(sa1100_cpu_idle) + stmfd sp!, {r4 - r12, lr} @ save registers on stack + + mcr p15, 0, r0, c15, c2, 2 + ldr r0, =0xfa000000 @ this should be non-cacheable + mcr p15, 0, r0, c15, c8, 2 @ entering idle mode... + + ldmfd sp!, {r4 - r12, pc} @ return to caller + diff -ruN linux-2.4.26-vrs1/drivers/char/Makefile linux-2.4.26-vrs1-kvd1/drivers/char/Makefile --- linux-2.4.26-vrs1/drivers/char/Makefile Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/char/Makefile Fri Jul 2 16:22:36 2004 @@ -131,6 +131,10 @@ KEYMAP = gckeymap.o KEYBD += gc_keyb.o endif + ifeq ($(CONFIG_SA1100_PSION_SERIES7),y) + KEYMAP = netbook_series7_keymap.o + KEYBD += s7_keyb.o + endif ifeq ($(CONFIG_SA1100_CERF_CPLD),y) KEYBD += cerf_keyb.o endif @@ -393,4 +397,7 @@ set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ qtronixmap.c: qtronixmap.map + set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ + +netbook_series7_keymap.c: netbook_series7_keymap.map set -e ; loadkeys --mktable $< | sed -e 's/^static *//' > $@ diff -ruN linux-2.4.26-vrs1/drivers/char/netbook_series7_keymap.map linux-2.4.26-vrs1-kvd1/drivers/char/netbook_series7_keymap.map --- linux-2.4.26-vrs1/drivers/char/netbook_series7_keymap.map Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/drivers/char/netbook_series7_keymap.map Fri Jul 2 16:22:36 2004 @@ -0,0 +1,258 @@ +# A keymap for linux on the netBook - as modified by B. Dushaw +# These key definitions work for my malaybook. All keys are defined +# that I know of except the euro key (which failed?) and the screen +# darken/lighted function keys. will even reboot +# the psion - so if you have the OS.img file on your compactflash when +# you do that, I think it will automatically reboot back to EPOC. +# +# N.B.: This key map defines the Alt and AltGr keys with keycodes 58, 59 +# These keycodes require a patch to the kernel - to +# file ../drivers/char/s7_keyb.c +# Without this patch keys and have keycode 0, i.e., are not +# defined. +# +# The outside button of the netBook (at the edge in the front) also gives +# a keystroke - this keystroke is presently defined as 60; +# The on/off switch as 61 +# +# BDD - Dec. 2003 +# slight modifications by Klaasjan van Druten, Jan. 2004 +###################################################################### +# This uses 7 modifier combinations. +keymaps 0-2,4-5,8,12 +# Change the above line into +# keymaps 0-2,4-6,8,12 +# in case you want the entries +# altgr control keycode 83 = Boot +# altgr control keycode 111 = Boot +# below. +# +# In fact AltGr is used very little, and one more keymap can +# be saved by mapping AltGr to Alt (and adapting a few entries): +# keycode 100 = Alt +# +keycode 1 = Escape Escape + alt keycode 1 = Meta_Escape +keycode 2 = one exclam + alt keycode 2 = Console_1 +keycode 3 = two quotedbl at + control keycode 3 = nul + shift control keycode 3 = nul + alt keycode 3 = Console_2 +keycode 4 = three pound + control keycode 4 = Escape + alt keycode 4 = Console_3 +keycode 5 = four dollar dollar + control keycode 5 = Control_backslash + alt keycode 5 = Meta_four +# altgr keycode 5 = Euro +keycode 6 = five percent + control keycode 6 = Control_bracketright + alt keycode 6 = Meta_five + altgr keycode 6 = grave +keycode 7 = six asciicircum + control keycode 7 = Control_asciicircum + alt keycode 7 = Meta_six + altgr keycode 7 = apostrophe +keycode 8 = seven ampersand braceleft + control keycode 8 = Control_underscore + alt keycode 8 = Meta_seven + altgr keycode 8 = braceleft +keycode 9 = eight asterisk bracketleft + alt keycode 9 = Meta_eight + altgr keycode 9 = braceright +keycode 10 = nine parenleft bracketright + alt keycode 10 = Meta_nine + altgr keycode 10 = bracketleft +keycode 11 = zero parenright braceright + alt keycode 11 = Meta_zero + altgr keycode 11 = bracketright +keycode 12 = minus underscore numbersign + control keycode 12 = Control_underscore + shift control keycode 12 = Control_underscore + altgr keycode 12 = numbersign +keycode 13 = equal plus + alt keycode 13 = Meta_equal +keycode 14 = Delete Delete + control keycode 14 = BackSpace + alt keycode 14 = Meta_Delete + control alt keycode 14 = Boot +keycode 15 = Tab + altgr keycode 15 = Caps_Lock +keycode 16 = q +keycode 17 = w +keycode 18 = e + altgr keycode 18 = Hex_E +keycode 19 = r +keycode 20 = t + control keycode 20 = bar +keycode 21 = y +keycode 22 = u +keycode 23 = i +keycode 24 = o +keycode 25 = p +keycode 26 = bracketleft braceleft + control keycode 26 = Escape + alt keycode 26 = Meta_bracketleft +keycode 27 = bracketright braceright asciitilde + control keycode 27 = Control_bracketright + alt keycode 27 = Meta_bracketright +keycode 28 = Return + alt keycode 28 = Meta_Control_m +keycode 29 = Control +keycode 30 = a + altgr keycode 30 = Hex_A +keycode 31 = s +keycode 32 = d + altgr keycode 32 = Hex_D +keycode 33 = f + altgr keycode 33 = Hex_F +keycode 34 = g +keycode 35 = h +keycode 36 = j +keycode 37 = k +keycode 38 = l +keycode 39 = semicolon colon + alt keycode 39 = Meta_semicolon +keycode 41 = apostrophe at + control keycode 41 = nul + alt keycode 41 = Meta_grave +keycode 42 = Shift +keycode 43 = backslash asciitilde + control keycode 43 = Control_backslash + alt keycode 43 = Meta_backslash +keycode 44 = z +keycode 45 = x +keycode 46 = c + altgr keycode 46 = Hex_C +keycode 47 = v +keycode 48 = b + altgr keycode 48 = Hex_B +keycode 49 = n +keycode 50 = m +keycode 51 = comma less +keycode 52 = period greater + control keycode 52 = Compose + alt keycode 52 = Meta_period +keycode 53 = slash question + control keycode 53 = Delete + alt keycode 53 = Meta_slash +keycode 54 = Shift +#keycode 55 = +#keycode 56 = +keycode 57 = space space + control keycode 57 = nul + alt keycode 57 = Meta_space +keycode 58 = Alt +keycode 59 = AltGr +# keycode 60 is the exterior button on the netBook +keycode 60 = F1 F2 + control keycode 60 = F3 + alt keycode 60 = F4 + altgr keycode 60 = F5 +# keycode 61 is the on/off switch on the netBook +keycode 61 = p +keycode 72 = Up + altgr keycode 72 = Prior +keycode 75 = Left + altgr keycode 75 = Home +keycode 77 = Right + altgr keycode 77 = End +keycode 80 = Down + altgr keycode 80 = Next +string F1 = "\033[[A" +string F2 = "\033[[B" +string F3 = "\033[[C" +string F4 = "\033[[D" +string F5 = "\033[[E" +string F6 = "\033[17~" +string F7 = "\033[18~" +string F8 = "\033[19~" +string F9 = "\033[20~" +string F10 = "\033[21~" +string F11 = "\033[23~" +string F12 = "\033[24~" +string F13 = "\033[25~" +string F14 = "\033[26~" +string F15 = "\033[28~" +string F16 = "\033[29~" +string F17 = "\033[31~" +string F18 = "\033[32~" +string F19 = "\033[33~" +string F20 = "\033[34~" +string Find = "\033[1~" +string Insert = "\033[2~" +string Remove = "\033[3~" +string Select = "\033[4~" +string Prior = "\033[5~" +string Next = "\033[6~" +string Macro = "\033[M" +string Pause = "\033[P" +compose '`' 'A' to 'À' +compose '`' 'a' to 'à' +compose '\'' 'A' to 'Á' +compose '\'' 'a' to 'á' +compose '^' 'A' to 'Â' +compose '^' 'a' to 'â' +compose '~' 'A' to 'Ã' +compose '~' 'a' to 'ã' +compose '"' 'A' to 'Ä' +compose '"' 'a' to 'ä' +compose 'O' 'A' to 'Å' +compose 'o' 'a' to 'å' +compose '0' 'A' to 'Å' +compose '0' 'a' to 'å' +compose 'A' 'A' to 'Å' +compose 'a' 'a' to 'å' +compose 'A' 'E' to 'Æ' +compose 'a' 'e' to 'æ' +compose ',' 'C' to 'Ç' +compose ',' 'c' to 'ç' +compose '`' 'E' to 'È' +compose '`' 'e' to 'è' +compose '\'' 'E' to 'É' +compose '\'' 'e' to 'é' +compose '^' 'E' to 'Ê' +compose '^' 'e' to 'ê' +compose '"' 'E' to 'Ë' +compose '"' 'e' to 'ë' +compose '`' 'I' to 'Ì' +compose '`' 'i' to 'ì' +compose '\'' 'I' to 'Í' +compose '\'' 'i' to 'í' +compose '^' 'I' to 'Î' +compose '^' 'i' to 'î' +compose '"' 'I' to 'Ï' +compose '"' 'i' to 'ï' +compose '-' 'D' to 'Ð' +compose '-' 'd' to 'ð' +compose '~' 'N' to 'Ñ' +compose '~' 'n' to 'ñ' +compose '`' 'O' to 'Ò' +compose '`' 'o' to 'ò' +compose '\'' 'O' to 'Ó' +compose '\'' 'o' to 'ó' +compose '^' 'O' to 'Ô' +compose '^' 'o' to 'ô' +compose '~' 'O' to 'Õ' +compose '~' 'o' to 'õ' +compose '"' 'O' to 'Ö' +compose '"' 'o' to 'ö' +compose '/' 'O' to 'Ø' +compose '/' 'o' to 'ø' +compose '`' 'U' to 'Ù' +compose '`' 'u' to 'ù' +compose '\'' 'U' to 'Ú' +compose '\'' 'u' to 'ú' +compose '^' 'U' to 'Û' +compose '^' 'u' to 'û' +compose '"' 'U' to 'Ü' +compose '"' 'u' to 'ü' +compose '\'' 'Y' to 'Ý' +compose '\'' 'y' to 'ý' +compose 'T' 'H' to 'Þ' +compose 't' 'h' to 'þ' +compose 's' 's' to 'ß' +compose '"' 'y' to 'ÿ' +compose 's' 'z' to 'ß' +compose 'i' 'j' to 'ÿ' diff -ruN linux-2.4.26-vrs1/drivers/char/s7_keyb.c linux-2.4.26-vrs1-kvd1/drivers/char/s7_keyb.c --- linux-2.4.26-vrs1/drivers/char/s7_keyb.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/drivers/char/s7_keyb.c Fri Jul 2 16:22:36 2004 @@ -0,0 +1,267 @@ +/* + * linux/drivers/char/s7_keyb.c + * + * Copyright (C) 2002 Peter van Sebille + * + * changed for 2.4.19-rmk7: + * - added k_translate and co, as per keyboard.h, copied from cerf_keyb.c, + * Klaasjan van Druten + * - added keycodes 58-61, following Brian Dushaw's suggestions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include // for OS timers in watchdog_reset + +/* + * TODO: + * - pressing 'b' and 'n' at roughly the same time results in '3' and ';' + */ + +#define S7_KBD_ROWS 8 +#define S7_KBD_COLS 8 + +static unsigned rows_reported_down[S7_KBD_COLS]; + +#define SCANHZ (HZ/20) +#define NUL 0 + +struct timer_list scan_timer; + +static const int s7_keymap[S7_KBD_ROWS][S7_KBD_COLS] = +{ + /* 0 1 2 3 4 5 6 7 */ + /* 0 */ { 28, 14, 61, 0, 57, 58, 60, 1}, + /* 1 */ { 77, 0, 37, 51, 19, 33, 16, 2}, + /* 2 */ { 15, 12, 23, 41, 5, 47, 30, 3}, + /* 3 */ { 21, 13, 9, 50, 6, 46, 44, 7}, + /* 4 */ { 75, 11, 10, 36, 20, 32, 31, 52}, + /* 5 */ { 80, 25, 24, 22, 34, 18, 17, 72}, + /* 6 */ { 49, 39, 38, 8, 48, 4, 45, 35}, + /* 7 */ { 42, 54, 29, 59, 43, 53, 0, 0} +}; + + +// need to go to a new header file: asm/arch/s7hw.h +#define S7KeyScan (*((volatile unsigned short *) 0xf1000030)) +#define S7PADR (*((volatile unsigned short *) 0xf1000004)) +#define S7_KBDSCAN 0xf +#define S7_KBSC_COL0 8 + + +// the 16 udelay as used on the S5mx is not long enough. +unsigned kbd_delay[]={32 ,32 ,32 ,32 ,32 ,32 ,32 ,32 ,32}; + +extern u16 netbook_get_contrast(); +extern void netbook_set_contrast(u16 contrast); +extern u16 netbook_get_brightness(); +extern void netbook_set_brightness(u16 brightness); + +void s7_cycle_brightness() +{ + u16 brightness; + + brightness = netbook_get_brightness(); + if (brightness == 9) + brightness = 1; + else + brightness++; + netbook_set_brightness(brightness); +} + +void s7_down_contrast() +{ + u16 contrast; + contrast = netbook_get_contrast(); + netbook_set_contrast(contrast - 1); +} + +void s7_up_contrast() +{ + u16 contrast; + contrast = netbook_get_contrast(); + netbook_set_contrast(contrast + 1); +} + +static void check_kbd(void) +{ + int col, row, scancode; + unsigned newup, newdown, rows_down; + int need_tasklet_schedule=0; + unsigned char state; + static int fn_down = 0; + + for (col=0; col>= 1; + newup >>= 1; + } + + rows_reported_down[col] = rows_down; + } + + if(need_tasklet_schedule) + tasklet_schedule(&keyboard_tasklet); +} + +static void reset_watchdog(void) +{ + /* + * The watchdog has been enabled from under EPOC. Once enabled + * it can't be disabled, so each keyboard tick we advance the + * watchdog timer as far ahead as possible. + */ + OSMR3 = OSCR - 1; +} + + +static void s7_scan_kbd(unsigned long dummy) +{ + check_kbd(); + reset_watchdog(); + + init_timer(&scan_timer); + scan_timer.expires = jiffies + SCANHZ; + scan_timer.data = 0; + scan_timer.function = s7_scan_kbd; + add_timer(&scan_timer); +} + + +void s7_leds(unsigned char leds) +{ +} +char s7_unexpected_up(unsigned char keycode) +{ +return 0; +} +int s7_getkeycode(unsigned int scancode) +{ +return 0; +} +int s7_setkeycode(unsigned int scancode, unsigned int keycode) +{ +return 0; +} + +int s7_kbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode) +{ + static int prev_scancode; + static int bc_scancode; + + if (scancode == 0xe0 || scancode == 0xe1) { + prev_scancode = scancode; + return 0; + } + + if (scancode == 0x00 || scancode == 0xff) { + prev_scancode = 0; + return 0; + } + + scancode &= 0x7f; + + if (prev_scancode) { + if (prev_scancode != 0xe0) { + if (prev_scancode == 0xe1 && scancode == 0x1d) { + prev_scancode = 0x100; + return 0; + } else if (prev_scancode == 0x100 && scancode == 0x45) { + prev_scancode = 0; + } else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown e1 escape sequence\n"); +#endif + prev_scancode = 0; + return 0; + } + } else { + prev_scancode = 0; + if (scancode == 0x2a || scancode == 0x36) + return 0; + else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n", + scancode); +#endif + return 0; + } + } + } else + *keycode = scancode; + return 1; +} + +void __init Series7_kbd_init_hw(void) +{ + + + k_setkeycode = s7_setkeycode; + k_getkeycode = s7_getkeycode; + k_translate = s7_kbd_translate; + k_unexpected_up = s7_unexpected_up; + k_leds = s7_leds; + init_timer(&scan_timer); + scan_timer.expires = jiffies + SCANHZ; + + scan_timer.data = 0; + scan_timer.function = s7_scan_kbd; + add_timer(&scan_timer); + + printk("Psion Series 7-Netbook keyboard driver initialized\n"); +} + + + diff -ruN linux-2.4.26-vrs1/drivers/ide/ide-probe.c linux-2.4.26-vrs1-kvd1/drivers/ide/ide-probe.c --- linux-2.4.26-vrs1/drivers/ide/ide-probe.c Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/ide/ide-probe.c Fri Jul 2 16:22:36 2004 @@ -1088,7 +1088,9 @@ sa |= SA_INTERRUPT; #endif /* CONFIG_IDEPCI_SHARE_IRQ */ } - +#ifdef CONFIG_SA1100_PSION_SERIES7 + sa = SA_SHIRQ; +#endif if (hwif->io_ports[IDE_CONTROL_OFFSET]) /* clear nIEN */ hwif->OUTB(0x08, hwif->io_ports[IDE_CONTROL_OFFSET]); diff -ruN linux-2.4.26-vrs1/drivers/ide/legacy/ide-cs.c linux-2.4.26-vrs1-kvd1/drivers/ide/legacy/ide-cs.c --- linux-2.4.26-vrs1/drivers/ide/legacy/ide-cs.c Fri Jun 13 16:51:33 2003 +++ linux-2.4.26-vrs1-kvd1/drivers/ide/legacy/ide-cs.c Fri Jul 2 16:22:36 2004 @@ -69,7 +69,12 @@ /* Parameters that can be set with 'insmod' */ /* Bit map of interrupts to choose from */ +#ifndef CONFIG_SA1100_PSION_SERIES7 static u_int irq_mask = 0xdeb8; +#else +/* We'll take pretty much any IRQ the system throws at us. */ +static u_int irq_mask = 0x0fffffff; +#endif static int irq_list[4] = { -1 }; MODULE_PARM(irq_mask, "i"); diff -ruN linux-2.4.26-vrs1/drivers/pcmcia/Makefile linux-2.4.26-vrs1-kvd1/drivers/pcmcia/Makefile --- linux-2.4.26-vrs1/drivers/pcmcia/Makefile Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/pcmcia/Makefile Fri Jul 2 16:22:36 2004 @@ -86,6 +86,7 @@ sa1100_cs-objs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o sa1111_generic.o sa1100_cs-objs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o sa1100_cs-objs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o sa1111_generic.o +sa1100_cs-objs-$(CONFIG_SA1100_PSION_SERIES7) += sa1100_netbook.o sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o diff -ruN linux-2.4.26-vrs1/drivers/pcmcia/sa1100.h linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100.h --- linux-2.4.26-vrs1/drivers/pcmcia/sa1100.h Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100.h Fri Jul 2 17:20:20 2004 @@ -209,5 +209,6 @@ extern struct pcmcia_low_level adsbitsyplus_pcmcia_ops; extern struct pcmcia_low_level stork_pcmcia_ops; extern struct pcmcia_low_level badge4_pcmcia_ops; +extern struct pcmcia_low_level netbook_pcmcia_ops; #endif /* !defined(_PCMCIA_SA1100_H) */ diff -ruN linux-2.4.26-vrs1/drivers/pcmcia/sa1100_generic.c linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100_generic.c --- linux-2.4.26-vrs1/drivers/pcmcia/sa1100_generic.c Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100_generic.c Fri Jul 2 16:22:36 2004 @@ -603,8 +603,11 @@ __FUNCTION__, sock, MECR_FAST_GET(mecr, sock), sock, MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock), sock, MECR_BSIO_GET(mecr, sock)); - +#ifndef CONFIG_SA1100_PSION_SERIE7S MECR = mecr; +#else + MECR = 0x12662525; /* From EPOC */ +#endif } if (map->stop == 1) @@ -714,7 +717,11 @@ MECR_BSM_GET(mecr, sock), sock, MECR_BSA_GET(mecr, sock), sock, MECR_BSIO_GET(mecr, sock)); +#ifndef CONFIG_SA1100_PSION_SERIE7S MECR = mecr; +#else + MECR = 0x12662525; /* From EPOC */ +#endif } start = (map->flags & MAP_ATTRIB) ? skt->phys_attr : skt->phys_mem; @@ -870,8 +877,11 @@ sa1100_pcmcia_mecr_bs(sa1100_pcmcia_socket[sock].speed_mem, clock)); } - +#ifndef CONFIG_SA1100_PSION_SERIES7 MECR = mecr; +#else + MECR = 0x12662525; +#endif } @@ -1008,7 +1018,10 @@ if(machine_is_stork()) pcmcia_low_level = &stork_pcmcia_ops; #endif - +#ifdef CONFIG_SA1100_PSION_SERIES7 + if(machine_is_psion_series7()) + pcmcia_low_level = &netbook_pcmcia_ops; +#endif if (!pcmcia_low_level) { printk(KERN_ERR "This hardware is not supported by the SA1100 Card Service driver\n"); return -ENODEV; @@ -1114,7 +1127,11 @@ MECR_BSM_SET(mecr, i, sa1100_pcmcia_mecr_bs(skt->speed_mem, clock)); } +#ifndef CONFIG_SA1100_PSION_SERIES7 MECR = mecr; +#else + MECR = 0x12662525; +#endif #ifdef CONFIG_CPU_FREQ ret = cpufreq_register_notifier(&sa1100_pcmcia_notifier_block); diff -ruN linux-2.4.26-vrs1/drivers/pcmcia/sa1100_netbook.c linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100_netbook.c --- linux-2.4.26-vrs1/drivers/pcmcia/sa1100_netbook.c Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/drivers/pcmcia/sa1100_netbook.c Fri Jul 2 16:22:36 2004 @@ -0,0 +1,339 @@ +/* + * drivers/pcmcia/sa1100_netbook.c + * + * PCMCIA implementation routines for Psion Series7/Netbook. + * Based on the Assabet implementation. + * + * My apologies to not adhering to CodingStyle (I just can't handle + * full 8 character tabs without weeping uncontrollably). + * Taneli Leppa + */ +#include +#include + +#include +#include + +#include "sa1100_generic.h" + +static char *netbook_pcmcia_devid = NETBOOK_PCMCIA_DEVID; +static u16 netbook_pcmcia_last_status = 0; + +static struct irqs { + int irq; + unsigned int gpio; + const char *str; +} irqs[] = { + { NETBOOK_CF_IRQ, NETBOOK_CF_GPIO, "CF" }, + { NETBOOK_PCMCIA_EVENT_IRQ, NETBOOK_PCMCIA_EVENT_GPIO, "PCMCIA" } +}; + + +/* This is for sleeping during config. + */ +static void netbook_sleep(unsigned int n_cs) +{ + current->state = TASK_INTERRUPTIBLE; + schedule_timeout((n_cs * HZ + 99) / 100); +} + + +static int netbook_pcmcia_init(struct pcmcia_init *init) +{ + int res; + unsigned int i; + printk(KERN_INFO "Psion Netbook/Series7 CF/PCMCIA support version %u\n", + NETBOOK_PCMCIA_SUPPORT_VERSION); + + + /* Register the Netbook PCMCIA interrupt. It's a single pin + that multiplexes all PCMCIA related events. + + We also mark the interrupts as shared. The idea is + to have all same slot PCMCIA related interrupts on a single shared + interrupt. For that, we need a dev_id (for that we just + make up some crap, at least for now). + */ + + for (i = 0; i < ARRAY_SIZE(irqs); i++) + { + set_GPIO_IRQ_edge(irqs[i].gpio, GPIO_RISING_EDGE | GPIO_FALLING_EDGE); + + res = request_irq(irqs[i].irq, init->handler, SA_SHIRQ, + irqs[i].str, (void *)netbook_pcmcia_devid); + if (res) + goto irq_err; + } + + /* Prevent spurious interrupts */ + disable_irq(NETBOOK_CF_IRQ); + + /* This seems to be required for PCMCIA to start working. */ + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS3_REG) = 0x00ff; + netbook_sleep(10); + + netbook_pcmcia_last_status = NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS_REG); + + enable_irq(NETBOOK_CF_IRQ); + + /* We have two slots. Slot 1 is the CompactFlash slot. Slot 0 is + the PCMCIA slot. */ + + return 2; + + irq_err: + printk(KERN_ERR "%s: request for IRQ%d failed\n", + __FUNCTION__, irqs[i].irq); + + while (i--) + free_irq(irqs[i].irq, NULL); + + return -1; +} + +/* + * Release all resources. + */ +static int netbook_pcmcia_shutdown(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(irqs); i++) + free_irq(irqs[i].irq, NULL); + + return 0; +} + +static int +netbook_pcmcia_socket_state(struct pcmcia_state_array *state_array) +{ + u16 status = 0; + + if (state_array->size < 2) + return -1; + + /* On GPIO output pin levels: + * Pin 15 is high from boot (clearing: screen goes gray) + * Pin 21 is high from boot (clearing: nothing happens?) + * Pin 23 is high from boot (clearing: nothing happens?) + * + */ + + /* Let's read the status from ASIC14. + */ + + status = NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS_REG); + + /* Status is: + * 0x0000 when both cards inserted + * 0x0031 when just PCMCIA card inserted + * 0x000c when just CompactFlash inserted + * + * Note: the ready signal is not yet detected. It's seems like + * it's not used too much and there are no adverse effects in + * not detecting it properly. */ + + state_array->state[0].detect = (status == 0x0031 || status == 0x0000); + state_array->state[0].ready = (status == 0x0031 || status == 0x0000); + state_array->state[0].bvd1 = 0; + state_array->state[0].bvd2 = 0; + state_array->state[0].wrprot = 0; /* What's this anyway? */ + state_array->state[0].vs_3v = 0; + state_array->state[0].vs_Xv = 0; + + state_array->state[1].detect = (status == 0x000c || status == 0x0000); + state_array->state[1].ready = (status == 0x000c || status == 0x0000); + state_array->state[1].bvd1 = 0; + state_array->state[1].bvd2 = 0; + state_array->state[1].wrprot = 0; /* What's this anyway? */ + state_array->state[1].vs_3v = 0; + state_array->state[1].vs_Xv = 0; + + return 1; +} + +static int netbook_pcmcia_get_irq_info(struct pcmcia_irq_info *info) +{ + if (info->sock > 1) + return -1; + + if (info->sock == 0) + info->irq = NETBOOK_PCMCIA_IRQ; + + if (info->sock == 1) + info->irq = NETBOOK_CF_IRQ; + + return 0; +} + +static int +netbook_pcmcia_configure_socket(const struct pcmcia_configure *configure) +{ + u16 status; + u16 power = 0; + u16 status2; + u16 status3; + u16 status4; + u16 reset = 0; + u32 o = 0; + + if (configure->sock > 1) + return -1; + + /* XXX: Fix voltage for 3.3 volt PCMCIA cards. I don't have any, + * but I can get my 5 volt network card's leds to glow faintly. + * + * Powering off the PCMCIA slot totally: + * 1. Write 0x0000 to location 8 (decimal) + * 2. Write 0x0b43 to location 18 (decimal) + * + */ + status = NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS_REG); + + status3 = 0; + switch (configure->vcc) + { + case 0: + case 50: + case 33: + if (configure->sock == 0) + { + /* Prevent spurious interrupts */ + disable_irq(NETBOOK_CF_IRQ); + + /* Required when PCMCIA card wasn't plugged in from the + boot. */ + + if (NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS5_REG) != 0x0000) + { + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS5_REG) = 0xffff; + netbook_sleep(30); + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS5_REG) = 0x0000; + netbook_sleep(20); + } + + + status4 = 0x0b40; + reset = 0x0; + if (status == 0x0031 || status == 0x0000) + { + /* Apply power to PCMCIA slot */ + power |= NETBOOK_ASIC14_POWER_PCMCIA; + status2 = 0x007f; + if (status == 0x0031) + status2 = 0x007c; + status3 |= NETBOOK_ASIC14_STATUS3_PCMCIA; + + /* Issue a reset if both cards are in and + * last status was something else than PCMCIA in. + */ + if (status == 0x0000 && + netbook_pcmcia_last_status != 0x0031) + reset = status3 | 0x4; + } + if (status == 0x000c || status == 0x0000) + { + power |= NETBOOK_ASIC14_POWER_CF; + if (status == 0x000c) + status2 = 0x007c; + + status3 |= NETBOOK_ASIC14_STATUS3_CF; + } + + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_POWER_REG) = power; + netbook_sleep(10); + + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS4_REG) = status4; + netbook_sleep(10); + + if (reset) + { + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS3_REG) = reset; + netbook_sleep(10); + } + + NETBOOK_ASIC14_MEM16(NETBOOK_ASIC14_STATUS3_REG) = status3; + netbook_sleep(10); + + /* Re-enable interrupts */ + enable_irq(NETBOOK_CF_IRQ); + } + break; + default: + printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__, + configure->vcc); + + return -1; + } + + if (configure->reset) + { +/* + printk(KERN_WARNING "%s(): Don't know how to issue a PCMCIA reset yet\n", + __FUNCTION__); +*/ + } + netbook_pcmcia_last_status = status; + + return 0; +} + +/* + * Enable card status IRQs on (re-)initialisation. This can + * be called at initialisation, power management event, or + * pcmcia event. + */ +static int netbook_pcmcia_socket_init(int sock) +{ + int i; + u16 status; + u16 power = 0; + u16 status2; + u16 status3; + + /* FIX: We should read the status from ASIC14 here, and + * start giving power to the CF/PCMCIA slot. + * + * But we don't, yet. Because we probably can't suspend anyway + * now. + */ + +/* + for (i = 0; i < ARRAY_SIZE(irqs); i++) + { + set_GPIO_IRQ_edge(irqs[i].gpio, GPIO_RISING_EDGE | GPIO_FALLING_EDGE); + } +*/ + + return 0; +} + +/* + * Disable card status IRQs on suspend. + */ +static int netbook_pcmcia_socket_suspend(int sock) +{ + int i; + +/* + for (i = 0; i < ARRAY_SIZE(irqs); i++) + set_GPIO_IRQ_edge(irqs[i].gpio, GPIO_NO_EDGES); +*/ + + /* FIX: We should probably power off the PCMCIA bus somehow. + * But I believe suspend is not supported yet. + */ + + return 0; +} + +struct pcmcia_low_level netbook_pcmcia_ops = { + init: netbook_pcmcia_init, + shutdown: netbook_pcmcia_shutdown, + socket_state: netbook_pcmcia_socket_state, + get_irq_info: netbook_pcmcia_get_irq_info, + configure_socket: netbook_pcmcia_configure_socket, + socket_init: netbook_pcmcia_socket_init, + socket_suspend: netbook_pcmcia_socket_suspend, +}; + diff -ruN linux-2.4.26-vrs1/drivers/video/sa1100fb.c linux-2.4.26-vrs1-kvd1/drivers/video/sa1100fb.c --- linux-2.4.26-vrs1/drivers/video/sa1100fb.c Mon Jun 21 09:06:15 2004 +++ linux-2.4.26-vrs1-kvd1/drivers/video/sa1100fb.c Fri Jul 2 16:22:36 2004 @@ -162,6 +162,10 @@ * 2002/02/21: * - Added support for ICP LCD-Kit01 on Frodo. * - Added support for backlight via CPLDs on Frodo. + * + * 2003/12: + * - Add some support from Psion Netbook/Series 7 + * */ #include @@ -629,6 +633,26 @@ }; #endif +#ifdef CONFIG_SA1100_PSION_SERIES7 +static struct sa1100fb_mach_info netbook_series7_info __initdata = { + /* these settings are intented to reproduce the values of + * of lccr0-3 as used by EPOC (as revealed by arlo) + */ + pixclock: 242105, bpp: 8, + xres: 640, yres: 480, + + hsync_len: 3, vsync_len: 4, + left_margin: 2, upper_margin: 0, + right_margin: 2, lower_margin: 0, + + sync: FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + + lccr0: LCCR0_DMADel(128) | LCCR0_Color | LCCR0_Dual | LCCR0_Pas, + lccr3: LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(512) | + LCCR3_ACBsCntOff, +}; +#endif + #ifdef CONFIG_SA1100_SIMPUTER static struct sa1100fb_mach_info simputer_info __initdata = { pixclock: 70000, bpp: 4, @@ -813,6 +837,11 @@ inf = &frodo_kit01_info; } #endif +#ifdef CONFIG_SA1100_PSION_SERIES7 + if (machine_is_psion_series7()) { + inf = &netbook_series7_info; + } +#endif #ifdef CONFIG_SA1100_SHANNON if (machine_is_shannon()) { inf = &shannon_info; @@ -1876,7 +1905,7 @@ GPDR |= SHANNON_GPIO_DISP_EN; GPSR |= SHANNON_GPIO_DISP_EN; } - + DPRINTK("DBAR1 = %p\n", DBAR1); DPRINTK("DBAR2 = %p\n", DBAR2); DPRINTK("LCCR0 = 0x%08x\n", LCCR0); diff -ruN linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/hardware.h linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/hardware.h --- linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/hardware.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/hardware.h Fri Jul 2 17:19:10 2004 @@ -124,6 +124,8 @@ #include "h3600.h" +#include "netbook_series7.h" + #include "system3.h" #ifdef CONFIG_SA1100_PANGOLIN diff -ruN linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/keyboard.h linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/keyboard.h --- linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/keyboard.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/keyboard.h Fri Jul 2 17:19:39 2004 @@ -16,6 +16,7 @@ extern int sa1111_kbd_init_hw(void); extern void gc_kbd_init_hw(void); extern void smartio_kbd_init_hw(void); +extern void Series7_kbd_init_hw(void); extern void cerf_kbd_init_hw(void); static inline void kbd_init_hw(void) @@ -27,6 +28,8 @@ gc_kbd_init_hw(); if (machine_is_adsbitsy() || machine_is_adsbitsyplus()) smartio_kbd_init_hw(); + if (machine_is_psion_series7()) + Series7_kbd_init_hw(); #ifdef CONFIG_SA1100_CERF_CPLD if (machine_is_cerf()) cerf_kbd_init_hw(); diff -ruN linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/netbook_series7.h linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/netbook_series7.h --- linux-2.4.26-vrs1/include/asm-arm/arch-sa1100/netbook_series7.h Thu Jan 1 01:00:00 1970 +++ linux-2.4.26-vrs1-kvd1/include/asm-arm/arch-sa1100/netbook_series7.h Fri Jul 2 17:16:46 2004 @@ -0,0 +1,103 @@ +/* + * linux/include/asm-arm/arch-sa1100/netbook_series7.h + * + * + * This file contains the hardware specific definitions for + * Psion's Netbook and Series7 devices. For brevity, the defines + * are not NETBOOK_SERIES7_* nor PSION_SERIES7_* + * but NETBOOK_ (unless there is a proven difference among the machines) + * + * History: + * 2004/06/22: created by Taneli Leppa + * 2004/07/02: Klaasjan van Druten: + * add red LED and LCD power definitions, plus some cosmetic changes + * (including rename to netbook_series7.h) + * + * + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#error "include instead" +#endif + +/* LEDs: + - Green/Amber LED is hardware controlled (external power/charger) + - Red LED is software controlled + */ +#define NETBOOK_GPIO_LED_RED GPIO_GPIO(14) + +#define NETBOOK_GPIO_LCD (GPIO_GPIO(17)) + +/* remaining output GPIOs (as deduced with arlo), function unknown */ +#define NETBOOK_GPIO_UNKNOWN_OUTPUT ( GPIO_GPIO(23) | GPIO_GPIO(22) |\ + GPIO_GPIO(21) | GPIO_GPIO(19) | GPIO_GPIO(15) | GPIO_GPIO(13) \ + | GPIO_GPIO(12) ) + +/* 1 Mbyte "personality" Flash at 0x00000000. + + Is this 1 Mbyte or 2 Mbytes? Not sure, but lets assume 1 Mbyte. +*/ +#define NETBOOK_FLASH_SIZE 1048576 +#define NETBOOK_FLASH_P 0x00000000 +#define NETBOOK_FLASH_V 0xf2000000 + +/* This is just tracking versions easier, nothing hardware related. */ +#define NETBOOK_PCMCIA_SUPPORT_VERSION 2 + +#define NETBOOK_PCMCIA_DEVID "netbook-pcmcia" + +/* + This is where we get card plug/unplug notifications. + + Maybe this shared like the CompactFlash interrupt. + + Oh, and GPIO 10 is sometimes seems when CF or PCMCIA card is + ejected (properly, using the button next to the slot). + */ +#define NETBOOK_PCMCIA_EVENT_IRQ IRQ_GPIO25 +#define NETBOOK_PCMCIA_EVENT_GPIO GPIO_GPIO(25) + +#define NETBOOK_PCMCIA_GPIO GPIO_GPIO(25) +/* + Currently, we use the timer interrupt as the PCMCIA interrupt. + This is because we don't know yet how to enable PCMCIA interrupts + (I'm pretty sure they are somehow enabled, but how?) +*/ +#define NETBOOK_PCMCIA_IRQ IRQ_OST0 + +#define NETBOOK_CF_IRQ IRQ_GPIO11 +#define NETBOOK_CF_GPIO GPIO_GPIO(11) + +// ASIC14 is the helper chip for Netbook specific functions. +#define NETBOOK_ASIC14_P 0x10000000 +#define NETBOOK_ASIC14_V 0xf1000000 +#define NETBOOK_ASIC14_LENGTH 0x00001000 + +#define NETBOOK_ASIC14_MEM32(x) *((volatile u32 *)(NETBOOK_ASIC14_V + x)) +#define NETBOOK_ASIC14_MEM16(x) *((volatile u16 *)(NETBOOK_ASIC14_V + x)) +#define NETBOOK_ASIC14_MEM8(x) *((volatile u8 *)(NETBOOK_ASIC14_V + x)) + +#define NETBOOK_ASIC14_STATUS_REG 0xa +#define NETBOOK_ASIC14_POWER_REG 0x8 + +/* This is some sort of status / PCMCIA reset register + * + * bit 0 = pcmcia present + * bit 1 = cf present + * bit 2 = pcmcia reset + * bit 3 = cf reset + */ +#define NETBOOK_ASIC14_STATUS3_REG 0x2e +#define NETBOOK_ASIC14_STATUS4_REG 0x12 +#define NETBOOK_ASIC14_STATUS5_REG 0x2a + +#define NETBOOK_ASIC14_POWER_PCMCIA (1 << 4) +#define NETBOOK_ASIC14_POWER_CF (1 << 5) + +#define NETBOOK_ASIC14_STATUS3_PCMCIA 0x1 +#define NETBOOK_ASIC14_STATUS3_CF 0x2 + + +#define NETBOOK_ASIC14_CONTRAST_REG 0x16 +#define NETBOOK_ASIC14_BRIGHTNESS_REG 0x18 +