io_bigsur.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * include/asm-sh/io_bigsur.h
  3.  *
  4.  * By Dustin McIntire (dustin@sensoria.com) (c)2001
  5.  * Derived from io_hd64465.h, which bore the message:
  6.  * By Greg Banks <gbanks@pocketpenguins.com>
  7.  * (c) 2000 PocketPenguins Inc. 
  8.  * and from io_hd64461.h, which bore the message:
  9.  * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
  10.  *
  11.  * May be copied or modified under the terms of the GNU General Public
  12.  * License.  See linux/COPYING for more information.
  13.  *
  14.  * IO functions for a Hitachi Big Sur Evaluation Board.
  15.  */
  16. #ifndef _ASM_SH_IO_BIGSUR_H
  17. #define _ASM_SH_IO_BIGSUR_H
  18. #include <linux/types.h>
  19. #include <asm/io_generic.h>
  20. extern unsigned char bigsur_inb(unsigned long port);
  21. extern unsigned short bigsur_inw(unsigned long port);
  22. extern unsigned int bigsur_inl(unsigned long port);
  23. extern void bigsur_outb(unsigned char value, unsigned long port);
  24. extern void bigsur_outw(unsigned short value, unsigned long port);
  25. extern void bigsur_outl(unsigned int value, unsigned long port);
  26. extern unsigned char bigsur_inb_p(unsigned long port);
  27. extern void bigsur_outb_p(unsigned char value, unsigned long port);
  28. extern void bigsur_insb(unsigned long port, void *addr, unsigned long count);
  29. extern void bigsur_insw(unsigned long port, void *addr, unsigned long count);
  30. extern void bigsur_insl(unsigned long port, void *addr, unsigned long count);
  31. extern void bigsur_outsb(unsigned long port, const void *addr, unsigned long count);
  32. extern void bigsur_outsw(unsigned long port, const void *addr, unsigned long count);
  33. extern void bigsur_outsl(unsigned long port, const void *addr, unsigned long count);
  34. extern unsigned long bigsur_isa_port2addr(unsigned long offset);
  35. extern int bigsur_irq_demux(int irq);
  36. extern void bigsur_init_pci(void);
  37. /* Provision for generic secondary demux step -- used by PCMCIA code */
  38. extern void bigsur_register_irq_demux(int irq,
  39. int (*demux)(int irq, void *dev), void *dev);
  40. extern void bigsur_unregister_irq_demux(int irq);
  41. /* Set this variable to 1 to see port traffic */
  42. extern int bigsur_io_debug;
  43. /* Map a range of ports to a range of kernel virtual memory. */
  44. extern void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift);
  45. extern void bigsur_port_unmap(u32 baseport, u32 nports);
  46. #endif /* _ASM_SH_IO_BIGSUR_H */
  47. #ifdef __WANT_IO_DEF
  48. # define __inb bigsur_inb
  49. # define __inw bigsur_inw
  50. # define __inl bigsur_inl
  51. # define __outb bigsur_outb
  52. # define __outw bigsur_outw
  53. # define __outl bigsur_outl
  54. # define __inb_p bigsur_inb_p
  55. # define __inw_p bigsur_inw
  56. # define __inl_p bigsur_inl
  57. # define __outb_p bigsur_outb_p
  58. # define __outw_p bigsur_outw
  59. # define __outl_p bigsur_outl
  60. # define __insb bigsur_insb
  61. # define __insw bigsur_insw
  62. # define __insl bigsur_insl
  63. # define __outsb bigsur_outsb
  64. # define __outsw bigsur_outsw
  65. # define __outsl bigsur_outsl
  66. # define __readb generic_readb
  67. # define __readw generic_readw
  68. # define __readl generic_readl
  69. # define __writeb generic_writeb
  70. # define __writew generic_writew
  71. # define __writel generic_writel
  72. # define __isa_port2addr bigsur_isa_port2addr
  73. # define __ioremap generic_ioremap
  74. # define __iounmap generic_iounmap
  75. #endif