Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / sh / include / mach-common / mach / secureedge5410.h
blob3653b9a4bacc323027fb3b8d98e45d9e8eea6dfe
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 #define __IO_PREFIX snapgear
16 #include <asm/io_generic.h>
19 * We need to remember what was written to the ioport as some bits
20 * are shared with other functions and you cannot read back what was
21 * written :-|
23 * Bit Read Write
24 * -----------------------------------------------
25 * D0 DCD on ttySC1 power
26 * D1 Reset Switch heatbeat
27 * D2 ttySC0 CTS (7100) LAN
28 * D3 - WAN
29 * D4 ttySC0 DCD (7100) CONSOLE
30 * D5 - ONLINE
31 * D6 - VPN
32 * D7 - DTR on ttySC1
33 * D8 - ttySC0 RTS (7100)
34 * D9 - ttySC0 DTR (7100)
35 * D10 - RTC SCLK
36 * D11 RTC DATA RTC DATA
37 * D12 - RTS RESET
40 #define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)
41 extern unsigned short secureedge5410_ioport;
43 #define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \
44 (secureedge5410_ioport = \
45 ((secureedge5410_ioport & ~(mask)) | ((val) & (mask)))))
46 #define SECUREEDGE_READ_IOPORT() \
47 ((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817))
49 #endif /* _ASM_SH_IO_SNAPGEAR_H */