···1#2# Automatically generated make config: don't edit3-# Linux kernel version: 2.6.184-# Tue Oct 3 13:30:51 20065#6CONFIG_SUPERH=y7CONFIG_SUPERH64=y···10CONFIG_GENERIC_FIND_NEXT_BIT=y11CONFIG_GENERIC_HWEIGHT=y12CONFIG_GENERIC_CALIBRATE_DELAY=y0013CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"1415#···35# CONFIG_UTS_NS is not set36# CONFIG_AUDIT is not set37# CONFIG_IKCONFIG is not set0038# CONFIG_RELAY is not set39-CONFIG_INITRAMFS_SOURCE=""40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set41CONFIG_SYSCTL=y42# CONFIG_EMBEDDED is not set43CONFIG_UID16=y44-# CONFIG_SYSCTL_SYSCALL is not set45CONFIG_KALLSYMS=y46# CONFIG_KALLSYMS_ALL is not set47# CONFIG_KALLSYMS_EXTRA_PASS is not set···53CONFIG_ELF_CORE=y54CONFIG_BASE_FULL=y55CONFIG_FUTEX=y056CONFIG_EPOLL=y00057CONFIG_SHMEM=y58-CONFIG_SLAB=y59CONFIG_VM_EVENT_COUNTERS=y00060CONFIG_RT_MUTEXES=y61# CONFIG_TINY_SHMEM is not set62CONFIG_BASE_SMALL=063-# CONFIG_SLOB is not set6465#66# Loadable module support···144#145CONFIG_HEARTBEAT=y146CONFIG_HDSP253_LED=y147-CONFIG_SH_DMA=y148CONFIG_PREEMPT=y149CONFIG_SELECT_MEMORY_MODEL=y150CONFIG_FLATMEM_MANUAL=y···155# CONFIG_SPARSEMEM_STATIC is not set156CONFIG_SPLIT_PTLOCK_CPUS=4157# CONFIG_RESOURCES_64BIT is not set0158159#160# Bus options (PCI, PCMCIA, EISA, MCA, ISA)161#162CONFIG_PCI=y163CONFIG_SH_PCIDMA_NONCOHERENT=y164-# CONFIG_PCI_MULTITHREAD_PROBE is not set165# CONFIG_PCI_DEBUG is not set166167#168# PCCARD (PCMCIA/CardBus) support169#170# CONFIG_PCCARD is not set171-172-#173-# PCI Hotplug Support174-#175# CONFIG_HOTPLUG_PCI is not set176177#···186#187# Networking options188#189-# CONFIG_NETDEBUG is not set190CONFIG_PACKET=y191# CONFIG_PACKET_MMAP is not set192CONFIG_UNIX=y193CONFIG_XFRM=y194# CONFIG_XFRM_USER is not set195# CONFIG_XFRM_SUB_POLICY is not set0196# CONFIG_NET_KEY is not set197CONFIG_INET=y198# CONFIG_IP_MULTICAST is not set···213# CONFIG_INET_TUNNEL is not set214CONFIG_INET_XFRM_MODE_TRANSPORT=y215CONFIG_INET_XFRM_MODE_TUNNEL=y0216CONFIG_INET_DIAG=y217CONFIG_INET_TCP_DIAG=y218# CONFIG_TCP_CONG_ADVANCED is not set219CONFIG_TCP_CONG_CUBIC=y220CONFIG_DEFAULT_TCP_CONG="cubic"0221# CONFIG_IPV6 is not set222# CONFIG_INET6_XFRM_TUNNEL is not set223# CONFIG_INET6_TUNNEL is not set···264# CONFIG_HAMRADIO is not set265# CONFIG_IRDA is not set266# CONFIG_BT is not set00000000267# CONFIG_IEEE80211 is not set0268269#270# Device Drivers···286CONFIG_PREVENT_FIRMWARE_BUILD=y287# CONFIG_FW_LOADER is not set288# CONFIG_DEBUG_DRIVER is not set0289# CONFIG_SYS_HYPERVISOR is not set290291#292# Connector - unified userspace <-> kernelspace linker293#294# CONFIG_CONNECTOR is not set295-296-#297-# Memory Technology Devices (MTD)298-#299# CONFIG_MTD is not set300301#···303#304# Plug and Play support305#0306307#308# Block devices···321CONFIG_BLK_DEV_RAM_COUNT=16322CONFIG_BLK_DEV_RAM_SIZE=4096323CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024324-# CONFIG_BLK_DEV_INITRD is not set325# CONFIG_CDROM_PKTCDVD is not set326# CONFIG_ATA_OVER_ETH is not set00000000327328#329# ATA/ATAPI/MFM/RLL support···342#343# CONFIG_RAID_ATTRS is not set344CONFIG_SCSI=y0345# CONFIG_SCSI_NETLINK is not set346CONFIG_SCSI_PROC_FS=y347···362CONFIG_SCSI_MULTI_LUN=y363# CONFIG_SCSI_CONSTANTS is not set364# CONFIG_SCSI_LOGGING is not set0365366#367# SCSI Transports···402CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16403CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64404CONFIG_SCSI_SYM53C8XX_MMIO=y405-# CONFIG_SCSI_IPR is not set406# CONFIG_SCSI_QLOGIC_1280 is not set407# CONFIG_SCSI_QLA_FC is not set0408# CONFIG_SCSI_LPFC is not set409# CONFIG_SCSI_DC395x is not set410# CONFIG_SCSI_DC390T is not set411# CONFIG_SCSI_NSP32 is not set412# CONFIG_SCSI_DEBUG is not set413-414-#415-# Serial ATA (prod) and Parallel ATA (experimental) drivers416-#417# CONFIG_ATA is not set418419#···430#431# IEEE 1394 (FireWire) support432#0433# CONFIG_IEEE1394 is not set434435#···451# ARCnet devices452#453# CONFIG_ARCNET is not set454-455-#456-# PHY device support457-#458# CONFIG_PHYLIB is not set459460#···498# CONFIG_SUNDANCE is not set499# CONFIG_TLAN is not set500# CONFIG_VIA_RHINE is not set501-502-#503-# Ethernet (1000 Mbit)504-#505# CONFIG_ACENIC is not set506# CONFIG_DL2K is not set507# CONFIG_E1000 is not set···515# CONFIG_TIGON3 is not set516# CONFIG_BNX2 is not set517# CONFIG_QLA3XXX is not set518-519-#520-# Ethernet (10000 Mbit)521-#522# CONFIG_CHELSIO_T1 is not set0523# CONFIG_IXGB is not set524# CONFIG_S2IO is not set525# CONFIG_MYRI10GE is not set000526527#528# Token Ring devices···532# CONFIG_TR is not set533534#535-# Wireless LAN (non-hamradio)536#537-# CONFIG_NET_RADIO is not set538-539-#540-# Wan interfaces541-#542# CONFIG_WAN is not set543# CONFIG_FDDI is not set544# CONFIG_HIPPI is not set···587# CONFIG_KEYBOARD_STOWAWAY is not set588CONFIG_INPUT_MOUSE=y589CONFIG_MOUSE_PS2=y000000590# CONFIG_MOUSE_SERIAL is not set0591# CONFIG_MOUSE_VSXXXAA is not set592# CONFIG_INPUT_JOYSTICK is not set0593# CONFIG_INPUT_TOUCHSCREEN is not set594# CONFIG_INPUT_MISC is not set595···643# IPMI644#645# CONFIG_IPMI_HANDLER is not set646-647-#648-# Watchdog Cards649-#650CONFIG_WATCHDOG=y651# CONFIG_WATCHDOG_NOWAYOUT is not set652···659# CONFIG_WDTPCI is not set660CONFIG_HW_RANDOM=y661# CONFIG_GEN_RTC is not set662-# CONFIG_DTLK is not set663# CONFIG_R3964 is not set664# CONFIG_APPLICOM is not set665-666-#667-# Ftape, the floppy tape device driver668-#669# CONFIG_DRM is not set670# CONFIG_RAW_DRIVER is not set671···668# TPM devices669#670# CONFIG_TCG_TPM is not set671-# CONFIG_TELCLOCK is not set672-673-#674-# I2C support675-#676# CONFIG_I2C is not set677678#···680#681# Dallas's 1-wire bus682#683-684-#685-# Hardware Monitoring support686-#687CONFIG_HWMON=y688# CONFIG_HWMON_VID is not set689# CONFIG_SENSORS_ABITUGURU is not set690# CONFIG_SENSORS_F71805F is not set000691# CONFIG_SENSORS_VT1211 is not set0692# CONFIG_HWMON_DEBUG_CHIP is not set693694#695-# Misc devices696#0697698#699# Multimedia devices700#701# CONFIG_VIDEO_DEV is not set702-CONFIG_VIDEO_V4L2=y703-704-#705-# Digital Video Broadcasting Devices706-#707-# CONFIG_DVB is not set708709#710# Graphics support711#712-CONFIG_FIRMWARE_EDID=y000000713CONFIG_FB=y00714CONFIG_FB_CFB_FILLRECT=y715CONFIG_FB_CFB_COPYAREA=y716CONFIG_FB_CFB_IMAGEBLIT=y000000717# CONFIG_FB_MACMODES is not set718# CONFIG_FB_BACKLIGHT is not set719CONFIG_FB_MODE_HELPERS=y720# CONFIG_FB_TILEBLITTING is not set0000721# CONFIG_FB_CIRRUS is not set722# CONFIG_FB_PM2 is not set723# CONFIG_FB_CYBER2000 is not set···747# CONFIG_FB_RADEON is not set748# CONFIG_FB_ATY128 is not set749# CONFIG_FB_ATY is not set0750# CONFIG_FB_SAVAGE is not set751# CONFIG_FB_SIS is not set752# CONFIG_FB_NEOMAGIC is not set753CONFIG_FB_KYRO=y754# CONFIG_FB_3DFX is not set755# CONFIG_FB_VOODOO1 is not set0756# CONFIG_FB_TRIDENT is not set00757# CONFIG_FB_VIRTUAL is not set758759#···777# CONFIG_FONT_SUN8x16 is not set778# CONFIG_FONT_SUN12x22 is not set779# CONFIG_FONT_10x18 is not set780-781-#782-# Logo configuration783-#784CONFIG_LOGO=y785# CONFIG_LOGO_LINUX_MONO is not set786# CONFIG_LOGO_LINUX_VGA16 is not set···784# CONFIG_LOGO_SUPERH_MONO is not set785# CONFIG_LOGO_SUPERH_VGA16 is not set786CONFIG_LOGO_SUPERH_CLUT224=y787-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set788789#790# Sound791#792# CONFIG_SOUND is not set000000793794#795# USB support···812# USB Gadget Support813#814# CONFIG_USB_GADGET is not set815-816-#817-# MMC/SD Card support818-#819# CONFIG_MMC is not set820821#···864CONFIG_EXT3_FS_XATTR=y865# CONFIG_EXT3_FS_POSIX_ACL is not set866# CONFIG_EXT3_FS_SECURITY is not set0867CONFIG_JBD=y868# CONFIG_JBD_DEBUG is not set869CONFIG_FS_MBCACHE=y···872# CONFIG_JFS_FS is not set873# CONFIG_FS_POSIX_ACL is not set874# CONFIG_XFS_FS is not set0875# CONFIG_OCFS2_FS is not set876CONFIG_MINIX_FS=y877CONFIG_ROMFS_FS=y···942CONFIG_LOCKD_V4=y943CONFIG_NFS_COMMON=y944CONFIG_SUNRPC=y0945# CONFIG_RPCSEC_GSS_KRB5 is not set946# CONFIG_RPCSEC_GSS_SPKM3 is not set947# CONFIG_SMB_FS is not set···972# CONFIG_SUN_PARTITION is not set973# CONFIG_KARMA_PARTITION is not set974# CONFIG_EFI_PARTITION is not set0975976#977# Native Language Support978#979# CONFIG_NLS is not set00000980981#982# Profiling support···996CONFIG_ENABLE_MUST_CHECK=y997CONFIG_MAGIC_SYSRQ=y998# CONFIG_UNUSED_SYMBOLS is not set00999CONFIG_DEBUG_KERNEL=y1000-CONFIG_LOG_BUF_SHIFT=141001CONFIG_DETECT_SOFTLOCKUP=y1002CONFIG_SCHEDSTATS=y01003# CONFIG_DEBUG_SLAB is not set1004# CONFIG_DEBUG_RT_MUTEXES is not set1005# CONFIG_RT_MUTEX_TESTER is not set1006# CONFIG_DEBUG_SPINLOCK is not set1007# CONFIG_DEBUG_MUTEXES is not set1008-# CONFIG_DEBUG_RWSEMS is not set1009# CONFIG_DEBUG_SPINLOCK_SLEEP is not set1010# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set1011# CONFIG_DEBUG_KOBJECT is not set1012CONFIG_DEBUG_BUGVERBOSE=y1013# CONFIG_DEBUG_INFO is not set1014-CONFIG_DEBUG_FS=y1015# CONFIG_DEBUG_VM is not set1016# CONFIG_DEBUG_LIST is not set1017CONFIG_FRAME_POINTER=y1018-# CONFIG_UNWIND_INFO is not set1019CONFIG_FORCED_INLINING=y1020# CONFIG_RCU_TORTURE_TEST is not set01021# CONFIG_EARLY_PRINTK is not set1022# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set1023CONFIG_SH64_PROC_TLB=y···1042#1043# Library routines1044#01045# CONFIG_CRC_CCITT is not set1046# CONFIG_CRC16 is not set01047CONFIG_CRC32=y1048# CONFIG_LIBCRC32C is not set1049CONFIG_PLIST=y0001050CONFIG_GENERIC_HARDIRQS=y1051CONFIG_GENERIC_IRQ_PROBE=y
···1#2# Automatically generated make config: don't edit3+# Linux kernel version: 2.6.22-rc14+# Mon May 14 08:43:31 20075#6CONFIG_SUPERH=y7CONFIG_SUPERH64=y···10CONFIG_GENERIC_FIND_NEXT_BIT=y11CONFIG_GENERIC_HWEIGHT=y12CONFIG_GENERIC_CALIBRATE_DELAY=y13+# CONFIG_ARCH_HAS_ILOG2_U32 is not set14+# CONFIG_ARCH_HAS_ILOG2_U64 is not set15CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"1617#···33# CONFIG_UTS_NS is not set34# CONFIG_AUDIT is not set35# CONFIG_IKCONFIG is not set36+CONFIG_LOG_BUF_SHIFT=1437+CONFIG_SYSFS_DEPRECATED=y38# CONFIG_RELAY is not set39+# CONFIG_BLK_DEV_INITRD is not set40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set41CONFIG_SYSCTL=y42# CONFIG_EMBEDDED is not set43CONFIG_UID16=y44+CONFIG_SYSCTL_SYSCALL=y45CONFIG_KALLSYMS=y46# CONFIG_KALLSYMS_ALL is not set47# CONFIG_KALLSYMS_EXTRA_PASS is not set···49CONFIG_ELF_CORE=y50CONFIG_BASE_FULL=y51CONFIG_FUTEX=y52+CONFIG_ANON_INODES=y53CONFIG_EPOLL=y54+CONFIG_SIGNALFD=y55+CONFIG_TIMERFD=y56+CONFIG_EVENTFD=y57CONFIG_SHMEM=y058CONFIG_VM_EVENT_COUNTERS=y59+CONFIG_SLAB=y60+# CONFIG_SLUB is not set61+# CONFIG_SLOB is not set62CONFIG_RT_MUTEXES=y63# CONFIG_TINY_SHMEM is not set64CONFIG_BASE_SMALL=006566#67# Loadable module support···135#136CONFIG_HEARTBEAT=y137CONFIG_HDSP253_LED=y138+# CONFIG_SH_DMA is not set139CONFIG_PREEMPT=y140CONFIG_SELECT_MEMORY_MODEL=y141CONFIG_FLATMEM_MANUAL=y···146# CONFIG_SPARSEMEM_STATIC is not set147CONFIG_SPLIT_PTLOCK_CPUS=4148# CONFIG_RESOURCES_64BIT is not set149+CONFIG_ZONE_DMA_FLAG=0150151#152# Bus options (PCI, PCMCIA, EISA, MCA, ISA)153#154CONFIG_PCI=y155CONFIG_SH_PCIDMA_NONCOHERENT=y156+# CONFIG_ARCH_SUPPORTS_MSI is not set157# CONFIG_PCI_DEBUG is not set158159#160# PCCARD (PCMCIA/CardBus) support161#162# CONFIG_PCCARD is not set0000163# CONFIG_HOTPLUG_PCI is not set164165#···180#181# Networking options182#0183CONFIG_PACKET=y184# CONFIG_PACKET_MMAP is not set185CONFIG_UNIX=y186CONFIG_XFRM=y187# CONFIG_XFRM_USER is not set188# CONFIG_XFRM_SUB_POLICY is not set189+# CONFIG_XFRM_MIGRATE is not set190# CONFIG_NET_KEY is not set191CONFIG_INET=y192# CONFIG_IP_MULTICAST is not set···207# CONFIG_INET_TUNNEL is not set208CONFIG_INET_XFRM_MODE_TRANSPORT=y209CONFIG_INET_XFRM_MODE_TUNNEL=y210+CONFIG_INET_XFRM_MODE_BEET=y211CONFIG_INET_DIAG=y212CONFIG_INET_TCP_DIAG=y213# CONFIG_TCP_CONG_ADVANCED is not set214CONFIG_TCP_CONG_CUBIC=y215CONFIG_DEFAULT_TCP_CONG="cubic"216+# CONFIG_TCP_MD5SIG is not set217# CONFIG_IPV6 is not set218# CONFIG_INET6_XFRM_TUNNEL is not set219# CONFIG_INET6_TUNNEL is not set···256# CONFIG_HAMRADIO is not set257# CONFIG_IRDA is not set258# CONFIG_BT is not set259+# CONFIG_AF_RXRPC is not set260+261+#262+# Wireless263+#264+# CONFIG_CFG80211 is not set265+# CONFIG_WIRELESS_EXT is not set266+# CONFIG_MAC80211 is not set267# CONFIG_IEEE80211 is not set268+# CONFIG_RFKILL is not set269270#271# Device Drivers···269CONFIG_PREVENT_FIRMWARE_BUILD=y270# CONFIG_FW_LOADER is not set271# CONFIG_DEBUG_DRIVER is not set272+# CONFIG_DEBUG_DEVRES is not set273# CONFIG_SYS_HYPERVISOR is not set274275#276# Connector - unified userspace <-> kernelspace linker277#278# CONFIG_CONNECTOR is not set0000279# CONFIG_MTD is not set280281#···289#290# Plug and Play support291#292+# CONFIG_PNPACPI is not set293294#295# Block devices···306CONFIG_BLK_DEV_RAM_COUNT=16307CONFIG_BLK_DEV_RAM_SIZE=4096308CONFIG_BLK_DEV_RAM_BLOCKSIZE=10240309# CONFIG_CDROM_PKTCDVD is not set310# CONFIG_ATA_OVER_ETH is not set311+312+#313+# Misc devices314+#315+# CONFIG_PHANTOM is not set316+# CONFIG_SGI_IOC4 is not set317+# CONFIG_TIFM_CORE is not set318+# CONFIG_BLINK is not set319320#321# ATA/ATAPI/MFM/RLL support···320#321# CONFIG_RAID_ATTRS is not set322CONFIG_SCSI=y323+# CONFIG_SCSI_TGT is not set324# CONFIG_SCSI_NETLINK is not set325CONFIG_SCSI_PROC_FS=y326···339CONFIG_SCSI_MULTI_LUN=y340# CONFIG_SCSI_CONSTANTS is not set341# CONFIG_SCSI_LOGGING is not set342+# CONFIG_SCSI_SCAN_ASYNC is not set343344#345# SCSI Transports···378CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16379CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64380CONFIG_SCSI_SYM53C8XX_MMIO=y0381# CONFIG_SCSI_QLOGIC_1280 is not set382# CONFIG_SCSI_QLA_FC is not set383+# CONFIG_SCSI_QLA_ISCSI is not set384# CONFIG_SCSI_LPFC is not set385# CONFIG_SCSI_DC395x is not set386# CONFIG_SCSI_DC390T is not set387# CONFIG_SCSI_NSP32 is not set388# CONFIG_SCSI_DEBUG is not set389+# CONFIG_SCSI_ESP_CORE is not set390+# CONFIG_SCSI_SRP is not set00391# CONFIG_ATA is not set392393#···408#409# IEEE 1394 (FireWire) support410#411+# CONFIG_FIREWIRE is not set412# CONFIG_IEEE1394 is not set413414#···428# ARCnet devices429#430# CONFIG_ARCNET is not set0000431# CONFIG_PHYLIB is not set432433#···479# CONFIG_SUNDANCE is not set480# CONFIG_TLAN is not set481# CONFIG_VIA_RHINE is not set482+# CONFIG_SC92031 is not set483+CONFIG_NETDEV_1000=y00484# CONFIG_ACENIC is not set485# CONFIG_DL2K is not set486# CONFIG_E1000 is not set···498# CONFIG_TIGON3 is not set499# CONFIG_BNX2 is not set500# CONFIG_QLA3XXX is not set501+# CONFIG_ATL1 is not set502+CONFIG_NETDEV_10000=y00503# CONFIG_CHELSIO_T1 is not set504+# CONFIG_CHELSIO_T3 is not set505# CONFIG_IXGB is not set506# CONFIG_S2IO is not set507# CONFIG_MYRI10GE is not set508+# CONFIG_NETXEN_NIC is not set509+# CONFIG_MLX4_CORE is not set510+CONFIG_MLX4_DEBUG=y511512#513# Token Ring devices···513# CONFIG_TR is not set514515#516+# Wireless LAN517#518+# CONFIG_WLAN_PRE80211 is not set519+# CONFIG_WLAN_80211 is not set000520# CONFIG_WAN is not set521# CONFIG_FDDI is not set522# CONFIG_HIPPI is not set···571# CONFIG_KEYBOARD_STOWAWAY is not set572CONFIG_INPUT_MOUSE=y573CONFIG_MOUSE_PS2=y574+CONFIG_MOUSE_PS2_ALPS=y575+CONFIG_MOUSE_PS2_LOGIPS2PP=y576+CONFIG_MOUSE_PS2_SYNAPTICS=y577+CONFIG_MOUSE_PS2_LIFEBOOK=y578+CONFIG_MOUSE_PS2_TRACKPOINT=y579+# CONFIG_MOUSE_PS2_TOUCHKIT is not set580# CONFIG_MOUSE_SERIAL is not set581+# CONFIG_MOUSE_APPLETOUCH is not set582# CONFIG_MOUSE_VSXXXAA is not set583# CONFIG_INPUT_JOYSTICK is not set584+# CONFIG_INPUT_TABLET is not set585# CONFIG_INPUT_TOUCHSCREEN is not set586# CONFIG_INPUT_MISC is not set587···619# IPMI620#621# CONFIG_IPMI_HANDLER is not set0000622CONFIG_WATCHDOG=y623# CONFIG_WATCHDOG_NOWAYOUT is not set624···639# CONFIG_WDTPCI is not set640CONFIG_HW_RANDOM=y641# CONFIG_GEN_RTC is not set0642# CONFIG_R3964 is not set643# CONFIG_APPLICOM is not set0000644# CONFIG_DRM is not set645# CONFIG_RAW_DRIVER is not set646···653# TPM devices654#655# CONFIG_TCG_TPM is not set656+CONFIG_DEVPORT=y0000657# CONFIG_I2C is not set658659#···669#670# Dallas's 1-wire bus671#672+# CONFIG_W1 is not set000673CONFIG_HWMON=y674# CONFIG_HWMON_VID is not set675# CONFIG_SENSORS_ABITUGURU is not set676# CONFIG_SENSORS_F71805F is not set677+# CONFIG_SENSORS_PC87427 is not set678+# CONFIG_SENSORS_SMSC47M1 is not set679+# CONFIG_SENSORS_SMSC47B397 is not set680# CONFIG_SENSORS_VT1211 is not set681+# CONFIG_SENSORS_W83627HF is not set682# CONFIG_HWMON_DEBUG_CHIP is not set683684#685+# Multifunction device drivers686#687+# CONFIG_MFD_SM501 is not set688689#690# Multimedia devices691#692# CONFIG_VIDEO_DEV is not set693+# CONFIG_DVB_CORE is not set694+CONFIG_DAB=y0000695696#697# Graphics support698#699+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set700+701+#702+# Display device support703+#704+# CONFIG_DISPLAY_SUPPORT is not set705+# CONFIG_VGASTATE is not set706CONFIG_FB=y707+CONFIG_FIRMWARE_EDID=y708+# CONFIG_FB_DDC is not set709CONFIG_FB_CFB_FILLRECT=y710CONFIG_FB_CFB_COPYAREA=y711CONFIG_FB_CFB_IMAGEBLIT=y712+# CONFIG_FB_SYS_FILLRECT is not set713+# CONFIG_FB_SYS_COPYAREA is not set714+# CONFIG_FB_SYS_IMAGEBLIT is not set715+# CONFIG_FB_SYS_FOPS is not set716+CONFIG_FB_DEFERRED_IO=y717+# CONFIG_FB_SVGALIB is not set718# CONFIG_FB_MACMODES is not set719# CONFIG_FB_BACKLIGHT is not set720CONFIG_FB_MODE_HELPERS=y721# CONFIG_FB_TILEBLITTING is not set722+723+#724+# Frame buffer hardware drivers725+#726# CONFIG_FB_CIRRUS is not set727# CONFIG_FB_PM2 is not set728# CONFIG_FB_CYBER2000 is not set···720# CONFIG_FB_RADEON is not set721# CONFIG_FB_ATY128 is not set722# CONFIG_FB_ATY is not set723+# CONFIG_FB_S3 is not set724# CONFIG_FB_SAVAGE is not set725# CONFIG_FB_SIS is not set726# CONFIG_FB_NEOMAGIC is not set727CONFIG_FB_KYRO=y728# CONFIG_FB_3DFX is not set729# CONFIG_FB_VOODOO1 is not set730+# CONFIG_FB_VT8623 is not set731# CONFIG_FB_TRIDENT is not set732+# CONFIG_FB_ARK is not set733+# CONFIG_FB_PM3 is not set734# CONFIG_FB_VIRTUAL is not set735736#···746# CONFIG_FONT_SUN8x16 is not set747# CONFIG_FONT_SUN12x22 is not set748# CONFIG_FONT_10x18 is not set0000749CONFIG_LOGO=y750# CONFIG_LOGO_LINUX_MONO is not set751# CONFIG_LOGO_LINUX_VGA16 is not set···757# CONFIG_LOGO_SUPERH_MONO is not set758# CONFIG_LOGO_SUPERH_VGA16 is not set759CONFIG_LOGO_SUPERH_CLUT224=y0760761#762# Sound763#764# CONFIG_SOUND is not set765+766+#767+# HID Devices768+#769+CONFIG_HID=y770+# CONFIG_HID_DEBUG is not set771772#773# USB support···780# USB Gadget Support781#782# CONFIG_USB_GADGET is not set0000783# CONFIG_MMC is not set784785#···836CONFIG_EXT3_FS_XATTR=y837# CONFIG_EXT3_FS_POSIX_ACL is not set838# CONFIG_EXT3_FS_SECURITY is not set839+# CONFIG_EXT4DEV_FS is not set840CONFIG_JBD=y841# CONFIG_JBD_DEBUG is not set842CONFIG_FS_MBCACHE=y···843# CONFIG_JFS_FS is not set844# CONFIG_FS_POSIX_ACL is not set845# CONFIG_XFS_FS is not set846+# CONFIG_GFS2_FS is not set847# CONFIG_OCFS2_FS is not set848CONFIG_MINIX_FS=y849CONFIG_ROMFS_FS=y···912CONFIG_LOCKD_V4=y913CONFIG_NFS_COMMON=y914CONFIG_SUNRPC=y915+# CONFIG_SUNRPC_BIND34 is not set916# CONFIG_RPCSEC_GSS_KRB5 is not set917# CONFIG_RPCSEC_GSS_SPKM3 is not set918# CONFIG_SMB_FS is not set···941# CONFIG_SUN_PARTITION is not set942# CONFIG_KARMA_PARTITION is not set943# CONFIG_EFI_PARTITION is not set944+# CONFIG_SYSV68_PARTITION is not set945946#947# Native Language Support948#949# CONFIG_NLS is not set950+951+#952+# Distributed Lock Manager953+#954+# CONFIG_DLM is not set955956#957# Profiling support···959CONFIG_ENABLE_MUST_CHECK=y960CONFIG_MAGIC_SYSRQ=y961# CONFIG_UNUSED_SYMBOLS is not set962+CONFIG_DEBUG_FS=y963+# CONFIG_HEADERS_CHECK is not set964CONFIG_DEBUG_KERNEL=y965+# CONFIG_DEBUG_SHIRQ is not set966CONFIG_DETECT_SOFTLOCKUP=y967CONFIG_SCHEDSTATS=y968+# CONFIG_TIMER_STATS is not set969# CONFIG_DEBUG_SLAB is not set970# CONFIG_DEBUG_RT_MUTEXES is not set971# CONFIG_RT_MUTEX_TESTER is not set972# CONFIG_DEBUG_SPINLOCK is not set973# CONFIG_DEBUG_MUTEXES is not set0974# CONFIG_DEBUG_SPINLOCK_SLEEP is not set975# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set976# CONFIG_DEBUG_KOBJECT is not set977CONFIG_DEBUG_BUGVERBOSE=y978# CONFIG_DEBUG_INFO is not set0979# CONFIG_DEBUG_VM is not set980# CONFIG_DEBUG_LIST is not set981CONFIG_FRAME_POINTER=y0982CONFIG_FORCED_INLINING=y983# CONFIG_RCU_TORTURE_TEST is not set984+# CONFIG_FAULT_INJECTION is not set985# CONFIG_EARLY_PRINTK is not set986# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set987CONFIG_SH64_PROC_TLB=y···1004#1005# Library routines1006#1007+CONFIG_BITREVERSE=y1008# CONFIG_CRC_CCITT is not set1009# CONFIG_CRC16 is not set1010+# CONFIG_CRC_ITU_T is not set1011CONFIG_CRC32=y1012# CONFIG_LIBCRC32C is not set1013CONFIG_PLIST=y1014+CONFIG_HAS_IOMEM=y1015+CONFIG_HAS_IOPORT=y1016+CONFIG_HAS_DMA=y1017CONFIG_GENERIC_HARDIRQS=y1018CONFIG_GENERIC_IRQ_PROBE=y
···4 * May be copied or modified under the terms of the GNU General Public5 * License. See linux/COPYING for more information.6 *7- * Defintions for the SH5 PCI hardware.8 */910/* Product ID */
···4 * May be copied or modified under the terms of the GNU General Public5 * License. See linux/COPYING for more information.6 *7+ * Definitions for the SH5 PCI hardware.8 */910/* Product ID */
+1-1
arch/sh64/kernel/process.c
···387 * NOTE! Only a kernel-only process(ie the swapper or direct descendants388 * who haven't done an "execve()") should use this: it will work within389 * a system call from a "real" process, but the process memory space will390- * not be free'd until both the parent and the child have exited.391 */392int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)393{
···387 * NOTE! Only a kernel-only process(ie the swapper or direct descendants388 * who haven't done an "execve()") should use this: it will work within389 * a system call from a "real" process, but the process memory space will390+ * not be freed until both the parent and the child have exited.391 */392int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)393{
+29-4
arch/sh64/kernel/signal.c
···698 if (try_to_freeze())699 goto no_signal;700701- if (!oldset)00702 oldset = ¤t->blocked;703704 signr = get_signal_to_deliver(&info, &ka, regs, 0);···708 if (signr > 0) {709 /* Whee! Actually deliver the signal. */710 handle_signal(signr, &info, &ka, oldset, regs);000000000711 return 1;712 }713···724 /* Did we come from a system call? */725 if (regs->syscall_nr >= 0) {726 /* Restart the system call - no handlers present */727- if (regs->regs[REG_RET] == -ERESTARTNOHAND ||728- regs->regs[REG_RET] == -ERESTARTSYS ||729- regs->regs[REG_RET] == -ERESTARTNOINTR) {0730 /* Decode Syscall # */731 regs->regs[REG_RET] = regs->syscall_nr;732 regs->pc -= 4;000000733 }734 }0000000735 return 0;736}
···698 if (try_to_freeze())699 goto no_signal;700701+ if (test_thread_flag(TIF_RESTORE_SIGMASK))702+ oldset = ¤t->saved_sigmask;703+ else if (!oldset)704 oldset = ¤t->blocked;705706 signr = get_signal_to_deliver(&info, &ka, regs, 0);···706 if (signr > 0) {707 /* Whee! Actually deliver the signal. */708 handle_signal(signr, &info, &ka, oldset, regs);709+710+ /*711+ * If a signal was successfully delivered, the saved sigmask712+ * is in its frame, and we can clear the TIF_RESTORE_SIGMASK713+ * flag.714+ */715+ if (test_thread_flag(TIF_RESTORE_SIGMASK))716+ clear_thread_flag(TIF_RESTORE_SIGMASK);717+718 return 1;719 }720···713 /* Did we come from a system call? */714 if (regs->syscall_nr >= 0) {715 /* Restart the system call - no handlers present */716+ switch (regs->regs[REG_RET]) {717+ case -ERESTARTNOHAND:718+ case -ERESTARTSYS:719+ case -ERESTARTNOINTR:720 /* Decode Syscall # */721 regs->regs[REG_RET] = regs->syscall_nr;722 regs->pc -= 4;723+ break;724+725+ case -ERESTART_RESTARTBLOCK:726+ regs->regs[REG_RET] = __NR_restart_syscall;727+ regs->pc -= 4;728+ break;729 }730 }731+732+ /* No signal to deliver -- put the saved sigmask back */733+ if (test_thread_flag(TIF_RESTORE_SIGMASK)) {734+ clear_thread_flag(TIF_RESTORE_SIGMASK);735+ sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);736+ }737+738 return 0;739}
+33-3
arch/sh64/kernel/syscalls.S
···2 * arch/sh64/kernel/syscalls.S3 *4 * Copyright (C) 2000, 2001 Paolo Alberelli5- * Copyright (C) 2004 Paul Mundt6 * Copyright (C) 2003, 2004 Richard Curnow7 *8 * This file is subject to the terms and conditions of the GNU General Public···20 */21 .globl sys_call_table22sys_call_table:23- .long sys_ni_syscall /* 0 - old "setup()" system call */24 .long sys_exit25 .long sys_fork26 .long sys_read···347 .long sys_inotify_init348 .long sys_inotify_add_watch349 .long sys_inotify_rm_watch /* 320 */350-000000000000000000000000000000
···123static unsigned long long scaled_recip_ctc_ticks_per_jiffy;124125/* Estimate number of microseconds that have elapsed since the last timer tick,126- by scaling the delta that has occured in the CTC register.127128 WARNING WARNING WARNING : This algorithm relies on the CTC decrementing at129 the CPU clock rate. If the CPU sleeps, the CTC stops counting. Bear this···282 * timer_interrupt() needs to keep up the real-time clock,283 * as well as call the "do_timer()" routine every clocktick284 */285-static inline void do_timer_interrupt(int irq, struct pt_regs *regs)286{287 unsigned long long current_ctc;288 asm ("getcon cr62, %0" : "=r" (current_ctc));···290291 do_timer(1);292#ifndef CONFIG_SMP293- update_process_times(user_mode(regs));294#endif295- profile_tick(CPU_PROFILING, regs);0296297#ifdef CONFIG_HEARTBEAT298 {···324 * Time Stamp Counter value at the time of the timer interrupt, so that325 * we later on can estimate the time of day more exactly.326 */327-static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)328{329 unsigned long timer_status;330···341 * locally disabled. -arca342 */343 write_lock(&xtime_lock);344- do_timer_interrupt(irq, regs);345 write_unlock(&xtime_lock);346347 return IRQ_HANDLED;···466#endif467}468469-static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id,470- struct pt_regs *regs)471{00472 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */473 regs->regs[3] = 1; /* Using r3 */474
···123static unsigned long long scaled_recip_ctc_ticks_per_jiffy;124125/* Estimate number of microseconds that have elapsed since the last timer tick,126+ by scaling the delta that has occurred in the CTC register.127128 WARNING WARNING WARNING : This algorithm relies on the CTC decrementing at129 the CPU clock rate. If the CPU sleeps, the CTC stops counting. Bear this···282 * timer_interrupt() needs to keep up the real-time clock,283 * as well as call the "do_timer()" routine every clocktick284 */285+static inline void do_timer_interrupt(void)286{287 unsigned long long current_ctc;288 asm ("getcon cr62, %0" : "=r" (current_ctc));···290291 do_timer(1);292#ifndef CONFIG_SMP293+ update_process_times(user_mode(get_irq_regs()));294#endif295+ if (current->pid)296+ profile_tick(CPU_PROFILING);297298#ifdef CONFIG_HEARTBEAT299 {···323 * Time Stamp Counter value at the time of the timer interrupt, so that324 * we later on can estimate the time of day more exactly.325 */326+static irqreturn_t timer_interrupt(int irq, void *dev_id)327{328 unsigned long timer_status;329···340 * locally disabled. -arca341 */342 write_lock(&xtime_lock);343+ do_timer_interrupt();344 write_unlock(&xtime_lock);345346 return IRQ_HANDLED;···465#endif466}467468+static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id)0469{470+ struct pt_regs *regs = get_irq_regs();471+472 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */473 regs->regs[3] = 1; /* Using r3 */474
···29/* Note the SMSC SuperIO chip and SMSC LAN chip interrupts are all muxed onto30 the same SH-5 interrupt */3132-static irqreturn_t cayman_interrupt_smsc(int irq, void *dev_id, struct pt_regs *regs)33{34 printk(KERN_INFO "CAYMAN: spurious SMSC interrupt\n");35 return IRQ_NONE;36}3738-static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id, struct pt_regs *regs)39{40 printk(KERN_INFO "CAYMAN: spurious PCI interrupt, IRQ %d\n", irq);41 return IRQ_NONE;
···29/* Note the SMSC SuperIO chip and SMSC LAN chip interrupts are all muxed onto30 the same SH-5 interrupt */3132+static irqreturn_t cayman_interrupt_smsc(int irq, void *dev_id)33{34 printk(KERN_INFO "CAYMAN: spurious SMSC interrupt\n");35 return IRQ_NONE;36}3738+static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id)39{40 printk(KERN_INFO "CAYMAN: spurious PCI interrupt, IRQ %d\n", irq);41 return IRQ_NONE;
+1-1
arch/sh64/mach-cayman/setup.c
···213 SMSC_SUPERIO_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */214#endif215216- /* Exit the configuraton state */217 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);218219 return 0;
···213 SMSC_SUPERIO_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */214#endif215216+ /* Exit the configuration state */217 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);218219 return 0;
+1-1
arch/sh64/mm/fault.c
···135 /* SIM136 * Note this is now called with interrupts still disabled137 * This is to cope with being called for a missing IO port138- * address with interupts disabled. This should be fixed as139 * soon as we have a better 'fast path' miss handler.140 *141 * Plus take care how you try and debug this stuff.
···135 /* SIM136 * Note this is now called with interrupts still disabled137 * This is to cope with being called for a missing IO port138+ * address with interrupts disabled. This should be fixed as139 * soon as we have a better 'fast path' miss handler.140 *141 * Plus take care how you try and debug this stuff.
···14 * IMPORTANT NOTES :15 * The do_fast_page_fault function is called from a context in entry.S where very few registers16 * have been saved. In particular, the code in this file must be compiled not to use ANY17- * caller-save regiseters that are not part of the restricted save set. Also, it means that18 * code in this file must not make calls to functions elsewhere in the kernel, or else the19 * excepting context will see corruption in its caller-save registers. Plus, the entry.S save20 * area is non-reentrant, so this code has to run with SR.BL==1, i.e. no interrupts taken inside···249 /* SIM250 * Note this is now called with interrupts still disabled251 * This is to cope with being called for a missing IO port252- * address with interupts disabled. This should be fixed as253 * soon as we have a better 'fast path' miss handler.254 *255 * Plus take care how you try and debug this stuff.
···14 * IMPORTANT NOTES :15 * The do_fast_page_fault function is called from a context in entry.S where very few registers16 * have been saved. In particular, the code in this file must be compiled not to use ANY17+ * caller-save registers that are not part of the restricted save set. Also, it means that18 * code in this file must not make calls to functions elsewhere in the kernel, or else the19 * excepting context will see corruption in its caller-save registers. Plus, the entry.S save20 * area is non-reentrant, so this code has to run with SR.BL==1, i.e. no interrupts taken inside···249 /* SIM250 * Note this is now called with interrupts still disabled251 * This is to cope with being called for a missing IO port252+ * address with interrupts disabled. This should be fixed as253 * soon as we have a better 'fast path' miss handler.254 *255 * Plus take care how you try and debug this stuff.
···4#include <linux/linkage.h>5#include <linux/sys.h>6#include <linux/cache.h>078#define __NO_STUBS9···4647extern void sys_ni_syscall(void);4849-sys_call_ptr_t sys_call_table[__NR_syscall_max+1] __cacheline_aligned = {50 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */51- [0 ... __NR_syscall_max] = &sys_ni_syscall,52#include <asm-x86_64/unistd.h>53};
···4#include <linux/linkage.h>5#include <linux/sys.h>6#include <linux/cache.h>7+#include <kern_constants.h>89#define __NO_STUBS10···4546extern void sys_ni_syscall(void);4748+sys_call_ptr_t sys_call_table[UM_NR_syscall_max+1] __cacheline_aligned = {49 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */50+ [0 ... UM_NR_syscall_max] = &sys_ni_syscall,51#include <asm-x86_64/unistd.h>52};
···4# Andre Hedrick <andre@linux-ide.org>5#67-if BLOCK8-9-menu "ATA/ATAPI/MFM/RLL support"10- depends on HAS_IOMEM11-12-config IDE13 tristate "ATA/ATAPI/MFM/RLL support"0014 ---help---15 If you say Y here, your kernel will be able to manage low cost mass16 storage units such as ATA/(E)IDE and ATAPI units. The most common···1096config BLK_DEV_HD1097 def_bool BLK_DEV_HD_IDE || BLK_DEV_HD_ONLY10981099-endif1100-1101-endmenu1102-1103-endif
···4# Andre Hedrick <andre@linux-ide.org>5#67+menuconfig IDE000008 tristate "ATA/ATAPI/MFM/RLL support"9+ depends on BLOCK10+ depends on HAS_IOMEM11 ---help---12 If you say Y here, your kernel will be able to manage low cost mass13 storage units such as ATA/(E)IDE and ATAPI units. The most common···1099config BLK_DEV_HD1100 def_bool BLK_DEV_HD_IDE || BLK_DEV_HD_ONLY11011102+endif # IDE0000
+1-13
drivers/ide/cris/ide-cris.c
···1002 return 1; /* let the PIO routines handle this weirdness */1003}10041005-static int cris_config_drive_for_dma (ide_drive_t *drive)1006-{1007- u8 speed = ide_max_dma_mode(drive);1008-1009- if (!speed)1010- return 0;1011-1012- speed_cris_ide(drive, speed);1013-1014- return ide_dma_enable(drive);1015-}1016-1017/*1018 * cris_dma_intr() is the handler for disk read/write DMA interrupts1019 */···10311032static int cris_dma_check(ide_drive_t *drive)1033{1034- if (ide_use_dma(drive) && cris_config_drive_for_dma(drive))1035 return 0;10361037 return -1;
···1002 return 1; /* let the PIO routines handle this weirdness */1003}10040000000000001005/*1006 * cris_dma_intr() is the handler for disk read/write DMA interrupts1007 */···10431044static int cris_dma_check(ide_drive_t *drive)1045{1046+ if (ide_tune_dma(drive))1047 return 0;10481049 return -1;
+12-41
drivers/ide/ide-dma.c
···670671EXPORT_SYMBOL(__ide_dma_good_drive);672673-int ide_use_dma(ide_drive_t *drive)674-{675- struct hd_driveid *id = drive->id;676- ide_hwif_t *hwif = drive->hwif;677-678- if ((id->capability & 1) == 0 || drive->autodma == 0)679- return 0;680-681- /* consult the list of known "bad" drives */682- if (__ide_dma_bad_drive(drive))683- return 0;684-685- /* capable of UltraDMA modes */686- if (id->field_valid & 4) {687- if (hwif->ultra_mask & id->dma_ultra)688- return 1;689- }690-691- /* capable of regular DMA modes */692- if (id->field_valid & 2) {693- if (hwif->mwdma_mask & id->dma_mword)694- return 1;695- if (hwif->swdma_mask & id->dma_1word)696- return 1;697- }698-699- /* consult the list of known "good" drives */700- if (__ide_dma_good_drive(drive) && id->eide_dma_time < 150)701- return 1;702-703- return 0;704-}705-706-EXPORT_SYMBOL_GPL(ide_use_dma);707-708static const u8 xfer_mode_bases[] = {709 XFER_UDMA_0,710 XFER_MW_DMA_0,···696 mask &= 0x07;697 break;698 case XFER_MW_DMA_0:699- mask = id->dma_mword & hwif->mwdma_mask;0700 break;701 case XFER_SW_DMA_0:702- mask = id->dma_1word & hwif->swdma_mask;0703 break;704 default:705 BUG();···750{751 u8 speed;752753- /* TODO: use only ide_max_dma_mode() */754- if (!ide_use_dma(drive))000755 return 0;756757 speed = ide_max_dma_mode(drive);···762 if (!speed)763 return 0;764765- drive->hwif->speedproc(drive, speed);0766767- return ide_dma_enable(drive);768}769770EXPORT_SYMBOL_GPL(ide_tune_dma);
···670671EXPORT_SYMBOL(__ide_dma_good_drive);67200000000000000000000000000000000000673static const u8 xfer_mode_bases[] = {674 XFER_UDMA_0,675 XFER_MW_DMA_0,···731 mask &= 0x07;732 break;733 case XFER_MW_DMA_0:734+ if (id->field_valid & 2)735+ mask = id->dma_mword & hwif->mwdma_mask;736 break;737 case XFER_SW_DMA_0:738+ if (id->field_valid & 2)739+ mask = id->dma_1word & hwif->swdma_mask;740 break;741 default:742 BUG();···783{784 u8 speed;785786+ if ((drive->id->capability & 1) == 0 || drive->autodma == 0)787+ return 0;788+789+ /* consult the list of known "bad" drives */790+ if (__ide_dma_bad_drive(drive))791 return 0;792793 speed = ide_max_dma_mode(drive);···792 if (!speed)793 return 0;794795+ if (drive->hwif->speedproc(drive, speed))796+ return 0;797798+ return 1;799}800801EXPORT_SYMBOL_GPL(ide_tune_dma);
+1
drivers/ide/ide-io.c
···223 break;224 if (drive->hwif->ide_dma_check == NULL)225 break;0226 ide_set_dma(drive);227 break;228 }
···910 err = 0;911912 if (arg) {0913 if (ide_set_dma(drive) || hwif->ide_dma_on(drive))914 err = -EIO;915 } else
···910 err = 0;911912 if (arg) {913+ hwif->dma_off_quietly(drive);914 if (ide_set_dma(drive) || hwif->ide_dma_on(drive))915 err = -EIO;916 } else
+7-62
drivers/ide/pci/alim15x3.c
···455 return (ide_config_drive_speed(drive, speed));456}457458-459-/**460- * config_chipset_for_dma - set up DMA mode461- * @drive: drive to configure for462- *463- * Place a drive into DMA mode and tune the chipset for464- * the selected speed.465- *466- * Returns true if DMA mode can be used467- */468-469-static int config_chipset_for_dma (ide_drive_t *drive)470-{471- u8 speed = ide_max_dma_mode(drive);472-473- if (!(speed))474- return 0;475-476- (void) ali15x3_tune_chipset(drive, speed);477- return ide_dma_enable(drive);478-}479-480/**481 * ali15x3_config_drive_for_dma - configure for DMA482 * @drive: drive to configure···465466static int ali15x3_config_drive_for_dma(ide_drive_t *drive)467{468- ide_hwif_t *hwif = HWIF(drive);469- struct hd_driveid *id = drive->id;470-471- if ((m5229_revision<=0x20) && (drive->media!=ide_disk))472- goto ata_pio;473-474 drive->init_speed = 0;475476- if ((id != NULL) && ((id->capability & 1) != 0) && drive->autodma) {477- /* Consult the list of known "bad" drives */478- if (__ide_dma_bad_drive(drive))479- goto ata_pio;480- if ((id->field_valid & 4) && (m5229_revision >= 0xC2)) {481- if (id->dma_ultra & hwif->ultra_mask) {482- /* Force if Capable UltraDMA */483- int dma = config_chipset_for_dma(drive);484- if ((id->field_valid & 2) && !dma)485- goto try_dma_modes;486- }487- } else if (id->field_valid & 2) {488-try_dma_modes:489- if ((id->dma_mword & hwif->mwdma_mask) ||490- (id->dma_1word & hwif->swdma_mask)) {491- /* Force if Capable regular DMA modes */492- if (!config_chipset_for_dma(drive))493- goto ata_pio;494- }495- } else if (__ide_dma_good_drive(drive) &&496- (id->eide_dma_time < 150)) {497- /* Consult the list of known "good" drives */498- if (!config_chipset_for_dma(drive))499- goto ata_pio;500- } else {501- goto ata_pio;502- }503- } else {504-ata_pio:505- hwif->tuneproc(drive, 255);506- return -1;507- }508509- return 0;00510}511512/**···683 return;684 }685686- hwif->atapi_dma = 1;0687688 if (m5229_revision <= 0x20)689 hwif->ultra_mask = 0x00; /* no udma */
···455 return (ide_config_drive_speed(drive, speed));456}4570000000000000000000000458/**459 * ali15x3_config_drive_for_dma - configure for DMA460 * @drive: drive to configure···487488static int ali15x3_config_drive_for_dma(ide_drive_t *drive)489{000000490 drive->init_speed = 0;491492+ if (ide_tune_dma(drive))493+ return 0;000000000000000000000000000000494495+ ali15x3_tune_drive(drive, 255);496+497+ return -1;498}499500/**···739 return;740 }741742+ if (m5229_revision > 0x20)743+ hwif->atapi_dma = 1;744745 if (m5229_revision <= 0x20)746 hwif->ultra_mask = 0x00; /* no udma */
+1-14
drivers/ide/pci/cmd64x.c
···352 return ide_config_drive_speed(drive, speed);353}354355-static int config_chipset_for_dma (ide_drive_t *drive)356-{357- u8 speed = ide_max_dma_mode(drive);358-359- if (!speed)360- return 0;361-362- if (cmd64x_tune_chipset(drive, speed))363- return 0;364-365- return ide_dma_enable(drive);366-}367-368static int cmd64x_config_drive_for_dma (ide_drive_t *drive)369{370- if (ide_use_dma(drive) && config_chipset_for_dma(drive))371 return 0;372373 if (ide_use_fast_pio(drive))
···352 return ide_config_drive_speed(drive, speed);353}3540000000000000355static int cmd64x_config_drive_for_dma (ide_drive_t *drive)356{357+ if (ide_tune_dma(drive))358 return 0;359360 if (ide_use_fast_pio(drive))
+80-82
drivers/ide/pci/cs5530.c
···1/*2- * linux/drivers/ide/pci/cs5530.c Version 0.7 Sept 10, 20023 *4 * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>5- * Ditto of GNU General Public License.6- *7 * Copyright (C) 2000 Mark Lord <mlord@pobox.com>008 * May be copied or modified under the terms of the GNU General Public License9 *10 * Development of this chipset driver was funded···62#define CS5530_BAD_PIO(timings) (((timings)&~0x80000000)==0x0000e132)63#define CS5530_BASEREG(hwif) (((hwif)->dma_base & ~0xf) + ((hwif)->channel ? 0x30 : 0x20))640000000065/**66 * cs5530_tuneproc - select/set PIO modes67 *···8283static void cs5530_tuneproc (ide_drive_t *drive, u8 pio) /* pio=255 means "autotune" */84{85- ide_hwif_t *hwif = HWIF(drive);86- unsigned int format;87- unsigned long basereg = CS5530_BASEREG(hwif);88- static u8 modes[5] = { XFER_PIO_0, XFER_PIO_1, XFER_PIO_2, XFER_PIO_3, XFER_PIO_4};89-90 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);91- if (!cs5530_set_xfer_mode(drive, modes[pio])) {92- format = (inl(basereg + 4) >> 31) & 1;93- outl(cs5530_pio_timings[format][pio],94- basereg+(drive->select.b.unit<<3));95- }96}9798/**99- * cs5530_config_dma - select/set DMA and UDMA modes000000000000000000000000000000000000000100 * @drive: drive to tune101 *102- * cs5530_config_dma() handles selection/setting of DMA/UDMA modes103- * for both the chipset and drive. The CS5530 has limitations about104- * mixing DMA/UDMA on the same cable.105 */106-107-static int cs5530_config_dma (ide_drive_t *drive)108{109- int udma_ok = 1, mode = 0;110- ide_hwif_t *hwif = HWIF(drive);111- int unit = drive->select.b.unit;112- ide_drive_t *mate = &hwif->drives[unit^1];113- struct hd_driveid *id = drive->id;114- unsigned int reg, timings = 0;115- unsigned long basereg;116117- /*118- * Default to DMA-off in case we run into trouble here.119- */120- hwif->dma_off_quietly(drive);121122- /*123- * The CS5530 specifies that two drives sharing a cable cannot124- * mix UDMA/MDMA. It has to be one or the other, for the pair,125- * though different timings can still be chosen for each drive.126- * We could set the appropriate timing bits on the fly,127- * but that might be a bit confusing. So, for now we statically128- * handle this requirement by looking at our mate drive to see129- * what it is capable of, before choosing a mode for our own drive.130- *131- * Note: This relies on the fact we never fail from UDMA to MWDMA_2132- * but instead drop to PIO133- */134- if (mate->present) {135- struct hd_driveid *mateid = mate->id;136- if (mateid && (mateid->capability & 1) &&137- !__ide_dma_bad_drive(mate)) {138- if ((mateid->field_valid & 4) &&139- (mateid->dma_ultra & 7))140- udma_ok = 1;141- else if ((mateid->field_valid & 2) &&142- (mateid->dma_mword & 7))143- udma_ok = 0;144- else145- udma_ok = 1;146- }147- }148149- /*150- * Now see what the current drive is capable of,151- * selecting UDMA only if the mate said it was ok.152- */153- if (id && (id->capability & 1) && drive->autodma &&154- !__ide_dma_bad_drive(drive)) {155- if (udma_ok && (id->field_valid & 4) && (id->dma_ultra & 7)) {156- if (id->dma_ultra & 4)157- mode = XFER_UDMA_2;158- else if (id->dma_ultra & 2)159- mode = XFER_UDMA_1;160- else if (id->dma_ultra & 1)161- mode = XFER_UDMA_0;162- }163- if (!mode && (id->field_valid & 2) && (id->dma_mword & 7)) {164- if (id->dma_mword & 4)165- mode = XFER_MW_DMA_2;166- else if (id->dma_mword & 2)167- mode = XFER_MW_DMA_1;168- else if (id->dma_mword & 1)169- mode = XFER_MW_DMA_0;170- }171- }172173 /*174 * Tell the drive to switch to the new mode; abort on failure.175 */176- if (!mode || cs5530_set_xfer_mode(drive, mode))177 return 1; /* failure */178179 /*···166 case XFER_MW_DMA_0: timings = 0x00077771; break;167 case XFER_MW_DMA_1: timings = 0x00012121; break;168 case XFER_MW_DMA_2: timings = 0x00002020; break;0000000169 default:170 BUG();171 break;172 }173- basereg = CS5530_BASEREG(hwif);174 reg = inl(basereg + 4); /* get drive0 config register */175 timings |= reg & 0x80000000; /* preserve PIO format bit */176- if (unit == 0) { /* are we configuring drive0? */177 outl(timings, basereg + 4); /* write drive0 config register */178 } else {179 if (timings & 0x00100000)···306 hwif->serialized = hwif->mate->serialized = 1;307308 hwif->tuneproc = &cs5530_tuneproc;00309 basereg = CS5530_BASEREG(hwif);310 d0_timings = inl(basereg + 0);311 if (CS5530_BAD_PIO(d0_timings)) {···329 hwif->ultra_mask = 0x07;330 hwif->mwdma_mask = 0x07;3310332 hwif->ide_dma_check = &cs5530_config_dma;333 if (!noautodma)334 hwif->autodma = 1;
···1/*2+ * linux/drivers/ide/pci/cs5530.c Version 0.73 Mar 10 20073 *4 * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>005 * Copyright (C) 2000 Mark Lord <mlord@pobox.com>6+ * Copyright (C) 2007 Bartlomiej Zolnierkiewicz7+ *8 * May be copied or modified under the terms of the GNU General Public License9 *10 * Development of this chipset driver was funded···62#define CS5530_BAD_PIO(timings) (((timings)&~0x80000000)==0x0000e132)63#define CS5530_BASEREG(hwif) (((hwif)->dma_base & ~0xf) + ((hwif)->channel ? 0x30 : 0x20))6465+static void cs5530_tunepio(ide_drive_t *drive, u8 pio)66+{67+ unsigned long basereg = CS5530_BASEREG(drive->hwif);68+ unsigned int format = (inl(basereg + 4) >> 31) & 1;69+70+ outl(cs5530_pio_timings[format][pio], basereg + ((drive->dn & 1)<<3));71+}72+73/**74 * cs5530_tuneproc - select/set PIO modes75 *···7475static void cs5530_tuneproc (ide_drive_t *drive, u8 pio) /* pio=255 means "autotune" */76{0000077 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);78+79+ if (cs5530_set_xfer_mode(drive, XFER_PIO_0 + pio) == 0)80+ cs5530_tunepio(drive, pio);0081}8283/**84+ * cs5530_udma_filter - UDMA filter85+ * @drive: drive86+ *87+ * cs5530_udma_filter() does UDMA mask filtering for the given drive88+ * taking into the consideration capabilities of the mate device.89+ *90+ * The CS5530 specifies that two drives sharing a cable cannot mix91+ * UDMA/MDMA. It has to be one or the other, for the pair, though92+ * different timings can still be chosen for each drive. We could93+ * set the appropriate timing bits on the fly, but that might be94+ * a bit confusing. So, for now we statically handle this requirement95+ * by looking at our mate drive to see what it is capable of, before96+ * choosing a mode for our own drive.97+ *98+ * Note: This relies on the fact we never fail from UDMA to MWDMA299+ * but instead drop to PIO.100+ */101+102+static u8 cs5530_udma_filter(ide_drive_t *drive)103+{104+ ide_hwif_t *hwif = drive->hwif;105+ ide_drive_t *mate = &hwif->drives[(drive->dn & 1) ^ 1];106+ struct hd_driveid *mateid = mate->id;107+ u8 mask = hwif->ultra_mask;108+109+ if (mate->present == 0)110+ goto out;111+112+ if ((mateid->capability & 1) && __ide_dma_bad_drive(mate) == 0) {113+ if ((mateid->field_valid & 4) && (mateid->dma_ultra & 7))114+ goto out;115+ if ((mateid->field_valid & 2) && (mateid->dma_mword & 7))116+ mask = 0;117+ }118+out:119+ return mask;120+}121+122+/**123+ * cs5530_config_dma - set DMA/UDMA mode124 * @drive: drive to tune125 *126+ * cs5530_config_dma() handles setting of DMA/UDMA mode127+ * for both the chipset and drive.0128 */129+130+static int cs5530_config_dma(ide_drive_t *drive)131{132+ if (ide_tune_dma(drive))133+ return 0;00000134135+ return 1;136+}00137138+static int cs5530_tune_chipset(ide_drive_t *drive, u8 mode)139+{140+ unsigned long basereg;141+ unsigned int reg, timings = 0;0000000000000000000000142143+ mode = ide_rate_filter(drive, mode);0000000000000000000000144145 /*146 * Tell the drive to switch to the new mode; abort on failure.147 */148+ if (cs5530_set_xfer_mode(drive, mode))149 return 1; /* failure */150151 /*···178 case XFER_MW_DMA_0: timings = 0x00077771; break;179 case XFER_MW_DMA_1: timings = 0x00012121; break;180 case XFER_MW_DMA_2: timings = 0x00002020; break;181+ case XFER_PIO_4:182+ case XFER_PIO_3:183+ case XFER_PIO_2:184+ case XFER_PIO_1:185+ case XFER_PIO_0:186+ cs5530_tunepio(drive, mode - XFER_PIO_0);187+ return 0;188 default:189 BUG();190 break;191 }192+ basereg = CS5530_BASEREG(drive->hwif);193 reg = inl(basereg + 4); /* get drive0 config register */194 timings |= reg & 0x80000000; /* preserve PIO format bit */195+ if ((drive-> dn & 1) == 0) { /* are we configuring drive0? */196 outl(timings, basereg + 4); /* write drive0 config register */197 } else {198 if (timings & 0x00100000)···311 hwif->serialized = hwif->mate->serialized = 1;312313 hwif->tuneproc = &cs5530_tuneproc;314+ hwif->speedproc = &cs5530_tune_chipset;315+316 basereg = CS5530_BASEREG(hwif);317 d0_timings = inl(basereg + 0);318 if (CS5530_BAD_PIO(d0_timings)) {···332 hwif->ultra_mask = 0x07;333 hwif->mwdma_mask = 0x07;334335+ hwif->udma_filter = cs5530_udma_filter;336 hwif->ide_dma_check = &cs5530_config_dma;337 if (!noautodma)338 hwif->autodma = 1;
+1-20
drivers/ide/pci/it821x.c
···464}465466/**467- * config_chipset_for_dma - configure for DMA468- * @drive: drive to configure469- *470- * Called by the IDE layer when it wants the timings set up.471- */472-473-static int config_chipset_for_dma (ide_drive_t *drive)474-{475- u8 speed = ide_max_dma_mode(drive);476-477- if (speed == 0)478- return 0;479-480- it821x_tune_chipset(drive, speed);481-482- return ide_dma_enable(drive);483-}484-485-/**486 * it821x_configure_drive_for_dma - set up for DMA transfers487 * @drive: drive we are going to set up488 *···475476static int it821x_config_drive_for_dma (ide_drive_t *drive)477{478- if (ide_use_dma(drive) && config_chipset_for_dma(drive))479 return 0;480481 it821x_tuneproc(drive, 255);
···464}465466/**0000000000000000000467 * it821x_configure_drive_for_dma - set up for DMA transfers468 * @drive: drive we are going to set up469 *···494495static int it821x_config_drive_for_dma (ide_drive_t *drive)496{497+ if (ide_tune_dma(drive))498 return 0;499500 it821x_tuneproc(drive, 255);
+1-28
drivers/ide/pci/pdc202xx_new.c
···228 return get_indexed_reg(hwif, 0x0b) & 0x04;229}230231-static int config_chipset_for_dma(ide_drive_t *drive)232-{233- struct hd_driveid *id = drive->id;234- ide_hwif_t *hwif = HWIF(drive);235- u8 speed;236-237- if (id->capability & 4) {238- /*239- * Set IORDY_EN & PREFETCH_EN (this seems to have240- * NO real effect since this register is reloaded241- * by hardware when the transfer mode is selected)242- */243- u8 tmp, adj = (drive->dn & 1) ? 0x08 : 0x00;244-245- tmp = get_indexed_reg(hwif, 0x13 + adj);246- set_indexed_reg(hwif, 0x13 + adj, tmp | 0x03);247- }248-249- speed = ide_max_dma_mode(drive);250-251- if (!speed)252- return 0;253-254- (void) hwif->speedproc(drive, speed);255- return ide_dma_enable(drive);256-}257-258static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)259{260 drive->init_speed = 0;261262- if (ide_use_dma(drive) && config_chipset_for_dma(drive))263 return 0;264265 if (ide_use_fast_pio(drive))
···228 return get_indexed_reg(hwif, 0x0b) & 0x04;229}230000000000000000000000000000231static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)232{233 drive->init_speed = 0;234235+ if (ide_tune_dma(drive))236 return 0;237238 if (ide_use_fast_pio(drive))
+41-143
drivers/ide/pci/pdc202xx_old.c
···1/*2- * linux/drivers/ide/pci/pdc202xx_old.c Version 0.36 Sept 11, 20023 *4 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>5 * Copyright (C) 2006-2007 MontaVista Software, Inc.06 *7 * Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this8 * compiled into the kernel if you have more than one card installed.···61 NULL62};6364-/* A Register */65-#define SYNC_ERRDY_EN 0xC066-67-#define SYNC_IN 0x80 /* control bit, different for master vs. slave drives */68-#define ERRDY_EN 0x40 /* control bit, different for master vs. slave drives */69-#define IORDY_EN 0x20 /* PIO: IOREADY */70-#define PREFETCH_EN 0x10 /* PIO: PREFETCH */71-72-#define PA3 0x08 /* PIO"A" timing */73-#define PA2 0x04 /* PIO"A" timing */74-#define PA1 0x02 /* PIO"A" timing */75-#define PA0 0x01 /* PIO"A" timing */76-77-/* B Register */78-79-#define MB2 0x80 /* DMA"B" timing */80-#define MB1 0x40 /* DMA"B" timing */81-#define MB0 0x20 /* DMA"B" timing */82-83-#define PB4 0x10 /* PIO_FORCE 1:0 */84-85-#define PB3 0x08 /* PIO"B" timing */ /* PIO flow Control mode */86-#define PB2 0x04 /* PIO"B" timing */ /* PIO 4 */87-#define PB1 0x02 /* PIO"B" timing */ /* PIO 3 half */88-#define PB0 0x01 /* PIO"B" timing */ /* PIO 3 other half */89-90-/* C Register */91-#define IORDYp_NO_SPEED 0x4F92-#define SPEED_DIS 0x0F93-94-#define DMARQp 0x8095-#define IORDYp 0x4096-#define DMAR_EN 0x2097-#define DMAW_EN 0x1098-99-#define MC3 0x08 /* DMA"C" timing */100-#define MC2 0x04 /* DMA"C" timing */101-#define MC1 0x02 /* DMA"C" timing */102-#define MC0 0x01 /* DMA"C" timing */103104static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed)105{···70 u8 drive_pci = 0x60 + (drive->dn << 2);71 u8 speed = ide_rate_filter(drive, xferspeed);7273- u32 drive_conf;74- u8 AP, BP, CP, DP;75 u8 TA = 0, TB = 0, TC = 0;7677- if (drive->media != ide_disk &&78- drive->media != ide_cdrom && speed < XFER_SW_DMA_0)79- return -1;80-81 pci_read_config_dword(dev, drive_pci, &drive_conf);82- pci_read_config_byte(dev, (drive_pci), &AP);83- pci_read_config_byte(dev, (drive_pci)|0x01, &BP);84- pci_read_config_byte(dev, (drive_pci)|0x02, &CP);85- pci_read_config_byte(dev, (drive_pci)|0x03, &DP);8687- if (speed < XFER_SW_DMA_0) {88- if ((AP & 0x0F) || (BP & 0x07)) {89- /* clear PIO modes of lower 8421 bits of A Register */90- pci_write_config_byte(dev, (drive_pci), AP &~0x0F);91- pci_read_config_byte(dev, (drive_pci), &AP);9293- /* clear PIO modes of lower 421 bits of B Register */94- pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0x07);95- pci_read_config_byte(dev, (drive_pci)|0x01, &BP);96-97- pci_read_config_byte(dev, (drive_pci), &AP);98- pci_read_config_byte(dev, (drive_pci)|0x01, &BP);99- }100- } else {101- if ((BP & 0xF0) && (CP & 0x0F)) {102- /* clear DMA modes of upper 842 bits of B Register */103- /* clear PIO forced mode upper 1 bit of B Register */104- pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0xF0);105- pci_read_config_byte(dev, (drive_pci)|0x01, &BP);106-107- /* clear DMA modes of lower 8421 bits of C Register */108- pci_write_config_byte(dev, (drive_pci)|0x02, CP &~0x0F);109- pci_read_config_byte(dev, (drive_pci)|0x02, &CP);110- }111- }112-113- pci_read_config_byte(dev, (drive_pci), &AP);114- pci_read_config_byte(dev, (drive_pci)|0x01, &BP);115- pci_read_config_byte(dev, (drive_pci)|0x02, &CP);116117 switch(speed) {118- case XFER_UDMA_6: speed = XFER_UDMA_5;119 case XFER_UDMA_5:120 case XFER_UDMA_4: TB = 0x20; TC = 0x01; break;121 case XFER_UDMA_2: TB = 0x20; TC = 0x01; break;···97 case XFER_UDMA_0:98 case XFER_MW_DMA_2: TB = 0x60; TC = 0x03; break;99 case XFER_MW_DMA_1: TB = 0x60; TC = 0x04; break;100- case XFER_MW_DMA_0:101 case XFER_SW_DMA_2: TB = 0x60; TC = 0x05; break;102 case XFER_SW_DMA_1: TB = 0x80; TC = 0x06; break;103 case XFER_SW_DMA_0: TB = 0xC0; TC = 0x0B; break;···110 }111112 if (speed < XFER_SW_DMA_0) {113- pci_write_config_byte(dev, (drive_pci), AP|TA);114- pci_write_config_byte(dev, (drive_pci)|0x01, BP|TB);00000000000115 } else {116- pci_write_config_byte(dev, (drive_pci)|0x01, BP|TB);117- pci_write_config_byte(dev, (drive_pci)|0x02, CP|TC);0000118 }119120#if PDC202XX_DEBUG_DRIVE_INFO121 printk(KERN_DEBUG "%s: %s drive%d 0x%08x ",122 drive->name, ide_xfer_verbose(speed),123 drive->dn, drive_conf);124- pci_read_config_dword(dev, drive_pci, &drive_conf);125 printk("0x%08x\n", drive_conf);126-#endif /* PDC202XX_DEBUG_DRIVE_INFO */127128- return (ide_config_drive_speed(drive, speed));129}130-131132static void pdc202xx_tune_drive(ide_drive_t *drive, u8 pio)133{···159/*160 * Set the control register to use the 66MHz system161 * clock for UDMA 3/4/5 mode operation when necessary.00162 *163 * It may also be possible to leave the 66MHz clock on164 * and readjust the timing parameters.···181 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg);182}183184-static int config_chipset_for_dma (ide_drive_t *drive)185-{186- struct hd_driveid *id = drive->id;187- ide_hwif_t *hwif = HWIF(drive);188- struct pci_dev *dev = hwif->pci_dev;189- u32 drive_conf = 0;190- u8 drive_pci = 0x60 + (drive->dn << 2);191- u8 test1 = 0, test2 = 0, speed = -1;192- u8 AP = 0;193-194- if (dev->device != PCI_DEVICE_ID_PROMISE_20246)195- pdc_old_disable_66MHz_clock(drive->hwif);196-197- drive_pci = 0x60 + (drive->dn << 2);198- pci_read_config_dword(dev, drive_pci, &drive_conf);199- if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))200- goto chipset_is_set;201-202- pci_read_config_byte(dev, drive_pci, &test1);203- if (!(test1 & SYNC_ERRDY_EN)) {204- if (drive->select.b.unit & 0x01) {205- pci_read_config_byte(dev, drive_pci - 4, &test2);206- if ((test2 & SYNC_ERRDY_EN) &&207- !(test1 & SYNC_ERRDY_EN)) {208- pci_write_config_byte(dev, drive_pci,209- test1|SYNC_ERRDY_EN);210- }211- } else {212- pci_write_config_byte(dev, drive_pci,213- test1|SYNC_ERRDY_EN);214- }215- }216-217-chipset_is_set:218-219- pci_read_config_byte(dev, (drive_pci), &AP);220- if (id->capability & 4) /* IORDY_EN */221- pci_write_config_byte(dev, (drive_pci), AP|IORDY_EN);222- pci_read_config_byte(dev, (drive_pci), &AP);223- if (drive->media == ide_disk) /* PREFETCH_EN */224- pci_write_config_byte(dev, (drive_pci), AP|PREFETCH_EN);225-226- speed = ide_max_dma_mode(drive);227-228- if (!(speed)) {229- /* restore original pci-config space */230- pci_write_config_dword(dev, drive_pci, drive_conf);231- return 0;232- }233-234- (void) hwif->speedproc(drive, speed);235- return ide_dma_enable(drive);236-}237-238static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive)239{240 drive->init_speed = 0;241242- if (ide_use_dma(drive) && config_chipset_for_dma(drive))243 return 0;244245 if (ide_use_fast_pio(drive))
···1/*2+ * linux/drivers/ide/pci/pdc202xx_old.c Version 0.50 Mar 3, 20073 *4 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>5 * Copyright (C) 2006-2007 MontaVista Software, Inc.6+ * Copyright (C) 2007 Bartlomiej Zolnierkiewicz7 *8 * Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this9 * compiled into the kernel if you have more than one card installed.···60 NULL61};6263+static void pdc_old_disable_66MHz_clock(ide_hwif_t *);000000000000000000000000000000000000006465static int pdc202xx_tune_chipset (ide_drive_t *drive, u8 xferspeed)66{···107 u8 drive_pci = 0x60 + (drive->dn << 2);108 u8 speed = ide_rate_filter(drive, xferspeed);109110+ u8 AP = 0, BP = 0, CP = 0;0111 u8 TA = 0, TB = 0, TC = 0;112113+#if PDC202XX_DEBUG_DRIVE_INFO114+ u32 drive_conf = 0;00115 pci_read_config_dword(dev, drive_pci, &drive_conf);116+#endif000117118+ /*119+ * TODO: do this once per channel120+ */121+ if (dev->device != PCI_DEVICE_ID_PROMISE_20246)122+ pdc_old_disable_66MHz_clock(hwif);123124+ pci_read_config_byte(dev, drive_pci, &AP);125+ pci_read_config_byte(dev, drive_pci + 1, &BP);126+ pci_read_config_byte(dev, drive_pci + 2, &CP);00000000000000000000127128 switch(speed) {0129 case XFER_UDMA_5:130 case XFER_UDMA_4: TB = 0x20; TC = 0x01; break;131 case XFER_UDMA_2: TB = 0x20; TC = 0x01; break;···161 case XFER_UDMA_0:162 case XFER_MW_DMA_2: TB = 0x60; TC = 0x03; break;163 case XFER_MW_DMA_1: TB = 0x60; TC = 0x04; break;164+ case XFER_MW_DMA_0: TB = 0xE0; TC = 0x0F; break;165 case XFER_SW_DMA_2: TB = 0x60; TC = 0x05; break;166 case XFER_SW_DMA_1: TB = 0x80; TC = 0x06; break;167 case XFER_SW_DMA_0: TB = 0xC0; TC = 0x0B; break;···174 }175176 if (speed < XFER_SW_DMA_0) {177+ /*178+ * preserve SYNC_INT / ERDDY_EN bits while clearing179+ * Prefetch_EN / IORDY_EN / PA[3:0] bits of register A180+ */181+ AP &= ~0x3f;182+ if (drive->id->capability & 4)183+ AP |= 0x20; /* set IORDY_EN bit */184+ if (drive->media == ide_disk)185+ AP |= 0x10; /* set Prefetch_EN bit */186+ /* clear PB[4:0] bits of register B */187+ BP &= ~0x1f;188+ pci_write_config_byte(dev, drive_pci, AP | TA);189+ pci_write_config_byte(dev, drive_pci + 1, BP | TB);190 } else {191+ /* clear MB[2:0] bits of register B */192+ BP &= ~0xe0;193+ /* clear MC[3:0] bits of register C */194+ CP &= ~0x0f;195+ pci_write_config_byte(dev, drive_pci + 1, BP | TB);196+ pci_write_config_byte(dev, drive_pci + 2, CP | TC);197 }198199#if PDC202XX_DEBUG_DRIVE_INFO200 printk(KERN_DEBUG "%s: %s drive%d 0x%08x ",201 drive->name, ide_xfer_verbose(speed),202 drive->dn, drive_conf);203+ pci_read_config_dword(dev, drive_pci, &drive_conf);204 printk("0x%08x\n", drive_conf);205+#endif206207+ return ide_config_drive_speed(drive, speed);208}0209210static void pdc202xx_tune_drive(ide_drive_t *drive, u8 pio)211{···209/*210 * Set the control register to use the 66MHz system211 * clock for UDMA 3/4/5 mode operation when necessary.212+ *213+ * FIXME: this register is shared by both channels, some locking is needed214 *215 * It may also be possible to leave the 66MHz clock on216 * and readjust the timing parameters.···229 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg);230}231000000000000000000000000000000000000000000000000000000232static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive)233{234 drive->init_speed = 0;235236+ if (ide_tune_dma(drive))237 return 0;238239 if (ide_use_fast_pio(drive))
+76-83
drivers/ide/pci/sc1200.c
···1/*2- * linux/drivers/ide/pci/sc1200.c Version 0.91 28-Jan-20033 *4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com>005 * May be copied or modified under the terms of the GNU General Public License6 *7 * Development of this chipset driver was funded···95 */96//#define SC1200_BAD_PIO(timings) (((timings)&~0x80000000)==0x00009172)9798-static int sc1200_autoselect_dma_mode (ide_drive_t *drive)99{100- int udma_ok = 1, mode = 0;101- ide_hwif_t *hwif = HWIF(drive);102- int unit = drive->select.b.unit;103- ide_drive_t *mate = &hwif->drives[unit^1];104- struct hd_driveid *id = drive->id;105106- /*107- * The SC1200 specifies that two drives sharing a cable cannot108- * mix UDMA/MDMA. It has to be one or the other, for the pair,109- * though different timings can still be chosen for each drive.110- * We could set the appropriate timing bits on the fly,111- * but that might be a bit confusing. So, for now we statically112- * handle this requirement by looking at our mate drive to see113- * what it is capable of, before choosing a mode for our own drive.114- */115- if (mate->present) {116- struct hd_driveid *mateid = mate->id;117- if (mateid && (mateid->capability & 1) && !__ide_dma_bad_drive(mate)) {118- if ((mateid->field_valid & 4) && (mateid->dma_ultra & 7))119- udma_ok = 1;120- else if ((mateid->field_valid & 2) && (mateid->dma_mword & 7))121- udma_ok = 0;122- else123- udma_ok = 1;124- }125- }126- /*127- * Now see what the current drive is capable of,128- * selecting UDMA only if the mate said it was ok.129- */130- if (id && (id->capability & 1) && hwif->autodma && !__ide_dma_bad_drive(drive)) {131- if (udma_ok && (id->field_valid & 4) && (id->dma_ultra & 7)) {132- if (id->dma_ultra & 4)133- mode = XFER_UDMA_2;134- else if (id->dma_ultra & 2)135- mode = XFER_UDMA_1;136- else if (id->dma_ultra & 1)137- mode = XFER_UDMA_0;138- }139- if (!mode && (id->field_valid & 2) && (id->dma_mword & 7)) {140- if (id->dma_mword & 4)141- mode = XFER_MW_DMA_2;142- else if (id->dma_mword & 2)143- mode = XFER_MW_DMA_1;144- else if (id->dma_mword & 1)145- mode = XFER_MW_DMA_0;146- }147- }148- return mode;149}150151/*152- * sc1200_config_dma2() handles selection/setting of DMA/UDMA modes153- * for both the chipset and drive.00000154 */155-static int sc1200_config_dma2 (ide_drive_t *drive, int mode)00000000000000000000156{157 ide_hwif_t *hwif = HWIF(drive);158 int unit = drive->select.b.unit;···146 unsigned short pci_clock;147 unsigned int basereg = hwif->channel ? 0x50 : 0x40;148149- /*150- * Default to DMA-off in case we run into trouble here.151- */152- hwif->dma_off_quietly(drive); /* turn off DMA while we fiddle */153- outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */154155 /*156 * Tell the drive to switch to the new mode; abort on failure.157 */158- if (!mode || sc1200_set_xfer_mode(drive, mode)) {159 printk("SC1200: set xfer mode failure\n");160 return 1; /* failure */0000000000161 }162163 pci_clock = sc1200_get_pci_clock();···218 case PCI_CLK_66: timings = 0x00015151; break;219 }220 break;221- }222-223- if (timings == 0) {224- printk("%s: sc1200_config_dma: huh? mode=%02x clk=%x \n", drive->name, mode, pci_clock);225- return 1; /* failure */226 }227228 if (unit == 0) { /* are we configuring drive0? */···231 pci_write_config_dword(hwif->pci_dev, basereg+12, timings);232 }233234- outb(inb(hwif->dma_base+2)|(unit?0x40:0x20), hwif->dma_base+2); /* set DMA_capable bit */235-236 return 0; /* success */237}238···240 */241static int sc1200_config_dma (ide_drive_t *drive)242{243- return sc1200_config_dma2(drive, sc1200_autoselect_dma_mode(drive));000244}245246···283static void sc1200_tuneproc (ide_drive_t *drive, byte pio) /* mode=255 means "autotune" */284{285 ide_hwif_t *hwif = HWIF(drive);286- unsigned int format;287- static byte modes[5] = {XFER_PIO_0, XFER_PIO_1, XFER_PIO_2, XFER_PIO_3, XFER_PIO_4};288 int mode = -1;289000290 switch (pio) {291 case 200: mode = XFER_UDMA_0; break;292 case 201: mode = XFER_UDMA_1; break;···298 }299 if (mode != -1) {300 printk("SC1200: %s: changing (U)DMA mode\n", drive->name);301- (void)sc1200_config_dma2(drive, mode);00302 return;303 }304305 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);306 printk("SC1200: %s: setting PIO mode%d\n", drive->name, pio);307- if (!sc1200_set_xfer_mode(drive, modes[pio])) {308- unsigned int basereg = hwif->channel ? 0x50 : 0x40;309- pci_read_config_dword (hwif->pci_dev, basereg+4, &format);310- format = (format >> 31) & 1;311- if (format)312- format += sc1200_get_pci_clock();313- pci_write_config_dword(hwif->pci_dev, basereg + (drive->select.b.unit << 3), sc1200_pio_timings[format][pio]);314- }315}316317#ifdef CONFIG_PM···429 for (d = 0; d < MAX_DRIVES; ++d) {430 ide_drive_t *drive = &(hwif->drives[d]);431 if (drive->present && !__ide_dma_bad_drive(drive)) {432- int was_using_dma = drive->using_dma;433 hwif->dma_off_quietly(drive);434- sc1200_config_dma(drive);435- if (!was_using_dma && drive->using_dma) {436- hwif->dma_off_quietly(drive);437- }438 }439 }440 }···452 hwif->serialized = hwif->mate->serialized = 1;453 hwif->autodma = 0;454 if (hwif->dma_base) {0455 hwif->ide_dma_check = &sc1200_config_dma;456 hwif->ide_dma_end = &sc1200_ide_dma_end;457 if (!noautodma)458 hwif->autodma = 1;459 hwif->tuneproc = &sc1200_tuneproc;0460 }461 hwif->atapi_dma = 1;462 hwif->ultra_mask = 0x07;
···1/*2+ * linux/drivers/ide/pci/sc1200.c Version 0.94 Mar 10 20073 *4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com>5+ * Copyright (C) 2007 Bartlomiej Zolnierkiewicz6+ *7 * May be copied or modified under the terms of the GNU General Public License8 *9 * Development of this chipset driver was funded···93 */94//#define SC1200_BAD_PIO(timings) (((timings)&~0x80000000)==0x00009172)9596+static void sc1200_tunepio(ide_drive_t *drive, u8 pio)97{98+ ide_hwif_t *hwif = drive->hwif;99+ struct pci_dev *pdev = hwif->pci_dev;100+ unsigned int basereg = hwif->channel ? 0x50 : 0x40, format = 0;00101102+ pci_read_config_dword(pdev, basereg + 4, &format);103+ format = (format >> 31) & 1;104+ if (format)105+ format += sc1200_get_pci_clock();106+ pci_write_config_dword(pdev, basereg + ((drive->dn & 1) << 3),107+ sc1200_pio_timings[format][pio]);0000000000000000000000000000000000000108}109110/*111+ * The SC1200 specifies that two drives sharing a cable cannot mix112+ * UDMA/MDMA. It has to be one or the other, for the pair, though113+ * different timings can still be chosen for each drive. We could114+ * set the appropriate timing bits on the fly, but that might be115+ * a bit confusing. So, for now we statically handle this requirement116+ * by looking at our mate drive to see what it is capable of, before117+ * choosing a mode for our own drive.118 */119+static u8 sc1200_udma_filter(ide_drive_t *drive)120+{121+ ide_hwif_t *hwif = drive->hwif;122+ ide_drive_t *mate = &hwif->drives[(drive->dn & 1) ^ 1];123+ struct hd_driveid *mateid = mate->id;124+ u8 mask = hwif->ultra_mask;125+126+ if (mate->present == 0)127+ goto out;128+129+ if ((mateid->capability & 1) && __ide_dma_bad_drive(mate) == 0) {130+ if ((mateid->field_valid & 4) && (mateid->dma_ultra & 7))131+ goto out;132+ if ((mateid->field_valid & 2) && (mateid->dma_mword & 7))133+ mask = 0;134+ }135+out:136+ return mask;137+}138+139+static int sc1200_tune_chipset(ide_drive_t *drive, u8 mode)140{141 ide_hwif_t *hwif = HWIF(drive);142 int unit = drive->select.b.unit;···158 unsigned short pci_clock;159 unsigned int basereg = hwif->channel ? 0x50 : 0x40;160161+ mode = ide_rate_filter(drive, mode);0000162163 /*164 * Tell the drive to switch to the new mode; abort on failure.165 */166+ if (sc1200_set_xfer_mode(drive, mode)) {167 printk("SC1200: set xfer mode failure\n");168 return 1; /* failure */169+ }170+171+ switch (mode) {172+ case XFER_PIO_4:173+ case XFER_PIO_3:174+ case XFER_PIO_2:175+ case XFER_PIO_1:176+ case XFER_PIO_0:177+ sc1200_tunepio(drive, mode - XFER_PIO_0);178+ return 0;179 }180181 pci_clock = sc1200_get_pci_clock();···224 case PCI_CLK_66: timings = 0x00015151; break;225 }226 break;227+ default:228+ BUG();229+ break;00230 }231232 if (unit == 0) { /* are we configuring drive0? */···239 pci_write_config_dword(hwif->pci_dev, basereg+12, timings);240 }24100242 return 0; /* success */243}244···250 */251static int sc1200_config_dma (ide_drive_t *drive)252{253+ if (ide_tune_dma(drive))254+ return 0;255+256+ return 1;257}258259···290static void sc1200_tuneproc (ide_drive_t *drive, byte pio) /* mode=255 means "autotune" */291{292 ide_hwif_t *hwif = HWIF(drive);00293 int mode = -1;294295+ /*296+ * bad abuse of ->tuneproc interface297+ */298 switch (pio) {299 case 200: mode = XFER_UDMA_0; break;300 case 201: mode = XFER_UDMA_1; break;···304 }305 if (mode != -1) {306 printk("SC1200: %s: changing (U)DMA mode\n", drive->name);307+ hwif->dma_off_quietly(drive);308+ if (sc1200_tune_chipset(drive, mode) == 0)309+ hwif->dma_host_on(drive);310 return;311 }312313 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);314 printk("SC1200: %s: setting PIO mode%d\n", drive->name, pio);315+316+ if (sc1200_set_xfer_mode(drive, XFER_PIO_0 + pio) == 0)317+ sc1200_tunepio(drive, pio);00000318}319320#ifdef CONFIG_PM···438 for (d = 0; d < MAX_DRIVES; ++d) {439 ide_drive_t *drive = &(hwif->drives[d]);440 if (drive->present && !__ide_dma_bad_drive(drive)) {441+ int enable_dma = drive->using_dma;442 hwif->dma_off_quietly(drive);443+ if (sc1200_config_dma(drive))444+ enable_dma = 0;445+ if (enable_dma)446+ hwif->dma_host_on(drive);447 }448 }449 }···461 hwif->serialized = hwif->mate->serialized = 1;462 hwif->autodma = 0;463 if (hwif->dma_base) {464+ hwif->udma_filter = sc1200_udma_filter;465 hwif->ide_dma_check = &sc1200_config_dma;466 hwif->ide_dma_end = &sc1200_ide_dma_end;467 if (!noautodma)468 hwif->autodma = 1;469 hwif->tuneproc = &sc1200_tuneproc;470+ hwif->speedproc = &sc1200_tune_chipset;471 }472 hwif->atapi_dma = 1;473 hwif->ultra_mask = 0x07;
+1-21
drivers/ide/pci/scc_pata.c
···322}323324/**325- * scc_config_chipset_for_dma - configure for DMA326- * @drive: drive to configure327- *328- * Called by scc_config_drive_for_dma().329- */330-331-static int scc_config_chipset_for_dma(ide_drive_t *drive)332-{333- u8 speed = ide_max_dma_mode(drive);334-335- if (!speed)336- return 0;337-338- if (scc_tune_chipset(drive, speed))339- return 0;340-341- return ide_dma_enable(drive);342-}343-344-/**345 * scc_configure_drive_for_dma - set up for DMA transfers346 * @drive: drive we are going to set up347 *···334335static int scc_config_drive_for_dma(ide_drive_t *drive)336{337- if (ide_use_dma(drive) && scc_config_chipset_for_dma(drive))338 return 0;339340 if (ide_use_fast_pio(drive))
···322}323324/**00000000000000000000325 * scc_configure_drive_for_dma - set up for DMA transfers326 * @drive: drive we are going to set up327 *···354355static int scc_config_drive_for_dma(ide_drive_t *drive)356{357+ if (ide_tune_dma(drive))358 return 0;359360 if (ide_use_fast_pio(drive))
+14-63
drivers/ide/pci/serverworks.c
···1/*2- * linux/drivers/ide/pci/serverworks.c Version 0.8 25 Ebr 20033 *4 * Copyright (C) 1998-2000 Michel Aubry5 * Copyright (C) 1998-2000 Andrzej Krzysztofowicz6 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>07 * Portions copyright (c) 2001 Sun Microsystems8 *9 *···137138 ide_hwif_t *hwif = HWIF(drive);139 struct pci_dev *dev = hwif->pci_dev;140- u8 speed;141- u8 pio = ide_get_best_pio_mode(drive, 255, 5, NULL);142 u8 unit = (drive->select.b.unit & 0x01);143 u8 csb5 = svwks_csb_check(dev);144 u8 ultra_enable = 0, ultra_timing = 0;145 u8 dma_timing = 0, pio_timing = 0;146 u16 csb5_pio = 0;147-148- if (xferspeed == 255) /* PIO auto-tuning */149- speed = XFER_PIO_0 + pio;150- else151- speed = ide_rate_filter(drive, xferspeed);152153 /* If we are about to put a disk into UDMA mode we screwed up.154 Our code assumes we never _ever_ do this on an OSB4 */···227 case XFER_MW_DMA_2:228 case XFER_MW_DMA_1:229 case XFER_MW_DMA_0:000230 pio_timing |= pio_modes[pio];231 csb5_pio |= (pio << (4*drive->dn));232 dma_timing |= dma_modes[speed - XFER_MW_DMA_0];···241 case XFER_UDMA_2:242 case XFER_UDMA_1:243 case XFER_UDMA_0:000244 pio_timing |= pio_modes[pio];245 csb5_pio |= (pio << (4*drive->dn));246 dma_timing |= dma_modes[2];···264 return (ide_config_drive_speed(drive, speed));265}266267-static void config_chipset_for_pio (ide_drive_t *drive)268-{269- u16 eide_pio_timing[6] = {960, 480, 240, 180, 120, 90};270- u16 xfer_pio = drive->id->eide_pio_modes;271- u8 timing, speed, pio;272-273- pio = ide_get_best_pio_mode(drive, 255, 5, NULL);274-275- if (xfer_pio > 4)276- xfer_pio = 0;277-278- if (drive->id->eide_pio_iordy > 0)279- for (xfer_pio = 5;280- xfer_pio>0 &&281- drive->id->eide_pio_iordy>eide_pio_timing[xfer_pio];282- xfer_pio--);283- else284- xfer_pio = (drive->id->eide_pio_modes & 4) ? 0x05 :285- (drive->id->eide_pio_modes & 2) ? 0x04 :286- (drive->id->eide_pio_modes & 1) ? 0x03 :287- (drive->id->tPIO & 2) ? 0x02 :288- (drive->id->tPIO & 1) ? 0x01 : xfer_pio;289-290- timing = (xfer_pio >= pio) ? xfer_pio : pio;291-292- switch(timing) {293- case 4: speed = XFER_PIO_4;break;294- case 3: speed = XFER_PIO_3;break;295- case 2: speed = XFER_PIO_2;break;296- case 1: speed = XFER_PIO_1;break;297- default:298- speed = (!drive->id->tPIO) ? XFER_PIO_0 : XFER_PIO_SLOW;299- break;300- }301- (void) svwks_tune_chipset(drive, speed);302- drive->current_speed = speed;303-}304-305static void svwks_tune_drive (ide_drive_t *drive, u8 pio)306{307- if(pio == 255)308- (void) svwks_tune_chipset(drive, 255);309- else310- (void) svwks_tune_chipset(drive, (XFER_PIO_0 + pio));311-}312-313-static int config_chipset_for_dma (ide_drive_t *drive)314-{315- u8 speed = ide_max_dma_mode(drive);316-317- if (!(speed))318- speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5, NULL);319-320- (void) svwks_tune_chipset(drive, speed);321- return ide_dma_enable(drive);322}323324static int svwks_config_drive_xfer_rate (ide_drive_t *drive)325{326 drive->init_speed = 0;327328- if (ide_use_dma(drive) && config_chipset_for_dma(drive))329 return 0;330331 if (ide_use_fast_pio(drive))332- config_chipset_for_pio(drive);333334 return -1;335}
···1/*2+ * linux/drivers/ide/pci/serverworks.c Version 0.9 Mar 4 20073 *4 * Copyright (C) 1998-2000 Michel Aubry5 * Copyright (C) 1998-2000 Andrzej Krzysztofowicz6 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>7+ * Copyright (C) 2007 Bartlomiej Zolnierkiewicz8 * Portions copyright (c) 2001 Sun Microsystems9 *10 *···136137 ide_hwif_t *hwif = HWIF(drive);138 struct pci_dev *dev = hwif->pci_dev;139+ u8 speed = ide_rate_filter(drive, xferspeed);140+ u8 pio = ide_get_best_pio_mode(drive, 255, 4, NULL);141 u8 unit = (drive->select.b.unit & 0x01);142 u8 csb5 = svwks_csb_check(dev);143 u8 ultra_enable = 0, ultra_timing = 0;144 u8 dma_timing = 0, pio_timing = 0;145 u16 csb5_pio = 0;00000146147 /* If we are about to put a disk into UDMA mode we screwed up.148 Our code assumes we never _ever_ do this on an OSB4 */···231 case XFER_MW_DMA_2:232 case XFER_MW_DMA_1:233 case XFER_MW_DMA_0:234+ /*235+ * TODO: always setup PIO mode so this won't be needed236+ */237 pio_timing |= pio_modes[pio];238 csb5_pio |= (pio << (4*drive->dn));239 dma_timing |= dma_modes[speed - XFER_MW_DMA_0];···242 case XFER_UDMA_2:243 case XFER_UDMA_1:244 case XFER_UDMA_0:245+ /*246+ * TODO: always setup PIO mode so this won't be needed247+ */248 pio_timing |= pio_modes[pio];249 csb5_pio |= (pio << (4*drive->dn));250 dma_timing |= dma_modes[2];···262 return (ide_config_drive_speed(drive, speed));263}26400000000000000000000000000000000000000265static void svwks_tune_drive (ide_drive_t *drive, u8 pio)266{267+ pio = ide_get_best_pio_mode(drive, pio, 4, NULL);268+ (void)svwks_tune_chipset(drive, XFER_PIO_0 + pio);0000000000000269}270271static int svwks_config_drive_xfer_rate (ide_drive_t *drive)272{273 drive->init_speed = 0;274275+ if (ide_tune_dma(drive))276 return 0;277278 if (ide_use_fast_pio(drive))279+ svwks_tune_drive(drive, 255);280281 return -1;282}
+1-23
drivers/ide/pci/siimage.c
···375}376377/**378- * config_chipset_for_dma - configure for DMA379- * @drive: drive to configure380- *381- * Called by the IDE layer when it wants the timings set up.382- * For the CMD680 we also need to set up the PIO timings and383- * enable DMA.384- */385-386-static int config_chipset_for_dma (ide_drive_t *drive)387-{388- u8 speed = ide_max_dma_mode(drive);389-390- if (!speed)391- return 0;392-393- if (siimage_tune_chipset(drive, speed))394- return 0;395-396- return ide_dma_enable(drive);397-}398-399-/**400 * siimage_configure_drive_for_dma - set up for DMA transfers401 * @drive: drive we are going to set up402 *···386387static int siimage_config_drive_for_dma (ide_drive_t *drive)388{389- if (ide_use_dma(drive) && config_chipset_for_dma(drive))390 return 0;391392 if (ide_use_fast_pio(drive))
···375}376377/**0000000000000000000000378 * siimage_configure_drive_for_dma - set up for DMA transfers379 * @drive: drive we are going to set up380 *···408409static int siimage_config_drive_for_dma (ide_drive_t *drive)410{411+ if (ide_tune_dma(drive))412 return 0;413414 if (ide_use_fast_pio(drive))
+36-49
drivers/ide/pci/sis5513.c
···1/*2- * linux/drivers/ide/pci/sis5513.c Version 0.16ac+vp Jun 18, 20033 *4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer6 * Copyright (C) 2003 Vojtech Pavlik <vojtech@suse.cz>007 * May be copied or modified under the terms of the GNU General Public License8 *9 *···450 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch);451}452453-454/* Set per-drive active and recovery time */455static void config_art_rwp_pio (ide_drive_t *drive, u8 pio)456{457 ide_hwif_t *hwif = HWIF(drive);458 struct pci_dev *dev = hwif->pci_dev;459460- u8 timing, drive_pci, test1, test2;461-462- u16 eide_pio_timing[6] = {600, 390, 240, 180, 120, 90};463- u16 xfer_pio = drive->id->eide_pio_modes;464465 config_drive_art_rwp(drive);466- pio = ide_get_best_pio_mode(drive, 255, pio, NULL);467-468- if (xfer_pio> 4)469- xfer_pio = 0;470-471- if (drive->id->eide_pio_iordy > 0) {472- for (xfer_pio = 5;473- (xfer_pio > 0) &&474- (drive->id->eide_pio_iordy > eide_pio_timing[xfer_pio]);475- xfer_pio--);476- } else {477- xfer_pio = (drive->id->eide_pio_modes & 4) ? 0x05 :478- (drive->id->eide_pio_modes & 2) ? 0x04 :479- (drive->id->eide_pio_modes & 1) ? 0x03 : xfer_pio;480- }481-482- timing = (xfer_pio >= pio) ? xfer_pio : pio;483484 /* In pre ATA_133 case, drives sit at 0x40 + 4*drive->dn */485 drive_pci = 0x40;···481 test1 &= ~0x0F;482 test2 &= ~0x07;483484- switch(timing) {485 case 4: test1 |= 0x01; test2 |= 0x03; break;486 case 3: test1 |= 0x03; test2 |= 0x03; break;487 case 2: test1 |= 0x04; test2 |= 0x04; break;488 case 1: test1 |= 0x07; test2 |= 0x06; break;0489 default: break;490 }491 pci_write_config_byte(dev, drive_pci, test1);492 pci_write_config_byte(dev, drive_pci+1, test2);493 } else if (chipset_family < ATA_133) {494- switch(timing) { /* active recovery495 v v */496 case 4: test1 = 0x30|0x01; break;497 case 3: test1 = 0x30|0x03; break;···507 pci_read_config_dword(dev, drive_pci, &test3);508 test3 &= 0xc0c00fff;509 if (test3 & 0x08) {510- test3 |= (unsigned long)ini_time_value[ATA_133][timing] << 12;511- test3 |= (unsigned long)act_time_value[ATA_133][timing] << 16;512- test3 |= (unsigned long)rco_time_value[ATA_133][timing] << 24;513 } else {514- test3 |= (unsigned long)ini_time_value[ATA_100][timing] << 12;515- test3 |= (unsigned long)act_time_value[ATA_100][timing] << 16;516- test3 |= (unsigned long)rco_time_value[ATA_100][timing] << 24;517 }518 pci_write_config_dword(dev, drive_pci, test3);519 }520}521522-static int config_chipset_for_pio (ide_drive_t *drive, u8 pio)523{524- if (pio == 255)525- pio = ide_find_best_mode(drive, XFER_PIO | XFER_EPIO) - XFER_PIO_0;526 config_art_rwp_pio(drive, pio);527- return ide_config_drive_speed(drive, XFER_PIO_0 + min_t(u8, pio, 4));00000528}529530static int sis5513_tune_chipset (ide_drive_t *drive, u8 xferspeed)···608 case XFER_SW_DMA_1:609 case XFER_SW_DMA_0:610 break;611- case XFER_PIO_4: return((int) config_chipset_for_pio(drive, 4));612- case XFER_PIO_3: return((int) config_chipset_for_pio(drive, 3));613- case XFER_PIO_2: return((int) config_chipset_for_pio(drive, 2));614- case XFER_PIO_1: return((int) config_chipset_for_pio(drive, 1));615 case XFER_PIO_0:616- default: return((int) config_chipset_for_pio(drive, 0)); 000617 }618619- return ((int) ide_config_drive_speed(drive, speed));620-}621-622-static void sis5513_tune_drive (ide_drive_t *drive, u8 pio)623-{624- (void) config_chipset_for_pio(drive, pio);625}626627static int sis5513_config_xfer_rate(ide_drive_t *drive)628{629- config_art_rwp_pio(drive, 5);000630631 drive->init_speed = 0;632···635 return 0;636637 if (ide_use_fast_pio(drive))638- sis5513_tune_drive(drive, 5);639640 return -1;641}···823 if (!hwif->irq)824 hwif->irq = hwif->channel ? 15 : 14;825826- hwif->tuneproc = &sis5513_tune_drive;827 hwif->speedproc = &sis5513_tune_chipset;828829 if (!(hwif->dma_base)) {
···1/*2+ * linux/drivers/ide/pci/sis5513.c Version 0.20 Mar 4, 20073 *4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer6 * Copyright (C) 2003 Vojtech Pavlik <vojtech@suse.cz>7+ * Copyright (C) 2007 Bartlomiej Zolnierkiewicz8+ *9 * May be copied or modified under the terms of the GNU General Public License10 *11 *···448 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch);449}4500451/* Set per-drive active and recovery time */452static void config_art_rwp_pio (ide_drive_t *drive, u8 pio)453{454 ide_hwif_t *hwif = HWIF(drive);455 struct pci_dev *dev = hwif->pci_dev;456457+ u8 drive_pci, test1, test2;000458459 config_drive_art_rwp(drive);00000000000000000460461 /* In pre ATA_133 case, drives sit at 0x40 + 4*drive->dn */462 drive_pci = 0x40;···500 test1 &= ~0x0F;501 test2 &= ~0x07;502503+ switch(pio) {504 case 4: test1 |= 0x01; test2 |= 0x03; break;505 case 3: test1 |= 0x03; test2 |= 0x03; break;506 case 2: test1 |= 0x04; test2 |= 0x04; break;507 case 1: test1 |= 0x07; test2 |= 0x06; break;508+ case 0: /* PIO0: register setting == X000 */509 default: break;510 }511 pci_write_config_byte(dev, drive_pci, test1);512 pci_write_config_byte(dev, drive_pci+1, test2);513 } else if (chipset_family < ATA_133) {514+ switch(pio) { /* active recovery515 v v */516 case 4: test1 = 0x30|0x01; break;517 case 3: test1 = 0x30|0x03; break;···525 pci_read_config_dword(dev, drive_pci, &test3);526 test3 &= 0xc0c00fff;527 if (test3 & 0x08) {528+ test3 |= ini_time_value[ATA_133][pio] << 12;529+ test3 |= act_time_value[ATA_133][pio] << 16;530+ test3 |= rco_time_value[ATA_133][pio] << 24;531 } else {532+ test3 |= ini_time_value[ATA_100][pio] << 12;533+ test3 |= act_time_value[ATA_100][pio] << 16;534+ test3 |= rco_time_value[ATA_100][pio] << 24;535 }536 pci_write_config_dword(dev, drive_pci, test3);537 }538}539540+static int sis5513_tune_drive(ide_drive_t *drive, u8 pio)541{542+ pio = ide_get_best_pio_mode(drive, pio, 4, NULL);0543 config_art_rwp_pio(drive, pio);544+ return ide_config_drive_speed(drive, XFER_PIO_0 + pio);545+}546+547+static void sis5513_tuneproc(ide_drive_t *drive, u8 pio)548+{549+ (void)sis5513_tune_drive(drive, pio);550}551552static int sis5513_tune_chipset (ide_drive_t *drive, u8 xferspeed)···622 case XFER_SW_DMA_1:623 case XFER_SW_DMA_0:624 break;625+ case XFER_PIO_4:626+ case XFER_PIO_3:627+ case XFER_PIO_2:628+ case XFER_PIO_1:629 case XFER_PIO_0:630+ return sis5513_tune_drive(drive, speed - XFER_PIO_0);631+ default:632+ BUG();633+ break;634 }635636+ return ide_config_drive_speed(drive, speed);00000637}638639static int sis5513_config_xfer_rate(ide_drive_t *drive)640{641+ /*642+ * TODO: always set PIO mode and remove this643+ */644+ sis5513_tuneproc(drive, 255);645646 drive->init_speed = 0;647···648 return 0;649650 if (ide_use_fast_pio(drive))651+ sis5513_tuneproc(drive, 255);652653 return -1;654}···836 if (!hwif->irq)837 hwif->irq = hwif->channel ? 15 : 14;838839+ hwif->tuneproc = &sis5513_tuneproc;840 hwif->speedproc = &sis5513_tune_chipset;841842 if (!(hwif->dma_base)) {
+62-14
drivers/ide/pci/sl82c105.c
···8283 pio = ide_get_best_pio_mode(drive, pio, 5, &p);8485- drive->drive_data = drv_ctrl = get_pio_timings(&p);00000008687 if (!drive->using_dma) {88 /*···107}108109/*110- * Configure the drive for DMA.111- * We'll program the chipset only when DMA is actually turned on.112 */113-static int config_for_dma(ide_drive_t *drive)114{115- DBG(("config_for_dma(drive:%s)\n", drive->name));0116117- if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0)118- return 0;119120- return ide_dma_enable(drive);00000000000000000000000000000000000000121}122123/*···165{166 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name));167168- if (ide_use_dma(drive) && config_for_dma(drive))169 return 0;170171 return -1;···264265 rc = __ide_dma_on(drive);266 if (rc == 0) {267- pci_write_config_word(dev, reg, 0x0200);268269 printk(KERN_INFO "%s: DMA enabled\n", drive->name);270 }···349 /*350 * The bridge should be part of the same device, but function 0.351 */352- bridge = pci_find_slot(dev->bus->number,353 PCI_DEVFN(PCI_SLOT(dev->devfn), 0));354 if (!bridge)355 return -1;···359 */360 if (bridge->vendor != PCI_VENDOR_ID_WINBOND ||361 bridge->device != PCI_DEVICE_ID_WINBOND_83C553 ||362- bridge->class >> 8 != PCI_CLASS_BRIDGE_ISA)0363 return -1;364-365 /*366 * We need to find function 0's revision, not function 1367 */368 pci_read_config_byte(bridge, PCI_REVISION_ID, &rev);0369370 return rev;371}···404 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index));405406 hwif->tuneproc = &sl82c105_tune_drive;0407 hwif->selectproc = &sl82c105_selectproc;408 hwif->resetproc = &sl82c105_resetproc;409···436 }437438 hwif->atapi_dma = 1;439- hwif->mwdma_mask = 0x04;440441 hwif->ide_dma_check = &sl82c105_ide_dma_check;442 hwif->ide_dma_on = &sl82c105_ide_dma_on;
···8283 pio = ide_get_best_pio_mode(drive, pio, 5, &p);8485+ drv_ctrl = get_pio_timings(&p);86+87+ /*88+ * Store the PIO timings so that we can restore them89+ * in case DMA will be turned off...90+ */91+ drive->drive_data &= 0xffff0000;92+ drive->drive_data |= drv_ctrl;9394 if (!drive->using_dma) {95 /*···100}101102/*103+ * Configure the drive and chipset for a new transfer speed.0104 */105+static int sl82c105_tune_chipset(ide_drive_t *drive, u8 speed)106{107+ static u16 mwdma_timings[] = {0x0707, 0x0201, 0x0200};108+ u16 drv_ctrl;109110+ DBG(("sl82c105_tune_chipset(drive:%s, speed:%s)\n",111+ drive->name, ide_xfer_verbose(speed)));112113+ speed = ide_rate_filter(drive, speed);114+115+ switch (speed) {116+ case XFER_MW_DMA_2:117+ case XFER_MW_DMA_1:118+ case XFER_MW_DMA_0:119+ drv_ctrl = mwdma_timings[speed - XFER_MW_DMA_0];120+121+ /*122+ * Store the DMA timings so that we can actually program123+ * them when DMA will be turned on...124+ */125+ drive->drive_data &= 0x0000ffff;126+ drive->drive_data |= (unsigned long)drv_ctrl << 16;127+128+ /*129+ * If we are already using DMA, we just reprogram130+ * the drive control register.131+ */132+ if (drive->using_dma) {133+ struct pci_dev *dev = HWIF(drive)->pci_dev;134+ int reg = 0x44 + drive->dn * 4;135+136+ pci_write_config_word(dev, reg, drv_ctrl);137+ }138+ break;139+ case XFER_PIO_5:140+ case XFER_PIO_4:141+ case XFER_PIO_3:142+ case XFER_PIO_2:143+ case XFER_PIO_1:144+ case XFER_PIO_0:145+ (void) sl82c105_tune_pio(drive, speed - XFER_PIO_0);146+ break;147+ default:148+ return -1;149+ }150+151+ return ide_config_drive_speed(drive, speed);152}153154/*···120{121 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name));122123+ if (ide_tune_dma(drive))124 return 0;125126 return -1;···219220 rc = __ide_dma_on(drive);221 if (rc == 0) {222+ pci_write_config_word(dev, reg, drive->drive_data >> 16);223224 printk(KERN_INFO "%s: DMA enabled\n", drive->name);225 }···304 /*305 * The bridge should be part of the same device, but function 0.306 */307+ bridge = pci_get_bus_and_slot(dev->bus->number,308 PCI_DEVFN(PCI_SLOT(dev->devfn), 0));309 if (!bridge)310 return -1;···314 */315 if (bridge->vendor != PCI_VENDOR_ID_WINBOND ||316 bridge->device != PCI_DEVICE_ID_WINBOND_83C553 ||317+ bridge->class >> 8 != PCI_CLASS_BRIDGE_ISA) {318+ pci_dev_put(bridge);319 return -1;320+ }321 /*322 * We need to find function 0's revision, not function 1323 */324 pci_read_config_byte(bridge, PCI_REVISION_ID, &rev);325+ pci_dev_put(bridge);326327 return rev;328}···357 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index));358359 hwif->tuneproc = &sl82c105_tune_drive;360+ hwif->speedproc = &sl82c105_tune_chipset;361 hwif->selectproc = &sl82c105_selectproc;362 hwif->resetproc = &sl82c105_resetproc;363···388 }389390 hwif->atapi_dma = 1;391+ hwif->mwdma_mask = 0x07;392393 hwif->ide_dma_check = &sl82c105_ide_dma_check;394 hwif->ide_dma_on = &sl82c105_ide_dma_on;
+1
drivers/input/joystick/Kconfig
···255256config JOYSTICK_XPAD257 tristate "X-Box gamepad support"0258 select USB259 help260 Say Y here if you want to use the X-Box pad with your computer.
···255256config JOYSTICK_XPAD257 tristate "X-Box gamepad support"258+ depends on USB_ARCH_HAS_HCD259 select USB260 help261 Say Y here if you want to use the X-Box pad with your computer.
+5
drivers/input/misc/Kconfig
···8485config INPUT_ATI_REMOTE86 tristate "ATI / X10 USB RF remote control"087 select USB88 help89 Say Y here if you want to use an ATI or X10 "Lola" USB remote control.···100101config INPUT_ATI_REMOTE2102 tristate "ATI / Philips USB RF remote control"0103 select USB104 help105 Say Y here if you want to use an ATI or Philips USB RF remote control.···116config INPUT_KEYSPAN_REMOTE117 tristate "Keyspan DMR USB remote control (EXPERIMENTAL)"118 depends on EXPERIMENTAL0119 select USB120 help121 Say Y here if you want to use a Keyspan DMR USB remote control.···131132config INPUT_POWERMATE133 tristate "Griffin PowerMate and Contour Jog support"0134 select USB135 help136 Say Y here if you want to use Griffin PowerMate or Contour Jog devices.···148config INPUT_YEALINK149 tristate "Yealink usb-p1k voip phone"150 depends EXPERIMENTAL0151 select USB152 help153 Say Y here if you want to enable keyboard and LCD functions of the
···8485config INPUT_ATI_REMOTE86 tristate "ATI / X10 USB RF remote control"87+ depends on USB_ARCH_HAS_HCD88 select USB89 help90 Say Y here if you want to use an ATI or X10 "Lola" USB remote control.···99100config INPUT_ATI_REMOTE2101 tristate "ATI / Philips USB RF remote control"102+ depends on USB_ARCH_HAS_HCD103 select USB104 help105 Say Y here if you want to use an ATI or Philips USB RF remote control.···114config INPUT_KEYSPAN_REMOTE115 tristate "Keyspan DMR USB remote control (EXPERIMENTAL)"116 depends on EXPERIMENTAL117+ depends on USB_ARCH_HAS_HCD118 select USB119 help120 Say Y here if you want to use a Keyspan DMR USB remote control.···128129config INPUT_POWERMATE130 tristate "Griffin PowerMate and Contour Jog support"131+ depends on USB_ARCH_HAS_HCD132 select USB133 help134 Say Y here if you want to use Griffin PowerMate or Contour Jog devices.···144config INPUT_YEALINK145 tristate "Yealink usb-p1k voip phone"146 depends EXPERIMENTAL147+ depends on USB_ARCH_HAS_HCD148 select USB149 help150 Say Y here if you want to enable keyboard and LCD functions of the
+1
drivers/input/mouse/Kconfig
···111112config MOUSE_APPLETOUCH113 tristate "Apple USB Touchpad support"0114 select USB115 help116 Say Y here if you want to use an Apple USB Touchpad.
···111112config MOUSE_APPLETOUCH113 tristate "Apple USB Touchpad support"114+ depends on USB_ARCH_HAS_HCD115 select USB116 help117 Say Y here if you want to use an Apple USB Touchpad.
+4
drivers/input/tablet/Kconfig
···1314config TABLET_USB_ACECAD15 tristate "Acecad Flair tablet support (USB)"016 select USB17 help18 Say Y here if you want to use the USB version of the Acecad Flair···2627config TABLET_USB_AIPTEK28 tristate "Aiptek 6000U/8000U tablet support (USB)"029 select USB30 help31 Say Y here if you want to use the USB version of the Aiptek 6000U···5152config TABLET_USB_KBTAB53 tristate "KB Gear JamStudio tablet support (USB)"054 select USB55 help56 Say Y here if you want to use the USB version of the KB Gear···6465config TABLET_USB_WACOM66 tristate "Wacom Intuos/Graphire tablet support (USB)"067 select USB68 help69 Say Y here if you want to use the USB version of the Wacom Intuos
···1314config TABLET_USB_ACECAD15 tristate "Acecad Flair tablet support (USB)"16+ depends on USB_ARCH_HAS_HCD17 select USB18 help19 Say Y here if you want to use the USB version of the Acecad Flair···2526config TABLET_USB_AIPTEK27 tristate "Aiptek 6000U/8000U tablet support (USB)"28+ depends on USB_ARCH_HAS_HCD29 select USB30 help31 Say Y here if you want to use the USB version of the Aiptek 6000U···4950config TABLET_USB_KBTAB51 tristate "KB Gear JamStudio tablet support (USB)"52+ depends on USB_ARCH_HAS_HCD53 select USB54 help55 Say Y here if you want to use the USB version of the KB Gear···6162config TABLET_USB_WACOM63 tristate "Wacom Intuos/Graphire tablet support (USB)"64+ depends on USB_ARCH_HAS_HCD65 select USB66 help67 Say Y here if you want to use the USB version of the Wacom Intuos
···1/*2- * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.3 *4 * Author: Shlomi Gridish <gridish@freescale.com>5 * Li Yang <leoli@freescale.com>···37373738const struct ethtool_ops ucc_geth_ethtool_ops = { };37393740-static phy_interface_t to_phy_interface(const char *interface_type)3741{3742- if (strcasecmp(interface_type, "mii") == 0)3743 return PHY_INTERFACE_MODE_MII;3744- if (strcasecmp(interface_type, "gmii") == 0)3745 return PHY_INTERFACE_MODE_GMII;3746- if (strcasecmp(interface_type, "tbi") == 0)3747 return PHY_INTERFACE_MODE_TBI;3748- if (strcasecmp(interface_type, "rmii") == 0)3749 return PHY_INTERFACE_MODE_RMII;3750- if (strcasecmp(interface_type, "rgmii") == 0)3751 return PHY_INTERFACE_MODE_RGMII;3752- if (strcasecmp(interface_type, "rgmii-id") == 0)3753 return PHY_INTERFACE_MODE_RGMII_ID;3754- if (strcasecmp(interface_type, "rtbi") == 0)3755 return PHY_INTERFACE_MODE_RTBI;37563757 return PHY_INTERFACE_MODE_MII;···3819 ug_info->phy_address = *prop;38203821 /* get the phy interface type, or default to MII */3822- prop = of_get_property(np, "interface-type", NULL);3823 if (!prop) {3824 /* handle interface property present in old trees */3825 prop = of_get_property(phy, "interface", NULL);3826- if (prop != NULL)3827 phy_interface = enet_to_phy_interface[*prop];3828- else03829 phy_interface = PHY_INTERFACE_MODE_MII;3830 } else {3831 phy_interface = to_phy_interface((const char *)prop);3832 }38333834- /* get speed, or derive from interface */3835- prop = of_get_property(np, "max-speed", NULL);3836- if (!prop) {3837- /* handle interface property present in old trees */3838- prop = of_get_property(phy, "interface", NULL);3839- if (prop != NULL)3840- max_speed = enet_to_speed[*prop];3841- } else {3842- max_speed = *prop;3843- }3844- if (!max_speed) {3845 switch (phy_interface) {3846 case PHY_INTERFACE_MODE_GMII:3847 case PHY_INTERFACE_MODE_RGMII:···3846 max_speed = SPEED_100;3847 break;3848 }3849- }38503851 if (max_speed == SPEED_1000) {03852 ug_info->uf_info.urfs = UCC_GETH_URFS_GIGA_INIT;3853 ug_info->uf_info.urfet = UCC_GETH_URFET_GIGA_INIT;3854 ug_info->uf_info.urfset = UCC_GETH_URFSET_GIGA_INIT;
···1/*2+ * Copyright (C) 2006-2007 Freescale Semicondutor, Inc. All rights reserved.3 *4 * Author: Shlomi Gridish <gridish@freescale.com>5 * Li Yang <leoli@freescale.com>···37373738const struct ethtool_ops ucc_geth_ethtool_ops = { };37393740+static phy_interface_t to_phy_interface(const char *phy_connection_type)3741{3742+ if (strcasecmp(phy_connection_type, "mii") == 0)3743 return PHY_INTERFACE_MODE_MII;3744+ if (strcasecmp(phy_connection_type, "gmii") == 0)3745 return PHY_INTERFACE_MODE_GMII;3746+ if (strcasecmp(phy_connection_type, "tbi") == 0)3747 return PHY_INTERFACE_MODE_TBI;3748+ if (strcasecmp(phy_connection_type, "rmii") == 0)3749 return PHY_INTERFACE_MODE_RMII;3750+ if (strcasecmp(phy_connection_type, "rgmii") == 0)3751 return PHY_INTERFACE_MODE_RGMII;3752+ if (strcasecmp(phy_connection_type, "rgmii-id") == 0)3753 return PHY_INTERFACE_MODE_RGMII_ID;3754+ if (strcasecmp(phy_connection_type, "rtbi") == 0)3755 return PHY_INTERFACE_MODE_RTBI;37563757 return PHY_INTERFACE_MODE_MII;···3819 ug_info->phy_address = *prop;38203821 /* get the phy interface type, or default to MII */3822+ prop = of_get_property(np, "phy-connection-type", NULL);3823 if (!prop) {3824 /* handle interface property present in old trees */3825 prop = of_get_property(phy, "interface", NULL);3826+ if (prop != NULL) {3827 phy_interface = enet_to_phy_interface[*prop];3828+ max_speed = enet_to_speed[*prop];3829+ } else3830 phy_interface = PHY_INTERFACE_MODE_MII;3831 } else {3832 phy_interface = to_phy_interface((const char *)prop);3833 }38343835+ /* get speed, or derive from PHY interface */3836+ if (max_speed == 0)0000000003837 switch (phy_interface) {3838 case PHY_INTERFACE_MODE_GMII:3839 case PHY_INTERFACE_MODE_RGMII:···3854 max_speed = SPEED_100;3855 break;3856 }038573858 if (max_speed == SPEED_1000) {3859+ /* configure muram FIFOs for gigabit operation */3860 ug_info->uf_info.urfs = UCC_GETH_URFS_GIGA_INIT;3861 ug_info->uf_info.urfet = UCC_GETH_URFET_GIGA_INIT;3862 ug_info->uf_info.urfset = UCC_GETH_URFSET_GIGA_INIT;
+5-4
drivers/net/ucc_geth_mii.c
···1/*2 * drivers/net/ucc_geth_mii.c3 *4- * Gianfar Ethernet Driver -- MIIM bus implementation5- * Provides Bus interface for MIIM regs6 *7- * Author: Li Yang8 *9- * Copyright (c) 2002-2004 Freescale Semiconductor, Inc.010 *11 * This program is free software; you can redistribute it and/or modify it12 * under the terms of the GNU General Public License as published by the
···1/*2 * drivers/net/ucc_geth_mii.c3 *4+ * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation5+ * Provides Bus interface for MII Management regs in the UCC register space6 *7+ * Copyright (C) 2007 Freescale Semiconductor, Inc.8 *9+ * Authors: Li Yang <leoli@freescale.com>10+ * Kim Phillips <kim.phillips@freescale.com>11 *12 * This program is free software; you can redistribute it and/or modify it13 * under the terms of the GNU General Public License as published by the
+5-5
drivers/net/ucc_geth_mii.h
···1/*2 * drivers/net/ucc_geth_mii.h3 *4- * Gianfar Ethernet Driver -- MII Management Bus Implementation5- * Driver for the MDIO bus controller in the Gianfar register space6 *7- * Author: Andy Fleming8- * Maintainer: Kumar Gala9 *10- * Copyright (c) 2002-2004 Freescale Semiconductor, Inc.011 *12 * This program is free software; you can redistribute it and/or modify it13 * under the terms of the GNU General Public License as published by the
···1/*2 * drivers/net/ucc_geth_mii.h3 *4+ * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation5+ * Provides Bus interface for MII Management regs in the UCC register space6 *7+ * Copyright (C) 2007 Freescale Semiconductor, Inc.08 *9+ * Authors: Li Yang <leoli@freescale.com>10+ * Kim Phillips <kim.phillips@freescale.com>11 *12 * This program is free software; you can redistribute it and/or modify it13 * under the terms of the GNU General Public License as published by the