forked from yystopf/xiuos
add DWC3 codes
This commit is contained in:
parent
c500ecfe10
commit
c3ab8a0b24
|
@ -1,10 +1,3 @@
|
||||||
#include "rk3568_usb.h"
|
#include "rk3568_usb.h"
|
||||||
|
|
||||||
|
|
||||||
int enable_dwc3_rk3568(){
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
int disable_dwc3_rk3568(){
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef RK3568_USB_H_
|
#ifndef RK3568_USB_H_
|
||||||
#define RK3568_USB_H_
|
#define RK3568_USB_H_
|
||||||
|
|
||||||
int enable_rk3568_usb = 0;
|
#include "dwc3.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SRC_DIR := xhci
|
SRC_DIR := xhci dwc3
|
||||||
|
|
||||||
|
|
||||||
include $(KERNEL_ROOT)/compiler.mk
|
include $(KERNEL_ROOT)/compiler.mk
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
include $(KERNEL_ROOT)/services/drivers/usb/components/usb.mk
|
||||||
|
|
||||||
|
objs += dwc3.o
|
||||||
|
|
||||||
|
all: ${objs}
|
||||||
|
@echo "generate $^"
|
||||||
|
@mv $^ $(KERNEL_ROOT)/services/drivers/usb/components
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
@echo "cc $^"
|
||||||
|
@${cc} ${cflags} ${c_useropts} ${INC_DIR} -o $@ -c $^
|
|
@ -0,0 +1 @@
|
||||||
|
#include "dwc3.h"
|
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef DWC3_H_
|
||||||
|
#define DWC3_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "usbh_core.h"
|
||||||
|
#include "usbh_hub.h"
|
||||||
|
#include "xhci_reg.h"
|
||||||
|
#include "xhci.h"
|
||||||
|
#include "gadget.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef GADGET_H_
|
||||||
|
#define GADGET_H_
|
||||||
|
|
||||||
|
#include <strings.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "usbh_core.h"
|
||||||
|
|
||||||
|
struct usb_gadget {
|
||||||
|
int speed;
|
||||||
|
int max_speed;
|
||||||
|
int state;
|
||||||
|
uint8_t is_dualspeed:1;
|
||||||
|
uint8_t is_otg:1;
|
||||||
|
uint8_t is_a_peripheral:1;
|
||||||
|
uint8_t b_hnp_enable:1;
|
||||||
|
uint8_t a_hnp_support:1;
|
||||||
|
uint8_t a_alt_hnp_support:1;
|
||||||
|
uint8_t quirk_ep_out_aligned_size:1;
|
||||||
|
const char *name;
|
||||||
|
void *dev;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -43,6 +43,7 @@ INC_DIR = -I$(KERNEL_ROOT)/services/drivers/usb/ \
|
||||||
-I$(KERNEL_ROOT)/services/drivers/usb/components/mem \
|
-I$(KERNEL_ROOT)/services/drivers/usb/components/mem \
|
||||||
-I$(KERNEL_ROOT)/services/drivers/usb/components/osal \
|
-I$(KERNEL_ROOT)/services/drivers/usb/components/osal \
|
||||||
-I$(KERNEL_ROOT)/services/drivers/usb/components/port \
|
-I$(KERNEL_ROOT)/services/drivers/usb/components/port \
|
||||||
|
-I$(KERNEL_ROOT)/services/drivers/usb/components/port/dwc3 \
|
||||||
-I$(KERNEL_ROOT)/services/drivers/usb/components/port/xhci \
|
-I$(KERNEL_ROOT)/services/drivers/usb/components/port/xhci \
|
||||||
-I$(KERNEL_ROOT)/services/drivers/usb/usb_service \
|
-I$(KERNEL_ROOT)/services/drivers/usb/usb_service \
|
||||||
-I$(KERNEL_ROOT)/services//semaphore \
|
-I$(KERNEL_ROOT)/services//semaphore \
|
||||||
|
|
Loading…
Reference in New Issue