iseries_io.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H
  2. #define _ASM_POWERPC_ISERIES_ISERIES_IO_H
  3. #include <linux/config.h>
  4. #ifdef CONFIG_PPC_ISERIES
  5. #include <linux/types.h>
  6. /*
  7. * Created by Allan Trautman on Thu Dec 28 2000.
  8. *
  9. * Remaps the io.h for the iSeries Io
  10. * Copyright (C) 2000 Allan H Trautman, IBM Corporation
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the:
  24. * Free Software Foundation, Inc.,
  25. * 59 Temple Place, Suite 330,
  26. * Boston, MA 02111-1307 USA
  27. *
  28. * Change Activity:
  29. * Created December 28, 2000
  30. * End Change Activity
  31. */
  32. #ifdef CONFIG_PCI
  33. extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
  34. extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
  35. extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress);
  36. extern void iSeries_Write_Byte(u8 IoData, volatile void __iomem * IoAddress);
  37. extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress);
  38. extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress);
  39. extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n);
  40. extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source,
  41. size_t n);
  42. extern void iSeries_memcpy_fromio(void *dest,
  43. const volatile void __iomem *source, size_t n);
  44. #else
  45. static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
  46. {
  47. return 0xff;
  48. }
  49. static inline void iSeries_Write_Byte(u8 IoData,
  50. volatile void __iomem *IoAddress)
  51. {
  52. }
  53. #endif /* CONFIG_PCI */
  54. #endif /* CONFIG_PPC_ISERIES */
  55. #endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */