回复第 9 楼 于2014-04-18 17:06:53发表:
在U-Boot中,在include/configs/mx6q_sabrelite_android.h添加了支持USB命令的宏定义
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#define CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_FSL
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_SYS_FLS_USDHC_NUM 4
#define CONFIG_DOS_PARTITION 1
#define CONFIG_CMD_FAT 1
然后修改了了driver/usb/host/ehic-fsl.c文件的int ehci_hcd_init(void)
int ehci_hcd_init(void)
{
struct usb_ehci *ehci;
//ehci = (struct usb_ehci *)CONFIG_SYS_MPC8xxx_USB_ADDR;
ehci = (struct usb_ehci *)0x02184200;
hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
hcor = (struct ehci_hcor *)((uint32_t) hccr +
HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
/* Set to Host mode */
/*
setbits_le32(&ehc