diff options
Diffstat (limited to 'drivers/ide/pci/jmicron.c')
-rw-r--r-- | drivers/ide/pci/jmicron.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index a56bcb4f22f4..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 | ||
@@ -63,8 +63,7 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif) | |||
63 | * actually do our cable checking etc. Thankfully we don't need | 63 | * actually do our cable checking etc. Thankfully we don't need |
64 | * to do the plumbing for other cases. | 64 | * to do the plumbing for other cases. |
65 | */ | 65 | */ |
66 | switch (port_map[port]) | 66 | switch (port_map[port]) { |
67 | { | ||
68 | case PORT_PATA0: | 67 | case PORT_PATA0: |
69 | if (control & (1 << 3)) /* 40/80 pin primary */ | 68 | if (control & (1 << 3)) /* 40/80 pin primary */ |
70 | return ATA_CBL_PATA40; | 69 | return ATA_CBL_PATA40; |
@@ -96,26 +95,16 @@ static void jmicron_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
96 | { | 95 | { |
97 | } | 96 | } |
98 | 97 | ||
99 | /** | 98 | static const struct ide_port_ops jmicron_port_ops = { |
100 | * init_hwif_jmicron - set up hwif structs | 99 | .set_pio_mode = jmicron_set_pio_mode, |
101 | * @hwif: interface to set up | 100 | .set_dma_mode = jmicron_set_dma_mode, |
102 | * | 101 | .cable_detect = jmicron_cable_detect, |
103 | * Minimal set up is required for the Jmicron hardware. | 102 | }; |
104 | */ | ||
105 | |||
106 | static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) | ||
107 | { | ||
108 | hwif->set_pio_mode = &jmicron_set_pio_mode; | ||
109 | hwif->set_dma_mode = &jmicron_set_dma_mode; | ||
110 | |||
111 | hwif->cable_detect = ata66_jmicron; | ||
112 | } | ||
113 | 103 | ||
114 | static const struct ide_port_info jmicron_chipset __devinitdata = { | 104 | static const struct ide_port_info jmicron_chipset __devinitdata = { |
115 | .name = "JMB", | 105 | .name = "JMB", |
116 | .init_hwif = init_hwif_jmicron, | ||
117 | .host_flags = IDE_HFLAG_BOOTABLE, | ||
118 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, | 106 | .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, |
107 | .port_ops = &jmicron_port_ops, | ||
119 | .pio_mask = ATA_PIO5, | 108 | .pio_mask = ATA_PIO5, |
120 | .mwdma_mask = ATA_MWDMA2, | 109 | .mwdma_mask = ATA_MWDMA2, |
121 | .udma_mask = ATA_UDMA6, | 110 | .udma_mask = ATA_UDMA6, |