sh: Initial ELF FDPIC support.
[deliverable/linux.git] / include / asm-powerpc / ide.h
CommitLineData
1da177e4 1/*
b354cab0 2 * Copyright (C) 1994-1996 Linus Torvalds & authors
1da177e4 3 *
b354cab0 4 * This file contains the powerpc architecture specific IDE code.
1da177e4 5 */
b354cab0
SR
6#ifndef _ASM_POWERPC_IDE_H
7#define _ASM_POWERPC_IDE_H
1da177e4
LT
8
9#ifdef __KERNEL__
10
b354cab0 11#ifndef __powerpc64__
1da177e4
LT
12#include <linux/sched.h>
13#include <asm/mpc8xx.h>
b354cab0 14#endif
73ea9e1b 15#include <asm/io.h>
1da177e4 16
4cb3cee0
BH
17#define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c))
18#define __ide_mm_insl(p, a, c) readsl((void __iomem *)(p), (a), (c))
19#define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c))
20#define __ide_mm_outsl(p, a, c) writesl((void __iomem *)(p), (a), (c))
73ea9e1b 21
b354cab0 22#ifndef __powerpc64__
1da177e4
LT
23#include <linux/hdreg.h>
24#include <linux/ioport.h>
1da177e4 25
1d850bd0 26/* FIXME: use ide_platform host driver */
1da177e4
LT
27static __inline__ int ide_default_irq(unsigned long base)
28{
1d850bd0
BZ
29#ifdef CONFIG_PPLUS
30 switch (base) {
31 case 0x1f0: return 14;
32 case 0x170: return 15;
33 }
1d850bd0 34#endif
1da177e4
LT
35 return 0;
36}
37
1d850bd0 38/* FIXME: use ide_platform host driver */
1da177e4
LT
39static __inline__ unsigned long ide_default_io_base(int index)
40{
1d850bd0
BZ
41#ifdef CONFIG_PPLUS
42 switch (index) {
43 case 0: return 0x1f0;
44 case 1: return 0x170;
45 }
1d850bd0 46#endif
1da177e4
LT
47 return 0;
48}
49
e6b6e3ff 50#ifdef CONFIG_BLK_DEV_MPC8xx_IDE
1da177e4 51#define IDE_ARCH_ACK_INTR 1
18e181fe 52#define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
1da177e4
LT
53#endif
54
b354cab0
SR
55#endif /* __powerpc64__ */
56
1da177e4
LT
57#endif /* __KERNEL__ */
58
b354cab0 59#endif /* _ASM_POWERPC_IDE_H */
This page took 0.385021 seconds and 5 git commands to generate.