aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/ide.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc/ide.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-ppc/ide.h')
-rw-r--r--include/asm-ppc/ide.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
new file mode 100644
index 000000000000..7d6e6599fac4
--- /dev/null
+++ b/include/asm-ppc/ide.h
@@ -0,0 +1,78 @@
1/*
2 * linux/include/asm-ppc/ide.h
3 *
4 * Copyright (C) 1994-1996 Linus Torvalds & authors */
5
6/*
7 * This file contains the ppc architecture specific IDE code.
8 */
9
10#ifndef __ASMPPC_IDE_H
11#define __ASMPPC_IDE_H
12
13#ifdef __KERNEL__
14
15#include <linux/sched.h>
16#include <asm/mpc8xx.h>
17
18#ifndef MAX_HWIFS
19#define MAX_HWIFS 8
20#endif
21
22#include <linux/config.h>
23#include <linux/hdreg.h>
24#include <linux/ioport.h>
25#include <asm/io.h>
26
27extern void __ide_mm_insw(void __iomem *port, void *addr, u32 count);
28extern void __ide_mm_outsw(void __iomem *port, void *addr, u32 count);
29extern void __ide_mm_insl(void __iomem *port, void *addr, u32 count);
30extern void __ide_mm_outsl(void __iomem *port, void *addr, u32 count);
31
32struct ide_machdep_calls {
33 int (*default_irq)(unsigned long base);
34 unsigned long (*default_io_base)(int index);
35 void (*ide_init_hwif)(hw_regs_t *hw,
36 unsigned long data_port,
37 unsigned long ctrl_port,
38 int *irq);
39};
40
41extern struct ide_machdep_calls ppc_ide_md;
42
43#undef SUPPORT_SLOW_DATA_PORTS
44#define SUPPORT_SLOW_DATA_PORTS 0
45
46#define IDE_ARCH_OBSOLETE_DEFAULTS
47
48static __inline__ int ide_default_irq(unsigned long base)
49{
50 if (ppc_ide_md.default_irq)
51 return ppc_ide_md.default_irq(base);
52 return 0;
53}
54
55static __inline__ unsigned long ide_default_io_base(int index)
56{
57 if (ppc_ide_md.default_io_base)
58 return ppc_ide_md.default_io_base(index);
59 return 0;
60}
61
62#define IDE_ARCH_OBSOLETE_INIT
63#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
64
65#ifdef CONFIG_PCI
66#define ide_init_default_irq(base) (0)
67#else
68#define ide_init_default_irq(base) ide_default_irq(base)
69#endif
70
71#if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE )
72#define IDE_ARCH_ACK_INTR 1
73#define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1)
74#endif
75
76#endif /* __KERNEL__ */
77
78#endif /* __ASMPPC_IDE_H */