io.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. *
  3. * linux/arch/sh/boards/se/7619/io.c
  4. *
  5. * Copyright (C) 2006 Yoshinori Sato
  6. *
  7. * I/O routine for Hitachi 7619 SolutionEngine.
  8. *
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <asm/io.h>
  13. #include <asm/se7619.h>
  14. #include <asm/irq.h>
  15. /* FIXME: M3A-ZAB7 Compact Flash Slot support */
  16. static inline void delay(void)
  17. {
  18. ctrl_inw(0xa0000000); /* Uncached ROM area (P2) */
  19. }
  20. #define badio(name,port) \
  21. printk("bad I/O operation (%s) for port 0x%lx at 0x%08x\n", \
  22. #name, (port), (__u32) __builtin_return_address(0))
  23. unsigned char se7619___inb(unsigned long port)
  24. {
  25. badio(inb, port);
  26. return 0;
  27. }
  28. unsigned char se7619___inb_p(unsigned long port)
  29. {
  30. badio(inb_p, port);
  31. delay();
  32. return 0;
  33. }
  34. unsigned short se7619___inw(unsigned long port)
  35. {
  36. badio(inw, port);
  37. return 0;
  38. }
  39. unsigned int se7619___inl(unsigned long port)
  40. {
  41. badio(inl, port);
  42. return 0;
  43. }
  44. void se7619___outb(unsigned char value, unsigned long port)
  45. {
  46. badio(outb, port);
  47. }
  48. void se7619___outb_p(unsigned char value, unsigned long port)
  49. {
  50. badio(outb_p, port);
  51. delay();
  52. }
  53. void se7619___outw(unsigned short value, unsigned long port)
  54. {
  55. badio(outw, port);
  56. }
  57. void se7619___outl(unsigned int value, unsigned long port)
  58. {
  59. badio(outl, port);
  60. }
  61. void se7619___insb(unsigned long port, void *addr, unsigned long count)
  62. {
  63. badio(inw, port);
  64. }
  65. void se7619___insw(unsigned long port, void *addr, unsigned long count)
  66. {
  67. badio(inw, port);
  68. }
  69. void se7619___insl(unsigned long port, void *addr, unsigned long count)
  70. {
  71. badio(insl, port);
  72. }
  73. void se7619___outsb(unsigned long port, const void *addr, unsigned long count)
  74. {
  75. badio(insl, port);
  76. }
  77. void se7619___outsw(unsigned long port, const void *addr, unsigned long count)
  78. {
  79. badio(insl, port);
  80. }
  81. void se7619___outsl(unsigned long port, const void *addr, unsigned long count)
  82. {
  83. badio(outsw, port);
  84. }