[Letux-kernel] ECC

H. Nikolaus Schaller hns at goldelico.com
Mon Mar 20 09:56:10 CET 2017


Hi Marek,

> Am 20.03.2017 um 08:27 schrieb Belisko Marek <marek.belisko at gmail.com>:
> 
> Hi Nikolaus,
> 
> On Mon, Mar 20, 2017 at 8:02 AM, H. Nikolaus Schaller <hns at goldelico.com> wrote:
>> Hi Marek,
>> 
>>> Am 19.03.2017 um 21:54 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>>>> Strange. Does U-Boot or the kernel overwrite this setting?
>>>> Look in dts at line 1116 there is overwritten ecc to sw.. With this
>>>> change I can read fw_printenv content ;)
>>> 
>>> Ah, great finding!
>> 
>> I have tested and it works! Kernel version Letux-4.10.4 already includes
>> a patch.

http://download.goldelico.com/letux-kernel/letux-4.10.4/
http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=letux-4.10.4

>> 
>> I can also flash the kernel and rootfs from user-space and the GTA04A4
>> can boot to LXDE from NAND.
>> 
>> There are only two remaining issues for perfection:
>> a) U-Boot complains a lot about a missing MMC and adds 20 seconds to boot time
> Do you have some log from that issue? I didn't see it on my device
> (tested with latest u-boot).

Yes here:


U-Boot SPL 2016.11-00234-g095e2de-dirty (Mar 17 2017 - 17:42:26)
Trying to boot from NAND
spl: payload image: U-Boot 2016.11-00234-g095e2de-di load addr: 0x800fffc0 size: 407904
Jumping to U-Boot
loaded - jumping to U-Boot...

U-Boot 2016.11-00234-g095e2de-dirty (Mar 17 2017 - 17:42:26 +0100)

OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
GTA04 + LPDDR/NAND
I2C:   ready
DRAM:  512 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
OMAP die ID: 47b200029ff800000163810c17020004
Found GTA04A4
Device Tree: omap3-gta04a4.dtb
Net:   usb_ether
Error: usb_ether address not set.

Hit any key to stop autoboot:  0 
Setting bus to 0
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **

NAND read: device 0 offset 0x1b0000, size 0x40000
 262144 bytes read: OK
did load bootscript from nand
Running bootscript ...
## Executing script at 81800000
*** if you boot from NAND don-t worry about error messages when U-Boot tries to read a non-existing MMC ***
Setting bus to 0
did init LED driver for TCA6507
*** initializing LCM ***
board_video_init() for JBT6K74-AS / TD028TTEC1
did backlight_init() on GPIO_57
did panel_reg_init()
dss panel config
dss enable
did board_video_init()
did jbt_init_regs()
lcm backlight level set to 255 (0..255)
*** loading splash from MMC ***
Setting bus to 0
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **

NAND read: device 0 offset 0x1c0000, size 0x40000
 262144 bytes read: OK
Uncompressed size: 614400 = 0x96000
*** booting Linux ***
Setting bus to 0
Card did not respond to voltage select!
did set bootargs for nand
trying partitions 1 2 3 4
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **
fallback to NAND kernel

NAND read: device 0 offset 0x280000, size 0x5c0000
 6029312 bytes read: OK
NAND kernel found

NAND read: device 0 offset 0x840000, size 0x40000
 262144 bytes read: OK
NAND DTB found
lcm state set to deep-standby
display power off
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-4.10.4-letux+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4760096 Bytes = 4.5 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 81c00000
   Booting using the fdt blob at 0x81c00000
   Loading Kernel Image ... OK
   Using Device Tree in place at 81c00000, end 81c151e3

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.10.4-letux+ (hns at iMac.local) (gcc version 4.9.2 (GCC) ) #888 SMP PREEMPT Mon Mar 20 06:41:32 CET 2017
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Goldelico GTA04A4/Letux 2804
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] cma: Reserved 16 MiB at 0x9e800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 130560
[    0.000000] free_area_init_node: node 0, pgdat c0ca3f80, node_mem_map df9f1000
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk)
[    0.000000] percpu: Embedded 15 pages/cpu @df996000 s31680 r8192 d21568 u61440
[    0.000000] pcpu-alloc: s31680 r8192 d21568 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129536
[    0.000000] Kernel command line: console=ttyO2,115200n8 mpurate=800 mux=GTA04A3+ vram=12M omapfb.vram=0:8M,1:4M omapfb.mode=dvi:640x480MR-16 at 60 omapfb.debug=y omapdss.def_disp=lcd ubi.mtd=4 root=ubi0:gta04-rootfs rootfstype=ubifs console=ttyO2,115200n8 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 musb_hdrc.preserve_vbus=1 log_buf_len=8M ignore_loglevel earlyprintk
[    0.000000] log_buf_len: 8388608 bytes
[    0.000000] early log buf free: 63824(97%)
[    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: 472664K/522240K available (7168K kernel code, 679K rwdata, 2204K rodata, 1024K init, 8060K bss, 33192K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
[    0.000000]       .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
[    0.000000]       .data : 0xc0c00000 - 0xc0ca9ef8   ( 680 kB)
[    0.000000]        .bss : 0xc0ca9ef8 - 0xc1488f1c   (8061 kB)
[    0.000000] Running RCU self tests
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU lockdep checking is enabled.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[    0.000000] OMAP clockevent source: timer1 at 32768 Hz
[    0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns
[    0.000030] OMAP clocksource: 32k_counter at 32768 Hz
[    0.002136] Console: colour dummy device 80x30
[    0.002166] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.002197] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.002197] ... MAX_LOCK_DEPTH:          48
[    0.002227] ... MAX_LOCKDEP_KEYS:        8191
[    0.002227] ... CLASSHASH_SIZE:          4096
[    0.002258] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.002258] ... MAX_LOCKDEP_CHAINS:      65536
[    0.002258] ... CHAINHASH_SIZE:          32768
[    0.002288]  memory used by lock dependency info: 5167 kB
[    0.002288]  per task-struct memory footprint: 1536 bytes
[    0.002349] Calibrating delay loop... 594.73 BogoMIPS (lpj=2973696)
[    0.105224] pid_max: default: 32768 minimum: 301
[    0.105743] Security Framework initialized
[    0.105926] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.111175] CPU: Testing write buffer coherency: ok
[    0.114074] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.135406] Setting up static identity map for 0x80100000 - 0x80100058
[    0.205139] smp: Bringing up secondary CPUs ...
[    0.205169] smp: Brought up 1 node, 1 CPU
[    0.205200] SMP: Total of 1 processors activated (594.73 BogoMIPS).
[    0.205200] CPU: All CPU(s) started in SVC mode.
[    0.211151] devtmpfs: initialized
[    0.375793] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.415435] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.415527] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.418792] pinctrl core: initialized pinctrl subsystem
[    0.431915] NET: Registered protocol family 16
[    0.445526] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.568023] omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp
[    0.571472] omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp
[    0.761138] Reprogramming SDRC clock to 400000000 Hz
[    0.809692] OMAP GPIO hardware version 2.5
[    0.959197] omap-gpmc 6e000000.gpmc: GPMC revision 5.0
[    0.959472] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[    1.024414] No ATAGs?
[    1.024444] hw-breakpoint: debug architecture 0x4 unsupported.
[    1.027313] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    1.027343] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    1.029663] OMAP DMA hardware revision 5.0
[    1.378906] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[    1.400817] omap-iommu 480bd400.mmu: 480bd400.mmu registered
[    1.410827] SCSI subsystem initialized
[    1.415466] libata version 3.00 loaded.
[    1.420410] usbcore: registered new interface driver usbfs
[    1.423492] usbcore: registered new interface driver hub
[    1.424987] usbcore: registered new device driver usb
[    1.426452] hsusb2_phy supply vcc not found, using dummy regulator
[    1.427124] usb_add_phy_dev nop-xceiv
[    1.438171] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz
[    1.454040] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz
[    1.457550] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz
[    1.462310] Advanced Linux Sound Architecture Driver Initialized.
[    1.485412] clocksource: Switched to clocksource 32k_counter
[    1.710571] VFS: Disk quotas dquot_6.6.0
[    1.710815] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.833374] NET: Registered protocol family 2
[    1.839355] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    1.839508] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[    1.841766] TCP: Hash tables configured (established 4096 bind 4096)
[    1.842071] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    1.842437] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    1.843872] NET: Registered protocol family 1
[    1.856964] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    1.875976] audit: initializing netlink subsys (disabled)
[    1.879272] audit: type=2000 audit(1.870:1): initialized
[    1.898498] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    1.911987] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.928436] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.928649] io scheduler noop registered
[    1.928680] io scheduler deadline registered
[    1.928771] io scheduler cfq registered (default)
[    1.939453] pinctrl-single 48002030.pinmux: 284 pins at pa fa002030 size 568
[    1.940521] pinctrl-single 48002a00.pinmux: 46 pins at pa fa002a00 size 92
[    1.942443] pinctrl-single 480025a0.pinmux: 46 pins at pa fa0025a0 size 92
[    1.942962] pinctrl-single 480022d8.pinmux: please update dts to use #pinctrl-cells = <2>
[    1.943725] pinctrl-single 480022d8.pinmux: initialized with no interrupts
[    1.943756] pinctrl-single 480022d8.pinmux: 4 pins at pa fa0022d8 size 4
[    1.944122] pinctrl-single 48002274.pinmux: please update dts to use #pinctrl-cells = <2>
[    1.944793] pinctrl-single 48002274.pinmux: initialized with no interrupts
[    1.944824] pinctrl-single 48002274.pinmux: 4 pins at pa fa002274 size 4
[    1.972778] DTR_gpio -2 inverted 0
[    1.972778] DTR_gpio -22 inverted 0
[    1.972839] omap_uart 4806a000.serial: no wakeirq for uart0
[    1.975219] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[    1.980102] DTR_gpio -2 inverted 0
[    1.980133] DTR_gpio -22 inverted 0
[    1.980163] omap_uart 4806c000.serial: no wakeirq for uart1
[    1.980804] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 89, base_baud = 3000000) is a OMAP UART1
[    1.983917] DTR_gpio 21 inverted 0
[    1.984069] DTR_gpio 21 inverted 0
[    1.984100] omap_uart 49020000.serial: no wakeirq for uart2
[    1.984466] 49020000.serial: ttyO2 at MMIO 0x49020000 (irq = 90, base_baud = 3000000) is a OMAP UART2
[    2.618286] random: fast init done
[    2.903076] console [ttyO2] enabled
[    2.909667] DTR_gpio -2 inverted 0
[    2.913238] DTR_gpio -22 inverted 0
[    2.917572] omap_uart 49042000.serial: no wakeirq for uart3
[    2.924072] 49042000.serial: ttyO3 at MMIO 0x49042000 (irq = 96, base_baud = 3000000) is a OMAP UART3
[    3.197723] brd: module loaded
[    3.334442] loop: module loaded
[    3.387481] twl 0-0048: PIH (irq 23) chaining IRQs 338..346
[    3.394012] twl 0-0048: power (irq 343) chaining IRQs 346..353
[    3.425079] VAUX3: Bringing 2800000uV into 2500000-2500000uV
[    3.481597] VMMC2: Bringing 2600000uV into 1800000-1800000uV
[    3.488861] VMMC2: failed to apply 1800000-1800000uV constraint(-22)
[    3.496185] twl4030_reg 48070000.i2c:twl at 48:regulator-vmmc2: can't register VMMC2, -22
[    3.504669] twl4030_reg: probe of 48070000.i2c:twl at 48:regulator-vmmc2 failed with error -22
[    3.539550] VSIM: Bringing 1800000uV into 2800000-2800000uV
[    3.609863] mtdoops: mtd device (mtddev=name/number) must be supplied
[    3.619476] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xbc
[    3.626922] nand: Micron MT29F4G16ABBDA3W
[    3.631164] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.639587] nand: using OMAP_ECC_HAM1_CODE_HW
[    3.644195] nand: WARNING: 30000000.nand: the ECC used on your system is too weak compared to the one required by the NAND chip
[    3.656707] 6 ofpart partitions found on MTD device 30000000.nand
[    3.663116] Creating 6 MTD partitions on "30000000.nand":
[    3.668975] 0x000000000000-0x000000080000 : "X-Loader"
[    3.699157] 0x000000080000-0x000000240000 : "U-Boot"
[    3.726440] 0x000000240000-0x000000280000 : "U-Boot Env"
[    3.751403] 0x000000280000-0x000000880000 : "Kernel"
[    3.782775] 0x000000880000-0x000020000000 : "File System"

These messages take approx. 0.5 seconds each:

Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
** Bad device mmc 0 **

>> b) our Letux LXDE is still too big for NAND...
> Hmm maybe can be shrink to feasible amount so it will boot from NAND?
> Not sure if it's possible though.

Well, the flash-nand script already tries to shrink a lot but it does not suffice :(

BR,
Nikolaus



More information about the Letux-kernel mailing list