飞凌OK6410开发板之u(5)

继上篇OK6410之LINUX-2.6.39.2内核移植愚,由于上篇移植的基本就是 LINUX内核里面的mini6410的复本,只是做了稍许的修改,如果没有看那一篇的玩家,最好还是先看完那一篇再来看这一篇吧,因为我移植LINUX2.6.39.2到OK6410上(手头也只有这么一块板子,玩玩呗)是一个连续性的过程。

到现在为止,第一篇移植时,基本已经实现了OK6410单板LINUX2.6.39.2的4.3寸LCD(理论8寸也行,没有试),DM9000网卡,NAND三大驱动(呵呵,CP mini6410的版本就是有这么个好处,本人比较喜欢偷懒,有现成的干嘛不用,对吧),并且经本人亲自实践,不管是BOOT NFS,挂载NFS还是BOOT NAND上分区的文件CRAMFS系统,都是很正常的,对于BOOT NAND分区上的CRAMFS需要在内核配置里面FILE SYSTEM里面选上CRAMFS文件系统支持,而对于YAFFS2文件系统的支持还没有,因为内核里面默认是不支持的,需要自己动手移植,等有空再移植吧,而到写这一篇的时候,又实现了OK6410单板LINUX2.6.39.2的USB-HOST,USB-STORAGE,MMC/SD卡,

GPIO-KEYS(OK6410单板上的4个按键),I2C,LEDS(单板上的4个LED灯),TOUCHSCREEM(触摸屏)等功能,而对于OK6410之linux-2.6.39.2内核后期的驱动移植部分,由于有些驱动需要增加驱动代码文件,eg.触摸屏,由于linux2.6.39.2内核内部mini6410单板采用的是内核里面提供的2410的ts驱动代码,对于OK6410单板驱动不成功,出于偷懒吧,直接将ok6410的linux2.6.28里面的ts移植了过来,需要增加S3C-TS等相关驱动文件还要修改相关代码,所以在这里,我就先来讲一些不需要做大手笔的板载器件的功能实现吧,等有空会再写如何移植那些需要做大手笔的移植的,呵呵,请不要喷我啊,大手笔只是个比方而已啦,再说了,本人能力有限,写这些东西也只是为了给出我个人移植时的一种心态与看法还有建议而已啦,互相学习进步嘛,对吧,LINUX本来就是个开源的世界,每个人都可以贡献自己的一点微薄的哪怕是一点点点的也行啊,对吧,哦,不知不觉又扯了这么多的野棉花了,呵呵,不好意思!好了,切入正题吧!

我一向喜欢有目的,带着问题去思考移植过程中遇到的问题,因为只有这样才能有针对性的解决,记忆深刻嘛,对吧。

需要实现的功能:

USB-OTG,USB-STORAGE,SD卡,I2C,GPIO-KEYS(OK6410单板上的6个按键),可能会有人问,为什么偏偏是这几个呢?其实主要是因为在后期移植过程中,我发现这几个的驱动代码在LINUX-2.6.39.2里面其实是实现的相当完美的对于S3C6410来说,对于S3C6410的USB-HOST基本就是和2410一样(参见S2C6410的DATASHEET的USB部分,没有几页,啥子还说参考OHCI,呵呵),内核里面完全采用的就是2410的OHCI通用驱动来实现的,而对于I2C又是采用2440的,这就是为什么在内核启动过程中,我们会经常在串口打印信息中看到6410的MACH怎么还会有MACH2410或是MACH2440的打印信息啊,是不是搞错了,呵呵,其实不然,这里,我们需要明白一个概念,那就是在LINUX内核里面有好多代码是各个SOC通用的,因为毕竟6410SOC与2410SOC或是2440SOC在外围控制器或总线上面必然会有好多是相似或是相同的,既然相通就通用又何必再去写新的呢,对吧!

说白了,这几个其实就是驱动代码不需要我们做任何修改或替换,只需要找到驱动所在,然后在MAKE MENUCONFIG 里面配置好,然后最后只需要在目标文件LINUX-2.6.39.2/arch/arm/mach-s32c64xx/mach-ok6410.c里面添加小段代码就可以了,当然,如果这些小段代码不添加的话,那么SOCS3C6410的那些外围控制器件是无法正确工作的。

1,对于USB-HOST功能:

其实2410的OHCI驱动已经相当完善,但是由于OK6410来说,还需要一个48M 的时钟信号产生,才能使能USB-HOST功能

第一步,在mach-ok6410.c里面添加头文件

#include <plat/regs-usb-hsotg-phy.h>
#include <plat/clock.h>

然后在任意一个地方添加

#ifdef CONFIG_USB_SUPPORT
void s3c_hsotg_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 */
 }
}
EXPORT_SYMBOL(s3c_hsotg_phy_config);
#endif

这段代码是参靠飞凌的,而这段代码实现的就是一个输出48M时钟信号的开关,当enable=1时,执行enable部分的代码,使能48M时钟信号输出,当enable=0时,执行else部分的代码,就禁止48M时钟信号,最后还需要在ok6410_machine_init(void)单板初始化函数里面添加48M时钟使能信号:

s3c_hsotg_phy_config(1);

以及在硬件初始化函数 *ok6410_devices[] __initdata里面添加&s3c_device_usb_hsotg,默认下*ok6410_devices[] __initdata里面已经添加了&s3c_device_ohci,所以我们不需要再添加了。

而对于这个函数的实现是在/drivers/usb/目录下的相应的驱动函数里定义的,不需要去自己写。

最后就是在MAKE MENUCONFIG时,选中USB选项里面的相关项目就行了:

DEVICE DRIVERS--------->

<*>   Support for Host-side USB                              

[*]     USB verbose debug messages                                 
      [*]     USB announce new devices                                   
             *** Miscellaneous USB options ***                         
      [*]     USB device filesystem (DEPRECATED)                        
      [*]     USB device class-devices (DEPRECATED)  

<*>   OHCI HCD support   

好了,到这里,就完成了 OK6410的LINUX2.6.39.2的USB-OTG功能了,编译,运行,试试,呵呵,如果你们想看相关驱动代码的话,就直接到/linux2.6.39.2/drivers/usb/core以及/linux2.6.39.2/drivers/usb/host里面看看

2,对于USB-STORAGE的功能

其实这个是最简单的了,呵呵,只需要配置MENUCONFIG就行了,因为驱动代码已经相当完善了在/linux2.6.39.2/drivers/usb/host目录下,大家如果有兴趣的话,可以去看哈子。

但是,在这里,有一点,是需要注意的,就是如果你不配SCSI总线设备这个选项的话,这个USB-STORAGE是在配置里面看不到的哦,一开始我也觉得奇怪,然后仔细一想,也对, USB-STORAGE本来就是基于SCSI总线挂载的,你不支持SCSI总线设备,肯定就没得USB-STORAGE可选了啊,配置如下:

SCSI device support  --->

<*> SCSI device support

[*] legacy /proc/scsi/ support                                    
          *** SCSI support type (disk, tape, CD-ROM) ***               
         <*> SCSI disk support 

<*> SCSI generic support

配置完SCSI后,是不是再进USB选项里面,就看到USB MASS STORAGE的选项了啊,呵呵

好了,然后再

[*] USB support  --->

<*>   USB Mass Storage support                                

[*]     USB Mass Storage verbose debug

OK,好了,USB-STORAGE搞定了,其实配置MENUCONFIG,也是一门学问,呵呵,一定要弄清楚该选项是干嘛的,英语好的估计很好看懂的吧,毕竟里面的配置太多了,哎!

3,对于MMC/SD功能:

和USB一样,驱动代码已经在内核里面,在linux2.6.39.2/drivers/mmc下面相关目录里面,但是为了OK6410单板很好的工作,我们需要在mach-ok6410.c里面添加头文件:#include <plat/sdhci.h>

然后在任意位置添加一小段代码;

static struct s3c_sdhci_platdata ok6410_hsmmc0_pdata = {
    .max_width      = 4,
    .cd_type        = S3C_SDHCI_CD_INTERNAL,
};

static struct s3c_sdhci_platdata ok6410_hsmmc1_pdata = {
    .max_width      = 4,
    .cd_type        = S3C_SDHCI_CD_PERMANENT,
};

与USB一样,也需要在 ok6410_machine_init(void)这个初始化函数里面初始化一遍hsmmc0_pdata,hsmmc1_pdata.

添加:

s3c_sdhci0_set_platdata(&ok6410_hsmmc0_pdata);
 s3c_sdhci1_set_platdata(&ok6410_hsmmc1_pdata);

因为默认下,mach-ok6410.c里面,已经有了

&s3c_device_hsmmc0,
 &s3c_device_hsmmc1,所以我们不需要再添加了。

最后就又轮到MENUCONFIG了,配置如下:

<*> MMC/SD/SDIO card support  --->

[*]   MMC debugging 

<*>   MMC block device driver                                    
    (8)     Number of minors per block device                       

[*]     Use bounce buffer for simple hosts

<*>   Secure Digital Host Controller Interface support

<*>   SDHCI support on Samsung S3C SoC

好了。

4,OK6410的I2C功能:

在mach-ok6410.c里面添加头文件:#include <linux/i2c.h>,#include <plat/iic.h>并在任意位置,添加

static struct i2c_board_info i2c_devs0[] __initdata = {
 { I2C_BOARD_INFO("24c08", 0x50), },
 { I2C_BOARD_INFO("ov965x", 0x30), },
};

,和前面一样,都是需要初始化的嘛,对吧。在*ok6410_devices[] __initdata 里面添加

&s3c_device_i2c0,这个也是在相应的i2c驱动里面实现的函数,不需要我们去写,然后还需要在ok6410_machine_init(void)厨师换函数里面填上我们刚刚添加的那段代码初始化:

i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));

最后就是又来MENUCONFIG了,配置如下:

Device Drivers  --->

<*> I2C support  --->

[*]   Enable compatibility bits for old user-space  

<*>   I2C device interface

[*]   Autoselect pertinent helper modules

I2C Hardware Bus support  --->

<*> S3C2410 I2C Driver

5,OK6410的GIPO-KEYS,也就是单板上面的6个按键功能的实现:

需要添加头文件:#include <linux/gpio_keys.h>,#include <linux/input.h>

然后在mach-ok6410.c文件里面的任意一个位置,添加如下代码,这是完全复制飞凌的代码,

static struct gpio_keys_button gpio_buttons[] = {
 {
  .gpio  = S3C64XX_GPN(0),
  //.code  = 25,
  .code  = KEY_UP,
  .desc  = "BUTTON1",
  .active_low = 1,
  .wakeup  = 0,
 },
 {
  .gpio  = S3C64XX_GPN(1),
  //.code  = 42,
  .code  = KEY_DOWN,
  .desc  = "BUTTON2",
  .active_low = 1,
  .wakeup  = 0,
 },
 {
  .gpio  = S3C64XX_GPN(2),
  //.code  = 50,
  .code  = KEY_LEFT,
  .desc  = "BUTTON3",
  .active_low = 1,
  .wakeup  = 0,
 },
 {
  .gpio  = S3C64XX_GPN(3),
  //.code  = 10,
  .code  = KEY_RIGHT,
  .desc  = "BUTTON4",
  .active_low = 1,
  .wakeup  = 0,
 },
 {
  .gpio  = S3C64XX_GPN(4),
  //.code  = 24,
  .code  = KEY_ENTER,
  .desc  = "BUTTON5",
  .active_low = 1,
  .wakeup  = 0,
 },
 {
  .gpio  = S3C64XX_GPN(5),
  //.code  = 38,
  .code  = KEY_ESC,
  .desc  = "BUTTON6",
  .active_low = 1,
  .wakeup  = 0,
 }
};

static struct gpio_keys_platform_data gpio_button_data = {
 .buttons = gpio_buttons,
 .nbuttons = ARRAY_SIZE(gpio_buttons),
};

static struct platform_device gpio_button_device = {
 .name  = "gpio-keys",
 .id  = -1,
 .num_resources = 0,
 .dev  = {
  .platform_data = &gpio_button_data,
 }
};

同上,然后在*ok6410_devices[] __initdata函数里面填上

&gpio_button_device,

最后一步,又轮到MAKE MENUCONFIG了,配置如下:

Device Drivers  --->

Input device support  --->

[*]   Keyboards  --->

<*>   GPIO Buttons

好了,到这里,基本都完成了,是不是驱动代码完全不用理会啊,我们只需添加一些使能的代码在目标板件里面就行了啊,好了,你可以分布编译进行试验 或是等都完成后再一起编译试验,这里我附上我的内核启动信息吧,BOOT_NFS上篇已经贴出来了,这篇用的是BOOT_CRAMFS,CRAMFS位于NAND的第三分区,也就是、dev/mtdblock2了,

这是我到目前位置完成的驱动实现信息,等有空再将后面的相关驱动移植心得贴出来吧:

NAND read: device 0 offset 0x100000, size 0x500000

5242880 bytes read: OK

## Booting image at c0008000 ...

Image Name:   Linux-2.6.39.2

Created:      2011-07-30  10:22:59 UTC

Image Type:   ARM Linux Kernel Image (uncompressed)

Data Size:    2515476 Bytes =  2.4 MB

Load Address: 50008000

Entry Point:  50008000

Verifying Checksum ... OK

OK


Starting kernel ...


Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39.2 (root@hewenqiang-Ubuntu) (gcc version 4.2.2) #1 Sat Jul 30 18:22:36 CST 2011
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OK6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
camera: no parent clock specified
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySAC0,115200 mem=128M
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 124256k/124256k available, 6816k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff600000 - 0xffe00000   (   8 MB)
    vmalloc : 0xc8800000 - 0xf6000000   ( 728 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc002e000   ( 152 kB)
      .text : 0xc002e000 - 0xc04ed918   (4863 kB)
      .data : 0xc04ee000 - 0xc0529840   ( 239 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:246
VIC @f6000000: id 0x00041192, vendor 0x41
VIC @f6010000: id 0x00041192, vendor 0x41
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 528.79 BogoMIPS (lpj=2643968)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
OK6410: Option string ok6410=0
OK6410: selected LCD display is 480x272
s3c64xx_dma_init: Registering DMA channels
PL080: IRQ 73, at c8808000, channels 0..8
PL080: IRQ 74, at c880c000, channels 8..16
S3C6410: Initialising architecture
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 242
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x34
s3c-fb s3c-fb: window 0: fb
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns
s3c24xx-nand s3c6400-nand: System booted from NAND
s3c24xx-nand s3c6400-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000600000 : "Kernel"
0x000000600000-0x000007e00000 : "User"
0x000007e00000-0x000040000000 : "File System"
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth2090025647: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000b at c8826000,c882a004 IRQ 108 MAC: b6:53:5e:69:6a:ee (random)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.39.2 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux media interface: v0.10
lirc_dev: IR Remote Control driver registered, major 252
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
i2c-core: driver [tuner] using legacy suspend method
i2c-core: driver [tuner] using legacy resume method
i2c-core: driver [msp3400] using legacy suspend method
i2c-core: driver [msp3400] using legacy resume method
usbcore: registered new interface driver pvrusb2
pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
pvrusb2: Debug mask is 31 (0x1f)
usbcore: registered new interface driver hdpvr
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new interface driver ushc
leds initialized
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
s3c-rtc s3c64xx-rtc: setting system clock to 2000-12-10 19:27:02 UTC (976476422)
mmc0: new high speed SD card at address 0001
VFS: Mounted root (cramfs filesystem) readonly on device 31:2.
Freeing init memory: 152K
mmcblk0: mmc0:0001  1.85 GiB
 mmcblk0: p1
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
FAT: codepage cp936 not found
*************************************
            
*************************************
mkdir: cannot create directory '/mnt/disk': File exists
mount: mounting /dev/mtdblock3 on /mnt/disk failed: No such device
cp: cannot stat '/mnt/disk/pointercal': No such file or directory
Try to bring eth0 interface up......dm9000 dm9000: eth0: link down
Done
                                 
Starting Qtopia, please waiting...

Please press Enter to activate this console. touch...

USB-STORAGE验证实例:

下面是插入联想8G U盘得打印信息:

[root@OK6410 /]# lsusb 1-1: new full speed USB device number 2 using s3c2410-ohc
i
usb 1-1: New USB device found, idVendor=17ef, idProduct=3818
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: USB Flash Drive
usb 1-1: Manufacturer: Lenovo
usb 1-1: SerialNumber: AA00000000000293
scsi0 : usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access     Lenovo   USB Flash Drive  1100 PQ: 0 ANSI: 0 CCS

sd 0:0:0:0: [sda] 15826944 512-byte logical blocks: (8.10 GB/7.54 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda:
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

下面是插入USB 摄像头的信息(本人的摄像头采用的是UVC驱动,这个驱动只需要在内核配置里面添加就行了)

[root@OK6410 /]# usb 1-1: new full speed USB device number 4 using s3c2410-ohci
usb 1-1: New USB device found, idVendor=0ac8, idProduct=3420
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: Altair USB2.0 Camera
usb 1-1: Manufacturer: Vimicro Corp.
uvcvideo: Found UVC 1.00 device Altair USB2.0 Camera (0ac8:3420)
input: Altair USB2.0 Camera as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1.0/i
nput/input3

下面是进入文件系统后,用飞凌出的按键测试程序测试的6个按键GIPO-KEYS驱动显示情况:

nBytes =16
key type =0
key code =0
key value =0
nBytes =16
key type =1
key code =105
key value =1
nBytes =16
key type =0
key code =0
key value =0
nBytes =16
key type =1
key code =105
key value =0
nBytes =16
key type =0
key code =0
key value =0
由于是显示循环过快,只贴了部分,说明移植是成功的。

而内核将SD卡已经识别出了,验证是成功的,我已经将需要更改的位置都用红色标出来了,方便看嘛 ,对吧!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b86dcbd70445a781c1e95a9151210962.html