KernelVersion: 2.2.19-rmk2pre2 diff -urN --ignore-space-change linux-rmk2pre2/Documentation/Configure.help linux-rs3/Documentation/Configure.help --- linux-rmk2pre2/Documentation/Configure.help Sun Mar 25 17:37:29 2001 +++ linux-rs3/Documentation/Configure.help Thu Jan 3 12:51:59 2002 @@ -7290,6 +7290,11 @@ If you wish to compile a kernel for the EBSA-110, then you should always answer Y to this. +RiscStation Ethernet Driver +CONFIG_ARM_ETHERS + If you have an RiscStation, then you should say Y to this option if + you wish to use the onboard ethernet controller. + Support CDROM drives that are not SCSI or IDE/ATAPI CONFIG_CD_NO_IDESCSI If you have a CDROM drive that is neither SCSI nor IDE/ATAPI, say Y @@ -9858,6 +9863,11 @@ say M here and read Documentation/modules.txt. The module will be called pc110pad.o. +ARM7500[FE] PS/2 mouse support +CONFIG_7K5MOUSE + Say Y to this option if you want to use the inbuilt mouse port on + an ARM7500 based system, such as a RiscStation. + Microsoft busmouse support CONFIG_MS_BUSMOUSE These animals (also called Inport mice) are connected to an @@ -10423,6 +10433,16 @@ a work-around for a number of buggy BIOSes. Switch this option on if your computer crashes instead of powering off properly. +BushSTB PS/2 keyboard support +CONFIG_BUSHSTB_PS2KEYB + Say Y here to select PS/2 keyboard support for the Bush STB. This is + only useful if your STB has been modified to have a PS/2 keyboard port. + +BushSTB IR keyboard support +CONFIG_BUSHSTB_IRKEYB + Say Y here to select IR keyboard support for the Bush STB. This option + supports both the full-size and the remote-control keyboards. + Watchdog Timer Support CONFIG_WATCHDOG If you say Y here (and to one of the following options) and create a @@ -13065,6 +13085,23 @@ Include support for the NetWinder CONFIG_ARCH_NETWINDER Say Y here if you intend to run this kernel on the NetWinder. + +Include support for Bush Internet Set-Top Box +CONFIG_ARCH_BUSHSTB + Say Y here if you intend to run this kernel on the ARM7500FE based + Bush internet set-top box + +Include support for RiscStation R7500 +CONFIG_ARCH_RISCSTATION + Say Y here if you intend to run this kernel on an RiscStation R7500 + machine + +Fake architecture when loading by RISC OS +CONFIG_ARM_LOADER_FAKEARCH + Say Y here if you are using either a Bush Internet set-top box or a + RiscStation kernel via !Linux under RISC OS. This option will fix the + architecture number passed from RISC PC to the correct one for the + compiled kernel. Math emulation CONFIG_NWFPE diff -urN --ignore-space-change linux-rmk2pre2/Makefile linux-rs3/Makefile --- linux-rmk2pre2/Makefile Sat Jun 9 11:44:45 2001 +++ linux-rs3/Makefile Tue Dec 18 16:04:06 2001 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 19 -EXTRAVERSION = -rmk2 +EXTRAVERSION = -rmk2-rs3 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/Makefile linux-rs3/arch/arm/Makefile --- linux-rmk2pre2/arch/arm/Makefile Sat Jun 9 11:44:45 2001 +++ linux-rs3/arch/arm/Makefile Sat Dec 22 12:59:06 2001 @@ -96,6 +96,10 @@ else ifeq ($(CONFIG_CPU_SA110),y) CFLAGS += $(CFLAGS_SA110) + else + ifeq ($(CONFIG_CPU_ARM7500FE),y) + CFLAGS += $(CFLAGS_ARM7) + endif endif endif endif @@ -137,6 +141,16 @@ ARCHDIR = nexuspci endif +ifeq ($(CONFIG_ARCH_RISCSTATION),y) +MACHINE = rpc +ARCHDIR = rs +endif + +ifeq ($(CONFIG_ARCH_BUSHSTB),y) +MACHINE = bushstb +ARCHDIR = bushstb +endif + HEAD := arch/arm/kernel/head-$(PROCESSOR).o \ arch/arm/kernel/init_task.o SUBDIRS += arch/arm/kernel arch/arm/mm arch/arm/lib \ @@ -157,6 +171,14 @@ DRIVERS += drivers/acorn/scsi/acorn-scsi.a endif +ifeq ($(CONFIG_ARCH_BUSHSTB),y) +SUBDIRS += drivers/acorn +DRIVERS += drivers/acorn/block/acorn-block.a +DRIVERS += drivers/acorn/char/acorn-char.a +DRIVERS += drivers/acorn/net/acorn-net.a +DRIVERS += drivers/acorn/scsi/acorn-scsi.a +endif + MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot # The following is a hack to get 'constants.h' up @@ -225,4 +247,17 @@ rpc_config: $(RM) arch/arm/defconfig cp arch/arm/def-configs/rpc arch/arm/defconfig + +bushstb_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/bushstb arch/arm/defconfig + +rs_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/riscstation arch/arm/defconfig + +riscstation_config: + $(RM) arch/arm/defconfig + cp arch/arm/def-configs/riscstation arch/arm/defconfig + diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/boot/compressed/Makefile linux-rs3/arch/arm/boot/compressed/Makefile --- linux-rmk2pre2/arch/arm/boot/compressed/Makefile Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/boot/compressed/Makefile Tue Dec 18 17:01:50 2001 @@ -25,6 +25,15 @@ ZTEXTADDR = 0x10008000 endif +ifeq ($(CONFIG_ARCH_RISCSTATION),y) +ZTEXTADDR = 0x10008000 +endif + +ifeq ($(CONFIG_ARCH_BUSHSTB),y) +OBJS += ll_char_wr.o font.o +ZTEXTADDR = 0x10008000 +endif + ifeq ($(CONFIG_ARCH_EBSA110),y) ZTEXTADDR = 0x00008000 endif diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/boot/compressed/head.S linux-rs3/arch/arm/boot/compressed/head.S --- linux-rmk2pre2/arch/arm/boot/compressed/head.S Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/boot/compressed/head.S Tue Dec 18 17:30:27 2001 @@ -4,6 +4,7 @@ * Copyright (C) 1996-1999 Russell King */ #include +#include .section ".start", #alloc, #execinstr /* @@ -29,6 +30,21 @@ .text 1: teq r0, #0 bne 1b + +#ifdef CONFIG_ARM_LOADER_FAKEARCH + teq r1, #1 @ is this an RPC? +#ifdef CONFIG_ARCH_RISCSTATION + moveq r1, #46 @ ensure we are a riscstation + @ this is due to the rpc loader + @ not yet being able to tell + @ between an rpc and an rs +#endif /* CONFIG_ARCH_RISCSTATION */ +#ifdef CONFIG_ARCH_BUSHSTB + moveq r1, #122 @ this is now a bush stb! +#endif + + +#endif mov r7, r1 @ save architecture ID mrc p15, 0, r6, c0, c0 @ get processor ID adr r2, LC0 diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/config.in linux-rs3/arch/arm/config.in --- linux-rmk2pre2/arch/arm/config.in Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/config.in Thu Jan 3 11:42:24 2002 @@ -19,8 +19,11 @@ A5000 CONFIG_ARCH_A5K \ RiscPC CONFIG_ARCH_RPC \ EBSA-110 CONFIG_ARCH_EBSA110 \ + RiscStation CONFIG_ARCH_RISCSTATION \ + BushSTB CONFIG_ARCH_BUSHSTB \ FootBridge-based CONFIG_FOOTBRIDGE" RiscPC + if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then bool 'FootBridge in HOST mode' CONFIG_HOST_FOOTBRIDGE if [ "$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then @@ -28,6 +31,8 @@ else define_bool CONFIG_ADDIN_FOOTBRIDGE y fi +else + define_bool CONFIG_HOST_FOOTBRIDGE n fi if [ "$CONFIG_HOST_FOOTBRIDGE" = "y" ]; then @@ -40,6 +45,8 @@ # If we get any other footbridge-based plug-in boards, then # add your architecture options here define_bool CONFIG_ARCH_CO285 y +else + define_bool CONFIG_ARCH_CO285 n fi # @@ -48,6 +55,7 @@ # if [ "$CONFIG_ARCH_ARC" = "y" -o \ "$CONFIG_ARCH_A5K" = "y" -o \ + "$CONFIG_ARCH_RISCSTATION" = "y" -o \ "$CONFIG_ARCH_RPC" = "y" ]; then define_bool CONFIG_ARCH_ACORN y else @@ -85,7 +93,15 @@ define_bool CONFIG_CPU_32v3 y bool 'Support ARM610' CONFIG_CPU_ARM6 bool 'Support ARM710' CONFIG_CPU_ARM7 + bool 'Support ARM7500FE' CONFIG_CPU_ARM7500FE bool 'Support StrongARM110' CONFIG_CPU_SA110 + else + if [ "$CONFIG_ARCH_RISCSTATION" = "y" -o \ + "$CONFIG_ARCH_BUSHSTB" = "y" ]; then + define_bool CONFIG_CPU_32v3 y + define_bool CONFIG_CPU_ARM7500FE y + fi + fi fi fi @@ -113,8 +129,22 @@ fi if [ "$CONFIG_CPU_32" = "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then + if [ "$CONFIG_ARCH_RISCSTATION" = "y" -o \ + "$CONFIG_ARCH_BUSHSTB" = "y" -o \ + "$CONFIG_CPU_ARM7500" = "y" -o \ + "$CONFIG_CPU_ARM7500FE" = "y" ]; then +# alignment trap seems to be lethal to 7500s... ? + define_boot CONFIG_ALIGNMENT_TRAP n + else bool 'Kernel-mode alignment trap handler' CONFIG_ALIGNMENT_TRAP + fi +fi + +if [ "$CONFIG_ARCH_RISCSTATION" = "y" -o \ + "$CONFIG_ARCH_BUSHSTB" = "y" ]; then + bool 'Fake architecture when loading by RISC OS' CONFIG_ARM_LOADER_FAKEARCH fi + #bool 'Split text into discardable sections' CONFIG_TEXT_SECTIONS endmenu @@ -198,8 +228,12 @@ if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' - if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then + if [ "$CONFIG_ARCH_ACORN" != "y" -a \ + "$CONFIG_ARCH_EBSA110" != "y" -a \ + "$CONFIG_ARCH_BUSHSTB" != "y" ]; then bool 'VGA text console' CONFIG_VGA_CONSOLE + else + define_bool CONFIG_VGA_CONSOLE n fi bool 'Support Frame buffer devices' CONFIG_FB source drivers/video/Config.in diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/def-configs/bushstb linux-rs3/arch/arm/def-configs/bushstb --- linux-rmk2pre2/arch/arm/def-configs/bushstb Thu Jan 1 01:00:00 1970 +++ linux-rs3/arch/arm/def-configs/bushstb Fri Dec 21 00:05:46 2001 @@ -0,0 +1,370 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# System and processor type +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_RISCSTATION is not set +CONFIG_ARCH_BUSHSTB=y +# CONFIG_FOOTBRIDGE is not set +# CONFIG_HOST_FOOTBRIDGE is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_ACORN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +CONFIG_CPU_32v3=y +CONFIG_CPU_ARM7500FE=y +# CONFIG_ISA_DMA is not set +# CONFIG_ARM_LOADER_FAKEARCH is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# General setup +# +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_NWFPE=y +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set +CONFIG_PARPORT=y +CONFIG_PARPORT_PC=y + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_IDE is not set +# CONFIG_BLK_DEV_HD_ONLY is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_MD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_XD is not set +CONFIG_PARIDE_PARPORT=y +CONFIG_PARIDE=y +CONFIG_PARIDE_PD=y +CONFIG_PARIDE_PCD=m +CONFIG_PARIDE_PF=m +CONFIG_PARIDE_PT=m +CONFIG_PARIDE_PG=y +CONFIG_PARIDE_ATEN=m +CONFIG_PARIDE_BPCK=m +CONFIG_PARIDE_COMM=m +CONFIG_PARIDE_DSTR=m +CONFIG_PARIDE_FIT2=m +CONFIG_PARIDE_FIT3=m +CONFIG_PARIDE_EPAT=m +CONFIG_PARIDE_EPIA=m +CONFIG_PARIDE_FRIQ=m +CONFIG_PARIDE_FRPW=m +CONFIG_PARIDE_KBIC=m +CONFIG_PARIDE_KTTI=m +CONFIG_PARIDE_ON20=m +CONFIG_PARIDE_ON26=m +# CONFIG_BLK_DEV_HD 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 +# CONFIG_UNIX98_PTYS is not set +CONFIG_PRINTER=y +CONFIG_PRINTER_READBACK=y + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_JOYSTICK is not set +# CONFIG_QIC02_TAPE is not set +CONFIG_BUSHSTB_IRKEYB=y +# CONFIG_BUSHSTB_PS2KEYB is not set +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Video For Linux +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DTLK is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set + +# +# Console drivers +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_FB_ACORN=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 is not set +CONFIG_FBCON_CFB8=y +CONFIG_FBCON_CFB16=y +CONFIG_FBCON_CFB24=y +# 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_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=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_NETLINK is not set +# CONFIG_FIREWALL 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 is not set +# CONFIG_IP_ROUTER is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +CONFIG_IP_ALIAS=y +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_RARP is not set +# CONFIG_SKB_LARGE is not set +# CONFIG_IPV6 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_LLC 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 +# CONFIG_CPU_IS_SLOW is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA 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_NET_SB1000 is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PLIP=y +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# 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_HOSTESS_SV11 is not set +# CONFIG_COSA is not set +# CONFIG_SEALEVEL_4021 is not set +# CONFIG_SYNCLINK_SYNCPPP is not set +# CONFIG_LANMEDIA is not set +# CONFIG_COMX is not set +# CONFIG_HDLC is not set +# CONFIG_DLCI is not set +# CONFIG_SBNI is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Filesystems +# +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_ADFS_FS=y +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_MINIX_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_EFS_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +CONFIG_NFSD=m +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMD_DISKLABEL is not set +# CONFIG_SGI_DISKLABEL is not set +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +# 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_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +# 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_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_RU is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_INFO is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_LL=y diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/def-configs/riscstation linux-rs3/arch/arm/def-configs/riscstation --- linux-rmk2pre2/arch/arm/def-configs/riscstation Thu Jan 1 01:00:00 1970 +++ linux-rs3/arch/arm/def-configs/riscstation Tue Dec 18 17:41:37 2001 @@ -0,0 +1,450 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# System and processor type +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_EBSA110 is not set +CONFIG_ARCH_RISCSTATION=y +# CONFIG_ARCH_BUSHSTB is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_HOST_FOOTBRIDGE is not set +# CONFIG_ARCH_CO285 is not set +CONFIG_ARCH_ACORN=y +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +CONFIG_CPU_32v3=y +CONFIG_CPU_ARM7500FE=y +# CONFIG_ISA_DMA is not set +CONFIG_ARM_LOADER_FAKEARCH=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# General setup +# +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_NWFPE=y +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set +CONFIG_PARPORT=y +CONFIG_PARPORT_PC=y + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD_IDE is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_BLK_DEV_CMD640 is not set +# CONFIG_IDE_CHIPSETS is not set + +# +# Additional Block Devices +# +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_XD is not set +CONFIG_PARIDE_PARPORT=y +CONFIG_PARIDE=y + +# +# Parallel IDE high-level drivers +# +CONFIG_PARIDE_PD=y +CONFIG_PARIDE_PCD=m +CONFIG_PARIDE_PF=m +CONFIG_PARIDE_PT=m +CONFIG_PARIDE_PG=y + +# +# Parallel IDE protocol modules +# +CONFIG_PARIDE_ATEN=m +CONFIG_PARIDE_BPCK=m +CONFIG_PARIDE_COMM=m +CONFIG_PARIDE_DSTR=m +CONFIG_PARIDE_FIT2=m +CONFIG_PARIDE_FIT3=m +CONFIG_PARIDE_EPAT=m +CONFIG_PARIDE_EPIA=m +CONFIG_PARIDE_FRIQ=m +CONFIG_PARIDE_FRPW=m +CONFIG_PARIDE_KBIC=m +CONFIG_PARIDE_KTTI=m +CONFIG_PARIDE_ON20=m +CONFIG_PARIDE_ON26=m +# CONFIG_BLK_DEV_HD is not set + +# +# Acorn-specific block devices +# +# CONFIG_BLK_DEV_IDE_CARDS is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_ATOMWIDE_SERIAL is not set +# CONFIG_DUALSP_SERIAL is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_PRINTER=y +CONFIG_PRINTER_READBACK=y + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +CONFIG_MOUSE=y +# CONFIG_PSMOUSE is not set +CONFIG_7K5MOUSE=y +# CONFIG_82C710_MOUSE is not set +# CONFIG_PC110_PAD is not set + +# +# Joysticks +# +# CONFIG_JOYSTICK is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Video For Linux +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DTLK is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set + +# +# Console drivers +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_FB_ACORN=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 is not set +CONFIG_FBCON_CFB8=y +CONFIG_FBCON_CFB16=y +CONFIG_FBCON_CFB24=y +# 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_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=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_NETLINK is not set +# CONFIG_FIREWALL is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_IP_ROUTER is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +CONFIG_IP_ALIAS=y +# CONFIG_SYN_COOKIES is not set + +# +# (it is safe to leave these untouched) +# +# CONFIG_INET_RARP is not set +# CONFIG_SKB_LARGE is not set +# CONFIG_IPV6 is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_LLC 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 +# CONFIG_CPU_IS_SLOW is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA 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_NET_SB1000 is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_ARM_ETHER1 is not set +# CONFIG_ARM_ETHER3 is not set +# CONFIG_ARM_ETHERH is not set +CONFIG_ARM_ETHERS=y +# 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_RTL8139 is not set +# CONFIG_RTL8139TOO is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_EISA is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PLIP=y +# CONFIG_PPP is not set +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +# 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_HOSTESS_SV11 is not set +# CONFIG_COSA is not set +# CONFIG_SEALEVEL_4021 is not set +# CONFIG_SYNCLINK_SYNCPPP is not set +# CONFIG_LANMEDIA is not set +# CONFIG_COMX is not set +# CONFIG_HDLC is not set +# CONFIG_DLCI is not set +# CONFIG_SBNI is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Filesystems +# +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_ADFS_FS=y +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=m +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_MINIX_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_EFS_FS is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +CONFIG_ROOT_NFS=y +CONFIG_NFSD=m +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_OSF_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SGI_PARTITION is not set +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_SMD_DISKLABEL is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_SGI_DISKLABEL is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_ACORN_PARTITION=y +CONFIG_ACORN_PARTITION_ADFS=y +# CONFIG_ACORN_PARTITION_ICS is not set +# CONFIG_ACORN_PARTITION_POWERTEC is not set +CONFIG_ACORN_PARTITION_RISCIX=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +# 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_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +# 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_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_RU is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_INFO is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_LL=y diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/defconfig linux-rs3/arch/arm/defconfig --- linux-rmk2pre2/arch/arm/defconfig Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/defconfig Thu Jan 1 01:00:00 1970 @@ -1,493 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_ARM=y - -# -# System and processor type -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_EBSA110 is not set -CONFIG_FOOTBRIDGE=y -CONFIG_HOST_FOOTBRIDGE=y -# CONFIG_ADDIN_FOOTBRIDGE is not set -CONFIG_ARCH_EBSA285=y -# CONFIG_CATS is not set -CONFIG_ARCH_NETWINDER=y -# CONFIG_ARCH_ACORN is not set -CONFIG_PCI=y -CONFIG_ISA_DMA=y -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set -# CONFIG_CPU_ARM2 is not set -# CONFIG_CPU_ARM3 is not set -# CONFIG_CPU_ARM6 is not set -# CONFIG_CPU_ARM7 is not set -CONFIG_CPU_SA110=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_ALIGNMENT_TRAP is not set -# CONFIG_TEXT_SECTIONS is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# -# General setup -# -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_CMDLINE="root=/dev/hda2 ro mem=32M parport=0x378,7 ide0=autotune" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -# CONFIG_LEDS_CPU is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_BLK_DEV_IDEDMA=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_VIA82C586 is not set -# CONFIG_BLK_DEV_CMD646 is not set -CONFIG_BLK_DEV_SL82C105=y -# CONFIG_IDE_CHIPSETS is not set - -# -# Additional Block Devices -# -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_STRIPED=m -CONFIG_MD_MIRRORING=m -CONFIG_MD_RAID5=m -CONFIG_BLK_DEV_RAM=y -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_BLK_DEV_XD is not set -CONFIG_PARIDE_PARPORT=y -CONFIG_PARIDE=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -# CONFIG_BLK_DEV_HD is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_UNIX98_PTYS is not set -CONFIG_PRINTER=m -CONFIG_PRINTER_READBACK=y -CONFIG_MOUSE=y - -# -# Mice -# -# CONFIG_ATIXL_BUSMOUSE is not set -# CONFIG_BUSMOUSE is not set -# CONFIG_MS_BUSMOUSE is not set -CONFIG_PSMOUSE=y -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set -# CONFIG_QIC02_TAPE is not set -CONFIG_WATCHDOG=y - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_WDT is not set -CONFIG_SOFT_WATCHDOG=y -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -CONFIG_DS1620=y -CONFIG_NWBUTTON=y -CONFIG_NWBUTTON_REBOOT=y -CONFIG_NWFLASH=m -# CONFIG_NVRAM is not set -CONFIG_RTC=y - -# -# Video For Linux -# -# CONFIG_VIDEO_DEV is not set - -# -# Joystick support -# -# CONFIG_JOYSTICK is not set -# CONFIG_DTLK is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set - -# -# Console drivers -# -CONFIG_VGA_CONSOLE=y -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=y -# CONFIG_FB_MATROX is not set -# CONFIG_FB_ATY is not set -# 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 is not set -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_CFB24=y -# 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=y -# 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=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_NETLINK is not set -# CONFIG_FIREWALL 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_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_IP_ROUTER is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -CONFIG_IP_ALIAS=y -# CONFIG_SYN_COOKIES is not set - -# -# (it is safe to leave these untouched) -# -# CONFIG_INET_RARP is not set -CONFIG_SKB_LARGE=y -# CONFIG_IPV6 is not set - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set -# CONFIG_LLC 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 -# CONFIG_CPU_IS_SLOW is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA subsystem support -# -# CONFIG_IRDA is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -CONFIG_NET_ETHERNET=y -# CONFIG_ARM_AM79C961A is not set -CONFIG_NET_VENDOR_3COM=y -# CONFIG_EL1 is not set -# CONFIG_EL2 is not set -# CONFIG_ELPLUS is not set -# CONFIG_EL16 is not set -# CONFIG_EL3 is not set -# CONFIG_3C515 is not set -CONFIG_VORTEX=y -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_RTL8139 is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_ACENIC is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_EISA=y -# CONFIG_PCNET32 is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_CS89x0 is not set -# CONFIG_DE4X5 is not set -CONFIG_DEC_ELCP=m -# CONFIG_DGRS is not set -# CONFIG_EEXPRESS_PRO100 is not set -# CONFIG_LNE390 is not set -# CONFIG_NE3210 is not set -CONFIG_NE2K_PCI=y -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_ES3210 is not set -# CONFIG_EPIC100 is not set -# CONFIG_ZNET is not set -# CONFIG_NET_POCKET is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_DLCI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m - -# -# CCP compressors for PPP are only built as modules. -# -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -# CONFIG_NET_RADIO is not set -# CONFIG_TR is not set -# CONFIG_SHAPER is not set -# CONFIG_HOSTESS_SV11 is not set -# CONFIG_COSA is not set -# CONFIG_RCPCI is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# Sound -# -CONFIG_SOUND=m -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_OSS=m -# CONFIG_SOUND_PAS is not set -CONFIG_SOUND_SB=m -CONFIG_SOUND_ADLIB=m -# CONFIG_SOUND_GUS is not set -# CONFIG_SOUND_MPU401 is not set -# CONFIG_SOUND_PSS is not set -# CONFIG_SOUND_MSS is not set -# CONFIG_SOUND_SSCAPE is not set -# CONFIG_SOUND_TRIX is not set -# CONFIG_SOUND_MAD16 is not set -# CONFIG_SOUND_WAVEFRONT is not set -# CONFIG_SOUND_CS4232 is not set -# CONFIG_SOUND_OPL3SA2 is not set -# CONFIG_SOUND_MAUI is not set -# CONFIG_SOUND_SGALAXY is not set -# CONFIG_SOUND_AD1816 is not set -# CONFIG_SOUND_OPL3SA1 is not set -# CONFIG_SOUND_SOFTOSS is not set -# CONFIG_SOUND_YM3812 is not set -# CONFIG_SOUND_VMIDI is not set -# CONFIG_SOUND_UART6850 is not set -# CONFIG_SOUND_VIDC is not set -CONFIG_SOUND_WAVEARTIST=m -CONFIG_WAVEARTIST_BASE=250 -CONFIG_WAVEARTIST_IRQ=12 -CONFIG_WAVEARTIST_DMA=3 -CONFIG_WAVEARTIST_DMA2=7 - -# -# Additional low level sound drivers -# -# CONFIG_LOWLEVEL_SOUND is not set - -# -# Filesystems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -CONFIG_ADFS_FS=y -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=m -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -# CONFIG_NFSD_SUN is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set - -# -# Partition Types -# -# CONFIG_OSF_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_SGI_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_ADFS=y -# CONFIG_ACORN_PARTITION_ICS is not set -# CONFIG_ACORN_PARTITION_POWERTEC is not set -# CONFIG_ACORN_PARTITION_RISCIX is not set -CONFIG_NLS=y - -# -# Native Language Support -# -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -# 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_874 is not set -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -# 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_8 is not set -# CONFIG_NLS_ISO8859_9 is not set -CONFIG_NLS_ISO8859_15=m -# CONFIG_NLS_KOI8_R is not set - -# -# Kernel hacking -# -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_LL is not set diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/kernel/Makefile linux-rs3/arch/arm/kernel/Makefile --- linux-rmk2pre2/arch/arm/kernel/Makefile Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/kernel/Makefile Sun Oct 7 16:13:44 2001 @@ -19,6 +19,8 @@ O_OBJS_arc = dma-arc.o iic.o fiq.o oldlatches.o O_OBJS_a5k = dma-a5k.o iic.o fiq.o O_OBJS_rpc = dma-rpc.o iic.o fiq.o +O_OBJS_rs = dma-rpc.o iic.o fiq.o +O_OBJS_bushstb = dma-rpc.o fiq.o O_OBJS_ebsa110 = dma-dummy.o O_OBJS_footbridge = dma-footbridge.o $(ISA_DMA_OBJS) isa.o O_OBJS_nexuspci = dma-dummy.o @@ -26,6 +28,8 @@ OX_OBJS_arc = dma.o OX_OBJS_a5k = dma.o OX_OBJS_rpc = dma.o +OX_OBJS_rs = dma.o +OX_OBJS_bushstb = dma.o OX_OBJS_ebsa110 = OX_OBJS_footbridge= dma.o hw-footbridge.o OX_OBJS_nexuspci = diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/kernel/entry-armv.S linux-rs3/arch/arm/kernel/entry-armv.S --- linux-rmk2pre2/arch/arm/kernel/entry-armv.S Sat Jun 9 11:44:45 2001 +++ linux-rs3/arch/arm/kernel/entry-armv.S Thu Jan 3 12:28:51 2002 @@ -4,10 +4,13 @@ * Copyright (C) 1996,1997,1998 Russell King. * ARM700 fix by Matthew Godbolt (linux-user@willothewisp.demon.co.uk) * + * Addition of CONFIG_ARCH_RISCSTATION to this code, copied from netwinder + * used of IRQ register D + * * Low-level vector interface routines * - * Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction that causes - * it to save wrong values... Be aware! + * Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction + * that causes it to save wrong values... Be aware! */ #include /* for CONFIG_ARCH_xxxx */ #include @@ -94,6 +97,12 @@ adreq \base, irq_prio_d teqeq \irqstat, #0 #endif +#if defined(CONFIG_ARCH_RISCSTATION) || defined(CONFIG_ARCH_BUSHSTB) + ldreqb \irqstat, [r4, #0x74] @ get irq D + ldreq \base, =irq_reg_d + teqeq \irqstat, #0 +#endif + ldreqb \irqstat, [r4, #0x14] @ get low priority adreq \base, irq_prio_l @@ -105,6 +114,25 @@ * Interrupt table (incorporates priority) */ .macro irq_prio_table +#if defined(CONFIG_ARCH_RISCSTATION) || defined(CONFIG_ARCH_BUSHSTB) +irq_reg_d: + .byte 0, 56,57,57,58,58,58,58,59,59,59,59,59,59,59,59 + .byte 60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60 + .byte 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61 + .byte 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61 + .byte 62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62 + .byte 62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62 + .byte 62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62 + .byte 62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 + .byte 63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 +#endif irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/kernel/head-armv.S linux-rs3/arch/arm/kernel/head-armv.S --- linux-rmk2pre2/arch/arm/kernel/head-armv.S Sat Jun 9 11:44:45 2001 +++ linux-rs3/arch/arm/kernel/head-armv.S Thu Jan 3 12:08:07 2002 @@ -201,7 +201,7 @@ 1: #endif #endif -#ifdef CONFIG_ARCH_RPC +#if defined(CONFIG_ARCH_RPC) || defined(CONFIG_ARCH_RISCSTATION) || defined(CONFIG_ARCH_BUSHSTB) /* * Map in screen at 0x02000000 & SCREEN2_BASE * Similar reasons here - for debug. This is @@ -299,11 +299,15 @@ * r7 = byte offset into page tables for IO */ __lookup_architecture_type: + teq r1, #46 /* MACH_TYPE_RISCSTATION */ + teqne r1, #122 /* MACH_TYPE_BUSHSTB */ + adreq r4, __arch_types_start + 16 + beq 2f cmp r1, #(__arch_types_end - __arch_types_start) / 16 bge 1f adr r4, __arch_types_start add r4, r4, r1, lsl #4 - ldmia r4, {r4, r5, r6, r7} +2: ldmia r4, {r4, r5, r6, r7} mov r7, r7, lsr #18 mov pc, lr 1: mov r7, #0 @@ -406,7 +410,7 @@ * printk isn't working). For DEBUGGING ONLY!!! Do not leave * references to these in a production kernel! */ -#if defined(CONFIG_ARCH_RPC) +#if defined(CONFIG_ARCH_RPC) || defined(CONFIG_ARCH_RISCSTATION) || defined(CONFIG_ARCH_BUSHSTB) .macro addruart,rx mov \rx, #0xe0000000 orr \rx, \rx, #0x00010000 diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/kernel/setup.c linux-rs3/arch/arm/kernel/setup.c --- linux-rmk2pre2/arch/arm/kernel/setup.c Sat Jun 9 11:44:45 2001 +++ linux-rs3/arch/arm/kernel/setup.c Thu Jan 3 12:27:48 2002 @@ -43,7 +43,7 @@ unsigned int system_serial_high; unsigned int elf_hwcap; -#ifdef CONFIG_ARCH_ACORN +#if defined(CONFIG_ARCH_ACORN) || defined(CONFIG_ARCH_BUSHSTB) unsigned int memc_ctrl_reg; unsigned int number_mfm_drives; #endif @@ -245,7 +245,7 @@ fixup_acorn(struct machine_desc *desc, struct param_struct *params, char **cmdline) { -#ifdef CONFIG_ARCH_ACORN +#if defined(CONFIG_ARCH_ACORN) || defined(CONFIG_ARCH_BUSHSTB) || defined(CONFIG_ARCH_RISCSTATION) if (machine_is_riscpc()) { /* * RiscPC can't handle half-word loads and stores @@ -261,6 +261,21 @@ break; } } + + if (machine_is_riscstation()) { + /* + * Riscstation can't handle half-word loads and stores + */ + elf_hwcap &= ~HWCAP_HALF; + } + + if (machine_is_bushstb()) { + /* + * BushSTB can't handle half-word loads and stores + */ + elf_hwcap &= ~HWCAP_HALF; + } + memc_ctrl_reg = params->u1.s.memc_control_reg; number_mfm_drives = (params->u1.s.adfsdrives >> 3) & 3; #endif @@ -322,6 +337,9 @@ * this kernel. This should be integrated with the list * in head-armv.S. */ + +#define UNK_ARCH_ENTRY { "unknown", NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL } + static struct machine_desc machine_desc[] __initdata = { { "EBSA110", /* RMK */ 0x00000400, @@ -404,12 +422,139 @@ 0x06000000, 0x06000000+0x00200000, 0, 0, 0, 0, 0, NULL - }, { "SA1100-based", /* Nicolas Pitre */ + }, { "SA1100-based", /* Nicolas Pitre (16 )*/ NO_PARAMS, NO_VIDEO, 0, 0, 0, 0, 0, NULL - } + }, + + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 20 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 29 */ + UNK_ARCH_ENTRY, /* 30 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 39 */ + UNK_ARCH_ENTRY, /* 40 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + { "RiscStation", /* BJD */ + 0x10000100, + NO_VIDEO, + 1, 1, 0, 0, 0, + fixup_acorn + }, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 49 */ + UNK_ARCH_ENTRY, /* 50 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 59 */ + UNK_ARCH_ENTRY, /* 60 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 69 */ + UNK_ARCH_ENTRY, /* 70 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 79 */ + UNK_ARCH_ENTRY, /* 80 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 89 */ + UNK_ARCH_ENTRY, /* 90 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 99 */ + UNK_ARCH_ENTRY, /* 100 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 109 */ + UNK_ARCH_ENTRY, /* 110 */ + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, /* 119 */ + UNK_ARCH_ENTRY, /* 120 */ + UNK_ARCH_ENTRY, + { "BushSTB", /* VRS (122) */ + 0x10000100, + NO_VIDEO, + 1, 1, 0, 0, 0, + fixup_acorn + }, + +#if 0 + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY, + UNK_ARCH_ENTRY /* 129 */ +#endif }; /* @@ -568,7 +713,7 @@ if (!(params->u1.s.flags & FLAG_READONLY)) root_mountflags &= ~MS_RDONLY; -#ifdef CONFIG_ARCH_RPC +#if defined(CONFIG_ARCH_RPC) || defined(CONFIG_ARCH_RISCSTATION) || defined(CONFIG_ARCH_BUSHSTB) { extern void init_dram_banks(struct param_struct *); init_dram_banks(params); diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/lib/Makefile linux-rs3/arch/arm/lib/Makefile --- linux-rmk2pre2/arch/arm/lib/Makefile Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/lib/Makefile Sun Oct 7 16:10:51 2001 @@ -28,6 +28,14 @@ endif endif +ifdef CONFIG_ARCH_RISCSTATION + L_OBJS += floppydma.o io-acorn.o +endif + +ifdef CONFIG_ARCH_BUSHSTB + L_OBJS += floppydma.o io-acorn.o +endif + ifeq ($(MACHINE),ebsa110) L_OBJS += io-ebsa110.o else diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/mm/Makefile linux-rs3/arch/arm/mm/Makefile --- linux-rmk2pre2/arch/arm/mm/Makefile Sun Mar 25 17:31:54 2001 +++ linux-rs3/arch/arm/mm/Makefile Thu Oct 4 23:01:29 2001 @@ -15,7 +15,13 @@ endif ifeq ($(PROCESSOR),armv) - O_OBJS += mm-$(MACHINE).o proc-arm6,7.o proc-sa110.o ioremap.o + ifeq ($(ARCHDIR),bushstb) + O_OBJS += mm-rpc.o + else + O_OBJS += mm-$(MACHINE).o + + endif + O_OBJS += proc-arm6,7.o proc-sa110.o ioremap.o endif include $(TOPDIR)/Rules.make @@ -29,4 +35,3 @@ proc-arm2,3.o: ../lib/constants.h proc-arm6,7.o: ../lib/constants.h proc-sa110.o: ../lib/constants.h - diff -urN --ignore-space-change linux-rmk2pre2/arch/arm/special/Makefile linux-rs3/arch/arm/special/Makefile --- linux-rmk2pre2/arch/arm/special/Makefile Sat Jun 9 11:44:46 2001 +++ linux-rs3/arch/arm/special/Makefile Thu Oct 4 23:41:36 2001 @@ -21,6 +21,7 @@ KEYB_arc := defkeymap-acorn.o KEYB_a5k := defkeymap-acorn.o KEYB_rpc := defkeymap-acorn.o +KEYB_bushstb := defkeymap-acorn.o KEYB_ebsa110 := KEYB_footbridge := defkeymap.o pc_keyb.o diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/block/Makefile linux-rs3/drivers/acorn/block/Makefile --- linux-rmk2pre2/drivers/acorn/block/Makefile Sun Mar 25 17:31:42 2001 +++ linux-rs3/drivers/acorn/block/Makefile Wed Oct 3 21:32:35 2001 @@ -22,6 +22,10 @@ endif endif +ifeq ($(CONFIG_ARCH_RISCSTATION),y) + L_OBJS += ide-rstation.o +endif + ifeq ($(CONFIG_BLK_DEV_IDE_ICSIDE),y) L_OBJS += ide-ics.o else diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/block/ide-rstation.c linux-rs3/drivers/acorn/block/ide-rstation.c --- linux-rmk2pre2/drivers/acorn/block/ide-rstation.c Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/block/ide-rstation.c Thu Jan 3 12:19:09 2002 @@ -0,0 +1,94 @@ +/* ide-rstation.c + * + * Written by Ben Dooks (ben@fluff.org) + * released under GPL + * + * 16-01-2000 BJD first inclusion into 2.2.14-rmk2 +*/ + + +#define DEBUG 0 + +#define DRV_PREFIX "ide-rs" + +#define IRQ_PRI (56+3) +#define IRQ_SEC (56+4) + +#include +#include + +#include +#include +#include + +#include "../../block/ide.h" + +#ifndef CONFIG_ARCH_RISCSTATION +#error "compiling this code for non-riscstation hardware is dangerous!" +#endif + +void +ide_riscstation_mkhw(hw_regs_t *hw, unsigned long base, int irq) +{ + int i; + unsigned long ctl, add; + + memset(hw, 0, sizeof(*hw)); + + hw->irq = irq; + add = base; + + for (i=0; i <= 7; i++) { +#if DEBUG > 2 + printk(DRV_PREFIX ": port %d at %p\n", i, add); +#endif + hw->io_ports[i] = add; + add += 0x40 >> 2; + } + + hw->io_ports[IDE_CONTROL_OFFSET] = ctl = base + ((0xb80 - 0x800) >> 2); + + printk(DRV_PREFIX ": registering %0lx,%0lx irq %d\n", base, ctl, irq); + ide_register_hw(hw, NULL); +} + +void +ide_riscstation_init(void) +{ + hw_regs_t hw_pri, hw_sec; + + unsigned long base = 0x80000000 + ((0x0302b800 - 0x03000000) >> 2); + unsigned long iomd = IOMD_IOTCR; + unsigned int iotcr, tmp; + + printk("RiscStation IDE support, V0.05 [08-11-1999] (ben@fluff.org)\n"); + printk("warning: RiscStation support is BETA, please treat with care\n"); + + // try and setup cycle speed of area we're using... + + iotcr = inb(iomd); + +#ifdef DEBUG + printk(DRV_PREFIX ": IOTCR is %x\n", iotcr); +#endif + + iotcr = (iotcr & ~3) | 1; + outb(iomd, iotcr); + +#ifdef DEBUG + printk(DRV_PREFIX ": iomd state for IOTCR is %x\n", iotcr & 0xf); +#endif + + tmp = iotcr & 3; + + printk(DRV_PREFIX ": using %c speed cycles\n", 'A' + tmp); + + if (tmp != 1 && tmp != 2) + printk(DRV_PREFIX ": warning, timing out of specification!\n"); + + if (tmp == 2) + printk(DRV_PREFIX ": warning, fast cycles, PIO Mode 0/1 unusable\n"); + + ide_riscstation_mkhw(&hw_pri, base, IRQ_PRI); + ide_riscstation_mkhw(&hw_sec, base + (0x400 >> 2), IRQ_SEC); +} diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/char/Makefile linux-rs3/drivers/acorn/char/Makefile --- linux-rmk2pre2/drivers/acorn/char/Makefile Sun Mar 25 17:31:42 2001 +++ linux-rs3/drivers/acorn/char/Makefile Thu Jan 3 12:42:41 2002 @@ -16,12 +16,29 @@ L_OBJS_arc := keyb_arc.o L_OBJS_a5k := keyb_arc.o L_OBJS_rpc := keyb_ps2.o +L_OBJS_bushstb := + +ifeq ($(CONFIG_BUSHSTB_IRKEYB),y) + L_OBJS_bushstb += keyb_serir.o +endif + +ifeq ($(CONFIG_BUSHSTB_PS2KEYB),y) + L_OBJS_bushstb += keyb_ps2.o +endif ifeq ($(CONFIG_RPCMOUSE),y) LX_OBJS += mouse_rpc.o else ifeq ($(CONFIG_RPCMOUSE),m) MX_OBJS += mouse_rpc.o + endif +endif + +ifeq ($(CONFIG_7K5MOUSE),y) + LX_OBJS += mouse_7k5.o +else + ifeq ($(CONFIG_7K5MOUSE),m) + MX_OBJS += mouse_7k5.o endif endif diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/char/keyb_serir.c linux-rs3/drivers/acorn/char/keyb_serir.c --- linux-rmk2pre2/drivers/acorn/char/keyb_serir.c Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/char/keyb_serir.c Fri Dec 21 17:45:57 2001 @@ -0,0 +1,370 @@ +/* + * serir_ps2.c + * + * Keyboard driver for Bush STB based on original acorn PS/2 driver. + * + * Note!!! This driver talks directly to the hard wired ir controller. + * + * (c) 2001 Vincent Sanders + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define KPORTRX 0x2f8 + +extern void kbd_reset_kdown(void); +int kbd_read_mask; + +#define VERSION 100 + +#define KBD_REPORT_ERR +#define KBD_REPORT_UNKN + +#define KBD_ESCAPEE0 0xe0 /* in */ +#define KBD_ESCAPEE1 0xe1 /* in */ + +#define ESCE0(x) (0xe000|(x)) +#define ESCE1(x) (0xe100|(x)) + +#define KBD_BAT 0xaa /* in */ +#define KBD_SETLEDS 0xed /* out */ +#define KBD_ECHO 0xee /* in/out */ +#define KBD_BREAK 0xf0 /* in */ +#define KBD_TYPRATEDLY 0xf3 /* out */ +#define KBD_SCANENABLE 0xf4 /* out */ +#define KBD_DEFDISABLE 0xf5 /* out */ +#define KBD_DEFAULT 0xf6 /* out */ +#define KBD_ACK 0xfa /* in */ +#define KBD_DIAGFAIL 0xfd /* in */ +#define KBD_RESEND 0xfe /* in/out */ +#define KBD_RESET 0xff /* out */ + +#define CODE_BREAK 1 +#define CODE_ESCAPEE0 2 +#define CODE_ESCAPEE1 4 +#define CODE_ESCAPE12 8 + +#define K_NONE 0x7f +#define K_ESC 0x00 +#define K_F1 0x01 +#define K_F2 0x02 +#define K_F3 0x03 +#define K_F4 0x04 +#define K_F5 0x05 +#define K_F6 0x06 +#define K_F7 0x07 +#define K_F8 0x08 +#define K_F9 0x09 +#define K_F10 0x0a +#define K_F11 0x0b +#define K_F12 0x0c +#define K_PRNT 0x0d +#define K_SCRL 0x0e +#define K_BRK 0x0f +#define K_AGR 0x10 +#define K_1 0x11 +#define K_2 0x12 +#define K_3 0x13 +#define K_4 0x14 +#define K_5 0x15 +#define K_6 0x16 +#define K_7 0x17 +#define K_8 0x18 +#define K_9 0x19 +#define K_0 0x1a +#define K_MINS 0x1b +#define K_EQLS 0x1c +#define K_BKSP 0x1e +#define K_INS 0x1f +#define K_HOME 0x20 +#define K_PGUP 0x21 +#define K_NUML 0x22 +#define KP_SLH 0x23 +#define KP_STR 0x24 +#define KP_MNS 0x3a +#define K_TAB 0x26 +#define K_Q 0x27 +#define K_W 0x28 +#define K_E 0x29 +#define K_R 0x2a +#define K_T 0x2b +#define K_Y 0x2c +#define K_U 0x2d +#define K_I 0x2e +#define K_O 0x2f +#define K_P 0x30 +#define K_LSBK 0x31 +#define K_RSBK 0x32 +#define K_ENTR 0x47 +#define K_DEL 0x34 +#define K_END 0x35 +#define K_PGDN 0x36 +#define KP_7 0x37 +#define KP_8 0x38 +#define KP_9 0x39 +#define KP_PLS 0x4b +#define K_CAPS 0x5d +#define K_A 0x3c +#define K_S 0x3d +#define K_D 0x3e +#define K_F 0x3f +#define K_G 0x40 +#define K_H 0x41 +#define K_J 0x42 +#define K_K 0x43 +#define K_L 0x44 +#define K_SEMI 0x45 +#define K_SQOT 0x46 +#define K_HASH 0x1d +#define KP_4 0x48 +#define KP_5 0x49 +#define KP_6 0x4a +#define K_LSFT 0x4c +#define K_BSLH 0x33 +#define K_Z 0x4e +#define K_X 0x4f +#define K_C 0x50 +#define K_V 0x51 +#define K_B 0x52 +#define K_N 0x53 +#define K_M 0x54 +#define K_COMA 0x55 +#define K_DOT 0x56 +#define K_FSLH 0x57 +#define K_RSFT 0x58 +#define K_UP 0x59 +#define KP_1 0x5a +#define KP_2 0x5b +#define KP_3 0x5c +#define KP_ENT 0x67 +#define K_LCTL 0x3b +#define K_LALT 0x5e +#define K_SPCE 0x5f +#define K_RALT 0x60 +#define K_RCTL 0x61 +#define K_LEFT 0x62 +#define K_DOWN 0x63 +#define K_RGHT 0x64 +#define KP_0 0x65 +#define KP_DOT 0x66 + +static unsigned char keycode_translate[256] = +{ +/* 00 */ K_NONE, K_ESC , K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, +/* 08 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, +/* 10 */ K_NONE, K_NONE, K_NONE, K_NONE, K_AGR , K_1 , K_2 , K_3 , +/* 18 */ K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , K_MINS, +/* 20 */ K_EQLS, K_BKSP, K_TAB , K_Q , K_W , K_E , K_R , K_T , +/* 28 */ K_Y , K_U , K_I , K_O , K_P , K_LSBK, K_RSBK, K_BSLH, +/* 30 */ K_CAPS, K_A , K_S , K_D , K_F , K_G , K_H , K_J , +/* 38 */ K_K , K_L , K_SEMI, K_SQOT, K_ENTR, K_LSFT, K_Z , K_X , +/* 40 */ K_C , K_V , K_B , K_N , K_M , K_COMA, K_DOT , K_FSLH, +/* 48 */ K_RSFT, K_NONE, K_LCTL, K_NONE, K_LALT, K_SPCE, K_NONE, K_NONE, +/* 50 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, +/* 58 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_UP , +/* 60 */ K_NONE, K_LEFT, K_DOWN, K_RGHT, K_NONE, K_NONE, K_NONE, K_NONE, +/* 68 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, +/* 70 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, +/* 78 */ K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, + K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE, K_NONE +}; + +#ifdef CONFIG_MAGIC_SYSRQ +unsigned char serirkbd_sysrq_xlate[] = +{ + 27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + '`', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '0', '-', '=', '£', 127, 0, + 0, 0, 0, '/', '*', '#', 9, 'q', + 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', + 'p', '[', ']', '\\', 22, 23, 25, '7', + '8', '9', '-', 0, 'a', 's', 'd', 'f', + 'g', 'h', 'j', 'k', 'l', ';', '\'', 13, + '4', '5', '6', '+', 0, 0, 'z', 'x', + 'c', 'v', 'b', 'n', 'm', ',', '.', '/', + 0, 0, '1', '2', '3', 0, 0, ' ', + 0, 0, 0, 0, 0, '0', '.', 10, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +}; +#endif + +static inline void serirkbd_key(unsigned int keycode, unsigned int up_flag) +{ + handle_scancode(keycode, !up_flag); +} + +static inline void serirkbd_sendbyte(unsigned char val) +{ + /* while(!(inb(IOMD_KCTRL) & (1 << 7))); + outb(val, IOMD_KARTTX);*/ +} + +static unsigned char bi;//buffer offset +static unsigned char badframe;//flag if weve recived a dodgy frame - wait for an 0x0e + +static unsigned char status; + +static inline void serirkbd_reset(void) +{ + status = 0; + kbd_reset_kdown(); +} + +static void handle_rawcode(int keyval) +{ + /* BUSH STB bizare protocol warning */ + /* each "frame" starts with an 0x0e followed by : + * after careful examination of several remotes it appears the next byte + * is 0x6? ie top nybble is 0x6 bottom nybble is all manner of codes + * a small list of some are : + * for a small ir kb (kwr2022?) : + * 0x60 - keyboard i have + * 0x69 - anohter one + * 0x6a - (0x62 closed) on another small keyboard + * for a large one (kb200?) : + * 0x68 - large keybd + * + * sorry i got bored of documenting individual codes...looks like there + * are many + * + * the small kbds when closed then produce two codes 0x28 and 0x?? for the + * actual key pressed + * + * small keyboards when open and the large keyboards all the time + * produce a single byte with top bit clear for down, this frame is + * repeated about five times a second (20ms) whilst the key is depressed + * on key up frame is sent with top bit set of the keycode + * + * both keyboards also have a strange extra modifier labeled function + * on the small keyboards. This has a code of 0x49 we need a second keyset + * for when this modifier is in action, its used for "internet" keys but + * we should be able to re-use it for function keys (also in this list is + * # and euro symbol) + */ + + int keysym; + + /* reset the frame on recipt of an 0x0e */ + if(keyval==0x0e) + { + bi=0; + badframe=0; + return; + } + + /* check we havnt got a bad/useless frame */ + if(badframe) + return; + + if(bi==0) + { + /* check keyboard type */ + if((keyval & 0xf0) != 0x60) + badframe=1; + else + bi=1;//recognised keyb type + + return; + } + + keysym = keycode_translate[keyval & 0x7f]; + + /*special handling for 0x28 here */ + + if (keysym != K_NONE) + serirkbd_key(keysym, keyval & 0x80); + + badframe=1;//ensure any junk codes are eaten +} + +void serirkbd_leds(unsigned int leds) +{ + serirkbd_sendbyte(KBD_SETLEDS); + serirkbd_sendbyte(leds); + serirkbd_sendbyte(KBD_SCANENABLE); +} + +static void serirkbd_rx(int irq, void *dev_id, struct pt_regs *regs) +{ + char byte; + + kbd_pt_regs = regs; + + /* check to see if our port has a byte on it */ + if ((inb(KPORTRX+5) & 0x01) == 0) { + printk("not ours\n"); + return; + } + + handle_rawcode(inb(KPORTRX)); + + mark_bh(KEYBOARD_BH); +} + +static void serirkbd_tx(int irq, void *dev_id, struct pt_regs *regs) +{ +} + +__initfunc(int serirkbd_init_hw(void)) +{ + unsigned long flags; + + if (check_region(KPORTRX, 8) != 0) { + panic("irkeyb: IO region is already allocated"); + } + + request_region(KPORTRX, 8, "irkeyb"); + + save_flags_cli (flags); + if (request_irq (IRQ_IRKEYBOARD, serirkbd_rx, + 0, "keyboard", NULL) != 0) + panic("Could not allocate keyboard receive IRQ!"); + restore_flags (flags); + + printk (KERN_INFO "IR keyboard driver v%d.%02d, ", VERSION/100, VERSION%100); + printk (KERN_INFO "0x%x, irq %d\n", KPORTRX, IRQ_IRKEYBOARD); + + /* setup serial port */ + + outb(0x07, KPORTRX + 3); /* select the correct data format */ + outb(0x01, KPORTRX + 1); /* enable serial rx irq */ + outb(0xc1, KPORTRX + 2); /* enable serial fifo */ + + return 0; +} diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/char/mouse_7k5.c linux-rs3/drivers/acorn/char/mouse_7k5.c --- linux-rmk2pre2/drivers/acorn/char/mouse_7k5.c Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/char/mouse_7k5.c Wed Oct 3 21:32:35 2001 @@ -0,0 +1,627 @@ +/* + * linux/drivers/char/mouse_7k5.c + * + * Copyright (C) 1996-1998 Russell King (mouse_rpc.c) + * Copyright (C) 2000 Ben Dooks + * + * code to deal with 7k5 (7k5fe) based mouse devices. These are PS/2 style + * like the riscpc keyboard. + * + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +spinlock_t mouse_lock = SPIN_LOCK_UNLOCKED; + +#include "../../char/mouse.h" + +/* used when we send commands to the mouse that expect an ACK. */ +static unsigned char mouse_reply_expected = 0; + +static int open_count = 0; + +static int mouse_connected = 0; + + +#define AUX_BUF_SIZE 2048 /* This might be better divisible by + three to make overruns stay in sync but then the read function would need + a lock etc - ick */ + +#define MOUSE_TIMEOUT (10000) + +#define PRFX "mouse7k5:" + +#ifdef MODULE +MODULE_AUTHOR("Ben Dooks "); +MODULE_DESCRIPTION("PS/2 mouse driver for ARM7500 based devices"); +#endif + + +struct aux_queue { + unsigned long head; + unsigned long tail; + struct wait_queue *proc_list; + struct fasync_struct *fasync; + unsigned char buf[AUX_BUF_SIZE]; +}; + +static struct aux_queue *queue = NULL; + +/* IRQD: bit 0 is Mouse RX register full + * bit 1 is Mouse TX register empty + * + * MSEDAT is at 0x32000A8 + * MSECR is at 0x32000AC + * bit 0 - value of msclk pin after sync + * bit 1 - value of msdata pin after sync + * bit 2 - receive parity bit + * bit 4 - rxbusy + * bit 5 - rx shift register full + * bit 6 - txbusy + * bit 7 - tx empty +*/ + +#define MSCR_MSCLK (1) +#define MSCR_MSDATA (2) +#define MSCR_PARITY (4) +#define MSCR_STATEEN (8) +#define MSCR_RXBUSY (16) +#define MSCR_RXSHIFTFULL (32) +#define MSCR_TXBUSY (64) +#define MSCR_TXEMPTY (128) + +#define MSCR_MSLINES (MSCR_MSCLK | MSCR_MSDATA) + +/* IRQD is based at 56 for bit 0*/ + +#define IRQ_7K5MOUSERX (56) +#define IRQ_7K5MOUSETX (57) + + +#ifdef DEBUG +#define debug(fmt,args...) { printk(KERN_DEBUG PRFX " dbg:" fmt, ##args); printk("\n"); } +#else +#define debug(fmt,args...) { } +#endif + +#define AUX_SET_RES 0xE8 /* Set resolution */ +#define AUX_SET_SCALE11 0xE6 /* Set 1:1 scaling */ +#define AUX_SET_SCALE21 0xE7 /* Set 2:1 scaling */ +#define AUX_GET_SCALE 0xE9 /* Get scaling factor */ +#define AUX_SET_STREAM 0xEA /* Set stream mode */ +#define AUX_SET_SAMPLE 0xF3 /* Set sample rate */ +#define AUX_ENABLE_DEV 0xF4 /* Enable aux device */ +#define AUX_DISABLE_DEV 0xF5 /* Disable aux device */ +#define AUX_RESET 0xFF /* Reset aux device */ +#define AUX_ACK 0xFA /* Command byte ACK. */ + +#define AUX_INIT 0xAA /* sent when mouse connected */ + +static void mouse_wait_tx(void); +static void write_dev(unsigned char data); +static void write_ack(unsigned char data); + +static void handle_mouse(int from_irq); + +static void handle_mouse_event(unsigned char code); + +static void mouse_7k5_watchdogirq(int irq, void *devid, struct pt_regs *); +static void mouse_7k5_setup(void); + +static void mouse_7k5_watchdog(unsigned char ctrl); + +void +print_mscr(int state) +{ + printk(KERN_DEBUG PRFX " MSECR state {"); + + if (state & MSCR_MSCLK) printk("MSCLK "); + if (state & MSCR_MSDATA) printk("MSDATA "); + if (state & MSCR_PARITY) printk("PARITY "); + if (state & MSCR_STATEEN) printk("STATEEN "); + if (state & MSCR_RXBUSY) printk("RXBUSY "); + if (state & MSCR_RXSHIFTFULL) printk("RXSHIFTFULL "); + if (state & MSCR_TXBUSY) printk("TXBUSY "); + if (state & MSCR_TXEMPTY) printk("TXEMPTY "); + + printk("}\n"); +} + + +static void +write_dev(unsigned char data) +{ + unsigned long flags; + + spin_lock_irqsave(&mouse_lock, flags); + + mouse_wait_tx(); + outb(IOMD_MSEDAT, data); + + spin_unlock_irqrestore(&mouse_lock, flags); +} + +static void +mouse_wait_tx(void) +{ + unsigned long timeout = MOUSE_TIMEOUT; + + do { + handle_mouse(0); + + if (inb(IOMD_MSECR) & MSCR_TXEMPTY) { + return; + } + + mdelay(1); + timeout--; + } while(timeout); + + printk(KERN_WARNING PRFX " timeout waiting for tx ready\n"); +} + +static void +handle_mouse_event(unsigned char code) +{ + debug("handle_mouse_event(0x%0x)", code); + + if (mouse_reply_expected) { + debug("handle_mouse_event: ack count expected %d", mouse_reply_expected); + + if (code == AUX_ACK) { + mouse_reply_expected--; + return; + } + +#if 0 + printk(KERN_WARNING PRFX " expected %d acks, got data\n", + mouse_reply_expected); +#endif + mouse_reply_expected = 0; + } + + add_mouse_randomness(code); + + if (open_count) { + int head = queue->head; + + queue->buf[head] = code; + head = (head + 1) & (AUX_BUF_SIZE-1); + + if (head != queue->tail) { + queue->head = head; + + if (queue->fasync) + kill_fasync(queue->fasync, SIGIO); + + wake_up_interruptible(&queue->proc_list); + } + } + +} + + +void +write_ack(unsigned char data) +{ + unsigned long flags; + + debug("write_ack: data=0x%x", data); + + spin_lock_irqsave(&mouse_lock, flags); + + mouse_wait_tx(); + outb(IOMD_MSEDAT, data); + + mouse_reply_expected++; + + spin_unlock_irqrestore(&mouse_lock, flags); +} + +static unsigned char get_from_queue(void) +{ + unsigned char result; + unsigned long flags; + + spin_lock_irqsave(&mouse_lock, flags); + result = queue->buf[queue->tail]; + queue->tail = (queue->tail + 1) & (AUX_BUF_SIZE-1); + spin_unlock_irqrestore(&mouse_lock, flags); + return result; +} + +static inline int queue_empty(void) +{ + return queue->head == queue->tail; +} + +static int fasync_mouse(int fd, struct file *filp, int on) +{ + int retval; + + retval = fasync_helper(fd, filp, on, &queue->fasync); + if (retval < 0) + return retval; + return 0; +} + + +static int release_mouse(struct inode * inode, struct file * file) +{ + fasync_mouse(-1, file, 0); + if (--open_count) + return 0; + +#ifdef MODULE + MOD_DEC_USE_COUNT; +#endif + + return 0; +} + + + +/* + * Put bytes from input queue to buffer. + */ + +static ssize_t read_mouse(struct file * file, char * buffer, + size_t count, loff_t *ppos) +{ + struct wait_queue wait = { current, NULL }; + ssize_t i = count; + unsigned char c; + + if (queue_empty()) { + if (file->f_flags & O_NONBLOCK) + return -EAGAIN; + add_wait_queue(&queue->proc_list, &wait); +repeat: + current->state = TASK_INTERRUPTIBLE; + if (queue_empty() && !signal_pending(current)) { + schedule(); + goto repeat; + } + current->state = TASK_RUNNING; + remove_wait_queue(&queue->proc_list, &wait); + } + while (i > 0 && !queue_empty()) { + c = get_from_queue(); + put_user(c, buffer++); + i--; + } + if (count-i) { + file->f_dentry->d_inode->i_atime = CURRENT_TIME; + return count-i; + } + if (signal_pending(current)) + return -ERESTARTSYS; + return 0; +} + +/* + * Write to the aux device. + */ + +static ssize_t write_mouse(struct file * file, const char * buffer, + size_t count, loff_t *ppos) +{ + ssize_t retval = 0; + + if (count) { + ssize_t written = 0; + + if (count > 32) + count = 32; /* Limit to 32 bytes. */ + do { + char c; + get_user(c, buffer++); + write_dev(c); + written++; + } while (--count); + retval = -EIO; + if (written) { + retval = written; + file->f_dentry->d_inode->i_mtime = CURRENT_TIME; + } + } + + return retval; +} + +static unsigned int poll_mouse(struct file *file, poll_table * wait) +{ + poll_wait(file, &queue->proc_list, wait); + if (!queue_empty()) + return POLLIN | POLLRDNORM; + return 0; +} + +static int +open_mouse(struct inode *inode, struct file *file) +{ + unsigned long flags; + + if (open_count++) { + debug("open_mouse(): already open"); + return 0; + } + + debug("open_mouse(): opening"); + + spin_lock_irqsave(&mouse_lock, flags); + + queue->head = queue->tail = 0; /* zero input queue */ + +#ifdef MODULE + MOD_INC_USE_COUNT; +#endif + + mouse_7k5_setup(); /* just to make sure the moose is setup */ + + spin_unlock_irqrestore(&mouse_lock, flags); + + return 0; +} + + + + +struct file_operations mouse_fops = { + NULL, /* seek */ + read_mouse, + write_mouse, + NULL, /* readdir */ + poll_mouse, + NULL, /* ioctl */ + NULL, /* mmap */ + open_mouse, + NULL, /* flush */ + release_mouse, + NULL, + fasync_mouse, +}; + +/* + * Initialize driver. + */ +static struct miscdevice mouse_7k5 = { + PSMOUSE_MINOR, + "7k5mouse", + &mouse_fops +}; + +void +mouse_7k5_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + spin_lock_irqsave(&mouse_lock, flags); + handle_mouse(1); + spin_unlock_irqrestore(&mouse_lock, flags); +} + + +void +mouse_7k5_watchdogirq(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + spin_lock_irqsave(&mouse_lock, flags); + +#if 0 + mouse_7k5_watchdog(inb(IOMD_MSECR)); +#endif + + spin_unlock_irqrestore(&mouse_lock, flags); +} + +static void +mouse_7k5_watchdog(unsigned char ctrl) +{ + if (ctrl & (MSCR_RXBUSY | MSCR_TXBUSY)) + return; /* if we are busy, the lines could be in any state */ + + if ((ctrl & MSCR_MSLINES) != MSCR_MSLINES) { + debug("watchdog: mscr lines 0x%x (0x%0x)", + ctrl & MSCR_MSLINES, ctrl); + + if (mouse_connected) { + mouse_connected = 0; + printk(KERN_INFO PRFX " mouse dettached\n"); + } + + } else { + + if (!mouse_connected) { + printk(KERN_INFO PRFX " mouse re-attached\n"); + mouse_connected = 1; +#if 0 + if (open_count > 0) { + debug("resetting mouse"); + mouse_7k5_setup(); + } +#endif + } + } + +} + +#if 0 +void +mouse_7k5_irqtx(int irq, void *dev_id, struct pt_regs *regs) +{ +} +#endif + +void +handle_mouse(int from_irq) +{ + unsigned char ctrl = inb(IOMD_MSECR); + + if (ctrl & MSCR_RXSHIFTFULL) { + handle_mouse_event(inb(IOMD_MSEDAT)); + } +} + +void +mouse_7k5_setup(void) +{ + write_ack(AUX_SET_SAMPLE); + write_ack(100); + + write_ack(AUX_SET_RES); + write_ack(3); + + write_ack(AUX_SET_SCALE21); + + if (open_count > 0) + write_ack(AUX_ENABLE_DEV); +} + +void +mouse_7k5_finalise(void) +{ + unsigned long flags; + + spin_lock_irqsave(&mouse_lock, flags); + + misc_deregister(&mouse_7k5); + + if (queue != NULL) { + kfree(queue); + queue = NULL; + } + + free_irq(IRQ_VSYNCPULSE, NULL); + free_irq(IRQ_7K5MOUSERX, NULL); +#if 0 + free_irq(IRQ_7K5MOUSETX, NULL); +#endif + + spin_unlock_irqrestore(&mouse_lock, flags); +} + +int +mouse_7k5_init(void) +{ + unsigned long flags; + unsigned int iomd_ver; + + printk("7500[FE] mouse driver, Ben Dooks \n"); + printk("7500[FE] driver based on pc_keyb driver by " + "C. Scott Ananian and Marin Mares\n"); + + iomd_ver = inb(IOMD_ID0) | (inb(IOMD_ID1) << 8); + + if (iomd_ver != 0xaa7c) { + printk(KERN_ERR PRFX " did not detect capable IOMD (0x%0x)\n", iomd_ver); + return -ENODEV; + } + + debug("registering misc device"); + + misc_register(&mouse_7k5); + + queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); + + if (queue == NULL) { + printk(KERN_ERR "could not claim memory for device buffer\n"); + return -ENOMEM; + } + + memset(queue, 0, sizeof(*queue)); + queue->head = queue->tail = 0; + queue->proc_list = NULL; + + debug("setting mouse control register"); + + outb(IOMD_MSECR, MSCR_STATEEN); /* initialise 'state machine' */ + + mouse_connected = ((inb(IOMD_MSECR) & MSCR_MSLINES) == MSCR_MSLINES); + + printk(KERN_INFO PRFX "mouse %stached\n", mouse_connected ? "at" : "de"); + + debug("requesting irq"); + + spin_lock_irqsave(&mouse_lock, flags); + + if (request_irq(IRQ_7K5MOUSERX, mouse_7k5_irq, + SA_SHIRQ, "mouse rx", NULL)) { + printk(KERN_WARNING PRFX " cannot get rx interrupt\n"); + + + mouse_7k5_finalise(); + return -ENODEV; + } + + if (request_irq(IRQ_VSYNCPULSE, mouse_7k5_watchdogirq, + SA_SHIRQ, "mouse watchdog", NULL)) { + printk(KERN_WARNING PRFX " cannot get vsync irq for watchdog"); + } + + debug("installed rx interrupt handler"); + + /* not being able to get the TX interrupt is currently not fatal to our + cause. We only need the RX, the TX is done whilst blocking the sender */ + +#if 0 + if (request_irq(IRQ_7K5MOUSETX, mouse_7k5_irqtx, + SA_SHIRQ, "mouse tx", NULL)) { + printk(KERN_WARNING PRFX " mouse driver cannot get mouse tx interrupt\n"); + } +#endif + + spin_unlock_irqrestore(&mouse_lock, flags); + + debug("installed tx interrupt handler"); + +#ifdef DEBUG + print_mscr(inb(IOMD_MSECR)); +#endif + + mouse_7k5_setup(); + + debug("successful initialisation"); + + return 0; + +} + + +#ifdef MODULE +int +init_module(void) +{ + return mouse_7k5_init(); +} + +int +cleanup_module(void) +{ + mouse_7k5_finalise(); + + return 0; +} +#endif diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/net/Config.in linux-rs3/drivers/acorn/net/Config.in --- linux-rmk2pre2/drivers/acorn/net/Config.in Sun Mar 25 17:31:42 2001 +++ linux-rs3/drivers/acorn/net/Config.in Wed Oct 3 21:32:35 2001 @@ -5,3 +5,4 @@ tristate 'Acorn Ether1 (82586) support' CONFIG_ARM_ETHER1 tristate 'Acorn/ANT Ether3 (NQ8005) support' CONFIG_ARM_ETHER3 tristate 'I-cubed EtherH (NS8390) support' CONFIG_ARM_ETHERH +tristate 'EtherS (CS89X0)' CONFIG_ARM_ETHERS \ No newline at end of file diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/net/Makefile linux-rs3/drivers/acorn/net/Makefile --- linux-rmk2pre2/drivers/acorn/net/Makefile Sun Mar 25 17:31:42 2001 +++ linux-rs3/drivers/acorn/net/Makefile Wed Oct 3 21:32:35 2001 @@ -32,4 +32,12 @@ endif endif +ifeq ($(CONFIG_ARM_ETHERS),y) + L_OBJS += ethers.o + ifeq ($(CONFIG_ARCH_RISCSTATION),y) + L_OBJS += ethers-pnp.o + endif +endif + include $(TOPDIR)/Rules.make + diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/net/cs89x0.h linux-rs3/drivers/acorn/net/cs89x0.h --- linux-rmk2pre2/drivers/acorn/net/cs89x0.h Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/net/cs89x0.h Wed Oct 3 21:32:35 2001 @@ -0,0 +1,467 @@ +/* Copyright, 1988-1992, Russell Nelson, Crynwr Software + + 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, version 1. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ + /* offset 2h -> Model/Product Number */ + /* offset 3h -> Chip Revision Number */ + +#define PP_ISAIOB 0x0020 /* IO base address */ +#define PP_CS8900_ISAINT 0x0022 /* ISA interrupt select */ +#define PP_CS8920_ISAINT 0x0370 /* ISA interrupt select */ +#define PP_CS8900_ISADMA 0x0024 /* ISA Rec DMA channel */ +#define PP_CS8920_ISADMA 0x0374 /* ISA Rec DMA channel */ +#define PP_ISASOF 0x0026 /* ISA DMA offset */ +#define PP_DmaFrameCnt 0x0028 /* ISA DMA Frame count */ +#define PP_DmaByteCnt 0x002A /* ISA DMA Byte count */ +#define PP_CS8900_ISAMemB 0x002C /* Memory base */ +#define PP_CS8920_ISAMemB 0x0348 /* */ + +#define PP_ISABootBase 0x0030 /* Boot Prom base */ +#define PP_ISABootMask 0x0034 /* Boot Prom Mask */ + +/* EEPROM data and command registers */ +#define PP_EECMD 0x0040 /* NVR Interface Command register */ +#define PP_EEData 0x0042 /* NVR Interface Data Register */ +#define PP_DebugReg 0x0044 /* Debug Register */ + +#define PP_RxCFG 0x0102 /* Rx Bus config */ +#define PP_RxCTL 0x0104 /* Receive Control Register */ +#define PP_TxCFG 0x0106 /* Transmit Config Register */ +#define PP_TxCMD 0x0108 /* Transmit Command Register */ +#define PP_BufCFG 0x010A /* Bus configuration Register */ +#define PP_LineCTL 0x0112 /* Line Config Register */ +#define PP_SelfCTL 0x0114 /* Self Command Register */ +#define PP_BusCTL 0x0116 /* ISA bus control Register */ +#define PP_TestCTL 0x0118 /* Test Register */ +#define PP_AutoNegCTL 0x011C /* Auto Negotiation Ctrl */ + +#define PP_ISQ 0x0120 /* Interrupt Status */ +#define PP_RxEvent 0x0124 /* Rx Event Register */ +#define PP_TxEvent 0x0128 /* Tx Event Register */ +#define PP_BufEvent 0x012C /* Bus Event Register */ +#define PP_RxMiss 0x0130 /* Receive Miss Count */ +#define PP_TxCol 0x0132 /* Transmit Collision Count */ +#define PP_LineST 0x0134 /* Line State Register */ +#define PP_SelfST 0x0136 /* Self State register */ +#define PP_BusST 0x0138 /* Bus Status */ +#define PP_TDR 0x013C /* Time Domain Reflectometry */ +#define PP_AutoNegST 0x013E /* Auto Neg Status */ +#define PP_TxCommand 0x0144 /* Tx Command */ +#define PP_TxLength 0x0146 /* Tx Length */ +#define PP_LAF 0x0150 /* Hash Table */ +#define PP_IA 0x0158 /* Physical Address Register */ + +#define PP_RxStatus 0x0400 /* Receive start of frame */ +#define PP_RxLength 0x0402 /* Receive Length of frame */ +#define PP_RxFrame 0x0404 /* Receive frame pointer */ +#define PP_TxFrame 0x0A00 /* Transmit frame pointer */ + +/* Primary I/O Base Address. If no I/O base is supplied by the user, then this */ +/* can be used as the default I/O base to access the PacketPage Area. */ +#define DEFAULTIOBASE 0x0300 +#define FIRST_IO 0x020C /* First I/O port to check */ +#define LAST_IO 0x037C /* Last I/O port to check (+10h) */ +#define ADD_MASK 0x3000 /* Mask it use of the ADD_PORT register */ +#define ADD_SIG 0x3000 /* Expected ID signature */ + +#define CHIP_EISA_ID_SIG 0x630E /* Product ID Code for Crystal Chip (CS8900 spec 4.3) */ + +#ifdef IBMEIPKT +#define EISA_ID_SIG 0x4D24 /* IBM */ +#define PART_NO_SIG 0x1010 /* IBM */ +#define MONGOOSE_BIT 0x0000 /* IBM */ +#else +#define EISA_ID_SIG 0x630E /* PnP Vendor ID (same as chip id for Crystal board) */ +#define PART_NO_SIG 0x4000 /* ID code CS8920 board (PnP Vendor Product code) */ +#define MONGOOSE_BIT 0x2000 /* PART_NO_SIG + MONGOOSE_BUT => ID of mongoose */ +#endif + +#define PRODUCT_ID_ADD 0x0002 /* Address of product ID */ + +/* Mask to find out the types of registers */ +#define REG_TYPE_MASK 0x001F + +/* Eeprom Commands */ +#define ERSE_WR_ENBL 0x00F0 +#define ERSE_WR_DISABLE 0x0000 + +/* Defines Control/Config register quintuplet numbers */ +#define RX_BUF_CFG 0x0003 +#define RX_CONTROL 0x0005 +#define TX_CFG 0x0007 +#define TX_COMMAND 0x0009 +#define BUF_CFG 0x000B +#define LINE_CONTROL 0x0013 +#define SELF_CONTROL 0x0015 +#define BUS_CONTROL 0x0017 +#define TEST_CONTROL 0x0019 + +/* Defines Status/Count registers quintuplet numbers */ +#define RX_EVENT 0x0004 +#define TX_EVENT 0x0008 +#define BUF_EVENT 0x000C +#define RX_MISS_COUNT 0x0010 +#define TX_COL_COUNT 0x0012 +#define LINE_STATUS 0x0014 +#define SELF_STATUS 0x0016 +#define BUS_STATUS 0x0018 +#define TDR 0x001C + +/* PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write */ +#define SKIP_1 0x0040 +#define RX_STREAM_ENBL 0x0080 +#define RX_OK_ENBL 0x0100 +#define RX_DMA_ONLY 0x0200 +#define AUTO_RX_DMA 0x0400 +#define BUFFER_CRC 0x0800 +#define RX_CRC_ERROR_ENBL 0x1000 +#define RX_RUNT_ENBL 0x2000 +#define RX_EXTRA_DATA_ENBL 0x4000 + +/* PP_RxCTL - Receive Control bit definition - Read/write */ +#define RX_IA_HASH_ACCEPT 0x0040 +#define RX_PROM_ACCEPT 0x0080 +#define RX_OK_ACCEPT 0x0100 +#define RX_MULTCAST_ACCEPT 0x0200 +#define RX_IA_ACCEPT 0x0400 +#define RX_BROADCAST_ACCEPT 0x0800 +#define RX_BAD_CRC_ACCEPT 0x1000 +#define RX_RUNT_ACCEPT 0x2000 +#define RX_EXTRA_DATA_ACCEPT 0x4000 +#define RX_ALL_ACCEPT (RX_PROM_ACCEPT|RX_BAD_CRC_ACCEPT|RX_RUNT_ACCEPT|RX_EXTRA_DATA_ACCEPT) +/* Default receive mode - individually addressed, broadcast, and error free */ +#define DEF_RX_ACCEPT (RX_IA_ACCEPT | RX_BROADCAST_ACCEPT | RX_OK_ACCEPT) + +/* PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write */ +#define TX_LOST_CRS_ENBL 0x0040 +#define TX_SQE_ERROR_ENBL 0x0080 +#define TX_OK_ENBL 0x0100 +#define TX_LATE_COL_ENBL 0x0200 +#define TX_JBR_ENBL 0x0400 +#define TX_ANY_COL_ENBL 0x0800 +#define TX_16_COL_ENBL 0x8000 + +/* PP_TxCMD - Transmit Command bit definition - Read-only */ +#define TX_START_4_BYTES 0x0000 +#define TX_START_64_BYTES 0x0040 +#define TX_START_128_BYTES 0x0080 +#define TX_START_ALL_BYTES 0x00C0 +#define TX_FORCE 0x0100 +#define TX_ONE_COL 0x0200 +#define TX_TWO_PART_DEFF_DISABLE 0x0400 +#define TX_NO_CRC 0x1000 +#define TX_RUNT 0x2000 + +/* PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write */ +#define GENERATE_SW_INTERRUPT 0x0040 +#define RX_DMA_ENBL 0x0080 +#define READY_FOR_TX_ENBL 0x0100 +#define TX_UNDERRUN_ENBL 0x0200 +#define RX_MISS_ENBL 0x0400 +#define RX_128_BYTE_ENBL 0x0800 +#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000 +#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000 +#define RX_DEST_MATCH_ENBL 0x8000 + +/* PP_LineCTL - Line Control bit definition - Read/write */ +#define SERIAL_RX_ON 0x0040 +#define SERIAL_TX_ON 0x0080 +#define AUI_ONLY 0x0100 +#define AUTO_AUI_10BASET 0x0200 +#define MODIFIED_BACKOFF 0x0800 +#define NO_AUTO_POLARITY 0x1000 +#define TWO_PART_DEFDIS 0x2000 +#define LOW_RX_SQUELCH 0x4000 + +/* PP_SelfCTL - Software Self Control bit definition - Read/write */ +#define POWER_ON_RESET 0x0040 +#define SW_STOP 0x0100 +#define SLEEP_ON 0x0200 +#define AUTO_WAKEUP 0x0400 +#define HCB0_ENBL 0x1000 +#define HCB1_ENBL 0x2000 +#define HCB0 0x4000 +#define HCB1 0x8000 + +/* PP_BusCTL - ISA Bus Control bit definition - Read/write */ +#define RESET_RX_DMA 0x0040 +#define MEMORY_ON 0x0400 +#define DMA_BURST_MODE 0x0800 +#define IO_CHANNEL_READY_ON 0x1000 +#define RX_DMA_SIZE_64K 0x2000 +#define ENABLE_IRQ 0x8000 + +/* PP_TestCTL - Test Control bit definition - Read/write */ +#define LINK_OFF 0x0080 +#define ENDEC_LOOPBACK 0x0200 +#define AUI_LOOPBACK 0x0400 +#define BACKOFF_OFF 0x0800 +#define FAST_TEST 0x8000 + +/* PP_RxEvent - Receive Event Bit definition - Read-only */ +#define RX_IA_HASHED 0x0040 +#define RX_DRIBBLE 0x0080 +#define RX_OK 0x0100 +#define RX_HASHED 0x0200 +#define RX_IA 0x0400 +#define RX_BROADCAST 0x0800 +#define RX_CRC_ERROR 0x1000 +#define RX_RUNT 0x2000 +#define RX_EXTRA_DATA 0x4000 + +#define HASH_INDEX_MASK 0x0FC00 + +/* PP_TxEvent - Transmit Event Bit definition - Read-only */ +#define TX_LOST_CRS 0x0040 +#define TX_SQE_ERROR 0x0080 +#define TX_OK 0x0100 +#define TX_LATE_COL 0x0200 +#define TX_JBR 0x0400 +#define TX_16_COL 0x8000 +#define TX_SEND_OK_BITS (TX_OK|TX_LOST_CRS) +#define TX_COL_COUNT_MASK 0x7800 + +/* PP_BufEvent - Buffer Event Bit definition - Read-only */ +#define SW_INTERRUPT 0x0040 +#define RX_DMA 0x0080 +#define READY_FOR_TX 0x0100 +#define TX_UNDERRUN 0x0200 +#define RX_MISS 0x0400 +#define RX_128_BYTE 0x0800 +#define TX_COL_OVRFLW 0x1000 +#define RX_MISS_OVRFLW 0x2000 +#define RX_DEST_MATCH 0x8000 + +/* PP_LineST - Ethernet Line Status bit definition - Read-only */ +#define LINK_OK 0x0080 +#define AUI_ON 0x0100 +#define TENBASET_ON 0x0200 +#define POLARITY_OK 0x1000 +#define CRS_OK 0x4000 + +/* PP_SelfST - Chip Software Status bit definition */ +#define ACTIVE_33V 0x0040 +#define INIT_DONE 0x0080 +#define SI_BUSY 0x0100 +#define EEPROM_PRESENT 0x0200 +#define EEPROM_OK 0x0400 +#define EL_PRESENT 0x0800 +#define EE_SIZE_64 0x1000 + +/* PP_BusST - ISA Bus Status bit definition */ +#define TX_BID_ERROR 0x0080 +#define READY_FOR_TX_NOW 0x0100 + +/* PP_AutoNegCTL - Auto Negotiation Control bit definition */ +#define RE_NEG_NOW 0x0040 +#define ALLOW_FDX 0x0080 +#define AUTO_NEG_ENABLE 0x0100 +#define NLP_ENABLE 0x0200 +#define FORCE_FDX 0x8000 +#define AUTO_NEG_BITS (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE) +#define AUTO_NEG_MASK (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE|ALLOW_FDX|RE_NEG_NOW) + +/* PP_AutoNegST - Auto Negotiation Status bit definition */ +#define AUTO_NEG_BUSY 0x0080 +#define FLP_LINK 0x0100 +#define FLP_LINK_GOOD 0x0800 +#define LINK_FAULT 0x1000 +#define HDX_ACTIVE 0x4000 +#define FDX_ACTIVE 0x8000 + +/* The following block defines the ISQ event types */ +#define ISQ_RECEIVER_EVENT 0x04 +#define ISQ_TRANSMITTER_EVENT 0x08 +#define ISQ_BUFFER_EVENT 0x0c +#define ISQ_RX_MISS_EVENT 0x10 +#define ISQ_TX_COL_EVENT 0x12 + +#define ISQ_EVENT_MASK 0x003F /* ISQ mask to find out type of event */ +#define ISQ_HIST 16 /* small history buffer */ +#define AUTOINCREMENT 0x8000 /* Bit mask to set bit-15 for autoincrement */ + +#define TXRXBUFSIZE 0x0600 +#define RXDMABUFSIZE 0x8000 +#define RXDMASIZE 0x4000 +#define TXRX_LENGTH_MASK 0x07FF + +/* rx options bits */ +#define RCV_WITH_RXON 1 /* Set SerRx ON */ +#define RCV_COUNTS 2 /* Use Framecnt1 */ +#define RCV_PONG 4 /* Pong respondent */ +#define RCV_DONG 8 /* Dong operation */ +#define RCV_POLLING 0x10 /* Poll RxEvent */ +#define RCV_ISQ 0x20 /* Use ISQ, int */ +#define RCV_AUTO_DMA 0x100 /* Set AutoRxDMAE */ +#define RCV_DMA 0x200 /* Set RxDMA only */ +#define RCV_DMA_ALL 0x400 /* Copy all DMA'ed */ +#define RCV_FIXED_DATA 0x800 /* Every frame same */ +#define RCV_IO 0x1000 /* Use ISA IO only */ +#define RCV_MEMORY 0x2000 /* Use ISA Memory */ + +#define CSRAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ +#define PKT_START PP_TxFrame /* Start of packet RAM */ + +#define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ +#define TX_AFTER_381 0x0040 /* Tx packet after 381 bytes copied */ +#define TX_AFTER_ALL 0x00c0 /* Tx packet after all bytes copied */ + +#ifndef __ACORN +#define RX_FRAME_PORT 0x0000 +#define TX_FRAME_PORT RX_FRAME_PORT +#define TX_CMD_PORT 0x0004 +#define TX_LEN_PORT 0x0006 +#define ISQ_PORT 0x0008 +#define ADD_PORT 0x000A +#define DATA_PORT 0x000C +#else +#define RX_FRAME_PORT 0x0000 +#define TX_FRAME_PORT RX_FRAME_PORT +#define TX_CMD_PORT 0x0002 +#define TX_LEN_PORT 0x0003 +#define ISQ_PORT 0x0004 +#define ADD_PORT 0x0005 +#define DATA_PORT 0x0006 +#endif + +#define EEPROM_WRITE_EN 0x00F0 +#define EEPROM_WRITE_DIS 0x0000 +#define EEPROM_WRITE_CMD 0x0100 +#define EEPROM_READ_CMD 0x0200 + +/* Receive Header */ +/* Description of header of each packet in receive area of memory */ +#define RBUF_EVENT_LOW 0 /* Low byte of RxEvent - status of received frame */ +#define RBUF_EVENT_HIGH 1 /* High byte of RxEvent - status of received frame */ +#define RBUF_LEN_LOW 2 /* Length of received data - low byte */ +#define RBUF_LEN_HI 3 /* Length of received data - high byte */ +#define RBUF_HEAD_LEN 4 /* Length of this header */ + +#define CHIP_READ 0x1 /* Used to mark state of the repins code (chip or dma) */ +#define DMA_READ 0x2 /* Used to mark state of the repins code (chip or dma) */ + +/* for bios scan */ +/* */ +#ifdef CSDEBUG +/* use these values for debugging bios scan */ +#define BIOS_START_SEG 0x00000 +#define BIOS_OFFSET_INC 0x0010 +#else +#define BIOS_START_SEG 0x0c000 +#define BIOS_OFFSET_INC 0x0200 +#endif + +#define BIOS_LAST_OFFSET 0x0fc00 + +/* Byte offsets into the EEPROM configuration buffer */ +#define ISA_CNF_OFFSET 0x6 +#define TX_CTL_OFFSET (ISA_CNF_OFFSET + 8) /* 8900 eeprom */ +#define AUTO_NEG_CNF_OFFSET (ISA_CNF_OFFSET + 8) /* 8920 eeprom */ + + /* the assumption here is that the bits in the eeprom are generally */ + /* in the same position as those in the autonegctl register. */ + /* Of course the IMM bit is not in that register so it must be */ + /* masked out */ +#define EE_FORCE_FDX 0x8000 +#define EE_NLP_ENABLE 0x0200 +#define EE_AUTO_NEG_ENABLE 0x0100 +#define EE_ALLOW_FDX 0x0080 +#define EE_AUTO_NEG_CNF_MASK (EE_FORCE_FDX|EE_NLP_ENABLE|EE_AUTO_NEG_ENABLE|EE_ALLOW_FDX) + +#define IMM_BIT 0x0040 /* ignore missing media */ + +#define ADAPTER_CNF_OFFSET (AUTO_NEG_CNF_OFFSET + 2) +#define A_CNF_10B_T 0x0001 +#define A_CNF_AUI 0x0002 +#define A_CNF_10B_2 0x0004 +#define A_CNF_MEDIA_TYPE 0x0060 +#define A_CNF_MEDIA_AUTO 0x0000 +#define A_CNF_MEDIA_10B_T 0x0020 +#define A_CNF_MEDIA_AUI 0x0040 +#define A_CNF_MEDIA_10B_2 0x0060 +#define A_CNF_DC_DC_POLARITY 0x0080 +#define A_CNF_NO_AUTO_POLARITY 0x2000 +#define A_CNF_LOW_RX_SQUELCH 0x4000 +#define A_CNF_EXTND_10B_2 0x8000 + +#define PACKET_PAGE_OFFSET 0x8 + +/* Bit definitions for the ISA configuration word from the EEPROM */ +#define INT_NO_MASK 0x000F +#define DMA_NO_MASK 0x0070 +#define ISA_DMA_SIZE 0x0200 +#define ISA_AUTO_RxDMA 0x0400 +#define ISA_RxDMA 0x0800 +#define DMA_BURST 0x1000 +#define STREAM_TRANSFER 0x2000 +#define ANY_ISA_DMA (ISA_AUTO_RxDMA | ISA_RxDMA) + +/* DMA controller registers */ +#define DMA_BASE 0x00 /* DMA controller base */ +#define DMA_BASE_2 0x0C0 /* DMA controller base */ + +#define DMA_STAT 0x0D0 /* DMA controller status register */ +#define DMA_MASK 0x0D4 /* DMA controller mask register */ +#define DMA_MODE 0x0D6 /* DMA controller mode register */ +#define DMA_RESETFF 0x0D8 /* DMA controller first/last flip flop */ + +/* DMA data */ +#define DMA_DISABLE 0x04 /* Disable channel n */ +#define DMA_ENABLE 0x00 /* Enable channel n */ +/* Demand transfers, incr. address, auto init, writes, ch. n */ +#define DMA_RX_MODE 0x14 +/* Demand transfers, incr. address, auto init, reads, ch. n */ +#define DMA_TX_MODE 0x18 + +#define DMA_SIZE (16*1024) /* Size of dma buffer - 16k */ + +#define CS8900 0x0000 +#define CS8920 0x4000 +#define CS8920M 0x6000 +#define REVISON_BITS 0x1F00 +#define EEVER_NUMBER 0x12 +#define CHKSUM_LEN 0x14 +#define CHKSUM_VAL 0x0000 +#define START_EEPROM_DATA 0x001c /* Offset into eeprom for start of data */ +#define IRQ_MAP_EEPROM_DATA 0x0046 /* Offset into eeprom for the IRQ map */ +#define IRQ_MAP_LEN 0x0004 /* No of bytes to read for the IRQ map */ +#define PNP_IRQ_FRMT 0x0022 /* PNP small item IRQ format */ +#define CS8900_IRQ_MAP 0x1c20 /* This IRQ map is fixed */ + +#define CS8920_NO_INTS 0x0F /* Max CS8920 interrupt select # */ + +#define PNP_ADD_PORT 0x0279 +#define PNP_WRITE_PORT 0x0A79 + +#define GET_PNP_ISA_STRUCT 0x40 +#define PNP_ISA_STRUCT_LEN 0x06 +#define PNP_CSN_CNT_OFF 0x01 +#define PNP_RD_PORT_OFF 0x02 +#define PNP_FUNCTION_OK 0x00 +#define PNP_WAKE 0x03 +#define PNP_RSRC_DATA 0x04 +#define PNP_RSRC_READY 0x01 +#define PNP_STATUS 0x05 +#define PNP_ACTIVATE 0x30 +#define PNP_CNF_IO_H 0x60 +#define PNP_CNF_IO_L 0x61 +#define PNP_CNF_INT 0x70 +#define PNP_CNF_DMA 0x74 +#define PNP_CNF_MEM 0x48 + +#define BIT0 1 +#define BIT15 0x8000 + diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/net/ethers-pnp.S linux-rs3/drivers/acorn/net/ethers-pnp.S --- linux-rmk2pre2/drivers/acorn/net/ethers-pnp.S Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/net/ethers-pnp.S Wed Oct 3 21:32:35 2001 @@ -0,0 +1,76 @@ +/* + * + * linux/drivers/acorn/net/ethers-riscpnp.S + * + * RiscStation CS8920A PnP initialision code + * + * (c) 2000 SimTec Electronics / Ben Dooks +*/ + +#define __ASSEMBLY__ + +#include +#include + + .text + +ENTRY(ethers_riscstation_pnpinit) + + STMFD r13!,{r0-r12,r14} + BL access + LDR r10, =0x30104f1 @ pnp port low + ADR r9, key + MOV r1, #(key_end - key) +100: + LDRB r0, [r9], #1 + STRB r0, [r10] + SUBS r1, r1, #1 + BNE 100b + + LDR r9, =0x30114f1 @ pnp pp_port_hi% + MOV r0, #0x03 + STRB r0, [r10] + MOV r0, #0x00 + STRB r0, [r9] + + MOV r0, #0x06 + STRB r0, [r10] + MOV r0, #0x01 + STRB r0, [r9] + + MOV r0, #0x60 + STRB r0, [r10] + MOV r0, #0x03 + STRB r0, [r9] + + MOV r0, #0x30 + STRB r0, [r10] + MOV r0, #0x01 + STRB r0, [r9] + + MOV r0, #0x02 + STRB r0, [r10] + STRB r0, [r9] + + BL access + LDMFD r13!,{r0-r12,pc}^ + +@ Now configured, initialize the chip +access: + LDR r10, =0x3014000 @ perform 8 memory cycles + MOV r0, #8 @ to complete 8920 reset +101: + LDRB r9, [r10], #1 + SUBS r0, r0, #1 + BNE 101b + MOV pc, r14 + +key: + .byte 0x00, 0x00 + .word 0x6DDAB56A, 0x162D5BB6, 0x0102050B, 0x3060C080 + .word 0x83060C18, 0x48902041, 0xC4891224, 0xFCF8F1E2 +key_end: + .byte 0,0 + __ALIGN + + .data \ No newline at end of file diff -urN --ignore-space-change linux-rmk2pre2/drivers/acorn/net/ethers.c linux-rs3/drivers/acorn/net/ethers.c --- linux-rmk2pre2/drivers/acorn/net/ethers.c Thu Jan 1 01:00:00 1970 +++ linux-rs3/drivers/acorn/net/ethers.c Wed Oct 3 21:32:35 2001 @@ -0,0 +1,1314 @@ +/* cs89x0.c: A Crystal Semiconductor CS89[02]0 driver for linux. */ +/* + Written 1996 by Russell Nelson, with reference to skeleton.c + written 1993-1994 by Donald Becker. + + additional work for RiscStation by Ben Dooks + + This software may be used and distributed according to the terms + of the GNU Public License, incorporated herein by reference. + + The author may be reached at nelson@crynwr.com, Crynwr + Software, 11 Grant St., Potsdam, NY 13676 + + Changelog: + + Ben Dooks: : ben@fluff.org + : converted to ethers.c [RiscStation CS8920] + : add RiscStation PnP initialise code + + Mike Cruse : mcruse@cti-ltd.com + : Changes for Linux 2.0 compatibility. + : Added dev_id parameter in net_interrupt(), + : request_irq() and free_irq(). Just NULL for now. + + Mike Cruse : Added MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT macros + : in net_open() and net_close() so kerneld would know + : that the module is in use and wouldn't eject the + : driver prematurely. + + Mike Cruse : Rewrote init_module() and cleanup_module using 8390.c + : as an example. Disabled autoprobing in init_module(), + : not a good thing to do to other devices while Linux + : is running from all accounts. + + Alan Cox : Removed 1.2 support, added 2.1 extra counters. +*/ + +#define __ACORN 1 + +static char *version = +#ifdef __ACORN +"ethers.c:v1.04 [15-11-1999] Ben Dooks \nbased on:" +#endif +"cs89x0.c:v1.03 11/26/96 Russell Nelson \n"; + +/* ======================= configure the driver here ======================= */ + +/* use 0 for production, 1 for verification, >2 for debug */ +#ifndef NET_DEBUG +#define NET_DEBUG 2 +#endif + +#define ndebug(x,msg...) if (net_debug > (x)) printk(msg) + +/* ======================= end of configuration ======================= */ + + +/* Always include 'config.h' first in case the user wants to turn on + or override something. */ +#ifdef MODULE +#include +#include +#else +#define MOD_INC_USE_COUNT +#define MOD_DEC_USE_COUNT +#endif + +#define PRINTK(x) printk x + +/* + Sources: + + Crynwr packet driver epktisa. + + Crystal Semiconductor data sheets. + +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "cs89x0.h" + +#ifdef __ACORN +/* acorn specific include files, for expansion cards mostly... +*/ +#include + +/* expansion card id for ethers. */ +static const card_ids cids[] = { {0x1f,0x2401}, { 0xffff, 0xffff} }; + +typedef unsigned long io_addr_t; +#else +typedef unsigned short io_addr_t; +#endif + +#ifndef __ACORN +/* First, a few definitions that the brave might change. */ +/* A zero-terminated list of I/O addresses to be probed. */ +static unsigned int netcard_portlist[] __initdata = + { 0x300, 0x320, 0x340, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; +#endif + +#ifdef CONFIG_ARCH_RISCSTATION +static int ethers_internal = 0; +#endif + +static unsigned int net_debug = NET_DEBUG; + +/* The number of low I/O ports used by the ethercard. */ +#define NETCARD_IO_EXTENT 16 + +/* Information that need to be kept for each board. */ +struct net_local { + struct net_device_stats stats; +#ifdef __ACORN + struct expansion_card *ec; +#endif + int chip_type; /* one of: CS8900, CS8920, CS8920M */ + char chip_revision; /* revision letter of the chip ('A'...) */ + int send_cmd; /* the propercommand used to send a packet. */ + int auto_neg_cnf; + int adapter_cnf; + int isa_config; + int irq_map; + int rx_mode; + int curr_rx_cfg; + int linectl; + int send_underrun; /* keep track of how many underruns in a row we get */ + struct sk_buff *skb; +}; + +/* Index to functions, as function prototypes. */ + +extern int cs89x0_probe(struct device *dev); +#ifdef __ACORN +extern int ethers_probe(struct device *dev); +#endif + +#ifndef __ACORN +static int cs89x0_probe1(struct device *dev, int ioaddr); +#endif +extern void ethers_riscstation_pnpinit(); + +static int net_open(struct device *dev); +static int net_send_packet(struct sk_buff *skb, struct device *dev); +static void net_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static void set_multicast_list(struct device *dev); +static void net_rx(struct device *dev); +static int net_close(struct device *dev); +static struct net_device_stats *net_get_stats(struct device *dev); +static void reset_chip(struct device *dev); +static int get_eeprom_data(struct device *dev, int off, int len, int *buffer); +static int get_eeprom_cksum(int off, int len, int *buffer); +static int set_mac_address(struct device *dev, void *addr); + +#ifdef __ACORN +static int cs89x0_probe_ec(struct device *dev, unsigned long ioaddr, + unsigned long memaddr, unsigned int irq, + struct expansion_card *ec); +#endif + +/* Example routines you must write ;->. */ +#define tx_done(dev) 1 + + +/* Check for a network adaptor of this type, and return '0' iff one exists. + If dev->base_addr == 0, probe all likely locations. + If dev->base_addr == 1, always return failure. + If dev->base_addr == 2, allocate space for the device and return success + (detachable devices only). + */ +#if defined(HAVE_DEVLIST) && !defined(__ACORN) +/* Support for a alternate probe manager, which will eliminate the + boilerplate below. */ +struct netdev_entry netcard_drv = +{"netcard", cs89x0_probe1, NETCARD_IO_EXTENT, netcard_portlist}; +#else +#ifdef __ACORN +__initfunc(int +ethers_probe(struct device *dev)) +#else +__initfunc(int +cs89x0_probe(struct device *dev)) +#endif +{ +#ifndef __ACORN + int i; + int base_addr = dev ? dev->base_addr : 0; + + if (base_addr > 0x1ff) /* Check a single specified location. */ + return cs89x0_probe1(dev, base_addr); + else if (base_addr != 0) /* Don't probe at all. */ + return ENXIO; + + for (i = 0; netcard_portlist[i]; i++) { + int ioaddr = netcard_portlist[i]; + if (check_region(ioaddr, NETCARD_IO_EXTENT)) + continue; + if (cs89x0_probe1(dev, ioaddr) == 0) + return 0; + } +#else + struct expansion_card *ec; + unsigned long ioaddr; + + ecard_startfind(); + + do { + int tmp; + + if (( ec = ecard_find(0, cids)) == NULL) + break; + + ioaddr = ecard_address(ec, ECARD_EASI, 0); + dev->irq = ec->irq; + + printk("ethers: found card at base 0x%0lx\n", ioaddr); + ioaddr += 0x400600 >> 2; + + if ((tmp = cs89x0_probe_ec(dev, ioaddr, 0, ec->irq, ec)) + == 0) { + printk("ethers: successful attach\n"); + return 0; + } else { + printk("ethers: attach failed (%d)\n", tmp); + } + } while(1); +#endif + +#ifdef CONFIG_ARCH_RISCSTATION +#define arc_to_lin(x) (0x80000000 + (((x) - 0x03000000) >> 2)) + if (ethers_internal == 0) { + unsigned long baseaddr = arc_to_lin((unsigned long)0x3010600); + unsigned long memaddr = arc_to_lin((unsigned long)0x3014000); + int irq = 11; + + ethers_internal = 1; // don't probe more than once! + + ethers_riscstation_pnpinit(); + + memaddr = 0; + + printk("RiscStation onboard ethernet, 0x%0lx,0x%0lx, irq %d\n", + baseaddr, memaddr, irq); + if (cs89x0_probe_ec(dev, baseaddr, memaddr, irq, NULL) == 0) { + printk("ethers: succesfull initialisation\n"); + return 0; + } + } + +#endif /* CONFIG_ARCH_RISCSATION */ + +#ifdef __ACORN +// removed printk() due to new polling... +#else + printk("cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP\n"); +#endif + return ENODEV; +} +#endif + +static int inline +readreg(struct device *dev, int portno) +{ + outw(portno, dev->base_addr + ADD_PORT); + return inw(dev->base_addr + DATA_PORT); +} + +static void inline +writereg(struct device *dev, int portno, int value) +{ + outw(portno, dev->base_addr + ADD_PORT); + outw(value, dev->base_addr + DATA_PORT); +} + + +static int inline +readword(struct device *dev, int portno) +{ + return inw(dev->base_addr + portno); +} + +static void inline +writeword(struct device *dev, int portno, int value) +{ + outw(value, dev->base_addr + portno); +} + +__initfunc(static int +wait_eeprom_ready(struct device *dev)) +{ + int timeout = jiffies; + /* check to see if the EEPROM is ready, a timeout is used - + just in case EEPROM is ready when SI_BUSY in the + PP_SelfST is clear */ + while(readreg(dev, PP_SelfST) & SI_BUSY) + if (jiffies - timeout >= 40) + return -1; + return 0; +} + +__initfunc(static int +get_eeprom_data(struct device *dev, int off, int len, int *buffer)) +{ + int i; + + if (net_debug > 3) printk("EEPROM data from %x for %x:\n",off,len); + for (i = 0; i < len; i++) { + if (wait_eeprom_ready(dev) < 0) return -1; + /* Now send the EEPROM read command and EEPROM location to read */ + writereg(dev, PP_EECMD, (off + i) | EEPROM_READ_CMD); + if (wait_eeprom_ready(dev) < 0) return -1; + buffer[i] = readreg(dev, PP_EEData); + if (net_debug > 3) printk("%04x ", buffer[i]); + } + if (net_debug > 3) printk("\n"); + return 0; +} + +__initfunc(static int +get_eeprom_cksum(int off, int len, int *buffer)) +{ + int i, cksum; + + cksum = 0; + for (i = 0; i < len; i++) + cksum += buffer[i]; + cksum &= 0xffff; + if (cksum == 0) + return 0; + printk("ethers: checksum result is %0x\n", cksum); + return 0; // tmp ignore checksum failure... + return -1; +} + +/* This is the real probe routine. Linux has a history of friendly device + probes on the ISA bus. A good device probes avoids doing writes, and + verifies that the correct device exists and functions. */ + +#ifdef __ACORN +__initfunc(static int cs89x0_probe_ec(struct device *dev, unsigned long ioaddr, unsigned long memaddr, unsigned int irq, struct expansion_card *ec)) +#else +__initfunc(static int cs89x0_probe1(struct device *dev, int ioaddr)) +#endif +{ + struct net_local *lp; + static unsigned version_printed = 0; + int i; + unsigned rev_type = 0; +#ifndef __ACORN + int eeprom_buff[CHKSUM_LEN]; +#endif + +#ifdef __ACORN + if (net_debug > 1) + printk("ethers: scanning podule with iobase 0x%lx\n", ioaddr); + if (ec != NULL) + ecard_claim(ec); +#endif + + /* Initialize the device structure. */ + if (dev->priv == NULL) { + dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL); + memset(dev->priv, 0, sizeof(struct net_local)); + } + lp = (struct net_local *)dev->priv; + + +#ifndef __ACORN + /* if they give us an odd I/O address, then do ONE write to + the address port, to get it back to address zero, where we + expect to find the EISA signature word. */ + if (ioaddr & 1) { + ioaddr &= ~1; + if ((inw(ioaddr + ADD_PORT) & ADD_MASK) != ADD_SIG) + return ENODEV; + } +#else + /* we need to do something to reset the PP ptr, as RISC OS driver + * has very probably done something with it on initialiation */ + outw(PP_ChipID, ioaddr + ADD_PORT); +#endif + + outw(PP_ChipID, ioaddr + ADD_PORT); + + if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) { + printk("cs89x0: no signature found for chip %0x\n", + inw(ioaddr + DATA_PORT)); + return ENODEV; + } + + /* Fill in the 'dev' fields. */ + dev->base_addr = ioaddr; + +#ifdef __ACORN + dev->mem_start = memaddr; + // dev->mem_start = 0; // cannot do this!!! kills kernel if tried... + dev->irq = irq; + + if (ec != NULL) { + lp->ec = ec; + + ec->irqaddr = (void *)ioaddr(ioaddr + (0x3ffa00 >> 2)); + ec->irqmask = 4; + if (net_debug > 3) + printk("etherc: ec->irqaddr=0x%lx, ec->irqmask=0x%x\n", + ec->irqaddr, ec->irqmask); + } +#endif + + /* get the chip type */ + rev_type = readreg(dev, PRODUCT_ID_ADD); + lp->chip_type = rev_type &~ REVISON_BITS; + lp->chip_revision = ((rev_type & REVISON_BITS) >> 8) + 'A'; + + /* Check the chip type and revision in order to set the correct send command + CS8920 revision C and CS8900 revision F can use the faster send. */ + lp->send_cmd = TX_AFTER_381; + if (lp->chip_type == CS8900 && lp->chip_revision >= 'F') + lp->send_cmd = TX_NOW; + if (lp->chip_type != CS8900 && lp->chip_revision >= 'C') + lp->send_cmd = TX_NOW; + + if (net_debug && version_printed++ == 0) + printk(version); + + printk("%s: cs89%c0%s rev %c found at %#3lx", + dev->name, + lp->chip_type==CS8900?'0':'2', + lp->chip_type==CS8920M?"M":"", + lp->chip_revision, + dev->base_addr); + + reset_chip(dev); + + /* First check to see if an EEPROM is attached*/ +#ifndef __ACORN + if ((readreg(dev, PP_SelfST) & EEPROM_PRESENT) == 0) + printk("\ncs89x0: No EEPROM, relying on command line....\n"); + else if (get_eeprom_data(dev, START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) { + printk("\ncs89x0: EEPROM read failed, relying on command line.\n"); + } else if (get_eeprom_cksum(START_EEPROM_DATA,CHKSUM_LEN,eeprom_buff) < 0) { + printk("\ncs89x0: EEPROM checksum bad, relying on command line\n"); + } else { + /* get transmission control word but keep the autonegotiation bits */ + if (!lp->auto_neg_cnf) lp->auto_neg_cnf = eeprom_buff[AUTO_NEG_CNF_OFFSET/2]; + /* Store adapter configuration */ + if (!lp->adapter_cnf) lp->adapter_cnf = eeprom_buff[ADAPTER_CNF_OFFSET/2]; + /* Store ISA configuration */ + lp->isa_config = eeprom_buff[ISA_CNF_OFFSET/2]; + /* store the initial memory base address */ + dev->mem_start = eeprom_buff[PACKET_PAGE_OFFSET/2] << 8; + for (i = 0; i < ETH_ALEN/2; i++) { + dev->dev_addr[i*2] = eeprom_buff[i]; + dev->dev_addr[i*2+1] = eeprom_buff[i] >> 8; + } + } +#else + for (i = 0; i < ETH_ALEN/2; i++) { + int atmp = readreg(dev, 0x158 + (i*2)); + dev->dev_addr[i*2] = atmp & 0xff; + dev->dev_addr[i*2+1] = (atmp >> 8) & 0xff; + } + + lp->adapter_cnf = A_CNF_10B_T | A_CNF_MEDIA_10B_T; + lp->auto_neg_cnf = AUTO_NEG_ENABLE; +#endif + + + printk(" media %s%s%s", + (lp->adapter_cnf & A_CNF_10B_T)?"RJ-45,":"", + (lp->adapter_cnf & A_CNF_AUI)?"AUI,":"", + (lp->adapter_cnf & A_CNF_10B_2)?"BNC,":""); + + lp->irq_map = 0xffff; + +#ifndef __ACORN + /* If this is a CS8900 then no pnp soft */ + if (lp->chip_type != CS8900 && + /* Check if the ISA IRQ has been set */ + (i = readreg(dev, PP_CS8920_ISAINT) & 0xff, + (i != 0 && i < CS8920_NO_INTS))) { + if (!dev->irq) + dev->irq = i; + } else { + i = lp->isa_config & INT_NO_MASK; + if (lp->chip_type == CS8900) { + /* the table that follows is dependent upon how you wired up your cs8900 + * in your system. The table is the same as the cs8900 engineering demo + * board. irq_map also depends on the contents of the table. Also see + * write_irq, which is the reverse mapping of the table below. */ + switch(i) { + case 0: i = 10; break; + case 1: i = 11; break; + case 2: i = 12; break; + case 3: i = 5; break; + default: printk("\ncs89x0: bug: isa_config is %d\n", i); + } + lp->irq_map = CS8900_IRQ_MAP; /* fixed IRQ map for CS8900 */ + } else { + int irq_map_buff[IRQ_MAP_LEN/2]; + + if (get_eeprom_data(dev, IRQ_MAP_EEPROM_DATA, + IRQ_MAP_LEN/2, + irq_map_buff) >= 0) { + if ((irq_map_buff[0] & 0xff) == PNP_IRQ_FRMT) + lp->irq_map = (irq_map_buff[0]>>8) | (irq_map_buff[1] << 8); + } + } + if (!dev->irq) + dev->irq = i; + } +#endif + + printk(" IRQ %d", dev->irq); + + + /* print the ethernet address. */ + for (i = 0; i < ETH_ALEN; i++) + printk(" %2.2x", dev->dev_addr[i]); + + /* Grab the region so we can find another board if autoIRQ fails. */ + request_region(ioaddr, NETCARD_IO_EXTENT,"cs89x0"); + + dev->open = net_open; + dev->stop = net_close; + dev->hard_start_xmit = net_send_packet; + dev->get_stats = net_get_stats; + dev->set_multicast_list = &set_multicast_list; + dev->set_mac_address = &set_mac_address; + + /* Fill in the fields of the device structure with ethernet values. */ + ether_setup(dev); + + printk("\n"); + return 0; +} + + + +__initfunc(void +reset_chip(struct device *dev)) +{ +#ifdef __ACORN + /* cannot reset chip... */ +#else + struct net_local *lp = (struct net_local *)dev->priv; + io_addr_t ioaddr = dev->base_addr; + int reset_start_time; + + writereg(dev, PP_SelfCTL, readreg(dev, PP_SelfCTL) | POWER_ON_RESET); + + /* wait 30 ms */ + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(30*HZ/1000); + + if (lp->chip_type != CS8900) { + /* Hardware problem requires PNP registers to be reconfigured after a reset */ + outw(PP_CS8920_ISAINT, ioaddr + ADD_PORT); + outb(dev->irq, ioaddr + DATA_PORT); + outb(0, ioaddr + DATA_PORT + 1); + + outw(PP_CS8920_ISAMemB, ioaddr + ADD_PORT); + outb((dev->mem_start >> 8) & 0xff, ioaddr + DATA_PORT); + outb((dev->mem_start >> 24) & 0xff, ioaddr + DATA_PORT + 1); + } + /* Wait until the chip is reset */ + reset_start_time = jiffies; + while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2) + ; +#endif // __ACORN +} + + +static void +control_dc_dc(struct device *dev, int on_not_off) +{ + struct net_local *lp = (struct net_local *)dev->priv; + unsigned int selfcontrol; + int timenow = jiffies; + /* control the DC to DC convertor in the SelfControl register. */ + + selfcontrol = HCB1_ENBL; /* Enable the HCB1 bit as an output */ + if (((lp->adapter_cnf & A_CNF_DC_DC_POLARITY) != 0) ^ on_not_off) + selfcontrol |= HCB1; + else + selfcontrol &= ~HCB1; + writereg(dev, PP_SelfCTL, selfcontrol); + + /* Wait for the DC/DC converter to power up - 500ms */ + while (jiffies - timenow < 100) + ; + +} + +static int +detect_tp(struct device *dev) +{ + struct net_local *lp = (struct net_local *)dev->priv; + int timenow = jiffies; + + if (net_debug > 1) printk("%s: Attempting TP\n", dev->name); + + /* If connected to another full duplex capable 10-Base-T card the link pulses + seem to be lost when the auto detect bit in the LineCTL is set. + To overcome this the auto detect bit will be cleared whilst testing the + 10-Base-T interface. This would not be necessary for the sparrow chip but + is simpler to do it anyway. */ + writereg(dev, PP_LineCTL, lp->linectl &~ AUI_ONLY); + control_dc_dc(dev, 0); + + /* Delay for the hardware to work out if the TP cable is present - 150ms */ + for (timenow = jiffies; jiffies - timenow < 15; ) + ; + if ((readreg(dev, PP_LineST) & LINK_OK) == 0) + return 0; + + if (lp->chip_type != CS8900) { + + writereg(dev, PP_AutoNegCTL, lp->auto_neg_cnf & AUTO_NEG_MASK); + + if ((lp->auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { + printk("%s: negotiating duplex...\n",dev->name); + while (readreg(dev, PP_AutoNegST) & AUTO_NEG_BUSY) { + if (jiffies - timenow > 4000) { + printk("**** Full / half duplex auto-negotiation timed out ****\n"); + break; + } + } + } + if (readreg(dev, PP_AutoNegST) & FDX_ACTIVE) + printk("%s: using full duplex\n", dev->name); + else + printk("%s: using half duplex\n", dev->name); + } + + return A_CNF_MEDIA_10B_T; +} + +/* send a test packet - return true if carrier bits are ok */ +static int +send_test_pkt(struct device *dev) +{ + io_addr_t ioaddr = dev->base_addr; + char test_packet[] = { 0,0,0,0,0,0, 0,0,0,0,0,0, + 0, 46, /* A 46 in network order */ + 0, 0, /* DSAP=0 & SSAP=0 fields */ + 0xf3, 0 /* Control (Test Req + P bit set) */ }; + long timenow = jiffies; + + writereg(dev, PP_LineCTL, readreg(dev, PP_LineCTL) | SERIAL_TX_ON); + + memcpy(test_packet, dev->dev_addr, ETH_ALEN); + memcpy(test_packet+ETH_ALEN, dev->dev_addr, ETH_ALEN); + + outw(TX_AFTER_ALL, ioaddr + TX_CMD_PORT); + outw(ETH_ZLEN, ioaddr + TX_LEN_PORT); + + /* Test to see if the chip has allocated memory for the packet */ + while (jiffies - timenow < 5) + if (readreg(dev, PP_BusST) & READY_FOR_TX_NOW) + break; + if (jiffies - timenow >= 5) + return 0; /* this shouldn't happen */ + + /* Write the contents of the packet */ + if (dev->mem_start) { + memcpy((void *)dev->mem_start + PP_TxFrame, test_packet, ETH_ZLEN); + } else { + outsw(ioaddr + TX_FRAME_PORT,test_packet,(ETH_ZLEN+1) >>1); + } + + if (net_debug > 1) printk("Sending test packet "); + /* wait a couple of jiffies for packet to be received */ + for (timenow = jiffies; jiffies - timenow < 3; ) + ; + if ((readreg(dev, PP_TxEvent) & TX_SEND_OK_BITS) == TX_OK) { + if (net_debug > 1) printk("succeeded\n"); + return 1; + } + if (net_debug > 1) printk("failed\n"); + return 0; +} + + +static int +detect_aui(struct device *dev) +{ + struct net_local *lp = (struct net_local *)dev->priv; + + if (net_debug > 1) printk("%s: Attempting AUI\n", dev->name); + control_dc_dc(dev, 0); + + writereg(dev, PP_LineCTL, (lp->linectl &~ AUTO_AUI_10BASET) | AUI_ONLY); + + if (send_test_pkt(dev)) + return A_CNF_MEDIA_AUI; + else + return 0; +} + +static int +detect_bnc(struct device *dev) +{ + struct net_local *lp = (struct net_local *)dev->priv; + + if (net_debug > 1) printk("%s: Attempting BNC\n", dev->name); + control_dc_dc(dev, 1); + + writereg(dev, PP_LineCTL, (lp->linectl &~ AUTO_AUI_10BASET) | AUI_ONLY); + + if (send_test_pkt(dev)) + return A_CNF_MEDIA_10B_2; + else + return 0; +} + + +static void +write_irq(struct device *dev, int chip_type, int irq) +{ + int i; + + if (chip_type == CS8900) { + switch(irq) { + case 10: i = 0; break; + case 11: i = 1; break; + case 12: i = 2; break; + case 5: i = 3; break; + default: i = 3; break; + } +#ifdef __ACORN + i = 0; // force use of the irq tied to the card.. +#endif + writereg(dev, PP_CS8900_ISAINT, i); + } else { +#ifndef __ACORN + writereg(dev, PP_CS8920_ISAINT, irq); +#else + writereg(dev, PP_CS8920_ISAINT, 3); +#endif + } +} + +/* Open/initialize the board. This is called (in the current kernel) + sometime after booting when the 'ifconfig' program is run. + + This routine should set everything up anew at each open, even + registers that "should" only need to be set once at boot, so that + there is non-reboot way to recover if something goes wrong. + */ +static int +net_open(struct device *dev) +{ + struct net_local *lp = (struct net_local *)dev->priv; + int result = 0; + int i; + + if (dev->irq < 2) { + /* Allow interrupts to be generated by the chip */ + writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON); + for (i = 2; i < CS8920_NO_INTS; i++) if ((1 << dev->irq) & lp->irq_map) { + if (request_irq (i, NULL, 0, "cs8920", dev) != -EBUSY) { + write_irq(dev, lp->chip_type, i); + writereg(dev, PP_BufCFG, GENERATE_SW_INTERRUPT); + if (request_irq (dev->irq = i, &net_interrupt, 0, "cs89x0", dev) == 0) + break; + } + } + + + if (i >= CS8920_NO_INTS) { + writereg(dev, PP_BusCTL, 0); /* disable interrupts. */ + return -EAGAIN; + } + } else { +#ifndef __ACORN + if (((1 << dev->irq) & lp->irq_map) == 0) { + printk("%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", + dev->name, dev->irq, lp->irq_map); + return -EAGAIN; + } +#endif + writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON); + write_irq(dev, lp->chip_type, dev->irq); + if (request_irq(dev->irq, &net_interrupt, 0, "cs89x0", dev)) { + return -EAGAIN; + } + } + + /* set the Ethernet address */ + for (i=0; i < ETH_ALEN/2; i++) + writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8)); + + /* while we're testing the interface, leave interrupts disabled */ + writereg(dev, PP_BusCTL, MEMORY_ON); + + /* Set the LineCTL quintuplet based on adapter configuration read from EEPROM */ + if ((lp->adapter_cnf & A_CNF_EXTND_10B_2) && (lp->adapter_cnf & A_CNF_LOW_RX_SQUELCH)) + lp->linectl = LOW_RX_SQUELCH; + else + lp->linectl = 0; + + /* check to make sure that they have the "right" hardware available */ + switch(lp->adapter_cnf & A_CNF_MEDIA_TYPE) { + case A_CNF_MEDIA_10B_T: result = lp->adapter_cnf & A_CNF_10B_T; break; + case A_CNF_MEDIA_AUI: result = lp->adapter_cnf & A_CNF_AUI; break; + case A_CNF_MEDIA_10B_2: result = lp->adapter_cnf & A_CNF_10B_2; break; + default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2); + } + if (!result) { + printk("%s: EEPROM is configured for unavailable media\n", dev->name); + release_irq: + writereg(dev, PP_LineCTL, readreg(dev, PP_LineCTL) & ~(SERIAL_TX_ON | SERIAL_RX_ON)); + free_irq(dev->irq, dev); + return -EAGAIN; + } + + /* set the hardware to the configured choice */ + switch(lp->adapter_cnf & A_CNF_MEDIA_TYPE) { + case A_CNF_MEDIA_10B_T: + result = detect_tp(dev); + if (!result) printk("%s: 10Base-T (RJ-45) has no cable\n", dev->name); + if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ + result = A_CNF_MEDIA_10B_T; /* Yes! I don't care if I see a link pulse */ + break; + case A_CNF_MEDIA_AUI: + result = detect_aui(dev); + if (!result) printk("%s: 10Base-5 (AUI) has no cable\n", dev->name); + if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ + result = A_CNF_MEDIA_AUI; /* Yes! I don't care if I see a carrrier */ + break; + case A_CNF_MEDIA_10B_2: + result = detect_bnc(dev); + if (!result) printk("%s: 10Base-2 (BNC) has no cable\n", dev->name); + if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */ + result = A_CNF_MEDIA_10B_2; /* Yes! I don't care if I can xmit a packet */ + break; + case A_CNF_MEDIA_AUTO: + writereg(dev, PP_LineCTL, lp->linectl | AUTO_AUI_10BASET); + if (lp->adapter_cnf & A_CNF_10B_T) + if ((result = detect_tp(dev)) != 0) + break; + if (lp->adapter_cnf & A_CNF_AUI) + if ((result = detect_aui(dev)) != 0) + break; + if (lp->adapter_cnf & A_CNF_10B_2) + if ((result = detect_bnc(dev)) != 0) + break; + printk("%s: no media detected\n", dev->name); + goto release_irq; + } + switch(result) { + case 0: printk("%s: no network cable attached to configured media\n", dev->name); + goto release_irq; + case A_CNF_MEDIA_10B_T: printk("%s: using 10Base-T (RJ-45)\n", dev->name);break; + case A_CNF_MEDIA_AUI: printk("%s: using 10Base-5 (AUI)\n", dev->name);break; + case A_CNF_MEDIA_10B_2: printk("%s: using 10Base-2 (BNC)\n", dev->name);break; + default: printk("%s: unexpected result was %x\n", dev->name, result); goto release_irq; + } + + /* Turn on both receive and transmit operations */ + writereg(dev, PP_LineCTL, readreg(dev, PP_LineCTL) | SERIAL_RX_ON | SERIAL_TX_ON); + + /* Receive only error free packets addressed to this card */ + lp->rx_mode = 0; + writereg(dev, PP_RxCTL, DEF_RX_ACCEPT); + + lp->curr_rx_cfg = RX_OK_ENBL | RX_CRC_ERROR_ENBL; + if (lp->isa_config & STREAM_TRANSFER) + lp->curr_rx_cfg |= RX_STREAM_ENBL; + + writereg(dev, PP_RxCFG, lp->curr_rx_cfg); + + writereg(dev, PP_TxCFG, TX_LOST_CRS_ENBL | TX_SQE_ERROR_ENBL | TX_OK_ENBL | + TX_LATE_COL_ENBL | TX_JBR_ENBL | TX_ANY_COL_ENBL | TX_16_COL_ENBL); + + writereg(dev, PP_BufCFG, READY_FOR_TX_ENBL | RX_MISS_COUNT_OVRFLOW_ENBL | + TX_COL_COUNT_OVRFLOW_ENBL | TX_UNDERRUN_ENBL); + + /* now that we've got our act together, enable everything */ + writereg(dev, PP_BusCTL, ENABLE_IRQ + ); + dev->tbusy = 0; + dev->interrupt = 0; + dev->start = 1; + MOD_INC_USE_COUNT; + return 0; +} + +static int +net_send_packet(struct sk_buff *skb, struct device *dev) +{ + if (dev->tbusy) { + /* If we get here, some higher level has decided we are broken. + There should really be a "kick me" function call instead. */ + int tickssofar = jiffies - dev->trans_start; + if (tickssofar < 5) + return 1; + if (net_debug > 0) printk("%s: transmit timed out, %s?\n", dev->name, + tx_done(dev) ? "IRQ conflict ?" : "network cable problem"); + /* Try to restart the adaptor. */ + dev->tbusy=0; + dev->trans_start = jiffies; + } + + /* Block a timer-based transmit from overlapping. This could better be + done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */ + if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) + printk("%s: Transmitter access conflict.\n", dev->name); + else { + struct net_local *lp = (struct net_local *)dev->priv; + io_addr_t ioaddr = dev->base_addr; + unsigned long flags; + + if (net_debug > 3)printk("%s: sent %d byte packet of type %x\n", dev->name, skb->len, (skb->data[ETH_ALEN+ETH_ALEN] << 8) | skb->data[ETH_ALEN+ETH_ALEN+1]); + + /* keep the upload from being interrupted, since we + ask the chip to start transmitting before the + whole packet has been completely uploaded. */ + save_flags(flags); + cli(); + + /* initiate a transmit sequence */ + outw(lp->send_cmd, ioaddr + TX_CMD_PORT); + outw(skb->len, ioaddr + TX_LEN_PORT); + + /* Test to see if the chip has allocated memory for the packet */ + if ((readreg(dev, PP_BusST) & READY_FOR_TX_NOW) == 0) { + if (net_debug >3 ) + printk("%s: not ready for transmission\n", dev->name); + /* Gasp! It hasn't. But that shouldn't happen since + we're waiting for TxOk, so return 1 and requeue this packet. */ + restore_flags(flags); + return 1; + } + + /* Write the contents of the packet */ + outsw(ioaddr + TX_FRAME_PORT,skb->data,(skb->len+1) >>1); + + if (net_debug > 3) + printk("%s: written packet to the chip\n", dev->name); + + restore_flags(flags); + dev->trans_start = jiffies; + } + dev_kfree_skb (skb); + + return 0; +} + +/* The typical workload of the driver: + Handle the network interface interrupts. */ +static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs) +{ + struct device *dev = dev_id; + struct net_local *lp; + int status; + io_addr_t ioaddr; + + if (dev == NULL) { + printk ("net_interrupt(): irq %d for unknown device.\n", irq); + return; + } + if (dev->interrupt) + printk("%s: Re-entering the interrupt handler.\n", dev->name); + dev->interrupt = 1; + + ioaddr = dev->base_addr; + lp = (struct net_local *)dev->priv; + + /* we MUST read all the events out of the ISQ, otherwise we'll never + get interrupted again. As a consequence, we can't have any limit + on the number of times we loop in the interrupt handler. The + hardware guarantees that eventually we'll run out of events. Of + course, if you're on a slow machine, and packets are arriving + faster than you can read them off, you're screwed. Hasta la + vista, baby! */ + while ((status = readword(dev, ISQ_PORT))) { + if (net_debug > 4)printk("%s: event=%04x\n", dev->name, status); + switch(status & ISQ_EVENT_MASK) { + case ISQ_RECEIVER_EVENT: + /* Got a packet(s). */ + net_rx(dev); + break; + case ISQ_TRANSMITTER_EVENT: + lp->stats.tx_packets++; + dev->tbusy = 0; + mark_bh(NET_BH); /* Inform upper layers. */ + if ((status & TX_OK) == 0) lp->stats.tx_errors++; + if (status & TX_LOST_CRS) lp->stats.tx_carrier_errors++; + if (status & TX_SQE_ERROR) lp->stats.tx_heartbeat_errors++; + if (status & TX_LATE_COL) lp->stats.tx_window_errors++; + if (status & TX_16_COL) lp->stats.tx_aborted_errors++; + break; + case ISQ_BUFFER_EVENT: + if (status & READY_FOR_TX) { + /* we tried to transmit a packet earlier, + but inexplicably ran out of buffers. + That shouldn't happen since we only ever + load one packet. Shrug. Do the right + thing anyway. */ + dev->tbusy = 0; + mark_bh(NET_BH); /* Inform upper layers. */ + } + if (status & TX_UNDERRUN) { + if (net_debug > 0) printk("%s: transmit underrun\n", dev->name); + lp->send_underrun++; + if (lp->send_underrun == 3) lp->send_cmd = TX_AFTER_381; + else if (lp->send_underrun == 6) lp->send_cmd = TX_AFTER_ALL; + /* transmit cycle is done, although + frame wasn't transmitted - this + avoids having to wait for the upper + layers to timeout on us, in the + event of a tx underrun */ + dev->tbusy = 0; + mark_bh(NET_BH); /* Inform upper layers. */ + } + break; + case ISQ_RX_MISS_EVENT: + ndebug(3, "rx_miss_event\n"); + lp->stats.rx_missed_errors += (status >>6); + break; + case ISQ_TX_COL_EVENT: + lp->stats.collisions += (status >>6); + break; + } + } + dev->interrupt = 0; + return; +} + +/* We have a good pack