2 * Copyright (C) 1994-1996 Linus Torvalds & authors
4 * This file contains the powerpc architecture specific IDE code.
6 #ifndef _ASM_POWERPC_IDE_H
7 #define _ASM_POWERPC_IDE_H
12 #include <linux/sched.h>
13 #include <asm/mpc8xx.h>
25 #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c))
26 #define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c))
27 #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c))
28 #define __ide_mm_outsl(p, a, c) writesl((void __iomem *)(p), (a), (c))
31 #include <linux/hdreg.h>
32 #include <linux/ioport.h>
34 struct ide_machdep_calls {
35 int (*default_irq)(unsigned long base);
36 unsigned long (*default_io_base)(int index);
37 void (*ide_init_hwif)(hw_regs_t *hw,
38 unsigned long data_port,
39 unsigned long ctrl_port,
43 extern struct ide_machdep_calls ppc_ide_md;
45 #define IDE_ARCH_OBSOLETE_DEFAULTS
47 static __inline__ int ide_default_irq(unsigned long base)
49 if (ppc_ide_md.default_irq)
50 return ppc_ide_md.default_irq(base);
54 static __inline__ unsigned long ide_default_io_base(int index)
56 if (ppc_ide_md.default_io_base)
57 return ppc_ide_md.default_io_base(index);
62 #define ide_init_default_irq(base) (0)
64 #define ide_init_default_irq(base) ide_default_irq(base)
67 #ifdef CONFIG_BLK_DEV_MPC8xx_IDE
68 #define IDE_ARCH_ACK_INTR 1
69 #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
72 #endif /* __powerpc64__ */
74 #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
76 #endif /* __KERNEL__ */
78 #endif /* _ASM_POWERPC_IDE_H */