Lines Matching refs:_sc
40 #define MTK_IS_SWITCH(_sc, _type) \ argument
41 (!!((_sc)->sc_switchtype == MTK_SWITCH_ ## _type))
119 #define MTKSWITCH_LOCK(_sc) \ argument
120 mtx_lock(&(_sc)->sc_mtx)
121 #define MTKSWITCH_UNLOCK(_sc) \ argument
122 mtx_unlock(&(_sc)->sc_mtx)
123 #define MTKSWITCH_LOCK_ASSERT(_sc, _what) \ argument
124 mtx_assert(&(_sc)->sc_mtx, (_what))
125 #define MTKSWITCH_TRYLOCK(_sc) \ argument
126 mtx_trylock(&(_sc)->sc_mtx)
128 #define MTKSWITCH_READ(_sc, _reg) \ argument
129 bus_read_4((_sc)->sc_res, (_reg))
130 #define MTKSWITCH_WRITE(_sc, _reg, _val) \ argument
131 bus_write_4((_sc)->sc_res, (_reg), (_val))
132 #define MTKSWITCH_MOD(_sc, _reg, _clr, _set) \ argument
133 MTKSWITCH_WRITE((_sc), (_reg), \
134 ((MTKSWITCH_READ((_sc), (_reg)) & ~(_clr)) | (_set))