This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3354: Ubifs ECC error with new NAND memory

Part Number: AM3354

Tool/software: Linux

Hi

   we are using AM3354 + processor SDK 03.02.00.05 with kernel 4.4.32.

   originally we are using the nand flash chip Spansion S34ML08G101TF100

   the spec is 1GB capacity.2k page.128k block and 512 sub-page size.

   We are using BCH8 ECC for both uboot and kernel.And we are using UBIFS as it's the default choice from the processor SDK.

   And it works fine.

   Right now i need to switch to another nand flash chip with the model Samsung K9K8G08U0E.

   From the spec it seems basically identical to the spansion chip.Same capacity.Same page/block/sub-page size and all.

   So i figured that maybe i won't need to change any code to get this chip working?

   When i boot up the kernel with this samsung chip for the 1st time.It looks ok. But after a reboot. There are these ECC errors printed when kernel is booting up.

   Like this:

omap-gpmc 50000000.gpmc: GPMC revision 6.0
gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
nand: Samsung NAND 1GiB 3,3V 8-bit
nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
9 ofpart partitions found on MTD device 8000000.nand
Creating 9 MTD partitions on "8000000.nand":
0x000000000000-0x000000020000 : "NAND.SPL"
0x000000020000-0x000000040000 : "NAND.SPL.backup1"
0x000000040000-0x000000060000 : "NAND.SPL.backup2"
0x000000060000-0x000000080000 : "NAND.SPL.backup3"
0x000000080000-0x000000260000 : "NAND.u-boot"
0x000000260000-0x000000280000 : "NAND.u-boot-env"
0x000000280000-0x000000580000 : "NAND.LOGO"
0x000000580000-0x000000a80000 : "NAND.kernel"
0x000000a80000-0x000040000000 : "rootfs"
ubi0: attaching mtd8
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1885:0, read only 64 bytes, retry
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
omap2-nand 8000000.nand: uncorrectable bit-flips found
ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1885:0, read only 64 bytes, retry

I'm attaching both the specs of the nand chips.And my dts file.

2553.k9k8g08u0e-sib0.pdf7343.S34ML08G1.pdf

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;

#include "am33xx.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "TI AM335x EVM";
	compatible = "ti,am335x-evm", "ti,am33xx";

	cpus {
		cpu@0 {
			cpu0-supply = <&vdd1_reg>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x80000000 0x20000000>; /* 512 MB */
	};

	vbat: fixedregulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vbat";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
	};

	lis3_reg: fixedregulator@1 {
		compatible = "regulator-fixed";
		regulator-name = "lis3_reg";
		regulator-boot-on;
	};

	wlan_en_reg: fixedregulator@2 {
		compatible = "regulator-fixed";
		regulator-name = "wlan-en-regulator";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;

		/* WLAN_EN GPIO for this board - Bank1, pin16 */
		gpio = <&gpio1 16 0>;

		/* WLAN card specific delay */
		startup-delay-us = <70000>;
		enable-active-high;
	};

	backlight {
		compatible = "pwm-backlight";
		pwms = <&ehrpwm1 1 50000 0>;
		brightness-levels = <0 51 53 56 62 75 101 152 255>;
		default-brightness-level = <8>;
	};

	panel {
		compatible = "ti,tilcdc,panel";
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <&lcd_pins_s0>;
		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <32>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};

		display-timings {
			800x480p62 {
				clock-frequency = <30000000>;
				hactive = <800>;
				vactive = <480>;
				hfront-porch = <40>;
				hback-porch = <88>;
				hsync-len = <48>;
				vback-porch = <32>;
				vfront-porch = <13>;
				vsync-len = <3>;
				hsync-active = <1>;
				vsync-active = <1>;
				pixelclk-active = <0>;
			};
		};
	};

	leds {
		pinctrl-names = "default";
		pinctrl-0 = <&user_leds_default>;
		compatible = "gpio-leds";

		usb1_5v_power {
			label = "usb1_5v_power";
			gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};
	};

};
/*
 * 	pin number = value in "AM335x Technical Reference Manual Table 9-10. CONTROL_MODULE REGISTERS" - 0x800
 */
&am33xx_pinmux {
	pinctrl-names = "default";
	pinctrl-0 = <&clkout2_pin>;

	i2c0_pins: pinmux_i2c0_pins {
		pinctrl-single,pins = <
			0x188 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
		>;
	};

	i2c1_pins: pinmux_i2c1_pins {
		pinctrl-single,pins = <
			0x180 (PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_rxd.i2c1_sda */
			0x184 (PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_txd.i2c1_scl */
		>;
	};

	touchscreen_pins: pinmux_touchscreen_pins {
		pinctrl-single,pins = <
			0x54 (PIN_OUTPUT | MUX_MODE7)	/* gpmc_a5.gpio1_21 GPIO1_21_TCH_RST */
			0x50 (PIN_INPUT | MUX_MODE7)	/* gpmc_a4.gpio1_20 GPIO1_20_TCH_INT */
		>;
	};

	uart0_pins: pinmux_uart0_pins {
		pinctrl-single,pins = <
			0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
		>;
	};

	clkout2_pin: pinmux_clkout2_pin {
		pinctrl-single,pins = <
			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
		>;
	};


	nandflash_pins_s0: nandflash_pins_s0 {
		pinctrl-single,pins = <
			0x0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
			0x4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
			0x8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
			0xc (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
			0x10 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
			0x14 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
			0x18 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
			0x1c (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
			0x70 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
			0x74 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wpn.gpmc_wpn */
			0x7c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
			0x90 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
			0x94 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
			0x98 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
			0x9c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
		>;
	};

	cpsw_default: cpsw_default {
		pinctrl-single,pins = <
			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) 	/* RMII1_REFCLK */
			0x124 (PIN_OUTPUT | MUX_MODE1)		/* RMII1_TXD1 */
			0x128 (PIN_OUTPUT | MUX_MODE1)		/* RMII1_TXD0 */
			0x114 (PIN_OUTPUT | MUX_MODE1)		/* RMII1_TXEN */
			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* RMII1_RXD1 */
			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* RMII1_RXD0 */
			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* RMII1_CRS_DV */
			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* RMII1_RXERR */
		>;
	};

	cpsw_sleep: cpsw_sleep {
		pinctrl-single,pins = <
			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7) 	/* RMII1_REFCLK */
			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_TXD1 */
			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_TXD0 */
			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_TXEN */
			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_RXD1 */
			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_RXD0 */
			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_CRS_DV */
			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* RMII1_RXERR */
		>;
	};

	davinci_mdio_default: davinci_mdio_default {
		pinctrl-single,pins = <
			/* MDIO */
			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
			0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
		>;
	};

	davinci_mdio_sleep: davinci_mdio_sleep {
		pinctrl-single,pins = <
			/* MDIO reset value */
			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	mmc1_pins: pinmux_mmc1_pins {
		pinctrl-single,pins = <
			0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
		>;
	};

	lcd_pins_s0: lcd_pins_s0 {
		pinctrl-single,pins = <
			0x20 0x01	/* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
			0x24 0x01	/* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
			0xa0 0x00	/* lcd_data0.lcd_data0, OUTPUT | MODE0 */
			0xa4 0x00	/* lcd_data1.lcd_data1, OUTPUT | MODE0 */
			0xa8 0x00	/* lcd_data2.lcd_data2, OUTPUT | MODE0 */
			0xac 0x00	/* lcd_data3.lcd_data3, OUTPUT | MODE0 */
			0xb0 0x00	/* lcd_data4.lcd_data4, OUTPUT | MODE0 */
			0xb4 0x00	/* lcd_data5.lcd_data5, OUTPUT | MODE0 */
			0xb8 0x00	/* lcd_data6.lcd_data6, OUTPUT | MODE0 */
			0xbc 0x00	/* lcd_data7.lcd_data7, OUTPUT | MODE0 */
			0xc0 0x00	/* lcd_data8.lcd_data8, OUTPUT | MODE0 */
			0xc4 0x00	/* lcd_data9.lcd_data9, OUTPUT | MODE0 */
			0xc8 0x00	/* lcd_data10.lcd_data10, OUTPUT | MODE0 */
			0xcc 0x00	/* lcd_data11.lcd_data11, OUTPUT | MODE0 */
			0xd0 0x00	/* lcd_data12.lcd_data12, OUTPUT | MODE0 */
			0xd4 0x00	/* lcd_data13.lcd_data13, OUTPUT | MODE0 */
			0xd8 0x00	/* lcd_data14.lcd_data14, OUTPUT | MODE0 */
			0xdc 0x00	/* lcd_data15.lcd_data15, OUTPUT | MODE0 */
			0xe0 0x00	/* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
			0xe4 0x00	/* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
			0xe8 0x00	/* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
			0xec 0x00	/* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */

		>;
	};



	ehrpwm1_pins_default: backlight_pins {
		pinctrl-single,pins = <
			0x4c (PIN_OUTPUT | MUX_MODE6) /* GPIO1_19_LCD_PWM_1B	gpmc_a3=ehrpwm1B_mux1	MODE6 */
		>;
	};

	user_leds_default: user_leds_default {
		pinctrl-single,pins = <
			0x234 (PIN_OUTPUT | MUX_MODE7) /* conf_usb1_drvvbus.gpio3_13   GPIO3_13_USB1_POWER */
		>;
	};


};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins>;

	status = "okay";
};



&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins>;

	status = "okay";
	clock-frequency = <400000>;

	tps: tps@2d {
		reg = <0x2d>;
	};
};

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins>;

	status = "okay";
	clock-frequency = <400000>;

	gt911a: gt911a@5d {
		compatible = "goodix,gt911a";
		pinctrl-names = "default";
		pinctrl-0 = <&touchscreen_pins>;
		reg = <0x5d>;
		interrupt-parent = <&gpio1>;
		interrupts = <20 2>;
		reset-gpios = <&gpio1 21 0>;
		int-gpios = <&gpio1 20 0>;
	};
};

&usb {
	status = "okay";
};

&usb_ctrl_mod {
	status = "okay";
};

&usb0_phy {
	status = "okay";
};

&usb1_phy {
	status = "okay";
};

&usb0 {
	status = "okay";
};

&usb1 {
	status = "okay";
	dr_mode = "host";
};

&cppi41dma  {
	status = "okay";
};

&lcdc {
	status = "okay";

	blue-and-red-wiring = "crossed";
};

&elm {
	status = "okay";
};

&epwmss1 {
	status = "okay";
	ehrpwm1: pwm@48302200 {
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <&ehrpwm1_pins_default>;
	};
};

&gpmc {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&nandflash_pins_s0>;
	ranges = <0 0 0x08000000 0x20000000>;	/* CS0: NAND */
	nand@0,0 {
		compatible = "ti,omap2-nand";
		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
		interrupt-parent = <&gpmc>;
		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
			     <1 IRQ_TYPE_NONE>;	/* termcount */
		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
		ti,nand-ecc-opt = "bch8";
		ti,elm-id = <&elm>;
		nand-bus-width = <8>;
		gpmc,device-width = <1>;
		gpmc,sync-clk-ps = <0>;
		gpmc,cs-on-ns = <0>;
		gpmc,cs-rd-off-ns = <44>;
		gpmc,cs-wr-off-ns = <44>;
		gpmc,adv-on-ns = <6>;
		gpmc,adv-rd-off-ns = <34>;
		gpmc,adv-wr-off-ns = <44>;
		gpmc,we-on-ns = <0>;
		gpmc,we-off-ns = <40>;
		gpmc,oe-on-ns = <0>;
		gpmc,oe-off-ns = <54>;
		gpmc,access-ns = <64>;
		gpmc,rd-cycle-ns = <82>;
		gpmc,wr-cycle-ns = <82>;
		gpmc,wait-on-read = "true";
		gpmc,wait-on-write = "true";
		gpmc,bus-turnaround-ns = <0>;
		gpmc,cycle2cycle-delay-ns = <0>;
		gpmc,clk-activation-ns = <0>;
		gpmc,wait-monitoring-ns = <0>;
		gpmc,wr-access-ns = <40>;
		gpmc,wr-data-mux-bus-ns = <0>;
		/* MTD partition table */
		/* All SPL-* partitions are sized to minimal length
		 * which can be independently programmable. For
		 * NAND flash this is equal to size of erase-block */
		#address-cells = <1>;
		#size-cells = <1>;
		partition@0 {
			label = "NAND.SPL";
			reg = <0x00000000 0x000020000>;
			read-only;
		};
		partition@1 {
			label = "NAND.SPL.backup1";
			reg = <0x00020000 0x00020000>;
			read-only;
		};
		partition@2 {
			label = "NAND.SPL.backup2";
			reg = <0x00040000 0x00020000>;
			read-only;
		};
		partition@3 {
			label = "NAND.SPL.backup3";
			reg = <0x00060000 0x00020000>;
			read-only;
		};
		partition@4 {
			label = "NAND.u-boot";
			reg = <0x00080000 0x001E0000>;
			read-only;
		};
		partition@5 {
			label = "NAND.u-boot-env";
			reg = <0x00260000 0x00020000>;
			read-only;
		};
		partition@6 {
			label = "NAND.LOGO";
			reg = <0x00280000 0x00300000>;
			read-only;
		};
		partition@7 {
			label = "NAND.kernel";
			reg = <0x00580000 0x00500000>;
			read-only;
		};
		partition@8 {
			label = "rootfs";
			reg = <0x00A80000 0x3F580000>;
		};
	};
};

#include "tps65910.dtsi"

&tps {
	vcc1-supply = <&vbat>;
	vcc2-supply = <&vbat>;
	vcc3-supply = <&vbat>;
	vcc4-supply = <&vbat>;
	vcc5-supply = <&vbat>;
	vcc6-supply = <&vbat>;
	vcc7-supply = <&vbat>;
	vccio-supply = <&vbat>;

	regulators {
		vrtc_reg: regulator@0 {
			regulator-always-on;
		};

		vio_reg: regulator@1 {
			regulator-always-on;
		};

		vdd1_reg: regulator@2 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1351500>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd2_reg: regulator@3 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd3_reg: regulator@4 {
			regulator-always-on;
		};

		vdig1_reg: regulator@5 {
			regulator-always-on;
		};

		vdig2_reg: regulator@6 {
			regulator-always-on;
		};

		vpll_reg: regulator@7 {
			regulator-always-on;
		};

		vdac_reg: regulator@8 {
			regulator-always-on;
		};

		vaux1_reg: regulator@9 {
			regulator-always-on;
		};

		vaux2_reg: regulator@10 {
			regulator-always-on;
		};

		vaux33_reg: regulator@11 {
			regulator-always-on;
		};

		vmmc_reg: regulator@12 {
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

&mac {
	slaves = <1>;
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
	status = "okay";
};

&davinci_mdio {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
	status = "okay";
};

&cpsw_emac0 {
	phy_id = <&davinci_mdio>, <0>;
	phy-mode = "rmii";
};

&phy_sel {
	rmii-clock-ext;
};

&mmc1 {
	status = "okay";
	vmmc-supply = <&vmmc_reg>;
	bus-width = <4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};

&sham {
	status = "disabled";
};

&aes {
	status = "disabled";
};

&rng {
	status = "disabled";
};

&wkup_m3_ipc {
	ti,scale-data-fw = "am335x-evm-scale-data.bin";
};

&sgx {
	status = "okay";
};

Could you help me identify what could possibly be the cause?

thanks guys.

yandong

  • I'm also attaching my command to generate UBI binary files.

    I checked carefully about the parameters of these commands....It doesn't seems it's caused by wrong parameter..?

    mkfs.ubifs -r rootfs-cutout/ -m 2048 -e 129024 -c 8108 -F -o ubi.in
    ubinize -o root.bin -m 2048 -p 128KiB -s 512 ubinize.cfg

    ubinize.cfg is like:

    [ubifs]
    mode=ubi
    image=ubi.in
    vol_id=0
    vol_size=950MiB
    vol_type=dynamic
    vol_alignment=1
    vol_name=rootfs
    vol_flags=autoresize

  • Another strange thing i observed is that:

    the new samsung flash works fine on older kernel 3.2.0

    while 3.2.0 and 4.4 kernel share exact the same gpmc timing setting.

    static struct gpmc_timings am335x_nand_timings = {

    .sync_clk = 0,

    .cs_on = 0,

    .cs_rd_off = 44,

    .cs_wr_off = 44,

    .adv_on = 6,

    .adv_rd_off = 34,

    .adv_wr_off = 44,

    .we_off = 40,

    .oe_off = 54,

    .access = 64,

    .rd_cycle = 82,

    .wr_cycle = 82,

    .wr_access = 40,

    .wr_data_mux_bus = 0,

    };

    and

    nand-bus-width = <8>;

    gpmc,device-width = <1>;

    gpmc,sync-clk-ps = <0>;

    gpmc,cs-on-ns = <0>;

    gpmc,cs-rd-off-ns = <44>;

    gpmc,cs-wr-off-ns = <44>;

    gpmc,adv-on-ns = <6>;

    gpmc,adv-rd-off-ns = <34>;

    gpmc,adv-wr-off-ns = <44>;

    gpmc,we-on-ns = <0>;

    gpmc,we-off-ns = <40>;

    gpmc,oe-on-ns = <0>;

    gpmc,oe-off-ns = <54>;

    gpmc,access-ns = <64>;

    gpmc,rd-cycle-ns = <82>;

    gpmc,wr-cycle-ns = <82>;

    gpmc,wait-on-read = "true";

    gpmc,wait-on-write = "true";

    gpmc,bus-turnaround-ns = <0>;

    gpmc,cycle2cycle-delay-ns = <0>;

    gpmc,clk-activation-ns = <0>;

    gpmc,wait-monitoring-ns = <0>;

    gpmc,wr-access-ns = <40>;

    gpmc,wr-data-mux-bus-ns = <0>;

     

    So i suspect the problem is not cause by timing setting as well?

    Otherwise the 3.2.0 kernel will run into problems too.

    The difference is 3.2.0 is mounting the rootfs by yaffs2.

    and 4.4 kernel is mounting rootfs as UBIFS

    3.2.0 use OMAP_ECC_HAMMING_CODE_HW ecc for uboot and kernel.

    4.4 use BCH8.

    But i tried to switch to OMAP_ECC_HAM1_CODE_HW for 4.4 kernel and uboot.And that didn't worked out.

    there was constant error like

    ubi0: fixable bit-flip detected at PEB 1398

    OMAP_ECC_HAM1_CODE_SW ECC also won't work on 4.4 kernel as i tried.

  • Just tried on the latest 4.9 kernel with 04.02.00.09 SDK
    the error is the same
  • Hi,

    Has U-Boot been updated to be aware of the change to the different flash?

    Did you use the default kernel config provided with the 04.02.00.09 SDK? If not could you please attach it to this post? Also could you please attache the full boot log for the 04.02.00.09 SDK?

    Best Regards,
    Schuyler
  • Hi Schuyler

          thank you for the reply.

          I'm not sure what you are referring to by "Has U-Boot been updated " ?

          what puzzles me is that the new flash has the identical spec like the old one. Page size block size.OOB size...etc. Except timing requirement is different? I'm not sure what else could be...

          I'm attaching the kernel config for 04 SDK. 

          it's not completely the default one.As i tuned a little for our own board. But basically it's the same. 

          Here:

         IQ8-config-4.9.txt

       I'm also attaching the original kernel config:

    am335x-evm-original-config.txt

       

      And i'm attaching the full boot log for 04 SDK. 1st boot is successful. 2nd boot after reboot is failed.

      1st boot:

       

    r
    resetting ...
    Welcome to use TQ3358 Board!
    
    U-Boot SPL 2011.09 (Mar 29 2018 - 09:41:18)
    Texas Instruments Revision detection unimplemented
    boot from NAND...
    
    
    U-Boot 2011.09 (Mar 29 2018 - 09:41:18)
    
    I2C:   ready
    DRAM:  512 MiB
    NAND:  *************NAND:1024 MiB
    *************NAND:1024 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    Net:   cpsw
    
    ##### EmbedSky BIOS for TQ3358 #####
    This Board: SDRAM is 512MB;
    Hit any key to stop autoboot:  0
    setting bootargs ...
    bootargs=setenv bootargs console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=8 rootfstype=ubifs rootwait=1 ip=none vt.global_cursor_default=0 lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
    Booting from nand ...
    
    NAND read: device 0 offset 0x580000, size 0x500000
     5242880 bytes read: OK
    
    NAND read: device 0 offset 0x60000, size 0x20000
     131072 bytes read: OK
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-4.9.59-ga75d8e9305
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3889096 Bytes = 3.7 MiB
       Load Address: 80008000
       Entry Point:  80008000
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       XIP Kernel Image ... OK
    OK
       Loading Device Tree to 9fe74000, end 9fe8099a ... OK
    
    Starting kernel ...
    
    Booting Linux on physical CPU 0x0
    Linux version 4.9.59-ga75d8e9305 (yandong@CH4WDT1WZVVL2) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 PREEMPT Wed Feb 28 09:25:11 HKT 2018
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt:Machine model: TI AM335x EVM
    efi: Getting EFI parameters from FDT:
    efi: UEFI not found.
    cma: Reserved 48 MiB at 0x9c800000
    Memory policy: Data cache writeback
    CPU: All CPU(s) started in SVC mode.
    AM335X ES2.1 (sgx neon)
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    Kernel command line: setenv bootargs console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=8 rootfstype=ubifs rootwait=1 ip=none vt.global_cursor_default=0 lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 456900K/524288K available (8192K kernel code, 313K rwdata, 2580K rodata, 1024K init, 280K bss, 18236K reserved, 49152K cma-reserved, 0K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
        lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc0900000   (9184 kB)
          .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
          .data : 0xc0d00000 - 0xc0d4e750   ( 314 kB)
           .bss : 0xc0d4e750 - 0xc0d94ab4   ( 281 kB)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptible hierarchical RCU implementation.
            Build-time adjustment of leaf fanout to 32.
    NR_IRQS:16 nr_irqs:16 16
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    OMAP clockevent source: timer2 at 24000000 Hz
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    OMAP clocksource: timer1 at 24000000 Hz
    clocksource_probe: no matching clocksources found
    Console: colour dummy device 80x30
    Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0x80100000 - 0x80100060
    EFI services will not be available.
    devtmpfs: initialized
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 256 (order: -1, 3072 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    omap_hwmod: debugss: _wait_target_disable failed
    cpuidle: using governor ladder
    cpuidle: using governor menu
    OMAP GPIO hardware version 0.1
    omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    No ATAGs?
    hw-breakpoint: debug architecture 0x4 unsupported.
    edma 49000000.edma: TI EDMA DMA engine driver
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    EDAC MC: Ver: 3.0.0
    omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource timer1
    NET: Registered protocol family 2
    TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    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 named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    workingset: timestamp_bits=14 max_order=17 bucket_order=3
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    NFS: Registering the id_resolver key type
    Key type id_resolver registered
    Key type id_legacy registered
    ntfs: driver 2.1.32 [Flags: R/O].
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    backlight supply power not found, using dummy regulator
    omap_uart 44e09000.serial: no wakeirq for uart0
    44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
    console [ttyO0] enabled
    [drm] Initialized
    panel panel: found backlight
    [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [drm] No driver support for vblank timestamp query.
    tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    Console: switching to colour frame buffer device 100x30
    tilcdc 4830e000.lcdc: fb0:  frame buffer device
    brd: module loaded
    loop: module loaded
    libphy: Fixed MDIO Bus: probed
    davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    libphy: 4a101000.mdio: probed
    davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Davicom DM9161A
    cpsw 4a100000.ethernet: Detected MACID = 0c:b2:b7:aa:b1:bc
    cpsw 4a100000.ethernet: device node lookup for pps timer failed
    cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    usbcore: registered new interface driver usb-storage
    47401300.usb-phy supply vcc not found, using dummy regulator
    47401b00.usb-phy supply vcc not found, using dummy regulator
    mousedev: PS/2 mouse device common for all mice
    i2c /dev entries driver
    usbcore: registered new interface driver zr364xx
    usbcore: registered new interface driver stkwebcam
    usbcore: registered new interface driver s2255
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (1.1.1)
    gspca_main: v2.14.0 registered
    usbcore: registered new interface driver Philips webcam
    cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1
    usbcore: registered new interface driver cpia2
    usbcore: registered new interface driver em28xx
    em28xx: Registered (Em28xx v4l2 Extension) extension
    em28xx: Registered (Em28xx Audio Extension) extension
    usbcore: registered new interface driver usbtv
    cpuidle: enable-method property 'ti,am3352' found operations
    omap_hsmmc 48060000.mmc: Got CD GPIO
    ledtrig-cpu: registered to indicate activity on CPUs
    NET: Registered protocol family 10
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    Key type dns_resolver registered
    omap_voltage_late_init: Voltage driver support not added
    omap-gpmc 50000000.gpmc: GPMC revision 6.0
    gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
    nand: Samsung NAND 1GiB 3,3V 8-bit
    nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    9 ofpart partitions found on MTD device omap2-nand.0
    Creating 9 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000020000 : "NAND.SPL"
    0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    0x000000080000-0x000000260000 : "NAND.u-boot"
    0x000000260000-0x000000280000 : "NAND.u-boot-env"
    0x000000280000-0x000000580000 : "NAND.LOGO"
    0x000000580000-0x000000a80000 : "NAND.kernel"
    0x000000a80000-0x000040000000 : "rootfs"
    random: fast init done
    tps65910 0-002d: No interrupt support, no core IRQ
    vrtc: supplied by vbat
    vio: supplied by vbat
    vdd1: supplied by vbat
    vdd2: supplied by vbat
    vdig1: supplied by vbat
    vdig2: supplied by vbat
    vpll: supplied by vbat
    vdac: supplied by vbat
    vaux1: supplied by vbat
    vaux2: supplied by vbat
    vaux33: supplied by vbat
    vmmc: supplied by vbat
    vbb: supplied by vbat
    tps65910-rtc tps65910-rtc: IRQ is not free.
    tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as rtc0
    omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    omap_hsmmc 48060000.mmc: Got CD GPIO
    ubi0: attaching mtd8
    ubi0: scanning is finished
    ubi0: volume 0 ("rootfs") re-sized from 7721 to 7944 LEBs
    ubi0: attached mtd8 (name "rootfs", size 1013 MiB)
    ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
    ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    ubi0: VID header offset: 512 (aligned 512), data offset: 2048
    ubi0: good PEBs: 8108, bad PEBs: 0, corrupted PEBs: 0
    ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 141764118
    ubi0: available PEBs: 0, total reserved PEBs: 8108, PEBs reserved for bad PEB handling: 160
    ubi0: background thread "ubi_bgt0d" started, PID 75
    input: Capacitance_ts as /devices/virtual/input/input0
    tps65910-rtc tps65910-rtc: setting system clock to 2012-09-13 10:42:04 UTC (1347532924)
    lis3_reg: disabling
    wlan-en-regulator: disabling
    ALSA device list:
      No soundcards found.
    UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 77
    UBIFS (ubi0:0): start fixing up free space
    UBIFS (ubi0:0): free space fixup complete
    UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    UBIFS (ubi0:0): FS size: 1023547392 bytes (976 MiB, 7933 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
    UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
    UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 7AB3ADF9-ACA6-4870-A272-6A462FEB3656, small LPT model
    VFS: Mounted root (ubifs filesystem) on device 0:15.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    systemd[1]: System time before build time, advancing clock.
    systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2017.10!
    
    systemd[1]: Set hostname to <am335x-evm>.
    systemd[1]: Initializing machine ID from random generator.
    systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
    systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket.
    [  OK  ] Created slice System Slice.
             Mounting Debug File System...
    [  OK  ] Created slice system-getty.slice.
             Mounting POSIX Message Queue File System...
    [  OK  ] Created slice system-serial\x2dgetty.slice.
             Starting Create Static Device Nodes in /dev...
             Starting Remount Root and Kernel File Systems...
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Listening on Process Core Dump Socket.
             Starting Setup Virtual Console...
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Reached target Slices.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Listening on Syslog Socket.
             Starting Journal Service...
             Starting Load Kernel Modules...
    [  OK  ] Reached target Swap.
             Mounting Temporary Directory...
    [  OK  ] Mounted Debug File System.
    cryptodev: loading out-of-tree module taints kernel.
    [  OK  ] Mounted POSIX Message Queue Filecryptodev: driver 1.8 loaded.
     System.
    [  OK  ] Mounted Temporary Directory.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Started Setup Virtual Console.
    [  OK  ] Started Load Kernel Modules.
             Starting Apply Kernel Variables...
             Mounting Configuration File System...
             Starting Rebuild Hardware Database...
             Starting udev Kernel Device Manager...
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Mounted /var/volatile.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Apply Kernel Variables.
             Starting Flush Journal to Persistent Storage...
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Rebuild Journal Catalog...
             Starting Rebuild Dynamic Linker Cache...
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Started Load/Save Random Seed.
    systemd-journald[104]: Received request to flush runtime journal from PID 1
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Rebuild Journal Catalog.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Opkg first boot configure...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Rebuild Dynamic Linker Cache.
    [  OK  ] Started Opkg first boot configure.
    [  OK  ] Started Rebuild Hardware Database.
             Starting Update is Completed...
             Starting udev Coldplug all Devices...
    [  OK  ] Started Update is Completed.
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
             Starting Load/Save Screen Backlight...htness of backlight:backlight...
    Error: Driver 'am335x-usb-childs' is already registered, aborting...
    omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc1
    [  OK  ] Found device /dev/ttyO0.
    Error: Driver 'am335x-usb-childs' is already registered, aborting...
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Reached target System Initialization.
    phy_am335x_control: exports duplicate symbol am335x_get_phy_control (owned by kernel)
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
             Starting Print notice about GPLv3 packages...
             Starting Login Service...
             Starting telnetd.service...
    [  OK  ] Started System Logging Service.
      OK  ] Started D-Bus System Message Bus.
    omap_hwmod: pruss: _wait_target_ready failed: -16
    pruss-soc-bus 4a326000.pruss-soc-bus: use pm_runtime_put_sync_suspend() in driver?
    pruss-soc-bus 4a326000.pruss-soc-bus: couldn't enable module
    pruss-soc-bus: probe of 4a326000.pruss-soc-bus failed with error -16
    remoteproc remoteproc0: wkup_m3 is available
    wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
    PM: Cannot get wkup_m3_ipc handle
    PM: Cannot get wkup_m3_ipc handle
    remoteproc remoteproc0: powering up wkup_m3
    remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224268
    remoteproc remoteproc0: remote processor wkup_m3 is now up
    wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
             Starting Network Service...
    [  OK  ] Started telnetd.service.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
             Starting thttpd.service...
    [  OK  ] Started Login Service.
    [  OK  ] Started thttpd.service.
             Starting rng-tools.service...
    [  OK  ] Started Network Service.
    [  OK  ] Reached target Network.
             Starting Permit User Sessions...
             Starting Network Name Resolution...
    [  OK  ] Started rng-tools.service.
    [  OK  ] Started Permit User Sessions.
    net eth0: initializing cpsw version 1.12 (0)
    cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    cpsw 4a100000.ethernet: ALE Table size 1024
    [  OK  ] Started Getty on tty1.
    [Davicom DM9161A 4a101000.mdio:00: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=4a101000.mdio:00, irq=-1)
      OK  ] Started Serial Getty on ttyO0.
             Starting thermal-zone-init.service...
    cpts ptp bc clkid 0
    IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  OK  ] Started thermal-zone-init.service.
    [  OK  ] Started Network Name Resolution.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            binutils
            cifs-utils
            dosfstools
            gawk
            libreadline6
            m4
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [  OK  ] Started Print notice about GPLv3 packages.
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org am335x-evm ttyO0
    
    Arago 2017.10 am335x-evm ttyO0
    
    am335x-evm login: root
    root@am335x-evm:~#
    

     2nd failed boot:

       

    reboot
    [  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Stopped target Multi-User System.
             Stopping thermal-zone-init.service...
             Stopping Network Name Resolution...
             Stopping System Logging Service...
             Stopping Kernel Loggi         Stopping Session c1 of user root.
    [  OK  ] Stopped target Login Prompts.
             Stopping Getty on tty1...
    [  OK  ] Stopped target Timers.
    [  OK  ] Stopped target System Time Synchronized.
             Stopping Serial Getty on ttyO0...
    [  OK  ] Stopped Daily Cleanup of Temporary Directories.
    [  OK  ] Stopped Kernel Logging Service.
    [  OK  ] Stopped System Logging Service.
    [  OK  ] Stopped Network Name Resolution.
    [  OK  ] Stopped Getty on tty1.
    [  OK  ] Stopped Serial Getty on ttyO0.
    [  OK  ] Stopped thermal-zone-init.service.
    [  OK  ] Stopped Session c1 of user root.
    [  OK  ] Removed slice User Slice of root.
             Stopping Login Service...
             Stopping rng-tools.service...
    [  OK  ] Removed slice system-serial\x2dgetty.slice.
    [  OK  ] Removed slice system-getty.slice.
             Stopping Permit User Sessions...
    [  OK  ] Stopped Login Service.
    [  OK  ] Stopped rng-tools.service.
    [  OK  ] Stopped Permit User Sessions.
    [  OK  ] Stopped target Network.
             Stopping Network Service...
    [  OK  ] Stopped target Remote File Systems.
             Stopping thttpd.service...
    [  OK  ] Stopped Network Service.
    [  OK  ] Stopped thttpd.service.
             Stopping telnetd.service...
             Stopping D-Bus System Message Bus...
    [  OK  ] Stopped D-Bus System Message Bus.
    [  OK  ] Stopped telnetd.service.
    [  OK  ] Stopped target Basic System.
    [  OK  ] Stopped target Slices.
    [  OK  ] Removed slice User and Session Slice.
    [  OK  ] Stopped target Paths.
    [  OK  ] Stopped Forward Password Requests to Wall Directory Watch.
    [  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Stopped target Sockets.
    [  OK  ] Closed Syslog Socket.
    [  OK  ] Closed RPCbind Server Activation Socket.
    [  OK  ] Closed D-Bus System Message Bus Socket.
    [  OK  ] Stopped target System Initialization.
             Stopping Load/Save Screen Backlight...htness of backlight:backlight...
    [  OK  ] Stopped Apply Kernel Variables.
             Stopping Load/Save Random Seed...
    [  OK  ] Stopped Setup Virtual Console.
             Stopping Network Time Synchronization...
    [  OK  ] Stopped Update is Completed.
    [  OK  ] Stopped Rebuild Dynamic Linker Cache.
    [  OK  ] Stopped Load Kernel Modules.
    [  OK  ] Stopped Rebuild Hardware Database.
    [  OK  ] Stopped Rebuild Journal Catalog.
    [  OK  ] Stopped Network Time Synchronization.
    [  OK  ] Stopped Load/Save Screen Backlight Brightness of backlight:backlight.
    [  OK  ] Stopped Load/Save Random Seed.
    [  OK  ] Removed slice system-systemd\x2dbacklight.slice.
    [  OK  ] Stopped Create Volatile Files and Directories.
    [  OK  ] Stopped target Local File Systems.
             Unmounting /media/ram...
             Unmounting /var/volatile...
             Unmounting /run/user/0...
             Unmounting Temporary Directory...
    [  OK  ] Unmounted /media/ram.
    [  OK  ] Unmounted /var/volatile.
    [  OK  ] Unmounted /run/user/0.
    [  OK  ] Unmounted Temporary Directory.
    [  OK  ] Stopped target Swap.
    [  OK  ] Reached target Unmount All Filesystems.
    [  OK  ] Stopped target Local File Systems (Pre).
    [  OK  ] Stopped Create Static Device Nodes in /dev.
    [  OK  ] Stopped Remount Root and Kernel File Systems.
    [  OK  ] Reached target Shutdown.
    watchdog: watchdog0: watchdog did not stop!
    systemd-shutdow: 38 output lines suppressed due to ratelimiting
    systemd-shutdown[1]: Sending SIGTERM to remaining processes...
    systemd-journald[104]: Received SIGTERM from PID 1 (systemd-shutdow).
    systemd-shutdown[1]: Sending SIGKILL to remaining processes...
    systemd-shutdown[1]: Sending SIGKILL to PID 479 (rngd).
    systemd-shutdown[1]: Hardware watchdog 'OMAP Watchdog', version 0
    systemd-shutdown[1]: Unmounting file systems.
    systemd-shutdown[1]: Remounting '/' read-only with options ''.
    UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
    systemd-shutdown[1]: Remounting '/' read-only with options ''.
    systemd-shutdown[1]: All filesystems unmounted.
    systemd-shutdown[1]: Deactivating swaps.
    systemd-shutdown[1]: All swaps deactivated.
    systemd-shutdown[1]: Detaching loop devices.
    reboot: Restarting system
    Welcome to use TQ3358 Board!
    
    U-Boot SPL 2011.09 (Mar 29 2018 - 09:41:18)
    Texas Instruments Revision detection unimplemented
    boot from NAND...
    
    
    U-Boot 2011.09 (Mar 29 2018 - 09:41:18)
    
    I2C:   ready
    DRAM:  512 MiB
    NAND:  *************NAND:1024 MiB
    *************NAND:1024 MiB
    MMC:   OMAP SD/MMC: 0
    *** Warning - bad CRC, using default environment
    
    Net:   cpsw
    
    ##### EmbedSky BIOS for TQ3358 #####
    This Board: SDRAM is 512MB;
    Hit any key to stop autoboot:  0
    setting bootargs ...
    bootargs=setenv bootargs console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=8 rootfstype=ubifs rootwait=1 ip=none vt.global_cursor_default=0 lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
    Booting from nand ...
    
    NAND read: device 0 offset 0x580000, size 0x500000
     5242880 bytes read: OK
    
    NAND read: device 0 offset 0x60000, size 0x20000
     131072 bytes read: OK
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-4.9.59-ga75d8e9305
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3889096 Bytes = 3.7 MiB
       Load Address: 80008000
       Entry Point:  80008000
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       XIP Kernel Image ... OK
    OK
       Loading Device Tree to 9fe74000, end 9fe8099a ... OK
    
    Starting kernel ...
    
    Booting Linux on physical CPU 0x0
    Linux version 4.9.59-ga75d8e9305 (yandong@CH4WDT1WZVVL2) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 PREEMPT Wed Feb 28 09:25:11 HKT 2018
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt:Machine model: TI AM335x EVM
    efi: Getting EFI parameters from FDT:
    efi: UEFI not found.
    cma: Reserved 48 MiB at 0x9c800000
    Memory policy: Data cache writeback
    CPU: All CPU(s) started in SVC mode.
    AM335X ES2.1 (sgx neon)
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    Kernel command line: setenv bootargs console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=8 rootfstype=ubifs rootwait=1 ip=none vt.global_cursor_default=0 lcd=X800Y480 uart1_d_can=uart1 uart2_i2c2=uart2
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 456900K/524288K available (8192K kernel code, 313K rwdata, 2580K rodata, 1024K init, 280K bss, 18236K reserved, 49152K cma-reserved, 0K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
        lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc0900000   (9184 kB)
          .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
          .data : 0xc0d00000 - 0xc0d4e750   ( 314 kB)
           .bss : 0xc0d4e750 - 0xc0d94ab4   ( 281 kB)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptible hierarchical RCU implementation.
            Build-time adjustment of leaf fanout to 32.
    NR_IRQS:16 nr_irqs:16 16
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    OMAP clockevent source: timer2 at 24000000 Hz
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    OMAP clocksource: timer1 at 24000000 Hz
    clocksource_probe: no matching clocksources found
    Console: colour dummy device 80x30
    Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0x80100000 - 0x80100060
    EFI services will not be available.
    devtmpfs: initialized
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 256 (order: -1, 3072 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    omap_hwmod: debugss: _wait_target_disable failed
    cpuidle: using governor ladder
    cpuidle: using governor menu
    OMAP GPIO hardware version 0.1
    omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    No ATAGs?
    hw-breakpoint: debug architecture 0x4 unsupported.
    edma 49000000.edma: TI EDMA DMA engine driver
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    EDAC MC: Ver: 3.0.0
    omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource timer1
    NET: Registered protocol family 2
    TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    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 named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    workingset: timestamp_bits=14 max_order=17 bucket_order=3
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    NFS: Registering the id_resolver key type
    Key type id_resolver registered
    Key type id_legacy registered
    ntfs: driver 2.1.32 [Flags: R/O].
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    backlight supply power not found, using dummy regulator
    omap_uart 44e09000.serial: no wakeirq for uart0
    44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
    console [ttyO0] enabled
    [drm] Initialized
    panel panel: found backlight
    [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [drm] No driver support for vblank timestamp query.
    tilcdc 4830e000.lcdc: tilcdc_crtc_irq(0x00000004): Sync lost
    Console: switching to colour frame buffer device 100x30
    tilcdc 4830e000.lcdc: fb0:  frame buffer device
    brd: module loaded
    loop: module loaded
    libphy: Fixed MDIO Bus: probed
    davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    libphy: 4a101000.mdio: probed
    davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Davicom DM9161A
    cpsw 4a100000.ethernet: Detected MACID = 0c:b2:b7:aa:b1:bc
    cpsw 4a100000.ethernet: device node lookup for pps timer failed
    cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    usbcore: registered new interface driver usb-storage
    47401300.usb-phy supply vcc not found, using dummy regulator
    47401b00.usb-phy supply vcc not found, using dummy regulator
    mousedev: PS/2 mouse device common for all mice
    i2c /dev entries driver
    usbcore: registered new interface driver zr364xx
    usbcore: registered new interface driver stkwebcam
    usbcore: registered new interface driver s2255
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (1.1.1)
    gspca_main: v2.14.0 registered
    usbcore: registered new interface driver Philips webcam
    cpia2: V4L-Driver for Vision CPiA2 based cameras v3.0.1
    usbcore: registered new interface driver cpia2
    usbcore: registered new interface driver em28xx
    em28xx: Registered (Em28xx v4l2 Extension) extension
    em28xx: Registered (Em28xx Audio Extension) extension
    usbcore: registered new interface driver usbtv
    cpuidle: enable-method property 'ti,am3352' found operations
    omap_hsmmc 48060000.mmc: Got CD GPIO
    ledtrig-cpu: registered to indicate activity on CPUs
    NET: Registered protocol family 10
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    Key type dns_resolver registered
    omap_voltage_late_init: Voltage driver support not added
    omap-gpmc 50000000.gpmc: GPMC revision 6.0
    gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3
    nand: Samsung NAND 1GiB 3,3V 8-bit
    nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    9 ofpart partitions found on MTD device omap2-nand.0
    Creating 9 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000020000 : "NAND.SPL"
    0x000000020000-0x000000040000 : "NAND.SPL.backup1"
    0x000000040000-0x000000060000 : "NAND.SPL.backup2"
    0x000000060000-0x000000080000 : "NAND.SPL.backup3"
    0x000000080000-0x000000260000 : "NAND.u-boot"
    0x000000260000-0x000000280000 : "NAND.u-boot-env"
    0x000000280000-0x000000580000 : "NAND.LOGO"
    0x000000580000-0x000000a80000 : "NAND.kernel"
    0x000000a80000-0x000040000000 : "rootfs"
    random: fast init done
    tps65910 0-002d: No interrupt support, no core IRQ
    vrtc: supplied by vbat
    vio: supplied by vbat
    vdd1: supplied by vbat
    vdd2: supplied by vbat
    vdig1: supplied by vbat
    vdig2: supplied by vbat
    vpll: supplied by vbat
    vdac: supplied by vbat
    vaux1: supplied by vbat
    vaux2: supplied by vbat
    vaux33: supplied by vbat
    vmmc: supplied by vbat
    vbb: supplied by vbat
    tps65910-rtc tps65910-rtc: IRQ is not free.
    tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as rtc0
    omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    omap_hsmmc 48060000.mmc: Got CD GPIO
    ubi0: attaching mtd8
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:0, read 64 bytes
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.59-ga75d8e9305 #2
    Hardware name: Generic AM33XX (Flattened Device Tree)
    Backtrace:
    [<c010b790>] (dump_backtrace) from [<c010ba4c>] (show_stack+0x18/0x1c)
     r7:00000000 r6:00000040 r5:dc610000 r4:ffffffb6
    [<c010ba34>] (show_stack) from [<c03c0b94>] (dump_stack+0x24/0x28)
    [<c03c0b70>] (dump_stack) from [<c0588004>] (ubi_io_read+0x150/0x334)
    [<c0587eb4>] (ubi_io_read) from [<c0588410>] (ubi_io_read_ec_hdr+0x4c/0x208)
     r10:00000000 r9:00000040 r8:0000039e r7:dc610000 r6:dc5f4c00 r5:dc5f4a00
     r4:dc5f8480
    [<c05883c4>] (ubi_io_read_ec_hdr) from [<c058d9e4>] (ubi_attach+0x1c0/0x14b0)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:0000039e r6:dc5f4c00 r5:dc5f7480
     r4:dc5f8480
    [<c058d824>] (ubi_attach) from [<c0581dec>] (ubi_attach_mtd_dev+0x3e0/0xc5c)
     r10:00002000 r9:dc5cd800 r8:00000240 r7:00000000 r6:dc5cd800 r5:dc610000
     r4:fffff800
    [<c0581a0c>] (ubi_attach_mtd_dev) from [<c0c296f4>] (ubi_init+0x1ec/0x274)
     r10:fffff000 r9:c0afb0e4 r8:c0afb110 r7:c0ca01e4 r6:00000000 r5:c0ca01e8
     r4:dc5cd800
    [<c0c29508>] (ubi_init) from [<c010171c>] (do_one_initcall+0x4c/0x178)
     r10:00000000 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:ffffe000
     r4:c0c29508
    [<c01016d0>] (do_one_initcall) from [<c0c00e8c>] (kernel_init_freeable+0x13c/0x1cc)
     r10:00000008 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:c0d4e780
     r4:c0d4e780
    [<c0c00d50>] (kernel_init_freeable) from [<c0847c20>] (kernel_init+0x10/0x110)
     r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0847c10
     r4:00000000
    [<c0847c10>] (kernel_init) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
     r5:c0847c10 r4:00000000
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 926:512, read 64 bytes
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.59-ga75d8e9305 #2
    Hardware name: Generic AM33XX (Flattened Device Tree)
    Backtrace:
    [<c010b790>] (dump_backtrace) from [<c010ba4c>] (show_stack+0x18/0x1c)
     r7:00000000 r6:00000040 r5:dc610000 r4:ffffffb6
    [<c010ba34>] (show_stack) from [<c03c0b94>] (dump_stack+0x24/0x28)
    [<c03c0b70>] (dump_stack) from [<c0588004>] (ubi_io_read+0x150/0x334)
    [<c0587eb4>] (ubi_io_read) from [<c0588620>] (ubi_io_read_vid_hdr+0x54/0x208)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:dc5f4c00 r6:0000039e r5:dc610000
     r4:dc5f4c00
    [<c05885cc>] (ubi_io_read_vid_hdr) from [<c058db54>] (ubi_attach+0x330/0x14b0)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:0000039e r6:dc5f4c00 r5:dc5f7480
     r4:dc5f8480
    [<c058d824>] (ubi_attach) from [<c0581dec>] (ubi_attach_mtd_dev+0x3e0/0xc5c)
     r10:00002000 r9:dc5cd800 r8:00000240 r7:00000000 r6:dc5cd800 r5:dc610000
     r4:fffff800
    [<c0581a0c>] (ubi_attach_mtd_dev) from [<c0c296f4>] (ubi_init+0x1ec/0x274)
     r10:fffff000 r9:c0afb0e4 r8:c0afb110 r7:c0ca01e4 r6:00000000 r5:c0ca01e8
     r4:dc5cd800
    [<c0c29508>] (ubi_init) from [<c010171c>] (do_one_initcall+0x4c/0x178)
     r10:00000000 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:ffffe000
     r4:c0c29508
    [<c01016d0>] (do_one_initcall) from [<c0c00e8c>] (kernel_init_freeable+0x13c/0x1cc)
     r10:00000008 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:c0d4e780
     r4:c0d4e780
    [<c0c00d50>] (kernel_init_freeable) from [<c0847c20>] (kernel_init+0x10/0x110)
     r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0847c10
     r4:00000000
    [<c0847c10>] (kernel_init) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
     r5:c0847c10 r4:00000000
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:0, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:0, read 64 bytes
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.59-ga75d8e9305 #2
    Hardware name: Generic AM33XX (Flattened Device Tree)
    Backtrace:
    [<c010b790>] (dump_backtrace) from [<c010ba4c>] (show_stack+0x18/0x1c)
     r7:00000000 r6:00000040 r5:dc610000 r4:ffffffb6
    [<c010ba34>] (show_stack) from [<c03c0b94>] (dump_stack+0x24/0x28)
    [<c03c0b70>] (dump_stack) from [<c0588004>] (ubi_io_read+0x150/0x334)
    [<c0587eb4>] (ubi_io_read) from [<c0588410>] (ubi_io_read_ec_hdr+0x4c/0x208)
     r10:00000000 r9:00000040 r8:0000039f r7:dc610000 r6:dc5f4c00 r5:dc5f4a00
     r4:dc5f8480
    [<c05883c4>] (ubi_io_read_ec_hdr) from [<c058d9e4>] (ubi_attach+0x1c0/0x14b0)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:0000039f r6:dc5f4c00 r5:dc5f7480
     r4:dc5f8480
    [<c058d824>] (ubi_attach) from [<c0581dec>] (ubi_attach_mtd_dev+0x3e0/0xc5c)
     r10:00002000 r9:dc5cd800 r8:00000240 r7:00000000 r6:dc5cd800 r5:dc610000
     r4:fffff800
    [<c0581a0c>] (ubi_attach_mtd_dev) from [<c0c296f4>] (ubi_init+0x1ec/0x274)
     r10:fffff000 r9:c0afb0e4 r8:c0afb110 r7:c0ca01e4 r6:00000000 r5:c0ca01e8
     r4:dc5cd800
    [<c0c29508>] (ubi_init) from [<c010171c>] (do_one_initcall+0x4c/0x178)
     r10:00000000 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:ffffe000
     r4:c0c29508
    [<c01016d0>] (do_one_initcall) from [<c0c00e8c>] (kernel_init_freeable+0x13c/0x1cc)
     r10:00000008 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:c0d4e780
     r4:c0d4e780
    [<c0c00d50>] (kernel_init_freeable) from [<c0847c20>] (kernel_init+0x10/0x110)
     r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0847c10
     r4:00000000
    [<c0847c10>] (kernel_init) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
     r5:c0847c10 r4:00000000
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:512, read only 64 bytes, retry
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    omap2-nand 8000000.nand: uncorrectable bit-flips found
    ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 927:512, read 64 bytes
    CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.59-ga75d8e9305 #2
    Hardware name: Generic AM33XX (Flattened Device Tree)
    Backtrace:
    [<c010b790>] (dump_backtrace) from [<c010ba4c>] (show_stack+0x18/0x1c)
     r7:00000000 r6:00000040 r5:dc610000 r4:ffffffb6
    [<c010ba34>] (show_stack) from [<c03c0b94>] (dump_stack+0x24/0x28)
    [<c03c0b70>] (dump_stack) from [<c0588004>] (ubi_io_read+0x150/0x334)
    [<c0587eb4>] (ubi_io_read) from [<c0588620>] (ubi_io_read_vid_hdr+0x54/0x208)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:dc5f4c00 r6:0000039f r5:dc610000
     r4:dc5f4c00
    [<c05885cc>] (ubi_io_read_vid_hdr) from [<c058db54>] (ubi_attach+0x330/0x14b0)
     r10:dc610000 r9:dc5f4a00 r8:00000000 r7:0000039f r6:dc5f4c00 r5:dc5f7480
     r4:dc5f8480
    [<c058d824>] (ubi_attach) from [<c0581dec>] (ubi_attach_mtd_dev+0x3e0/0xc5c)
     r10:00002000 r9:dc5cd800 r8:00000240 r7:00000000 r6:dc5cd800 r5:dc610000
     r4:fffff800
    [<c0581a0c>] (ubi_attach_mtd_dev) from [<c0c296f4>] (ubi_init+0x1ec/0x274)
     r10:fffff000 r9:c0afb0e4 r8:c0afb110 r7:c0ca01e4 r6:00000000 r5:c0ca01e8
     r4:dc5cd800
    [<c0c29508>] (ubi_init) from [<c010171c>] (do_one_initcall+0x4c/0x178)
     r10:00000000 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:ffffe000
     r4:c0c29508
    [<c01016d0>] (do_one_initcall) from [<c0c00e8c>] (kernel_init_freeable+0x13c/0x1cc)
     r10:00000008 r9:c0c0061c r8:00000101 r7:c0c3b834 r6:c0ca9c38 r5:c0d4e780
     r4:c0d4e780
    [<c0c00d50>] (kernel_init_freeable) from [<c0847c20>] (kernel_init+0x10/0x110)
     r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0847c10
     r4:00000000
    [<c0847c10>] (kernel_init) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
     r5:c0847c10 r4:00000000
    

    thanks

    yandong

          

  • another finding yesterday is:

    I tried to dump the nand data for the rootfs partition.And compare them between the old and new flash.

    basically i wanted to dump the entire rootfs partition and save the data to a mmc card.

    Here is what i did:

    in u-boot command line:

    nandecc hw 2

    nand read.e 0x82000000 0xa80000 0xEBA0000

    then use the mmc write command to write the mmc (i'm not sure if this will work . haven't tried yet.)

    Now

    for the 1st command.

    nand read.e 0x82000000 0xa80000 0xEBA0000


    0xa80000 is the start of rootfs and 0xEBA0000 is the rootfs size in byte.


    i suppose u-boot will read the nand and have the ecc checked when reading.Cause this is why it's "read.e". Right?

    what i found is that there is no error reported when executing read.e command for the new flash.

    meaning when u-boot is writing the new nand with BCH8. it's ok . at least at that time the data in new nand is ok.Right?

    otherwise the u-boot will report something during reading like "Error: Bad compare! failed".Or "Error: Ecc is wrong"

  • Lastest finding regarding dumping the new nand flash using u-boot.

    I successfully dumpped the  rootfs area of new nand flash to mmc card.(Right after done writing the nand flash with the u-boot. Without actually booting up the kernel. Cause mounting the rootfs will somewhat change the rootfs data)

    then binary compare it with the root.bin file i used to download to the nand.

    and they are identical.

    meaning during u-boot stage. The programming is ok?

    Here's what i did :

    nandecc hw 2

    nand read.e 0x82000000 0xa80000 0xEBA0000 (0xa80000 is the start of rootfs and 0xEBA0000 is the rootfs size in byte.)

    mmc rescan

    mmc write 0x82000000 0 482560(just write the data to the starting block 0 of the mmc card. Size = 0xEBA0000/512=482560)

    then plugin the mmc to my linux PC

    dd if=/dev/sdb of=dump bs=250M count=1

    and compare the file "dump" with root.bin.

    and they look the same.

    the result could be the reason that can explain why the 1st mount is ok. yet on a 2nd boot the kernel is reporting ecc errors.

    cause upon 1st boot the nand data is indeed clean and ok..?

  • Could anyone help me please ? 

  • i think i solved the issue.

    actually the nand timing setting is fine.

    nothing wrong with bch8 ecc or whatever ecc chosen.

    the problem is in UBIFS itself.

    UBIFS will try to access sub-page while it can.

    and since the nand driver can not properly determine if the chip can really support sub-page access or not.

    this is a problem.

    the tricky thing is that i can't find any information regarding sub-page size on the nand spec itself.

    but while my old spansion nand flash can support sub-page access of 512 bytes.

    the samsung flash can't.

    that's why after ubifs boot up.it tried to alter some of the contents in the flash.and endup with all the errors.

    that also explains why my yaffs2 is ok while ubifs failed.

    the solution is to disable the sub-page access inside the nand driver.

    this way the sub-page size=page size=2k

    drivers/mtd/nand/omap2.c

    nand_chip->options |= NAND_NO_SUBPAGE_WRITE;

    and in the meantime.

    adjust the mkfs.ubifs and ubinize command parameter to meet the 2k sub-page requirement accordingly.

    mkfs.ubifs -r rootfs-cutout/ -m 2048 -e 126976 -c 8108 -F -o ubi.in
    ubinize -o root.bin -m 2048 -p 128KiB -s 2048 ubinize.cfg

    that should be all .