2 * include/asm-sh/io_hd64465.h
4 * By Greg Banks <gbanks@pocketpenguins.com>
5 * (c) 2000 PocketPenguins Inc.
7 * Derived from io_hd64461.h, which bore the message:
8 * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
10 * May be copied or modified under the terms of the GNU General Public
11 * License. See linux/COPYING for more information.
13 * IO functions for an HD64465 "Windows CE Intelligent Peripheral Controller".
16 #ifndef _ASM_SH_IO_HD64465_H
17 #define _ASM_SH_IO_HD64465_H
19 #include <asm/io_generic.h>
21 extern unsigned char hd64465_inb(unsigned long port);
22 extern unsigned short hd64465_inw(unsigned long port);
23 extern unsigned int hd64465_inl(unsigned long port);
25 extern void hd64465_outb(unsigned char value, unsigned long port);
26 extern void hd64465_outw(unsigned short value, unsigned long port);
27 extern void hd64465_outl(unsigned int value, unsigned long port);
29 extern unsigned char hd64465_inb_p(unsigned long port);
30 extern void hd64465_outb_p(unsigned char value, unsigned long port);
32 extern void hd64465_insb(unsigned long port, void *addr, unsigned long count);
33 extern void hd64465_insw(unsigned long port, void *addr, unsigned long count);
34 extern void hd64465_insl(unsigned long port, void *addr, unsigned long count);
35 extern void hd64465_outsb(unsigned long port, const void *addr, unsigned long count);
36 extern void hd64465_outsw(unsigned long port, const void *addr, unsigned long count);
37 extern void hd64465_outsl(unsigned long port, const void *addr, unsigned long count);
38 extern unsigned long hd64465_isa_port2addr(unsigned long offset);
39 extern int hd64465_irq_demux(int irq);
40 /* Provision for generic secondary demux step -- used by PCMCIA code */
41 extern void hd64465_register_irq_demux(int irq,
42 int (*demux)(int irq, void *dev), void *dev);
43 extern void hd64465_unregister_irq_demux(int irq);
44 /* Set this variable to 1 to see port traffic */
45 extern int hd64465_io_debug;
46 /* Map a range of ports to a range of kernel virtual memory.
48 extern void hd64465_port_map(unsigned short baseport, unsigned int nports,
49 unsigned long addr, unsigned char shift);
50 extern void hd64465_port_unmap(unsigned short baseport, unsigned int nports);
55 # define __inb hd64465_inb
56 # define __inw hd64465_inw
57 # define __inl hd64465_inl
58 # define __outb hd64465_outb
59 # define __outw hd64465_outw
60 # define __outl hd64465_outl
62 # define __inb_p hd64465_inb_p
63 # define __inw_p hd64465_inw
64 # define __inl_p hd64465_inl
65 # define __outb_p hd64465_outb_p
66 # define __outw_p hd64465_outw
67 # define __outl_p hd64465_outl
69 # define __insb hd64465_insb
70 # define __insw hd64465_insw
71 # define __insl hd64465_insl
72 # define __outsb hd64465_outsb
73 # define __outsw hd64465_outsw
74 # define __outsl hd64465_outsl
76 # define __readb generic_readb
77 # define __readw generic_readw
78 # define __readl generic_readl
79 # define __writeb generic_writeb
80 # define __writew generic_writew
81 # define __writel generic_writel
83 # define __isa_port2addr hd64465_isa_port2addr
84 # define __ioremap generic_ioremap
85 # define __iounmap generic_iounmap
90 #endif /* _ASM_SH_IO_HD64465_H */