mpc8260_pci9.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* include/asm-ppc/mpc8260_pci9.h
  2. *
  3. * Undefine the PCI read* and in* macros so we can define them as functions
  4. * that implement the workaround for the MPC8260 device erratum PCI 9.
  5. *
  6. * This header file should only be included at the end of include/asm-ppc/io.h
  7. * and never included directly anywhere else.
  8. *
  9. * Author: andy_lowe@mvista.com
  10. *
  11. * 2003 (c) MontaVista Software, Inc. This file is licensed under
  12. * the terms of the GNU General Public License version 2. This program
  13. * is licensed "as is" without any warranty of any kind, whether express
  14. * or implied.
  15. */
  16. #ifndef _PPC_IO_H
  17. #error "Do not include mpc8260_pci9.h directly."
  18. #endif
  19. #ifdef __KERNEL__
  20. #ifndef __CONFIG_8260_PCI9_DEFS
  21. #define __CONFIG_8260_PCI9_DEFS
  22. #undef readb
  23. #undef readw
  24. #undef readl
  25. #undef insb
  26. #undef insw
  27. #undef insl
  28. #undef inb
  29. #undef inw
  30. #undef inl
  31. #undef memcpy_fromio
  32. extern int readb(volatile unsigned char *addr);
  33. extern int readw(volatile unsigned short *addr);
  34. extern unsigned readl(volatile unsigned *addr);
  35. extern void insb(unsigned port, void *buf, int ns);
  36. extern void insw(unsigned port, void *buf, int ns);
  37. extern void insl(unsigned port, void *buf, int nl);
  38. extern int inb(unsigned port);
  39. extern int inw(unsigned port);
  40. extern unsigned inl(unsigned port);
  41. extern void *memcpy_fromio(void *dest, unsigned long src, size_t count);
  42. #endif /* !__CONFIG_8260_PCI9_DEFS */
  43. #endif /* __KERNEL__ */