1 /*
2  * Copyright 2015 Broadcom Corporation.
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #ifndef __BCM_UDC_OTG_H
8 #define __BCM_UDC_OTG_H
9 
10 #include <common.h>
11 
12 static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask)
13 {
14 	writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr));
15 }
16 
17 static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask)
18 {
19 	writel((readl(addr) & ~(fld_mask)), (addr));
20 }
21 
22 #endif
23