Hi all,
i use Hynix NAND H27UAG8T2ATR with mx28. I want to make my own updater_ivt.sb to program NAND via MFG utils.
In ltib i apply patch
and build updater_ivt.sb. When i try to run MFG utils i get error
gpmi-nfc gpmi-nfc.0: Alternate buffer is too small for incoming I/O
gpmi-nfc gpmi-nfc.0: [mil_ecc_read_page] Inadequate DMA buffer
Any idea?
The full log -
Linux version 2.6.35.3-670-g914558e (rusar@v1310) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #16 Mon May 27 20:40:25 EEST 2013
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Freescale MX28EVK board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: -e console=ttyAM0,115200 rdinit=/linuxrc rw gpmi
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 122868k/122868k available, 8204k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xfde00000 - 0xffe00000 ( 32 MB)
vmalloc : 0xc8800000 - 0xf0000000 ( 632 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0026000 ( 120 kB)
.text : 0xc0026000 - 0xc0285000 (2428 kB)
.data : 0xc0286000 - 0xc02a3fc0 ( 120 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:288
Console: colour dummy device 80x30
console [ttyAM0] enabled
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
regulator: vddd: 800 <--> 1575 mV at 1500 mV fast normal
regulator: vdddbo: 800 <--> 1575 mV fast normal
regulator: vdda: 1500 <--> 2275 mV at 1800 mV fast normal
vddio = 3380000, val=10
regulator: vddio: 2880 <--> 3680 mV at 3380 mV fast normal
regulator: overall_current: fast normal
regulator: vbus5v:
regulator: mxs-duart-1: fast normal
regulator: mxs-bl-1: fast normal
regulator: mxs-i2c-1: fast normal
regulator: mmc_ssp-1: fast normal
regulator: mmc_ssp-2: fast normal
regulator: charger-1: fast normal
regulator: power-test-1: fast normal
regulator: cpufreq-1: fast normal
i.MX IRAM pool: 124 KB@0xc8820000
Initializing GPMI pins
usb DR wakeup device is registered
IMX usb wakeup probe
audit: cannot initialize inotify handle
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource mxs clock source
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 4096K
Bus freq driver module loaded
mxs_cpu_init: cpufreq init finished
audit: initializing netlink socket (disabled)
type=2000 audit(1.670:1): initialized
msgmni has been set to 247
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 100x30
mxs-duart.0: ttyAM0 at MMIO 0x80074000 (irq = 47) is a DebugUART
mxs-auart.0: ttySP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0
Found APPUART 3.1.0
mxs-auart.1: ttySP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1
Found APPUART 3.1.0
mxs-auart.2: ttySP2 at MMIO 0x8006e000 (irq = 114) is a mxs-auart.2
Found APPUART 3.1.0
mxs-auart.3: ttySP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3
Found APPUART 3.1.0
mxs-auart.4: ttySP4 at MMIO 0x80072000 (irq = 116) is a mxs-auart.4
Found APPUART 3.1.0
brd: module loaded
loop: module loaded
Loading iSCSI transport class v2.0-870.
i.MX GPMI NFC
NFC: Version 1, 8-chip GPMI and BCH
Boot ROM: Version 1, Single-chip boot area, block mark swapping supported
Scanning for NAND Flash chips...
NAND device: Manufacturer ID: 0xad, Chip ID: 0xd5 (Hynix NAND 2GiB 3,3V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Hynix (0xad)
Device Code : 0xd5
Cell Technology : MLC
Chip Size : 2 GiB
Pages per Block : 128
Page Geometry : 4096+218
ECC Strength : 12 bits
ECC Size : 512 B
Data Setup Time : 15 ns
Data Hold Time : 10 ns
Address Setup Time: 20 ns
GPMI Sample Delay : 6 ns
tREA : 20 ns
tRLOH : 5 ns
tRHOH : 15 ns
Description : H27UAG8T2ATR (2GB, 1CE)
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 4096 (0x1000)
Page OOB Size in Bytes : 218
Block Size in Bytes : 524288 (0x80000)
Block Size in Pages : 128 (0x80)
Chip Size in Bytes : 2147483648 (0x80000000)
Chip Size in Pages : 524288 (0x80000)
Chip Size in Blocks : 4096 (0x1000)
Medium Size in Bytes : 2147483648 (0x80000000)
------------
NFC Geometry
------------
ECC Algorithm : BCH
ECC Strength : 8
Page Size in Bytes : 2112
Metadata Size in Bytes : 10
ECC Chunk Size in Bytes: 512
ECC Chunk Count : 4
Payload Size in Bytes : 2048
Auxiliary Size in Bytes: 16
Auxiliary Status Offset: 12
Block Mark Byte Offset : 1999
Block Mark Bit Offset : 0
-----------------
Boot ROM Geometry
-----------------
Boot Area Count : 1
Boot Area Size in Bytes : 20971520 (0x1400000)
Stride Size in Pages : 64
Search Area Stride Exponent: 2
Scanning device for bad blocks
Boot area protection is enabled.
Creating 2 MTD partitions on "gpmi-nfc-main":
0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"
0x000001400000-0x000080000000 : "gpmi-nfc-general-use"
ARC USBOTG Device Controller driver (1 August 2005)
check_parameters:UTP settings are in place now, overriding defaults
g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008
g_file_storage gadget: Number of LUNs=1
fsl-usb2-udc: bind to driver g_file_storage
mice: PS/2 mouse device common for all mice
input: mxs-kbd as /devices/platform/mxs-kbd.0/input/input0
input: MXS touchscreen as /devices/virtual/input/input1
This is 5V only build.
regulator_init_complete: incomplete constraints, leaving vbus5v on
Freeing init memory: 120K
Starting UTP
disable turn off display
uuc 0.4 [built May 22 2013 22:10:20]
UTP: Waiting for device to appear
utp_mk_devnode: creating node '/dev/utp' with 10+222
cpu_id is 28
g_file_storage gadget: high speed config #1
UTP: received command 'mknod class/mtd,mtd0,/dev/mtd0'
class = 'class/mtd'
item = 'mtd0'
node = /dev/mtd0
type = (null)
UTP: running utp_mk_devnode(class/mtd,mtd0,/dev/mtd0,0x2000)
utp_mk_devnode: creating node '/dev/mtd0' with 90+0
UTP: sending Success
UTP: received command 'mknod class/mtd,mtd1,/dev/mtd1'
class = 'class/mtd'
item = 'mtd1'
node = /dev/mtd1
type = (null)
UTP: running utp_mk_devnode(class/mtd,mtd1,/dev/mtd1,0x2000)
utp_mk_devnode: creating node '/dev/mtd1' with 90+2
UTP: sending Success
UTP: received command 'mknod class/misc,ubi_ctrl,/dev/ubi_ctrl'
class = 'class/misc'
item = 'ubi_ctrl'
node = /dev/ubi_ctrl
type = (null)
UTP: running utp_mk_devnode(class/misc,ubi_ctrl,/dev/ubi_ctrl,0x2000)
utp_mk_devnode: creating node '/dev/ubi_ctrl' with 10+62
UTP: sending Success
UTP: received command '$ flash_eraseall /dev/mtd0'
UTP: sending Busy
UTP: executing "flash_eraseall /dev/mtd0"
Erasing 512 Kibyte @ 1400000 -- 100 % complete.
UTP: sending Success
utp_poll: pass returned.
UTP: received command '$ flash_eraseall /dev/mtd1'
UTP: sending Busy
UTP: executing "flash_eraseall /dev/mtd1"
Erasing 512utp_poll: pass returned. % complete.
Erasing 512 Kibyte @ 7ec00000 -- 100 % complete.
UTP: sending Success
UTP: received command 'send'
UTP: sending Success
g_file_storage gadget: high speed config #1
UTP: received command '$ kobs-ng init $FILE'
UTP: sending Busy
UTP: executing "kobs-ng init $FILE"
UTP: sending Success
utp_poll: pass returned.
UTP: received command '$ ubiattach /dev/ubi_ctrl -m 1 -d 0'
UTP: sending Busy
UTP: executing "ubiattach /dev/ubi_ctrl -m 1 -d 0"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 524288 bytes (512 KiB)
UBI: logical eraseblock size: 516096 bytes
UBI: smallest flash I/O unit: 4096
UBI: VID header offset: 4096 (aligned 4096)
UBI: data offset: 8192
gpmi-nfc gpmi-nfc.0: Alternate buffer is too small for incoming I/O
gpmi-nfc gpmi-nfc.0: [mil_ecc_read_page] Inadequate DMA buffer
gpmi-nfc gpmi-nfc.0: Alternate buffer is too small for incoming I/O
gpmi-nfc gpmi-nfc.0: [mil_ecc_read_page] Inadequate DMA buffer
gpmi-nfc gpmi-nfc.0: Alternate buffer is too small for incoming I/O
gpmi-nfc gpmi-nfc.0: [mil_ecc_read_page] Inadequate DMA buffer
gpmi-nfc gpmi-nfc.0: Alternate buffer is too small for incoming I/O
gpmi-nfc gpmi-nfc.0: [mil_ecc_read_page] Inadequate DMA buffer
UBI error: ubi_io_read: error -12 while reading 64 bytes from PEB 0:0, read 0 bytes
ubiattach: UBI_IOCATT: Cannot allocate memory
UTP: sending Non-success
utp_poll: exit with status 256
Best regards, Andrey.
解決済! 解決策の投稿を見る。
From the log:
gpmi-nfc gpmi-nfc.0: Unsupported page geometry: 4096:224
gpmi-nfc gpmi-nfc.0: Chip scan failed
This failing is because the code in gpmi-nfc-hal-common.c does not include the 224 oob size. So can you add the case for 224 and test again?
switch (physical->page_data_size_in_bytes) {
case 2048:
geometry->ecc_strength = 8;
break;
case 4096:
switch (physical->page_oob_size_in_bytes) {
case 128:
geometry->ecc_strength = 8;
break;
case 218:
case 224:
geometry->ecc_strength = 16;
break;
}
break;
...
The error is reported by the function mil_incoming_buffer_dma_begin() in file drivers/mtd/nand/gpmi-nfc/gpmi-nfc-mil.c when the alternate buffer is too small to the length of the arriving data. Alternate buffer is used in gpmi-nfc only when the virtual address of the destination buffer cannot be mapped into a single contiguous physical memory.
After applying the patch, have you rebuilt the kobs-ng utility?
Dear Peter,
Thank you for your answer.
Yes, of course i rebuild kobs-ng after patch.
Any other ideas?
Best regards, Andrey
Dear Peter,
Thank you! I'll try and let you know the result.
Best regards, Andrey.
Dear Peter,
Log -
HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC
PowerPrep start initialize power...
Battery Voltage = 0.82V
No battery or bad battery detected!!!.Disabling battery voltage measurements./r/nLLLCFeb 26 201309:03:55
FRAC 0x92925552
memory type is DDR2
Wait for ddr ready 1power 0x00820616
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
start test memory accress
ddr2 0x40000000
finish simple test
LLLLLLLFLCLFLLJUncompressing Linux... done, booting the kernel.
Linux version 2.6.35.3-571-gcca29a0-gd252c8b-dirty (pchan@pchan-desktop) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #3 Wed Jul 3 17:23:58 HKT 2013
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Freescale MX28EVK board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: -e console=ttyAM0,115200 rdinit=/linuxrc rw gpmi
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 122352k/122352k available, 8720k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xfde00000 - 0xffe00000 ( 32 MB)
vmalloc : 0xc8800000 - 0xf0000000 ( 632 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0027000 ( 124 kB)
.text : 0xc0027000 - 0xc0305000 (2936 kB)
.data : 0xc0306000 - 0xc0324fe0 ( 124 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:288
Console: colour dummy device 80x30
console [ttyAM0] enabled
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
regulator: vddd: 800 <--> 1575 mV at 1500 mV fast normal
regulator: vdddbo: 800 <--> 1575 mV fast normal
regulator: vdda: 1500 <--> 2275 mV at 1800 mV fast normal
vddio = 3380000, val=10
regulator: vddio: 2880 <--> 3680 mV at 3380 mV fast normal
regulator: overall_current: fast normal
regulator: vbus5v:
regulator: mxs-duart-1: fast normal
regulator: mxs-bl-1: fast normal
regulator: mxs-i2c-1: fast normal
regulator: mmc_ssp-1: fast normal
regulator: mmc_ssp-2: fast normal
regulator: charger-1: fast normal
regulator: power-test-1: fast normal
regulator: cpufreq-1: fast normal
i.MX IRAM pool: 124 KB@0xc8820000
Initializing GPMI pins
usb DR wakeup device is registered
IMX usb wakeup probe
audit: cannot initialize inotify handle
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource mxs clock source
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 4096K
Bus freq driver module loaded
mxs_cpu_init: cpufreq init finished
audit: initializing netlink socket (disabled)
type=2000 audit(1.290:1): initialized
JFFS2 version 2.2. (NAND) б╘ 2001-2006 Red Hat, Inc.
msgmni has been set to 246
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 100x30
mxs-duart.0: ttyAM0 at MMIO 0x80074000 (irq = 47) is a DebugUART
mxs-auart.0: ttySP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0
Found APPUART 3.1.0
mxs-auart.1: ttySP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1
Found APPUART 3.1.0
mxs-auart.2: ttySP2 at MMIO 0x8006e000 (irq = 114) is a mxs-auart.2
Found APPUART 3.1.0
mxs-auart.3: ttySP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3
Found APPUART 3.1.0
mxs-auart.4: ttySP4 at MMIO 0x80072000 (irq = 116) is a mxs-auart.4
Found APPUART 3.1.0
brd: module loaded
loop: module loaded
Loading iSCSI transport class v2.0-870.
i.MX GPMI NFC
NFC: Version 1, 8-chip GPMI and BCH
Boot ROM: Version 1, Single-chip boot area, block mark swapping supported
Scanning for NAND Flash chips...
NAND device: Manufacturer ID: 0xad, Chip ID: 0xd5 (Hynix NAND 2GiB 3,3V 8-bit)
-----------------------------
NAND Flash Device Information
-----------------------------
Manufacturer : Hynix (0xad)
Device Code : 0xd5
Cell Technology : MLC
Chip Size : 2 GiB
Pages per Block : 128
Page Geometry : 4096+224
ECC Strength : 12 bits
ECC Size : 512 B
Data Setup Time : 15 ns
Data Hold Time : 10 ns
Address Setup Time: 20 ns
GPMI Sample Delay : 6 ns
tREA : 20 ns
tRLOH : 5 ns
tRHOH : 15 ns
Description : H27UAG8T2ATR (2GB, 1CE)
-----------------
Physical Geometry
-----------------
Chip Count : 1
Page Data Size in Bytes: 4096 (0x1000)
Page OOB Size in Bytes : 224
Block Size in Bytes : 524288 (0x80000)
Block Size in Pages : 128 (0x80)
Chip Size in Bytes : 2147483648 (0x80000000)
Chip Size in Pages : 524288 (0x80000)
Chip Size in Blocks : 4096 (0x1000)
Medium Size in Bytes : 2147483648 (0x80000000)
gpmi-nfc gpmi-nfc.0: Unsupported page geometry: 4096:224
gpmi-nfc gpmi-nfc.0: Chip scan failed
ARC USBOTG Device Controller driver (1 August 2005)
check_parameters:UTP settings are in place now, overriding defaults
g_file_storage gadget: File-backed Storage Gadget, version: 20 November 2008
g_file_storage gadget: Number of LUNs=1
fsl-usb2-udc: bind to driver g_file_storage
mice: PS/2 mouse device common for all mice
input: mxs-kbd as /devices/platform/mxs-kbd.0/input/input0
input: MXS touchscreen as /devices/virtual/input/input1
MXS RTC driver v1.0 hardware v2.3.0
mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0
WARNING : No battery connected !
Aborting power driver initialization
mxs-battery: probe of mxs-battery.0 failed with error 1
mxs-mmc: MXS SSP Controller MMC Interface driver
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
__mxs_reset_block(f0010000): timeout when resetting
mxs-mmc mxs-mmc.0: mmc0: MXS SSP MMC DMAIRQ 82 ERRIRQ 96
mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:25 UTC (25)
Freeing init memory: 124K
Starting UTP
disable turn off display
uuc 0.4 [built Feb 26 2013 09:36:20]
UTP: Waiting for device to appear
utp_mk_devnode: creating node '/dev/utp' with 10+222
cpu_id is 28
g_file_storage gadget: high speed config #1
UTP: received command 'mknod clautp_exec: exit with status -22
ss/mtd,mtd0,/dev/mtd0'
class = 'class/mtd'
item = 'mtd0'
node = /dev/mtd0
type = (null)
UTP: running utp_mk_devnode(class/mtd,mtd0,/dev/mtd0,0x2000)
UTP: sending Non-success
From the log:
gpmi-nfc gpmi-nfc.0: Unsupported page geometry: 4096:224
gpmi-nfc gpmi-nfc.0: Chip scan failed
This failing is because the code in gpmi-nfc-hal-common.c does not include the 224 oob size. So can you add the case for 224 and test again?
switch (physical->page_data_size_in_bytes) {
case 2048:
geometry->ecc_strength = 8;
break;
case 4096:
switch (physical->page_oob_size_in_bytes) {
case 128:
geometry->ecc_strength = 8;
break;
case 218:
case 224:
geometry->ecc_strength = 16;
break;
}
break;
...
I only have Samsung SLC to test but I don't see any issue.
Are you testing my .sb on a i.MX28 EVK board?
Do you see the same problem on other NAND part?
May I take a look to your ucl.xml?
Andrey, please click Correct Answer/Helpful Answer if your issue has been resolved.
Thanks,
Yixing