diff options
Diffstat (limited to 'roms/u-boot/drivers/usb/gadget/bcm_udc_otg.h')
-rw-r--r-- | roms/u-boot/drivers/usb/gadget/bcm_udc_otg.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roms/u-boot/drivers/usb/gadget/bcm_udc_otg.h b/roms/u-boot/drivers/usb/gadget/bcm_udc_otg.h new file mode 100644 index 000000000..24cc936c6 --- /dev/null +++ b/roms/u-boot/drivers/usb/gadget/bcm_udc_otg.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2015 Broadcom Corporation. + */ + +#ifndef __BCM_UDC_OTG_H +#define __BCM_UDC_OTG_H + +#include <common.h> + +static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask) +{ + writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr)); +} + +static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask) +{ + writel((readl(addr) & ~(fld_mask)), (addr)); +} + +#endif |