diff options
author | Jiandong Zheng <jdzheng@broadcom.com> | 2015-07-09 14:26:39 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-07-22 08:57:54 +0200 |
commit | 854cbd2977561f8572c7ab07b95ee90226451185 (patch) | |
tree | a654d7cd9423a690b7e633b23d0350cca923b5a5 /drivers/usb/gadget/bcm_udc_otg.h | |
parent | 05a950cf5947d33367d8060fca165adabb0cd970 (diff) |
usb: gadget: bcm_udc_otg files
Add the required files for the Broadcom UDC OTG interface.
Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
Diffstat (limited to 'drivers/usb/gadget/bcm_udc_otg.h')
-rw-r--r-- | drivers/usb/gadget/bcm_udc_otg.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/gadget/bcm_udc_otg.h b/drivers/usb/gadget/bcm_udc_otg.h new file mode 100644 index 0000000000..d47aefaa89 --- /dev/null +++ b/drivers/usb/gadget/bcm_udc_otg.h @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Broadcom Corporation. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#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 |