Commit b354cab0763080df3735dcd0c64a545f266cc9e2
Committed by
Paul Mackerras
1 parent
515729ece1
Exists in
master
and in
7 other branches
powerpc: merge ide.h
This is very simple with it being almost all ppc32 with just a couple of common defines. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Showing 3 changed files with 83 additions and 108 deletions Side-by-side Diff
include/asm-powerpc/ide.h
1 | +/* | |
2 | + * Copyright (C) 1994-1996 Linus Torvalds & authors | |
3 | + * | |
4 | + * This file contains the powerpc architecture specific IDE code. | |
5 | + */ | |
6 | +#ifndef _ASM_POWERPC_IDE_H | |
7 | +#define _ASM_POWERPC_IDE_H | |
8 | + | |
9 | +#ifdef __KERNEL__ | |
10 | + | |
11 | +#ifndef __powerpc64__ | |
12 | +#include <linux/sched.h> | |
13 | +#include <asm/mpc8xx.h> | |
14 | +#endif | |
15 | + | |
16 | +#ifndef MAX_HWIFS | |
17 | +#ifdef __powerpc64__ | |
18 | +#define MAX_HWIFS 10 | |
19 | +#else | |
20 | +#define MAX_HWIFS 8 | |
21 | +#endif | |
22 | +#endif | |
23 | + | |
24 | +#ifndef __powerpc64__ | |
25 | +#include <linux/config.h> | |
26 | +#include <linux/hdreg.h> | |
27 | +#include <linux/ioport.h> | |
28 | +#include <asm/io.h> | |
29 | + | |
30 | +extern void __ide_mm_insw(void __iomem *port, void *addr, u32 count); | |
31 | +extern void __ide_mm_outsw(void __iomem *port, void *addr, u32 count); | |
32 | +extern void __ide_mm_insl(void __iomem *port, void *addr, u32 count); | |
33 | +extern void __ide_mm_outsl(void __iomem *port, void *addr, u32 count); | |
34 | + | |
35 | +struct ide_machdep_calls { | |
36 | + int (*default_irq)(unsigned long base); | |
37 | + unsigned long (*default_io_base)(int index); | |
38 | + void (*ide_init_hwif)(hw_regs_t *hw, | |
39 | + unsigned long data_port, | |
40 | + unsigned long ctrl_port, | |
41 | + int *irq); | |
42 | +}; | |
43 | + | |
44 | +extern struct ide_machdep_calls ppc_ide_md; | |
45 | + | |
46 | +#undef SUPPORT_SLOW_DATA_PORTS | |
47 | +#define SUPPORT_SLOW_DATA_PORTS 0 | |
48 | + | |
49 | +#define IDE_ARCH_OBSOLETE_DEFAULTS | |
50 | + | |
51 | +static __inline__ int ide_default_irq(unsigned long base) | |
52 | +{ | |
53 | + if (ppc_ide_md.default_irq) | |
54 | + return ppc_ide_md.default_irq(base); | |
55 | + return 0; | |
56 | +} | |
57 | + | |
58 | +static __inline__ unsigned long ide_default_io_base(int index) | |
59 | +{ | |
60 | + if (ppc_ide_md.default_io_base) | |
61 | + return ppc_ide_md.default_io_base(index); | |
62 | + return 0; | |
63 | +} | |
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 /* __powerpc64__ */ | |
77 | + | |
78 | +#define IDE_ARCH_OBSOLETE_INIT | |
79 | +#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | |
80 | + | |
81 | +#endif /* __KERNEL__ */ | |
82 | + | |
83 | +#endif /* _ASM_POWERPC_IDE_H */ |
include/asm-ppc/ide.h
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 | - | |
27 | -extern void __ide_mm_insw(void __iomem *port, void *addr, u32 count); | |
28 | -extern void __ide_mm_outsw(void __iomem *port, void *addr, u32 count); | |
29 | -extern void __ide_mm_insl(void __iomem *port, void *addr, u32 count); | |
30 | -extern void __ide_mm_outsl(void __iomem *port, void *addr, u32 count); | |
31 | - | |
32 | -struct 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 | - | |
41 | -extern 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 | - | |
48 | -static __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 | - | |
55 | -static __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 */ |
include/asm-ppc64/ide.h
1 | -/* | |
2 | - * linux/include/asm-ppc/ide.h | |
3 | - * | |
4 | - * Copyright (C) 1994-1996 Linus Torvalds & authors | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License | |
8 | - * as published by the Free Software Foundation; either version | |
9 | - * 2 of the License, or (at your option) any later version. | |
10 | - */ | |
11 | - | |
12 | -/* | |
13 | - * This file contains the ppc64 architecture specific IDE code. | |
14 | - */ | |
15 | - | |
16 | -#ifndef __ASMPPC64_IDE_H | |
17 | -#define __ASMPPC64_IDE_H | |
18 | - | |
19 | -#ifdef __KERNEL__ | |
20 | - | |
21 | -#ifndef MAX_HWIFS | |
22 | -# define MAX_HWIFS 10 | |
23 | -#endif | |
24 | - | |
25 | -#define IDE_ARCH_OBSOLETE_INIT | |
26 | -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | |
27 | - | |
28 | -#endif /* __KERNEL__ */ | |
29 | - | |
30 | -#endif /* __ASMPPC64_IDE_H */ |