diff options
Diffstat (limited to 'drivers/ide/pci/jmicron.c')
-rw-r--r-- | drivers/ide/pci/jmicron.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index 673f7dc8ba65..96ef7394f283 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -19,13 +19,13 @@ typedef enum { | |||
19 | } port_type; | 19 | } port_type; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * ata66_jmicron - Cable check | 22 | * jmicron_cable_detect - cable detection |
23 | * @hwif: IDE port | 23 | * @hwif: IDE port |
24 | * | 24 | * |
25 | * Returns the cable type. | 25 | * Returns the cable type. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | static u8 __devinit ata66_jmicron(ide_hwif_t *hwif) | 28 | static u8 __devinit jmicron_cable_detect(ide_hwif_t *hwif) |
29 | { | 29 | { |
30 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 30 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
31 | 31 | ||
@@ -95,25 +95,16 @@ static void jmicron_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
95 | { | 95 | { |
96 | } | 96 | } |
97 | 97 | ||
98 | /** | 98 | static const struct ide_port_ops jmicron_port_ops = { |
99 | * init_hwif_jmicron - set up hwif structs | 99 | .set_pio_mode = jmicron_set_pio_mode, |
100 | * @hwif: interface to set up | 100 | .set_dma_mode = jmicron_set_dma_mode, |
101 | * | 101 | .cable_detect = jmicron_cable_detect, |
102 | * Minimal set up is required for the Jmicron hardware. | 102 | }; |
103 | */ | ||
104 | |||
105 | static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) | ||
106 | { | ||
107 | hwif->set_pio_mode = &jmicron_set_pio_mode; | ||
108 | hwif->set_dma_mode = &jmicron_set_dma_mode; | ||
109 | |||
110 | hwif->cable_detect = ata66_jmicron; | ||
111 | } | ||
112 | 103 | ||
113 | static const struct ide_port_info jmicron_chipset __devinitdata = { | 104 | static const struct ide_port_info jmicron_chipset __devinitdata = { |
114 | .name = "JMB", | 105 | .name = "JMB", |
115 | .init_hwif = init_hwif_jmicron, | ||
116 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, | 106 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, |
107 | .port_ops = &jmicron_port_ops, | ||
117 | .pio_mask = ATA_PIO5, | 108 | .pio_mask = ATA_PIO5, |
118 | .mwdma_mask = ATA_MWDMA2, | 109 | .mwdma_mask = ATA_MWDMA2, |
119 | .udma_mask = ATA_UDMA6, | 110 | .udma_mask = ATA_UDMA6, |