machvec.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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
  11. #include <linux/types.h>
  12. #include <linux/time.h>
  13. #include <asm/machtypes.h>
  14. struct device;
  15. struct sh_machine_vector {
  16. void (*mv_setup)(char **cmdline_p);
  17. const char *mv_name;
  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. #define get_system_type() sh_mv.mv_name
  54. #define __initmv \
  55. __attribute_used__ __attribute__((__section__ (".machvec.init")))
  56. #endif /* _ASM_SH_MACHVEC_H */