machvec.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * include/asm-sh/machvec.h
  3. *
  4. * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
  5. *
  6. * May be copied or modified under the terms of the GNU General Public
  7. * License. See linux/COPYING for more information.
  8. */
  9. #ifndef _ASM_SH_MACHVEC_H
  10. #define _ASM_SH_MACHVEC_H 1
  11. #include <linux/config.h>
  12. #include <linux/types.h>
  13. #include <linux/time.h>
  14. #include <asm/machtypes.h>
  15. #include <asm/machvec_init.h>
  16. struct device;
  17. struct sh_machine_vector {
  18. int mv_nr_irqs;
  19. u8 (*mv_inb)(unsigned long);
  20. u16 (*mv_inw)(unsigned long);
  21. u32 (*mv_inl)(unsigned long);
  22. void (*mv_outb)(u8, unsigned long);
  23. void (*mv_outw)(u16, unsigned long);
  24. void (*mv_outl)(u32, unsigned long);
  25. u8 (*mv_inb_p)(unsigned long);
  26. u16 (*mv_inw_p)(unsigned long);
  27. u32 (*mv_inl_p)(unsigned long);
  28. void (*mv_outb_p)(u8, unsigned long);
  29. void (*mv_outw_p)(u16, unsigned long);
  30. void (*mv_outl_p)(u32, unsigned long);
  31. void (*mv_insb)(unsigned long, void *dst, unsigned long count);
  32. void (*mv_insw)(unsigned long, void *dst, unsigned long count);
  33. void (*mv_insl)(unsigned long, void *dst, unsigned long count);
  34. void (*mv_outsb)(unsigned long, const void *src, unsigned long count);
  35. void (*mv_outsw)(unsigned long, const void *src, unsigned long count);
  36. void (*mv_outsl)(unsigned long, const void *src, unsigned long count);
  37. u8 (*mv_readb)(void __iomem *);
  38. u16 (*mv_readw)(void __iomem *);
  39. u32 (*mv_readl)(void __iomem *);
  40. void (*mv_writeb)(u8, void __iomem *);
  41. void (*mv_writew)(u16, void __iomem *);
  42. void (*mv_writel)(u32, void __iomem *);
  43. int (*mv_irq_demux)(int irq);
  44. void (*mv_init_irq)(void);
  45. void (*mv_init_pci)(void);
  46. void (*mv_heartbeat)(void);
  47. void *(*mv_consistent_alloc)(struct device *, size_t, dma_addr_t *, gfp_t);
  48. int (*mv_consistent_free)(struct device *, size_t, void *, dma_addr_t);
  49. void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size);
  50. void (*mv_ioport_unmap)(void __iomem *);
  51. };
  52. extern struct sh_machine_vector sh_mv;
  53. #endif /* _ASM_SH_MACHVEC_H */