Path: blob/master/arch/sh/include/mach-common/mach/secureedge5410.h
26495 views
/* SPDX-License-Identifier: GPL-2.01*2* include/asm-sh/snapgear.h3*4* Modified version of io_se.h for the snapgear-specific functions.5*6* IO functions for a SnapGear7*/89#ifndef _ASM_SH_IO_SNAPGEAR_H10#define _ASM_SH_IO_SNAPGEAR_H1112#define __IO_PREFIX snapgear13#include <asm/io_generic.h>1415/*16* We need to remember what was written to the ioport as some bits17* are shared with other functions and you cannot read back what was18* written :-|19*20* Bit Read Write21* -----------------------------------------------22* D0 DCD on ttySC1 power23* D1 Reset Switch heatbeat24* D2 ttySC0 CTS (7100) LAN25* D3 - WAN26* D4 ttySC0 DCD (7100) CONSOLE27* D5 - ONLINE28* D6 - VPN29* D7 - DTR on ttySC130* D8 - ttySC0 RTS (7100)31* D9 - ttySC0 DTR (7100)32* D10 - RTC SCLK33* D11 RTC DATA RTC DATA34* D12 - RTS RESET35*/3637#define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)38extern unsigned short secureedge5410_ioport;3940#define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \41(secureedge5410_ioport = \42((secureedge5410_ioport & ~(mask)) | ((val) & (mask)))))43#define SECUREEDGE_READ_IOPORT() \44((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817))4546#endif /* _ASM_SH_IO_SNAPGEAR_H */474849