| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |  | 
 | 10 | #ifndef _ASM_SH_MACHVEC_H | 
| Paul Mundt | 2c7834a | 2006-09-27 18:17:31 +0900 | [diff] [blame] | 11 | #define _ASM_SH_MACHVEC_H | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/types.h> | 
 | 14 | #include <linux/time.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | #include <asm/machtypes.h> | 
 | 16 | #include <asm/machvec_init.h> | 
 | 17 |  | 
 | 18 | struct device; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 |  | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 20 | struct sh_machine_vector { | 
| Paul Mundt | 2c7834a | 2006-09-27 18:17:31 +0900 | [diff] [blame] | 21 | 	void (*mv_setup)(char **cmdline_p); | 
 | 22 | 	const char *mv_name; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | 	int mv_nr_irqs; | 
 | 24 |  | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 25 | 	u8 (*mv_inb)(unsigned long); | 
 | 26 | 	u16 (*mv_inw)(unsigned long); | 
 | 27 | 	u32 (*mv_inl)(unsigned long); | 
 | 28 | 	void (*mv_outb)(u8, unsigned long); | 
 | 29 | 	void (*mv_outw)(u16, unsigned long); | 
 | 30 | 	void (*mv_outl)(u32, unsigned long); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 |  | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 32 | 	u8 (*mv_inb_p)(unsigned long); | 
 | 33 | 	u16 (*mv_inw_p)(unsigned long); | 
 | 34 | 	u32 (*mv_inl_p)(unsigned long); | 
 | 35 | 	void (*mv_outb_p)(u8, unsigned long); | 
 | 36 | 	void (*mv_outw_p)(u16, unsigned long); | 
 | 37 | 	void (*mv_outl_p)(u32, unsigned long); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 |  | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 39 | 	void (*mv_insb)(unsigned long, void *dst, unsigned long count); | 
 | 40 | 	void (*mv_insw)(unsigned long, void *dst, unsigned long count); | 
 | 41 | 	void (*mv_insl)(unsigned long, void *dst, unsigned long count); | 
 | 42 | 	void (*mv_outsb)(unsigned long, const void *src, unsigned long count); | 
 | 43 | 	void (*mv_outsw)(unsigned long, const void *src, unsigned long count); | 
 | 44 | 	void (*mv_outsl)(unsigned long, const void *src, unsigned long count); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 |  | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 46 | 	u8 (*mv_readb)(void __iomem *); | 
 | 47 | 	u16 (*mv_readw)(void __iomem *); | 
 | 48 | 	u32 (*mv_readl)(void __iomem *); | 
 | 49 | 	void (*mv_writeb)(u8, void __iomem *); | 
 | 50 | 	void (*mv_writew)(u16, void __iomem *); | 
 | 51 | 	void (*mv_writel)(u32, void __iomem *); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 |  | 
 | 53 | 	int (*mv_irq_demux)(int irq); | 
 | 54 |  | 
 | 55 | 	void (*mv_init_irq)(void); | 
 | 56 | 	void (*mv_init_pci)(void); | 
 | 57 |  | 
 | 58 | 	void (*mv_heartbeat)(void); | 
 | 59 |  | 
| Al Viro | 6dae2c2 | 2005-10-21 03:21:38 -0400 | [diff] [blame] | 60 | 	void *(*mv_consistent_alloc)(struct device *, size_t, dma_addr_t *, gfp_t); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | 	int (*mv_consistent_free)(struct device *, size_t, void *, dma_addr_t); | 
| Paul Mundt | b66c1a3 | 2006-01-16 22:14:15 -0800 | [diff] [blame] | 62 |  | 
 | 63 | 	void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); | 
 | 64 | 	void (*mv_ioport_unmap)(void __iomem *); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | }; | 
 | 66 |  | 
 | 67 | extern struct sh_machine_vector sh_mv; | 
 | 68 |  | 
| Paul Mundt | 2c7834a | 2006-09-27 18:17:31 +0900 | [diff] [blame] | 69 | #define get_system_type()	sh_mv.mv_name | 
 | 70 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | #endif /* _ASM_SH_MACHVEC_H */ |