diff -urN linux-2.4.27-vrs1.orig/arch/arm/config.in linux-2.4.27-vrs1.official/arch/arm/config.in --- linux-2.4.27-vrs1.orig/arch/arm/config.in Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/arch/arm/config.in Thu Mar 17 12:39:44 2005 @@ -143,8 +143,10 @@ mainmenu_option next_comment comment 'AT91RM9200 Implementations' -dep_bool ' Atmel AT91RM9200 Development Board' CONFIG_ARCH_AT91RM9200DK $CONFIG_ARCH_AT91RM9200 +dep_bool ' Atmel AT91RM9200 Development Board (DK)' CONFIG_ARCH_AT91RM9200DK $CONFIG_ARCH_AT91RM9200 dep_bool ' Cogent CSB337' CONFIG_MACH_CSB337 $CONFIG_ARCH_AT91RM9200 +dep_bool ' Atmel AT91RM9200 Evaluation Kit (EK)' CONFIG_ARCH_AT91RM9200EK $CONFIG_ARCH_AT91RM9200 + endmenu mainmenu_option next_comment @@ -691,10 +693,11 @@ "$CONFIG_ARCH_CLPS7500" = "y" -o \ "$CONFIG_ARCH_P720T" = "y" -o \ "$CONFIG_ARCH_ANAKIN" = "y" -o \ - "$CONFIG_ARCH_MX1ADS" = "y" ]; then + "$CONFIG_ARCH_MX1ADS" = "y" -o \ + "$CONFIG_ARCH_AT91RM9200" = "y" ]; then define_bool CONFIG_PC_KEYMAP y fi - if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" -a "$CONFIG_ARCH_RISCSTATION" != "y" ]; then + if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" -a "$CONFIG_ARCH_RISCSTATION" != "y" -a "$CONFIG_ARCH_AT91RM9200" != "y" ]; then bool 'VGA text console' CONFIG_VGA_CONSOLE fi source drivers/video/Config.in diff -urN linux-2.4.27-vrs1.orig/arch/arm/def-configs/at91rm9200ek linux-2.4.27-vrs1.official/arch/arm/def-configs/at91rm9200ek --- linux-2.4.27-vrs1.orig/arch/arm/def-configs/at91rm9200ek Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/arch/arm/def-configs/at91rm9200ek Thu Mar 17 11:42:41 2005 @@ -0,0 +1,990 @@ +# +# Automatically generated by make menuconfig: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +# CONFIG_GENERIC_BUST_SPINLOCK is not set +# CONFIG_GENERIC_ISA_DMA is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# System Type +# +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_OMAHA is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_MX1ADS is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_RISCSTATION is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set +CONFIG_ARCH_AT91RM9200=y + +# +# Archimedes/A5000 Implementations +# +# CONFIG_ARCH_ARC is not set +# CONFIG_ARCH_A5K is not set + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +# CONFIG_ARCH_NETWINDER is not set + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ACCELENT is not set +# CONFIG_SA1100_ASSABET is not set +# CONFIG_ASSABET_NEPONSET is not set +# CONFIG_SA1100_ADSAGC is not set +# CONFIG_SA1100_ADSBITSY is not set +# CONFIG_SA1100_ADSBITSYPLUS is not set +# CONFIG_SA1100_BRUTUS is not set +# CONFIG_SA1100_CEP is not set +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_H3XXX is not set +# CONFIG_H3600_SLEEVE is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FLEXANET is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_FRODO is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_HACKKIT is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_OMNIMETER is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_PT_SYSTEM3 is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SIMPUTER is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_USB_NETLINK is not set +# CONFIG_SA1100_USB_CHAR is not set +# CONFIG_SA1100_SSP is not set + +# +# AT91RM9200 Implementations +# +# CONFIG_ARCH_AT91RM9200DK is not set +# CONFIG_MACH_CSB337 is not set +CONFIG_ARCH_AT91RM9200EK=y + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CLEP7312 is not set +# CONFIG_ARCH_EDB7211 is not set +# CONFIG_ARCH_FORTUNET is not set +# CONFIG_ARCH_GUIDEA07 is not set +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_EP7211 is not set +# CONFIG_ARCH_EP7212 is not set +# CONFIG_ARCH_ACORN is not set +# CONFIG_PLD is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set +# CONFIG_CPU_ARM926T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_ARM1020E is not set +# CONFIG_CPU_ARM1022 is not set +# CONFIG_CPU_ARM1026 is not set +# CONFIG_CPU_SA110 is not set +# CONFIG_CPU_SA1100 is not set +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_ARM_THUMB is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_DISCONTIGMEM is not set + +# +# General setup +# +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +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_ARTHUR is not set +CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20210000,3145728 root=/dev/ram rw" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +# CONFIG_LEDS_CPU is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_AMDSTD is not set +# CONFIG_MTD_SHARP is not set +# CONFIG_MTD_JEDEC is not set + +# +# Mapping drivers for chip access +# +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=10000000 +CONFIG_MTD_PHYSMAP_LEN=200000 +CONFIG_MTD_PHYSMAP_BUSWIDTH=2 +# CONFIG_MTD_NORA is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_CDB89712 is not set +# CONFIG_MTD_SA1100 is not set +# CONFIG_MTD_DC21285 is not set +# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_FORTUNET is not set +# CONFIG_MTD_EPXA is not set +# CONFIG_MTD_AUTCPU12 is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_CEIVA is not set +# CONFIG_MTD_PCI is not set +# CONFIG_MTD_PCMCIA is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +CONFIG_MTD_AT91_DATAFLASH=y +CONFIG_MTD_AT91_DATAFLASH_CARD=y +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_DOC1000 is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOCPROBE is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_AT91_SMARTMEDIA is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_SX8 is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=15360 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_STATS is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +# CONFIG_FILTER is not set +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_ARM_AM79C961A is not set +# CONFIG_ARM_CIRRUS is not set +CONFIG_AT91_ETHER=y +CONFIG_AT91_ETHER_RMII=y +# CONFIG_SUNLANCE is not set +# CONFIG_SUNBMAC is not set +# CONFIG_SUNQE is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SD_EXTRA_DEVS=40 +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_SCSI_DEBUG_QUEUES is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AHA1740 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_MEGARAID2 is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_SATA_SVW is not set +# CONFIG_SCSI_SATA_PROMISE is not set +# CONFIG_SCSI_SATA_SX4 is not set +# CONFIG_SCSI_SATA_SIL is not set +# CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_VIA is not set +# CONFIG_SCSI_SATA_VITESSE is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_DMA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_NCR53C7xx is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +CONFIG_INPUT=y +CONFIG_INPUT_KEYBDEV=y +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_UINPUT is not set +# CONFIG_INPUT_MX1TS is not set + +# +# Character devices +# +CONFIG_VT=y +# CONFIG_VT_CONSOLE is not set +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_AT91_SPIDEV=y + +# +# Serial drivers +# +# CONFIG_SERIAL_ANAKIN is not set +# CONFIG_SERIAL_ANAKIN_CONSOLE is not set +# CONFIG_SERIAL_AMBA is not set +# CONFIG_SERIAL_AMBA_CONSOLE is not set +# CONFIG_SERIAL_CLPS711X is not set +# CONFIG_SERIAL_CLPS711X_CONSOLE is not set +# CONFIG_SERIAL_21285 is not set +# CONFIG_SERIAL_21285_OLD is not set +# CONFIG_SERIAL_21285_CONSOLE is not set +# CONFIG_SERIAL_UART00 is not set +# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_SA1100 is not set +# CONFIG_SERIAL_SA1100_CONSOLE is not set +# CONFIG_SERIAL_OMAHA is not set +# CONFIG_SERIAL_OMAHA_CONSOLE is not set +CONFIG_SERIAL_AT91=y +CONFIG_SERIAL_AT91_CONSOLE=y +# 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 is not set + +# +# I2C support +# +CONFIG_I2C=y +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_ALGOPCF is not set +CONFIG_I2C_AT91=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_PROC=y +# CONFIG_I2C_DS1307 is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set +# CONFIG_L3_ALGOBIT is not set +# CONFIG_L3_BIT_SA1100_GPIO is not set +# CONFIG_L3_SA1111 is not set +# CONFIG_BIT_SA1100_GPIO is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +# CONFIG_977_WATCHDOG is not set +# CONFIG_SA1100_WATCHDOG is not set +# CONFIG_EPXA_WATCHDOG is not set +# CONFIG_OMAHA_WATCHDOG is not set +CONFIG_AT91_WATCHDOG=y +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_SCx200 is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_AT91_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# 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_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_XFS_FS is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_TRACE is not set +# CONFIG_XFS_DEBUG is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Console drivers +# +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_ACORN is not set +# CONFIG_FB_ANAKIN is not set +# CONFIG_FB_CLPS711X is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_DBMX1 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_FBCON_ADVANCED=y +# CONFIG_FBCON_MFB is not set +# CONFIG_FBCON_CFB2 is not set +# CONFIG_FBCON_CFB4 is not set +# CONFIG_FBCON_CFB8 is not set +CONFIG_FBCON_CFB16=y +# CONFIG_FBCON_CFB24 is not set +# CONFIG_FBCON_CFB32 is not set +# CONFIG_FBCON_AFB is not set +# CONFIG_FBCON_ILBM is not set +# CONFIG_FBCON_IPLAN2P2 is not set +# CONFIG_FBCON_IPLAN2P4 is not set +# CONFIG_FBCON_IPLAN2P8 is not set +# CONFIG_FBCON_MAC is not set +# CONFIG_FBCON_VGA_PLANES is not set +# CONFIG_FBCON_VGA is not set +# CONFIG_FBCON_HGA is not set +# CONFIG_FBCON_FONTWIDTH8_ONLY is not set +# CONFIG_FBCON_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set +# CONFIG_MCP_SA1100 is not set +# CONFIG_MCP_UCB1200 is not set +# CONFIG_MCP_UCB1200_AUDIO is not set +# CONFIG_MCP_UCB1200_TS is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_EHCI_HCD is not set +# 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 +# CONFIG_USB_SL811HS_ALT is not set +# CONFIG_USB_SL811HS is not set +CONFIG_USB_OHCI_AT91=y +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_BLUETOOTH is not set +# CONFIG_USB_MIDI is not set +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_HIDINPUT is not set +# CONFIG_USB_HIDDEV is not set +CONFIG_USB_KBD=y +CONFIG_USB_MOUSE=y +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# 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 +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 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 +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_BRLVGER is not set +# CONFIG_USB_LCD is not set + +# +# Support for USB gadgets +# +# CONFIG_USB_GADGET is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_NO_PGT_CACHE is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_DC21285_PORT is not set +# CONFIG_DEBUG_CLPS711X_UART2 is not set + +# +# Library routines +# +CONFIG_CRC32=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -urN linux-2.4.27-vrs1.orig/arch/arm/def-configs/csb337 linux-2.4.27-vrs1.official/arch/arm/def-configs/csb337 --- linux-2.4.27-vrs1.orig/arch/arm/def-configs/csb337 Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/arch/arm/def-configs/csb337 Thu Aug 12 15:41:35 2004 @@ -224,7 +224,7 @@ # CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_START=10000000 -CONFIG_MTD_PHYSMAP_LEN=200000 +CONFIG_MTD_PHYSMAP_LEN=800000 CONFIG_MTD_PHYSMAP_BUSWIDTH=2 # CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set @@ -246,7 +246,7 @@ # # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set -CONFIG_MTD_AT91_DATAFLASH=y +# CONFIG_MTD_AT91_DATAFLASH is not set # CONFIG_MTD_AT91_DATAFLASH_CARD is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set diff -urN linux-2.4.27-vrs1.orig/arch/arm/kernel/armksyms.c linux-2.4.27-vrs1.official/arch/arm/kernel/armksyms.c --- linux-2.4.27-vrs1.orig/arch/arm/kernel/armksyms.c Mon Aug 25 13:44:39 2003 +++ linux-2.4.27-vrs1.official/arch/arm/kernel/armksyms.c Thu Aug 12 15:41:35 2004 @@ -268,3 +268,7 @@ EXPORT_SYMBOL_NOVERS(__up_wakeup); EXPORT_SYMBOL(get_wchan); + +#ifdef CONFIG_ARCH_AT91RM9200 +EXPORT_SYMBOL(AT91_SYS); +#endif diff -urN linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/Makefile linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/Makefile --- linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/Makefile Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/Makefile Wed Oct 6 10:30:00 2004 @@ -11,15 +11,16 @@ # Object file lists. -obj-y := core.o +export-objs := gpio.o + +obj-y := core.o gpio.o obj-m := obj-n := obj- := -export-objs := - # LEDs support leds-$(CONFIG_ARCH_AT91RM9200DK) += dk-leds.o +leds-$(CONFIG_MACH_CSB337) += dk-leds.o obj-$(CONFIG_LEDS) += $(leds-y) include $(TOPDIR)/Rules.make diff -urN linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/core.c linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/core.c --- linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/core.c Mon Aug 25 13:44:39 2003 +++ linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/core.c Tue Aug 17 16:04:18 2004 @@ -35,6 +35,7 @@ #include #include +#include /* * System peripheral registers mapped at virtual address. @@ -108,8 +109,6 @@ #endif } -extern void at91_register_uart(int idx, int port); - void __init at91rm9200_map_io(void) { int serial[AT91C_NR_UART] = AT91C_UART_MAP; diff -urN linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/gpio.c linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/gpio.c --- linux-2.4.27-vrs1.orig/arch/arm/mach-at91rm9200/gpio.c Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/arch/arm/mach-at91rm9200/gpio.c Tue Aug 31 12:54:06 2004 @@ -0,0 +1,183 @@ +/* + * linux/arch/arm/mach-at91rm9200/gpio.c + * + * Copyright (c) 2003 SAN People + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +#include +#include +#include +#include +#include + +struct irq_handler { + short level; /* level-triggered? */ + void (*handler)(int pio, int pin, void *dev_id); + void *dev_id; +}; + +struct gpio_private { + int nr; /* PIO channel ID */ + struct irq_handler handlers[32]; +}; + +static struct gpio_private gpio[4]; + + +/* + * Return a list of pending GPIO interupts for this chennel. + */ +static inline unsigned long at91rm9200_gpio_irq_pending(int pio) +{ + if (pio == AT91C_ID_PIOA) + return (AT91_SYS->PIOA_ISR & AT91_SYS->PIOA_IMR); + else if (pio == AT91C_ID_PIOB) + return (AT91_SYS->PIOB_ISR & AT91_SYS->PIOB_IMR); + else if (pio == AT91C_ID_PIOC) + return (AT91_SYS->PIOC_ISR & AT91_SYS->PIOC_IMR); + else if (pio == AT91C_ID_PIOD) + return (AT91_SYS->PIOD_ISR & AT91_SYS->PIOD_IMR); + + BUG(); + return 0; +} + +/* + * Enable interrupts for a specified GPIO pin. + */ +static inline void GPIO_ENABLE_IRQ(int pio, int pin) +{ + if (pio == AT91C_ID_PIOA) + AT91_SYS->PIOA_IER = (1 << pin); + else if (pio == AT91C_ID_PIOB) + AT91_SYS->PIOB_IER = (1 << pin); + else if (pio == AT91C_ID_PIOC) + AT91_SYS->PIOC_IER = (1 << pin); + else if (pio == AT91C_ID_PIOD) + AT91_SYS->PIOD_IER = (1 << pin); +} + +/* + * Disable interrupts for a specified GPIO pin. + */ +static inline void GPIO_DISABLE_IRQ(int pio, int pin) +{ + if (pio == AT91C_ID_PIOA) + AT91_SYS->PIOA_IDR = (1 << pin); + else if (pio == AT91C_ID_PIOB) + AT91_SYS->PIOB_IDR = (1 << pin); + else if (pio == AT91C_ID_PIOC) + AT91_SYS->PIOC_IDR = (1 << pin); + else if (pio == AT91C_ID_PIOD) + AT91_SYS->PIOD_IDR = (1 << pin); +} + +/* + * Call the registered handlers for GPIO interrupts. + * The interrupts are generated on both the rising and falling edges. If the interrupt + * should be level-triggered, it is excluded on the 2nd read of the status register (since + * that will then just clear the state change (pending interrupt) due to the falling edge). + */ +static void at91rm9200_gpio_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + struct gpio_private *channel = (struct gpio_private *)dev_id; + unsigned long status, disabled_mask; + int i; + + status = at91rm9200_gpio_irq_pending(channel->nr); + do { + disabled_mask = 0; + + for (i = 0; i < 32; i++) { + if ((status & (1 << i)) && (channel->handlers[i].handler != NULL)) { + if (channel->handlers[i].level) + disabled_mask |= (1 << i); + channel->handlers[i].handler(channel->nr, i, channel->handlers[i].dev_id); + } + } + + status = at91rm9200_gpio_irq_pending(channel->nr) & ~disabled_mask; + } while (status != 0); +} + +/* + * Register a handler for specific GPIO interrupt. + * pio: AT91C_ID_PIOA .. AT91C_ID_PIOD + * pin: 0 .. 31 + * level_triggered: 1 for level-triggered interrupt, 0 otherwise. + */ +int at91rm9200_gpio_request_irq(unsigned int pio, unsigned int pin, short level_triggered, + void (*handler)(int pio, int pin, void *dev_id), void *dev_id) +{ + if (handler == NULL) + return -EINVAL; + else if ((pio < AT91C_ID_PIOA) || (pio > AT91C_ID_PIOD)) + return -EINVAL; + else if ((pin < 0) || (pin > 31)) + return -EINVAL; + + if (gpio[pio - AT91C_ID_PIOA].handlers[pin].handler != NULL) + return -EBUSY; + + /* Register the handler */ + gpio[pio - AT91C_ID_PIOA].handlers[pin].dev_id = dev_id; + gpio[pio - AT91C_ID_PIOA].handlers[pin].level = level_triggered; + gpio[pio - AT91C_ID_PIOA].handlers[pin].handler = handler; + + /* Enable interrupt with PIO controller */ + GPIO_ENABLE_IRQ(pio, pin); + + return 0; +} + + +/* + * Deregister a handler for a specific GPIO interrupt. + */ +void at91rm9200_gpio_free_irq(unsigned int pio, unsigned int pin, void *dev_id) +{ + if ((pio < AT91C_ID_PIOA) || (pio > AT91C_ID_PIOD)) + return; + else if ((pin < 0) || (pin > 31)) + return; + + /* Disable interrupt with PIO controller */ + GPIO_DISABLE_IRQ(pio, pin); + + /* Unregister the handler */ + gpio[pio - AT91C_ID_PIOA].handlers[pin].handler = NULL; +} + + +static int __init at91rm9200_gpio_init(void) +{ + int i, res; + + for (i = 0; i < 4; i++) { + memset(&(gpio[i]), 0, sizeof(struct gpio_private)); + gpio[i].nr = AT91C_ID_PIOA + i; + + AT91_SYS->PMC_PCER = 1 << (AT91C_ID_PIOA + i); /* enable peripheral clock */ + + res = request_irq(AT91C_ID_PIOA + i, at91rm9200_gpio_interrupt, 0, "gpio", &(gpio[i])); + if (res) { + printk(KERN_ERR "at91_gpio: Cannot register IRQ %d handler.\n", gpio[i].nr); + return res; + } + + (void) at91rm9200_gpio_irq_pending(AT91C_ID_PIOA + i); /* clear pending interrupts */ + } + + return 0; +} + +EXPORT_SYMBOL(at91rm9200_gpio_request_irq); +EXPORT_SYMBOL(at91rm9200_gpio_free_irq); + +__initcall(at91rm9200_gpio_init); diff -urN linux-2.4.27-vrs1.orig/arch/arm/tools/mach-types linux-2.4.27-vrs1.official/arch/arm/tools/mach-types --- linux-2.4.27-vrs1.orig/arch/arm/tools/mach-types Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/arch/arm/tools/mach-types Thu Mar 17 11:49:45 2005 @@ -525,3 +525,4 @@ omap_osk MACH_OMAP_OSK OMAP_OSK 515 rg100v3 MACH_RG100V3 RG100V3 516 mx2ads MACH_MX2ADS MX2ADS 517 +at91rm9200ek MACH_AT91RM9200EK AT91RM9200EK 705 diff -urN linux-2.4.27-vrs1.orig/drivers/Makefile linux-2.4.27-vrs1.official/drivers/Makefile --- linux-2.4.27-vrs1.orig/drivers/Makefile Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/Makefile Thu Aug 12 15:41:35 2004 @@ -8,7 +8,7 @@ mod-subdirs := dio hil mtd sbus video macintosh usb input telephony ide \ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ - fc4 net/hamradio i2c l3 acpi bluetooth serial usb/gadget + fc4 net/hamradio i2c l3 acpi bluetooth serial usb/gadget at91 subdir-y := parport serial char block net sound misc media cdrom hotplug pld subdir-m := $(subdir-y) diff -urN linux-2.4.27-vrs1.orig/drivers/at91/Makefile linux-2.4.27-vrs1.official/drivers/at91/Makefile --- linux-2.4.27-vrs1.orig/drivers/at91/Makefile Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/Makefile Thu Aug 12 15:41:35 2004 @@ -7,7 +7,7 @@ O_TARGET := at91drv.o -subdir-y := serial net watchdog rtc usb i2c spi mtd +subdir-y := serial net watchdog rtc usb i2c spi mtd pcmcia subdir-m := $(subdir-y) obj-$(CONFIG_SERIAL_AT91) += serial/at91serial.o @@ -19,5 +19,6 @@ obj-$(CONFIG_AT91_SPIDEV) += spi/at91spi.o obj-$(CONFIG_MTD_AT91_DATAFLASH) += spi/at91spi.o mtd/at91mtd.o obj-$(CONFIG_MTD_AT91_SMARTMEDIA) += mtd/at91mtd.o +obj-$(CONFIG_PCMCIA_AT91) += pcmcia/at91pcmcia.o include $(TOPDIR)/Rules.make diff -urN linux-2.4.27-vrs1.orig/drivers/at91/i2c/at91_i2c.c linux-2.4.27-vrs1.official/drivers/at91/i2c/at91_i2c.c --- linux-2.4.27-vrs1.orig/drivers/at91/i2c/at91_i2c.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/i2c/at91_i2c.c Wed Oct 6 10:33:01 2004 @@ -79,12 +79,12 @@ pmsg = msgs; /* look at 1st message, it contains the address/command */ if (num >= 1 && num <= 2) { DBG("xfer: doing %s %d bytes to 0x%02x - %d messages\n", - pmsg->flags & I2C_M_RD ? "read" : "write", + msgs[num-1].flags & I2C_M_RD ? "read" : "write", pmsg->len, pmsg->buf[0], num); /* Set the TWI Master Mode Register */ - twi->TWI_MMR = (pmsg->addr << 16) | (pmsg->len << 8) - | ((pmsg + 1)->flags & I2C_M_RD ? AT91C_TWI_MREAD : 0); + twi->TWI_MMR = (pmsg->addr << 16) /* | (pmsg->len << 8) */ + | (msgs[num-1].flags & I2C_M_RD ? AT91C_TWI_MREAD : 0); /* Set TWI Internal Address Register with first messages data field */ if (pmsg->len == 1) diff -urN linux-2.4.27-vrs1.orig/drivers/at91/mtd/at91_dataflash.c linux-2.4.27-vrs1.official/drivers/at91/mtd/at91_dataflash.c --- linux-2.4.27-vrs1.orig/drivers/at91/mtd/at91_dataflash.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/mtd/at91_dataflash.c Thu Mar 17 11:36:14 2005 @@ -32,9 +32,6 @@ #ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition *mtd_parts = 0; -static int mtd_parts_nr = 0; - #define NB_OF(x) (sizeof(x)/sizeof(x[0])) static struct mtd_partition static_partitions[] = @@ -376,6 +373,10 @@ { struct mtd_info *device; struct dataflash_local *priv; +#ifdef CONFIG_MTD_PARTITIONS + struct mtd_partition *mtd_parts = 0; + int mtd_parts_nr = 0; +#endif #ifdef CONFIG_MTD_CMDLINE_PARTS char mtdID[14]; #endif @@ -535,6 +536,6 @@ module_init(at91_dataflash_init); module_exit(at91_dataflash_exit); -MODULE_LICENSE("GPL") -MODULE_AUTHOR("Andrew Victor") -MODULE_DESCRIPTION("DataFlash driver for Atmel AT91RM9200") +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Andrew Victor"); +MODULE_DESCRIPTION("DataFlash driver for Atmel AT91RM9200"); diff -urN linux-2.4.27-vrs1.orig/drivers/at91/net/at91_ether.c linux-2.4.27-vrs1.official/drivers/at91/net/at91_ether.c --- linux-2.4.27-vrs1.orig/drivers/at91/net/at91_ether.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/net/at91_ether.c Thu Mar 17 11:35:27 2005 @@ -9,6 +9,8 @@ * Intel LXT971A PHY support by Christopher Bahns & David Knickerbocker * (Polaroid Corporation) * + * Realtek RTL8201(B)L PHY support by Roman Avramenko + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -95,19 +97,20 @@ * -2 : AutoNegotiation still in progress */ static int update_linkspeed(struct net_device *dev, AT91PS_EMAC regs) { + struct at91_private *lp = (struct at91_private *) dev->priv; unsigned int bmsr, bmcr, lpa, mac_cfg; unsigned int speed, duplex; /* Link status is latched, so read twice to get current value */ - read_phy(regs, 0, MII_BMSR, &bmsr); - read_phy(regs, 0, MII_BMSR, &bmsr); + read_phy(regs, lp->phy_address, MII_BMSR, &bmsr); + read_phy(regs, lp->phy_address, MII_BMSR, &bmsr); if (!(bmsr & BMSR_LSTATUS)) return -1; /* no link */ - read_phy(regs, 0, MII_BMCR, &bmcr); + read_phy(regs, lp->phy_address, MII_BMCR, &bmcr); if (bmcr & BMCR_ANENABLE) { /* AutoNegotiation is enabled */ if (!(bmsr & BMSR_ANEGCOMPLETE)) return -2; /* auto-negotitation in progress */ - read_phy(regs, 0, MII_LPA, &lpa); + read_phy(regs, lp->phy_address, MII_LPA, &lpa); if ((lpa & LPA_100FULL) || (lpa & LPA_100HALF)) speed = SPEED_100; else speed = SPEED_10; if ((lpa & LPA_100FULL) || (lpa & LPA_10FULL)) duplex = DUPLEX_FULL; @@ -138,7 +141,7 @@ /* * Handle interrupts from the PHY */ -static void at91ether_phy_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static void at91ether_phy_interrupt(int pio, int pin, void *dev_id) { struct net_device *dev = (struct net_device *) dev_id; struct at91_private *lp = (struct at91_private *) dev->priv; @@ -148,12 +151,10 @@ enable_mdi(emac); if (lp->phy_type == MII_DM9161_ID) - read_phy(emac, 0, MII_DSINTR_REG, &phy); /* ack interrupt in Davicom PHY */ + read_phy(emac, lp->phy_address, MII_DSINTR_REG, &phy); /* ack interrupt in Davicom PHY */ else if (lp->phy_type == MII_LXT971A_ID) - read_phy(emac, 0, MII_ISINTS_REG, &phy); /* ack interrupt in Intel PHY */ + read_phy(emac, lp->phy_address, MII_ISINTS_REG, &phy); /* ack interrupt in Intel PHY */ - status = AT91_SYS->PIOC_ISR; /* acknowledge interrupt in PIO */ - status = update_linkspeed(dev, emac); if (status == -1) { /* link is down */ netif_carrier_off(dev); @@ -172,31 +173,29 @@ static void enable_phyirq(struct net_device *dev, AT91PS_EMAC regs) { struct at91_private *lp = (struct at91_private *) dev->priv; - unsigned int dsintr, status; + unsigned int dsintr; - // TODO: Check error code. Really need a generic PIO (interrupt) - // layer since we're really only interested in the PC4 (DK) or PC2 (CSB337) line. - (void) request_irq(AT91C_ID_PIOC, at91ether_phy_interrupt, 0, dev->name, dev); + if (lp->phy_type == MII_RTL8201_ID) /* RTL8201 does not have an interrupt */ + return; - status = AT91_SYS->PIOC_ISR; /* clear any pending PIO interrupts */ #ifdef CONFIG_MACH_CSB337 - AT91_SYS->PIOC_IER = AT91C_PIO_PC2; /* Enable interrupt */ + (void) at91rm9200_gpio_request_irq(AT91C_ID_PIOC, 2, 1, at91ether_phy_interrupt, dev); #else - AT91_SYS->PIOC_IER = AT91C_PIO_PC4; /* Enable interrupt */ + (void) at91rm9200_gpio_request_irq(AT91C_ID_PIOC, 4, 1, at91ether_phy_interrupt, dev); #endif spin_lock_irq(&lp->lock); enable_mdi(regs); if (lp->phy_type == MII_DM9161_ID) { /* for Davicom PHY */ - read_phy(regs, 0, MII_DSINTR_REG, &dsintr); + read_phy(regs, lp->phy_address, MII_DSINTR_REG, &dsintr); dsintr = dsintr & ~0xf00; /* clear bits 8..11 */ - write_phy(regs, 0, MII_DSINTR_REG, dsintr); + write_phy(regs, lp->phy_address, MII_DSINTR_REG, dsintr); } else if (lp->phy_type == MII_LXT971A_ID) { /* for Intel PHY */ - read_phy(regs, 0, MII_ISINTE_REG, &dsintr); + read_phy(regs, lp->phy_address, MII_ISINTE_REG, &dsintr); dsintr = dsintr | 0xf2; /* set bits 1, 4..7 */ - write_phy(regs, 0, MII_ISINTE_REG, dsintr); + write_phy(regs, lp->phy_address, MII_ISINTE_REG, dsintr); } disable_mdi(regs); @@ -211,29 +210,31 @@ struct at91_private *lp = (struct at91_private *) dev->priv; unsigned int dsintr; + if (lp->phy_type == MII_RTL8201_ID) /* RTL8201 does not have an interrupt */ + return; + spin_lock_irq(&lp->lock); enable_mdi(regs); if (lp->phy_type == MII_DM9161_ID) { /* for Davicom PHY */ - read_phy(regs, 0, MII_DSINTR_REG, &dsintr); + read_phy(regs, lp->phy_address, MII_DSINTR_REG, &dsintr); dsintr = dsintr | 0xf00; /* set bits 8..11 */ - write_phy(regs, 0, MII_DSINTR_REG, dsintr); + write_phy(regs, lp->phy_address, MII_DSINTR_REG, dsintr); } else if (lp->phy_type == MII_LXT971A_ID) { /* for Intel PHY */ - read_phy(regs, 0, MII_ISINTE_REG, &dsintr); + read_phy(regs, lp->phy_address, MII_ISINTE_REG, &dsintr); dsintr = dsintr & ~0xf2; /* clear bits 1, 4..7 */ - write_phy(regs, 0, MII_ISINTE_REG, dsintr); + write_phy(regs, lp->phy_address, MII_ISINTE_REG, dsintr); } disable_mdi(regs); spin_unlock_irq(&lp->lock); #ifdef CONFIG_MACH_CSB337 - AT91_SYS->PIOC_IDR = AT91C_PIO_PC2; /* Disable interrupt */ + (void) at91rm9200_gpio_free_irq(AT91C_ID_PIOC, 2, dev); #else - AT91_SYS->PIOC_IDR = AT91C_PIO_PC4; /* Disable interrupt */ + (void) at91rm9200_gpio_free_irq(AT91C_ID_PIOC, 4, dev); #endif - free_irq(AT91C_ID_PIOC, dev); /* Free interrupt handler */ } /* @@ -248,11 +249,11 @@ enable_mdi(regs); /* Perform PHY reset */ - write_phy(regs, 0, MII_BMCR, BMCR_RESET); + write_phy(regs, lp->phy_address, MII_BMCR, BMCR_RESET); /* Wait until PHY reset is complete */ do { - read_phy(regs, 0, MII_BMCR, &bmcr); + read_phy(regs, lp->phy_address, MII_BMCR, &bmcr); } while (!(bmcr && BMCR_RESET)); disable_mdi(regs); @@ -273,12 +274,21 @@ /* Check if bootloader set address in Specific-Address 1 */ hi = regs->EMAC_SA1H; lo = regs->EMAC_SA1L; +#ifdef CONFIG_MACH_CSB337 + addr[5] = (lo & 0xff); /* The CSB337 bootloader stores the MAC the wrong-way around */ + addr[4] = (lo & 0xff00) >> 8; + addr[3] = (lo & 0xff0000) >> 16; + addr[2] = (lo & 0xff000000) >> 24; + addr[1] = (hi & 0xff); + addr[0] = (hi & 0xff00) >> 8; +#else addr[0] = (lo & 0xff); addr[1] = (lo & 0xff00) >> 8; addr[2] = (lo & 0xff0000) >> 16; addr[3] = (lo & 0xff000000) >> 24; addr[4] = (hi & 0xff); addr[5] = (hi & 0xff00) >> 8; +#endif if (is_valid_ether_addr(addr)) { memcpy(dev->dev_addr, &addr, 6); @@ -288,12 +298,21 @@ /* Check if bootloader set address in Specific-Address 2 */ hi = regs->EMAC_SA2H; lo = regs->EMAC_SA2L; +#ifdef CONFIG_MACH_CSB337 + addr[5] = (lo & 0xff); /* The CSB337 bootloader stores the MAC the wrong-way around */ + addr[4] = (lo & 0xff00) >> 8; + addr[3] = (lo & 0xff0000) >> 16; + addr[2] = (lo & 0xff000000) >> 24; + addr[1] = (hi & 0xff); + addr[0] = (hi & 0xff00) >> 8; +#else addr[0] = (lo & 0xff); addr[1] = (lo & 0xff00) >> 8; addr[2] = (lo & 0xff0000) >> 16; addr[3] = (lo & 0xff000000) >> 24; addr[4] = (hi & 0xff); addr[5] = (hi & 0xff00) >> 8; +#endif if (is_valid_ether_addr(addr)) { memcpy(dev->dev_addr, &addr, 6); @@ -310,6 +329,9 @@ regs->EMAC_SA1L = (dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) | (dev->dev_addr[1] << 8) | (dev->dev_addr[0]); regs->EMAC_SA1H = (dev->dev_addr[5] << 8) | (dev->dev_addr[4]); + + regs->EMAC_SA2L = 0; + regs->EMAC_SA2H = 0; } /* @@ -699,13 +721,20 @@ if (intstatus & (AT91C_EMAC_TUND | AT91C_EMAC_RTRY)) lp->stats.tx_errors += 1; - dev_kfree_skb_irq(lp->skb); - pci_unmap_single(NULL, lp->skb_physaddr, lp->skb_length, PCI_DMA_TODEVICE); + if (lp->skb) { + dev_kfree_skb_irq(lp->skb); + pci_unmap_single(NULL, lp->skb_physaddr, lp->skb_length, PCI_DMA_TODEVICE); + lp->skb = NULL; + } netif_wake_queue(dev); } - if (intstatus & AT91C_EMAC_RBNA) - printk("%s: RBNA error\n", dev->name); + /* Work-around for Errata #11 */ + if (intstatus & AT91C_EMAC_RBNA) { + emac->EMAC_CTL &= ~AT91C_EMAC_RE; + emac->EMAC_CTL |= AT91C_EMAC_RE; + } + if (intstatus & AT91C_EMAC_ROVR) printk("%s: ROVR error\n", dev->name); } @@ -713,7 +742,7 @@ /* * Initialize the ethernet interface */ -static int at91ether_setup(struct net_device *dev, unsigned long phy_type) +static int at91ether_setup(struct net_device *dev, unsigned long phy_type, unsigned short phy_address) { struct at91_private *lp; AT91PS_EMAC regs; @@ -771,14 +800,14 @@ #else regs->EMAC_CFG = AT91C_EMAC_BIG; #endif - if (phy_type == MII_LXT971A_ID) + if ((phy_type == MII_LXT971A_ID) || (phy_type == MII_RTL8201_ID)) regs->EMAC_CFG |= AT91C_EMAC_CLK_HCLK_64; /* MDIO clock = system clock/64 */ if (phy_type == MII_DM9161_ID) { spin_lock_irq(&lp->lock); enable_mdi(regs); - read_phy(regs, 0, MII_DSCR_REG, &val); + read_phy(regs, phy_address, MII_DSCR_REG, &val); if ((val & (1 << 10)) == 0) /* DSCR bit 10 is 0 -- fiber mode */ lp->phy_media = PORT_FIBRE; @@ -791,6 +820,7 @@ lp->mii.mdio_write = mdio_write; lp->phy_type = phy_type; /* Type of PHY connected */ + lp->phy_address = phy_address; /* MDI address of PHY */ /* Determine current link speed */ spin_lock_irq(&lp->lock); @@ -810,6 +840,8 @@ printk(KERN_INFO "%s: Davicom 9196 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)"); else if (phy_type == MII_LXT971A_ID) printk(KERN_INFO "%s: Intel LXT971A PHY\n", dev->name); + else if (phy_type == MII_RTL8201_ID) + printk(KERN_INFO "%s: Realtek RTL8201(B)L PHY\n", dev->name); already_initialized = 1; return 0; @@ -823,6 +855,7 @@ AT91PS_EMAC regs = (AT91PS_EMAC) AT91C_VA_BASE_EMAC; unsigned int phyid1, phyid2; int detected = -1; + unsigned short phy_address = 0; /* Configure the hardware - RMII vs MII mode */ #ifdef CONFIG_AT91_ETHER_RMII @@ -834,19 +867,30 @@ AT91_CfgPIO_EMAC_PHY(); /* Configure PHY interrupt */ AT91_SYS->PMC_PCER = 1 << AT91C_ID_EMAC; /* Enable Peripheral clock */ - /* Read the PHY ID registers */ - enable_mdi(regs); - read_phy(regs, 0, MII_PHYSID1, &phyid1); - read_phy(regs, 0, MII_PHYSID2, &phyid2); - disable_mdi(regs); + while (phy_address < 32) { + /* Read the PHY ID registers */ + enable_mdi(regs); + read_phy(regs, phy_address, MII_PHYSID1, &phyid1); + read_phy(regs, phy_address, MII_PHYSID2, &phyid2); + disable_mdi(regs); - /* Davicom 9161: PHY_ID1 = 0x181 PHY_ID2 = B881 */ - if (((phyid1 << 16) | (phyid2 & 0xfff0)) == MII_DM9161_ID) { - detected = at91ether_setup(dev, MII_DM9161_ID); - } - /* Intel LXT971A: PHY_ID1 = 0x13 PHY_ID2 = 78E0 */ - else if (((phyid1 << 16) | (phyid2 & 0xfff0)) == MII_LXT971A_ID) { - detected = at91ether_setup(dev, MII_LXT971A_ID); + /* Davicom 9161: PHY_ID1 = 0x181 PHY_ID2 = B881 */ + if (((phyid1 << 16) | (phyid2 & 0xfff0)) == MII_DM9161_ID) { + detected = at91ether_setup(dev, MII_DM9161_ID, phy_address); + break; + } + /* Intel LXT971A: PHY_ID1 = 0x13 PHY_ID2 = 78E0 */ + else if (((phyid1 << 16) | (phyid2 & 0xfff0)) == MII_LXT971A_ID) { + detected = at91ether_setup(dev, MII_LXT971A_ID, phy_address); + break; + } + /* Realtek RTL8201: PHY_ID1 = 0 PHY_ID2 = 0x8201 */ + else if (((phyid1 << 16) | (phyid2 & 0xfff0)) == MII_RTL8201_ID) { + detected = at91ether_setup(dev, MII_RTL8201_ID, phy_address); + break; + } + + phy_address++; } AT91_SYS->PMC_PCDR = 1 << AT91C_ID_EMAC; /* Disable Peripheral clock */ @@ -859,6 +903,7 @@ if (!at91ether_probe(&at91_dev)) return register_netdev(&at91_dev); + printk(KERN_NOTICE "at91_ether: PHY not detected.\n"); return -1; } diff -urN linux-2.4.27-vrs1.orig/drivers/at91/net/at91_ether.h linux-2.4.27-vrs1.official/drivers/at91/net/at91_ether.h --- linux-2.4.27-vrs1.orig/drivers/at91/net/at91_ether.h Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/net/at91_ether.h Tue Aug 31 12:17:54 2004 @@ -31,6 +31,9 @@ #define MII_ISINTE_REG 18 #define MII_ISINTS_REG 19 +/* Realtek RTL8201 PHY */ +#define MII_RTL8201_ID 0x00008200 + /* ........................................................................ */ #define MAX_RBUFF_SZ 0x600 /* 1518 rounded up */ @@ -64,6 +67,7 @@ unsigned long phy_type; /* type of PHY (PHY_ID) */ spinlock_t lock; /* lock for MDI interface */ short phy_media; /* media interface type */ + unsigned short phy_address; /* 5-bit MDI address of PHY (0..31) */ /* Transmit */ struct sk_buff *skb; /* holds skb until xmit interrupt completes */ diff -urN linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/Makefile linux-2.4.27-vrs1.official/drivers/at91/pcmcia/Makefile --- linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/Makefile Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/drivers/at91/pcmcia/Makefile Thu Aug 12 15:41:35 2004 @@ -0,0 +1,15 @@ +# File: drivers/at91/pcmcia/Makefile +# +# Makefile for the Atmel AT91RM9200 pcmcia (Compact Flash) +# + +O_TARGET := at91pcmcia.o + +obj-y := +obj-m := +obj-n := +obj- := + +obj-$(CONFIG_PCMCIA_AT91) += at91_pcmcia.o at91_lowlevel.o + +include $(TOPDIR)/Rules.make diff -urN linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_lowlevel.c linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_lowlevel.c --- linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_lowlevel.c Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_lowlevel.c Thu Mar 17 12:12:30 2005 @@ -0,0 +1,205 @@ +/* + * linux/drivers/at91/pcmcia/at91_lowlevel.c + * + * We implement a AT91RM9200 PCMCIA driver. This + * basically means we handle everything except controlling the + * power. + * + * (c) Rick Bronson + * + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The initial developer of the original code is John G. Dorsey + * . Portions created by John G. Dorsey are + * Copyright (C) 1999 John G. Dorsey. All Rights Reserved. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU Public License version 2 (the "GPL"), in which + * case the provisions of the GPL are applicable instead of the + * above. If you wish to allow the use of your version of this file + * only under the terms of the GPL and not to allow others to use + * your version of this file under the MPL, indicate your decision + * by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL. If you do not delete + * the provisions above, a recipient may use your version of this + * file under either the MPL or the GPL. + */ + +/* + * Please see linux/Documentation/arm/SA1100/PCMCIA for more information + * on the low-level kernel interface. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "../../pcmcia/cs_internal.h" + +#include +#include +#include +#include + +#include +#include "at91_pcmcia.h" + +static spinlock_t irq_lock; /* spinlock for saving/restoring interrupt levels */ + +struct irqs at91_pcmcia_irqs[] = { + { AT91C_ID_PIOB, AT91C_CF_PB0_CD1 | AT91C_CF_PB1_CD2 | AT91C_CF_PB2_IOIS16 | AT91C_CF_PB3_STSCHG | AT91C_CF_PB4_RDY, "AT91 PCMCIA IRQ" }, +}; + +static int at91_pcmcia_low_level_init(struct pcmcia_init *init) +{ + int ret = 0; + unsigned long access; + + /* do the formalities */ + AT91_SYS->PIOC_PDR = AT91C_PC6_NWAIT | AT91C_PC7_A23 | AT91C_PC9_A25_CFRNW | + AT91C_PC10_NCS4_CFCS | AT91C_PC11_NCS5_CFCE1 | AT91C_PC12_NCS6_CFCE2; + AT91_SYS->PIOC_ASR = AT91C_PC6_NWAIT | AT91C_PC7_A23 | AT91C_PC9_A25_CFRNW | + AT91C_PC10_NCS4_CFCS | AT91C_PC11_NCS5_CFCE1 | AT91C_PC12_NCS6_CFCE2; /* set up for periph A */ + + AT91_SYS->PIOB_PER = AT91C_CF_PB0_CD1 | AT91C_CF_PB1_CD2 | AT91C_CF_PB2_IOIS16 | AT91C_CF_PB3_STSCHG + | AT91C_CF_PB4_RDY | AT91C_CF_PB5_RESET | AT91C_CF_PB6_ENABLE; /* enable the pio */ + AT91_SYS->PIOB_OER = AT91C_CF_PB5_RESET | AT91C_CF_PB6_ENABLE; /* enable it */ + AT91_SYS->PIOB_CODR = AT91C_CF_PB5_RESET | AT91C_CF_PB6_ENABLE; /* clear it */ + + /* Setup Compact Flash, enable the address range of CS4 */ + AT91_SYS->EBI_CSA |= AT91C_EBI_CS4A_SMC_CompactFlash; + +#define SM_RWH (4 << 28) /* hold time, was 2 */ +#define SM_RWS (6 << 24) /* setup time, was 6 */ +#define SM_TDF (1 << 8) /* data float time, */ +#define SM_NWS (32) /* wait states, NOTE: 0=1.5, 1=2.5, etc */ + + /* debug only */ + access = (AT91_SYS->PIOB_PDSR & AT91C_CF_PB2_IOIS16) ? AT91C_SMC2_DBW_8 : AT91C_SMC2_DBW_16 | AT91C_SMC2_BAT; /* access type (8 or 16-bit) */ + AT91_SYS->EBI_SMC2_CSR[4] = SM_RWH | SM_RWS | AT91C_SMC2_ACSS_STANDARD | + AT91C_SMC2_DBW_16 | AT91C_SMC2_BAT | AT91C_SMC2_WSEN | SM_NWS; + + printk("AT91 CF driver v1.0\n"); + + spin_lock_init(&irq_lock); /* for int's */ + ret = request_irq(at91_pcmcia_irqs[0].irq, init->handler, SA_SHIRQ, + at91_pcmcia_irqs[0].str, at91_pcmcia_irqs); + if (ret) + printk ("AT91 PCMCIA: Can't get interrupt %d\n", at91_pcmcia_irqs[0].irq); + + return ret ? -1 : AT91_PCMCIA_MAX_SOCK; /* return the number of sockets */ +} + +static int at91_pcmcia_shutdown(void) +{ + free_irq(at91_pcmcia_irqs[0].irq, at91_pcmcia_irqs); + return 0; +} + +static int at91_pcmcia_get_irq_info(struct pcmcia_irq_info *info) +{ + if (info->sock >= AT91_PCMCIA_MAX_SOCK) + return -1; + info->irq = at91_pcmcia_irqs[0].irq; + return 0; +} + +static int at91_pcmcia_socket_init(int sock) /* enable int's */ +{ + unsigned long temp, flags; + + spin_lock_irqsave(&irq_lock, flags); /* stop int's else we wakeup b4 we sleep */ + AT91_SYS->PIOB_ODR = at91_pcmcia_irqs[0].bits; /* disable output */ + temp = AT91_SYS->PIOB_ISR; /* read to reset int's for this port */ + AT91_SYS->PIOB_IER = at91_pcmcia_irqs[0].bits; /* enable it */ + spin_unlock_irqrestore(&irq_lock, flags); + return 0; +} + +static int at91_pcmcia_socket_suspend(int sock) /* disable int's */ +{ + unsigned long flags; + + spin_lock_irqsave(&irq_lock, flags); /* stop int's else we wakeup b4 we sleep */ + AT91_SYS->PIOB_ODR = at91_pcmcia_irqs[0].bits; /* disable output */ + AT91_SYS->PIOB_IDR = at91_pcmcia_irqs[0].bits; /* disable it */ + spin_unlock_irqrestore(&irq_lock, flags); + return 0; +} + +static int at91_pcmcia_socket_state(struct pcmcia_state_array *state_array) +{ + memset(state_array->state, 0, (state_array->size)*sizeof(struct pcmcia_state)); + + /* + * This is tricky. The READY pin is also the #IRQ pin. We'll treat + * READY as #IRQ and set state_array->state[0].ready to 1 whenever state_array->state[0].detect + * is true. + */ + + /* + * CD1/2 are active low; so are the VSS pins; Ready is active high + */ + if (!(AT91_SYS->PIOB_PDSR & (AT91C_CF_PB0_CD1 | AT91C_CF_PB1_CD2))) { + state_array->state[0].detect = 1; + state_array->state[0].vs_3v = 1; + } + + if (state_array->state[0].detect) { + state_array->state[0].ready = (AT91_SYS->PIOB_PDSR & AT91C_CF_PB4_RDY) ? 1 : 0; + state_array->state[0].bvd1 = (AT91_SYS->PIOB_PDSR & AT91C_CF_PB3_STSCHG) ? 1 : 0; /* used for STSCHG only */ + state_array->state[0].iois16 = (AT91_SYS->PIOB_PDSR & AT91C_CF_PB2_IOIS16) ? 1 : 0; /* access type (8 or 16-bit) */ + } + return 1; +} + +static int at91_pcmcia_configure_socket(const struct pcmcia_configure *conf) +{ + printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__, + conf->sock, conf->vcc, conf->vpp); /* debug only */ + + if (conf->sock >= AT91_PCMCIA_MAX_SOCK) + return -1; + + if (conf->vpp != 33 && conf->vpp != conf->vcc && conf->vpp != 0) { + printk(KERN_ERR "%s(): CF slot cannot support VPP %u\n", __FUNCTION__, conf->vpp); + return -1; + } + + /* debug only, turn off int's */ + if (conf->reset) + AT91_SYS->PIOB_SODR = AT91C_CF_PB5_RESET; /* set it */ + else + AT91_SYS->PIOB_CODR = AT91C_CF_PB5_RESET; /* clear it */ + + return 0; +} + +struct pcmcia_low_level at91_pcmcia_ops = { + init: at91_pcmcia_low_level_init, + shutdown: at91_pcmcia_shutdown, + socket_state: at91_pcmcia_socket_state, + get_irq_info: at91_pcmcia_get_irq_info, + configure_socket: at91_pcmcia_configure_socket, + + socket_init: at91_pcmcia_socket_init, + socket_suspend: at91_pcmcia_socket_suspend, +}; diff -urN linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_pcmcia.c linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_pcmcia.c --- linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_pcmcia.c Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_pcmcia.c Thu Aug 12 15:41:35 2004 @@ -0,0 +1,886 @@ +/*====================================================================== + + Device driver for the PCMCIA control functionality of Atmel + AT91RM9200 microprocessor. + + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The initial developer of the original code is John G. Dorsey + . Portions created by John G. Dorsey are + Copyright (C) 1999 John G. Dorsey. All Rights Reserved. + + This version by Rick Bronson. + + Alternatively, the contents of this file may be used under the + terms of the GNU Public License version 2 (the "GPL"), in which + case the provisions of the GPL are applicable instead of the + above. If you wish to allow the use of your version of this file + only under the terms of the GPL and not to allow others to use + your version of this file under the MPL, indicate your decision + by deleting the provisions above and replace them with the notice + and other provisions required by the GPL. If you do not delete + the provisions above, a recipient may use your version of this + file under either the MPL or the GPL. + +======================================================================*/ +/* + * Please see linux/Documentation/arm/SA1100/PCMCIA for more information + * on the low-level kernel interface. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "../../pcmcia/cs_internal.h" + +#include +#include +#include +#include + +#include +#include "at91_pcmcia.h" + +#ifdef PCMCIA_DEBUG +int pc_debug = PCMCIA_DEBUG; +#endif + +/* This structure maintains housekeeping state for each socket, such + * as the last known values of the card detect pins, or the Card Services + * callback value associated with the socket: + */ +static int at91_pcmcia_socket_count; +static struct at91_pcmcia_socket at91_pcmcia_socket[AT91_PCMCIA_MAX_SOCK]; + +#define PCMCIA_SOCKET(x) (at91_pcmcia_socket + (x)) + +/* Returned by the low-level PCMCIA interface: */ +static struct pcmcia_low_level *low_level_pcmcia; + +static struct timer_list poll_timer; +static struct tq_struct at91_pcmcia_task; + +/* + * at91_pcmcia_state_to_config + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * Convert PCMCIA socket state to our socket configure structure. + */ +static struct pcmcia_configure +at91_pcmcia_state_to_config(unsigned int sock, socket_state_t *state) +{ + struct pcmcia_configure conf; + + conf.sock = sock; + conf.vcc = state->Vcc; + conf.vpp = state->Vpp; + conf.reset = state->flags & SS_RESET ? 1 : 0; + conf.irq = state->io_irq != 0; + + return conf; +} + + +/* at91_pcmcia_init() + * ^^^^^^^^^^^^^^^^^^ + * (Re-)Initialise the socket, turning on status interrupts + * and PCMCIA bus. This must wait for power to stabilise + * so that the card status signals report correctly. + * + * Returns: 0 + */ +static int at91_pcmcia_init(unsigned int sock) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + struct pcmcia_configure conf; + + DEBUG(2, "%s(): initializing socket %u\n", __FUNCTION__, sock); + + skt->cs_state = dead_socket; + + conf = at91_pcmcia_state_to_config(sock, &dead_socket); + + low_level_pcmcia->configure_socket(&conf); + + return low_level_pcmcia->socket_init(sock); +} + + +/* + * at91_pcmcia_suspend() + * ^^^^^^^^^^^^^^^^^^^^^ + * Remove power on the socket, disable IRQs from the card. + * Turn off status interrupts, and disable the PCMCIA bus. + * + * Returns: 0 + */ +static int at91_pcmcia_suspend(unsigned int sock) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + struct pcmcia_configure conf; + int ret; + + DEBUG(2, "%s(): suspending socket %u\n", __FUNCTION__, sock); + + conf = at91_pcmcia_state_to_config(sock, &dead_socket); + + ret = low_level_pcmcia->configure_socket(&conf); + + if (ret == 0) { + skt->cs_state = dead_socket; + ret = low_level_pcmcia->socket_suspend(sock); + } + + return ret; +} + + +/* at91_pcmcia_events() + * ^^^^^^^^^^^^^^^^^^^^ + * Helper routine to generate a Card Services event mask based on + * state information obtained from the kernel low-level PCMCIA layer + * in a recent (and previous) sampling. Updates `prev_state'. + * + * Returns: an event mask for the given socket state. + */ +static inline unsigned int +at91_pcmcia_events(struct pcmcia_state *state, + struct pcmcia_state *prev_state, + unsigned int mask, unsigned int flags) +{ + unsigned int events = 0; + + if (state->detect != prev_state->detect) { + DEBUG(3, "%s(): card detect value %u\n", __FUNCTION__, state->detect); + + events |= SS_DETECT; + } + + if (state->ready != prev_state->ready) { + udelay(100); +// DEBUG(3, "%s(): card ready value %u\n", __FUNCTION__, state->ready); + + events |= flags & SS_IOCARD ? 0 : SS_READY; + } + + if (state->bvd1 != prev_state->bvd1) { + DEBUG(3, "%s(): card SS_STSCHG value %u\n", __FUNCTION__, state->bvd1); + + events |= flags & SS_IOCARD ? SS_STSCHG : 0; + } + + *prev_state = *state; + + events &= mask; + +/* DEBUG(2, "events: %s%s%s%s\n", + events == 0 ? "" : "", + events & SS_DETECT ? "DETECT " : "", + events & SS_READY ? "READY " : "", + events & SS_STSCHG ? "STSCHG " : ""); */ + + return events; +} /* at91_pcmcia_events() */ + + +/* at91_pcmcia_task_handler() + * ^^^^^^^^^^^^^^^^^^^^^^^^^^ + * Processes serviceable socket events using the "eventd" thread context. + * + * Event processing (specifically, the invocation of the Card Services event + * callback) occurs in this thread rather than in the actual interrupt + * handler due to the use of scheduling operations in the PCMCIA core. + */ +static void at91_pcmcia_task_handler(void *data) +{ + struct pcmcia_state state[AT91_PCMCIA_MAX_SOCK]; + struct pcmcia_state_array state_array; + unsigned int all_events; + +// DEBUG(4, "%s(): entering PCMCIA monitoring thread\n", __FUNCTION__); + + state_array.size = at91_pcmcia_socket_count; + state_array.state = state; + + do { + unsigned int events; + int ret, i; + + memset(state, 0, sizeof(state)); + +// DEBUG(4, "%s(): interrogating low-level PCMCIA service\n", __FUNCTION__); + + ret = low_level_pcmcia->socket_state(&state_array); + if (ret < 0) { + printk(KERN_ERR "at91_pcmcia: unable to read socket status\n"); + break; + } + + all_events = 0; + + for (i = 0; i < state_array.size; i++, all_events |= events) { + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(i); + + events = at91_pcmcia_events(&state[i], &skt->k_state, + skt->cs_state.csc_mask, + skt->cs_state.flags); + + if (events && at91_pcmcia_socket[i].handler != NULL) + skt->handler(skt->handler_info, events); + } + } while(all_events); +} /* at91_pcmcia_task_handler() */ + + +static struct tq_struct at91_pcmcia_task = { + routine: at91_pcmcia_task_handler +}; + + +/* at91_pcmcia_poll_event() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Let's poll for events in addition to IRQs since IRQ only is unreliable... + */ +static void at91_pcmcia_poll_event(unsigned long dummy) +{ +// DEBUG(4, "%s(): polling for events\n", __FUNCTION__); + poll_timer.function = at91_pcmcia_poll_event; + poll_timer.expires = jiffies + AT91_PCMCIA_POLL_PERIOD; + add_timer(&poll_timer); + schedule_task(&at91_pcmcia_task); +} + + +/* at91_pcmcia_interrupt() + * ^^^^^^^^^^^^^^^^^^^^^^^ + * Service routine for socket driver interrupts (requested by the + * low-level PCMCIA init() operation via at91_pcmcia_thread()). + * The actual interrupt-servicing work is performed by + * at91_pcmcia_thread(), largely because the Card Services event- + * handling code performs scheduling operations which cannot be + * executed from within an interrupt context. + */ +static void at91_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs) +{ +// AT91PS_PIO p_pio; /* pointer to the port */ +// p_pio = at91_pcmcia_irqs[0].base; /* pointer to the port */ +// if (p_pio->PIO_ISR & p_pio->PIO_IMR & at91_pcmcia_irqs[0].bits) /* debug only */ + { + udelay(100); +// DEBUG(3, "%s(): servicing IRQ %d\n", __FUNCTION__, irq); + schedule_task(&at91_pcmcia_task); + } +} + + +/* at91_pcmcia_register_callback() + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the register_callback() operation for the in-kernel + * PCMCIA service (formerly SS_RegisterCallback in Card Services). If + * the function pointer `handler' is not NULL, remember the callback + * location in the state for `sock', and increment the usage counter + * for the driver module. (The callback is invoked from the interrupt + * service routine, at91_pcmcia_interrupt(), to notify Card Services + * of interesting events.) Otherwise, clear the callback pointer in the + * socket state and decrement the module usage count. + * + * Returns: 0 + */ +static int +at91_pcmcia_register_callback(unsigned int sock, + void (*handler)(void *, unsigned int), + void *info) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + + if (handler == NULL) { + skt->handler = NULL; + MOD_DEC_USE_COUNT; + } else { + MOD_INC_USE_COUNT; + skt->handler_info = info; + skt->handler = handler; + } + + return 0; +} + + +/* at91_pcmcia_inquire_socket() + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the inquire_socket() operation for the in-kernel PCMCIA + * service (formerly SS_InquireSocket in Card Services). Of note is + * the setting of the SS_CAP_PAGE_REGS bit in the `features' field of + * `cap' to "trick" Card Services into tolerating large "I/O memory" + * addresses. Also set is SS_CAP_STATIC_MAP, which disables the memory + * resource database check. (Mapped memory is set up within the socket + * driver itself.) + * + * In conjunction with the STATIC_MAP capability is a new field, + * `io_offset', recommended by David Hinds. Rather than go through + * the SetIOMap interface (which is not quite suited for communicating + * window locations up from the socket driver), we just pass up + * an offset which is applied to client-requested base I/O addresses + * in alloc_io_space(). + * + * SS_CAP_PAGE_REGS: used by setup_cis_mem() in cistpl.c to set the + * force_low argument to validate_mem() in rsrc_mgr.c -- since in + * general, the mapped * addresses of the PCMCIA memory regions + * will not be within 0xffff, setting force_low would be + * undesirable. + * + * SS_CAP_STATIC_MAP: don't bother with the (user-configured) memory + * resource database; we instead pass up physical address ranges + * and allow other parts of Card Services to deal with remapping. + * + * SS_CAP_PCCARD: we can deal with 16-bit PCMCIA & CF cards, but + * not 32-bit CardBus devices. + * + * Return value is irrelevant; the pcmcia subsystem ignores it. + */ +static int +at91_pcmcia_inquire_socket(unsigned int sock, socket_cap_t *cap) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + int ret = -1; + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + if (sock < at91_pcmcia_socket_count) { + cap->features = SS_CAP_PAGE_REGS | SS_CAP_STATIC_MAP | SS_CAP_PCCARD; + cap->irq_mask = 0; + cap->map_size = PAGE_SIZE; + cap->pci_irq = skt->irq; + cap->io_offset = (unsigned long)skt->virt_io; + ret = 0; + } + + return ret; +} + + +/* at91_pcmcia_get_status() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the get_status() operation for the in-kernel PCMCIA + * service (formerly SS_GetStatus in Card Services). Essentially just + * fills in bits in `status' according to internal driver state or + * the value of the voltage detect chipselect register. + * + * As a debugging note, during card startup, the PCMCIA core issues + * three set_socket() commands in a row the first with RESET deasserted, + * the second with RESET asserted, and the last with RESET deasserted + * again. Following the third set_socket(), a get_status() command will + * be issued. The kernel is looking for the SS_READY flag (see + * setup_socket(), reset_socket(), and unreset_socket() in cs.c). + * + * Returns: 0 + */ +static int +at91_pcmcia_get_status(unsigned int sock, unsigned int *status) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + struct pcmcia_state state[AT91_PCMCIA_MAX_SOCK]; + struct pcmcia_state_array state_array; + unsigned int stat; + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + state_array.size = at91_pcmcia_socket_count; + state_array.state = state; + + memset(state, 0, sizeof(state)); + + if ((low_level_pcmcia->socket_state(&state_array)) < 0) { + printk(KERN_ERR "at91_pcmcia: unable to get socket status\n"); + return -1; + } + + skt->k_state = state[sock]; + + stat = state[sock].detect ? SS_DETECT : 0; + stat |= state[sock].ready ? SS_READY : 0; + stat |= state[sock].vs_3v ? SS_3VCARD : 0; + + /* The power status of individual sockets is not available + * explicitly from the hardware, so we just remember the state + * and regurgitate it upon request: + */ + stat |= skt->cs_state.Vcc ? SS_POWERON : 0; + + if (skt->cs_state.flags & SS_IOCARD) + stat |= state[sock].bvd1 ? SS_STSCHG : 0; + + DEBUG(3, "\tstatus: %s%s%s%s%s\n", + stat & SS_DETECT ? "DETECT " : "", + stat & SS_READY ? "READY " : "", + stat & SS_POWERON ? "POWERON " : "", + stat & SS_STSCHG ? "STSCHG " : "", + stat & SS_3VCARD ? "3VCARD " : ""); + + *status = stat; + + return 0; +} /* at91_pcmcia_get_status() */ + + +/* at91_pcmcia_get_socket() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the get_socket() operation for the in-kernel PCMCIA + * service (formerly SS_GetSocket in Card Services). Not a very + * exciting routine. + * + * Returns: 0 + */ +static int +at91_pcmcia_get_socket(unsigned int sock, socket_state_t *state) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + *state = skt->cs_state; + + return 0; +} + +/* at91_pcmcia_set_socket() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the set_socket() operation for the in-kernel PCMCIA + * service (formerly SS_SetSocket in Card Services). We more or + * less punt all of this work and let the kernel handle the details + * of power configuration, reset, &c. We also record the value of + * `state' in order to regurgitate it to the PCMCIA core later. + * + * Returns: 0 + */ +static int +at91_pcmcia_set_socket(unsigned int sock, socket_state_t *state) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + struct pcmcia_configure conf; + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + DEBUG(3, "\tmask: %s%s%s%s%s%s\n\tflags: %s%s%s%s\n", + (state->csc_mask==0)?"":"", + (state->csc_mask&SS_DETECT)?"DETECT ":"", + (state->csc_mask&SS_READY)?"READY ":"", + (state->csc_mask&SS_STSCHG)?"STSCHG ":"", + (state->flags==0)?"":"", + (state->flags&SS_PWR_AUTO)?"PWR_AUTO ":"", + (state->flags&SS_IOCARD)?"IOCARD ":"", + (state->flags&SS_RESET)?"RESET ":"", + (state->flags&SS_SPKR_ENA)?"SPKR_ENA ":"", + (state->flags&SS_OUTPUT_ENA)?"OUTPUT_ENA ":""); + DEBUG(3, "\tVcc %d Vpp %d irq %d\n", + state->Vcc, state->Vpp, state->io_irq); + + conf = at91_pcmcia_state_to_config(sock, state); + + if (low_level_pcmcia->configure_socket(&conf) < 0) { + printk(KERN_ERR "at91_pcmcia: unable to configure socket %d\n", sock); + return -1; + } + + skt->cs_state = *state; + + return 0; +} /* at91_pcmcia_set_socket() */ + + +/* at91_pcmcia_get_io_map() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the get_io_map() operation for the in-kernel PCMCIA + * service (formerly SS_GetIOMap in Card Services). Just returns an + * I/O map descriptor which was assigned earlier by a set_io_map(). + * + * Returns: 0 on success, -1 if the map index was out of range + */ +static int +at91_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *map) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + int ret = -1; + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + if (map->map < MAX_IO_WIN) { + *map = skt->io_map[map->map]; + ret = 0; + } + + return ret; +} + + +/* at91_pcmcia_set_io_map() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the set_io_map() operation for the in-kernel PCMCIA + * service (formerly SS_SetIOMap in Card Services). We configure + * the map speed as requested, but override the address ranges + * supplied by Card Services. + * + * Returns: 0 on success, -1 on error + */ +static int +at91_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map) +{ + unsigned long start; + + start = map->start; + + if (map->stop == 1) { + map->stop = PAGE_SIZE - 1; + } + + map->start = (int) at91_pcmcia_socket[sock].virt_io; + map->stop = map->start + (map->stop - start); + at91_pcmcia_socket[sock].io_map[map->map] = *map; + return 0; +} /* at91_pcmcia_set_io_map() */ + + +/* at91_pcmcia_get_mem_map() + * ^^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the get_mem_map() operation for the in-kernel PCMCIA + * service (formerly SS_GetMemMap in Card Services). Just returns a + * memory map descriptor which was assigned earlier by a + * set_mem_map() request. + * + * Returns: 0 on success, -1 if the map index was out of range + */ +static int +at91_pcmcia_get_mem_map(unsigned int sock, struct pccard_mem_map *map) +{ + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + int ret = -1; + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + if (map->map < MAX_WIN) { + *map = skt->mem_map[map->map]; + ret = 0; + } + + return ret; +} + + +/* at91_pcmcia_set_mem_map() + * ^^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the set_mem_map() operation for the in-kernel PCMCIA + * service (formerly SS_SetMemMap in Card Services). We configure + * the map speed as requested, but override the address ranges + * supplied by Card Services. + * + * Returns: 0 on success, -1 on error + */ +static int +at91_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *map) +{ + unsigned long start; + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + + DEBUG(2, "%s() for sock %u\n", __FUNCTION__, sock); + + DEBUG(3, "\tmap %u speed %u sys_start %08lx sys_stop %08lx card_start %08x\n", + map->map, map->speed, map->sys_start, map->sys_stop, map->card_start); + DEBUG(3, "\tflags: %s%s%s%s%s%s%s%s\n", + (map->flags==0)?"":"", + (map->flags & MAP_ACTIVE)?"ACTIVE ":"", + (map->flags & MAP_16BIT)?"16BIT ":"", + (map->flags & MAP_AUTOSZ)?"AUTOSZ ":"", + (map->flags & MAP_0WS)?"0WS ":"", + (map->flags & MAP_WRPROT)?"WRPROT ":"", + (map->flags & MAP_ATTRIB)?"ATTRIB ":"", + (map->flags & MAP_USE_WAIT)?"USE_WAIT ":""); + + if (map->map >= MAX_WIN){ + printk(KERN_ERR "%s(): map (%d) out of range\n", __FUNCTION__, + map->map); + return -1; + } + + start = (map->flags & MAP_ATTRIB) ? skt->phys_attr : skt->phys_mem; + + if (map->sys_stop == 0) + map->sys_stop = PAGE_SIZE - 1; + + map->sys_stop -= map->sys_start; + map->sys_stop += start; + map->sys_start = start; + + skt->mem_map[map->map] = *map; + + return 0; +} /* at91_pcmcia_set_mem_map() */ + + +#if defined(CONFIG_PROC_FS) + +/* at91_pcmcia_proc_status() + * ^^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the /proc/bus/pccard/??/status file. + * + * Returns: the number of characters added to the buffer + */ +static int +at91_pcmcia_proc_status(char *buf, char **start, off_t pos, + int count, int *eof, void *data) +{ + unsigned int sock = (unsigned int)data; + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(sock); + char *p = buf; + + p += sprintf(p, "k_state : %s%s%s%s%s%s\n", + skt->k_state.detect ? "detect " : "", + skt->k_state.ready ? "ready " : "", + skt->k_state.bvd1 ? "bvd1 " : "", + skt->k_state.iois16 ? "iois16 " : "", + skt->k_state.wrprot ? "wrprot " : "", + skt->k_state.vs_3v ? "vs_3v " : ""); + + p += sprintf(p, "status : %s%s%s%s%s%s%s\n", + skt->k_state.detect ? "SS_DETECT " : "", + skt->k_state.ready ? "SS_READY " : "", + skt->cs_state.Vcc ? "SS_POWERON " : "", + skt->cs_state.flags & SS_IOCARD ? "SS_IOCARD " : "", + (skt->cs_state.flags & SS_IOCARD && + skt->k_state.bvd1) ? "SS_STSCHG " : "", + skt->k_state.iois16 ? "SS_IOIS16 " : "", + skt->k_state.vs_3v ? "SS_3VCARD " : ""); + + p += sprintf(p, "mask : %s%s%s\n", + skt->cs_state.csc_mask & SS_DETECT ? "SS_DETECT " : "", + skt->cs_state.csc_mask & SS_READY ? "SS_READY " : "", + skt->cs_state.csc_mask & SS_STSCHG ? "SS_STSCHG " : ""); + + p += sprintf(p, "cs_flags : %s%s%s%s%s\n", + skt->cs_state.flags & SS_PWR_AUTO ? "SS_PWR_AUTO " : "", + skt->cs_state.flags & SS_IOCARD ? "SS_IOCARD " : "", + skt->cs_state.flags & SS_RESET ? "SS_RESET " : "", + skt->cs_state.flags & SS_SPKR_ENA ? "SS_SPKR_ENA " : "", + skt->cs_state.flags & SS_OUTPUT_ENA ? "SS_OUTPUT_ENA " : ""); + + p += sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc); + p += sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp); + p += sprintf(p, "IRQ : %d\n", skt->cs_state.io_irq); + + return p-buf; +} + +/* at91_pcmcia_proc_setup() + * ^^^^^^^^^^^^^^^^^^^^^^^^ + * Implements the proc_setup() operation for the in-kernel PCMCIA + * service (formerly SS_ProcSetup in Card Services). + * + * Returns: 0 on success, -1 on error + */ +static void +at91_pcmcia_proc_setup(unsigned int sock, struct proc_dir_entry *base) +{ + struct proc_dir_entry *entry; + + DEBUG(4, "%s() for sock %u\n", __FUNCTION__, sock); + + if ((entry = create_proc_entry("status", 0, base)) == NULL){ + printk(KERN_ERR "unable to install \"status\" procfs entry\n"); + return; + } + + entry->read_proc = at91_pcmcia_proc_status; + entry->data = (void *)sock; +} + +#endif /* defined(CONFIG_PROC_FS) */ + + +static struct pccard_operations at91_pcmcia_operations = { + init: at91_pcmcia_init, + suspend: at91_pcmcia_suspend, + register_callback: at91_pcmcia_register_callback, + inquire_socket: at91_pcmcia_inquire_socket, + get_status: at91_pcmcia_get_status, + get_socket: at91_pcmcia_get_socket, + set_socket: at91_pcmcia_set_socket, + get_io_map: at91_pcmcia_get_io_map, + set_io_map: at91_pcmcia_set_io_map, + get_mem_map: at91_pcmcia_get_mem_map, + set_mem_map: at91_pcmcia_set_mem_map, +#ifdef CONFIG_PROC_FS + proc_setup: at91_pcmcia_proc_setup +#endif +}; + + +static int __init at91_pcmcia_machine_init(void) +{ + low_level_pcmcia = &at91_pcmcia_ops; + + return 0; +} + + +/* at91_pcmcia_driver_init() + * ^^^^^^^^^^^^^^^^^^^^^^^^^ + * This routine performs a basic sanity check to ensure that this + * kernel has been built with the appropriate board-specific low-level + * PCMCIA support, performs low-level PCMCIA initialization, registers + * this socket driver with Card Services, and then spawns the daemon + * thread which is the real workhorse of the socket driver. + * + * Returns: 0 on success, -1 on error + */ +static int __init at91_pcmcia_driver_init(void) +{ + servinfo_t info; + struct pcmcia_init pcmcia_init; + struct pcmcia_state state[AT91_PCMCIA_MAX_SOCK]; + struct pcmcia_state_array state_array; + unsigned int i; + int ret; + + CardServices(GetCardServicesInfo, &info); + + if (info.Revision != CS_RELEASE_CODE) { + printk(KERN_ERR "Card Services release codes do not match\n"); + return -EINVAL; + } + + ret = at91_pcmcia_machine_init(); + if (ret) + return ret; + + pcmcia_init.handler = at91_pcmcia_interrupt; + + ret = low_level_pcmcia->init(&pcmcia_init); + if (ret < 0) { + printk(KERN_ERR "Unable to initialize kernel PCMCIA service (%d).\n", ret); + return ret == -1 ? -EIO : ret; + } + + at91_pcmcia_socket_count = ret; + state_array.size = at91_pcmcia_socket_count; + state_array.state = state; + + memset(state, 0, sizeof(state)); + + if (low_level_pcmcia->socket_state(&state_array) < 0) { + low_level_pcmcia->shutdown(); + printk(KERN_ERR "Unable to get PCMCIA status from kernel.\n"); + return -EIO; + } + + printk(KERN_INFO "AT91 PCMCIA (CS release %s) IO at ", CS_RELEASE); + for (i = 0; i < at91_pcmcia_socket_count; i++) { + struct at91_pcmcia_socket *skt = PCMCIA_SOCKET(i); + struct pcmcia_irq_info irq_info; + + if (!request_mem_region(AT91_PCMCIA_BASE(i), AT91_PCMCIA_INC, "PCMCIA")) { + ret = -EBUSY; + goto out_err; + } + + irq_info.sock = i; + irq_info.irq = -1; + ret = low_level_pcmcia->get_irq_info(&irq_info); + if (ret < 0) + printk(KERN_ERR "Unable to get IRQ for socket %u (%d)\n", i, ret); + + skt->irq = irq_info.irq; + skt->k_state = state[i]; + skt->phys_attr = AT91_PCMCIA_AT_BASE(i); + skt->phys_mem = AT91_PCMCIA_CM_BASE(i); + skt->virt_io = ioremap(AT91_PCMCIA_IO_BASE(i), 0x800); + + if (skt->virt_io == NULL) { + ret = -ENOMEM; + goto out_err; + } + printk(KERN_INFO "0x%x ", (unsigned int) skt->virt_io); + + } + printk(KERN_INFO "\n"); + + /* Only advertise as many sockets as we can detect */ + ret = register_ss_entry(at91_pcmcia_socket_count, + &at91_pcmcia_operations); + if (ret < 0) { + printk(KERN_ERR "Unable to register sockets\n"); + goto out_err; + } + + /* + * Start the event poll timer. It will reschedule by itself afterwards. + */ + at91_pcmcia_poll_event(0); + + return 0; + + out_err: + for (i = 0; i < at91_pcmcia_socket_count; i++) { + iounmap(at91_pcmcia_socket[i].virt_io); + release_mem_region(AT91_PCMCIA_BASE(i), AT91_PCMCIA_INC); + } + + low_level_pcmcia->shutdown(); + + return ret; +} /* at91_pcmcia_driver_init() */ + + +/* at91_pcmcia_driver_shutdown() + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + * Invokes the low-level kernel service to free IRQs associated with this + * socket controller and reset GPIO edge detection. + */ +static void __exit at91_pcmcia_driver_shutdown(void) +{ + int i; + + del_timer_sync(&poll_timer); + + unregister_ss_entry(&at91_pcmcia_operations); + + for (i = 0; i < at91_pcmcia_socket_count; i++) { + iounmap(at91_pcmcia_socket[i].virt_io); + release_mem_region(AT91_PCMCIA_BASE(i), AT91_PCMCIA_INC); + } + + low_level_pcmcia->shutdown(); + + flush_scheduled_tasks(); +} + +MODULE_AUTHOR("Rick Bronson"); +MODULE_DESCRIPTION("Linux PCMCIA Card Services: AT91 Socket Controller"); +MODULE_LICENSE("Dual MPL/GPL"); + +module_init(at91_pcmcia_driver_init); +module_exit(at91_pcmcia_driver_shutdown); diff -urN linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_pcmcia.h linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_pcmcia.h --- linux-2.4.27-vrs1.orig/drivers/at91/pcmcia/at91_pcmcia.h Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/drivers/at91/pcmcia/at91_pcmcia.h Thu Aug 12 15:41:35 2004 @@ -0,0 +1,149 @@ +/*====================================================================== + + Device driver for the PCMCIA control functionality of Atmel + AT91RM9200 microprocessor. + + (c) Rick Bronson + + The contents of this file are subject to the Mozilla Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The initial developer of the original code is John G. Dorsey + . Portions created by John G. Dorsey are + Copyright (C) 1999 John G. Dorsey. All Rights Reserved. + + Alternatively, the contents of this file may be used under the + terms of the GNU Public License version 2 (the "GPL"), in which + case the provisions of the GPL are applicable instead of the + above. If you wish to allow the use of your version of this file + only under the terms of the GPL and not to allow others to use + your version of this file under the MPL, indicate your decision + by deleting the provisions above and replace them with the notice + and other provisions required by the GPL. If you do not delete + the provisions above, a recipient may use your version of this + file under either the MPL or the GPL. + +======================================================================*/ +/* + * Please see linux/Documentation/arm/SA1100/PCMCIA for more information + * on the low-level kernel interface. + */ + +#define AT91C_CF_PB0_CD1 AT91C_PIO_PB0 /* Compact Flash port pin aliases */ +#define AT91C_CF_PB1_CD2 AT91C_PIO_PB1 +#define AT91C_CF_PB2_IOIS16 AT91C_PIO_PB2 /* The access type (8 [high] or 16-bit [low]) + is based on the state of the -IOIS16 signal */ +#define AT91C_CF_PB3_STSCHG AT91C_PIO_PB3 +#define AT91C_CF_PB4_RDY AT91C_PIO_PB4 +#define AT91C_CF_PB5_RESET AT91C_PIO_PB5 +#define AT91C_CF_PB6_ENABLE AT91C_PIO_PB6 + +#define AT91_PCMCIA_INC 0x10000000 /* increment value to go to next PCMCIA BASE */ +#define AT91_PCMCIA_BASE(n) (0x50000000 + (AT91_PCMCIA_INC * n)) +#define AT91_PCMCIA_A23 (1 << 23) /* A23 is just A23 */ +#define AT91_PCMCIA_REG (1 << 22) /* REG is A22 */ +#define AT91_PCMCIA_IO_BASE(n) (AT91_PCMCIA_BASE(n) | AT91_PCMCIA_A23) /* io mode */ +#define AT91_PCMCIA_CM_BASE(n) (AT91_PCMCIA_BASE(n) | AT91_PCMCIA_REG) /* common memory mode */ +#define AT91_PCMCIA_AT_BASE(n) AT91_PCMCIA_BASE(n) /* attribute memory mode */ + +#define AT91_PCMCIA_MAX_SOCK 1 +#define AT91_PCMCIA_POLL_PERIOD 55 /* debug only */ +#define MAX_IO_WIN 2 +#define AT91_PCMCIA_IO_ACCESS (165) /* in ns */ +#define AT91_PCMCIA_3V_MEM_ACCESS (150) /* in ns */ +#define AT91_PCMCIA_5V_MEM_ACCESS (300) /* in ns */ + +struct pcmcia_configure { + unsigned sock: 8, + vcc: 8, + vpp: 8, + reset: 1, + irq: 1; +}; + +struct pcmcia_state { + unsigned detect: 1, + ready: 1, + bvd1: 1, /* used for STSCHG only */ + iois16: 1, /* 8/16 select */ + wrprot: 1, + vs_3v: 1, + vs_Xv: 1; +}; + +/* + * This structure encapsulates per-socket state which we might need to + * use when responding to a Card Services query of some kind. + */ +struct at91_pcmcia_socket { + /* + * Core PCMCIA state + */ + socket_state_t cs_state; + pccard_io_map io_map[MAX_IO_WIN]; + pccard_mem_map mem_map[MAX_WIN]; + void (*handler)(void *, unsigned int); + void *handler_info; + + struct pcmcia_state k_state; + ioaddr_t phys_attr, phys_mem; + void *virt_io; + + /* + * Info from low level handler + */ + unsigned int irq; +}; + +struct pcmcia_init { + void (*handler)(int irq, void *dev, struct pt_regs *regs); +}; + +struct pcmcia_state_array { + unsigned int size; + struct pcmcia_state *state; +}; + +struct pcmcia_irq_info { + unsigned int sock; + unsigned int irq; +}; + +struct pcmcia_low_level { + int (*init)(struct pcmcia_init *); + int (*shutdown)(void); + int (*socket_state)(struct pcmcia_state_array *); + int (*get_irq_info)(struct pcmcia_irq_info *); + int (*configure_socket)(const struct pcmcia_configure *); + + /* + * Enable card status IRQs on (re-)initialisation. This can + * be called at initialisation, power management event, or + * pcmcia event. + */ + int (*socket_init)(int sock); + + /* + * Disable card status IRQs and PCMCIA bus on suspend. + */ + int (*socket_suspend)(int sock); +}; + +struct irqs { + int irq; +// AT91PS_PIO base; + int bits; + const char *str; +}; + +extern struct irqs at91_pcmcia_irqs[]; + +extern struct pcmcia_low_level at91_pcmcia_ops; + diff -urN linux-2.4.27-vrs1.orig/drivers/at91/serial/at91_serial.c linux-2.4.27-vrs1.official/drivers/at91/serial/at91_serial.c --- linux-2.4.27-vrs1.orig/drivers/at91/serial/at91_serial.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/serial/at91_serial.c Tue Aug 17 19:25:40 2004 @@ -200,8 +200,7 @@ */ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs) { - struct uart_info *info = port->info; - struct tty_struct *tty = info->tty; + struct tty_struct *tty = port->info->tty; unsigned int status, ch, flg, ignored = 0; status = UART_GET_CSR(port); diff -urN linux-2.4.27-vrs1.orig/drivers/at91/spi/at91_spi.c linux-2.4.27-vrs1.official/drivers/at91/spi/at91_spi.c --- linux-2.4.27-vrs1.orig/drivers/at91/spi/at91_spi.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/spi/at91_spi.c Thu Mar 17 11:36:50 2005 @@ -270,6 +270,6 @@ module_init(at91_spi_init); module_exit(at91_spi_exit); -MODULE_LICENSE("GPL") -MODULE_AUTHOR("Andrew Victor") -MODULE_DESCRIPTION("SPI driver for Atmel AT91RM9200") +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Andrew Victor"); +MODULE_DESCRIPTION("SPI driver for Atmel AT91RM9200"); diff -urN linux-2.4.27-vrs1.orig/drivers/at91/spi/at91_spidev.c linux-2.4.27-vrs1.official/drivers/at91/spi/at91_spidev.c --- linux-2.4.27-vrs1.orig/drivers/at91/spi/at91_spidev.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/spi/at91_spidev.c Thu Mar 17 11:36:56 2005 @@ -53,6 +53,12 @@ return res; } + /* + * Warning: This is a work-around for a data-caching issue - + * map_user_kiobuf() does not seem to invalidate the cache. + */ + flush_cache_all(); + res = map_user_kiobuf(READ, iobuf, (unsigned long) buf, count); if (res) { free_kiovec(1, &iobuf); @@ -221,6 +227,6 @@ module_init(at91_spidev_init); module_exit(at91_spidev_exit); -MODULE_LICENSE("GPL") -MODULE_AUTHOR("Andrew Victor") -MODULE_DESCRIPTION("SPI /dev interface for Atmel AT91RM9200") +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Andrew Victor"); +MODULE_DESCRIPTION("SPI /dev interface for Atmel AT91RM9200"); diff -urN linux-2.4.27-vrs1.orig/drivers/at91/watchdog/at91_wdt.c linux-2.4.27-vrs1.official/drivers/at91/watchdog/at91_wdt.c --- linux-2.4.27-vrs1.orig/drivers/at91/watchdog/at91_wdt.c Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/at91/watchdog/at91_wdt.c Thu Mar 17 11:37:07 2005 @@ -188,6 +188,6 @@ module_init(at91_wdt_init); module_exit(at91_wdt_exit); -MODULE_LICENSE("GPL") -MODULE_AUTHOR("Andrew Victor") -MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200") +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Andrew Victor"); +MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200"); diff -urN linux-2.4.27-vrs1.orig/drivers/char/Makefile linux-2.4.27-vrs1.official/drivers/char/Makefile --- linux-2.4.27-vrs1.orig/drivers/char/Makefile Wed Oct 6 10:40:01 2004 +++ linux-2.4.27-vrs1.official/drivers/char/Makefile Thu Mar 17 11:57:25 2005 @@ -140,6 +140,9 @@ ifeq ($(CONFIG_ARCH_GUIDEA07),y) KEYMAP := defkeymap.o endif + ifeq ($(CONFIG_ARCH_AT91RM9200),y) + KEYBD += at91rm92XX_keyb.o + endif endif ifeq ($(ARCH),sh) diff -urN linux-2.4.27-vrs1.orig/drivers/char/at91rm92XX_keyb.c linux-2.4.27-vrs1.official/drivers/char/at91rm92XX_keyb.c --- linux-2.4.27-vrs1.orig/drivers/char/at91rm92XX_keyb.c Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/drivers/char/at91rm92XX_keyb.c Thu Mar 17 12:35:36 2005 @@ -0,0 +1,98 @@ +/* + * linux/drivers/char/at91rm92XX_usbkeyb.c + * + * Copyright (c) 2004 ATMEL + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * based on linux/drivers/char/arm-usb-keyb.c from Marco Cavallini - www.KoanSoftware.com + * 29 November 2002 - Marco Cavallini - www.KoanSoftware.com + * + */ + +#include +#include +#include +#include +#include + +#include + +int at91rm92XX_kbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode) +{ + static int prev_scancode; + + if (scancode == 0xe0 || scancode == 0xe1) { + prev_scancode = scancode; + return 0; + } + + if (scancode == 0x00 || scancode == 0xff) { + prev_scancode = 0; + return 0; + } + + scancode &= 0x7f; + + if (prev_scancode) { + if (prev_scancode != 0xe0) { + if (prev_scancode == 0xe1 && scancode == 0x1d) { + prev_scancode = 0x100; + return 0; + } else if (prev_scancode == 0x100 && scancode == 0x45) { + prev_scancode = 0; + } else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown e1 escape sequence\n"); +#endif + prev_scancode = 0; + return 0; + } + } else { + prev_scancode = 0; + if (scancode == 0x2a || scancode == 0x36) + return 0; + else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n", scancode); +#endif + return 0; + } + } + } else + *keycode = scancode; + + return 1; +} + +void at91rm92XX_leds(unsigned char leds) {} + +char at91rm92XX_unexpected_up(unsigned char keycode) +{ + return 0; +} + +int at91rm92XX_getkeycode(unsigned int scancode) +{ + return 0; +} + +int at91rm92XX_setkeycode(unsigned int scancode, unsigned int keycode) +{ + return 0; +} + +void at91rm92XX_kbd_init_hw(void) +{ + printk(KERN_INFO "AT91: Starting Keyboard driver.\n"); + + k_setkeycode = at91rm92XX_setkeycode; + k_getkeycode = at91rm92XX_getkeycode; + k_translate = at91rm92XX_kbd_translate; + k_unexpected_up = at91rm92XX_unexpected_up; + k_leds = at91rm92XX_leds; +} diff -urN linux-2.4.27-vrs1.orig/drivers/pcmcia/Config.in linux-2.4.27-vrs1.official/drivers/pcmcia/Config.in --- linux-2.4.27-vrs1.orig/drivers/pcmcia/Config.in Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/drivers/pcmcia/Config.in Thu Aug 12 15:41:35 2004 @@ -45,6 +45,7 @@ if [ "$CONFIG_ARM" = "y" ]; then dep_tristate ' CLPS6700 support' CONFIG_PCMCIA_CLPS6700 $CONFIG_ARCH_CLPS711X $CONFIG_PCMCIA dep_tristate ' SA1100 support' CONFIG_PCMCIA_SA1100 $CONFIG_ARCH_SA1100 $CONFIG_PCMCIA + dep_tristate ' AT91RM9200 support' CONFIG_PCMCIA_AT91 $CONFIG_ARCH_AT91RM9200 $CONFIG_PCMCIA fi endmenu diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_EMAC.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / EMAC definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_MCI.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_MCI.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_MCI.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_MCI.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / MCI definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SPI.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SPI.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SPI.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SPI.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / SPI definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SSC.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SSC.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SSC.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SSC.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / SSC definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SYS.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SYS.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_SYS.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_SYS.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_TC.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_TC.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_TC.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_TC.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 definitions @@ -79,8 +98,8 @@ #define AT91C_TC_ENETRG ( 0x1 << 12) // (TC) External Event Trigger enable #define AT91C_TC_WAVESEL ( 0x3 << 13) // (TC) Waveform Selection #define AT91C_TC_WAVESEL_UP ( 0x0 << 13) // (TC) UP mode without atomatic trigger on RC Compare -#define AT91C_TC_WAVESEL_UP_AUTO ( 0x1 << 13) // (TC) UP mode with automatic trigger on RC Compare -#define AT91C_TC_WAVESEL_UPDOWN ( 0x2 << 13) // (TC) UPDOWN mode without automatic trigger on RC Compare +#define AT91C_TC_WAVESEL_UP_AUTO ( 0x2 << 13) // (TC) UP mode with automatic trigger on RC Compare +#define AT91C_TC_WAVESEL_UPDOWN ( 0x1 << 13) // (TC) UPDOWN mode without automatic trigger on RC Compare #define AT91C_TC_WAVESEL_UPDOWN_AUTO ( 0x3 << 13) // (TC) UPDOWN mode with automatic trigger on RC Compare #define AT91C_TC_CPCTRG ( 0x1 << 14) // (TC) RC Compare Trigger Enable #define AT91C_TC_WAVE ( 0x1 << 15) // (TC) diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_TWI.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_TWI.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_TWI.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_TWI.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / TWI definitions @@ -64,7 +83,7 @@ #define AT91C_TWI_IADRSZ_2_BYTE ( 0x2 << 8) // (TWI) Two-byte internal device address #define AT91C_TWI_IADRSZ_3_BYTE ( 0x3 << 8) // (TWI) Three-byte internal device address #define AT91C_TWI_MREAD ( 0x1 << 12) // (TWI) Master Read Direction -#define AT91C_TWI_DADR ( 0x7F << 6) // (TWI) Device Address +#define AT91C_TWI_DADR ( 0x7F << 16) // (TWI) Device Address // -------- TWI_SMR : (TWI Offset: 0x8) TWI Slave Mode Register -------- #define AT91C_TWI_SADR ( 0x7F << 16) // (TWI) Slave Device Address // -------- TWI_CWGR : (TWI Offset: 0x10) TWI Clock Waveform Generator Register -------- diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_UDP.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_UDP.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_UDP.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_UDP.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / UDP Device definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_UHP.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_UHP.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_UHP.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_UHP.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / USB Host definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_USART.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_USART.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/AT91RM9200_USART.h Mon Aug 25 13:44:43 2003 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/AT91RM9200_USART.h Thu Mar 17 12:11:08 2005 @@ -1,11 +1,30 @@ // ---------------------------------------------------------------------------- // ATMEL Microcontroller Software Support - ROUSSET - // ---------------------------------------------------------------------------- -// The software is delivered "AS IS" without warranty or condition of any -// kind, either express, implied or statutory. This includes without -// limitation any warranty or condition with respect to merchantability or -// fitness for any particular purpose, or against the infringements of -// intellectual property rights of others. +// Copyright (c) 2004, Atmel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the disclaimer below. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the disclaimer below in the documentation and/or +// other materials provided with the distribution. +// +// Atmel's name may not be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- // File Name : AT91RM9200.h // Object : AT91RM9200 / USART definitions diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/at91rm9200ek.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/at91rm9200ek.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/at91rm9200ek.h Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/at91rm9200ek.h Thu Mar 17 11:54:01 2005 @@ -0,0 +1,81 @@ +/* + * linux/include/asm-arm/arch-at91rm9200/at91rm9200dk.h + * + * Copyright (c) 2003 SAN People + * Copyright (c) 2003 ATMEL + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +#ifndef __ASM_ARCH_HARDWARE_AT91RM9200EK_H +#define __ASM_ARCH_HARDWARE_AT91RM9200EK_H + + +/* AT91RM92000 clocks */ +#define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 39) */ +#define AT91C_MASTER_CLOCK 59904000 /* peripheral clock (AT91C_MAIN_CLOCK / 3) */ +#define AT91C_SLOW_CLOCK 32768 /* slow clock */ +#define AT91_PLLB_INIT 0x1048be0e /* (18.432 / 14 * 73) /2 = 47.9714 */ + +/* FLASH */ +#define AT91_FLASH_BASE 0x10000000 // NCS0: Flash physical base address + +/* SDRAM */ +#define AT91_SDRAM_BASE 0x20000000 // NCS1: SDRAM physical base address + +/* SmartMedia */ +#define AT91_SMARTMEDIA_BASE 0x40000000 // NCS3: Smartmedia physical base address + +/* Multi-Master Memory controller */ +#define AT91_UHP_BASE 0x00300000 // USB Host controller + + +/* Peripheral interrupt configuration */ +#define AT91_SMR_FIQ (AT91C_AIC_PRIOR_HIGHEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (FIQ) +#define AT91_SMR_SYS (AT91C_AIC_PRIOR_HIGHEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // System Peripheral +#define AT91_SMR_PIOA (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Parallel IO Controller A +#define AT91_SMR_PIOB (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Parallel IO Controller B +#define AT91_SMR_PIOC (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Parallel IO Controller C +#define AT91_SMR_PIOD (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Parallel IO Controller D +#define AT91_SMR_US0 (AT91C_AIC_PRIOR_6 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USART 0 +#define AT91_SMR_US1 (AT91C_AIC_PRIOR_6 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USART 1 +#define AT91_SMR_US2 (AT91C_AIC_PRIOR_6 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USART 2 +#define AT91_SMR_US3 (AT91C_AIC_PRIOR_6 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USART 3 +#define AT91_SMR_MCI (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Multimedia Card Interface +#define AT91_SMR_UDP (AT91C_AIC_PRIOR_4 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USB Device Port +#define AT91_SMR_TWI (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Two-Wire Interface +#define AT91_SMR_SPI (AT91C_AIC_PRIOR_6 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Serial Peripheral Interface +#define AT91_SMR_SSC0 (AT91C_AIC_PRIOR_5 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Serial Synchronous Controller 0 +#define AT91_SMR_SSC1 (AT91C_AIC_PRIOR_5 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Serial Synchronous Controller 1 +#define AT91_SMR_SSC2 (AT91C_AIC_PRIOR_5 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Serial Synchronous Controller 2 +#define AT91_SMR_TC0 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 0 +#define AT91_SMR_TC1 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 1 +#define AT91_SMR_TC2 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 2 +#define AT91_SMR_TC3 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 3 +#define AT91_SMR_TC4 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 4 +#define AT91_SMR_TC5 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Timer Counter 5 +#define AT91_SMR_UHP (AT91C_AIC_PRIOR_3 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // USB Host port +#define AT91_SMR_EMAC (AT91C_AIC_PRIOR_3 | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Ethernet MAC +#define AT91_SMR_IRQ0 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ0) +#define AT91_SMR_IRQ1 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ1) +#define AT91_SMR_IRQ2 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ2) +#define AT91_SMR_IRQ3 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ3) +#define AT91_SMR_IRQ4 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ4) +#define AT91_SMR_IRQ5 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ5) +#define AT91_SMR_IRQ6 (AT91C_AIC_PRIOR_LOWEST | AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE) // Advanced Interrupt Controller (IRQ6) + +#define AT91C_CONSOLE_DEFAULT_BAUDRATE 115200 /* default serial console baud-rate */ + +/* + * Serial port configuration. + * 0 .. 3 = USART0 .. USART3 + * 4 = DBGU + */ +#define AT91C_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ +#define AT91C_CONSOLE 0 /* ttyS0 */ + +#endif diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/hardware.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/hardware.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/hardware.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/hardware.h Thu Mar 17 12:28:04 2005 @@ -87,4 +87,8 @@ #include #endif +#ifdef CONFIG_ARCH_AT91RM9200EK +#include +#endif + #endif diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/ide.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/ide.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/ide.h Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/ide.h Thu Aug 12 16:00:02 2004 @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-at91rm9200/ide.h + * + * Copyright (c) 2004 SAN People + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +#include + +/* + * Set up a hw structure for a specified data port, control port and IRQ. + * This should follow whatever the default interface uses. + */ +static __inline__ void +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) +{ + ide_ioreg_t reg = (ide_ioreg_t) data_port; + int i; + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; + if (irq) + *irq = 0; +} + +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ +static __inline__ void ide_init_default_hwifs(void) +{ + /* There are no standard ports */ +} diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/keyboard.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/keyboard.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/keyboard.h Thu Jan 1 02:00:00 1970 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/keyboard.h Thu Mar 17 12:28:45 2005 @@ -0,0 +1,37 @@ +/* + * linux/include/asm-arm/arch-at91rm9200/keyboard.h + * + * Copyright (C) 2003 ATMEL Rousset + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _ASM_ARCH_KEYBOARD_H +#define _ASM_ARCH_KEYBOARD_H + +#include +#include + +#define kbd_disable_irq() do { } while(0) +#define kbd_enable_irq() do { } while(0) + +extern void at91rm92XX_kbd_init_hw(void); + +static inline void kbd_init_hw(void) +{ + at91rm92XX_kbd_init_hw(); +} + +#endif diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/pio.h linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/pio.h --- linux-2.4.27-vrs1.orig/include/asm-arm/arch-at91rm9200/pio.h Wed Oct 6 10:40:02 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/arch-at91rm9200/pio.h Thu Mar 17 12:28:21 2005 @@ -15,6 +15,18 @@ #include +/* + * Register a handler for specific GPIO interrupt. + */ +int at91rm9200_gpio_request_irq(unsigned int pio, unsigned int pin, short level_triggered, + void (*handler)(int pio, int pin, void *dev_id), void *dev_id); + +/* + * Deregister a handler for a specific GPIO interrupt. + */ +void at91rm9200_gpio_free_irq(unsigned int pio, unsigned int pin, void *dev_id); + + static inline void AT91_CfgPIO_USART0(void) { AT91_SYS->PIOA_PDR = AT91C_PA17_TXD0 | AT91C_PA18_RXD0 | AT91C_PA20_CTS0; @@ -54,8 +66,6 @@ AT91_SYS->PIOA_PDR = AT91C_PA16_EMDIO | AT91C_PA15_EMDC | AT91C_PA14_ERXER | AT91C_PA13_ERX1 | AT91C_PA12_ERX0 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA10_ETX1 | AT91C_PA9_ETX0 | AT91C_PA8_ETXEN | AT91C_PA7_ETXCK_EREFCK; - AT91_SYS->PIOB_PDR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK; - AT91_SYS->PIOB_BSR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK; } /* @@ -65,10 +75,10 @@ AT91_SYS->PIOA_PDR = AT91C_PA16_EMDIO | AT91C_PA15_EMDC | AT91C_PA14_ERXER | AT91C_PA13_ERX1 | AT91C_PA12_ERX0 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA10_ETX1 | AT91C_PA9_ETX0 | AT91C_PA8_ETXEN | AT91C_PA7_ETXCK_EREFCK; - AT91_SYS->PIOB_PDR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV + AT91_SYS->PIOB_PDR = AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV | AT91C_PB16_ERX3 | AT91C_PB15_ERX2 | AT91C_PB14_ETXER | AT91C_PB13_ETX3 | AT91C_PB12_ETX2; - AT91_SYS->PIOB_BSR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV + AT91_SYS->PIOB_BSR = AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV | AT91C_PB16_ERX3 | AT91C_PB15_ERX2 | AT91C_PB14_ETXER | AT91C_PB13_ETX3 | AT91C_PB12_ETX2; } @@ -91,6 +101,7 @@ static inline void AT91_CfgPIO_TWI(void) { AT91_SYS->PIOA_PDR = AT91C_PA25_TWD | AT91C_PA26_TWCK; AT91_SYS->PIOA_ASR = AT91C_PA25_TWD | AT91C_PA26_TWCK; + AT91_SYS->PIOA_MDER = AT91C_PA25_TWD | AT91C_PA26_TWCK; /* open drain */ } /* diff -urN linux-2.4.27-vrs1.orig/include/asm-arm/mach/serial_at91rm9200.h linux-2.4.27-vrs1.official/include/asm-arm/mach/serial_at91rm9200.h --- linux-2.4.27-vrs1.orig/include/asm-arm/mach/serial_at91rm9200.h Wed Oct 6 10:40:03 2004 +++ linux-2.4.27-vrs1.official/include/asm-arm/mach/serial_at91rm9200.h Thu Mar 17 12:28:27 2005 @@ -26,11 +26,11 @@ }; #if defined(CONFIG_SERIAL_AT91) -void at91rm9200_register_uart_fns(struct at91rm9200_port_fns *fns); -void at91rm9200_register_uart(int idx, int port); +void at91_register_uart_fns(struct at91rm9200_port_fns *fns); +void at91_register_uart(int idx, int port); #else -#define at91rm9200_register_uart_fns(fns) do { } while (0) -#define at91rm9200_register_uart(idx,port) do { } while (0) +#define at91_register_uart_fns(fns) do { } while (0) +#define at91_register_uart(idx,port) do { } while (0) #endif