blob: be8760fbc8ee4042ded80ff196b4f9ce70335aa0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-parisc/ide.h
3 *
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
5 */
6
7/*
8 * This file contains the PARISC architecture specific IDE code.
9 */
10
11#ifndef __ASM_PARISC_IDE_H
12#define __ASM_PARISC_IDE_H
13
14#ifdef __KERNEL__
15
16#ifndef MAX_HWIFS
17#define MAX_HWIFS 2
18#endif
19
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
21
22#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
23#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
25#define ide_release_region(from,extent) release_region((from), (extent))
26/* Generic I/O and MEMIO string operations. */
27
28#define __ide_insw insw
29#define __ide_insl insl
30#define __ide_outsw outsw
31#define __ide_outsl outsl
32
33static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
34{
35 while (count--) {
36 *(u16 *)addr = __raw_readw(port);
37 addr += 2;
38 }
39}
40
41static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
42{
43 while (count--) {
44 *(u32 *)addr = __raw_readl(port);
45 addr += 4;
46 }
47}
48
49static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
50{
51 while (count--) {
52 __raw_writew(*(u16 *)addr, port);
53 addr += 2;
54 }
55}
56
57static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
58{
59 while (count--) {
60 __raw_writel(*(u32 *)addr, port);
61 addr += 4;
62 }
63}
64
65#endif /* __KERNEL__ */
66
67#endif /* __ASM_PARISC_IDE_H */