aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cmd640.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-02-02 15:58:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-02-02 15:58:57 -0500
commit9135f1901ee6449dfe338adf6e40e9c2025b8150 (patch)
tree05e1ab38563a93cf0df8c05d21062b85b14f8491 /drivers/ide/pci/cmd640.c
parent124d3b7041f9a0ca7c43a6293e1cae4576c32fd5 (diff)
parentd59823fa44f7d9babf586b3c705db314aa0f9822 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (95 commits) ide-tape: remove idetape_config_t typedef ide-tape: remove mtio.h related comments ide-tape: make function name more accurate ide-tape: remove unused sense packet commands. ide-tape: use generic byteorder macros ide-tape: remove EXPERIMENTAL driver status ide-tape: use generic scsi commands ide-tape: remove struct idetape_block_size_page_t ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t ide-tape: remove struct idetape_parameter_block_descriptor_t ide-tape: remove struct idetape_medium_partition_page_t ide-tape: remove struct idetape_data_compression_page_t ide-tape: remove struct idetape_inquiry_result_t ide-tape: remove struct idetape_capabilities_page_t ide-tape: remove IDETAPE_DEBUG_BUGS ide-tape: remove IDETAPE_DEBUG_INFO ide-tape: dump gcw fields on error in idetape_identify_device() ide-tape: remove struct idetape_mode_parameter_header_t ide-tape: remove struct idetape_request_sense_result_t ide-tape: remove dead code ...
Diffstat (limited to 'drivers/ide/pci/cmd640.c')
-rw-r--r--drivers/ide/pci/cmd640.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index 7240c20b9593..bd24dad3cfc6 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -103,10 +103,6 @@
103#include <linux/types.h> 103#include <linux/types.h>
104#include <linux/kernel.h> 104#include <linux/kernel.h>
105#include <linux/delay.h> 105#include <linux/delay.h>
106#include <linux/timer.h>
107#include <linux/mm.h>
108#include <linux/ioport.h>
109#include <linux/blkdev.h>
110#include <linux/hdreg.h> 106#include <linux/hdreg.h>
111#include <linux/ide.h> 107#include <linux/ide.h>
112#include <linux/init.h> 108#include <linux/init.h>
@@ -703,6 +699,18 @@ static int pci_conf2(void)
703 return 0; 699 return 0;
704} 700}
705 701
702static const struct ide_port_info cmd640_port_info __initdata = {
703 .chipset = ide_cmd640,
704 .host_flags = IDE_HFLAG_SERIALIZE |
705 IDE_HFLAG_NO_DMA |
706 IDE_HFLAG_NO_AUTOTUNE |
707 IDE_HFLAG_ABUSE_PREFETCH |
708 IDE_HFLAG_ABUSE_FAST_DEVSEL,
709#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
710 .pio_mask = ATA_PIO5,
711#endif
712};
713
706/* 714/*
707 * Probe for a cmd640 chipset, and initialize it if found. 715 * Probe for a cmd640 chipset, and initialize it if found.
708 */ 716 */
@@ -760,11 +768,7 @@ static int __init cmd640x_init(void)
760 setup_device_ptrs (); 768 setup_device_ptrs ();
761 printk("%s: buggy cmd640%c interface on %s, config=0x%02x\n", 769 printk("%s: buggy cmd640%c interface on %s, config=0x%02x\n",
762 cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr); 770 cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr);
763 cmd_hwif0->chipset = ide_cmd640;
764#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED 771#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
765 cmd_hwif0->host_flags = IDE_HFLAG_ABUSE_PREFETCH |
766 IDE_HFLAG_ABUSE_FAST_DEVSEL;
767 cmd_hwif0->pio_mask = ATA_PIO5;
768 cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode; 772 cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode;
769#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ 773#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
770 774
@@ -815,23 +819,14 @@ static int __init cmd640x_init(void)
815 * Initialize data for secondary cmd640 port, if enabled 819 * Initialize data for secondary cmd640 port, if enabled
816 */ 820 */
817 if (second_port_cmd640) { 821 if (second_port_cmd640) {
818 cmd_hwif0->serialized = 1;
819 cmd_hwif1->serialized = 1;
820 cmd_hwif1->chipset = ide_cmd640;
821 cmd_hwif0->mate = cmd_hwif1;
822 cmd_hwif1->mate = cmd_hwif0;
823 cmd_hwif1->channel = 1;
824#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED 822#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
825 cmd_hwif1->host_flags = IDE_HFLAG_ABUSE_PREFETCH |
826 IDE_HFLAG_ABUSE_FAST_DEVSEL;
827 cmd_hwif1->pio_mask = ATA_PIO5;
828 cmd_hwif1->set_pio_mode = &cmd640_set_pio_mode; 823 cmd_hwif1->set_pio_mode = &cmd640_set_pio_mode;
829#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ 824#endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */
830 825
831 idx[1] = cmd_hwif1->index; 826 idx[1] = cmd_hwif1->index;
832 } 827 }
833 printk(KERN_INFO "%s: %sserialized, secondary interface %s\n", cmd_hwif1->name, 828 printk(KERN_INFO "%s: %sserialized, secondary interface %s\n", cmd_hwif1->name,
834 cmd_hwif0->serialized ? "" : "not ", port2); 829 second_port_cmd640 ? "" : "not ", port2);
835 830
836 /* 831 /*
837 * Establish initial timings/prefetch for all drives. 832 * Establish initial timings/prefetch for all drives.
@@ -876,7 +871,7 @@ static int __init cmd640x_init(void)
876 cmd640_dump_regs(); 871 cmd640_dump_regs();
877#endif 872#endif
878 873
879 ide_device_add(idx); 874 ide_device_add(idx, &cmd640_port_info);
880 875
881 return 1; 876 return 1;
882} 877}