bcm_udc_otg.h 427 B

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