blob: c3df11feaba0c168ff803c9b4ebdd433f5fe5b87 [file] [log] [blame]
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +09001/*
2 * arch/arm/include/asm/arch-rmobile/rcar-mstp.h
3 *
4 * Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
5 * Copyright (C) 2013, 2014 Renesas Electronics Corporation
6 *
7 * SPDX-License-Identifier: GPL-2.0
8 */
9
10#ifndef __ASM_ARCH_RCAR_MSTP_H
11#define __ASM_ARCH_RCAR_MSTP_H
12
13#define mstp_setbits(type, addr, saddr, set) \
14 out_##type((saddr), in_##type(addr) | (set))
15#define mstp_clrbits(type, addr, saddr, clear) \
16 out_##type((saddr), in_##type(addr) & ~(clear))
Nobuhiro Iwamatsu8d7dcd22014-12-02 16:52:21 +090017#define mstp_setclrbits(type, addr, set, clear) \
18 out_##type((addr), (in_##type(addr) | (set)) & ~(clear))
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +090019#define mstp_setbits_le32(addr, saddr, set) \
20 mstp_setbits(le32, addr, saddr, set)
21#define mstp_clrbits_le32(addr, saddr, clear) \
22 mstp_clrbits(le32, addr, saddr, clear)
Nobuhiro Iwamatsu8d7dcd22014-12-02 16:52:21 +090023#define mstp_setclrbits_le32(addr, set, clear) \
24 mstp_setclrbits(le32, addr, set, clear)
Nobuhiro Iwamatsuade3c942014-12-02 16:52:19 +090025
26#endif /* __ASM_ARCH_RCAR_MSTP_H */