Merge branch 'master' of /home/trondmy/kernel/linux-2.6/

+741 -958
+2
arch/arm/kernel/stacktrace.c
··· 1 #include <linux/sched.h> 2 #include <linux/stacktrace.h> 3 ··· 31 32 return 0; 33 } 34 35 #ifdef CONFIG_STACKTRACE 36 struct stack_trace_data {
··· 1 + #include <linux/module.h> 2 #include <linux/sched.h> 3 #include <linux/stacktrace.h> 4 ··· 30 31 return 0; 32 } 33 + EXPORT_SYMBOL(walk_stackframe); 34 35 #ifdef CONFIG_STACKTRACE 36 struct stack_trace_data {
+3 -6
arch/i386/mm/discontig.c
··· 31 #include <linux/module.h> 32 #include <linux/kexec.h> 33 #include <linux/pfn.h> 34 35 #include <asm/e820.h> 36 #include <asm/setup.h> ··· 98 #endif 99 100 extern unsigned long find_max_low_pfn(void); 101 - extern void find_max_pfn(void); 102 extern void add_one_highpage_init(struct page *, int, int); 103 - 104 - extern struct e820map e820; 105 extern unsigned long highend_pfn, highstart_pfn; 106 - extern unsigned long max_low_pfn; 107 - extern unsigned long totalram_pages; 108 - extern unsigned long totalhigh_pages; 109 110 #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) 111 ··· 355 max_zone_pfns[ZONE_DMA] = 356 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; 357 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 358 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; 359 360 /* If SRAT has not registered memory, register it now */ 361 if (find_max_pfn_with_active_regions() == 0) {
··· 31 #include <linux/module.h> 32 #include <linux/kexec.h> 33 #include <linux/pfn.h> 34 + #include <linux/swap.h> 35 36 #include <asm/e820.h> 37 #include <asm/setup.h> ··· 97 #endif 98 99 extern unsigned long find_max_low_pfn(void); 100 extern void add_one_highpage_init(struct page *, int, int); 101 extern unsigned long highend_pfn, highstart_pfn; 102 103 #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) 104 ··· 360 max_zone_pfns[ZONE_DMA] = 361 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; 362 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 363 + #ifdef CONFIG_HIGHMEM 364 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; 365 + #endif 366 367 /* If SRAT has not registered memory, register it now */ 368 if (find_max_pfn_with_active_regions() == 0) {
+3
arch/sh64/Kconfig
··· 17 bool 18 default y 19 20 config RWSEM_GENERIC_SPINLOCK 21 bool 22 default y
··· 17 bool 18 default y 19 20 + config QUICKLIST 21 + def_bool y 22 + 23 config RWSEM_GENERIC_SPINLOCK 24 bool 25 default y
+123 -80
arch/sh64/configs/cayman_defconfig
··· 1 # 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.18 4 - # Tue Oct 3 13:30:51 2006 5 # 6 CONFIG_SUPERH=y 7 CONFIG_SUPERH64=y ··· 10 CONFIG_GENERIC_FIND_NEXT_BIT=y 11 CONFIG_GENERIC_HWEIGHT=y 12 CONFIG_GENERIC_CALIBRATE_DELAY=y 13 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 14 15 # ··· 35 # CONFIG_UTS_NS is not set 36 # CONFIG_AUDIT is not set 37 # CONFIG_IKCONFIG is not set 38 # CONFIG_RELAY is not set 39 - CONFIG_INITRAMFS_SOURCE="" 40 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 41 CONFIG_SYSCTL=y 42 # CONFIG_EMBEDDED is not set 43 CONFIG_UID16=y 44 - # CONFIG_SYSCTL_SYSCALL is not set 45 CONFIG_KALLSYMS=y 46 # CONFIG_KALLSYMS_ALL is not set 47 # CONFIG_KALLSYMS_EXTRA_PASS is not set ··· 53 CONFIG_ELF_CORE=y 54 CONFIG_BASE_FULL=y 55 CONFIG_FUTEX=y 56 CONFIG_EPOLL=y 57 CONFIG_SHMEM=y 58 - CONFIG_SLAB=y 59 CONFIG_VM_EVENT_COUNTERS=y 60 CONFIG_RT_MUTEXES=y 61 # CONFIG_TINY_SHMEM is not set 62 CONFIG_BASE_SMALL=0 63 - # CONFIG_SLOB is not set 64 65 # 66 # Loadable module support ··· 144 # 145 CONFIG_HEARTBEAT=y 146 CONFIG_HDSP253_LED=y 147 - CONFIG_SH_DMA=y 148 CONFIG_PREEMPT=y 149 CONFIG_SELECT_MEMORY_MODEL=y 150 CONFIG_FLATMEM_MANUAL=y ··· 155 # CONFIG_SPARSEMEM_STATIC is not set 156 CONFIG_SPLIT_PTLOCK_CPUS=4 157 # CONFIG_RESOURCES_64BIT is not set 158 159 # 160 # Bus options (PCI, PCMCIA, EISA, MCA, ISA) 161 # 162 CONFIG_PCI=y 163 CONFIG_SH_PCIDMA_NONCOHERENT=y 164 - # CONFIG_PCI_MULTITHREAD_PROBE is not set 165 # CONFIG_PCI_DEBUG is not set 166 167 # 168 # PCCARD (PCMCIA/CardBus) support 169 # 170 # CONFIG_PCCARD is not set 171 - 172 - # 173 - # PCI Hotplug Support 174 - # 175 # CONFIG_HOTPLUG_PCI is not set 176 177 # ··· 186 # 187 # Networking options 188 # 189 - # CONFIG_NETDEBUG is not set 190 CONFIG_PACKET=y 191 # CONFIG_PACKET_MMAP is not set 192 CONFIG_UNIX=y 193 CONFIG_XFRM=y 194 # CONFIG_XFRM_USER is not set 195 # CONFIG_XFRM_SUB_POLICY is not set 196 # CONFIG_NET_KEY is not set 197 CONFIG_INET=y 198 # CONFIG_IP_MULTICAST is not set ··· 213 # CONFIG_INET_TUNNEL is not set 214 CONFIG_INET_XFRM_MODE_TRANSPORT=y 215 CONFIG_INET_XFRM_MODE_TUNNEL=y 216 CONFIG_INET_DIAG=y 217 CONFIG_INET_TCP_DIAG=y 218 # CONFIG_TCP_CONG_ADVANCED is not set 219 CONFIG_TCP_CONG_CUBIC=y 220 CONFIG_DEFAULT_TCP_CONG="cubic" 221 # CONFIG_IPV6 is not set 222 # CONFIG_INET6_XFRM_TUNNEL is not set 223 # CONFIG_INET6_TUNNEL is not set ··· 264 # CONFIG_HAMRADIO is not set 265 # CONFIG_IRDA is not set 266 # CONFIG_BT is not set 267 # CONFIG_IEEE80211 is not set 268 269 # 270 # Device Drivers ··· 286 CONFIG_PREVENT_FIRMWARE_BUILD=y 287 # CONFIG_FW_LOADER is not set 288 # CONFIG_DEBUG_DRIVER is not set 289 # CONFIG_SYS_HYPERVISOR is not set 290 291 # 292 # Connector - unified userspace <-> kernelspace linker 293 # 294 # CONFIG_CONNECTOR is not set 295 - 296 - # 297 - # Memory Technology Devices (MTD) 298 - # 299 # CONFIG_MTD is not set 300 301 # ··· 303 # 304 # Plug and Play support 305 # 306 307 # 308 # Block devices ··· 321 CONFIG_BLK_DEV_RAM_COUNT=16 322 CONFIG_BLK_DEV_RAM_SIZE=4096 323 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 324 - # CONFIG_BLK_DEV_INITRD is not set 325 # CONFIG_CDROM_PKTCDVD is not set 326 # CONFIG_ATA_OVER_ETH is not set 327 328 # 329 # ATA/ATAPI/MFM/RLL support ··· 342 # 343 # CONFIG_RAID_ATTRS is not set 344 CONFIG_SCSI=y 345 # CONFIG_SCSI_NETLINK is not set 346 CONFIG_SCSI_PROC_FS=y 347 ··· 362 CONFIG_SCSI_MULTI_LUN=y 363 # CONFIG_SCSI_CONSTANTS is not set 364 # CONFIG_SCSI_LOGGING is not set 365 366 # 367 # SCSI Transports ··· 402 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 403 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 404 CONFIG_SCSI_SYM53C8XX_MMIO=y 405 - # CONFIG_SCSI_IPR is not set 406 # CONFIG_SCSI_QLOGIC_1280 is not set 407 # CONFIG_SCSI_QLA_FC is not set 408 # CONFIG_SCSI_LPFC is not set 409 # CONFIG_SCSI_DC395x is not set 410 # CONFIG_SCSI_DC390T is not set 411 # CONFIG_SCSI_NSP32 is not set 412 # CONFIG_SCSI_DEBUG is not set 413 - 414 - # 415 - # Serial ATA (prod) and Parallel ATA (experimental) drivers 416 - # 417 # CONFIG_ATA is not set 418 419 # ··· 430 # 431 # IEEE 1394 (FireWire) support 432 # 433 # CONFIG_IEEE1394 is not set 434 435 # ··· 451 # ARCnet devices 452 # 453 # CONFIG_ARCNET is not set 454 - 455 - # 456 - # PHY device support 457 - # 458 # CONFIG_PHYLIB is not set 459 460 # ··· 498 # CONFIG_SUNDANCE is not set 499 # CONFIG_TLAN is not set 500 # CONFIG_VIA_RHINE is not set 501 - 502 - # 503 - # Ethernet (1000 Mbit) 504 - # 505 # CONFIG_ACENIC is not set 506 # CONFIG_DL2K is not set 507 # CONFIG_E1000 is not set ··· 515 # CONFIG_TIGON3 is not set 516 # CONFIG_BNX2 is not set 517 # CONFIG_QLA3XXX is not set 518 - 519 - # 520 - # Ethernet (10000 Mbit) 521 - # 522 # CONFIG_CHELSIO_T1 is not set 523 # CONFIG_IXGB is not set 524 # CONFIG_S2IO is not set 525 # CONFIG_MYRI10GE is not set 526 527 # 528 # Token Ring devices ··· 532 # CONFIG_TR is not set 533 534 # 535 - # Wireless LAN (non-hamradio) 536 # 537 - # CONFIG_NET_RADIO is not set 538 - 539 - # 540 - # Wan interfaces 541 - # 542 # CONFIG_WAN is not set 543 # CONFIG_FDDI is not set 544 # CONFIG_HIPPI is not set ··· 587 # CONFIG_KEYBOARD_STOWAWAY is not set 588 CONFIG_INPUT_MOUSE=y 589 CONFIG_MOUSE_PS2=y 590 # CONFIG_MOUSE_SERIAL is not set 591 # CONFIG_MOUSE_VSXXXAA is not set 592 # CONFIG_INPUT_JOYSTICK is not set 593 # CONFIG_INPUT_TOUCHSCREEN is not set 594 # CONFIG_INPUT_MISC is not set 595 ··· 643 # IPMI 644 # 645 # CONFIG_IPMI_HANDLER is not set 646 - 647 - # 648 - # Watchdog Cards 649 - # 650 CONFIG_WATCHDOG=y 651 # CONFIG_WATCHDOG_NOWAYOUT is not set 652 ··· 659 # CONFIG_WDTPCI is not set 660 CONFIG_HW_RANDOM=y 661 # CONFIG_GEN_RTC is not set 662 - # CONFIG_DTLK is not set 663 # CONFIG_R3964 is not set 664 # CONFIG_APPLICOM is not set 665 - 666 - # 667 - # Ftape, the floppy tape device driver 668 - # 669 # CONFIG_DRM is not set 670 # CONFIG_RAW_DRIVER is not set 671 ··· 668 # TPM devices 669 # 670 # CONFIG_TCG_TPM is not set 671 - # CONFIG_TELCLOCK is not set 672 - 673 - # 674 - # I2C support 675 - # 676 # CONFIG_I2C is not set 677 678 # ··· 680 # 681 # Dallas's 1-wire bus 682 # 683 - 684 - # 685 - # Hardware Monitoring support 686 - # 687 CONFIG_HWMON=y 688 # CONFIG_HWMON_VID is not set 689 # CONFIG_SENSORS_ABITUGURU is not set 690 # CONFIG_SENSORS_F71805F is not set 691 # CONFIG_SENSORS_VT1211 is not set 692 # CONFIG_HWMON_DEBUG_CHIP is not set 693 694 # 695 - # Misc devices 696 # 697 698 # 699 # Multimedia devices 700 # 701 # CONFIG_VIDEO_DEV is not set 702 - CONFIG_VIDEO_V4L2=y 703 - 704 - # 705 - # Digital Video Broadcasting Devices 706 - # 707 - # CONFIG_DVB is not set 708 709 # 710 # Graphics support 711 # 712 - CONFIG_FIRMWARE_EDID=y 713 CONFIG_FB=y 714 CONFIG_FB_CFB_FILLRECT=y 715 CONFIG_FB_CFB_COPYAREA=y 716 CONFIG_FB_CFB_IMAGEBLIT=y 717 # CONFIG_FB_MACMODES is not set 718 # CONFIG_FB_BACKLIGHT is not set 719 CONFIG_FB_MODE_HELPERS=y 720 # CONFIG_FB_TILEBLITTING is not set 721 # CONFIG_FB_CIRRUS is not set 722 # CONFIG_FB_PM2 is not set 723 # CONFIG_FB_CYBER2000 is not set ··· 747 # CONFIG_FB_RADEON is not set 748 # CONFIG_FB_ATY128 is not set 749 # CONFIG_FB_ATY is not set 750 # CONFIG_FB_SAVAGE is not set 751 # CONFIG_FB_SIS is not set 752 # CONFIG_FB_NEOMAGIC is not set 753 CONFIG_FB_KYRO=y 754 # CONFIG_FB_3DFX is not set 755 # CONFIG_FB_VOODOO1 is not set 756 # CONFIG_FB_TRIDENT is not set 757 # CONFIG_FB_VIRTUAL is not set 758 759 # ··· 777 # CONFIG_FONT_SUN8x16 is not set 778 # CONFIG_FONT_SUN12x22 is not set 779 # CONFIG_FONT_10x18 is not set 780 - 781 - # 782 - # Logo configuration 783 - # 784 CONFIG_LOGO=y 785 # CONFIG_LOGO_LINUX_MONO is not set 786 # CONFIG_LOGO_LINUX_VGA16 is not set ··· 784 # CONFIG_LOGO_SUPERH_MONO is not set 785 # CONFIG_LOGO_SUPERH_VGA16 is not set 786 CONFIG_LOGO_SUPERH_CLUT224=y 787 - # CONFIG_BACKLIGHT_LCD_SUPPORT is not set 788 789 # 790 # Sound 791 # 792 # CONFIG_SOUND is not set 793 794 # 795 # USB support ··· 812 # USB Gadget Support 813 # 814 # CONFIG_USB_GADGET is not set 815 - 816 - # 817 - # MMC/SD Card support 818 - # 819 # CONFIG_MMC is not set 820 821 # ··· 864 CONFIG_EXT3_FS_XATTR=y 865 # CONFIG_EXT3_FS_POSIX_ACL is not set 866 # CONFIG_EXT3_FS_SECURITY is not set 867 CONFIG_JBD=y 868 # CONFIG_JBD_DEBUG is not set 869 CONFIG_FS_MBCACHE=y ··· 872 # CONFIG_JFS_FS is not set 873 # CONFIG_FS_POSIX_ACL is not set 874 # CONFIG_XFS_FS is not set 875 # CONFIG_OCFS2_FS is not set 876 CONFIG_MINIX_FS=y 877 CONFIG_ROMFS_FS=y ··· 942 CONFIG_LOCKD_V4=y 943 CONFIG_NFS_COMMON=y 944 CONFIG_SUNRPC=y 945 # CONFIG_RPCSEC_GSS_KRB5 is not set 946 # CONFIG_RPCSEC_GSS_SPKM3 is not set 947 # CONFIG_SMB_FS is not set ··· 972 # CONFIG_SUN_PARTITION is not set 973 # CONFIG_KARMA_PARTITION is not set 974 # CONFIG_EFI_PARTITION is not set 975 976 # 977 # Native Language Support 978 # 979 # CONFIG_NLS is not set 980 981 # 982 # Profiling support ··· 996 CONFIG_ENABLE_MUST_CHECK=y 997 CONFIG_MAGIC_SYSRQ=y 998 # CONFIG_UNUSED_SYMBOLS is not set 999 CONFIG_DEBUG_KERNEL=y 1000 - CONFIG_LOG_BUF_SHIFT=14 1001 CONFIG_DETECT_SOFTLOCKUP=y 1002 CONFIG_SCHEDSTATS=y 1003 # CONFIG_DEBUG_SLAB is not set 1004 # CONFIG_DEBUG_RT_MUTEXES is not set 1005 # CONFIG_RT_MUTEX_TESTER is not set 1006 # CONFIG_DEBUG_SPINLOCK is not set 1007 # CONFIG_DEBUG_MUTEXES is not set 1008 - # CONFIG_DEBUG_RWSEMS is not set 1009 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1010 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1011 # CONFIG_DEBUG_KOBJECT is not set 1012 CONFIG_DEBUG_BUGVERBOSE=y 1013 # CONFIG_DEBUG_INFO is not set 1014 - CONFIG_DEBUG_FS=y 1015 # CONFIG_DEBUG_VM is not set 1016 # CONFIG_DEBUG_LIST is not set 1017 CONFIG_FRAME_POINTER=y 1018 - # CONFIG_UNWIND_INFO is not set 1019 CONFIG_FORCED_INLINING=y 1020 # CONFIG_RCU_TORTURE_TEST is not set 1021 # CONFIG_EARLY_PRINTK is not set 1022 # CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set 1023 CONFIG_SH64_PROC_TLB=y ··· 1042 # 1043 # Library routines 1044 # 1045 # CONFIG_CRC_CCITT is not set 1046 # CONFIG_CRC16 is not set 1047 CONFIG_CRC32=y 1048 # CONFIG_LIBCRC32C is not set 1049 CONFIG_PLIST=y 1050 CONFIG_GENERIC_HARDIRQS=y 1051 CONFIG_GENERIC_IRQ_PROBE=y
··· 1 # 2 # Automatically generated make config: don't edit 3 + # Linux kernel version: 2.6.22-rc1 4 + # Mon May 14 08:43:31 2007 5 # 6 CONFIG_SUPERH=y 7 CONFIG_SUPERH64=y ··· 10 CONFIG_GENERIC_FIND_NEXT_BIT=y 11 CONFIG_GENERIC_HWEIGHT=y 12 CONFIG_GENERIC_CALIBRATE_DELAY=y 13 + # CONFIG_ARCH_HAS_ILOG2_U32 is not set 14 + # CONFIG_ARCH_HAS_ILOG2_U64 is not set 15 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 16 17 # ··· 33 # CONFIG_UTS_NS is not set 34 # CONFIG_AUDIT is not set 35 # CONFIG_IKCONFIG is not set 36 + CONFIG_LOG_BUF_SHIFT=14 37 + CONFIG_SYSFS_DEPRECATED=y 38 # CONFIG_RELAY is not set 39 + # CONFIG_BLK_DEV_INITRD is not set 40 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 41 CONFIG_SYSCTL=y 42 # CONFIG_EMBEDDED is not set 43 CONFIG_UID16=y 44 + CONFIG_SYSCTL_SYSCALL=y 45 CONFIG_KALLSYMS=y 46 # CONFIG_KALLSYMS_ALL is not set 47 # CONFIG_KALLSYMS_EXTRA_PASS is not set ··· 49 CONFIG_ELF_CORE=y 50 CONFIG_BASE_FULL=y 51 CONFIG_FUTEX=y 52 + CONFIG_ANON_INODES=y 53 CONFIG_EPOLL=y 54 + CONFIG_SIGNALFD=y 55 + CONFIG_TIMERFD=y 56 + CONFIG_EVENTFD=y 57 CONFIG_SHMEM=y 58 CONFIG_VM_EVENT_COUNTERS=y 59 + CONFIG_SLAB=y 60 + # CONFIG_SLUB is not set 61 + # CONFIG_SLOB is not set 62 CONFIG_RT_MUTEXES=y 63 # CONFIG_TINY_SHMEM is not set 64 CONFIG_BASE_SMALL=0 65 66 # 67 # Loadable module support ··· 135 # 136 CONFIG_HEARTBEAT=y 137 CONFIG_HDSP253_LED=y 138 + # CONFIG_SH_DMA is not set 139 CONFIG_PREEMPT=y 140 CONFIG_SELECT_MEMORY_MODEL=y 141 CONFIG_FLATMEM_MANUAL=y ··· 146 # CONFIG_SPARSEMEM_STATIC is not set 147 CONFIG_SPLIT_PTLOCK_CPUS=4 148 # CONFIG_RESOURCES_64BIT is not set 149 + CONFIG_ZONE_DMA_FLAG=0 150 151 # 152 # Bus options (PCI, PCMCIA, EISA, MCA, ISA) 153 # 154 CONFIG_PCI=y 155 CONFIG_SH_PCIDMA_NONCOHERENT=y 156 + # CONFIG_ARCH_SUPPORTS_MSI is not set 157 # CONFIG_PCI_DEBUG is not set 158 159 # 160 # PCCARD (PCMCIA/CardBus) support 161 # 162 # CONFIG_PCCARD is not set 163 # CONFIG_HOTPLUG_PCI is not set 164 165 # ··· 180 # 181 # Networking options 182 # 183 CONFIG_PACKET=y 184 # CONFIG_PACKET_MMAP is not set 185 CONFIG_UNIX=y 186 CONFIG_XFRM=y 187 # CONFIG_XFRM_USER is not set 188 # CONFIG_XFRM_SUB_POLICY is not set 189 + # CONFIG_XFRM_MIGRATE is not set 190 # CONFIG_NET_KEY is not set 191 CONFIG_INET=y 192 # CONFIG_IP_MULTICAST is not set ··· 207 # CONFIG_INET_TUNNEL is not set 208 CONFIG_INET_XFRM_MODE_TRANSPORT=y 209 CONFIG_INET_XFRM_MODE_TUNNEL=y 210 + CONFIG_INET_XFRM_MODE_BEET=y 211 CONFIG_INET_DIAG=y 212 CONFIG_INET_TCP_DIAG=y 213 # CONFIG_TCP_CONG_ADVANCED is not set 214 CONFIG_TCP_CONG_CUBIC=y 215 CONFIG_DEFAULT_TCP_CONG="cubic" 216 + # CONFIG_TCP_MD5SIG is not set 217 # CONFIG_IPV6 is not set 218 # CONFIG_INET6_XFRM_TUNNEL is not set 219 # CONFIG_INET6_TUNNEL is not set ··· 256 # CONFIG_HAMRADIO is not set 257 # CONFIG_IRDA is not set 258 # CONFIG_BT is not set 259 + # CONFIG_AF_RXRPC is not set 260 + 261 + # 262 + # Wireless 263 + # 264 + # CONFIG_CFG80211 is not set 265 + # CONFIG_WIRELESS_EXT is not set 266 + # CONFIG_MAC80211 is not set 267 # CONFIG_IEEE80211 is not set 268 + # CONFIG_RFKILL is not set 269 270 # 271 # Device Drivers ··· 269 CONFIG_PREVENT_FIRMWARE_BUILD=y 270 # CONFIG_FW_LOADER is not set 271 # CONFIG_DEBUG_DRIVER is not set 272 + # CONFIG_DEBUG_DEVRES is not set 273 # CONFIG_SYS_HYPERVISOR is not set 274 275 # 276 # Connector - unified userspace <-> kernelspace linker 277 # 278 # CONFIG_CONNECTOR is not set 279 # CONFIG_MTD is not set 280 281 # ··· 289 # 290 # Plug and Play support 291 # 292 + # CONFIG_PNPACPI is not set 293 294 # 295 # Block devices ··· 306 CONFIG_BLK_DEV_RAM_COUNT=16 307 CONFIG_BLK_DEV_RAM_SIZE=4096 308 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 309 # CONFIG_CDROM_PKTCDVD is not set 310 # CONFIG_ATA_OVER_ETH is not set 311 + 312 + # 313 + # Misc devices 314 + # 315 + # CONFIG_PHANTOM is not set 316 + # CONFIG_SGI_IOC4 is not set 317 + # CONFIG_TIFM_CORE is not set 318 + # CONFIG_BLINK is not set 319 320 # 321 # ATA/ATAPI/MFM/RLL support ··· 320 # 321 # CONFIG_RAID_ATTRS is not set 322 CONFIG_SCSI=y 323 + # CONFIG_SCSI_TGT is not set 324 # CONFIG_SCSI_NETLINK is not set 325 CONFIG_SCSI_PROC_FS=y 326 ··· 339 CONFIG_SCSI_MULTI_LUN=y 340 # CONFIG_SCSI_CONSTANTS is not set 341 # CONFIG_SCSI_LOGGING is not set 342 + # CONFIG_SCSI_SCAN_ASYNC is not set 343 344 # 345 # SCSI Transports ··· 378 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 379 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 380 CONFIG_SCSI_SYM53C8XX_MMIO=y 381 # CONFIG_SCSI_QLOGIC_1280 is not set 382 # CONFIG_SCSI_QLA_FC is not set 383 + # CONFIG_SCSI_QLA_ISCSI is not set 384 # CONFIG_SCSI_LPFC is not set 385 # CONFIG_SCSI_DC395x is not set 386 # CONFIG_SCSI_DC390T is not set 387 # CONFIG_SCSI_NSP32 is not set 388 # CONFIG_SCSI_DEBUG is not set 389 + # CONFIG_SCSI_ESP_CORE is not set 390 + # CONFIG_SCSI_SRP is not set 391 # CONFIG_ATA is not set 392 393 # ··· 408 # 409 # IEEE 1394 (FireWire) support 410 # 411 + # CONFIG_FIREWIRE is not set 412 # CONFIG_IEEE1394 is not set 413 414 # ··· 428 # ARCnet devices 429 # 430 # CONFIG_ARCNET is not set 431 # CONFIG_PHYLIB is not set 432 433 # ··· 479 # CONFIG_SUNDANCE is not set 480 # CONFIG_TLAN is not set 481 # CONFIG_VIA_RHINE is not set 482 + # CONFIG_SC92031 is not set 483 + CONFIG_NETDEV_1000=y 484 # CONFIG_ACENIC is not set 485 # CONFIG_DL2K is not set 486 # CONFIG_E1000 is not set ··· 498 # CONFIG_TIGON3 is not set 499 # CONFIG_BNX2 is not set 500 # CONFIG_QLA3XXX is not set 501 + # CONFIG_ATL1 is not set 502 + CONFIG_NETDEV_10000=y 503 # CONFIG_CHELSIO_T1 is not set 504 + # CONFIG_CHELSIO_T3 is not set 505 # CONFIG_IXGB is not set 506 # CONFIG_S2IO is not set 507 # CONFIG_MYRI10GE is not set 508 + # CONFIG_NETXEN_NIC is not set 509 + # CONFIG_MLX4_CORE is not set 510 + CONFIG_MLX4_DEBUG=y 511 512 # 513 # Token Ring devices ··· 513 # CONFIG_TR is not set 514 515 # 516 + # Wireless LAN 517 # 518 + # CONFIG_WLAN_PRE80211 is not set 519 + # CONFIG_WLAN_80211 is not set 520 # CONFIG_WAN is not set 521 # CONFIG_FDDI is not set 522 # CONFIG_HIPPI is not set ··· 571 # CONFIG_KEYBOARD_STOWAWAY is not set 572 CONFIG_INPUT_MOUSE=y 573 CONFIG_MOUSE_PS2=y 574 + CONFIG_MOUSE_PS2_ALPS=y 575 + CONFIG_MOUSE_PS2_LOGIPS2PP=y 576 + CONFIG_MOUSE_PS2_SYNAPTICS=y 577 + CONFIG_MOUSE_PS2_LIFEBOOK=y 578 + CONFIG_MOUSE_PS2_TRACKPOINT=y 579 + # CONFIG_MOUSE_PS2_TOUCHKIT is not set 580 # CONFIG_MOUSE_SERIAL is not set 581 + # CONFIG_MOUSE_APPLETOUCH is not set 582 # CONFIG_MOUSE_VSXXXAA is not set 583 # CONFIG_INPUT_JOYSTICK is not set 584 + # CONFIG_INPUT_TABLET is not set 585 # CONFIG_INPUT_TOUCHSCREEN is not set 586 # CONFIG_INPUT_MISC is not set 587 ··· 619 # IPMI 620 # 621 # CONFIG_IPMI_HANDLER is not set 622 CONFIG_WATCHDOG=y 623 # CONFIG_WATCHDOG_NOWAYOUT is not set 624 ··· 639 # CONFIG_WDTPCI is not set 640 CONFIG_HW_RANDOM=y 641 # CONFIG_GEN_RTC is not set 642 # CONFIG_R3964 is not set 643 # CONFIG_APPLICOM is not set 644 # CONFIG_DRM is not set 645 # CONFIG_RAW_DRIVER is not set 646 ··· 653 # TPM devices 654 # 655 # CONFIG_TCG_TPM is not set 656 + CONFIG_DEVPORT=y 657 # CONFIG_I2C is not set 658 659 # ··· 669 # 670 # Dallas's 1-wire bus 671 # 672 + # CONFIG_W1 is not set 673 CONFIG_HWMON=y 674 # CONFIG_HWMON_VID is not set 675 # CONFIG_SENSORS_ABITUGURU is not set 676 # CONFIG_SENSORS_F71805F is not set 677 + # CONFIG_SENSORS_PC87427 is not set 678 + # CONFIG_SENSORS_SMSC47M1 is not set 679 + # CONFIG_SENSORS_SMSC47B397 is not set 680 # CONFIG_SENSORS_VT1211 is not set 681 + # CONFIG_SENSORS_W83627HF is not set 682 # CONFIG_HWMON_DEBUG_CHIP is not set 683 684 # 685 + # Multifunction device drivers 686 # 687 + # CONFIG_MFD_SM501 is not set 688 689 # 690 # Multimedia devices 691 # 692 # CONFIG_VIDEO_DEV is not set 693 + # CONFIG_DVB_CORE is not set 694 + CONFIG_DAB=y 695 696 # 697 # Graphics support 698 # 699 + # CONFIG_BACKLIGHT_LCD_SUPPORT is not set 700 + 701 + # 702 + # Display device support 703 + # 704 + # CONFIG_DISPLAY_SUPPORT is not set 705 + # CONFIG_VGASTATE is not set 706 CONFIG_FB=y 707 + CONFIG_FIRMWARE_EDID=y 708 + # CONFIG_FB_DDC is not set 709 CONFIG_FB_CFB_FILLRECT=y 710 CONFIG_FB_CFB_COPYAREA=y 711 CONFIG_FB_CFB_IMAGEBLIT=y 712 + # CONFIG_FB_SYS_FILLRECT is not set 713 + # CONFIG_FB_SYS_COPYAREA is not set 714 + # CONFIG_FB_SYS_IMAGEBLIT is not set 715 + # CONFIG_FB_SYS_FOPS is not set 716 + CONFIG_FB_DEFERRED_IO=y 717 + # CONFIG_FB_SVGALIB is not set 718 # CONFIG_FB_MACMODES is not set 719 # CONFIG_FB_BACKLIGHT is not set 720 CONFIG_FB_MODE_HELPERS=y 721 # CONFIG_FB_TILEBLITTING is not set 722 + 723 + # 724 + # Frame buffer hardware drivers 725 + # 726 # CONFIG_FB_CIRRUS is not set 727 # CONFIG_FB_PM2 is not set 728 # CONFIG_FB_CYBER2000 is not set ··· 720 # CONFIG_FB_RADEON is not set 721 # CONFIG_FB_ATY128 is not set 722 # CONFIG_FB_ATY is not set 723 + # CONFIG_FB_S3 is not set 724 # CONFIG_FB_SAVAGE is not set 725 # CONFIG_FB_SIS is not set 726 # CONFIG_FB_NEOMAGIC is not set 727 CONFIG_FB_KYRO=y 728 # CONFIG_FB_3DFX is not set 729 # CONFIG_FB_VOODOO1 is not set 730 + # CONFIG_FB_VT8623 is not set 731 # CONFIG_FB_TRIDENT is not set 732 + # CONFIG_FB_ARK is not set 733 + # CONFIG_FB_PM3 is not set 734 # CONFIG_FB_VIRTUAL is not set 735 736 # ··· 746 # CONFIG_FONT_SUN8x16 is not set 747 # CONFIG_FONT_SUN12x22 is not set 748 # CONFIG_FONT_10x18 is not set 749 CONFIG_LOGO=y 750 # CONFIG_LOGO_LINUX_MONO is not set 751 # CONFIG_LOGO_LINUX_VGA16 is not set ··· 757 # CONFIG_LOGO_SUPERH_MONO is not set 758 # CONFIG_LOGO_SUPERH_VGA16 is not set 759 CONFIG_LOGO_SUPERH_CLUT224=y 760 761 # 762 # Sound 763 # 764 # CONFIG_SOUND is not set 765 + 766 + # 767 + # HID Devices 768 + # 769 + CONFIG_HID=y 770 + # CONFIG_HID_DEBUG is not set 771 772 # 773 # USB support ··· 780 # USB Gadget Support 781 # 782 # CONFIG_USB_GADGET is not set 783 # CONFIG_MMC is not set 784 785 # ··· 836 CONFIG_EXT3_FS_XATTR=y 837 # CONFIG_EXT3_FS_POSIX_ACL is not set 838 # CONFIG_EXT3_FS_SECURITY is not set 839 + # CONFIG_EXT4DEV_FS is not set 840 CONFIG_JBD=y 841 # CONFIG_JBD_DEBUG is not set 842 CONFIG_FS_MBCACHE=y ··· 843 # CONFIG_JFS_FS is not set 844 # CONFIG_FS_POSIX_ACL is not set 845 # CONFIG_XFS_FS is not set 846 + # CONFIG_GFS2_FS is not set 847 # CONFIG_OCFS2_FS is not set 848 CONFIG_MINIX_FS=y 849 CONFIG_ROMFS_FS=y ··· 912 CONFIG_LOCKD_V4=y 913 CONFIG_NFS_COMMON=y 914 CONFIG_SUNRPC=y 915 + # CONFIG_SUNRPC_BIND34 is not set 916 # CONFIG_RPCSEC_GSS_KRB5 is not set 917 # CONFIG_RPCSEC_GSS_SPKM3 is not set 918 # CONFIG_SMB_FS is not set ··· 941 # CONFIG_SUN_PARTITION is not set 942 # CONFIG_KARMA_PARTITION is not set 943 # CONFIG_EFI_PARTITION is not set 944 + # CONFIG_SYSV68_PARTITION is not set 945 946 # 947 # Native Language Support 948 # 949 # CONFIG_NLS is not set 950 + 951 + # 952 + # Distributed Lock Manager 953 + # 954 + # CONFIG_DLM is not set 955 956 # 957 # Profiling support ··· 959 CONFIG_ENABLE_MUST_CHECK=y 960 CONFIG_MAGIC_SYSRQ=y 961 # CONFIG_UNUSED_SYMBOLS is not set 962 + CONFIG_DEBUG_FS=y 963 + # CONFIG_HEADERS_CHECK is not set 964 CONFIG_DEBUG_KERNEL=y 965 + # CONFIG_DEBUG_SHIRQ is not set 966 CONFIG_DETECT_SOFTLOCKUP=y 967 CONFIG_SCHEDSTATS=y 968 + # CONFIG_TIMER_STATS is not set 969 # CONFIG_DEBUG_SLAB is not set 970 # CONFIG_DEBUG_RT_MUTEXES is not set 971 # CONFIG_RT_MUTEX_TESTER is not set 972 # CONFIG_DEBUG_SPINLOCK is not set 973 # CONFIG_DEBUG_MUTEXES is not set 974 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 975 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 976 # CONFIG_DEBUG_KOBJECT is not set 977 CONFIG_DEBUG_BUGVERBOSE=y 978 # CONFIG_DEBUG_INFO is not set 979 # CONFIG_DEBUG_VM is not set 980 # CONFIG_DEBUG_LIST is not set 981 CONFIG_FRAME_POINTER=y 982 CONFIG_FORCED_INLINING=y 983 # CONFIG_RCU_TORTURE_TEST is not set 984 + # CONFIG_FAULT_INJECTION is not set 985 # CONFIG_EARLY_PRINTK is not set 986 # CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set 987 CONFIG_SH64_PROC_TLB=y ··· 1004 # 1005 # Library routines 1006 # 1007 + CONFIG_BITREVERSE=y 1008 # CONFIG_CRC_CCITT is not set 1009 # CONFIG_CRC16 is not set 1010 + # CONFIG_CRC_ITU_T is not set 1011 CONFIG_CRC32=y 1012 # CONFIG_LIBCRC32C is not set 1013 CONFIG_PLIST=y 1014 + CONFIG_HAS_IOMEM=y 1015 + CONFIG_HAS_IOPORT=y 1016 + CONFIG_HAS_DMA=y 1017 CONFIG_GENERIC_HARDIRQS=y 1018 CONFIG_GENERIC_IRQ_PROBE=y
+2 -2
arch/sh64/kernel/entry.S
··· 947 ! FIXME:!!! 948 ! no handling of TIF_SYSCALL_TRACE yet!! 949 950 - movi (1 << TIF_NEED_RESCHED), r8 951 and r8, r7, r8 952 pta work_resched, tr0 953 bne r8, ZERO, tr0 954 955 pta restore_all, tr1 956 957 - movi (1 << TIF_SIGPENDING), r8 958 and r8, r7, r8 959 pta work_notifysig, tr0 960 bne r8, ZERO, tr0
··· 947 ! FIXME:!!! 948 ! no handling of TIF_SYSCALL_TRACE yet!! 949 950 + movi _TIF_NEED_RESCHED, r8 951 and r8, r7, r8 952 pta work_resched, tr0 953 bne r8, ZERO, tr0 954 955 pta restore_all, tr1 956 957 + movi (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r8 958 and r8, r7, r8 959 pta work_notifysig, tr0 960 bne r8, ZERO, tr0
+3 -1
arch/sh64/kernel/irq.c
··· 94 */ 95 asmlinkage int do_IRQ(unsigned long vector_num, struct pt_regs * regs) 96 { 97 int irq; 98 99 irq_enter(); ··· 102 irq = irq_demux(vector_num); 103 104 if (irq >= 0) { 105 - __do_IRQ(irq, regs); 106 } else { 107 printk("unexpected IRQ trap at vector %03lx\n", vector_num); 108 } 109 110 irq_exit(); 111 112 return 1; 113 } 114
··· 94 */ 95 asmlinkage int do_IRQ(unsigned long vector_num, struct pt_regs * regs) 96 { 97 + struct pt_regs *old_regs = set_irq_regs(regs); 98 int irq; 99 100 irq_enter(); ··· 101 irq = irq_demux(vector_num); 102 103 if (irq >= 0) { 104 + __do_IRQ(irq); 105 } else { 106 printk("unexpected IRQ trap at vector %03lx\n", vector_num); 107 } 108 109 irq_exit(); 110 111 + set_irq_regs(old_regs); 112 return 1; 113 } 114
+7 -10
arch/sh64/kernel/pci_sh5.c
··· 340 return result; 341 } 342 343 - irqreturn_t pcish5_err_irq(int irq, void *dev_id, struct pt_regs *regs) 344 { 345 unsigned pci_int, pci_air, pci_cir, pci_aint; 346 347 pci_int = SH5PCI_READ(INT); ··· 369 return IRQ_HANDLED; 370 } 371 372 - irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs) 373 { 374 printk("SERR IRQ\n"); 375 376 return IRQ_NONE; 377 } 378 - 379 - #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) 380 381 static void __init 382 pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, ··· 432 mem_res.end -= mem_res.start; 433 434 /* Align the sizes up by bridge rules */ 435 - io_res.end = ROUND_UP(io_res.end, 4*1024) - 1; 436 - mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1; 437 438 /* Adjust the bridge's allocation requirements */ 439 bridge->resource[0].end = bridge->resource[0].start + io_res.end; ··· 446 447 /* adjust parent's resource requirements */ 448 if (ior) { 449 - ior->end = ROUND_UP(ior->end, 4*1024); 450 ior->end += io_res.end; 451 } 452 453 if (memr) { 454 - memr->end = ROUND_UP(memr->end, 1*1024*1024); 455 memr->end += mem_res.end; 456 } 457 } 458 - 459 - #undef ROUND_UP 460 461 static void __init pcibios_size_bridges(void) 462 {
··· 340 return result; 341 } 342 343 + static irqreturn_t pcish5_err_irq(int irq, void *dev_id) 344 { 345 + struct pt_regs *regs = get_irq_regs(); 346 unsigned pci_int, pci_air, pci_cir, pci_aint; 347 348 pci_int = SH5PCI_READ(INT); ··· 368 return IRQ_HANDLED; 369 } 370 371 + static irqreturn_t pcish5_serr_irq(int irq, void *dev_id) 372 { 373 printk("SERR IRQ\n"); 374 375 return IRQ_NONE; 376 } 377 378 static void __init 379 pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, ··· 433 mem_res.end -= mem_res.start; 434 435 /* Align the sizes up by bridge rules */ 436 + io_res.end = ALIGN(io_res.end, 4*1024) - 1; 437 + mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1; 438 439 /* Adjust the bridge's allocation requirements */ 440 bridge->resource[0].end = bridge->resource[0].start + io_res.end; ··· 447 448 /* adjust parent's resource requirements */ 449 if (ior) { 450 + ior->end = ALIGN(ior->end, 4*1024); 451 ior->end += io_res.end; 452 } 453 454 if (memr) { 455 + memr->end = ALIGN(memr->end, 1*1024*1024); 456 memr->end += mem_res.end; 457 } 458 } 459 460 static void __init pcibios_size_bridges(void) 461 {
+1 -1
arch/sh64/kernel/pci_sh5.h
··· 4 * May be copied or modified under the terms of the GNU General Public 5 * License. See linux/COPYING for more information. 6 * 7 - * Defintions for the SH5 PCI hardware. 8 */ 9 10 /* Product ID */
··· 4 * May be copied or modified under the terms of the GNU General Public 5 * License. See linux/COPYING for more information. 6 * 7 + * Definitions for the SH5 PCI hardware. 8 */ 9 10 /* Product ID */
+1 -1
arch/sh64/kernel/process.c
··· 387 * NOTE! Only a kernel-only process(ie the swapper or direct descendants 388 * who haven't done an "execve()") should use this: it will work within 389 * a system call from a "real" process, but the process memory space will 390 - * not be free'd until both the parent and the child have exited. 391 */ 392 int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 393 {
··· 387 * NOTE! Only a kernel-only process(ie the swapper or direct descendants 388 * who haven't done an "execve()") should use this: it will work within 389 * a system call from a "real" process, but the process memory space will 390 + * not be freed until both the parent and the child have exited. 391 */ 392 int 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; 700 701 - if (!oldset) 702 oldset = &current->blocked; 703 704 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); 711 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) { 730 /* Decode Syscall # */ 731 regs->regs[REG_RET] = regs->syscall_nr; 732 regs->pc -= 4; 733 } 734 } 735 return 0; 736 }
··· 698 if (try_to_freeze()) 699 goto no_signal; 700 701 + if (test_thread_flag(TIF_RESTORE_SIGMASK)) 702 + oldset = &current->saved_sigmask; 703 + else if (!oldset) 704 oldset = &current->blocked; 705 706 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 sigmask 712 + * is in its frame, and we can clear the TIF_RESTORE_SIGMASK 713 + * 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, &current->saved_sigmask, NULL); 736 + } 737 + 738 return 0; 739 }
+33 -3
arch/sh64/kernel/syscalls.S
··· 2 * arch/sh64/kernel/syscalls.S 3 * 4 * Copyright (C) 2000, 2001 Paolo Alberelli 5 - * Copyright (C) 2004 Paul Mundt 6 * Copyright (C) 2003, 2004 Richard Curnow 7 * 8 * This file is subject to the terms and conditions of the GNU General Public ··· 20 */ 21 .globl sys_call_table 22 sys_call_table: 23 - .long sys_ni_syscall /* 0 - old "setup()" system call */ 24 .long sys_exit 25 .long sys_fork 26 .long sys_read ··· 347 .long sys_inotify_init 348 .long sys_inotify_add_watch 349 .long sys_inotify_rm_watch /* 320 */ 350 -
··· 2 * arch/sh64/kernel/syscalls.S 3 * 4 * Copyright (C) 2000, 2001 Paolo Alberelli 5 + * Copyright (C) 2004 - 2007 Paul Mundt 6 * Copyright (C) 2003, 2004 Richard Curnow 7 * 8 * This file is subject to the terms and conditions of the GNU General Public ··· 20 */ 21 .globl sys_call_table 22 sys_call_table: 23 + .long sys_restart_syscall /* 0 - old "setup()" system call */ 24 .long sys_exit 25 .long sys_fork 26 .long sys_read ··· 347 .long sys_inotify_init 348 .long sys_inotify_add_watch 349 .long sys_inotify_rm_watch /* 320 */ 350 + .long sys_ni_syscall 351 + .long sys_migrate_pages 352 + .long sys_openat 353 + .long sys_mkdirat 354 + .long sys_mknodat /* 325 */ 355 + .long sys_fchownat 356 + .long sys_futimesat 357 + .long sys_fstatat64 358 + .long sys_unlinkat 359 + .long sys_renameat /* 330 */ 360 + .long sys_linkat 361 + .long sys_symlinkat 362 + .long sys_readlinkat 363 + .long sys_fchmodat 364 + .long sys_faccessat /* 335 */ 365 + .long sys_pselect6 366 + .long sys_ppoll 367 + .long sys_unshare 368 + .long sys_set_robust_list 369 + .long sys_get_robust_list /* 340 */ 370 + .long sys_splice 371 + .long sys_sync_file_range 372 + .long sys_tee 373 + .long sys_vmsplice 374 + .long sys_move_pages /* 345 */ 375 + .long sys_getcpu 376 + .long sys_epoll_pwait 377 + .long sys_utimensat 378 + .long sys_signalfd 379 + .long sys_timerfd /* 350 */ 380 + .long sys_eventfd
+10 -8
arch/sh64/kernel/time.c
··· 123 static unsigned long long scaled_recip_ctc_ticks_per_jiffy; 124 125 /* Estimate number of microseconds that have elapsed since the last timer tick, 126 - by scaling the delta that has occured in the CTC register. 127 128 WARNING WARNING WARNING : This algorithm relies on the CTC decrementing at 129 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 clocktick 284 */ 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)); ··· 290 291 do_timer(1); 292 #ifndef CONFIG_SMP 293 - update_process_times(user_mode(regs)); 294 #endif 295 - profile_tick(CPU_PROFILING, regs); 296 297 #ifdef CONFIG_HEARTBEAT 298 { ··· 324 * Time Stamp Counter value at the time of the timer interrupt, so that 325 * 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. -arca 342 */ 343 write_lock(&xtime_lock); 344 - do_timer_interrupt(irq, regs); 345 write_unlock(&xtime_lock); 346 347 return IRQ_HANDLED; ··· 466 #endif 467 } 468 469 - static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id, 470 - struct pt_regs *regs) 471 { 472 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */ 473 regs->regs[3] = 1; /* Using r3 */ 474
··· 123 static unsigned long long scaled_recip_ctc_ticks_per_jiffy; 124 125 /* Estimate number of microseconds that have elapsed since the last timer tick, 126 + by scaling the delta that has occurred in the CTC register. 127 128 WARNING WARNING WARNING : This algorithm relies on the CTC decrementing at 129 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 clocktick 284 */ 285 + static inline void do_timer_interrupt(void) 286 { 287 unsigned long long current_ctc; 288 asm ("getcon cr62, %0" : "=r" (current_ctc)); ··· 290 291 do_timer(1); 292 #ifndef CONFIG_SMP 293 + update_process_times(user_mode(get_irq_regs())); 294 #endif 295 + if (current->pid) 296 + profile_tick(CPU_PROFILING); 297 298 #ifdef CONFIG_HEARTBEAT 299 { ··· 323 * Time Stamp Counter value at the time of the timer interrupt, so that 324 * 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. -arca 341 */ 342 write_lock(&xtime_lock); 343 + do_timer_interrupt(); 344 write_unlock(&xtime_lock); 345 346 return IRQ_HANDLED; ··· 465 #endif 466 } 467 468 + static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id) 469 { 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
+1
arch/sh64/lib/.gitignore
···
··· 1 + syscalltab.h
+2 -2
arch/sh64/mach-cayman/irq.c
··· 29 /* Note the SMSC SuperIO chip and SMSC LAN chip interrupts are all muxed onto 30 the same SH-5 interrupt */ 31 32 - 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 } 37 38 - 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 onto 30 the same SH-5 interrupt */ 31 32 + 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 } 37 38 + 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 #endif 215 216 - /* Exit the configuraton state */ 217 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR); 218 219 return 0;
··· 213 SMSC_SUPERIO_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */ 214 #endif 215 216 + /* Exit the configuration state */ 217 outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR); 218 219 return 0;
+1 -1
arch/sh64/mm/fault.c
··· 135 /* SIM 136 * Note this is now called with interrupts still disabled 137 * This is to cope with being called for a missing IO port 138 - * address with interupts disabled. This should be fixed as 139 * soon as we have a better 'fast path' miss handler. 140 * 141 * Plus take care how you try and debug this stuff.
··· 135 /* SIM 136 * Note this is now called with interrupts still disabled 137 * This is to cope with being called for a missing IO port 138 + * address with interrupts disabled. This should be fixed as 139 * soon as we have a better 'fast path' miss handler. 140 * 141 * Plus take care how you try and debug this stuff.
+1 -1
arch/sh64/mm/init.c
··· 84 printk("%d reserved pages\n",reserved); 85 printk("%d pages shared\n",shared); 86 printk("%d pages swap cached\n",cached); 87 - printk("%ld pages in page table cache\n",pgtable_cache_size); 88 } 89 90 /*
··· 84 printk("%d reserved pages\n",reserved); 85 printk("%d pages shared\n",shared); 86 printk("%d pages swap cached\n",cached); 87 + printk("%ld pages in page table cache\n", quicklist_total_size()); 88 } 89 90 /*
+2 -2
arch/sh64/mm/tlbmiss.c
··· 14 * IMPORTANT NOTES : 15 * The do_fast_page_fault function is called from a context in entry.S where very few registers 16 * have been saved. In particular, the code in this file must be compiled not to use ANY 17 - * caller-save regiseters that are not part of the restricted save set. Also, it means that 18 * code in this file must not make calls to functions elsewhere in the kernel, or else the 19 * excepting context will see corruption in its caller-save registers. Plus, the entry.S save 20 * area is non-reentrant, so this code has to run with SR.BL==1, i.e. no interrupts taken inside ··· 249 /* SIM 250 * Note this is now called with interrupts still disabled 251 * This is to cope with being called for a missing IO port 252 - * address with interupts disabled. This should be fixed as 253 * 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 registers 16 * have been saved. In particular, the code in this file must be compiled not to use ANY 17 + * caller-save registers that are not part of the restricted save set. Also, it means that 18 * code in this file must not make calls to functions elsewhere in the kernel, or else the 19 * excepting context will see corruption in its caller-save registers. Plus, the entry.S save 20 * area is non-reentrant, so this code has to run with SR.BL==1, i.e. no interrupts taken inside ··· 249 /* SIM 250 * Note this is now called with interrupts still disabled 251 * This is to cope with being called for a missing IO port 252 + * address with interrupts disabled. This should be fixed as 253 * soon as we have a better 'fast path' miss handler. 254 * 255 * Plus take care how you try and debug this stuff.
+9
arch/um/include/sysdep-x86_64/kernel-offsets.h
··· 17 #define OFFSET(sym, str, mem) \ 18 DEFINE(sym, offsetof(struct str, mem)); 19 20 void foo(void) 21 { 22 #include <common-offsets.h> 23 }
··· 17 #define OFFSET(sym, str, mem) \ 18 DEFINE(sym, offsetof(struct str, mem)); 19 20 + #define __NO_STUBS 1 21 + #undef __SYSCALL 22 + #undef _ASM_X86_64_UNISTD_H_ 23 + #define __SYSCALL(nr, sym) [nr] = 1, 24 + static char syscalls[] = { 25 + #include <asm/arch/unistd.h> 26 + }; 27 + 28 void foo(void) 29 { 30 #include <common-offsets.h> 31 + DEFINE(UM_NR_syscall_max, sizeof(syscalls) - 1); 32 }
+2 -1
arch/um/include/sysdep-x86_64/syscalls.h
··· 9 10 #include <linux/msg.h> 11 #include <linux/shm.h> 12 13 typedef long syscall_handler_t(void); 14 ··· 30 extern syscall_handler_t sys_modify_ldt; 31 extern syscall_handler_t sys_arch_prctl; 32 33 - #define NR_syscalls (__NR_syscall_max + 1) 34 35 #endif
··· 9 10 #include <linux/msg.h> 11 #include <linux/shm.h> 12 + #include <kern_constants.h> 13 14 typedef long syscall_handler_t(void); 15 ··· 29 extern syscall_handler_t sys_modify_ldt; 30 extern syscall_handler_t sys_arch_prctl; 31 32 + #define NR_syscalls (UM_NR_syscall_max + 1) 33 34 #endif
+3 -2
arch/um/sys-x86_64/syscall_table.c
··· 4 #include <linux/linkage.h> 5 #include <linux/sys.h> 6 #include <linux/cache.h> 7 8 #define __NO_STUBS 9 ··· 46 47 extern void sys_ni_syscall(void); 48 49 - 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> 8 9 #define __NO_STUBS 10 ··· 45 46 extern void sys_ni_syscall(void); 47 48 + 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 };
+1
drivers/firewire/fw-ohci.c
··· 26 #include <linux/delay.h> 27 #include <linux/poll.h> 28 #include <linux/dma-mapping.h> 29 30 #include <asm/uaccess.h> 31 #include <asm/semaphore.h>
··· 26 #include <linux/delay.h> 27 #include <linux/poll.h> 28 #include <linux/dma-mapping.h> 29 + #include <linux/mm.h> 30 31 #include <asm/uaccess.h> 32 #include <asm/semaphore.h>
+4 -11
drivers/ide/Kconfig
··· 4 # Andre Hedrick <andre@linux-ide.org> 5 # 6 7 - if BLOCK 8 - 9 - menu "ATA/ATAPI/MFM/RLL support" 10 - depends on HAS_IOMEM 11 - 12 - config IDE 13 tristate "ATA/ATAPI/MFM/RLL support" 14 ---help--- 15 If you say Y here, your kernel will be able to manage low cost mass 16 storage units such as ATA/(E)IDE and ATAPI units. The most common ··· 1096 config BLK_DEV_HD 1097 def_bool BLK_DEV_HD_IDE || BLK_DEV_HD_ONLY 1098 1099 - endif 1100 - 1101 - endmenu 1102 - 1103 - endif
··· 4 # Andre Hedrick <andre@linux-ide.org> 5 # 6 7 + menuconfig IDE 8 tristate "ATA/ATAPI/MFM/RLL support" 9 + depends on BLOCK 10 + depends on HAS_IOMEM 11 ---help--- 12 If you say Y here, your kernel will be able to manage low cost mass 13 storage units such as ATA/(E)IDE and ATAPI units. The most common ··· 1099 config BLK_DEV_HD 1100 def_bool BLK_DEV_HD_IDE || BLK_DEV_HD_ONLY 1101 1102 + endif # IDE
+1 -13
drivers/ide/cris/ide-cris.c
··· 1002 return 1; /* let the PIO routines handle this weirdness */ 1003 } 1004 1005 - 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 interrupts 1019 */ ··· 1031 1032 static int cris_dma_check(ide_drive_t *drive) 1033 { 1034 - if (ide_use_dma(drive) && cris_config_drive_for_dma(drive)) 1035 return 0; 1036 1037 return -1;
··· 1002 return 1; /* let the PIO routines handle this weirdness */ 1003 } 1004 1005 /* 1006 * cris_dma_intr() is the handler for disk read/write DMA interrupts 1007 */ ··· 1043 1044 static int cris_dma_check(ide_drive_t *drive) 1045 { 1046 + if (ide_tune_dma(drive)) 1047 return 0; 1048 1049 return -1;
+12 -41
drivers/ide/ide-dma.c
··· 670 671 EXPORT_SYMBOL(__ide_dma_good_drive); 672 673 - 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 - 708 static 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; 700 break; 701 case XFER_SW_DMA_0: 702 - mask = id->dma_1word & hwif->swdma_mask; 703 break; 704 default: 705 BUG(); ··· 750 { 751 u8 speed; 752 753 - /* TODO: use only ide_max_dma_mode() */ 754 - if (!ide_use_dma(drive)) 755 return 0; 756 757 speed = ide_max_dma_mode(drive); ··· 762 if (!speed) 763 return 0; 764 765 - drive->hwif->speedproc(drive, speed); 766 767 - return ide_dma_enable(drive); 768 } 769 770 EXPORT_SYMBOL_GPL(ide_tune_dma);
··· 670 671 EXPORT_SYMBOL(__ide_dma_good_drive); 672 673 static 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; 785 786 + 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; 792 793 speed = ide_max_dma_mode(drive); ··· 792 if (!speed) 793 return 0; 794 795 + if (drive->hwif->speedproc(drive, speed)) 796 + return 0; 797 798 + return 1; 799 } 800 801 EXPORT_SYMBOL_GPL(ide_tune_dma);
+1
drivers/ide/ide-io.c
··· 223 break; 224 if (drive->hwif->ide_dma_check == NULL) 225 break; 226 ide_set_dma(drive); 227 break; 228 }
··· 223 break; 224 if (drive->hwif->ide_dma_check == NULL) 225 break; 226 + drive->hwif->dma_off_quietly(drive); 227 ide_set_dma(drive); 228 break; 229 }
-12
drivers/ide/ide-lib.c
··· 111 112 EXPORT_SYMBOL(ide_rate_filter); 113 114 - int ide_dma_enable (ide_drive_t *drive) 115 - { 116 - ide_hwif_t *hwif = HWIF(drive); 117 - struct hd_driveid *id = drive->id; 118 - 119 - return ((int) ((((id->dma_ultra >> 8) & hwif->ultra_mask) || 120 - ((id->dma_mword >> 8) & hwif->mwdma_mask) || 121 - ((id->dma_1word >> 8) & hwif->swdma_mask)) ? 1 : 0)); 122 - } 123 - 124 - EXPORT_SYMBOL(ide_dma_enable); 125 - 126 int ide_use_fast_pio(ide_drive_t *drive) 127 { 128 struct hd_driveid *id = drive->id;
··· 111 112 EXPORT_SYMBOL(ide_rate_filter); 113 114 int ide_use_fast_pio(ide_drive_t *drive) 115 { 116 struct hd_driveid *id = drive->id;
+1
drivers/ide/ide.c
··· 910 err = 0; 911 912 if (arg) { 913 if (ide_set_dma(drive) || hwif->ide_dma_on(drive)) 914 err = -EIO; 915 } else
··· 910 err = 0; 911 912 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 } 457 458 - 459 - /** 460 - * config_chipset_for_dma - set up DMA mode 461 - * @drive: drive to configure for 462 - * 463 - * Place a drive into DMA mode and tune the chipset for 464 - * the selected speed. 465 - * 466 - * Returns true if DMA mode can be used 467 - */ 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 DMA 482 * @drive: drive to configure ··· 465 466 static 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; 475 476 - 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 - } 508 509 - return 0; 510 } 511 512 /** ··· 683 return; 684 } 685 686 - hwif->atapi_dma = 1; 687 688 if (m5229_revision <= 0x20) 689 hwif->ultra_mask = 0x00; /* no udma */
··· 455 return (ide_config_drive_speed(drive, speed)); 456 } 457 458 /** 459 * ali15x3_config_drive_for_dma - configure for DMA 460 * @drive: drive to configure ··· 487 488 static int ali15x3_config_drive_for_dma(ide_drive_t *drive) 489 { 490 drive->init_speed = 0; 491 492 + if (ide_tune_dma(drive)) 493 + return 0; 494 495 + ali15x3_tune_drive(drive, 255); 496 + 497 + return -1; 498 } 499 500 /** ··· 739 return; 740 } 741 742 + if (m5229_revision > 0x20) 743 + hwif->atapi_dma = 1; 744 745 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 } 354 355 - 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 - 368 static 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; 372 373 if (ide_use_fast_pio(drive))
··· 352 return ide_config_drive_speed(drive, speed); 353 } 354 355 static int cmd64x_config_drive_for_dma (ide_drive_t *drive) 356 { 357 + if (ide_tune_dma(drive)) 358 return 0; 359 360 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, 2002 3 * 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> 8 * May be copied or modified under the terms of the GNU General Public License 9 * 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)) 64 65 /** 66 * cs5530_tuneproc - select/set PIO modes 67 * ··· 82 83 static 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 } 97 98 /** 99 - * cs5530_config_dma - select/set DMA and UDMA modes 100 * @drive: drive to tune 101 * 102 - * cs5530_config_dma() handles selection/setting of DMA/UDMA modes 103 - * for both the chipset and drive. The CS5530 has limitations about 104 - * 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; 116 117 - /* 118 - * Default to DMA-off in case we run into trouble here. 119 - */ 120 - hwif->dma_off_quietly(drive); 121 122 - /* 123 - * The CS5530 specifies that two drives sharing a cable cannot 124 - * 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 statically 128 - * handle this requirement by looking at our mate drive to see 129 - * 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_2 132 - * but instead drop to PIO 133 - */ 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 - else 145 - udma_ok = 1; 146 - } 147 - } 148 149 - /* 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 - } 172 173 /* 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 */ 178 179 /* ··· 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; 169 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; 307 308 hwif->tuneproc = &cs5530_tuneproc; 309 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; 331 332 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 2007 3 * 4 * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 2000 Mark Lord <mlord@pobox.com> 6 + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 7 + * 8 * May be copied or modified under the terms of the GNU General Public License 9 * 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)) 64 65 + 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 modes 75 * ··· 74 75 static void cs5530_tuneproc (ide_drive_t *drive, u8 pio) /* pio=255 means "autotune" */ 76 { 77 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); 81 } 82 83 /** 84 + * cs5530_udma_filter - UDMA filter 85 + * @drive: drive 86 + * 87 + * cs5530_udma_filter() does UDMA mask filtering for the given drive 88 + * taking into the consideration capabilities of the mate device. 89 + * 90 + * The CS5530 specifies that two drives sharing a cable cannot mix 91 + * UDMA/MDMA. It has to be one or the other, for the pair, though 92 + * different timings can still be chosen for each drive. We could 93 + * set the appropriate timing bits on the fly, but that might be 94 + * a bit confusing. So, for now we statically handle this requirement 95 + * by looking at our mate drive to see what it is capable of, before 96 + * choosing a mode for our own drive. 97 + * 98 + * Note: This relies on the fact we never fail from UDMA to MWDMA2 99 + * 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 mode 124 * @drive: drive to tune 125 * 126 + * cs5530_config_dma() handles setting of DMA/UDMA mode 127 + * for both the chipset and drive. 128 */ 129 + 130 + static int cs5530_config_dma(ide_drive_t *drive) 131 { 132 + if (ide_tune_dma(drive)) 133 + return 0; 134 135 + return 1; 136 + } 137 138 + static int cs5530_tune_chipset(ide_drive_t *drive, u8 mode) 139 + { 140 + unsigned long basereg; 141 + unsigned int reg, timings = 0; 142 143 + mode = ide_rate_filter(drive, mode); 144 145 /* 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 */ 150 151 /* ··· 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; 312 313 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; 334 335 + 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 } 465 466 /** 467 - * config_chipset_for_dma - configure for DMA 468 - * @drive: drive to configure 469 - * 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 transfers 487 * @drive: drive we are going to set up 488 * ··· 475 476 static 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; 480 481 it821x_tuneproc(drive, 255);
··· 464 } 465 466 /** 467 * it821x_configure_drive_for_dma - set up for DMA transfers 468 * @drive: drive we are going to set up 469 * ··· 494 495 static int it821x_config_drive_for_dma (ide_drive_t *drive) 496 { 497 + if (ide_tune_dma(drive)) 498 return 0; 499 500 it821x_tuneproc(drive, 255);
+1 -28
drivers/ide/pci/pdc202xx_new.c
··· 228 return get_indexed_reg(hwif, 0x0b) & 0x04; 229 } 230 231 - 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 have 240 - * NO real effect since this register is reloaded 241 - * 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 - 258 static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive) 259 { 260 drive->init_speed = 0; 261 262 - if (ide_use_dma(drive) && config_chipset_for_dma(drive)) 263 return 0; 264 265 if (ide_use_fast_pio(drive))
··· 228 return get_indexed_reg(hwif, 0x0b) & 0x04; 229 } 230 231 static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive) 232 { 233 drive->init_speed = 0; 234 235 + if (ide_tune_dma(drive)) 236 return 0; 237 238 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, 2002 3 * 4 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 2006-2007 MontaVista Software, Inc. 6 * 7 * Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this 8 * compiled into the kernel if you have more than one card installed. ··· 61 NULL 62 }; 63 64 - /* A Register */ 65 - #define SYNC_ERRDY_EN 0xC0 66 - 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 0x4F 92 - #define SPEED_DIS 0x0F 93 - 94 - #define DMARQp 0x80 95 - #define IORDYp 0x40 96 - #define DMAR_EN 0x20 97 - #define DMAW_EN 0x10 98 - 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 */ 103 104 static 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); 72 73 - u32 drive_conf; 74 - u8 AP, BP, CP, DP; 75 u8 TA = 0, TB = 0, TC = 0; 76 77 - 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); 86 87 - 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); 92 93 - /* 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); 116 117 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 } 111 112 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); 115 } else { 116 - pci_write_config_byte(dev, (drive_pci)|0x01, BP|TB); 117 - pci_write_config_byte(dev, (drive_pci)|0x02, CP|TC); 118 } 119 120 #if PDC202XX_DEBUG_DRIVE_INFO 121 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 */ 127 128 - return (ide_config_drive_speed(drive, speed)); 129 } 130 - 131 132 static void pdc202xx_tune_drive(ide_drive_t *drive, u8 pio) 133 { ··· 159 /* 160 * Set the control register to use the 66MHz system 161 * clock for UDMA 3/4/5 mode operation when necessary. 162 * 163 * It may also be possible to leave the 66MHz clock on 164 * and readjust the timing parameters. ··· 181 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); 182 } 183 184 - 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 - 238 static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive) 239 { 240 drive->init_speed = 0; 241 242 - if (ide_use_dma(drive) && config_chipset_for_dma(drive)) 243 return 0; 244 245 if (ide_use_fast_pio(drive))
··· 1 /* 2 + * linux/drivers/ide/pci/pdc202xx_old.c Version 0.50 Mar 3, 2007 3 * 4 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 2006-2007 MontaVista Software, Inc. 6 + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 7 * 8 * Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this 9 * compiled into the kernel if you have more than one card installed. ··· 60 NULL 61 }; 62 63 + static void pdc_old_disable_66MHz_clock(ide_hwif_t *); 64 65 static 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); 109 110 + u8 AP = 0, BP = 0, CP = 0; 111 u8 TA = 0, TB = 0, TC = 0; 112 113 + #if PDC202XX_DEBUG_DRIVE_INFO 114 + u32 drive_conf = 0; 115 pci_read_config_dword(dev, drive_pci, &drive_conf); 116 + #endif 117 118 + /* 119 + * TODO: do this once per channel 120 + */ 121 + if (dev->device != PCI_DEVICE_ID_PROMISE_20246) 122 + pdc_old_disable_66MHz_clock(hwif); 123 124 + 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); 127 128 switch(speed) { 129 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 } 175 176 if (speed < XFER_SW_DMA_0) { 177 + /* 178 + * preserve SYNC_INT / ERDDY_EN bits while clearing 179 + * Prefetch_EN / IORDY_EN / PA[3:0] bits of register A 180 + */ 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 } 198 199 #if PDC202XX_DEBUG_DRIVE_INFO 200 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 + #endif 206 207 + return ide_config_drive_speed(drive, speed); 208 } 209 210 static void pdc202xx_tune_drive(ide_drive_t *drive, u8 pio) 211 { ··· 209 /* 210 * Set the control register to use the 66MHz system 211 * clock for UDMA 3/4/5 mode operation when necessary. 212 + * 213 + * FIXME: this register is shared by both channels, some locking is needed 214 * 215 * It may also be possible to leave the 66MHz clock on 216 * and readjust the timing parameters. ··· 229 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); 230 } 231 232 static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive) 233 { 234 drive->init_speed = 0; 235 236 + if (ide_tune_dma(drive)) 237 return 0; 238 239 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-2003 3 * 4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> 5 * May be copied or modified under the terms of the GNU General Public License 6 * 7 * Development of this chipset driver was funded ··· 95 */ 96 //#define SC1200_BAD_PIO(timings) (((timings)&~0x80000000)==0x00009172) 97 98 - 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; 105 106 - /* 107 - * The SC1200 specifies that two drives sharing a cable cannot 108 - * 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 statically 112 - * handle this requirement by looking at our mate drive to see 113 - * 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 - else 123 - 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 } 150 151 /* 152 - * sc1200_config_dma2() handles selection/setting of DMA/UDMA modes 153 - * for both the chipset and drive. 154 */ 155 - static int sc1200_config_dma2 (ide_drive_t *drive, int mode) 156 { 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; 148 149 - /* 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 */ 154 155 /* 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 */ 161 } 162 163 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 } 227 228 if (unit == 0) { /* are we configuring drive0? */ ··· 231 pci_write_config_dword(hwif->pci_dev, basereg+12, timings); 232 } 233 234 - 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 */ 241 static int sc1200_config_dma (ide_drive_t *drive) 242 { 243 - return sc1200_config_dma2(drive, sc1200_autoselect_dma_mode(drive)); 244 } 245 246 ··· 283 static 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; 289 290 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); 302 return; 303 } 304 305 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 } 316 317 #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) { 455 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; 460 } 461 hwif->atapi_dma = 1; 462 hwif->ultra_mask = 0x07;
··· 1 /* 2 + * linux/drivers/ide/pci/sc1200.c Version 0.94 Mar 10 2007 3 * 4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> 5 + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 6 + * 7 * May be copied or modified under the terms of the GNU General Public License 8 * 9 * Development of this chipset driver was funded ··· 93 */ 94 //#define SC1200_BAD_PIO(timings) (((timings)&~0x80000000)==0x00009172) 95 96 + 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; 101 102 + 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]); 108 } 109 110 /* 111 + * The SC1200 specifies that two drives sharing a cable cannot mix 112 + * UDMA/MDMA. It has to be one or the other, for the pair, though 113 + * different timings can still be chosen for each drive. We could 114 + * set the appropriate timing bits on the fly, but that might be 115 + * a bit confusing. So, for now we statically handle this requirement 116 + * by looking at our mate drive to see what it is capable of, before 117 + * 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; 160 161 + mode = ide_rate_filter(drive, mode); 162 163 /* 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 } 180 181 pci_clock = sc1200_get_pci_clock(); ··· 224 case PCI_CLK_66: timings = 0x00015151; break; 225 } 226 break; 227 + default: 228 + BUG(); 229 + break; 230 } 231 232 if (unit == 0) { /* are we configuring drive0? */ ··· 239 pci_write_config_dword(hwif->pci_dev, basereg+12, timings); 240 } 241 242 return 0; /* success */ 243 } 244 ··· 250 */ 251 static int sc1200_config_dma (ide_drive_t *drive) 252 { 253 + if (ide_tune_dma(drive)) 254 + return 0; 255 + 256 + return 1; 257 } 258 259 ··· 290 static void sc1200_tuneproc (ide_drive_t *drive, byte pio) /* mode=255 means "autotune" */ 291 { 292 ide_hwif_t *hwif = HWIF(drive); 293 int mode = -1; 294 295 + /* 296 + * bad abuse of ->tuneproc interface 297 + */ 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 } 312 313 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); 318 } 319 320 #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 } 323 324 /** 325 - * scc_config_chipset_for_dma - configure for DMA 326 - * @drive: drive to configure 327 - * 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 transfers 346 * @drive: drive we are going to set up 347 * ··· 334 335 static 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; 339 340 if (ide_use_fast_pio(drive))
··· 322 } 323 324 /** 325 * scc_configure_drive_for_dma - set up for DMA transfers 326 * @drive: drive we are going to set up 327 * ··· 354 355 static int scc_config_drive_for_dma(ide_drive_t *drive) 356 { 357 + if (ide_tune_dma(drive)) 358 return 0; 359 360 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 2003 3 * 4 * Copyright (C) 1998-2000 Michel Aubry 5 * Copyright (C) 1998-2000 Andrzej Krzysztofowicz 6 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> 7 * Portions copyright (c) 2001 Sun Microsystems 8 * 9 * ··· 137 138 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 - else 151 - speed = ide_rate_filter(drive, xferspeed); 152 153 /* 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: 230 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: 244 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 } 266 267 - 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 - else 284 - 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 - 305 static void svwks_tune_drive (ide_drive_t *drive, u8 pio) 306 { 307 - if(pio == 255) 308 - (void) svwks_tune_chipset(drive, 255); 309 - else 310 - (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 } 323 324 static int svwks_config_drive_xfer_rate (ide_drive_t *drive) 325 { 326 drive->init_speed = 0; 327 328 - if (ide_use_dma(drive) && config_chipset_for_dma(drive)) 329 return 0; 330 331 if (ide_use_fast_pio(drive)) 332 - config_chipset_for_pio(drive); 333 334 return -1; 335 }
··· 1 /* 2 + * linux/drivers/ide/pci/serverworks.c Version 0.9 Mar 4 2007 3 * 4 * Copyright (C) 1998-2000 Michel Aubry 5 * Copyright (C) 1998-2000 Andrzej Krzysztofowicz 6 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> 7 + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 8 * Portions copyright (c) 2001 Sun Microsystems 9 * 10 * ··· 136 137 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; 146 147 /* 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 needed 236 + */ 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 needed 247 + */ 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 } 264 265 static 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); 269 } 270 271 static int svwks_config_drive_xfer_rate (ide_drive_t *drive) 272 { 273 drive->init_speed = 0; 274 275 + if (ide_tune_dma(drive)) 276 return 0; 277 278 if (ide_use_fast_pio(drive)) 279 + svwks_tune_drive(drive, 255); 280 281 return -1; 282 }
+1 -23
drivers/ide/pci/siimage.c
··· 375 } 376 377 /** 378 - * config_chipset_for_dma - configure for DMA 379 - * @drive: drive to configure 380 - * 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 and 383 - * 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 transfers 401 * @drive: drive we are going to set up 402 * ··· 386 387 static 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; 391 392 if (ide_use_fast_pio(drive))
··· 375 } 376 377 /** 378 * siimage_configure_drive_for_dma - set up for DMA transfers 379 * @drive: drive we are going to set up 380 * ··· 408 409 static int siimage_config_drive_for_dma (ide_drive_t *drive) 410 { 411 + if (ide_tune_dma(drive)) 412 return 0; 413 414 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, 2003 3 * 4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer 6 * Copyright (C) 2003 Vojtech Pavlik <vojtech@suse.cz> 7 * May be copied or modified under the terms of the GNU General Public License 8 * 9 * ··· 450 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch); 451 } 452 453 - 454 /* Set per-drive active and recovery time */ 455 static 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; 459 460 - 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; 464 465 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; 483 484 /* In pre ATA_133 case, drives sit at 0x40 + 4*drive->dn */ 485 drive_pci = 0x40; ··· 481 test1 &= ~0x0F; 482 test2 &= ~0x07; 483 484 - 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; 489 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 recovery 495 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 } 521 522 - 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)); 528 } 529 530 static 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)); 617 } 618 619 - 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 } 626 627 static int sis5513_config_xfer_rate(ide_drive_t *drive) 628 { 629 - config_art_rwp_pio(drive, 5); 630 631 drive->init_speed = 0; 632 ··· 635 return 0; 636 637 if (ide_use_fast_pio(drive)) 638 - sis5513_tune_drive(drive, 5); 639 640 return -1; 641 } ··· 823 if (!hwif->irq) 824 hwif->irq = hwif->channel ? 15 : 14; 825 826 - hwif->tuneproc = &sis5513_tune_drive; 827 hwif->speedproc = &sis5513_tune_chipset; 828 829 if (!(hwif->dma_base)) {
··· 1 /* 2 + * linux/drivers/ide/pci/sis5513.c Version 0.20 Mar 4, 2007 3 * 4 * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer 6 * Copyright (C) 2003 Vojtech Pavlik <vojtech@suse.cz> 7 + * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 8 + * 9 * May be copied or modified under the terms of the GNU General Public License 10 * 11 * ··· 448 pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch); 449 } 450 451 /* Set per-drive active and recovery time */ 452 static 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; 456 457 + u8 drive_pci, test1, test2; 458 459 config_drive_art_rwp(drive); 460 461 /* In pre ATA_133 case, drives sit at 0x40 + 4*drive->dn */ 462 drive_pci = 0x40; ··· 500 test1 &= ~0x0F; 501 test2 &= ~0x07; 502 503 + 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 recovery 515 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 } 539 540 + static int sis5513_tune_drive(ide_drive_t *drive, u8 pio) 541 { 542 + pio = ide_get_best_pio_mode(drive, pio, 4, NULL); 543 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 } 551 552 static 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 } 635 636 + return ide_config_drive_speed(drive, speed); 637 } 638 639 static int sis5513_config_xfer_rate(ide_drive_t *drive) 640 { 641 + /* 642 + * TODO: always set PIO mode and remove this 643 + */ 644 + sis5513_tuneproc(drive, 255); 645 646 drive->init_speed = 0; 647 ··· 648 return 0; 649 650 if (ide_use_fast_pio(drive)) 651 + sis5513_tuneproc(drive, 255); 652 653 return -1; 654 } ··· 836 if (!hwif->irq) 837 hwif->irq = hwif->channel ? 15 : 14; 838 839 + hwif->tuneproc = &sis5513_tuneproc; 840 hwif->speedproc = &sis5513_tune_chipset; 841 842 if (!(hwif->dma_base)) {
+62 -14
drivers/ide/pci/sl82c105.c
··· 82 83 pio = ide_get_best_pio_mode(drive, pio, 5, &p); 84 85 - drive->drive_data = drv_ctrl = get_pio_timings(&p); 86 87 if (!drive->using_dma) { 88 /* ··· 107 } 108 109 /* 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)); 116 117 - if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) 118 - return 0; 119 120 - return ide_dma_enable(drive); 121 } 122 123 /* ··· 165 { 166 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name)); 167 168 - if (ide_use_dma(drive) && config_for_dma(drive)) 169 return 0; 170 171 return -1; ··· 264 265 rc = __ide_dma_on(drive); 266 if (rc == 0) { 267 - pci_write_config_word(dev, reg, 0x0200); 268 269 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) 363 return -1; 364 - 365 /* 366 * We need to find function 0's revision, not function 1 367 */ 368 pci_read_config_byte(bridge, PCI_REVISION_ID, &rev); 369 370 return rev; 371 } ··· 404 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index)); 405 406 hwif->tuneproc = &sl82c105_tune_drive; 407 hwif->selectproc = &sl82c105_selectproc; 408 hwif->resetproc = &sl82c105_resetproc; 409 ··· 436 } 437 438 hwif->atapi_dma = 1; 439 - hwif->mwdma_mask = 0x04; 440 441 hwif->ide_dma_check = &sl82c105_ide_dma_check; 442 hwif->ide_dma_on = &sl82c105_ide_dma_on;
··· 82 83 pio = ide_get_best_pio_mode(drive, pio, 5, &p); 84 85 + drv_ctrl = get_pio_timings(&p); 86 + 87 + /* 88 + * Store the PIO timings so that we can restore them 89 + * in case DMA will be turned off... 90 + */ 91 + drive->drive_data &= 0xffff0000; 92 + drive->drive_data |= drv_ctrl; 93 94 if (!drive->using_dma) { 95 /* ··· 100 } 101 102 /* 103 + * Configure the drive and chipset for a new transfer speed. 104 */ 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; 109 110 + DBG(("sl82c105_tune_chipset(drive:%s, speed:%s)\n", 111 + drive->name, ide_xfer_verbose(speed))); 112 113 + 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 program 123 + * 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 reprogram 130 + * 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 } 153 154 /* ··· 120 { 121 DBG(("sl82c105_ide_dma_check(drive:%s)\n", drive->name)); 122 123 + if (ide_tune_dma(drive)) 124 return 0; 125 126 return -1; ··· 219 220 rc = __ide_dma_on(drive); 221 if (rc == 0) { 222 + pci_write_config_word(dev, reg, drive->drive_data >> 16); 223 224 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 1 323 */ 324 pci_read_config_byte(bridge, PCI_REVISION_ID, &rev); 325 + pci_dev_put(bridge); 326 327 return rev; 328 } ··· 357 DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index)); 358 359 hwif->tuneproc = &sl82c105_tune_drive; 360 + hwif->speedproc = &sl82c105_tune_chipset; 361 hwif->selectproc = &sl82c105_selectproc; 362 hwif->resetproc = &sl82c105_resetproc; 363 ··· 388 } 389 390 hwif->atapi_dma = 1; 391 + hwif->mwdma_mask = 0x07; 392 393 hwif->ide_dma_check = &sl82c105_ide_dma_check; 394 hwif->ide_dma_on = &sl82c105_ide_dma_on;
+1
drivers/input/joystick/Kconfig
··· 255 256 config JOYSTICK_XPAD 257 tristate "X-Box gamepad support" 258 select USB 259 help 260 Say Y here if you want to use the X-Box pad with your computer.
··· 255 256 config JOYSTICK_XPAD 257 tristate "X-Box gamepad support" 258 + depends on USB_ARCH_HAS_HCD 259 select USB 260 help 261 Say Y here if you want to use the X-Box pad with your computer.
+5
drivers/input/misc/Kconfig
··· 84 85 config INPUT_ATI_REMOTE 86 tristate "ATI / X10 USB RF remote control" 87 select USB 88 help 89 Say Y here if you want to use an ATI or X10 "Lola" USB remote control. ··· 100 101 config INPUT_ATI_REMOTE2 102 tristate "ATI / Philips USB RF remote control" 103 select USB 104 help 105 Say Y here if you want to use an ATI or Philips USB RF remote control. ··· 116 config INPUT_KEYSPAN_REMOTE 117 tristate "Keyspan DMR USB remote control (EXPERIMENTAL)" 118 depends on EXPERIMENTAL 119 select USB 120 help 121 Say Y here if you want to use a Keyspan DMR USB remote control. ··· 131 132 config INPUT_POWERMATE 133 tristate "Griffin PowerMate and Contour Jog support" 134 select USB 135 help 136 Say Y here if you want to use Griffin PowerMate or Contour Jog devices. ··· 148 config INPUT_YEALINK 149 tristate "Yealink usb-p1k voip phone" 150 depends EXPERIMENTAL 151 select USB 152 help 153 Say Y here if you want to enable keyboard and LCD functions of the
··· 84 85 config INPUT_ATI_REMOTE 86 tristate "ATI / X10 USB RF remote control" 87 + depends on USB_ARCH_HAS_HCD 88 select USB 89 help 90 Say Y here if you want to use an ATI or X10 "Lola" USB remote control. ··· 99 100 config INPUT_ATI_REMOTE2 101 tristate "ATI / Philips USB RF remote control" 102 + depends on USB_ARCH_HAS_HCD 103 select USB 104 help 105 Say Y here if you want to use an ATI or Philips USB RF remote control. ··· 114 config INPUT_KEYSPAN_REMOTE 115 tristate "Keyspan DMR USB remote control (EXPERIMENTAL)" 116 depends on EXPERIMENTAL 117 + depends on USB_ARCH_HAS_HCD 118 select USB 119 help 120 Say Y here if you want to use a Keyspan DMR USB remote control. ··· 128 129 config INPUT_POWERMATE 130 tristate "Griffin PowerMate and Contour Jog support" 131 + depends on USB_ARCH_HAS_HCD 132 select USB 133 help 134 Say Y here if you want to use Griffin PowerMate or Contour Jog devices. ··· 144 config INPUT_YEALINK 145 tristate "Yealink usb-p1k voip phone" 146 depends EXPERIMENTAL 147 + depends on USB_ARCH_HAS_HCD 148 select USB 149 help 150 Say Y here if you want to enable keyboard and LCD functions of the
+1
drivers/input/mouse/Kconfig
··· 111 112 config MOUSE_APPLETOUCH 113 tristate "Apple USB Touchpad support" 114 select USB 115 help 116 Say Y here if you want to use an Apple USB Touchpad.
··· 111 112 config MOUSE_APPLETOUCH 113 tristate "Apple USB Touchpad support" 114 + depends on USB_ARCH_HAS_HCD 115 select USB 116 help 117 Say Y here if you want to use an Apple USB Touchpad.
+4
drivers/input/tablet/Kconfig
··· 13 14 config TABLET_USB_ACECAD 15 tristate "Acecad Flair tablet support (USB)" 16 select USB 17 help 18 Say Y here if you want to use the USB version of the Acecad Flair ··· 26 27 config TABLET_USB_AIPTEK 28 tristate "Aiptek 6000U/8000U tablet support (USB)" 29 select USB 30 help 31 Say Y here if you want to use the USB version of the Aiptek 6000U ··· 51 52 config TABLET_USB_KBTAB 53 tristate "KB Gear JamStudio tablet support (USB)" 54 select USB 55 help 56 Say Y here if you want to use the USB version of the KB Gear ··· 64 65 config TABLET_USB_WACOM 66 tristate "Wacom Intuos/Graphire tablet support (USB)" 67 select USB 68 help 69 Say Y here if you want to use the USB version of the Wacom Intuos
··· 13 14 config TABLET_USB_ACECAD 15 tristate "Acecad Flair tablet support (USB)" 16 + depends on USB_ARCH_HAS_HCD 17 select USB 18 help 19 Say Y here if you want to use the USB version of the Acecad Flair ··· 25 26 config TABLET_USB_AIPTEK 27 tristate "Aiptek 6000U/8000U tablet support (USB)" 28 + depends on USB_ARCH_HAS_HCD 29 select USB 30 help 31 Say Y here if you want to use the USB version of the Aiptek 6000U ··· 49 50 config TABLET_USB_KBTAB 51 tristate "KB Gear JamStudio tablet support (USB)" 52 + depends on USB_ARCH_HAS_HCD 53 select USB 54 help 55 Say Y here if you want to use the USB version of the KB Gear ··· 61 62 config TABLET_USB_WACOM 63 tristate "Wacom Intuos/Graphire tablet support (USB)" 64 + depends on USB_ARCH_HAS_HCD 65 select USB 66 help 67 Say Y here if you want to use the USB version of the Wacom Intuos
+1
drivers/input/touchscreen/Kconfig
··· 166 167 config TOUCHSCREEN_USB_COMPOSITE 168 tristate "USB Touchscreen Driver" 169 select USB 170 help 171 USB Touchscreen driver for:
··· 166 167 config TOUCHSCREEN_USB_COMPOSITE 168 tristate "USB Touchscreen Driver" 169 + depends on USB_ARCH_HAS_HCD 170 select USB 171 help 172 USB Touchscreen driver for:
+1 -1
drivers/media/video/em28xx/Kconfig
··· 1 config VIDEO_EM28XX 2 tristate "Empia EM2800/2820/2840 USB video capture support" 3 - depends on VIDEO_V4L1 && I2C 4 select VIDEO_BUF 5 select VIDEO_TUNER 6 select VIDEO_TVEEPROM
··· 1 config VIDEO_EM28XX 2 tristate "Empia EM2800/2820/2840 USB video capture support" 3 + depends on VIDEO_V4L1 && I2C && PCI 4 select VIDEO_BUF 5 select VIDEO_TUNER 6 select VIDEO_TVEEPROM
+1 -1
drivers/media/video/ivtv/Kconfig
··· 1 config VIDEO_IVTV 2 tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" 3 - depends on VIDEO_V4L1 && VIDEO_V4L2 && USB && I2C && EXPERIMENTAL 4 select FW_LOADER 5 select VIDEO_TUNER 6 select VIDEO_TVEEPROM
··· 1 config VIDEO_IVTV 2 tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" 3 + depends on VIDEO_V4L1 && VIDEO_V4L2 && USB && I2C && EXPERIMENTAL && PCI 4 select FW_LOADER 5 select VIDEO_TUNER 6 select VIDEO_TVEEPROM
+1
drivers/net/mlx4/alloc.c
··· 33 #include <linux/errno.h> 34 #include <linux/slab.h> 35 #include <linux/bitmap.h> 36 37 #include "mlx4.h" 38
··· 33 #include <linux/errno.h> 34 #include <linux/slab.h> 35 #include <linux/bitmap.h> 36 + #include <linux/dma-mapping.h> 37 38 #include "mlx4.h" 39
+1
drivers/net/mlx4/eq.c
··· 33 34 #include <linux/init.h> 35 #include <linux/interrupt.h> 36 37 #include <linux/mlx4/cmd.h> 38
··· 33 34 #include <linux/init.h> 35 #include <linux/interrupt.h> 36 + #include <linux/dma-mapping.h> 37 38 #include <linux/mlx4/cmd.h> 39
+1
drivers/net/mlx4/icm.c
··· 33 34 #include <linux/init.h> 35 #include <linux/errno.h> 36 37 #include <linux/mlx4/cmd.h> 38
··· 33 34 #include <linux/init.h> 35 #include <linux/errno.h> 36 + #include <linux/mm.h> 37 38 #include <linux/mlx4/cmd.h> 39
+1
drivers/net/mlx4/reset.c
··· 35 #include <linux/pci.h> 36 #include <linux/delay.h> 37 #include <linux/slab.h> 38 39 #include "mlx4.h" 40
··· 35 #include <linux/pci.h> 36 #include <linux/delay.h> 37 #include <linux/slab.h> 38 + #include <linux/jiffies.h> 39 40 #include "mlx4.h" 41
+28 -17
drivers/net/pasemi_mac.c
··· 85 { 86 struct pci_dev *pdev = mac->pdev; 87 struct device_node *dn = pci_device_to_OF_node(pdev); 88 const u8 *maddr; 89 u8 addr[6]; 90 ··· 95 return -ENOENT; 96 } 97 98 - maddr = of_get_property(dn, "local-mac-address", NULL); 99 100 - /* Fall back to mac-address for older firmware */ 101 if (maddr == NULL) 102 maddr = of_get_property(dn, "mac-address", NULL); 103 ··· 115 return -ENOENT; 116 } 117 118 if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &addr[0], 119 &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) != 6) { 120 dev_warn(&pdev->dev, ··· 123 return -EINVAL; 124 } 125 126 - memcpy(mac->mac_addr, addr, sizeof(addr)); 127 return 0; 128 } 129 ··· 395 396 static void pasemi_mac_restart_rx_intr(struct pasemi_mac *mac) 397 { 398 - unsigned int reg, stat; 399 /* Re-enable packet count interrupts: finally 400 * ack the packet count interrupt we got in rx_intr. 401 */ 402 403 - pci_read_config_dword(mac->iob_pdev, 404 - PAS_IOB_DMA_RXCH_STAT(mac->dma_rxch), 405 - &stat); 406 407 - reg = PAS_IOB_DMA_RXCH_RESET_PCNT(stat & PAS_IOB_DMA_RXCH_STAT_CNTDEL_M) 408 - | PAS_IOB_DMA_RXCH_RESET_PINTC; 409 410 pci_write_config_dword(mac->iob_pdev, 411 PAS_IOB_DMA_RXCH_RESET(mac->dma_rxch), ··· 411 412 static void pasemi_mac_restart_tx_intr(struct pasemi_mac *mac) 413 { 414 - unsigned int reg, stat; 415 416 /* Re-enable packet count interrupts */ 417 - pci_read_config_dword(mac->iob_pdev, 418 - PAS_IOB_DMA_TXCH_STAT(mac->dma_txch), &stat); 419 420 - reg = PAS_IOB_DMA_TXCH_RESET_PCNT(stat & PAS_IOB_DMA_TXCH_STAT_CNTDEL_M) 421 - | PAS_IOB_DMA_TXCH_RESET_PINTC; 422 423 pci_write_config_dword(mac->iob_pdev, 424 PAS_IOB_DMA_TXCH_RESET(mac->dma_txch), reg); ··· 597 { 598 struct net_device *dev = data; 599 struct pasemi_mac *mac = netdev_priv(dev); 600 - unsigned int reg; 601 602 if (!(*mac->tx_status & PAS_STATUS_CAUSE_M)) 603 return IRQ_NONE; 604 605 pasemi_mac_clean_tx(mac); 606 607 - reg = PAS_IOB_DMA_TXCH_RESET_PINTC; 608 609 if (*mac->tx_status & PAS_STATUS_SOFT) 610 reg |= PAS_IOB_DMA_TXCH_RESET_SINTC; 611 if (*mac->tx_status & PAS_STATUS_ERROR) 612 reg |= PAS_IOB_DMA_TXCH_RESET_DINTC; 613 614 - pci_write_config_dword(mac->iob_pdev, PAS_IOB_DMA_TXCH_RESET(mac->dma_txch), 615 reg); 616 617 return IRQ_HANDLED; ··· 983 if (txring->next_to_clean - txring->next_to_use == TX_RING_SIZE) { 984 spin_unlock_irqrestore(&txring->lock, flags); 985 pasemi_mac_clean_tx(mac); 986 spin_lock_irqsave(&txring->lock, flags); 987 988 if (txring->next_to_clean - txring->next_to_use == ··· 1220 static struct pci_device_id pasemi_mac_pci_tbl[] = { 1221 { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa005) }, 1222 { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa006) }, 1223 }; 1224 1225 MODULE_DEVICE_TABLE(pci, pasemi_mac_pci_tbl);
··· 85 { 86 struct pci_dev *pdev = mac->pdev; 87 struct device_node *dn = pci_device_to_OF_node(pdev); 88 + int len; 89 const u8 *maddr; 90 u8 addr[6]; 91 ··· 94 return -ENOENT; 95 } 96 97 + maddr = of_get_property(dn, "local-mac-address", &len); 98 99 + if (maddr && len == 6) { 100 + memcpy(mac->mac_addr, maddr, 6); 101 + return 0; 102 + } 103 + 104 + /* Some old versions of firmware mistakenly uses mac-address 105 + * (and as a string) instead of a byte array in local-mac-address. 106 + */ 107 + 108 if (maddr == NULL) 109 maddr = of_get_property(dn, "mac-address", NULL); 110 ··· 106 return -ENOENT; 107 } 108 109 + 110 if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &addr[0], 111 &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) != 6) { 112 dev_warn(&pdev->dev, ··· 113 return -EINVAL; 114 } 115 116 + memcpy(mac->mac_addr, addr, 6); 117 + 118 return 0; 119 } 120 ··· 384 385 static void pasemi_mac_restart_rx_intr(struct pasemi_mac *mac) 386 { 387 + unsigned int reg, pcnt; 388 /* Re-enable packet count interrupts: finally 389 * ack the packet count interrupt we got in rx_intr. 390 */ 391 392 + pcnt = *mac->rx_status & PAS_STATUS_PCNT_M; 393 394 + reg = PAS_IOB_DMA_RXCH_RESET_PCNT(pcnt) | PAS_IOB_DMA_RXCH_RESET_PINTC; 395 396 pci_write_config_dword(mac->iob_pdev, 397 PAS_IOB_DMA_RXCH_RESET(mac->dma_rxch), ··· 403 404 static void pasemi_mac_restart_tx_intr(struct pasemi_mac *mac) 405 { 406 + unsigned int reg, pcnt; 407 408 /* Re-enable packet count interrupts */ 409 + pcnt = *mac->tx_status & PAS_STATUS_PCNT_M; 410 411 + reg = PAS_IOB_DMA_TXCH_RESET_PCNT(pcnt) | PAS_IOB_DMA_TXCH_RESET_PINTC; 412 413 pci_write_config_dword(mac->iob_pdev, 414 PAS_IOB_DMA_TXCH_RESET(mac->dma_txch), reg); ··· 591 { 592 struct net_device *dev = data; 593 struct pasemi_mac *mac = netdev_priv(dev); 594 + unsigned int reg, pcnt; 595 596 if (!(*mac->tx_status & PAS_STATUS_CAUSE_M)) 597 return IRQ_NONE; 598 599 pasemi_mac_clean_tx(mac); 600 601 + pcnt = *mac->tx_status & PAS_STATUS_PCNT_M; 602 + 603 + reg = PAS_IOB_DMA_TXCH_RESET_PCNT(pcnt) | PAS_IOB_DMA_TXCH_RESET_PINTC; 604 605 if (*mac->tx_status & PAS_STATUS_SOFT) 606 reg |= PAS_IOB_DMA_TXCH_RESET_SINTC; 607 if (*mac->tx_status & PAS_STATUS_ERROR) 608 reg |= PAS_IOB_DMA_TXCH_RESET_DINTC; 609 610 + pci_write_config_dword(mac->iob_pdev, 611 + PAS_IOB_DMA_TXCH_RESET(mac->dma_txch), 612 reg); 613 614 return IRQ_HANDLED; ··· 974 if (txring->next_to_clean - txring->next_to_use == TX_RING_SIZE) { 975 spin_unlock_irqrestore(&txring->lock, flags); 976 pasemi_mac_clean_tx(mac); 977 + pasemi_mac_restart_tx_intr(mac); 978 spin_lock_irqsave(&txring->lock, flags); 979 980 if (txring->next_to_clean - txring->next_to_use == ··· 1210 static struct pci_device_id pasemi_mac_pci_tbl[] = { 1211 { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa005) }, 1212 { PCI_DEVICE(PCI_VENDOR_ID_PASEMI, 0xa006) }, 1213 + { }, 1214 }; 1215 1216 MODULE_DEVICE_TABLE(pci, pasemi_mac_pci_tbl);
+2 -2
drivers/net/pasemi_mac.h
··· 341 PAS_IOB_DMA_TXCH_STAT_CNTDEL_M) 342 #define PAS_IOB_DMA_RXCH_RESET(i) (0x1500 + (i)*4) 343 #define PAS_IOB_DMA_RXCH_RESET_PCNT_M 0xffff0000 344 - #define PAS_IOB_DMA_RXCH_RESET_PCNT_S 0 345 #define PAS_IOB_DMA_RXCH_RESET_PCNT(x) (((x) << PAS_IOB_DMA_RXCH_RESET_PCNT_S) & \ 346 PAS_IOB_DMA_RXCH_RESET_PCNT_M) 347 #define PAS_IOB_DMA_RXCH_RESET_PCNTRST 0x00000020 ··· 352 #define PAS_IOB_DMA_RXCH_RESET_PINTC 0x00000001 353 #define PAS_IOB_DMA_TXCH_RESET(i) (0x1600 + (i)*4) 354 #define PAS_IOB_DMA_TXCH_RESET_PCNT_M 0xffff0000 355 - #define PAS_IOB_DMA_TXCH_RESET_PCNT_S 0 356 #define PAS_IOB_DMA_TXCH_RESET_PCNT(x) (((x) << PAS_IOB_DMA_TXCH_RESET_PCNT_S) & \ 357 PAS_IOB_DMA_TXCH_RESET_PCNT_M) 358 #define PAS_IOB_DMA_TXCH_RESET_PCNTRST 0x00000020
··· 341 PAS_IOB_DMA_TXCH_STAT_CNTDEL_M) 342 #define PAS_IOB_DMA_RXCH_RESET(i) (0x1500 + (i)*4) 343 #define PAS_IOB_DMA_RXCH_RESET_PCNT_M 0xffff0000 344 + #define PAS_IOB_DMA_RXCH_RESET_PCNT_S 16 345 #define PAS_IOB_DMA_RXCH_RESET_PCNT(x) (((x) << PAS_IOB_DMA_RXCH_RESET_PCNT_S) & \ 346 PAS_IOB_DMA_RXCH_RESET_PCNT_M) 347 #define PAS_IOB_DMA_RXCH_RESET_PCNTRST 0x00000020 ··· 352 #define PAS_IOB_DMA_RXCH_RESET_PINTC 0x00000001 353 #define PAS_IOB_DMA_TXCH_RESET(i) (0x1600 + (i)*4) 354 #define PAS_IOB_DMA_TXCH_RESET_PCNT_M 0xffff0000 355 + #define PAS_IOB_DMA_TXCH_RESET_PCNT_S 16 356 #define PAS_IOB_DMA_TXCH_RESET_PCNT(x) (((x) << PAS_IOB_DMA_TXCH_RESET_PCNT_S) & \ 357 PAS_IOB_DMA_TXCH_RESET_PCNT_M) 358 #define PAS_IOB_DMA_TXCH_RESET_PCNTRST 0x00000020
+2 -4
drivers/net/smc911x.c
··· 77 #include <linux/skbuff.h> 78 79 #include <asm/io.h> 80 - #include <asm/irq.h> 81 82 #include "smc911x.h" 83 ··· 2083 lp->ctl_rspeed = 100; 2084 2085 /* Grab the IRQ */ 2086 - retval = request_irq(dev->irq, &smc911x_interrupt, IRQF_SHARED, dev->name, dev); 2087 if (retval) 2088 goto err_out; 2089 - 2090 - set_irq_type(dev->irq, IRQT_FALLING); 2091 2092 #ifdef SMC_USE_DMA 2093 lp->rxdma = SMC_DMA_REQUEST(dev, smc911x_rx_dma_irq);
··· 77 #include <linux/skbuff.h> 78 79 #include <asm/io.h> 80 81 #include "smc911x.h" 82 ··· 2084 lp->ctl_rspeed = 100; 2085 2086 /* Grab the IRQ */ 2087 + retval = request_irq(dev->irq, &smc911x_interrupt, 2088 + IRQF_SHARED | IRQF_TRIGGER_FALLING, dev->name, dev); 2089 if (retval) 2090 goto err_out; 2091 2092 #ifdef SMC_USE_DMA 2093 lp->rxdma = SMC_DMA_REQUEST(dev, smc911x_rx_dma_irq);
+16 -24
drivers/net/ucc_geth.c
··· 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> ··· 3737 3738 const struct ethtool_ops ucc_geth_ethtool_ops = { }; 3739 3740 - 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; 3756 3757 return PHY_INTERFACE_MODE_MII; ··· 3819 ug_info->phy_address = *prop; 3820 3821 /* 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 - else 3829 phy_interface = PHY_INTERFACE_MODE_MII; 3830 } else { 3831 phy_interface = to_phy_interface((const char *)prop); 3832 } 3833 3834 - /* 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 - } 3850 3851 if (max_speed == SPEED_1000) { 3852 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> ··· 3737 3738 const struct ethtool_ops ucc_geth_ethtool_ops = { }; 3739 3740 + 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; 3756 3757 return PHY_INTERFACE_MODE_MII; ··· 3819 ug_info->phy_address = *prop; 3820 3821 /* 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 + } else 3830 phy_interface = PHY_INTERFACE_MODE_MII; 3831 } else { 3832 phy_interface = to_phy_interface((const char *)prop); 3833 } 3834 3835 + /* get speed, or derive from PHY interface */ 3836 + if (max_speed == 0) 3837 switch (phy_interface) { 3838 case PHY_INTERFACE_MODE_GMII: 3839 case PHY_INTERFACE_MODE_RGMII: ··· 3854 max_speed = SPEED_100; 3855 break; 3856 } 3857 3858 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.c 3 * 4 - * Gianfar Ethernet Driver -- MIIM bus implementation 5 - * Provides Bus interface for MIIM regs 6 * 7 - * Author: Li Yang 8 * 9 - * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. 10 * 11 * This program is free software; you can redistribute it and/or modify it 12 * under the terms of the GNU General Public License as published by the
··· 1 /* 2 * drivers/net/ucc_geth_mii.c 3 * 4 + * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation 5 + * Provides Bus interface for MII Management regs in the UCC register space 6 * 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 it 13 * 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.h 3 * 4 - * Gianfar Ethernet Driver -- MII Management Bus Implementation 5 - * Driver for the MDIO bus controller in the Gianfar register space 6 * 7 - * Author: Andy Fleming 8 - * Maintainer: Kumar Gala 9 * 10 - * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. 11 * 12 * This program is free software; you can redistribute it and/or modify it 13 * under the terms of the GNU General Public License as published by the
··· 1 /* 2 * drivers/net/ucc_geth_mii.h 3 * 4 + * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation 5 + * Provides Bus interface for MII Management regs in the UCC register space 6 * 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 it 13 * under the terms of the GNU General Public License as published by the
+3 -2
drivers/pci/hotplug/rpadlpar_sysfs.c
··· 129 }; 130 131 struct kset dlpar_io_kset = { 132 - .subsys = &pci_hotplug_slots_subsys, 133 - .kobj = {.name = DLPAR_KOBJ_NAME, .ktype=&ktype_dlpar_io,}, 134 .ktype = &ktype_dlpar_io, 135 }; 136
··· 129 }; 130 131 struct kset dlpar_io_kset = { 132 + .kobj = {.name = DLPAR_KOBJ_NAME, 133 + .ktype = &ktype_dlpar_io, 134 + .parent = &pci_hotplug_slots_subsys.kobj}, 135 .ktype = &ktype_dlpar_io, 136 }; 137
+2 -1
include/asm-m32r/system.h
··· 10 * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> 11 */ 12 13 #include <asm/assembler.h> 14 15 #ifdef __KERNEL__ ··· 155 #define DCACHE_CLEAR(reg0, reg1, addr) 156 #endif /* CONFIG_CHIP_M32700_TS1 */ 157 158 - static inline unsigned long 159 __xchg(unsigned long x, volatile void * ptr, int size) 160 { 161 unsigned long flags;
··· 10 * Copyright (C) 2004, 2006 Hirokazu Takata <takata at linux-m32r.org> 11 */ 12 13 + #include <linux/compiler.h> 14 #include <asm/assembler.h> 15 16 #ifdef __KERNEL__ ··· 154 #define DCACHE_CLEAR(reg0, reg1, addr) 155 #endif /* CONFIG_CHIP_M32700_TS1 */ 156 157 + static __always_inline unsigned long 158 __xchg(unsigned long x, volatile void * ptr, int size) 159 { 160 unsigned long flags;
+9 -5
include/asm-sh64/dma-mapping.h
··· 35 consistent_free(NULL, size, vaddr, dma_handle); 36 } 37 38 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 39 enum dma_data_direction dir) 40 { ··· 53 if (dev->bus == &pci_bus_type) 54 return virt_to_bus(ptr); 55 #endif 56 - dma_cache_sync(ptr, size, dir); 57 58 return virt_to_bus(ptr); 59 } ··· 67 68 for (i = 0; i < nents; i++) { 69 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 70 - dma_cache_sync(page_address(sg[i].page) + sg[i].offset, 71 sg[i].length, dir); 72 #endif 73 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; ··· 98 if (dev->bus == &pci_bus_type) 99 return; 100 #endif 101 - dma_cache_sync(bus_to_virt(dma_handle), size, dir); 102 } 103 104 static inline void dma_sync_single_range(struct device *dev, ··· 110 if (dev->bus == &pci_bus_type) 111 return; 112 #endif 113 - dma_cache_sync(bus_to_virt(dma_handle) + offset, size, dir); 114 } 115 116 static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, ··· 120 121 for (i = 0; i < nelems; i++) { 122 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 123 - dma_cache_sync(page_address(sg[i].page) + sg[i].offset, 124 sg[i].length, dir); 125 #endif 126 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
··· 35 consistent_free(NULL, size, vaddr, dma_handle); 36 } 37 38 + #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 39 + #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 40 + #define dma_is_consistent(d, h) (1) 41 + 42 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 43 enum dma_data_direction dir) 44 { ··· 49 if (dev->bus == &pci_bus_type) 50 return virt_to_bus(ptr); 51 #endif 52 + dma_cache_sync(dev, ptr, size, dir); 53 54 return virt_to_bus(ptr); 55 } ··· 63 64 for (i = 0; i < nents; i++) { 65 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 66 + dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, 67 sg[i].length, dir); 68 #endif 69 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; ··· 94 if (dev->bus == &pci_bus_type) 95 return; 96 #endif 97 + dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); 98 } 99 100 static inline void dma_sync_single_range(struct device *dev, ··· 106 if (dev->bus == &pci_bus_type) 107 return; 108 #endif 109 + dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); 110 } 111 112 static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, ··· 116 117 for (i = 0; i < nelems; i++) { 118 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT) 119 + dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset, 120 sg[i].length, dir); 121 #endif 122 sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
+1
include/asm-sh64/irq_regs.h
···
··· 1 + #include <asm-generic/irq_regs.h>
+23 -77
include/asm-sh64/pgalloc.h
··· 14 * 15 */ 16 17 - #include <linux/threads.h> 18 #include <linux/mm.h> 19 - 20 - #define pgd_quicklist (current_cpu_data.pgd_quick) 21 - #define pmd_quicklist (current_cpu_data.pmd_quick) 22 - #define pte_quicklist (current_cpu_data.pte_quick) 23 - #define pgtable_cache_size (current_cpu_data.pgtable_cache_sz) 24 25 static inline void pgd_init(unsigned long page) 26 { ··· 41 return ret; 42 } 43 44 - static inline pgd_t *get_pgd_fast(void) 45 { 46 - unsigned long *ret; 47 - 48 - if ((ret = pgd_quicklist) != NULL) { 49 - pgd_quicklist = (unsigned long *)(*ret); 50 - ret[0] = 0; 51 - pgtable_cache_size--; 52 - } else 53 - ret = (unsigned long *)get_pgd_slow(); 54 - 55 - if (ret) { 56 - memset(ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t)); 57 - } 58 - return (pgd_t *)ret; 59 } 60 61 - static inline void free_pgd_fast(pgd_t *pgd) 62 { 63 - *(unsigned long *)pgd = (unsigned long) pgd_quicklist; 64 - pgd_quicklist = (unsigned long *) pgd; 65 - pgtable_cache_size++; 66 } 67 68 - static inline void free_pgd_slow(pgd_t *pgd) 69 { 70 - kfree((void *)pgd); 71 - } 72 - 73 - extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); 74 - extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted); 75 - 76 - static inline pte_t *get_pte_fast(void) 77 - { 78 - unsigned long *ret; 79 - 80 - if((ret = (unsigned long *)pte_quicklist) != NULL) { 81 - pte_quicklist = (unsigned long *)(*ret); 82 - ret[0] = ret[1]; 83 - pgtable_cache_size--; 84 - } 85 - return (pte_t *)ret; 86 - } 87 - 88 - static inline void free_pte_fast(pte_t *pte) 89 - { 90 - *(unsigned long *)pte = (unsigned long) pte_quicklist; 91 - pte_quicklist = (unsigned long *) pte; 92 - pgtable_cache_size++; 93 } 94 95 static inline void pte_free_kernel(pte_t *pte) 96 { 97 - free_page((unsigned long)pte); 98 } 99 100 static inline void pte_free(struct page *pte) 101 { 102 - __free_page(pte); 103 } 104 105 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 106 unsigned long address) 107 { 108 - pte_t *pte; 109 - 110 - pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT|__GFP_ZERO); 111 - 112 - return pte; 113 - } 114 - 115 - static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) 116 - { 117 - struct page *pte; 118 - 119 - pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); 120 - 121 - return pte; 122 } 123 124 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) ··· 91 92 #elif defined(CONFIG_SH64_PGTABLE_3_LEVEL) 93 94 - static __inline__ pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) 95 { 96 - pmd_t *pmd; 97 - pmd = (pmd_t *) __get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); 98 - return pmd; 99 } 100 101 - static __inline__ void pmd_free(pmd_t *pmd) 102 { 103 - free_page((unsigned long) pmd); 104 } 105 106 - #define pgd_populate(mm, pgd, pmd) pgd_set(pgd, pmd) 107 #define __pmd_free_tlb(tlb,pmd) pmd_free(pmd) 108 109 #else 110 #error "No defined page table size" 111 #endif 112 - 113 - #define check_pgt_cache() do { } while (0) 114 - #define pgd_free(pgd) free_pgd_slow(pgd) 115 - #define pgd_alloc(mm) get_pgd_fast() 116 - 117 - extern int do_check_pgt_cache(int, int); 118 119 #define pmd_populate_kernel(mm, pmd, pte) \ 120 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte))) ··· 115 struct page *pte) 116 { 117 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) page_address (pte))); 118 } 119 120 #endif /* __ASM_SH64_PGALLOC_H */
··· 14 * 15 */ 16 17 #include <linux/mm.h> 18 + #include <linux/quicklist.h> 19 + #include <asm/page.h> 20 21 static inline void pgd_init(unsigned long page) 22 { ··· 45 return ret; 46 } 47 48 + static inline pgd_t *pgd_alloc(struct mm_struct *mm) 49 { 50 + return quicklist_alloc(0, GFP_KERNEL, NULL); 51 } 52 53 + static inline void pgd_free(pgd_t *pgd) 54 { 55 + quicklist_free(0, NULL, pgd); 56 } 57 58 + static inline struct page *pte_alloc_one(struct mm_struct *mm, 59 + unsigned long address) 60 { 61 + void *pg = quicklist_alloc(0, GFP_KERNEL, NULL); 62 + return pg ? virt_to_page(pg) : NULL; 63 } 64 65 static inline void pte_free_kernel(pte_t *pte) 66 { 67 + quicklist_free(0, NULL, pte); 68 } 69 70 static inline void pte_free(struct page *pte) 71 { 72 + quicklist_free_page(0, NULL, pte); 73 } 74 75 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 76 unsigned long address) 77 { 78 + return quicklist_alloc(0, GFP_KERNEL, NULL); 79 } 80 81 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) ··· 142 143 #elif defined(CONFIG_SH64_PGTABLE_3_LEVEL) 144 145 + static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) 146 { 147 + return quicklist_alloc(0, GFP_KERNEL, NULL); 148 } 149 150 + static inline void pmd_free(pmd_t *pmd) 151 { 152 + quicklist_free(0, NULL, pmd); 153 } 154 155 + #define pgd_populate(mm, pgd, pmd) pgd_set(pgd, pmd) 156 #define __pmd_free_tlb(tlb,pmd) pmd_free(pmd) 157 158 #else 159 #error "No defined page table size" 160 #endif 161 162 #define pmd_populate_kernel(mm, pmd, pte) \ 163 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte))) ··· 174 struct page *pte) 175 { 176 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) page_address (pte))); 177 + } 178 + 179 + static inline void check_pgt_cache(void) 180 + { 181 + quicklist_trim(0, NULL, 25, 16); 182 } 183 184 #endif /* __ASM_SH64_PGALLOC_H */
+1
include/asm-sh64/sci.h
···
··· 1 + #include <asm-sh/sci.h>
+6
include/asm-sh64/thread_info.h
··· 78 #define TIF_SIGPENDING 2 /* signal pending */ 79 #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 80 #define TIF_MEMDIE 4 81 82 83 #endif /* __KERNEL__ */ 84
··· 78 #define TIF_SIGPENDING 2 /* signal pending */ 79 #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 80 #define TIF_MEMDIE 4 81 + #define TIF_RESTORE_SIGMASK 5 /* Restore signal mask in do_signal */ 82 83 + #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 84 + #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 85 + #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 86 + #define _TIF_MEMDIE (1 << TIF_MEMDIE) 87 + #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) 88 89 #endif /* __KERNEL__ */ 90
+37 -6
include/asm-sh64/unistd.h
··· 9 * include/asm-sh64/unistd.h 10 * 11 * Copyright (C) 2000, 2001 Paolo Alberelli 12 - * Copyright (C) 2003 Paul Mundt 13 * Copyright (C) 2004 Sean McGoogan 14 * 15 * This file contains the system call numbers. 16 * 17 */ 18 19 - #define __NR_setup 0 /* used only by init, to get system going */ 20 #define __NR_exit 1 21 #define __NR_fork 2 22 #define __NR_read 3 ··· 196 #define __NR_rt_sigtimedwait 177 197 #define __NR_rt_sigqueueinfo 178 198 #define __NR_rt_sigsuspend 179 199 - #define __NR_pread 180 200 - #define __NR_pwrite 181 201 #define __NR_chown 182 202 #define __NR_getcwd 183 203 #define __NR_capget 184 ··· 343 #define __NR_inotify_init 318 344 #define __NR_inotify_add_watch 319 345 #define __NR_inotify_rm_watch 320 346 347 - #ifdef __KERNEL__ 348 349 - #define NR_syscalls 321 350 351 #define __ARCH_WANT_IPC_PARSE_VERSION 352 #define __ARCH_WANT_OLD_READDIR
··· 9 * include/asm-sh64/unistd.h 10 * 11 * Copyright (C) 2000, 2001 Paolo Alberelli 12 + * Copyright (C) 2003 - 2007 Paul Mundt 13 * Copyright (C) 2004 Sean McGoogan 14 * 15 * This file contains the system call numbers. 16 * 17 */ 18 19 + #define __NR_restart_syscall 0 20 #define __NR_exit 1 21 #define __NR_fork 2 22 #define __NR_read 3 ··· 196 #define __NR_rt_sigtimedwait 177 197 #define __NR_rt_sigqueueinfo 178 198 #define __NR_rt_sigsuspend 179 199 + #define __NR_pread64 180 200 + #define __NR_pwrite64 181 201 #define __NR_chown 182 202 #define __NR_getcwd 183 203 #define __NR_capget 184 ··· 343 #define __NR_inotify_init 318 344 #define __NR_inotify_add_watch 319 345 #define __NR_inotify_rm_watch 320 346 + /* 321 is unused */ 347 + #define __NR_migrate_pages 322 348 + #define __NR_openat 323 349 + #define __NR_mkdirat 324 350 + #define __NR_mknodat 325 351 + #define __NR_fchownat 326 352 + #define __NR_futimesat 327 353 + #define __NR_fstatat64 328 354 + #define __NR_unlinkat 329 355 + #define __NR_renameat 330 356 + #define __NR_linkat 331 357 + #define __NR_symlinkat 332 358 + #define __NR_readlinkat 333 359 + #define __NR_fchmodat 334 360 + #define __NR_faccessat 335 361 + #define __NR_pselect6 336 362 + #define __NR_ppoll 337 363 + #define __NR_unshare 338 364 + #define __NR_set_robust_list 339 365 + #define __NR_get_robust_list 340 366 + #define __NR_splice 341 367 + #define __NR_sync_file_range 342 368 + #define __NR_tee 343 369 + #define __NR_vmsplice 344 370 + #define __NR_move_pages 345 371 + #define __NR_getcpu 346 372 + #define __NR_epoll_pwait 347 373 + #define __NR_utimensat 348 374 + #define __NR_signalfd 349 375 + #define __NR_timerfd 350 376 + #define __NR_eventfd 351 377 378 + #ifdef __KERNEL__ 379 380 + #define NR_syscalls 352 381 382 #define __ARCH_WANT_IPC_PARSE_VERSION 383 #define __ARCH_WANT_OLD_READDIR
-3
include/linux/ide.h
··· 1281 int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); 1282 int __ide_dma_bad_drive(ide_drive_t *); 1283 int __ide_dma_good_drive(ide_drive_t *); 1284 - int ide_use_dma(ide_drive_t *); 1285 u8 ide_max_dma_mode(ide_drive_t *); 1286 int ide_tune_dma(ide_drive_t *); 1287 void ide_dma_off(ide_drive_t *); ··· 1308 #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ 1309 1310 #else 1311 - static inline int ide_use_dma(ide_drive_t *drive) { return 0; } 1312 static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } 1313 static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } 1314 static inline void ide_dma_off(ide_drive_t *drive) { ; } ··· 1355 1356 /* ide-lib.c */ 1357 u8 ide_rate_filter(ide_drive_t *, u8); 1358 - extern int ide_dma_enable(ide_drive_t *drive); 1359 extern char *ide_xfer_verbose(u8 xfer_rate); 1360 extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1361 extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
··· 1281 int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); 1282 int __ide_dma_bad_drive(ide_drive_t *); 1283 int __ide_dma_good_drive(ide_drive_t *); 1284 u8 ide_max_dma_mode(ide_drive_t *); 1285 int ide_tune_dma(ide_drive_t *); 1286 void ide_dma_off(ide_drive_t *); ··· 1309 #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ 1310 1311 #else 1312 static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } 1313 static inline int ide_tune_dma(ide_drive_t *drive) { return 0; } 1314 static inline void ide_dma_off(ide_drive_t *drive) { ; } ··· 1357 1358 /* ide-lib.c */ 1359 u8 ide_rate_filter(ide_drive_t *, u8); 1360 extern char *ide_xfer_verbose(u8 xfer_rate); 1361 extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1362 extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
+2
kernel/auditfilter.c
··· 311 return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); 312 } 313 314 static inline int audit_match_class_bits(int class, u32 *mask) 315 { 316 int i; ··· 348 return 1; 349 } 350 } 351 352 /* Common user-space to kernel rule translation. */ 353 static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
··· 311 return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); 312 } 313 314 + #ifdef CONFIG_AUDITSYSCALL 315 static inline int audit_match_class_bits(int class, u32 *mask) 316 { 317 int i; ··· 347 return 1; 348 } 349 } 350 + #endif 351 352 /* Common user-space to kernel rule translation. */ 353 static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
+1 -1
mm/Kconfig
··· 166 config NR_QUICK 167 int 168 depends on QUICKLIST 169 - default "2" if SUPERH 170 default "1"
··· 166 config NR_QUICK 167 int 168 depends on QUICKLIST 169 + default "2" if (SUPERH && !SUPERH64) 170 default "1"