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)) 17 #define mstp_setclrbits(type, addr, set, clear) \ 18 out_##type((addr), (in_##type(addr) | (set)) & ~(clear)) 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) 23 #define mstp_setclrbits_le32(addr, set, clear) \ 24 mstp_setclrbits(le32, addr, set, clear) 25 26 #ifndef CONFIG_SMSTP0_ENA 27 #define CONFIG_SMSTP0_ENA 0x00 28 #endif 29 #ifndef CONFIG_SMSTP1_ENA 30 #define CONFIG_SMSTP1_ENA 0x00 31 #endif 32 #ifndef CONFIG_SMSTP2_ENA 33 #define CONFIG_SMSTP2_ENA 0x00 34 #endif 35 #ifndef CONFIG_SMSTP3_ENA 36 #define CONFIG_SMSTP3_ENA 0x00 37 #endif 38 #ifndef CONFIG_SMSTP4_ENA 39 #define CONFIG_SMSTP4_ENA 0x00 40 #endif 41 #ifndef CONFIG_SMSTP5_ENA 42 #define CONFIG_SMSTP5_ENA 0x00 43 #endif 44 #ifndef CONFIG_SMSTP6_ENA 45 #define CONFIG_SMSTP6_ENA 0x00 46 #endif 47 #ifndef CONFIG_SMSTP7_ENA 48 #define CONFIG_SMSTP7_ENA 0x00 49 #endif 50 #ifndef CONFIG_SMSTP8_ENA 51 #define CONFIG_SMSTP8_ENA 0x00 52 #endif 53 #ifndef CONFIG_SMSTP9_ENA 54 #define CONFIG_SMSTP9_ENA 0x00 55 #endif 56 #ifndef CONFIG_SMSTP10_ENA 57 #define CONFIG_SMSTP10_ENA 0x00 58 #endif 59 #ifndef CONFIG_SMSTP11_ENA 60 #define CONFIG_SMSTP11_ENA 0x00 61 #endif 62 63 #ifndef CONFIG_RMSTP0_ENA 64 #define CONFIG_RMSTP0_ENA 0x00 65 #endif 66 #ifndef CONFIG_RMSTP1_ENA 67 #define CONFIG_RMSTP1_ENA 0x00 68 #endif 69 #ifndef CONFIG_RMSTP2_ENA 70 #define CONFIG_RMSTP2_ENA 0x00 71 #endif 72 #ifndef CONFIG_RMSTP3_ENA 73 #define CONFIG_RMSTP3_ENA 0x00 74 #endif 75 #ifndef CONFIG_RMSTP4_ENA 76 #define CONFIG_RMSTP4_ENA 0x00 77 #endif 78 #ifndef CONFIG_RMSTP5_ENA 79 #define CONFIG_RMSTP5_ENA 0x00 80 #endif 81 #ifndef CONFIG_RMSTP6_ENA 82 #define CONFIG_RMSTP6_ENA 0x00 83 #endif 84 #ifndef CONFIG_RMSTP7_ENA 85 #define CONFIG_RMSTP7_ENA 0x00 86 #endif 87 #ifndef CONFIG_RMSTP8_ENA 88 #define CONFIG_RMSTP8_ENA 0x00 89 #endif 90 #ifndef CONFIG_RMSTP9_ENA 91 #define CONFIG_RMSTP9_ENA 0x00 92 #endif 93 #ifndef CONFIG_RMSTP10_ENA 94 #define CONFIG_RMSTP10_ENA 0x00 95 #endif 96 #ifndef CONFIG_RMSTP11_ENA 97 #define CONFIG_RMSTP11_ENA 0x00 98 #endif 99 100 struct mstp_ctl { 101 u32 s_addr; 102 u32 s_dis; 103 u32 s_ena; 104 u32 r_addr; 105 u32 r_dis; 106 u32 r_ena; 107 }; 108 109 #endif /* __ASM_ARCH_RCAR_MSTP_H */ 110