bcm_udc_otg.h 427 B

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