1 /****************************************************************************/
4 * mcfpci.h -- PCI bridge on ColdFire eval boards.
6 * (C) Copyright 2000, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2000, Lineo Inc. (www.lineo.com)
10 /****************************************************************************/
13 /****************************************************************************/
15 #include <linux/config.h>
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.
29 * Un-define all the standard I/O access routines.
56 * Re-direct all I/O memory accesses functions to PCI specific ones.
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
76 #define request_irq pci_request_irq
77 #define free_irq pci_free_irq
79 #define virt_to_bus pci_virt_to_bus
80 #define bus_to_virt pci_bus_to_virt
82 #define CONFIG_COMEMPCI 1
86 * Prototypes of the real PCI functions (defined in bios32.c).
88 unsigned char pci_inb(unsigned int addr);
89 unsigned short pci_inw(unsigned int addr);
90 unsigned int pci_inl(unsigned int addr);
91 void pci_insb(void *addr, void *buf, int len);
92 void pci_insw(void *addr, void *buf, int len);
93 void pci_insl(void *addr, void *buf, int len);
95 void pci_outb(unsigned char val, unsigned int addr);
96 void pci_outw(unsigned short val, unsigned int addr);
97 void pci_outl(unsigned int val, unsigned int addr);
98 void pci_outsb(void *addr, void *buf, int len);
99 void pci_outsw(void *addr, void *buf, int len);
100 void pci_outsl(void *addr, void *buf, int len);
102 int pci_request_irq(unsigned int irq,
103 void (*handler)(int, void *, struct pt_regs *),
107 void pci_free_irq(unsigned int irq, void *dev_id);
109 void *pci_bmalloc(int size);
110 void pci_bmfree(void *bmp, int len);
111 void pci_copytoshmem(unsigned long bmp, void *src, int size);
112 void pci_copyfromshmem(void *dst, unsigned long bmp, int size);
113 unsigned long pci_virt_to_bus(volatile void *address);
114 void *pci_bus_to_virt(unsigned long address);
115 void pci_bmcpyto(void *dst, void *src, int len);
116 void pci_bmcpyfrom(void *dst, void *src, int len);
118 #endif /* CONFIG_PCI */
119 /****************************************************************************/
120 #endif /* mcfpci_h */