Tiny6410 下的usb移植
来源:互联网 发布:哔哩哔哩是什么软件 编辑:程序博客网 时间:2024/05/05 08:12
今天终于做完usb的移植了,前前后后自己一共做了20几个zImage,其中也发现了很多问题,所幸的是问题都已得到解决,有很多问题是关于make menuconfig的,有这样那样的选项没有选上就会出现问题,以后要注意,还有就是网上的关于tiny6410的移植很少,还不全!哎.......
1、vi arch/arm/mach-s3c64xx/mach-mini6410.c
124行增加/* Initializes OTG Phy. to output 48M clock */
void s3c_otg_phy_config(int enable) {
u32 val;
if (enable) {
__raw_writel(0x0, S3C_PHYPWR); /* Power up */
val = __raw_readl(S3C_PHYCLK);
val &= ~S3C_PHYCLK_CLKSEL_MASK;
__raw_writel(val, S3C_PHYCLK);
__raw_writel(0x1, S3C_RSTCON);
udelay(5);
__raw_writel(0x0, S3C_RSTCON); /* Finish the reset */
udelay(5);
} else {
__raw_writel(0x19, S3C_PHYPWR); /* Power down */
}
}
2、vi drivers/usb/host/ohci-s3c2410.c
修改方法
@@ -25,10 +25,14 @@
#define valid_port(idx) ((idx) == 1 || (idx) == 2)
+#ifdef CONFIG_MACH_MINI6410
+extern void s3c_otg_phy_config(int enable);
+#endif
+
/* clock device associated with the hcd */
static struct clk *clk;
-static struct clk *usb_clk;
+static struct clk *otg_clk, *usb_clk;
/* forward definitions */
@@ -47,6 +51,11 @@
dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
+ clk_enable(otg_clk);
+#ifdef CONFIG_MACH_MINI6410
+ s3c_otg_phy_config(1);
+#endif
+
clk_enable(usb_clk);
mdelay(2); /* let the bus clock stabilise */
@@ -79,6 +88,7 @@
clk_disable(clk);
clk_disable(usb_clk);
+ clk_disable(otg_clk);
}
/* ohci_s3c2410_hub_status_data
@@ -375,6 +385,13 @@
goto err_clk;
}
+ otg_clk = clk_get(&dev->dev, "otg");
+ if (IS_ERR(otg_clk)) {
+ dev_err(&dev->dev, "cannot get otg clock\n");
+ retval = -ENOENT;
+ goto err_otg;
+ }
+
s3c2410_start_hc(dev, hcd);
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
@@ -395,6 +412,10 @@
err_ioremap:
s3c2410_stop_hc(dev);
iounmap(hcd->regs);
+
+ clk_put(otg_clk);
+
+ err_otg:
clk_put(usb_clk);
err_clk:
3、make menuconfig
Device Drivers --->
SCSI device support --->
<*> SCSI device support
<*> SCSI disk support
<*> SCSI generic support
USB support
<*> Support for Host-side USB
[*] USB device filesystem (DEPRECATED)
<*> USB Monitor
<*> OHCI HCD support
<*> USB Mass Storage support
File systems --->
DOS/FAT/NT Filesystems --->
<*> MSDOS fs support
<*> VFAT (Windows-95) fs support
(936) Default codepage for FAT
(cp936) Default iocharset for FAT
问题1:
"usb device descriptor read/64, error -71"
linux-kernel/include/asm-generic/erron.h 可以发现是:#define EPROTO 71 /* Protocol error 协议错误*/
内核配置中添加:CONFIG_USB_EHCI_ROOT_HUB_TT=y 就可以了。
问题2:
U盘可以挂载但是只读:
解决:
--- SCSI device support │ │
│ │ [*] legacy /proc/scsi/ support
问题3:
不支持U盘里面的中文名称:
提示:NTFS-fs error (device uba1): ntfs_ucstonls(): Unicode name contains characters that cannot be converted to character set default. You might want to try to use the mount option nls=utf8.
解决:
--- Base native language support │ │
│ │ (utf8) Default NLS Option
问题4:
Linux ubuntu 2.6.38-12-generic 对NTFS支持不好,导致挂载U盘后写入东西相当的费劲,基本上是不能写的,可能低版本的会好一些。
- Tiny6410 下的usb移植
- Tiny6410 移植RT5370 USB无线网卡的方法
- Tiny6410 lcd的移植
- tiny6410 uboot的移植
- Tiny6410的opencv2.0.0移植
- Linux2.6.24下的USB HOST移植
- Tiny6410 的内核移植(拿来主义)
- boa在tiny6410上的移植。
- Tiny6410的OpenCV2.4.2移植笔记
- 基于Tiny6410的DM9000网卡移植
- boa在tiny6410上的移植
- SQLITE3在tiny6410上的移植
- 移植opencv2.4.2到tiny6410的实例
- Tiny6410一线触摸屏tslib的移植
- 移植opencv2.4.2到tiny6410的实例
- Linux下移植OpenCV + Qt 到ARM(Tiny6410)总结
- Mentohust成功移植到Tiny6410 linux环境下
- Linux下移植OpenCV + Qt 到ARM(Tiny6410)总结
- SGU101
- map的应用
- 黑马程序员_学习笔记8用类加载器的方式管理资源和配置文件及类加载器的总结
- 求解gcd(a,b)=ax+by (扩展欧几里得算法)
- ANDROID内核真机移植
- Tiny6410 下的usb移植
- 面向对象的一些理解
- Java WEB开发--国际化
- vc消息映射机制----------------
- 动态表格读取课程表
- 好吧,我这样决定了
- hdu1004
- Java方法形参 Method Parameters
- bash和python中得颜色