aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu/mcfpci.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-m68knommu/mcfpci.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-m68knommu/mcfpci.h')
-rw-r--r--include/asm-m68knommu/mcfpci.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/include/asm-m68knommu/mcfpci.h b/include/asm-m68knommu/mcfpci.h
new file mode 100644
index 000000000000..d6229047d06e
--- /dev/null
+++ b/include/asm-m68knommu/mcfpci.h
@@ -0,0 +1,120 @@
1/****************************************************************************/
2
3/*
4 * mcfpci.h -- PCI bridge on ColdFire eval boards.
5 *
6 * (C) Copyright 2000, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2000, Lineo Inc. (www.lineo.com)
8 */
9
10/****************************************************************************/
11#ifndef mcfpci_h
12#define mcfpci_h
13/****************************************************************************/
14
15#include <linux/config.h>
16
17#ifdef CONFIG_PCI
18
19/*
20 * Address regions in the PCI address space are not mapped into the
21 * normal memory space of the ColdFire. They must be accessed via
22 * handler routines. This is easy for I/O space (inb/outb/etc) but
23 * needs some code changes to support ordinary memory. Interrupts
24 * also need to be vectored through the PCI handler first, then it
25 * will call the actual driver sub-handlers.
26 */
27
28/*
29 * Un-define all the standard I/O access routines.
30 */
31#undef inb
32#undef inw
33#undef inl
34#undef inb_p
35#undef inw_p
36#undef insb
37#undef insw
38#undef insl
39#undef outb
40#undef outw
41#undef outl
42#undef outb_p
43#undef outw_p
44#undef outsb
45#undef outsw
46#undef outsl
47
48#undef request_irq
49#undef free_irq
50
51#undef bus_to_virt
52#undef virt_to_bus
53
54
55/*
56 * Re-direct all I/O memory accesses functions to PCI specific ones.
57 */
58#define inb pci_inb
59#define inw pci_inw
60#define inl pci_inl
61#define inb_p pci_inb
62#define inw_p pci_inw
63#define insb pci_insb
64#define insw pci_insw
65#define insl pci_insl
66
67#define outb pci_outb
68#define outw pci_outw
69#define outl pci_outl
70#define outb_p pci_outb
71#define outw_p pci_outw
72#define outsb pci_outsb
73#define outsw pci_outsw
74#define outsl pci_outsl
75
76#define request_irq pci_request_irq
77#define free_irq pci_free_irq
78
79#define virt_to_bus pci_virt_to_bus
80#define bus_to_virt pci_bus_to_virt
81
82#define CONFIG_COMEMPCI 1
83
84
85/*
86 * Prototypes of the real PCI functions (defined in bios32.c).
87 */
88unsigned char pci_inb(unsigned int addr);
89unsigned short pci_inw(unsigned int addr);
90unsigned int pci_inl(unsigned int addr);
91void pci_insb(void *addr, void *buf, int len);
92void pci_insw(void *addr, void *buf, int len);
93void pci_insl(void *addr, void *buf, int len);
94
95void pci_outb(unsigned char val, unsigned int addr);
96void pci_outw(unsigned short val, unsigned int addr);
97void pci_outl(unsigned int val, unsigned int addr);
98void pci_outsb(void *addr, void *buf, int len);
99void pci_outsw(void *addr, void *buf, int len);
100void pci_outsl(void *addr, void *buf, int len);
101
102int pci_request_irq(unsigned int irq,
103 void (*handler)(int, void *, struct pt_regs *),
104 unsigned long flags,
105 const char *device,
106 void *dev_id);
107void pci_free_irq(unsigned int irq, void *dev_id);
108
109void *pci_bmalloc(int size);
110void pci_bmfree(void *bmp, int len);
111void pci_copytoshmem(unsigned long bmp, void *src, int size);
112void pci_copyfromshmem(void *dst, unsigned long bmp, int size);
113unsigned long pci_virt_to_bus(volatile void *address);
114void *pci_bus_to_virt(unsigned long address);
115void pci_bmcpyto(void *dst, void *src, int len);
116void pci_bmcpyfrom(void *dst, void *src, int len);
117
118#endif /* CONFIG_PCI */
119/****************************************************************************/
120#endif /* mcfpci_h */