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.

AM1705 : NAND message :: No space left to write bad block table

Other Parts Discussed in Thread: AM1705

Hello, 

I am working with an embedded system based on a AM1705 (16Mb SDRAM, 64Mb NAND) and kernel unable to work with NAND device;

I got error messages from u-boot and kernel for NAND device, it is a hardware (with NAND device - bad blocks on bbt table ) or software problem?

u-boot error message:

Bad block table not found for chip 0
Bad block table not found for chip 0
No space left to write bad block table

kernel error message :

NAND device: Manufacturer ID: 0x20, Chip ID: 0x76 (ST Micro NAND 64MiB 3,3V 8-bit)
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad eraseblock 4092 at 0x000003ff0000
Bad eraseblock 4093 at 0x000003ff4000
Bad eraseblock 4094 at 0x000003ff8000
Bad eraseblock 4095 at 0x000003ffc000
No space left to write bad block table
davinci_nand: probe of davinci_nand.1 failed with error -28

So kernel can't create partition table and can't work with NAND device;

But u-boot works fine with NAND device (get uImage by tftp, nand erase, nand write)

U-Boot > nboot.e 0xc0700000 0 0x80000

Loading from NAND 64MiB 3,3V 8-bit, offset 0x80000
Image Name: Linux-3.2.1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2026040 Bytes = 1.9 MB
Load Address: c0008000
Entry Point: c0008000
U-Boot > bootm
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.2.1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2026040 Bytes = 1.9 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

If execute u-boot command nand scrub 0, u-boot creates bbt table 

Really scrub this NAND flash? <y/N>
Erasing at 0x3ffc000 -- 100% complete.
Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x000003ffc000, version 0x01
Bad block table written to 0x000003ff8000, version 0x01
OK

And kernel can work with NAND before the first reboot

Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad block table written to 0x000003ffc000, version 0x01
Bad block table written to 0x000003ff8000, version 0x01
Creating 4 MTD partitions on "davinci_nand.1":
0x000000000000-0x000000040000 : "bootloader"
0x000000040000-0x000000080000 : "params"
0x000000080000-0x000000480000 : "kernel"
0x000000480000-0x000004000000 : "filesystem"
davinci_nand davinci_nand.1: controller rev. 2.5

Ivan