aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:32 -0400
commit18e181fe13b7340194d09e6dd7f571a5f96f0367 (patch)
treebe2a8ab3e86f297f27249225f7c27bde372c8d0e
parent86f3a492bb09eee5745b93af35f2212179c251fd (diff)
ide: add hwif->ack_intr hook
* Add hwif->ack_intr hook and use it instead of hwif->hw.ack_intr. * Add missing brackets to cris-v32 and powerpc ide_ack_intr() macros. Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide.c1
-rw-r--r--drivers/ide/ppc/mpc8xx.c4
-rw-r--r--include/asm-cris/arch-v32/ide.h2
-rw-r--r--include/asm-m68k/ide.h2
-rw-r--r--include/asm-powerpc/ide.h2
-rw-r--r--include/linux/ide.h2
6 files changed, 8 insertions, 5 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 4a668d51965d..b7e872e29f9c 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -737,6 +737,7 @@ found:
737 hwif->fixup = fixup; 737 hwif->fixup = fixup;
738 hwif->chipset = hw->chipset; 738 hwif->chipset = hw->chipset;
739 hwif->gendev.parent = hw->dev; 739 hwif->gendev.parent = hw->dev;
740 hwif->ack_intr = hw->ack_intr;
740 741
741 if (initializing == 0) { 742 if (initializing == 0) {
742 u8 idx[4] = { index, 0xff, 0xff, 0xff }; 743 u8 idx[4] = { index, 0xff, 0xff, 0xff };
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index df2e92034f5d..5f0da35ab5ad 100644
--- a/drivers/ide/ppc/mpc8xx.c
+++ b/drivers/ide/ppc/mpc8xx.c
@@ -316,8 +316,8 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
316 316
317 ide_hwifs[data_port].pio_mask = ATA_PIO4; 317 ide_hwifs[data_port].pio_mask = ATA_PIO4;
318 ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; 318 ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode;
319 ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack;
319 320
320 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
321 /* Enable Harddisk Interrupt, 321 /* Enable Harddisk Interrupt,
322 * and make it edge sensitive 322 * and make it edge sensitive
323 */ 323 */
@@ -402,8 +402,8 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
402 402
403 ide_hwifs[data_port].pio_mask = ATA_PIO4; 403 ide_hwifs[data_port].pio_mask = ATA_PIO4;
404 ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; 404 ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode;
405 ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack;
405 406
406 hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
407 /* Enable Harddisk Interrupt, 407 /* Enable Harddisk Interrupt,
408 * and make it edge sensitive 408 * and make it edge sensitive
409 */ 409 */
diff --git a/include/asm-cris/arch-v32/ide.h b/include/asm-cris/arch-v32/ide.h
index 6590f657500d..11296170d057 100644
--- a/include/asm-cris/arch-v32/ide.h
+++ b/include/asm-cris/arch-v32/ide.h
@@ -54,7 +54,7 @@ static inline unsigned long ide_default_io_base(int index)
54#define SUPPORT_VLB_SYNC 0 54#define SUPPORT_VLB_SYNC 0
55 55
56#define IDE_ARCH_ACK_INTR 56#define IDE_ARCH_ACK_INTR
57#define ide_ack_intr(hwif) (hwif)->hw.ack_intr(hwif) 57#define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif))
58 58
59#endif /* __KERNEL__ */ 59#endif /* __KERNEL__ */
60 60
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h
index f9ffb2cbbae8..909c6dfd3851 100644
--- a/include/asm-m68k/ide.h
+++ b/include/asm-m68k/ide.h
@@ -137,7 +137,7 @@ ide_get_lock(irq_handler_t handler, void *data)
137#endif /* CONFIG_BLK_DEV_FALCON_IDE */ 137#endif /* CONFIG_BLK_DEV_FALCON_IDE */
138 138
139#define IDE_ARCH_ACK_INTR 139#define IDE_ARCH_ACK_INTR
140#define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) 140#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
141 141
142#endif /* __KERNEL__ */ 142#endif /* __KERNEL__ */
143#endif /* _M68K_IDE_H */ 143#endif /* _M68K_IDE_H */
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h
index e61dad73353f..fd7f5a430f0a 100644
--- a/include/asm-powerpc/ide.h
+++ b/include/asm-powerpc/ide.h
@@ -69,7 +69,7 @@ static __inline__ unsigned long ide_default_io_base(int index)
69 69
70#ifdef CONFIG_BLK_DEV_MPC8xx_IDE 70#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
71#define IDE_ARCH_ACK_INTR 1 71#define IDE_ARCH_ACK_INTR 1
72#define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) 72#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
73#endif 73#endif
74 74
75#endif /* __powerpc64__ */ 75#endif /* __powerpc64__ */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9686cb47eee1..1e6bf04160d8 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -683,6 +683,8 @@ typedef struct hwif_s {
683 struct pci_dev *pci_dev; /* for pci chipsets */ 683 struct pci_dev *pci_dev; /* for pci chipsets */
684 struct ide_pci_device_s *cds; /* chipset device struct */ 684 struct ide_pci_device_s *cds; /* chipset device struct */
685 685
686 ide_ack_intr_t *ack_intr;
687
686 void (*rw_disk)(ide_drive_t *, struct request *); 688 void (*rw_disk)(ide_drive_t *, struct request *);
687 689
688#if 0 690#if 0