blob: 48370f37d8a25cfb2a53a41ea0a8d6deffee8927 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Jiandong Zheng88bb7c02015-07-09 14:26:39 -07002/*
3 * Copyright 2015 Broadcom Corporation.
Jiandong Zheng88bb7c02015-07-09 14:26:39 -07004 */
5
6#ifndef __BCM_UDC_OTG_H
7#define __BCM_UDC_OTG_H
8
Jiandong Zheng88bb7c02015-07-09 14:26:39 -07009static 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
14static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask)
15{
16 writel((readl(addr) & ~(fld_mask)), (addr));
17}
18
19#endif