usb: musb-new: Hack up the driver for the D1

Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2021-09-11 10:12:24 -05:00
parent 38cf2637b2
commit aaa79d79c3
5 changed files with 9 additions and 4 deletions

View File

@ -78,6 +78,7 @@ static inline int __test_and_set_bit(int nr, void *addr)
return retval; return retval;
} }
#define test_and_clear_bit __test_and_clear_bit
static inline int __test_and_clear_bit(int nr, void *addr) static inline int __test_and_clear_bit(int nr, void *addr)
{ {
int mask, retval; int mask, retval;

View File

@ -247,6 +247,7 @@ static inline u64 readq(const volatile void __iomem *addr)
#define insb(p, d, l) readsb(__io(p), d, l) #define insb(p, d, l) readsb(__io(p), d, l)
#define insw(p, d, l) readsw(__io(p), d, l) #define insw(p, d, l) readsw(__io(p), d, l)
#define insl(p, d, l) readsl(__io(p), d, l) #define insl(p, d, l) readsl(__io(p), d, l)
#endif
static inline void readsb(unsigned int *addr, void *data, int bytelen) static inline void readsb(unsigned int *addr, void *data, int bytelen)
{ {
@ -337,7 +338,6 @@ static inline void writesl(unsigned int *addr, const void *data, int longlen)
longlen--; longlen--;
} }
} }
#endif
#define outb_p(val, port) outb((val), (port)) #define outb_p(val, port) outb((val), (port))
#define outw_p(val, port) outw((val), (port)) #define outw_p(val, port) outw((val), (port))

View File

@ -23,4 +23,6 @@
* no one uses the macros defined in this head file. * no one uses the macros defined in this head file.
**************************************************************/ **************************************************************/
#define cpu_relax() barrier()
#endif /* __ASM_RISCV_PROCESSOR_H */ #endif /* __ASM_RISCV_PROCESSOR_H */

View File

@ -23,7 +23,7 @@
#if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \
&& !defined(CONFIG_PPC32) \ && !defined(CONFIG_PPC32) \
&& !defined(CONFIG_PPC64) && !defined(CONFIG_MIPS) \ && !defined(CONFIG_PPC64) && !defined(CONFIG_MIPS) \
&& !defined(CONFIG_M68K) && !defined(CONFIG_M68K) && !defined(CONFIG_RISCV)
static inline void readsl(const void __iomem *addr, void *buf, int len) static inline void readsl(const void __iomem *addr, void *buf, int len)
{ insl((unsigned long)addr, buf, len); } { insl((unsigned long)addr, buf, len); }
static inline void readsw(const void __iomem *addr, void *buf, int len) static inline void readsw(const void __iomem *addr, void *buf, int len)

View File

@ -23,8 +23,8 @@
#include <malloc.h> #include <malloc.h>
#include <phy-sun4i-usb.h> #include <phy-sun4i-usb.h>
#include <reset.h> #include <reset.h>
#include <asm/arch/cpu.h> //#include <asm/arch/cpu.h>
#include <asm/arch/clock.h> //#include <asm/arch/clock.h>
#include <dm/device_compat.h> #include <dm/device_compat.h>
#include <dm/lists.h> #include <dm/lists.h>
#include <dm/root.h> #include <dm/root.h>
@ -174,6 +174,7 @@ static void USBC_ForceVbusValidToHigh(__iomem void *base)
static void USBC_ConfigFIFO_Base(void) static void USBC_ConfigFIFO_Base(void)
{ {
#if 0
u32 reg_value; u32 reg_value;
/* config usb fifo, 8kb mode */ /* config usb fifo, 8kb mode */
@ -181,6 +182,7 @@ static void USBC_ConfigFIFO_Base(void)
reg_value &= ~(0x03 << 0); reg_value &= ~(0x03 << 0);
reg_value |= BIT(0); reg_value |= BIT(0);
writel(reg_value, SUNXI_SRAMC_BASE + 0x04); writel(reg_value, SUNXI_SRAMC_BASE + 0x04);
#endif
} }
/****************************************************************************** /******************************************************************************