Nobuhiro Iwamatsu | ade3c94 | 2014-12-02 16:52:19 +0900 | [diff] [blame] | 1 | /* |
| 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 Iwamatsu | 8d7dcd2 | 2014-12-02 16:52:21 +0900 | [diff] [blame^] | 17 | #define mstp_setclrbits(type, addr, set, clear) \ |
| 18 | out_##type((addr), (in_##type(addr) | (set)) & ~(clear)) |
Nobuhiro Iwamatsu | ade3c94 | 2014-12-02 16:52:19 +0900 | [diff] [blame] | 19 | #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 Iwamatsu | 8d7dcd2 | 2014-12-02 16:52:21 +0900 | [diff] [blame^] | 23 | #define mstp_setclrbits_le32(addr, set, clear) \ |
| 24 | mstp_setclrbits(le32, addr, set, clear) |
Nobuhiro Iwamatsu | ade3c94 | 2014-12-02 16:52:19 +0900 | [diff] [blame] | 25 | |
| 26 | #endif /* __ASM_ARCH_RCAR_MSTP_H */ |