diff options
Diffstat (limited to 'drivers/ide/pci/cmd640.c')
-rw-r--r-- | drivers/ide/pci/cmd640.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 7240c20b9593..ea0cb500df6a 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -703,6 +703,18 @@ static int pci_conf2(void) | |||
703 | return 0; | 703 | return 0; |
704 | } | 704 | } |
705 | 705 | ||
706 | static const struct ide_port_info cmd640_port_info __initdata = { | ||
707 | .chipset = ide_cmd640, | ||
708 | .host_flags = IDE_HFLAG_SERIALIZE | | ||
709 | IDE_HFLAG_NO_DMA | | ||
710 | IDE_HFLAG_NO_AUTOTUNE | | ||
711 | IDE_HFLAG_ABUSE_PREFETCH | | ||
712 | IDE_HFLAG_ABUSE_FAST_DEVSEL, | ||
713 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED | ||
714 | .pio_mask = ATA_PIO5, | ||
715 | #endif | ||
716 | }; | ||
717 | |||
706 | /* | 718 | /* |
707 | * Probe for a cmd640 chipset, and initialize it if found. | 719 | * Probe for a cmd640 chipset, and initialize it if found. |
708 | */ | 720 | */ |
@@ -760,11 +772,7 @@ static int __init cmd640x_init(void) | |||
760 | setup_device_ptrs (); | 772 | setup_device_ptrs (); |
761 | printk("%s: buggy cmd640%c interface on %s, config=0x%02x\n", | 773 | printk("%s: buggy cmd640%c interface on %s, config=0x%02x\n", |
762 | cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr); | 774 | cmd_hwif0->name, 'a' + cmd640_chip_version - 1, bus_type, cfr); |
763 | cmd_hwif0->chipset = ide_cmd640; | ||
764 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED | 775 | #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; | 776 | cmd_hwif0->set_pio_mode = &cmd640_set_pio_mode; |
769 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ | 777 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ |
770 | 778 | ||
@@ -815,23 +823,14 @@ static int __init cmd640x_init(void) | |||
815 | * Initialize data for secondary cmd640 port, if enabled | 823 | * Initialize data for secondary cmd640 port, if enabled |
816 | */ | 824 | */ |
817 | if (second_port_cmd640) { | 825 | 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 | 826 | #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; | 827 | cmd_hwif1->set_pio_mode = &cmd640_set_pio_mode; |
829 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ | 828 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ |
830 | 829 | ||
831 | idx[1] = cmd_hwif1->index; | 830 | idx[1] = cmd_hwif1->index; |
832 | } | 831 | } |
833 | printk(KERN_INFO "%s: %sserialized, secondary interface %s\n", cmd_hwif1->name, | 832 | printk(KERN_INFO "%s: %sserialized, secondary interface %s\n", cmd_hwif1->name, |
834 | cmd_hwif0->serialized ? "" : "not ", port2); | 833 | second_port_cmd640 ? "" : "not ", port2); |
835 | 834 | ||
836 | /* | 835 | /* |
837 | * Establish initial timings/prefetch for all drives. | 836 | * Establish initial timings/prefetch for all drives. |
@@ -876,7 +875,7 @@ static int __init cmd640x_init(void) | |||
876 | cmd640_dump_regs(); | 875 | cmd640_dump_regs(); |
877 | #endif | 876 | #endif |
878 | 877 | ||
879 | ide_device_add(idx); | 878 | ide_device_add(idx, &cmd640_port_info); |
880 | 879 | ||
881 | return 1; | 880 | return 1; |
882 | } | 881 | } |