robotx计划使用2个usb端口,一个无限网卡,一个摄像头。之前编译好的内核只启用了一个。
开发板的说明书介绍说
USB 接口
── 二个 USB1.1 HOST 接口;
── 一个 USB1.1 Device 接口;
说明启用2个是可行的。
看电路图
把j13和j14的跳线接在1,2上,这样启用,j16 usb host 禁用j15usb device.
然后就是修改驱动。
drivers/usb/host/Kconfig
增加
config ENABLE_TWO_USB_HOST
bool "enable two usb host"
---help---
fs2410 enable two usb host
保存
在drivers/usb/host/ochi-s3c2410.c
增加头文件
#ifdef CONFIG_ENABLE_TWO_USB_HOST
#include <mach/regs-gpio.h>
#endif
在usb_hcd_s3c2410_probe函数(第353行)中增加
#ifdef CONFIG_ENABLE_TWO_USB_HOST
unsigned long reg_misccr = 0;
reg_misccr = readl(S3C2410_MISCCR);
reg_misccr = reg_misccr|S3C2410_MISCCR_USBHOST;
writel(reg_misccr, S3C2410_MISCCR);
#endif
保存退出
make menuconfig配置选上,刚才添加的选项
make
---
ok