blob: d47aefaa89c16399fc1b393d8d5d8841f33ce5b7 [file] [log] [blame]
Jiandong Zheng88bb7c02015-07-09 14:26:39 -07001/*
2 * Copyright 2015 Broadcom Corporation.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __BCM_UDC_OTG_H
8#define __BCM_UDC_OTG_H
9
10#include <common.h>
11
12static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask)
13{
14 writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr));
15}
16
17static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask)
18{
19 writel((readl(addr) & ~(fld_mask)), (addr));
20}
21
22#endif