diff -ruN linux-2.5.67-rmk1/Makefile linux-2.5.67-rmk1-cerf1/Makefile --- linux-2.5.67-rmk1/Makefile 2003-04-14 20:34:04.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/Makefile 2003-04-14 20:40:04.000000000 -0700 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 67 -EXTRAVERSION =-rmk1 +EXTRAVERSION =-rmk1-cerf1 # *DOCUMENTATION* # To see a list of typical targets execute "make help" diff -ruN linux-2.5.67-rmk1/arch/arm/def-configs/cerfcube linux-2.5.67-rmk1-cerf1/arch/arm/def-configs/cerfcube --- linux-2.5.67-rmk1/arch/arm/def-configs/cerfcube 2003-04-07 10:30:34.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/arch/arm/def-configs/cerfcube 2003-04-14 21:10:47.000000000 -0700 @@ -2,37 +2,44 @@ # Automatically generated make config: don't edit # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 # # Loadable module support # -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +# CONFIG_MODULES is not set # # System Type # +# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP310 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y @@ -45,23 +52,35 @@ # # Archimedes/A5000 Implementations (select only ONE) # -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set + +# +# CLPS711X/EP721X Implementations +# + +# +# Epxa10db +# # # Footbridge Implementations # -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set + +# +# IOP310 Implementation Options +# + +# +# IOP310 Chipset Features +# + +# +# Intel PXA250/210 Implementations +# # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set # CONFIG_SA1100_ADSBITSY is not set # CONFIG_SA1100_BRUTUS is not set CONFIG_SA1100_CERF=y @@ -69,13 +88,17 @@ CONFIG_SA1100_CERF_FLASH_16MB=y # CONFIG_SA1100_CERF_FLASH_32MB is not set # CONFIG_SA1100_CERF_CPLD is not set +# CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set # CONFIG_SA1100_EXTENEX1 is not set # CONFIG_SA1100_FLEXANET is not set # CONFIG_SA1100_FREEBIRD is not set # CONFIG_SA1100_GRAPHICSCLIENT is not set # CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_HUW_WEBPANEL is not set # CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set @@ -83,54 +106,44 @@ # CONFIG_SA1100_OMNIMETER is not set # CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set # CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set # CONFIG_SA1100_PFS168 is not set # CONFIG_SA1100_VICTOR is not set # CONFIG_SA1100_XP860 is not set # CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_STORK is not set +# CONFIG_SA1100_SSP is not set CONFIG_SA1100_USB=y CONFIG_SA1100_USB_NETLINK=y -CONFIG_SA1100_USB_CHAR=y +# CONFIG_SA1100_USB_CHAR is not set # -# CLPS711X/EP721X Implementations +# Processor Type # -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +CONFIG_CPU_SA1100=y +CONFIG_CPU_32v4=y # -# Processor Type +# Processor Features # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -CONFIG_CPU_SA1100=y -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y # # General setup # -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set +CONFIG_DISCONTIGMEM=y +CONFIG_ISA=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_SA1110=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_24_API=y +# CONFIG_CPU_FREQ_PROC_INTF is not set CONFIG_HOTPLUG=y # @@ -139,28 +152,24 @@ CONFIG_PCMCIA=y # CONFIG_I82365 is not set # CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set CONFIG_PCMCIA_SA1100=y -CONFIG_NET=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y # # At least one math emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set # CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set +CONFIG_PM=y +# CONFIG_PREEMPT is not set # CONFIG_APM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0 root=/dev/mtdblock3 rw mem=32M" -# CONFIG_PFS168_CMDLINE is not set +CONFIG_CMDLINE="console=ttySA0,38400 root=/dev/mtdblock3 rootfstype=jffs2 rw mem=32M init=/linuxrc" CONFIG_LEDS=y CONFIG_LEDS_TIMER=y CONFIG_LEDS_CPU=y @@ -177,8 +186,9 @@ CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set # CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_BOOTLDR_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -207,36 +217,17 @@ # Mapping drivers for chip access # # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_SUN_UFLASH is not set # CONFIG_MTD_NORA is not set -# CONFIG_MTD_PNC2000 is not set -# CONFIG_MTD_RPXLITE is not set -# CONFIG_MTD_TQM8XXL is not set -# CONFIG_MTD_SC520CDP is not set -# CONFIG_MTD_NETSC520 is not set -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_ELAN_104NC is not set -# CONFIG_MTD_DBOX2 is not set -# CONFIG_MTD_CSTM_MIPS_IXX is not set -# CONFIG_MTD_CFI_FLAGADM is not set -# CONFIG_MTD_SOLUTIONENGINE is not set -# CONFIG_MTD_MIXMEM is not set -# CONFIG_MTD_OCTAGON is not set -# CONFIG_MTD_VMAX is not set -# CONFIG_MTD_OCELOT is not set -# CONFIG_MTD_L440GX is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_PCMCIA is not set +# CONFIG_MTD_UCLINUX is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_LART is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set @@ -246,7 +237,6 @@ # CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set # # NAND Flash Device Drivers @@ -254,21 +244,15 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y @@ -279,47 +263,50 @@ # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Networking support +# +CONFIG_NET=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set -CONFIG_NETLINK=y -CONFIG_RTNETLINK=y # CONFIG_NETLINK_DEV is not set # CONFIG_NETFILTER is not set -CONFIG_FILTER=y CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set +# CONFIG_XFRM_USER is not set # +# SCTP Configuration (EXPERIMENTAL) # -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC is not set # CONFIG_DECNET is not set # CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -332,8 +319,9 @@ # CONFIG_NET_SCHED is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set CONFIG_NETDEVICES=y # @@ -350,39 +338,25 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -# CONFIG_SUNLANCE is not set -# CONFIG_SUNBMAC is not set -# CONFIG_SUNQE is not set -# CONFIG_SUNLANCE is not set -# CONFIG_SUNGEM 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_ELMC is not set -# CONFIG_ELMC_II is not set -CONFIG_CERF_CS8900A=y +# CONFIG_MII is not set +# CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set +CONFIG_NET_PCI=y +# CONFIG_AC3200 is not set +# CONFIG_APRICOT is not set +# CONFIG_CS89x0 is not set +CONFIG_CS8900=y # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set @@ -392,11 +366,8 @@ # CONFIG_NET_RADIO is not set # -# Token Ring devices +# Token Ring devices (depends on LLC=y) # -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # @@ -407,30 +378,20 @@ # # PCMCIA network device support # -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -CONFIG_PCMCIA_PCNET=m -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -# CONFIG_NET_PCMCIA_RADIO is not set +# CONFIG_NET_PCMCIA is not set # -# Amateur Radio support +# IrDA (infrared) support # -# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set # -# IrDA (infrared) support +# Amateur Radio support # -# CONFIG_IRDA is not set +# CONFIG_HAMRADIO is not set # -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y @@ -442,28 +403,19 @@ # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=m +# CONFIG_IDEDISK_STROKE is not set +CONFIG_BLK_DEV_IDECS=y # CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set # # IDE chipset support/bugfixes # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set # CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_IDE_MODES is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set # # SCSI support @@ -473,128 +425,143 @@ # # I2O device support # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set # # ISDN subsystem # -# CONFIG_ISDN is not set +# CONFIG_ISDN_BOOL is not set + +# +# Input device support +# +CONFIG_INPUT=y # -# Input core support +# Userland interfaces # -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +# CONFIG_SERIO is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Character devices # -CONFIG_VT=y -# CONFIG_VT_CONSOLE is not set -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -# CONFIG_SERIAL_ANAKIN is not set -# CONFIG_SERIAL_ANAKIN_CONSOLE is not set -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_DZ is not set CONFIG_SERIAL_SA1100=y CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=9600 -# CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_HUB6 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=32 -# CONFIG_UCB1200 is not set -# CONFIG_TOUCHSCREEN_UCB1200 is not set -# CONFIG_AUDIO_UCB1200 is not set -# CONFIG_ADC_UCB1200 is not set -# CONFIG_TOUCHSCREEN_H3600 is not set -# CONFIG_PROFILER is not set -# CONFIG_PFS168_SPI is not set -# CONFIG_PFS168_DTMF is not set -# CONFIG_PFS168_MISC is not set # # I2C support # -# CONFIG_I2C is not set +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ELV is not set +# CONFIG_I2C_VELLEMAN is not set +# CONFIG_SCx200_ACB is not set +CONFIG_I2C_BIT_SA1100_GPIO=y +# CONFIG_I2C_ALGOPCF is not set +CONFIG_I2C_CHARDEV=y # -# L3 serial bus support +# I2C Hardware Sensors Mainboard support # -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set -# CONFIG_BIT_SA1100_UCB1200 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_ISA is not set # -# Other L3 adapters +# I2C Hardware Sensors Chip support # -# CONFIG_L3_SA1111 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set # -# L3 driver support +# L3 serial bus support # -# CONFIG_L3_DRV_UDA1341 is not set -# CONFIG_BIT_SA1100_GPIO is not set +CONFIG_L3=y +CONFIG_L3_ALGOBIT=y +CONFIG_L3_BIT_SA1100_GPIO=y +CONFIG_BIT_SA1100_GPIO=y # # Mice # # CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set - -# -# Joysticks -# -# CONFIG_INPUT_GAMEPORT is not set - -# -# Input core support is needed for gameports -# +# CONFIG_QIC02_TAPE is not set # -# Input core support is needed for joysticks +# IPMI # -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +CONFIG_SA1100_WATCHDOG=y +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_60XX_WDT is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_CPU5_WDT is not set # CONFIG_NVRAM is not set -# CONFIG_RTC is not set +CONFIG_RTC=y CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set # # Ftape, the floppy tape device driver @@ -606,6 +573,9 @@ # # PCMCIA character devices # +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HANGCHECK_TIMER is not set # # Multimedia devices @@ -615,92 +585,112 @@ # # File systems # -# CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_CMS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT3_FS is not set # CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +CONFIG_ROMFS_FS=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y -CONFIG_UMSDOS_FS=y CONFIG_VFAT_FS=y +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS=y +CONFIG_TMPFS=y +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set -# CONFIG_FREEVXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -CONFIG_ROMFS_FS=y -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set # CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_GSS is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_SMB_NLS is not set +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_NEC98_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set CONFIG_NLS=y # # Native Language Support # CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set @@ -721,8 +711,9 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -738,13 +729,7 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers -# -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set - -# -# Frame-buffer support +# Graphics support # # CONFIG_FB is not set @@ -754,121 +739,57 @@ # CONFIG_SOUND is not set # -# USB support -# -# CONFIG_USB is not set - -# -# USB Controllers -# -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -# CONFIG_USB_OHCI_SA1111 is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# USB Human Interface Devices (HID) -# - -# -# Input core support is needed for USB HID -# - -# -# USB Imaging devices +# Misc devices # -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # -# USB Multimedia devices +# Multimedia Capabilities Port drivers # +# CONFIG_MCP is not set # -# Video4Linux support is needed for USB Multimedia device support +# Console Switches # -# CONFIG_USB_DABUSB is not set +# CONFIG_SWITCHES is not set # -# USB Network adaptors +# USB support # -# CONFIG_USB_PLUSB is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set # -# USB port drivers +# Bluetooth support # -# CONFIG_USB_USS720 is not set +# CONFIG_BT is not set # -# USB Serial Converter support +# Kernel hacking # -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_ERRORS=y +CONFIG_KALLSYMS=y +CONFIG_DEBUG_LL=y # -# Miscellaneous USB drivers +# Security options # -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_ID75 is not set +# CONFIG_SECURITY is not set # -# Bluetooth support +# Cryptographic options # -# CONFIG_BT is not set +# CONFIG_CRYPTO is not set # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_NO_PGT_CACHE is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -ruN linux-2.5.67-rmk1/arch/arm/mach-sa1100/cerf.c linux-2.5.67-rmk1-cerf1/arch/arm/mach-sa1100/cerf.c --- linux-2.5.67-rmk1/arch/arm/mach-sa1100/cerf.c 2003-04-07 10:31:14.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/arch/arm/mach-sa1100/cerf.c 2003-04-14 20:39:48.000000000 -0700 @@ -10,39 +10,24 @@ #include #include +#include #include #include #include +#include #include "generic.h" - static void __init cerf_init_irq(void) { sa1100_init_irq(); - - /* Need to register these as rising edge interrupts - * For standard 16550 serial driver support - * Basically - I copied it from pfs168.c :) - */ -#ifdef CONFIG_SA1100_CERF_CPLD - /* PDA Full serial port */ - set_irq_type(IRQ_GPIO3, IRQT_RISING); - /* PDA Bluetooth */ - set_irq_type(IRQ_GPIO2, IRQT_RISING); -#endif /* CONFIG_SA1100_CERF_CPLD */ - - set_irq_type(IRQ_GPIO_UCB1200_IRQ, IRQT_RISING); + set_irq_type(CERF_ETH_IRQ, IRQT_RISING); } static struct map_desc cerf_io_desc[] __initdata = { /* virtual physical length type */ + { 0xe8000000, 0x00000000, 0x02000000, MT_DEVICE }, /* Flash bank 0 */ { 0xf0000000, 0x08000000, 0x00100000, MT_DEVICE } /* Crystal Ethernet Chip */ -#ifdef CONFIG_SA1100_CERF_CPLD - ,{ 0xf1000000, 0x40000000, 0x00100000, MT_DEVICE }, /* CPLD Chip */ - { 0xf2000000, 0x10000000, 0x00100000, MT_DEVICE }, /* CerfPDA Bluetooth */ - { 0xf3000000, 0x18000000, 0x00100000, MT_DEVICE } /* CerfPDA Serial */ -#endif }; static void __init cerf_map_io(void) @@ -57,15 +42,11 @@ sa1100_register_uart(1, 2); sa1100_register_uart(2, 1); #endif - /* set some GPDR bits here while it's safe */ - GPDR |= GPIO_CF_RESET; -#ifdef CONFIG_SA1100_CERF_CPLD - GPDR |= GPIO_PWR_SHUTDOWN; -#endif + GPDR |= CERF_GPIO_CF_RESET; } -MACHINE_START(CERF, "Intrinsyc's Cerf Family of Products") +MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") MAINTAINER("support@intrinsyc.com") BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) MAPIO(cerf_map_io) diff -ruN linux-2.5.67-rmk1/arch/arm/mach-sa1100/usb/control.c linux-2.5.67-rmk1-cerf1/arch/arm/mach-sa1100/usb/control.c --- linux-2.5.67-rmk1/arch/arm/mach-sa1100/usb/control.c 2003-04-14 20:34:05.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/arch/arm/mach-sa1100/usb/control.c 2003-04-14 20:59:58.000000000 -0700 @@ -840,7 +840,7 @@ usbc_string_free_all(&ctl->strings); if (ctl->driver->owner) - __MOD_DEC_USE_COUNT(ctl->driver->owner); + MOD_DEC_USE_COUNT; } EXPORT_SYMBOL(usbctl_close); diff -ruN linux-2.5.67-rmk1/drivers/base/power.c linux-2.5.67-rmk1-cerf1/drivers/base/power.c --- linux-2.5.67-rmk1/drivers/base/power.c 2003-04-07 10:31:54.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/base/power.c 2003-04-14 21:08:36.000000000 -0700 @@ -85,6 +85,7 @@ printk(KERN_EMERG "Shutting down devices\n"); +#if 0 down_write(&devices_subsys.rwsem); list_for_each(entry,&devices_subsys.kset.list) { struct device * dev = to_dev(entry); @@ -94,6 +95,7 @@ } } up_write(&devices_subsys.rwsem); +#endif } EXPORT_SYMBOL(device_suspend); diff -ruN linux-2.5.67-rmk1/drivers/l3/l3-bit-sa1100.c linux-2.5.67-rmk1-cerf1/drivers/l3/l3-bit-sa1100.c --- linux-2.5.67-rmk1/drivers/l3/l3-bit-sa1100.c 2003-04-14 20:34:05.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/l3/l3-bit-sa1100.c 2003-04-14 20:39:48.000000000 -0700 @@ -216,6 +216,12 @@ bit->l3_mode = GPIO_GPIO17; } + if (machine_is_cerf()) { + bit->sda = GPIO_GPIO6; + bit->scl = GPIO_GPIO4; + bit->l3_mode = GPIO_GPIO5; + } + if (machine_is_h3600() || machine_is_h3100()) { bit->sda = GPIO_GPIO14; bit->scl = GPIO_GPIO16; diff -ruN linux-2.5.67-rmk1/drivers/mtd/maps/sa1100-flash.c linux-2.5.67-rmk1-cerf1/drivers/mtd/maps/sa1100-flash.c --- linux-2.5.67-rmk1/drivers/mtd/maps/sa1100-flash.c 2003-04-14 20:34:05.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/mtd/maps/sa1100-flash.c 2003-04-14 20:39:48.000000000 -0700 @@ -204,50 +204,34 @@ #ifdef CONFIG_SA1100_CERF #ifdef CONFIG_SA1100_CERF_FLASH_32MB -static struct mtd_partition cerf_partitions[] = { - { - .name = "firmware", - .size = 0x00040000, - .offset = 0, - }, { - .name = "params", - .size = 0x00040000, - .offset = 0x00040000, - }, { - .name = "kernel", - .size = 0x00100000, - .offset = 0x00080000, - }, { - .name = "rootdisk", - .size = 0x01E80000, - .offset = 0x00180000, - } -}; +# define CERF_FLASH_SIZE 0x02000000 #elif defined CONFIG_SA1100_CERF_FLASH_16MB +# define CERF_FLASH_SIZE 0x01000000 +#elif defined CONFIG_SA1100_CERF_FLASH_8MB +# define CERF_FLASH_SIZE 0x00800000 +#else +# error "Undefined flash size for CERF in sa1100-flash.c" +#endif + static struct mtd_partition cerf_partitions[] = { { - .name = "firmware", + .name = "Bootloader", .size = 0x00020000, - .offset = 0, + .offset = 0x00000000, }, { - .name = "params", - .size = 0x00020000, + .name = "Params", + .size = 0x00040000, .offset = 0x00020000, }, { - .name = "kernel", + .name = "Kernel", .size = 0x00100000, - .offset = 0x00040000, + .offset = 0x00060000, }, { - .name = "rootdisk", - .size = 0x00EC0000, - .offset = 0x00140000, + .name = "Filesystem", + .size = CERF_FLASH_SIZE-0x00160000, + .offset = 0x00160000, } }; -#elif defined CONFIG_SA1100_CERF_FLASH_8MB -# error "Unwritten type definition" -#else -# error "Undefined memory orientation for CERF in sa1100-flash.c" -#endif #endif #ifdef CONFIG_SA1100_CONSUS diff -ruN linux-2.5.67-rmk1/drivers/net/Kconfig linux-2.5.67-rmk1-cerf1/drivers/net/Kconfig --- linux-2.5.67-rmk1/drivers/net/Kconfig 2003-04-14 20:34:05.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/net/Kconfig 2003-04-14 20:39:48.000000000 -0700 @@ -1411,6 +1411,22 @@ . The module will be called cs89x. +config CS8900 + tristate "CS8900 support" + depends on NET_PCI && ISA + ---help--- + Support for CS8900 chipset based Ethernet cards. If you have a + network (Ethernet) card of this type, say Y and read the + Ethernet-HOWTO, available from + as well as + . + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read as well as + . The module will be + called cs8900.o. + config DGRS tristate "Digi Intl. RightSwitch SE-X support" depends on NET_PCI && (PCI || EISA) diff -ruN linux-2.5.67-rmk1/drivers/net/Makefile linux-2.5.67-rmk1-cerf1/drivers/net/Makefile --- linux-2.5.67-rmk1/drivers/net/Makefile 2003-04-14 20:34:05.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/net/Makefile 2003-04-14 20:39:48.000000000 -0700 @@ -167,6 +167,7 @@ obj-$(CONFIG_HYDRA) += hydra.o 8390.o obj-$(CONFIG_ARIADNE) += ariadne.o obj-$(CONFIG_CS89x0) += cs89x0.o +obj-$(CONFIG_CS8900) += cs8900.o obj-$(CONFIG_MACSONIC) += macsonic.o obj-$(CONFIG_MACMACE) += macmace.o obj-$(CONFIG_MAC89x0) += mac89x0.o diff -ruN linux-2.5.67-rmk1/drivers/net/cs8900.c linux-2.5.67-rmk1-cerf1/drivers/net/cs8900.c --- linux-2.5.67-rmk1/drivers/net/cs8900.c 1969-12-31 16:00:00.000000000 -0800 +++ linux-2.5.67-rmk1-cerf1/drivers/net/cs8900.c 2003-04-14 20:39:48.000000000 -0700 @@ -0,0 +1,904 @@ + +/* + * linux/drivers/net/cs8900.c + * + * Author: Abraham van der Merwe + * + * A Cirrus Logic CS8900A driver for Linux + * based on the cs89x0 driver written by Russell Nelson, + * Donald Becker, and others. + * + * This source code is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * History: + * 22-May-2002 Initial version (Abraham vd Merwe) + * 30-May-2002 Added char device support for eeprom (Frank Becker) + * + */ + +/* + * At the moment the driver does not support memory mode operation. + * It is trivial to implement this, but not worth the effort. + */ + +/* + * TODO: + * + * 1. Sort out ethernet checksum + * 2. If !ready in send_start(), queue buffer and send it in interrupt handler + * when we receive a BufEvent with Rdy4Tx, send it again. dangerous! + * 3. how do we prevent interrupt handler destroying integrity of get_stats()? + * 4. Change reset code to check status. + * 5. Implement set_mac_address and remove fake mac address + * 7. Link status detection stuff + * 8. Write utility to write EEPROM, do self testing, etc. + * 9. Implement DMA routines (I need a board w/ DMA support for that) + * 10. Power management + * 11. Add support for multiple ethernet chips + */ + +// added BSt +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Added BSt +#include + + +#ifdef CONFIG_SA1100_CERF +#include "asm/arch/cerf.h" +#endif + + +#include "cs8900.h" + +//#define FULL_DUPLEX +//#define DEBUG + +typedef struct { + struct net_device_stats stats; + u16 txlen; + int char_devnum; + + spinlock_t lock; +} cs8900_t; + +int cs8900_probe (struct net_device *dev); +static struct net_device cs8900_dev = +{ + init: cs8900_probe +}; + +/* + * There seems to be no way to determine the exact size of the eeprom, + * so we use the largest size. + * FIXME: Verify it's safe to read/write past the end of a 64/128 + * byte eeprom. + * + * Possible eeprom sizes: + * Cx46 - 64 bytes + * Cx56 - 128 bytes + * Cx66 - 256 bytes + */ +#define MAX_EEPROM_SIZE 256 + +static int cs8900_eeprom_fopen(struct inode *inode, struct file *file); +static int cs8900_eeprom_frelease(struct inode *inode, struct file *file); +static loff_t cs8900_eeprom_fllseek(struct file * file,loff_t offset, int flags); +static ssize_t cs8900_eeprom_fread(struct file *file, char *buf, size_t count, loff_t *f_pos); +static ssize_t cs8900_eeprom_fwrite(struct file *file, const char *buf, size_t count, loff_t *f_pos); +static struct file_operations cs8900_eeprom_fops = { + owner: THIS_MODULE, + open: cs8900_eeprom_fopen, + release: cs8900_eeprom_frelease, + llseek: cs8900_eeprom_fllseek, + read: cs8900_eeprom_fread, + write: cs8900_eeprom_fwrite, +}; + +static u16 cs8900_eeprom_cache[MAX_EEPROM_SIZE/2]; + +/* + * I/O routines + */ + +static inline u16 cs8900_read (struct net_device *dev,u16 reg) +{ + outw (reg,dev->base_addr + PP_Address); + return (inw (dev->base_addr + PP_Data)); +} + +static inline void cs8900_write (struct net_device *dev,u16 reg,u16 value) +{ + outw (reg,dev->base_addr + PP_Address); + outw (value,dev->base_addr + PP_Data); +} + +static inline void cs8900_set (struct net_device *dev,u16 reg,u16 value) +{ + cs8900_write (dev,reg,cs8900_read (dev,reg) | value); +} + +static inline void cs8900_clear (struct net_device *dev,u16 reg,u16 value) +{ + cs8900_write (dev,reg,cs8900_read (dev,reg) & ~value); +} + +static inline void cs8900_frame_read (struct net_device *dev,struct sk_buff *skb,u16 length) +{ + insw (dev->base_addr,skb_put (skb,length),(length + 1) / 2); +} + +static inline void cs8900_frame_write (struct net_device *dev,struct sk_buff *skb) +{ + outsw (dev->base_addr,skb->data,(skb->len + 1) / 2); +} + +/* + * EEPROM I/O routines + */ + +static int cs8900_eeprom_wait (struct net_device *dev) +{ + int i; + + for (i = 0; i < 3000; i++) { + if (!(cs8900_read (dev,PP_SelfST) & SIBUSY)) + return (0); + udelay (1); + } + + return (-1); +} + +static int cs8900_eeprom_read (struct net_device *dev,u16 *value,u16 offset) +{ + if (cs8900_eeprom_wait (dev) < 0) + return (-1); + + cs8900_write (dev,PP_EEPROMCommand,offset | EEReadRegister); + + if (cs8900_eeprom_wait (dev) < 0) + return (-1); + + *value = cs8900_read (dev,PP_EEPROMData); + + return (0); +} + +static int cs8900_eeprom_write (struct net_device *dev,u16 *value,u16 offset) +{ + cs8900_eeprom_wait(dev); + cs8900_write(dev, PP_EEPROMCommand, (EEWriteEnable)); + cs8900_eeprom_wait(dev); + cs8900_write(dev, PP_EEPROMData, *value); + cs8900_eeprom_wait(dev); + cs8900_write(dev, PP_EEPROMCommand, (offset | EEWriteRegister)); + cs8900_eeprom_wait(dev); + cs8900_write(dev, PP_EEPROMCommand, (EEWriteDisable)); + cs8900_eeprom_wait(dev); + + return 0; +} + +/* + * Debugging functions + */ + +#ifdef DEBUG +static inline int printable (int c) +{ + return ((c >= 32 && c <= 126) || + (c >= 174 && c <= 223) || + (c >= 242 && c <= 243) || + (c >= 252 && c <= 253)); +} + +static void dump16 (struct net_device *dev,const u8 *s,size_t len) +{ + int i; + char str[128]; + + if (!len) return; + + *str = '\0'; + + for (i = 0; i < len; i++) { + if (i && !(i % 4)) strcat (str," "); + sprintf (str,"%s%.2x ",str,s[i]); + } + + for ( ; i < 16; i++) { + if (i && !(i % 4)) strcat (str," "); + strcat (str," "); + } + + strcat (str," "); + for (i = 0; i < len; i++) sprintf (str,"%s%c",str,printable (s[i]) ? s[i] : '.'); + + printk (KERN_DEBUG "%s: %s\n",dev->name,str); +} + +static void hexdump (struct net_device *dev,const void *ptr,size_t size) +{ + const u8 *s = (u8 *) ptr; + int i; + for (i = 0; i < size / 16; i++, s += 16) dump16 (dev,s,16); + dump16 (dev,s,size % 16); +} + +static void dump_packet (struct net_device *dev,struct sk_buff *skb,const char *type) +{ + printk (KERN_INFO "%s: %s %d byte frame %.2x:%.2x:%.2x:%.2x:%.2x:%.2x to %.2x:%.2x:%.2x:%.2x:%.2x:%.2x type %.4x\n", + dev->name, + type, + skb->len, + skb->data[0],skb->data[1],skb->data[2],skb->data[3],skb->data[4],skb->data[5], + skb->data[6],skb->data[7],skb->data[8],skb->data[9],skb->data[10],skb->data[11], + (skb->data[12] << 8) | skb->data[13]); + if (skb->len < 0x100) hexdump (dev,skb->data,skb->len); +} + +static void eepromdump( struct net_device *dev) +{ + u16 buf[0x80]; + u16 i; + int count; + int total; + + if( cs8900_read( dev, PP_SelfST) & EEPROMpresent) + { + printk (KERN_INFO "%s: EEPROM present\n",dev->name); + } + else + { + printk (KERN_INFO "%s: NO EEPROM present\n",dev->name); + return; + } + + if( cs8900_read( dev, PP_SelfST) & EEPROMOK) + { + printk (KERN_INFO "%s: EEPROM OK\n",dev->name); + } + else + { + printk (KERN_INFO "%s: EEPROM checksum mismatch - fixing...\n",dev->name); + } + + printk (KERN_INFO "%s: Hexdump\n",dev->name); + for( i=0; i<0x80; i++) + { + cs8900_eeprom_read( dev, &buf[i], i); + } + hexdump( dev, buf, 0x100); + + if( buf[0] & 0x0100) + { + printk (KERN_INFO "%s: non-sequential EEPROM\n",dev->name); + } + else + { + printk (KERN_INFO "%s: sequential EEPROM\n",dev->name); + } + + if( (buf[0] & 0xe000) == 0xa000) + { + printk (KERN_INFO "%s: Found reset configuration block\n",dev->name); + } + else + { + printk (KERN_INFO "%s: Reset configuration block not found\n",dev->name); + return; + } + + count = 2; + total = buf[0] & 0xff; + printk (KERN_INFO "%s: Reset configuration block size = %d bytes\n",dev->name, total); + + while( count < total) + { + int groupsize = (buf[count/2] >> 12) + 1; + int basereg = (buf[count/2] &0x1ff); + printk (KERN_INFO "%s: Group size = %d words\n",dev->name, groupsize); + printk (KERN_INFO "%s: Base register = %x\n",dev->name, basereg); + count += (groupsize + 1)*2; + } +} + +#endif /* #ifdef DEBUG */ + +/* + * Driver functions + */ + +static void cs8900_receive (struct net_device *dev) +{ + cs8900_t *priv = (cs8900_t *) dev->priv; + struct sk_buff *skb; + u16 status,length; + + status = cs8900_read (dev,PP_RxStatus); + length = cs8900_read (dev,PP_RxLength); + + if (!(status & RxOK)) { + priv->stats.rx_errors++; + if ((status & (Runt | Extradata))) priv->stats.rx_length_errors++; + if ((status & CRCerror)) priv->stats.rx_crc_errors++; + return; + } + + if ((skb = dev_alloc_skb (length + 4)) == NULL) { + priv->stats.rx_dropped++; + return; + } + + skb->dev = dev; + skb_reserve (skb,2); + + cs8900_frame_read (dev,skb,length); + +#ifdef FULL_DUPLEX + dump_packet (dev,skb,"recv"); +#endif /* #ifdef FULL_DUPLEX */ + + skb->protocol = eth_type_trans (skb,dev); + + netif_rx (skb); + dev->last_rx = jiffies; + + priv->stats.rx_packets++; + priv->stats.rx_bytes += length; +} + +static int cs8900_send_start (struct sk_buff *skb,struct net_device *dev) +{ + cs8900_t *priv = (cs8900_t *) dev->priv; + u16 status; + + spin_lock_irq(&priv->lock); + netif_stop_queue (dev); + + cs8900_write (dev,PP_TxCMD,TxStart (After5)); + cs8900_write (dev,PP_TxLength,skb->len); + + status = cs8900_read (dev,PP_BusST); + + if ((status & TxBidErr)) { + spin_unlock_irq(&priv->lock); + printk (KERN_WARNING "%s: Invalid frame size %d!\n",dev->name,skb->len); + priv->stats.tx_errors++; + priv->stats.tx_aborted_errors++; + priv->txlen = 0; + return (1); + } + + if (!(status & Rdy4TxNOW)) { + spin_unlock_irq(&priv->lock); + printk (KERN_WARNING "%s: Transmit buffer not free!\n",dev->name); + priv->stats.tx_errors++; + priv->txlen = 0; + /* FIXME: store skb and send it in interrupt handler */ + return (1); + } + + cs8900_frame_write (dev,skb); + spin_unlock_irq(&priv->lock); + +#ifdef DEBUG + dump_packet (dev,skb,"send"); +#endif /* #ifdef DEBUG */ + + dev->trans_start = jiffies; + + dev_kfree_skb (skb); + + priv->txlen = skb->len; + + return (0); +} + +static void cs8900_interrupt (int irq,void *id,struct pt_regs *regs) +{ + struct net_device *dev = (struct net_device *) id; + cs8900_t *priv; + u16 status; + + if (dev->priv == NULL) { + printk (KERN_WARNING "%s: irq %d for unknown device.\n",dev->name,irq); + return; + } + + priv = (cs8900_t *) dev->priv; + + while ((status = cs8900_read (dev,PP_ISQ))) { + switch (RegNum (status)) { + case RxEvent: + cs8900_receive (dev); + break; + + case TxEvent: + priv->stats.collisions += ColCount (cs8900_read (dev,PP_TxCOL)); + if (!(RegContent (status) & TxOK)) { + priv->stats.tx_errors++; + if ((RegContent (status) & Out_of_window)) priv->stats.tx_window_errors++; + if ((RegContent (status) & Jabber)) priv->stats.tx_aborted_errors++; + break; + } else if (priv->txlen) { + priv->stats.tx_packets++; + priv->stats.tx_bytes += priv->txlen; + } + priv->txlen = 0; + netif_wake_queue (dev); + break; + + case BufEvent: + if ((RegContent (status) & RxMiss)) { + u16 missed = MissCount (cs8900_read (dev,PP_RxMISS)); + priv->stats.rx_errors += missed; + priv->stats.rx_missed_errors += missed; + } + if ((RegContent (status) & TxUnderrun)) { + priv->stats.tx_errors++; + priv->stats.tx_fifo_errors++; + + priv->txlen = 0; + netif_wake_queue (dev); + } + /* FIXME: if Rdy4Tx, transmit last sent packet (if any) */ + break; + + case TxCOL: + priv->stats.collisions += ColCount (cs8900_read (dev,PP_TxCOL)); + break; + + case RxMISS: + status = MissCount (cs8900_read (dev,PP_RxMISS)); + priv->stats.rx_errors += status; + priv->stats.rx_missed_errors += status; + break; + } + } +} + +static void cs8900_transmit_timeout (struct net_device *dev) +{ + cs8900_t *priv = (cs8900_t *) dev->priv; + priv->stats.tx_errors++; + priv->stats.tx_heartbeat_errors++; + priv->txlen = 0; + netif_wake_queue (dev); +} + +static int cs8900_start (struct net_device *dev) +{ + int result; + + /* install interrupt handler */ + if ((result = request_irq (dev->irq,&cs8900_interrupt,0,dev->name,dev)) < 0) { + printk (KERN_ERR "%s: could not register interrupt %d\n",dev->name,dev->irq); + return (result); + } + + set_irq_type(dev->irq, IRQT_RISING); + + /* enable the ethernet controller */ + cs8900_set (dev,PP_RxCFG,RxOKiE | BufferCRC | CRCerroriE | RuntiE | ExtradataiE); + cs8900_set (dev,PP_RxCTL,RxOKA | IndividualA | BroadcastA); + cs8900_set (dev,PP_TxCFG,TxOKiE | Out_of_windowiE | JabberiE); + cs8900_set (dev,PP_BufCFG,Rdy4TxiE | RxMissiE | TxUnderruniE | TxColOvfiE | MissOvfloiE); + cs8900_set (dev,PP_LineCTL,SerRxON | SerTxON); + cs8900_set (dev,PP_BusCTL,EnableRQ); + +#ifdef FULL_DUPLEX + cs8900_set (dev,PP_TestCTL,FDX); +#endif /* #ifdef FULL_DUPLEX */ + + /* start the queue */ + netif_start_queue (dev); + + MOD_INC_USE_COUNT; + + return (0); +} + +static int cs8900_stop (struct net_device *dev) +{ + /* disable ethernet controller */ + cs8900_write (dev,PP_BusCTL,0); + cs8900_write (dev,PP_TestCTL,0); + cs8900_write (dev,PP_SelfCTL,0); + cs8900_write (dev,PP_LineCTL,0); + cs8900_write (dev,PP_BufCFG,0); + cs8900_write (dev,PP_TxCFG,0); + cs8900_write (dev,PP_RxCTL,0); + cs8900_write (dev,PP_RxCFG,0); + + /* uninstall interrupt handler */ + free_irq (dev->irq,dev); + + /* stop the queue */ + netif_stop_queue (dev); + + MOD_DEC_USE_COUNT; + + return (0); +} + +static struct net_device_stats *cs8900_get_stats (struct net_device *dev) +{ + cs8900_t *priv = (cs8900_t *) dev->priv; + return (&priv->stats); +} + +static void cs8900_set_receive_mode (struct net_device *dev) +{ + if ((dev->flags & IFF_PROMISC)) + cs8900_set (dev,PP_RxCTL,PromiscuousA); + else + cs8900_clear (dev,PP_RxCTL,PromiscuousA); + + if ((dev->flags & IFF_ALLMULTI) && dev->mc_list) + cs8900_set (dev,PP_RxCTL,MulticastA); + else + cs8900_clear (dev,PP_RxCTL,MulticastA); +} + +static int cs8900_eeprom (struct net_device *dev) +{ + cs8900_t *priv = (cs8900_t *) dev->priv; + int i; + +#ifdef DEBUG + eepromdump (dev); +#endif + + if( (cs8900_read( dev, PP_SelfST) & EEPROMpresent) == 0) + { + /* no eeprom */ + return (-ENODEV); + } + + /* add character device for easy eeprom programming */ + if( (priv->char_devnum=register_chrdev(0,"cs8900_eeprom",&cs8900_eeprom_fops)) != 0) + printk (KERN_INFO "%s: Registered cs8900_eeprom char device (major #%d)\n", + dev->name, priv->char_devnum); + else + printk (KERN_WARNING "%s: Failed to register char device cs8900_eeprom\n",dev->name); + + if( (cs8900_read( dev, PP_SelfST) & EEPROMOK) == 0) + { + /* bad checksum, invalid config block */ + return (-EFAULT); + } + + /* If we get here, the chip will have initialized the registers + * that were specified in the eeprom configuration block + * We assume this is at least the mac address. + */ + for (i = 0; i < ETH_ALEN; i += 2) + { + u16 mac = cs8900_read (dev,PP_IA + i); + dev->dev_addr[i] = mac & 0xff; + dev->dev_addr[i+1] = (mac>>8) & 0xff; + } + + return (0); +} + +/* + * EEPROM Charater device + */ + +static int cs8900_eeprom_fopen(struct inode *inode, struct file *file) +{ + u16 i; + for( i=0; if_pos + offset; + break; + case 2: /* SEEK_END */ + newpos = (MAX_EEPROM_SIZE-1) - offset; + break; + default: /* can't happen */ + return -EINVAL; + + } + + if( (newpos<0) || (newpos>=MAX_EEPROM_SIZE)) return -EINVAL; + + file->f_pos = newpos; + return newpos; +} + +static ssize_t cs8900_eeprom_fread(struct file *file, char *buf, size_t count, loff_t *f_pos) +{ + unsigned char *temp = (unsigned char *)cs8900_eeprom_cache; + + if (*f_pos >= MAX_EEPROM_SIZE) + return 0; + + if (*f_pos + count > MAX_EEPROM_SIZE) + count = MAX_EEPROM_SIZE - *f_pos; + + if (count<1) + return 0; + + if (copy_to_user(buf, &temp[*f_pos], count)){ + return -EFAULT; + } + *f_pos += count; + return count; +} + +static ssize_t cs8900_eeprom_fwrite(struct file *file, const char *buf, size_t count, loff_t *f_pos) +{ + u16 i; + unsigned char *temp = (unsigned char *)cs8900_eeprom_cache; + + if (*f_pos >= MAX_EEPROM_SIZE) + return 0; + + if (*f_pos + count > MAX_EEPROM_SIZE) + count = MAX_EEPROM_SIZE - *f_pos; + + if (count<1) + return 0; + + /* FIXME: lock critical section */ + + /* update the cache */ + if (copy_from_user(&temp[*f_pos], buf, count)){ + return -EFAULT; + } + + /* not concerned about performance, so write the entire thing */ + for( i=0; i= 40) + return -1; + return 0; +} + +static int __init cs8900_read_eeprom (struct net_device *dev, u16 off, u16 *value) +{ + if (cs8900_wait_eeprom_ready(dev) < 0) + return 0; + /* Send EEPROM read command and location to read */ + cs8900_write (dev, PP_EEPROMCommand, off | EEReadRegister); + + if (cs8900_wait_eeprom_ready(dev) < 0) + return 0; + + /* Get EEPROM data from EEPROM data register */ + *value = cs8900_read (dev, PP_EEPROMData); + return 1; +} +#endif /* #ifdef CONFIG_SA1100_CERF */ + +/* + * Driver initialization routines + */ + +int __init cs8900_probe (struct net_device *dev) +{ + static cs8900_t priv; + int i,result; + u16 value; +#if defined(CONFIG_SA1100_CERF) + u16 MAC_addr[3] = {0, 0, 0}; +#endif /* #if defined(CONFIG_SA1100_CERF */ + + printk ("Cirrus Logic CS8900A driver for Linux (V0.01)\n"); + + memset (&priv,0,sizeof (cs8900_t)); + + ether_setup (dev); + + dev->open = cs8900_start; + dev->stop = cs8900_stop; + dev->hard_start_xmit = cs8900_send_start; + dev->get_stats = cs8900_get_stats; + dev->set_multicast_list = cs8900_set_receive_mode; + dev->tx_timeout = cs8900_transmit_timeout; + dev->watchdog_timeo = HZ; + + dev->dev_addr[0] = 0x00; + dev->dev_addr[1] = 0x12; + dev->dev_addr[2] = 0x34; + dev->dev_addr[3] = 0x56; + dev->dev_addr[4] = 0x78; + dev->dev_addr[5] = 0x9a; + + dev->if_port = IF_PORT_10BASET; + dev->priv = (void *) &priv; + + spin_lock_init(&priv.lock); + + SET_MODULE_OWNER (dev); + + if ((result = check_region (dev->base_addr,16))) { + printk (KERN_ERR "%s: can't get I/O port address 0x%lx\n",dev->name,dev->base_addr); + return (result); + } + request_region (dev->base_addr,16,dev->name); + +#ifdef CONFIG_SA1100_FRODO + dev->base_addr = FRODO_ETH_IO + 0x300; + dev->irq = FRODO_ETH_IRQ; + frodo_reset (dev); +#endif /* #ifdef CONFIG_SA1100_FRODO */ + +#if defined(CONFIG_SA1100_CERF) + dev->base_addr = CERF_ETH_IO + 0x300; + dev->irq = CERF_ETH_IRQ; +#endif /* #if defined(CONFIG_SA1100_CERF) */ + +#if defined(CONFIG_SA1100_CERF) + if (!cs8900_read_eeprom(dev, 0x1c, &MAC_addr[0])) + printk("\ncs8900: [CERF] EEPROM[0] read failed\n"); + if (!cs8900_read_eeprom(dev, 0x1d, &MAC_addr[1])) + printk("\ncs8900: [CERF] EEPROM[1] read failed\n"); + if (!cs8900_read_eeprom(dev, 0x1e, &MAC_addr[2])) + printk("\ncs8900: [CERF] EEPROM[2] read failed\n"); + for (i = 0; i < ETH_ALEN / 2; i++) + { + dev->dev_addr[i*2] = MAC_addr[i] & 0xff; + dev->dev_addr[i*2+1] = (MAC_addr[i] >> 8) & 0xff; + } +#endif /* #if defined(CONFIG_SA1100_CERF) */ + + /* verify EISA registration number for Cirrus Logic */ + if ((value = cs8900_read (dev,PP_ProductID)) != EISA_REG_CODE) { + printk (KERN_ERR "%s: incorrect signature 0x%.4x\n",dev->name,value); + return (-ENXIO); + } + + /* verify chip version */ + value = cs8900_read (dev,PP_ProductID + 2); + if (VERSION (value) != CS8900A) { + printk (KERN_ERR "%s: unknown chip version 0x%.8x\n",dev->name,VERSION (value)); + return (-ENXIO); + } + /* setup interrupt number */ + cs8900_write (dev,PP_IntNum,0); + + + /* If an EEPROM is present, use it's MAC address. A valid EEPROM will + * initialize the registers automatically. + */ + result = cs8900_eeprom (dev); +#if defined(CONFIG_SA1100_CERF) + result = -ENODEV; +#endif /* defined(CONFIG_SA1100_CERF) */ + + printk (KERN_INFO "%s: CS8900A rev %c at %#lx irq=%d", + dev->name,'B' + REVISION (value) - REV_B, dev->base_addr, dev->irq); + if (result == -ENODEV) { + /* no eeprom or invalid config block, configure MAC address by hand */ + for (i = 0; i < ETH_ALEN; i += 2) + cs8900_write (dev,PP_IA + i,dev->dev_addr[i] | (dev->dev_addr[i + 1] << 8)); + printk (", no eeprom "); + } + else if( result == -EFAULT) + { + printk (", eeprom (invalid config block)"); + } + else + { + printk (", eeprom ok"); + } + + printk (", addr:"); + for (i = 0; i < ETH_ALEN; i += 2) + { + u16 mac = cs8900_read (dev,PP_IA + i); + printk ("%c%02X:%2X", (i==0)?' ':':', mac & 0xff, (mac >> 8)); + } + printk ("\n"); + + return (0); +} + +static int __init cs8900_init (void) +{ + strcpy(cs8900_dev.name, "eth%d"); + + return (register_netdev (&cs8900_dev)); +} + +static void __exit cs8900_cleanup (void) +{ + cs8900_t *priv = (cs8900_t *) cs8900_dev.priv; + if( priv->char_devnum) + { + unregister_chrdev(priv->char_devnum,"cs8900_eeprom"); + } + release_region (cs8900_dev.base_addr,16); + unregister_netdev (&cs8900_dev); +} + +MODULE_AUTHOR ("Abraham van der Merwe "); +MODULE_DESCRIPTION ("Cirrus Logic CS8900A driver for Linux (V0.01)"); +MODULE_LICENSE ("GPL"); + +module_init (cs8900_init); +module_exit (cs8900_cleanup); diff -ruN linux-2.5.67-rmk1/drivers/net/cs8900.h linux-2.5.67-rmk1-cerf1/drivers/net/cs8900.h --- linux-2.5.67-rmk1/drivers/net/cs8900.h 1969-12-31 16:00:00.000000000 -0800 +++ linux-2.5.67-rmk1-cerf1/drivers/net/cs8900.h 2003-04-14 20:39:48.000000000 -0700 @@ -0,0 +1,237 @@ +#ifndef CS8900_H +#define CS8900_H + +/* + * linux/drivers/net/cs8900.h + * + * Author: Abraham van der Merwe + * + * A Cirrus Logic CS8900A driver for Linux + * based on the cs89x0 driver written by Russell Nelson, + * Donald Becker, and others. + * + * This source code is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + +/* + * Ports + */ + +#define PP_Address 0x0a /* PacketPage Pointer Port (Section 4.10.10) */ +#define PP_Data 0x0c /* PacketPage Data Port (Section 4.10.10) */ + +/* + * Registers + */ + +#define PP_ProductID 0x0000 /* Section 4.3.1 Product Identification Code */ +#define PP_MemBase 0x002c /* Section 4.9.2 Memory Base Address Register */ +#define PP_IntNum 0x0022 /* Section 3.2.3 Interrupt Number */ +#define PP_EEPROMCommand 0x0040 /* Section 4.3.11 EEPROM Command */ +#define PP_EEPROMData 0x0042 /* Section 4.3.12 EEPROM Data */ +#define PP_RxCFG 0x0102 /* Section 4.4.6 Receiver Configuration */ +#define PP_RxCTL 0x0104 /* Section 4.4.8 Receiver Control */ +#define PP_TxCFG 0x0106 /* Section 4.4.9 Transmit Configuration */ +#define PP_BufCFG 0x010a /* Section 4.4.12 Buffer Configuration */ +#define PP_LineCTL 0x0112 /* Section 4.4.16 Line Control */ +#define PP_SelfCTL 0x0114 /* Section 4.4.18 Self Control */ +#define PP_BusCTL 0x0116 /* Section 4.4.20 Bus Control */ +#define PP_TestCTL 0x0118 /* Section 4.4.22 Test Control */ +#define PP_ISQ 0x0120 /* Section 4.4.5 Interrupt Status Queue */ +#define PP_TxEvent 0x0128 /* Section 4.4.10 Transmitter Event */ +#define PP_BufEvent 0x012c /* Section 4.4.13 Buffer Event */ +#define PP_RxMISS 0x0130 /* Section 4.4.14 Receiver Miss Counter */ +#define PP_TxCOL 0x0132 /* Section 4.4.15 Transmit Collision Counter */ +#define PP_SelfST 0x0136 /* Section 4.4.19 Self Status */ +#define PP_BusST 0x0138 /* Section 4.4.21 Bus Status */ +#define PP_TxCMD 0x0144 /* Section 4.4.11 Transmit Command */ +#define PP_TxLength 0x0146 /* Section 4.5.2 Transmit Length */ +#define PP_IA 0x0158 /* Section 4.6.2 Individual Address (IEEE Address) */ +#define PP_RxStatus 0x0400 /* Section 4.7.1 Receive Status */ +#define PP_RxLength 0x0402 /* Section 4.7.1 Receive Length (in bytes) */ +#define PP_RxFrame 0x0404 /* Section 4.7.2 Receive Frame Location */ +#define PP_TxFrame 0x0a00 /* Section 4.7.2 Transmit Frame Location */ + +/* + * Values + */ + +/* PP_IntNum */ +#define INTRQ0 0x0000 +#define INTRQ1 0x0001 +#define INTRQ2 0x0002 +#define INTRQ3 0x0003 + +/* PP_ProductID */ +#define EISA_REG_CODE 0x630e +#define REVISION(x) (((x) & 0x1f00) >> 8) +#define VERSION(x) ((x) & ~0x1f00) + +#define CS8900A 0x0000 +#define REV_B 7 +#define REV_C 8 +#define REV_D 9 + +/* PP_RxCFG */ +#define Skip_1 0x0040 +#define StreamE 0x0080 +#define RxOKiE 0x0100 +#define RxDMAonly 0x0200 +#define AutoRxDMAE 0x0400 +#define BufferCRC 0x0800 +#define CRCerroriE 0x1000 +#define RuntiE 0x2000 +#define ExtradataiE 0x4000 + +/* PP_RxCTL */ +#define IAHashA 0x0040 +#define PromiscuousA 0x0080 +#define RxOKA 0x0100 +#define MulticastA 0x0200 +#define IndividualA 0x0400 +#define BroadcastA 0x0800 +#define CRCerrorA 0x1000 +#define RuntA 0x2000 +#define ExtradataA 0x4000 + +/* PP_TxCFG */ +#define Loss_of_CRSiE 0x0040 +#define SQErroriE 0x0080 +#define TxOKiE 0x0100 +#define Out_of_windowiE 0x0200 +#define JabberiE 0x0400 +#define AnycolliE 0x0800 +#define T16colliE 0x8000 + +/* PP_BufCFG */ +#define SWint_X 0x0040 +#define RxDMAiE 0x0080 +#define Rdy4TxiE 0x0100 +#define TxUnderruniE 0x0200 +#define RxMissiE 0x0400 +#define Rx128iE 0x0800 +#define TxColOvfiE 0x1000 +#define MissOvfloiE 0x2000 +#define RxDestiE 0x8000 + +/* PP_LineCTL */ +#define SerRxON 0x0040 +#define SerTxON 0x0080 +#define AUIonly 0x0100 +#define AutoAUI_10BT 0x0200 +#define ModBackoffE 0x0800 +#define PolarityDis 0x1000 +#define L2_partDefDis 0x2000 +#define LoRxSquelch 0x4000 + +/* PP_SelfCTL */ +#define RESET 0x0040 +#define SWSuspend 0x0100 +#define HWSleepE 0x0200 +#define HWStandbyE 0x0400 +#define HC0E 0x1000 +#define HC1E 0x2000 +#define HCB0 0x4000 +#define HCB1 0x8000 + +/* PP_BusCTL */ +#define ResetRxDMA 0x0040 +#define DMAextend 0x0100 +#define UseSA 0x0200 +#define MemoryE 0x0400 +#define DMABurst 0x0800 +#define IOCHRDYE 0x1000 +#define RxDMAsize 0x2000 +#define EnableRQ 0x8000 + +/* PP_TestCTL */ +#define DisableLT 0x0080 +#define ENDECloop 0x0200 +#define AUIloop 0x0400 +#define DisableBackoff 0x0800 +#define FDX 0x4000 + +/* PP_ISQ */ +#define RegNum(x) ((x) & 0x3f) +#define RegContent(x) ((x) & ~0x3d) + +#define RxEvent 0x0004 +#define TxEvent 0x0008 +#define BufEvent 0x000c +#define RxMISS 0x0010 +#define TxCOL 0x0012 + +/* PP_RxStatus */ +#define IAHash 0x0040 +#define Dribblebits 0x0080 +#define RxOK 0x0100 +#define Hashed 0x0200 +#define IndividualAdr 0x0400 +#define Broadcast 0x0800 +#define CRCerror 0x1000 +#define Runt 0x2000 +#define Extradata 0x4000 + +#define HashTableIndex(x) ((x) >> 0xa) + +/* PP_TxCMD */ +#define After5 0 +#define After381 1 +#define After1021 2 +#define AfterAll 3 +#define TxStart(x) ((x) << 6) + +#define Force 0x0100 +#define Onecoll 0x0200 +#define InhibitCRC 0x1000 +#define TxPadDis 0x2000 + +/* PP_BusST */ +#define TxBidErr 0x0080 +#define Rdy4TxNOW 0x0100 + +/* PP_TxEvent */ +#define Loss_of_CRS 0x0040 +#define SQEerror 0x0080 +#define TxOK 0x0100 +#define Out_of_window 0x0200 +#define Jabber 0x0400 +#define T16coll 0x8000 + +#define TX_collisions(x) (((x) >> 0xb) & ~0x8000) + +/* PP_BufEvent */ +#define SWint 0x0040 +#define RxDMAFrame 0x0080 +#define Rdy4Tx 0x0100 +#define TxUnderrun 0x0200 +#define RxMiss 0x0400 +#define Rx128 0x0800 +#define RxDest 0x8000 + +/* PP_RxMISS */ +#define MissCount(x) ((x) >> 6) + +/* PP_TxCOL */ +#define ColCount(x) ((x) >> 6) + +/* PP_SelfST */ +#define T3VActive 0x0040 +#define INITD 0x0080 +#define SIBUSY 0x0100 +#define EEPROMpresent 0x0200 +#define EEPROMOK 0x0400 +#define ELpresent 0x0800 +#define EEsize 0x1000 + +/* PP_EEPROMCommand */ +#define EEWriteEnable 0x00F0 +#define EEWriteDisable 0x0000 +#define EEWriteRegister 0x0100 +#define EEReadRegister 0x0200 +#define EEEraseRegister 0x0300 +#define ELSEL 0x0400 + +#endif /* #ifndef CS8900_H */ diff -ruN linux-2.5.67-rmk1/drivers/pcmcia/sa1100_cerf.c linux-2.5.67-rmk1-cerf1/drivers/pcmcia/sa1100_cerf.c --- linux-2.5.67-rmk1/drivers/pcmcia/sa1100_cerf.c 2003-04-07 10:32:49.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/drivers/pcmcia/sa1100_cerf.c 2003-04-14 20:51:49.000000000 -0700 @@ -11,27 +11,25 @@ #include #include #include +#include #include #include #include +#include #include "sa1100_generic.h" -#ifdef CONFIG_SA1100_CERF_CPLD -#define CERF_SOCKET 0 -#else #define CERF_SOCKET 1 -#endif static struct pcmcia_irqs irqs[] = { - { CERF_SOCKET, IRQ_GPIO_CF_CD, "CF_CD" }, - { CERF_SOCKET, IRQ_GPIO_CF_BVD2, "CF_BVD2" }, - { CERF_SOCKET, IRQ_GPIO_CF_BVD1, "CF_BVD1" } + { CERF_SOCKET, CERF_IRQ_GPIO_CF_CD, "CF_CD" }, + { CERF_SOCKET, CERF_IRQ_GPIO_CF_BVD2, "CF_BVD2" }, + { CERF_SOCKET, CERF_IRQ_GPIO_CF_BVD1, "CF_BVD1" } }; static int cerf_pcmcia_hw_init(struct sa1100_pcmcia_socket *skt) { - skt->irq = IRQ_GPIO_CF_IRQ; + skt->irq = CERF_IRQ_GPIO_CF_IRQ; return sa11xx_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); } @@ -41,18 +39,40 @@ sa11xx_free_irqs(skt, irqs, ARRAY_SIZE(irqs)); } +static void cerf_pcmcia_reset( void) +{ + int i; + + GPDR |= CERF_GPIO_CF_RESET; + + GPCR = CERF_GPIO_CF_RESET; + mdelay(300); + + GPSR = CERF_GPIO_CF_RESET; + udelay(20); + + GPCR = CERF_GPIO_CF_RESET; + mdelay(50); + + for( i=0; i<10; i++) + { + if( GPLR & CERF_GPIO_CF_IRQ) break; + mdelay(100); + } +} + static void cerf_pcmcia_socket_state(struct sa1100_pcmcia_socket *skt, struct pcmcia_state *state) { unsigned long levels = GPLR; - state->detect=((levels & GPIO_CF_CD)==0)?1:0; - state->ready=(levels & GPIO_CF_IRQ)?1:0; - state->bvd1=(levels & GPIO_CF_BVD1)?1:0; - state->bvd2=(levels & GPIO_CF_BVD2)?1:0; - state->wrprot=0; - state->vs_3v=1; - state->vs_Xv=0; + state->detect = (levels & CERF_GPIO_CF_CD) ?0:1; + state->ready = (levels & CERF_GPIO_CF_IRQ) ?1:0; + state->bvd1 = (levels & CERF_GPIO_CF_BVD1)?1:0; + state->bvd2 = (levels & CERF_GPIO_CF_BVD2)?1:0; + state->wrprot = 0; + state->vs_3v = 1; + state->vs_Xv = 0; } static int @@ -61,13 +81,8 @@ { switch (state->Vcc) { case 0: - break; - case 50: case 33: -#ifdef CONFIG_SA1100_CERF_CPLD - GPCR = GPIO_PWR_SHUTDOWN; -#endif break; default: @@ -77,13 +92,7 @@ } if (state->flags & SS_RESET) { -#ifdef CONFIG_SA1100_CERF_CPLD - GPSR = GPIO_CF_RESET; -#endif - } else { -#ifdef CONFIG_SA1100_CERF_CPLD - GPCR = GPIO_CF_RESET; -#endif + cerf_pcmcia_reset(); } return 0; @@ -101,8 +110,8 @@ static struct pcmcia_low_level cerf_pcmcia_ops = { .owner = THIS_MODULE, - .init = cerf_pcmcia_hw_init, - .shutdown = cerf_pcmcia_hw_shutdown, + .hw_init = cerf_pcmcia_hw_init, + .hw_shutdown = cerf_pcmcia_hw_shutdown, .socket_state = cerf_pcmcia_socket_state, .configure_socket = cerf_pcmcia_configure_socket, diff -ruN linux-2.5.67-rmk1/fs/jffs2/file.c linux-2.5.67-rmk1-cerf1/fs/jffs2/file.c --- linux-2.5.67-rmk1/fs/jffs2/file.c 2003-04-07 10:33:01.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/fs/jffs2/file.c 2003-04-14 20:39:48.000000000 -0700 @@ -165,6 +165,10 @@ ri->mtime = cpu_to_je32((ivalid & ATTR_MTIME)?iattr->ia_mtime.tv_sec:inode->i_mtime.tv_sec); ri->ctime = cpu_to_je32((ivalid & ATTR_CTIME)?iattr->ia_ctime.tv_sec:inode->i_ctime.tv_sec); ri->compr = JFFS2_COMPR_NONE; + + ri->offset = cpu_to_je32(0);; + ri->csize = ri->dsize = cpu_to_je32(mdatalen); + if (ivalid & ATTR_SIZE && inode->i_size < iattr->ia_size) { /* It's an extension. Make it a hole node */ ri->compr = JFFS2_COMPR_ZERO; diff -ruN linux-2.5.67-rmk1/include/asm-arm/arch-sa1100/cerf.h linux-2.5.67-rmk1-cerf1/include/asm-arm/arch-sa1100/cerf.h --- linux-2.5.67-rmk1/include/asm-arm/arch-sa1100/cerf.h 2003-04-07 10:33:03.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/include/asm-arm/arch-sa1100/cerf.h 2003-04-14 20:39:48.000000000 -0700 @@ -3,108 +3,18 @@ #include -#ifdef CONFIG_SA1100_CERF_CPLD +#define CERF_ETH_IO 0xf0000000 +#define CERF_ETH_IRQ IRQ_GPIO26 - -// Map sa1100fb.c to sa1100_frontlight.c - Not pretty, but necessary. -#define CERF_BACKLIGHT_ENABLE sa1100_fl_enable -#define CERF_BACKLIGHT_DISABLE sa1100_fl_disable - -// -// IO Pins for devices -// - -#define CERF_PDA_CPLD 0xf1000000 -#define CERF_PDA_CPLD_WRCLRINT (0x0) -#define CERF_PDA_CPLD_BACKLIGHT (0x2) -#define CERF_PDA_CPLD_SOUND_FREQ (0x4) -#define CERF_PDA_CPLD_KEYPAD_A (0x6) -#define CERF_PDA_CPLD_BATTFAULT (0x8) -#define CERF_PDA_CPLD_KEYPAD_B (0xa) -#define CERF_PDA_CPLD_SOUND_ENA (0xc) -#define CERF_PDA_CPLD_SOUND_RESET (0xe) - -#define GPIO_CF_BVD2 GPIO_GPIO (5) -#define GPIO_CF_BVD1 GPIO_GPIO (6) -#define GPIO_CF_RESET GPIO_GPIO (7) -#define GPIO_CF_IRQ GPIO_GPIO (8) -#define GPIO_CF_CD GPIO_GPIO (9) - -#define GPIO_PWR_SHUTDOWN GPIO_GPIO (25) - -#define UCB1200_GPIO_CONT_CS 0x0001 -#define UCB1200_GPIO_CONT_DOWN 0x0002 -#define UCB1200_GPIO_CONT_INC 0x0004 -#define UCB1200_GPIO_CONT_ENA 0x0008 -#define UCB1200_GPIO_LCD_RESET 0x0010 -#define UCB1200_GPIO_IRDA_ENABLE 0x0020 -#define UCB1200_GPIO_BT_ENABLE 0x0040 -#define UCB1200_GPIO_L3_DATA 0x0080 -#define UCB1200_GPIO_L3_CLOCK 0x0100 -#define UCB1200_GPIO_L3_MODE 0x0200 - -// -// IRQ for devices -// - -#define IRQ_UCB1200_CONT_CS IRQ_UCB1200_IO0 -#define IRQ_UCB1200_CONT_DOWN IRQ_UCB1200_IO1 -#define IRQ_UCB1200_CONT_INC IRQ_UCB1200_IO2 -#define IRQ_UCB1200_CONT_ENA IRQ_UCB1200_IO3 -#define IRQ_UCB1200_LCD_RESET IRQ_UCB1200_IO4 -#define IRQ_UCB1200_IRDA_ENABLE IRQ_UCB1200_IO5 -#define IRQ_UCB1200_BT_ENABLE IRQ_UCB1200_IO6 -#define IRQ_UCB1200_L3_DATA IRQ_UCB1200_IO7 -#define IRQ_UCB1200_L3_CLOCK IRQ_UCB1200_IO8 -#define IRQ_UCB1200_L3_MODE IRQ_UCB1200_IO9 - -#define IRQ_GPIO_CF_BVD2 IRQ_GPIO5 -#define IRQ_GPIO_CF_BVD1 IRQ_GPIO6 -#define IRQ_GPIO_CF_IRQ IRQ_GPIO8 -#define IRQ_GPIO_CF_CD IRQ_GPIO9 - -// -// Device parameters -// - -#define CERF_PDA_CPLD_SOUND_FREQ_8000 (0x01) -#define CERF_PDA_CPLD_SOUND_FREQ_11025 (0x05) -#define CERF_PDA_CPLD_SOUND_FREQ_16000 (0x02) -#define CERF_PDA_CPLD_SOUND_FREQ_22050 (0x06) -#define CERF_PDA_CPLD_SOUND_FREQ_32000 (0x03) -#define CERF_PDA_CPLD_SOUND_FREQ_44100 (0x07) -#define CERF_PDA_CPLD_SOUND_FREQ_48000 (0x0b) - -// -// General Functions -// - -#define CERF_PDA_CPLD_Get(x, y) (*((char*)(CERF_PDA_CPLD + (x))) & (y)) -#define CERF_PDA_CPLD_Set(x, y, z) (*((char*)(CERF_PDA_CPLD + (x))) = (*((char*)(CERF_PDA_CPLD + (x))) & ~(z)) | (y)) -#define CERF_PDA_CPLD_UnSet(x, y, z) (*((char*)(CERF_PDA_CPLD + (x))) = (*((char*)(CERF_PDA_CPLD + (x))) & ~(z)) & ~(y)) - - -#else // CONFIG_SA1100_CERF_CPLD - - -#define GPIO_CF_BVD2 GPIO_GPIO (19) -#define GPIO_CF_BVD1 GPIO_GPIO (20) -#define GPIO_CF_RESET 0 -#define GPIO_CF_IRQ GPIO_GPIO (22) -#define GPIO_CF_CD GPIO_GPIO (23) - -#define GPIO_LCD_RESET GPIO_GPIO (15) - -#define IRQ_GPIO_CF_BVD2 IRQ_GPIO19 -#define IRQ_GPIO_CF_BVD1 IRQ_GPIO20 -#define IRQ_GPIO_CF_IRQ IRQ_GPIO22 -#define IRQ_GPIO_CF_CD IRQ_GPIO23 - - -#endif // CONFIG_SA1100_CERF_CPLD - - -#define GPIO_UCB1200_IRQ GPIO_GPIO (18) -#define IRQ_GPIO_UCB1200_IRQ IRQ_GPIO18 +#define CERF_GPIO_CF_BVD2 GPIO_GPIO (19) +#define CERF_GPIO_CF_BVD1 GPIO_GPIO (20) +#define CERF_GPIO_CF_RESET GPIO_GPIO (21) +#define CERF_GPIO_CF_IRQ GPIO_GPIO (22) +#define CERF_GPIO_CF_CD GPIO_GPIO (23) + +#define CERF_IRQ_GPIO_CF_BVD2 IRQ_GPIO19 +#define CERF_IRQ_GPIO_CF_BVD1 IRQ_GPIO20 +#define CERF_IRQ_GPIO_CF_IRQ IRQ_GPIO22 +#define CERF_IRQ_GPIO_CF_CD IRQ_GPIO23 #endif // _INCLUDE_CERF_H_ diff -ruN linux-2.5.67-rmk1/lib/kobject.c linux-2.5.67-rmk1-cerf1/lib/kobject.c --- linux-2.5.67-rmk1/lib/kobject.c 2003-04-07 10:32:48.000000000 -0700 +++ linux-2.5.67-rmk1-cerf1/lib/kobject.c 2003-04-14 20:39:48.000000000 -0700 @@ -149,7 +149,8 @@ if (kobj) { kobject_init(kobj); error = kobject_add(kobj); - WARN_ON(error); + if( error != 0) printk(KERN_WARNING "kobject_register: failed with %d\n", error); +// WARN_ON(error); } else error = -EINVAL; return error;