我正在用ti的AM335x开发产品,板子上有nand和fpga。arm通过gpmc接口访问nand和fpga。开始调试程序时是在SD卡中,fpga的驱动已经写好,并且测试通过。arm可以正常访问fpga。现在将所有程序烧到nand中,包括MLO u-boot.img uImage ubi.img fpga.ko。linux从nand中正常启动,在进入linux之后
输入以下命令
insmod fpga.ko
串口打印错误
am335x-evm login: root
[email protected]:~# cd /mxz/
[email protected]:/mxz# ls
fpga.ko fpga_test
[email protected]:/mxz# insmod fpga.ko
[ 31.377385] Disabling lock debugging due to kernel taint
[ 31.383678] GPMC revision 6.0
[ 31.386787] Got CS1, address = 1000000
[ 31.390819] fpga_base d1000000
[email protected]:/mxz# [ 33.960717] Unhandled fault: external abort on non-linefetch (0x1008) at 0xd083a000
[ 33.968724] Internal error: : 1008 [#1]
[ 33.972718] Modules linked in: fpga(O)
[ 33.976641] CPU: 0 Tainted: G O (3.2.0 #4)
[ 33.982193] PC is at nand_read_byte+0x14/0x20
[ 33.986734] LR is at nand_check_wp+0x48/0x58
[ 33.991184] pc : [<c025d9e8>] lr : [<c025dc64>] psr: 60000013
[ 33.991192] sp : cfaf1cf8 ip : cfaf1d08 fp : cfaf1d04
[ 34.003152] r10: 000007ff r9 : 00000000 r8 : 03b2d000
[ 34.008596] r7 : cf9a1a28 r6 : 00000800 r5 : cf9a1810 r4 : cf9a1a28
[ 34.015397] r3 : d083a000 r2 : 00000081 r1 : ffffffff r0 : cf9a1810
[ 34.022201] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 34.029818] Control: 10c5387d Table: 8f22c019 DAC: 00000015
[ 34.035806] Process ubifs_bgt0_0 (pid: 707, stack limit = 0xcfaf02f0)
[ 34.042518] Stack: (0xcfaf1cf8 to 0xcfaf2000)
[ 34.047058] 1ce0: cfaf1d1c cfaf1d08
[ 34.055585] 1d00: c025dc64 c025d9e0 cfaf1d98 cf9a1810 cfaf1d8c cfaf1d20 c0261538 c025dc28
[ 34.064111] 1d20: 00000000 00000001 00000004 60000013 00000000 00000000 00000000 00000000
[ 34.072638] 1d40: cfae8800 000003b6 cfaf1d74 00000040 cfaf1db0 cfae8800 03b2d000 00000000
[ 34.081164] 1d60: 00000000 cf9a1810 00000800 03b2d000 00000000 00000000 cfae8800 000003b6
[ 34.089691] 1d80: cfaf1dd4 cfaf1d90 c02619a8 c026146c cfaf1d98 cf19cc30 00000000 00000800
[ 34.098218] 1da0: 00000000 cfaf1db0 c0038840 c003795c cfae8800 00000000 00780000 00000000
[ 34.106745] 1dc0: 033ad800 00000000 cfaf1e04 cfaf1dd8 c0255bb0 c0261928 00000800 cfaf1e1c
[ 34.115272] 1de0: cfae8800 cf01ec80 0000d000 0000019d cfaf1e1c 00000800 cfaf1e3c cfaf1e08
[ 34.123799] 1e00: c0275164 c0255b50 00000800 cfaf1e1c cfae8800 cfaf1e20 c0384804 c03850dc
[ 34.132326] 1e20: cf9a1000 0000019d 0000c000 00000800 cfaf1edc cfaf1e40 c0273488 c0275118
[ 34.140852] 1e40: 00000800 00000001 00000000 a0000093 00000001 60000093 4d045b50 00000002
[ 34.149379] 1e60: 00001dc9 00000000 cfaf1e94 00009df0 cf0b9140 cf0b9170 00000001 cf0b9298
[ 34.157906] 1e80: c0527978 c0519df0 cfaf1ec4 cfaf1e98 c0038e84 c0036db8 c0038e4c c0519df0
[ 34.166432] 1ea0: fffffffe c050066c 000015a6 00000000 56745617 000003b6 cfae8800 00000800
[ 34.174959] 1ec0: 00000002 00000080 00000000 cfaa8b58 cfaf1f14 cfaf1ee0 c02726d4 c0273410
[ 34.183486] 1ee0: 0000c000 00000800 00000002 c0036db8 c0038e4c cfaac000 cfaac000 000003b6
[ 34.192012] 1f00: 0000c000 00000800 cfaf1f4c cfaf1f18 c0174038 c02725e0 00000800 00000002
[ 34.200539] 1f20: cfaf1f4c cfaf1f30 c0174594 cfaa8b30 cfaac000 00000800 000007c0 00000002
[ 34.209066] 1f40: cfaf1f74 cfaf1f50 c0174860 c0173fec 00000800 00000002 cfaac000 00000001