前一篇文章,我们的Linux能后启动了,只是在识别nand时候,没有获取到时钟源,导致后面的分区没哟进行。
我们从启动的log发现:
[06/08-11:25:41:371]s3c24xx-nand s3c6400-nand: failed to get clock
[06/08-11:25:41:371]s3c24xx-nand: probe of s3c6400-nand failed with error –2
于是追踪到代码:
nandflash驱动中——s3c2410.c中
/* get the clock source and enable it */
info->clk = devm_clk_get(&pdev->dev, 'nand');
if (IS_ERR(info->clk)) {
dev_err(&pdev->dev, 'failed to get clockn');
err = -ENOENT;
goto exit_error;
}
发现在去find “nand”clock source时,获取不到,因此,我们打开S3c2410.c (driversmtdnand)
于是打开Clk-s3c64xx.c (driversclksamsung)
发现在Aliases时,并没有Aliases nand,因此我试着加了以下代码:ALIAS(MEM0_NFCON, 's3c6400-nand', 'nand'),
/* Aliases for s3c6410-specific clocks. */
static struct samsung_clock_alias s3c6410_clock_aliases[] = {
ALIAS(PCLK_IIC1, 's3c2440-i2c.1', 'i2c'),
ALIAS(PCLK_IIS2, 'samsung-i2s.2', 'iis'),
ALIAS(SCLK_FIMC, 's3c-camif', 'fimc'),
ALIAS(SCLK_AUDIO2, 'samsung-i2s.2', 'audio-bus'),
ALIAS(MEM0_NFCON, 's3c6400-nand', 'nand'),
ALIAS(MEM0_SROM, NULL, 'srom'),
};
这样的话,当去clk_get时,应该不会有问题了。
这个机制是linux-3.10后才加的,这个问题卡了我好久。
我们make uImage后测试如下:
从上面我们又发现出错以下信息:
[06/08-14:18:34:573]nand: No oob scheme defined for oobsize 218
[06/08-14:18:34:573]------------[ cut here ]------------
[06/08-14:18:34:574]kernel BUG at drivers/mtd/nand/nand_base.c:3732!
原来是我们的nandflash的oobsize是218,而nand_base.c中并没有加入218的处理,因此参照6410驱动,修改nand_base.c。做如下添加:
1. 添加nand_oob_218定义
2. 添加case 218处理
好了,我们再次 make uImage后,下载到板子上,启动如下:
[06/08-14:28:27:608]U-Boot 2010.03-svn3 (May 06 2014 - 22:13:20) for SMDK6410
[06/08-14:28:27:608]
[06/08-14:28:27:608]*******************************************************
[06/08-14:28:27:619] Welcome to Embedded System
[06/08-14:28:27:620] Base On S3C6410 Devolopment
[06/08-14:28:27:620] Date: 2014/4/15 22:00 PM
[06/08-14:28:27:630]*******************************************************
[06/08-14:28:27:631]
[06/08-14:28:27:631]CPU: S3C6410@533MHz
[06/08-14:28:27:631] Fclk = 533MHz, Hclk = 133MHz, Pclk = 66MHz (ASYNC Mode)
[06/08-14:28:27:631]Board: SMDK6410
[06/08-14:28:27:636]DRAM: 256 MB
[06/08-14:28:27:678]Flash: 0 kB
[06/08-14:28:27:679]NAND Flash: 2048 MB
[06/08-14:28:28:799]********************************************************
[06/08-14:28:28:799]Initial LCD controller
[06/08-14:28:28:812] clk_freq:9 MHz, div_freq:13 ,rea_freq:9 MHz
[06/08-14:28:28:812]
[06/08-14:28:28:813] HBP = 2 HFP = 2 HSW = 41,Hpixs:480
[06/08-14:28:28:813] VBP = 2 VFP = 2 VSW = 10,Vpixs:272
[06/08-14:28:28:830]FrameBuff:57e7a000
[06/08-14:28:28:830] LCD initialization Finished.
[06/08-14:28:28:831]********************************************************
[06/08-14:28:28:852]In: serial
[06/08-14:28:28:852]
[06/08-14:28:28:852]Out: lcd
[06/08-14:28:28:855]
[06/08-14:28:28:855]Err: lcd
[06/08-14:28:28:856]
[06/08-14:28:29:206]Net: DM9000
[06/08-14:28:30:225]Hit any key to stop autoboot: 0
[06/08-14:28:30:225]
[06/08-14:28:30:226]NAND read:
[06/08-14:28:30:226]device 0 offset 0x100000, size 0x500000
[06/08-14:28:30:226]
[06/08-14:28:33:470] 5242880 bytes read: OK
[06/08-14:28:33:470]
[06/08-14:28:33:470]## Booting kernel from Legacy Image at 50008000 ...
[06/08-14:28:33:470]
[06/08-14:28:33:472] Image Name: Linux-3.14.4
[06/08-14:28:33:486]
[06/08-14:28:33:487] Image Type: ARM Linux Kernel Image (uncompressed)
[06/08-14:28:33:506]
[06/08-14:28:33:508] Data Size: 1638624 Bytes = 1.6 MB
[06/08-14:28:33:522]
[06/08-14:28:33:523] Load Address: 50008000
[06/08-14:28:33:540]
[06/08-14:28:33:540] Entry Point: 50008040
[06/08-14:28:33:555]
[06/08-14:28:33:885] Verifying Checksum ... OK
[06/08-14:28:33:901]
[06/08-14:28:33:902] XIP Kernel Image ... OK
[06/08-14:28:33:915]
[06/08-14:28:33:916]OK
[06/08-14:28:33:933]
[06/08-14:28:33:933]
[06/08-14:28:33:933]Starting kernel ...
[06/08-14:28:33:934]
[06/08-14:28:33:945]
[06/08-14:28:33:959]
[06/08-14:28:33:973]
[06/08-14:28:34:265]Uncompressing Linux... done, booting the kernel.
[06/08-14:28:35:062]Booting Linux on physical CPU 0x0
[06/08-14:28:35:072]Linux version 3.14.4 (simiar@Embedded) (gcc version 4.4.3 (ctng-1.6.1) ) #3 Sun Jun 8 14:27:06 CST 2014
[06/08-14:28:35:076]CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387d
[06/08-14:28:35:092]CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[06/08-14:28:35:092]Machine: OK6410
[06/08-14:28:35:093]Ignoring unrecognised tag 0x54410008
[06/08-14:28:35:097]Memory policy: Data cache writeback
[06/08-14:28:35:097]CPU S3C6410 (id 0x36410101)
[06/08-14:28:35:097]CPU: found DTCM0 8k @ 00000000, not enabled
[06/08-14:28:35:098]CPU: moved DTCM0 8k to fffe8000, enabled
[06/08-14:28:35:106]CPU: found DTCM1 8k @ 00000000, not enabled
[06/08-14:28:35:106]CPU: moved DTCM1 8k to fffea000, enabled
[06/08-14:28:35:107]CPU: found ITCM0 8k @ 00000000, not enabled
[06/08-14:28:35:117]CPU: moved ITCM0 8k to fffe0000, enabled
[06/08-14:28:35:118]CPU: found ITCM1 8k @ 00000000, not enabled
[06/08-14:28:35:118]CPU: moved ITCM1 8k to fffe2000, enabled
[06/08-14:28:35:128]Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[06/08-14:28:35:138]Kernel command line: root=/dev/nfs nfsroot=192.168.1.100:/home/simiar/share/myproject/ok6410/filesystem/ok6410_fs ip=192.168.1.50:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200
[06/08-14:28:35:151]PID hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:161]Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[06/08-14:28:35:162]Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[06/08-14:28:35:171]Memory: 256460K/262144K available (2173K kernel code, 178K rwdata, 664K rodata, 118K init, 198K bss, 5684K reserved)
[06/08-14:28:35:173]Virtual kernel memory layout:
[06/08-14:28:35:184] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[06/08-14:28:35:184] DTCM : 0xfffe8000 - 0xfffec000 ( 16 kB)
[06/08-14:28:35:185] ITCM : 0xfffe0000 - 0xfffe4000 ( 16 kB)
[06/08-14:28:35:197] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[06/08-14:28:35:197] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[06/08-14:28:35:206] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[06/08-14:28:35:207] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[06/08-14:28:35:208] .text : 0xc0008000 - 0xc02cd674 (2838 kB)
[06/08-14:28:35:217] .init : 0xc02ce000 - 0xc02eb99c ( 119 kB)
[06/08-14:28:35:218] .data : 0xc02ec000 - 0xc0318a00 ( 179 kB)
[06/08-14:28:35:228] .bss : 0xc0319000 - 0xc034aac8 ( 199 kB)
[06/08-14:28:35:229]SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[06/08-14:28:35:229]NR_IRQS:246
[06/08-14:28:35:239]S3C6410 clocks: apll = 533000000, mpll = 533000000
[06/08-14:28:35:240] epll = 24000000, arm_clk = 533000000
[06/08-14:28:35:240]VIC @f6000000: id 0x00041192, vendor 0x41
[06/08-14:28:35:250]VIC @f6010000: id 0x00041192, vendor 0x41
[06/08-14:28:35:251]sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 128929599457ns
[06/08-14:28:35:251]Console: colour dummy device 80x30
[06/08-14:28:35:261]Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
[06/08-14:28:35:262]pid_max: default: 32768 minimum: 301
[06/08-14:28:35:273]Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:273]Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:274]CPU: Testing write buffer coherency: ok
[06/08-14:28:35:283]Setting up static identity map for 0x50214fa0 - 0x50214ffc
[06/08-14:28:35:295]VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[06/08-14:28:35:296]DMA: preallocated 256 KiB pool for atomic coherent allocations
[06/08-14:28:35:296]OK6410: Option string ok6410=0
[06/08-14:28:35:308]OK6410: selected LCD display is 480x272
[06/08-14:28:35:308]S3C6410: Initialising architecture
[06/08-14:28:35:309]bio: create slab [06/08-14:28:35:317]pl08xdmac dma-pl080s.0: initialized 8 virtual memcpy channels [06/08-14:28:35:318]pl08xdmac dma-pl080s.0: initialized 16 virtual slave channels [06/08-14:28:35:328]pl08xdmac dma-pl080s.0: DMA: PL080s rev1 at 0x75000000 irq 73 [06/08-14:28:35:329]pl08xdmac dma-pl080s.1: initialized 8 virtual memcpy channels [06/08-14:28:35:340]pl08xdmac dma-pl080s.1: initialized 12 virtual slave channels [06/08-14:28:35:340]pl08xdmac dma-pl080s.1: DMA: PL080s rev1 at 0x75100000 irq 74 [06/08-14:28:35:341]usbcore: registered new interface driver usbfs [06/08-14:28:35:350]usbcore: registered new interface driver hub [06/08-14:28:35:351]usbcore: registered new device driver usb [06/08-14:28:35:362]Switched to clocksource samsung_clocksource_timer [06/08-14:28:35:362]futex hash table entries: 256 (order: 0, 7168 bytes) [06/08-14:28:35:363]ROMFS MTD (C) 2007 Red Hat, Inc. [06/08-14:28:35:363]io scheduler noop registered [06/08-14:28:35:373]io scheduler deadline registered [06/08-14:28:35:373]io scheduler cfq registered (default) [06/08-14:28:35:374]s3c-fb s3c-fb: window 0: fb [06/08-14:28:35:384]Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [06/08-14:28:35:385]s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69, base_baud = 0) is a S3C6400/10 [06/08-14:28:35:395]console [ttySAC0] enabled [06/08-14:28:35:395]s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70, base_baud = 0) is a S3C6400/10 [06/08-14:28:35:406]s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71, base_baud = 0) is a S3C6400/10
上一篇:S3C6410嵌入式应用平台构建(六)——linux-3.14.4移植到OK6410-(Yaffs2文件系统移植)
下一篇:S3C6410嵌入式应用平台构建(四)——linux-3.14.4移植到OK6410-(初步启动)
- 热门资源推荐
- 热门放大器推荐
- LM2904DMR2G 函数发生器运算放大器的典型应用
- DEMO9RS08KA2: DEMO9RS08KA2 Demonstration Board
- MCP73871EV,MCP73871 锂离子电池充电器评估板
- STEVAL-IHM039V1,采用 STM32F415 微控制器的双电机控制演示板
- LTC1606CG 演示板、16 位、250ksps ADC
- RT8086B 3.5A、1.2MHz、同步降压转换器的典型应用
- TS4999EIJT 典型应用 免滤波器立体声 2.8 W D 类音频功率放大器,可选择 3D 音效
- LTM4615,采用 15mm-15mm 封装的完整双路和三路输出负载点模块稳压器
- LTC2415-1IGN 24 位 ADC 的典型应用电路使用电阻器阵列在励磁放大器中提供精确匹配
- 使用 Analog Devices 的 LTC1450LIN 的参考设计



现代雷达系统的信号设计
EL5624IRE-T13

BFR340T






京公网安备 11010802033920号