blob: b2e4124070aef289a724a90049bba93adfcffa64 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Mundt2c7834a2006-09-27 18:17:31 +090011#define _ASM_SH_MACHVEC_H
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/types.h>
14#include <linux/time.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <asm/machtypes.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17struct device;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Paul Mundtb66c1a32006-01-16 22:14:15 -080019struct sh_machine_vector {
Paul Mundt2c7834a2006-09-27 18:17:31 +090020 void (*mv_setup)(char **cmdline_p);
21 const char *mv_name;
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 int mv_nr_irqs;
23
Paul Mundtb66c1a32006-01-16 22:14:15 -080024 u8 (*mv_inb)(unsigned long);
25 u16 (*mv_inw)(unsigned long);
26 u32 (*mv_inl)(unsigned long);
27 void (*mv_outb)(u8, unsigned long);
28 void (*mv_outw)(u16, unsigned long);
29 void (*mv_outl)(u32, unsigned long);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Paul Mundtb66c1a32006-01-16 22:14:15 -080031 u8 (*mv_inb_p)(unsigned long);
32 u16 (*mv_inw_p)(unsigned long);
33 u32 (*mv_inl_p)(unsigned long);
34 void (*mv_outb_p)(u8, unsigned long);
35 void (*mv_outw_p)(u16, unsigned long);
36 void (*mv_outl_p)(u32, unsigned long);
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Paul Mundtb66c1a32006-01-16 22:14:15 -080038 void (*mv_insb)(unsigned long, void *dst, unsigned long count);
39 void (*mv_insw)(unsigned long, void *dst, unsigned long count);
40 void (*mv_insl)(unsigned long, void *dst, unsigned long count);
41 void (*mv_outsb)(unsigned long, const void *src, unsigned long count);
42 void (*mv_outsw)(unsigned long, const void *src, unsigned long count);
43 void (*mv_outsl)(unsigned long, const void *src, unsigned long count);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
Paul Mundtb66c1a32006-01-16 22:14:15 -080045 u8 (*mv_readb)(void __iomem *);
46 u16 (*mv_readw)(void __iomem *);
47 u32 (*mv_readl)(void __iomem *);
48 void (*mv_writeb)(u8, void __iomem *);
49 void (*mv_writew)(u16, void __iomem *);
50 void (*mv_writel)(u32, void __iomem *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
52 int (*mv_irq_demux)(int irq);
53
54 void (*mv_init_irq)(void);
55 void (*mv_init_pci)(void);
56
57 void (*mv_heartbeat)(void);
58
Paul Mundtb66c1a32006-01-16 22:14:15 -080059 void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size);
60 void (*mv_ioport_unmap)(void __iomem *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070061};
62
63extern struct sh_machine_vector sh_mv;
64
Paul Mundt2c7834a2006-09-27 18:17:31 +090065#define get_system_type() sh_mv.mv_name
66
Paul Mundt82f81f42007-05-15 15:19:34 +090067#define __initmv \
Adrian Bunk3ff6eec2008-01-24 22:16:20 +010068 __used __section(.machvec.init)
Paul Mundt82f81f42007-05-15 15:19:34 +090069
Linus Torvalds1da177e2005-04-16 15:20:36 -070070#endif /* _ASM_SH_MACHVEC_H */