blob: d241652641fbed6172b9f3eef2b676eaa64c70d5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +09002/*
3 * arch/arm/include/asm/arch-rmobile/rcar-mstp.h
4 *
5 * Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
6 * Copyright (C) 2013, 2014 Renesas Electronics Corporation
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +09007 */
8
9#ifndef __ASM_ARCH_RCAR_MSTP_H
10#define __ASM_ARCH_RCAR_MSTP_H
11
12#define mstp_setbits(type, addr, saddr, set) \
13 out_##type((saddr), in_##type(addr) | (set))
14#define mstp_clrbits(type, addr, saddr, clear) \
15 out_##type((saddr), in_##type(addr) & ~(clear))
Nobuhiro Iwamatsu8d7dcd22014-12-02 16:52:21 +090016#define mstp_setclrbits(type, addr, set, clear) \
17 out_##type((addr), (in_##type(addr) | (set)) & ~(clear))
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +090018#define mstp_setbits_le32(addr, saddr, set) \
19 mstp_setbits(le32, addr, saddr, set)
20#define mstp_clrbits_le32(addr, saddr, clear) \
21 mstp_clrbits(le32, addr, saddr, clear)
Nobuhiro Iwamatsu8d7dcd22014-12-02 16:52:21 +090022#define mstp_setclrbits_le32(addr, set, clear) \
23 mstp_setclrbits(le32, addr, set, clear)
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +090024
Tom Rini364d0022023-01-10 11:19:45 -050025#ifndef CFG_SMSTP0_ENA
26#define CFG_SMSTP0_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090027#endif
Tom Rini364d0022023-01-10 11:19:45 -050028#ifndef CFG_SMSTP1_ENA
29#define CFG_SMSTP1_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090030#endif
Tom Rini364d0022023-01-10 11:19:45 -050031#ifndef CFG_SMSTP2_ENA
32#define CFG_SMSTP2_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090033#endif
Tom Rini364d0022023-01-10 11:19:45 -050034#ifndef CFG_SMSTP3_ENA
35#define CFG_SMSTP3_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090036#endif
Tom Rini364d0022023-01-10 11:19:45 -050037#ifndef CFG_SMSTP4_ENA
38#define CFG_SMSTP4_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090039#endif
Tom Rini364d0022023-01-10 11:19:45 -050040#ifndef CFG_SMSTP5_ENA
41#define CFG_SMSTP5_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090042#endif
Tom Rini364d0022023-01-10 11:19:45 -050043#ifndef CFG_SMSTP6_ENA
44#define CFG_SMSTP6_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090045#endif
Tom Rini364d0022023-01-10 11:19:45 -050046#ifndef CFG_SMSTP7_ENA
47#define CFG_SMSTP7_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090048#endif
Tom Rini364d0022023-01-10 11:19:45 -050049#ifndef CFG_SMSTP8_ENA
50#define CFG_SMSTP8_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090051#endif
Tom Rini364d0022023-01-10 11:19:45 -050052#ifndef CFG_SMSTP9_ENA
53#define CFG_SMSTP9_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090054#endif
Tom Rini364d0022023-01-10 11:19:45 -050055#ifndef CFG_SMSTP10_ENA
56#define CFG_SMSTP10_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090057#endif
Tom Rini364d0022023-01-10 11:19:45 -050058#ifndef CFG_SMSTP11_ENA
59#define CFG_SMSTP11_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090060#endif
61
Tom Rini364d0022023-01-10 11:19:45 -050062#ifndef CFG_RMSTP0_ENA
63#define CFG_RMSTP0_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090064#endif
Tom Rini364d0022023-01-10 11:19:45 -050065#ifndef CFG_RMSTP1_ENA
66#define CFG_RMSTP1_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090067#endif
Tom Rini364d0022023-01-10 11:19:45 -050068#ifndef CFG_RMSTP2_ENA
69#define CFG_RMSTP2_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090070#endif
Tom Rini364d0022023-01-10 11:19:45 -050071#ifndef CFG_RMSTP3_ENA
72#define CFG_RMSTP3_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090073#endif
Tom Rini364d0022023-01-10 11:19:45 -050074#ifndef CFG_RMSTP4_ENA
75#define CFG_RMSTP4_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090076#endif
Tom Rini364d0022023-01-10 11:19:45 -050077#ifndef CFG_RMSTP5_ENA
78#define CFG_RMSTP5_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090079#endif
Tom Rini364d0022023-01-10 11:19:45 -050080#ifndef CFG_RMSTP6_ENA
81#define CFG_RMSTP6_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090082#endif
Tom Rini364d0022023-01-10 11:19:45 -050083#ifndef CFG_RMSTP7_ENA
84#define CFG_RMSTP7_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090085#endif
Tom Rini364d0022023-01-10 11:19:45 -050086#ifndef CFG_RMSTP8_ENA
87#define CFG_RMSTP8_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090088#endif
Tom Rini364d0022023-01-10 11:19:45 -050089#ifndef CFG_RMSTP9_ENA
90#define CFG_RMSTP9_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090091#endif
Tom Rini364d0022023-01-10 11:19:45 -050092#ifndef CFG_RMSTP10_ENA
93#define CFG_RMSTP10_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090094#endif
Tom Rini364d0022023-01-10 11:19:45 -050095#ifndef CFG_RMSTP11_ENA
96#define CFG_RMSTP11_ENA 0x00
Nobuhiro Iwamatsu5c700232014-12-02 16:52:23 +090097#endif
98
99struct mstp_ctl {
100 u32 s_addr;
101 u32 s_dis;
102 u32 s_ena;
103 u32 r_addr;
104 u32 r_dis;
105 u32 r_ena;
106};
107
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +0900108#endif /* __ASM_ARCH_RCAR_MSTP_H */