[Uboot] Nand read from offset xxx failed -74

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[Uboot] Nand read from offset xxx failed -74

7,017件の閲覧回数
woutervh
Contributor IV

I configured my custom imx6qd-board to have gpmi NAND. Working on uboot 2016.07+fslc

However, from the moment I try to read a written part, I get an read error -74

Erased parts are not a problem. 

In u-boot 2015.04 (the bsp release version) it is working, also when booted to linux, it's working. So hardwarewise I don't think there's an issue. What can cause this? How can I debug this? Should I enable something more to make this work?

Looks something ECC-related, but that's dark magic to me...

Thanks,

ラベル(3)
0 件の賞賛
返信
6 返答(返信)

3,520件の閲覧回数
nullnone
Contributor I

请问,问题解决了吗?我也遇到了同样的问题,在使用最新的uboot(U-Boot 2018.07-00001-g3eae864a23-dirty)之后,uboot无法从nand中读取用mfgtool(内核版本:4.1.15)烧写的内核和设备树,但是用最新的uboot将内核和设备树写入nand后,可以正常启动系统。由于内核和设备树都是通过linux内核(4.1.15)进行烧写的,所以怀疑是linux内核的nand驱动部分有不兼容的改动。

0 件の賞賛
返信

4,515件の閲覧回数
woutervh
Contributor IV

Can it have something to do with clocks? I run on an industrial grade IMX6DL, @792Mhz

My clocks output looks like:

=> clocks

PLL_SYS 792 MHz
PLL_BUS 528 MHz
PLL_OTG 480 MHz
PLL_NET 50 MHz

ARM 792000 kHz
IPG 66000 kHz
UART 80000 kHz
CSPI 60000 kHz
AHB 132000 kHz
AXI 264000 kHz
DDR 528000 kHz
USDHC1 198000 kHz
USDHC2 198000 kHz
USDHC3 198000 kHz
USDHC4 198000 kHz
EMI SLOW 132000 kHz
IPG PERCLK 66000 kHz

Should I change something in the gpmi_nand function for that?

static void setup_gpmi_nand(void)
{
struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

/* config gpmi nand iomux */
imx_iomux_v3_setup_multiple_pads(gpmi_pads, ARRAY_SIZE(gpmi_pads));

setup_gpmi_io_clk((MXC_CCM_CS2CDR_ENFC_CLK_PODF(0) |
MXC_CCM_CS2CDR_ENFC_CLK_PRED(3) |
MXC_CCM_CS2CDR_ENFC_CLK_SEL(3)));

/* enable apbh clock gating */
setbits_le32(&mxc_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK);

struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

/* config gpmi nand iomux */
imx_iomux_v3_setup_multiple_pads(gpmi_pads, ARRAY_SIZE(gpmi_pads));
}

0 件の賞賛
返信

4,515件の閲覧回数
Aubineau_FAE
NXP Employee
NXP Employee

Hi,

The first sectors are used by the ROMcode to boot.

These sectors are not protected by BCH ECC but by Hamming code.

Consequently if you do a "nand read" of these sectors under u-boot you'll have an ECC error.

What you can do is a "nand dump" to just read the memory without ECC correction.

=> nand dump 0x00000 512
Page 00000000 dump:
 00 00 00 00 00 00 00 00 00 00 00 00 b2 fa ff ff
 46 43 42 20 00 00 00 01 50 3c 19 06 00 00 00 00
 00 10 00 00 e0 10 00 00 80 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 02 00 00 00 00 02 00 00
 00 02 00 00 02 00 00 00 0a 00 00 00 07 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 08 00 00 00 24 00 00 81 00 00 00
 81 00 00 00 00 04 00 00 c8 0f 00 00 04 00 00 00
 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[...]
OOB:
 ff 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00
=>

BR,

Vincent

0 件の賞賛
返信

4,515件の閲覧回数
b36401
NXP Employee
NXP Employee

Please try to use the latest kobs-ng.
Also please try to tune NAND chip configuration in the driver. For example please try to increase timeouts.
Also please try to program nand with MFG tool.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

4,515件の閲覧回数
woutervh
Contributor IV

I have no issue in flashing uboot itself. Uboot is flashed to a spi nor flash, so I don't need kobs-ng

zImage and rootfs are programmed to NAND flash using MFG tool... But also based on 4.1.15 kernel

0 件の賞賛
返信

4,515件の閲覧回数
woutervh
Contributor IV

I just found https://www.mail-archive.com/u-boot@lists.denx.de/msg241176.html

He has something similar. And indeed, the image I try to read is also written with an older uboot/kernel version (from FSL_release). What happened in between?

Edit:

Same issue: https://community.nxp.com/thread/442873

0 件の賞賛
返信