Add DWC3 codes

This commit is contained in:
xj 2024-09-10 23:29:36 -07:00
parent 69288eb255
commit 068e61694d
1 changed files with 10 additions and 0 deletions

View File

@ -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