[HD Mini Android Development] munjeni:
After new nand driver I am able to write to flash chip but one problem is first 0x59bffff bytes is protected! Some offsets I erased sucessfully (83%)! And succesfully writing to flash (83%):) but could not write to memory where is spl:mad: I think (maybe need special access to unlock it?) Or only solution is jtag? But, maybe, I seen in kernel option in nand driver (errase call and reset call... I will try)

localhost:~/mtd/sbin# cat /proc/mtd
dev: size erasesize name
mtd0: 20000000 00020000 "msm_nand"
localhost:~/mtd/sbin# ./mtdinfo /dev/mtd0
mtd0
Name: msm_nand
Type: nand
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 4096 (536870912 bytes, 512.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size: 2048 bytes
OOB size: 64 bytes
Character device major/minor: 90:0
Bad blocks are allowed: true
Device is writable: true

localhost:~/mtd/sbin# ./flash_erase /dev/mtd0 0 4096
Erasing 128 Kibyte @ 0 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 0 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 20000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 1 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 40000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 2 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 60000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 3 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 80000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 4 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ a0000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 5 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ c0000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 6 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ e0000 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 7 (mtd0)
error 22 (Invalid argument)
error 22 (Invalid argument)
Erasing 128 Kibyte @ 41a0000 -- 12 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 525 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 41c0000 -- 12 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 526 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 41e0000 -- 12 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 527 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 4200000 -- 12 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 528 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 4220000 -- 12 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 529 (mtd0)
error 22 (Invalid argument)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 22 (Invalid argument)
Erasing 128 Kibyte @ 59c0000 -- 17 % complete flash_erase: Skipping bad block at 059e0000
Erasing 128 Kibyte @ 70a0000 -- 21 % complete flash_erase: Skipping bad block at 070c0000
Erasing 128 Kibyte @ b6e0000 -- 35 % complete flash_erase: Skipping bad block at 0b700000
Erasing 128 Kibyte @ 11460000 -- 53 % complete flash_erase: Skipping bad block at 11480000
Erasing 128 Kibyte @ 116c0000 -- 54 % complete flash_erase: Skipping bad block at 116e0000
Erasing 128 Kibyte @ 14660000 -- 63 % complete flash_erase: Skipping bad block at 14680000
Erasing 128 Kibyte @ 1f820000 -- 98 % complete flash_erase: Skipping bad block at 1f840000
Erasing 128 Kibyte @ 1ffe0000 -- 100 % complete
localhost:~/mtd/sbin#