Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Jiandong Zheng | 88bb7c0 | 2015-07-09 14:26:39 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2015 Broadcom Corporation. |
Jiandong Zheng | 88bb7c0 | 2015-07-09 14:26:39 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __BCM_UDC_OTG_H |
| 7 | #define __BCM_UDC_OTG_H |
| 8 | |
| 9 | #include <common.h> |
| 10 | |
| 11 | static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask) |
| 12 | { |
| 13 | writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr)); |
| 14 | } |
| 15 | |
| 16 | static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask) |
| 17 | { |
| 18 | writel((readl(addr) & ~(fld_mask)), (addr)); |
| 19 | } |
| 20 | |
| 21 | #endif |