From 068e61694de8e0151e35d26d13ed36dd0ac032a1 Mon Sep 17 00:00:00 2001 From: xj Date: Tue, 10 Sep 2024 23:29:36 -0700 Subject: [PATCH] Add DWC3 codes --- .../services/drivers/usb/components/port/dwc3/dwc3.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/dwc3/dwc3.h b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/dwc3/dwc3.h index 2ebd36609..f6a11c4d4 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/dwc3/dwc3.h +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/dwc3/dwc3.h @@ -892,6 +892,16 @@ void dwc3_set_mode(struct dwc3 *dwc, uint32_t mode); int dwc3_host_init(struct dwc3 *dwc); +static inline uint32_t dwc3_readl(void *base, uint32_t offset){ + uintptr_t offs = offset - DWC3_GLOBALS_REGS_START; + uint32_t value; + value = readl(base + offs); + return value; +} +static inline void dwc3_writel(void *base, uint32_t offset, uint32_t value){ + unsigned long offs = offset - DWC3_GLOBALS_REGS_START; + writel(value, base + offs); +} #endif