1
linux/arch/sh/include/mach-common/mach/secureedge5410.h
Kuninori Morimoto 6a0abce4c4 sh: include: convert to SPDX identifiers
Update license to use SPDX-License-Identifier instead of verbose license
text.

Link: http://lkml.kernel.org/r/87ftvccszx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-28 12:11:45 -08:00

48 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0
*
* include/asm-sh/snapgear.h
*
* Modified version of io_se.h for the snapgear-specific functions.
*
* IO functions for a SnapGear
*/
#ifndef _ASM_SH_IO_SNAPGEAR_H
#define _ASM_SH_IO_SNAPGEAR_H
#define __IO_PREFIX snapgear
#include <asm/io_generic.h>
/*
* We need to remember what was written to the ioport as some bits
* are shared with other functions and you cannot read back what was
* written :-|
*
* Bit Read Write
* -----------------------------------------------
* D0 DCD on ttySC1 power
* D1 Reset Switch heatbeat
* D2 ttySC0 CTS (7100) LAN
* D3 - WAN
* D4 ttySC0 DCD (7100) CONSOLE
* D5 - ONLINE
* D6 - VPN
* D7 - DTR on ttySC1
* D8 - ttySC0 RTS (7100)
* D9 - ttySC0 DTR (7100)
* D10 - RTC SCLK
* D11 RTC DATA RTC DATA
* D12 - RTS RESET
*/
#define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000)
extern unsigned short secureedge5410_ioport;
#define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \
(secureedge5410_ioport = \
((secureedge5410_ioport & ~(mask)) | ((val) & (mask)))))
#define SECUREEDGE_READ_IOPORT() \
((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817))
#endif /* _ASM_SH_IO_SNAPGEAR_H */