1/*
2 * include/asm-sh/io_hd64465.h
3 *
4 * By Greg Banks <gbanks@pocketpenguins.com>
5 * (c) 2000 PocketPenguins Inc.
6 *
7 * Derived from io_hd64461.h, which bore the message:
8 * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
9 *
10 * May be copied or modified under the terms of the GNU General Public
11 * License.  See linux/COPYING for more information.
12 *
13 * IO functions for an HD64465 "Windows CE Intelligent Peripheral Controller".
14 */
15
16#ifndef _ASM_SH_IO_HD64465_H
17#define _ASM_SH_IO_HD64465_H
18
19#include <asm/io_generic.h>
20
21extern unsigned char hd64465_inb(unsigned long port);
22extern unsigned short hd64465_inw(unsigned long port);
23extern unsigned int hd64465_inl(unsigned long port);
24
25extern void hd64465_outb(unsigned char value, unsigned long port);
26extern void hd64465_outw(unsigned short value, unsigned long port);
27extern void hd64465_outl(unsigned int value, unsigned long port);
28
29extern unsigned char hd64465_inb_p(unsigned long port);
30extern void hd64465_outb_p(unsigned char value, unsigned long port);
31
32extern void hd64465_insb(unsigned long port, void *addr, unsigned long count);
33extern void hd64465_insw(unsigned long port, void *addr, unsigned long count);
34extern void hd64465_insl(unsigned long port, void *addr, unsigned long count);
35extern void hd64465_outsb(unsigned long port, const void *addr, unsigned long count);
36extern void hd64465_outsw(unsigned long port, const void *addr, unsigned long count);
37extern void hd64465_outsl(unsigned long port, const void *addr, unsigned long count);
38extern unsigned long hd64465_isa_port2addr(unsigned long offset);
39extern int hd64465_irq_demux(int irq);
40/* Provision for generic secondary demux step -- used by PCMCIA code */
41extern void hd64465_register_irq_demux(int irq,
42		int (*demux)(int irq, void *dev), void *dev);
43extern void hd64465_unregister_irq_demux(int irq);
44/* Set this variable to 1 to see port traffic */
45extern int hd64465_io_debug;
46/* Map a range of ports to a range of kernel virtual memory.
47 */
48extern void hd64465_port_map(unsigned short baseport, unsigned int nports,
49			     unsigned long addr, unsigned char shift);
50extern void hd64465_port_unmap(unsigned short baseport, unsigned int nports);
51
52
53#ifdef __WANT_IO_DEF
54
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
61
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
68
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
75
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
82
83# define __isa_port2addr	hd64465_isa_port2addr
84# define __ioremap		generic_ioremap
85# define __iounmap		generic_iounmap
86
87
88#endif
89
90#endif /* _ASM_SH_IO_HD64465_H */
91