Path: blob/master/arch/sh/include/mach-common/mach/secureedge5410.h
15162 views
/*1* include/asm-sh/snapgear.h2*3* Modified version of io_se.h for the snapgear-specific functions.4*5* May be copied or modified under the terms of the GNU General Public6* License. See linux/COPYING for more information.7*8* IO functions for a SnapGear9*/1011#ifndef _ASM_SH_IO_SNAPGEAR_H12#define _ASM_SH_IO_SNAPGEAR_H1314#define __IO_PREFIX snapgear15#include <asm/io_generic.h>1617/*18* We need to remember what was written to the ioport as some bits19* are shared with other functions and you cannot read back what was20* written :-|21*22* Bit Read Write23* -----------------------------------------------24* D0 DCD on ttySC1 power25* D1 Reset Switch heatbeat26* D2 ttySC0 CTS (7100) LAN27* D3 - WAN28* D4 ttySC0 DCD (7100) CONSOLE29* D5 - ONLINE30* D6 - VPN31* D7 - DTR on ttySC132* D8 - ttySC0 RTS (7100)33* D9 - ttySC0 DTR (7100)34* D10 - RTC SCLK35* D11 RTC DATA RTC DATA36* D12 - RTS RESET37*/3839#define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)40extern unsigned short secureedge5410_ioport;4142#define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \43(secureedge5410_ioport = \44((secureedge5410_ioport & ~(mask)) | ((val) & (mask)))))45#define SECUREEDGE_READ_IOPORT() \46((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817))4748#endif /* _ASM_SH_IO_SNAPGEAR_H */495051