diff options
Diffstat (limited to 'drivers/ide/cmd640.c')
| -rw-r--r-- | drivers/ide/cmd640.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c index 1683ed5c7329..1a32d62ed86b 100644 --- a/drivers/ide/cmd640.c +++ b/drivers/ide/cmd640.c | |||
| @@ -153,6 +153,7 @@ static int cmd640_vlb; | |||
| 153 | #define ARTTIM23 0x57 | 153 | #define ARTTIM23 0x57 |
| 154 | #define ARTTIM23_DIS_RA2 0x04 | 154 | #define ARTTIM23_DIS_RA2 0x04 |
| 155 | #define ARTTIM23_DIS_RA3 0x08 | 155 | #define ARTTIM23_DIS_RA3 0x08 |
| 156 | #define ARTTIM23_IDE23INTR 0x10 | ||
| 156 | #define DRWTIM23 0x58 | 157 | #define DRWTIM23 0x58 |
| 157 | #define BRST 0x59 | 158 | #define BRST 0x59 |
| 158 | 159 | ||
| @@ -629,12 +630,24 @@ static void cmd640_init_dev(ide_drive_t *drive) | |||
| 629 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ | 630 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ |
| 630 | } | 631 | } |
| 631 | 632 | ||
| 633 | static int cmd640_test_irq(ide_hwif_t *hwif) | ||
| 634 | { | ||
| 635 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
| 636 | int irq_reg = hwif->channel ? ARTTIM23 : CFR; | ||
| 637 | u8 irq_stat, irq_mask = hwif->channel ? ARTTIM23_IDE23INTR : | ||
| 638 | CFR_IDE01INTR; | ||
| 639 | |||
| 640 | pci_read_config_byte(dev, irq_reg, &irq_stat); | ||
| 641 | |||
| 642 | return (irq_stat & irq_mask) ? 1 : 0; | ||
| 643 | } | ||
| 632 | 644 | ||
| 633 | static const struct ide_port_ops cmd640_port_ops = { | 645 | static const struct ide_port_ops cmd640_port_ops = { |
| 634 | .init_dev = cmd640_init_dev, | 646 | .init_dev = cmd640_init_dev, |
| 635 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED | 647 | #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED |
| 636 | .set_pio_mode = cmd640_set_pio_mode, | 648 | .set_pio_mode = cmd640_set_pio_mode, |
| 637 | #endif | 649 | #endif |
| 650 | .test_irq = cmd640_test_irq, | ||
| 638 | }; | 651 | }; |
| 639 | 652 | ||
| 640 | static int pci_conf1(void) | 653 | static int pci_conf1(void) |
