MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-sh / snapgear.h
blob57d97540485d4d8faca5c1b7eeccd6ae6656d00a
1 /*
2 * include/asm-sh/snapgear.h
4 * Modified version of io_se.h for the snapgear-specific functions.
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
9 * IO functions for a SnapGear
12 #ifndef _ASM_SH_IO_SNAPGEAR_H
13 #define _ASM_SH_IO_SNAPGEAR_H
15 #if defined(CONFIG_CPU_SH4)
17 * The external interrupt lines, these take up ints 0 - 15 inclusive
18 * depending on the priority for the interrupt. In fact the priority
19 * is the interrupt :-)
22 #define IRL0_IRQ 2
23 #define IRL0_IPR_ADDR INTC_IPRD
24 #define IRL0_IPR_POS 3
25 #define IRL0_PRIORITY 13
27 #define IRL1_IRQ 5
28 #define IRL1_IPR_ADDR INTC_IPRD
29 #define IRL1_IPR_POS 2
30 #define IRL1_PRIORITY 10
32 #define IRL2_IRQ 8
33 #define IRL2_IPR_ADDR INTC_IPRD
34 #define IRL2_IPR_POS 1
35 #define IRL2_PRIORITY 7
37 #define IRL3_IRQ 11
38 #define IRL3_IPR_ADDR INTC_IPRD
39 #define IRL3_IPR_POS 0
40 #define IRL3_PRIORITY 4
42 #define RTC_BASE 0xffc80000
43 #define RTC_ATI_IRQ 20
44 #define RTC_PRI_IRQ 21
45 #define RTC_CUI_IRQ 22
46 #endif
48 #define __IO_PREFIX snapgear
49 #include <asm/io_generic.h>
51 #ifdef CONFIG_SH_SECUREEDGE5410
53 * We need to remember what was written to the ioport as some bits
54 * are shared with other functions and you cannot read back what was
55 * written :-|
57 * Bit Read Write
58 * -----------------------------------------------
59 * D0 DCD on ttySC1 power
60 * D1 Reset Switch heatbeat
61 * D2 ttySC0 CTS (7100) LAN
62 * D3 - WAN
63 * D4 ttySC0 DCD (7100) CONSOLE
64 * D5 - ONLINE
65 * D6 - VPN
66 * D7 - DTR on ttySC1
67 * D8 - ttySC0 RTS (7100)
68 * D9 - ttySC0 DTR (7100)
69 * D10 - RTC SCLK
70 * D11 RTC DATA RTC DATA
71 * D12 - RTS RESET
74 #define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)
75 extern unsigned short secureedge5410_ioport;
77 #define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \
78 (secureedge5410_ioport = \
79 ((secureedge5410_ioport & ~(mask)) | ((val) & (mask)))))
80 #define SECUREEDGE_READ_IOPORT() \
81 ((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817))
82 #endif
84 #endif /* _ASM_SH_IO_SNAPGEAR_H */