aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/bcm_udc_otg.h
blob: 24cc936c6b483a83b925150359449741a8fa8795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright 2015 Broadcom Corporation.
 */

#ifndef __BCM_UDC_OTG_H
#define __BCM_UDC_OTG_H

#include <common.h>

static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask)
{
	writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr));
}

static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask)
{
	writel((readl(addr) & ~(fld_mask)), (addr));
}

#endif