打印
[嵌入式Linux]

请教高手:am335x外接一个8位的nand flash(K9F1G08U0D)

[复制链接]
4761|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zhenonline|  楼主 | 2014-3-4 21:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
内核版本:linux-3.2.0-chipsee-evm.tar.gz

配置完nand init以后,重启动内核打印如下信息:

3147672 bytes read
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3147608 Bytes = 3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

[ 0.000000] Linux version 3.2.0 (gkhope@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Mon Mar 3 20:02:42 CST 2014
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES1.0 (neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyO1,115200n8 mem=512M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait rootdelay=1 init=/init ip=off
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 513264k/513264k available, 11024k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0584000 (5616 kB)
[ 0.000000] .init : 0xc0584000 - 0xc05c1000 ( 244 kB)
[ 0.000000] .data : 0xc05c2000 - 0xc0628bd8 ( 411 kB)
[ 0.000000] .bss : 0xc0628bfc - 0xc06559e4 ( 180 kB)
[ 0.000000] NR_IRQS:396
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[ 0.000000] omap_dm_timer_switch_src: Switching to HW default clocksource(sys_clkin_ck) for timer1, this may impact timekeeping in low power state
[ 0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000187] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[ 0.057164] pid_max: default: 32768 minimum: 301
[ 0.057288] Security Framework initialized
[ 0.057379] Mount-cache hash table entries: 512
[ 0.057739] CPU: Testing write buffer coherency: ok
[ 0.077568] omap_hwmod: gfx: failed to hardreset
[ 0.093857] omap_hwmod: pruss: failed to hardreset
[ 0.094921] print_constraints: dummy:
[ 0.095269] NET: Registered protocol family 16
[ 0.097376] OMAP GPIO hardware version 0.1
[ 0.099966] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.101913] omap_i2c.1: alias fck already exists
[ 0.102771] omap2_mcspi.1: alias fck already exists
[ 0.102994] omap2_mcspi.2: alias fck already exists
[ 0.103673] edma.0: alias fck already exists
[ 0.103693] edma.0: alias fck already exists
[ 0.103711] edma.0: alias fck already exists
[ 0.130534] bio: create slab <bio-0> at 0
[ 0.132679] SCSI subsystem initialized
[ 0.134269] usbcore: registered new interface driver usbfs
[ 0.134584] usbcore: registered new interface driver hub
[ 0.134781] usbcore: registered new device driver usb
[ 0.134921] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.135188] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.147230] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.149087] tps65910 1-002d: JTAGREVNUM 0x0
[ 0.151462] print_constraints: VRTC:
[ 0.152902] print_constraints: VIO: at 1500 mV
[ 0.155207] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
[ 0.157494] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
[ 0.158512] print_constraints: VDD3: 5000 mV
[ 0.159914] print_constraints: VDIG1: at 1800 mV
[ 0.161348] print_constraints: VDIG2: at 1800 mV
[ 0.162759] print_constraints: VPLL: at 1800 mV
[ 0.164176] print_constraints: VDAC: at 1800 mV
[ 0.165597] print_constraints: VAUX1: at 1800 mV
[ 0.167021] print_constraints: VAUX2: at 3300 mV
[ 0.168461] print_constraints: VAUX33: at 3300 mV
[ 0.169877] print_constraints: VMMC: at 3300 mV
[ 0.170380] tps65910 1-002d: No interrupt support, no core IRQ
[ 0.171801] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.172930] Switching to clocksource gp timer
[ 0.188568] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.188732] musb-hdrc musb-hdrc.0: dma type: pio
[ 0.189032] MUSB0 controller's USBSS revision = 4ea20800
[ 0.189582] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using PIO, IRQ 18
[ 0.189730] musb-hdrc musb-hdrc.1: dma type: pio
[ 0.190026] MUSB1 controller's USBSS revision = 4ea20800
[ 0.190141] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.190211] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.190345] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.190361] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.190374] usb usb1: Product: MUSB HDRC host driver
[ 0.190385] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[ 0.190395] usb usb1: SerialNumber: musb-hdrc.1
[ 0.191151] hub 1-0:1.0: USB hub found
[ 0.191182] hub 1-0:1.0: 1 port detected
[ 0.191713] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using PIO, IRQ 19
[ 0.192127] NET: Registered protocol family 2
[ 0.192309] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.192591] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.192889] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.193128] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.193141] TCP reno registered
[ 0.193164] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.193188] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.193390] NET: Registered protocol family 1
[ 0.193642] RPC: Registered named UNIX socket transport module.
[ 0.193656] RPC: Registered udp transport module.
[ 0.193665] RPC: Registered tcp transport module.
[ 0.193673] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.193905] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.212256] VFS: Disk quotas dquot_6.5.2
[ 0.212318] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.212839] msgmni has been set to 1002
[ 0.215916] alg: No test for stdrng (krng)
[ 0.216572] io scheduler noop registered
[ 0.216587] io scheduler deadline registered
[ 0.216658] io scheduler cfq registered (default)
[ 0.217772] Could not set LED4 to fully on
[ 0.219488] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.219961] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.873737] console [ttyO1] enabled
[ 0.877937] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.885743] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.893531] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.901290] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.918251] brd: module loaded
[ 0.926295] loop: module loaded
[ 0.929751] i2c-core: driver [tsl2550] using legacy suspend method
[ 0.936231] i2c-core: driver [tsl2550] using legacy resume method
[ 0.942644] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.002972] No daughter card found
[ 1.006555] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.013824] The board is a Chipsee AM335x SOM.
[ 1.018776] omap_hsmmc.0: alias fck already exists
[ 1.024553] da8xx_lcdc.0: alias fck already exists
[ 1.030014] da8xx_lcdc da8xx_lcdc.0: GLCD: Found INNOLUX_TN92 panel
[ 1.046268] Console: switching to colour frame buffer device 100x30
[ 1.059939] davinci-mcasp.0: alias fck already exists
[ 1.066175] omap-gpmc omap-gpmc: GPMC revision 6.0
[ 1.071178] Registering NAND on CS0
[ 1.077588] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.084896] omap2-nand driver initializing

到此处内核死了,请问这是什么原因造成的?谢谢

通过打印信息,可以确定程序死在红色字体那一行:

       chip->cmdfunc(mtd, NAND_CMD_RESET, -1,-1);

       /* Send the command for reading device ID*/

       chip->cmdfunc(mtd, NAND_CMD_READID,0x00, -1);

       /* Read manufacturer and device IDs */

       *maf_id = chip->read_byte(mtd);

       dev_id = chip->read_byte(mtd);

       ......

     通过示波器可以量到am335x一直在向nand flash读数据,所以死到这里,还请帮解答 ,谢谢

另外,我用linux-3.1.0(英倍特的版本),不会报错,能正常运行,并且可以正确读取man_id和dev_id,说明硬件是没有问题。我现在是用的linux-3.2.0(linux-3.2.0-chipsee-evm.tar.gz)的版本

相关帖子

沙发
杭州启扬| | 2014-3-5 09:19 | 只看该作者
如果有时间可以去下我公司论坛,这里面有关于arm335X的一些问题解决的案例,说明。希望能帮到您!  如果需要我帮助可以通过手机13567180175或者QQ745064238 联系我 小汪

使用特权

评论回复
板凳
杭州启扬| | 2014-3-5 09:23 | 只看该作者
网站; www.qiytech.com

使用特权

评论回复
地板
zhenonline|  楼主 | 2014-3-19 12:05 | 只看该作者
问题已经解决,与mux pin有关

使用特权

评论回复
5
MONKEY666539| | 2014-11-14 17:00 | 只看该作者
能帮忙详细说说是怎么解决的么?谢谢!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

9

帖子

1

粉丝