Skip to contentSkip to conversation

mtd with AMD AM29LV800DB nor flash

DISCUSSION Ole Reinhardt 2 participants 2 messages Jan 2, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello,

I have a problem using 2.6.15-rc7'th mtd with an AMD AM29LV800DB nor flash device.

The flash chip is connected to CS0 and is using 16bit bus width. It is recognised as AM29LV800BB, which is fully software and pin compatible to the AM29LV800DB device.

Everything works quite fine, except writing / erasing. I tracked down the problem downto the following function:

finfo_uaddr() in drivers/mtd/chips/jedec_probe.c

I have a 16bit bus width, so I would expect it to return MTD_UADDR_0x0555_0x02AA, but there are the following lines:

if (uaddr != MTD_UADDR_NOT_SUPPORTED ) {
	/* ASSERT("The unlock addresses for non-8-bit mode
	   are bollocks. We don't really need an array."); */
	uaddr = finfo->uaddr[0];
}

In other words: For my flash chip, always MTD_UADDR_0x0AAA_0x0555 is returned.

This is definatly the wrong unlock address for 16bit mode and every erase command will fail.

If I comment out the "if (uaddr != MTD_UADDR_NOT_SUPPORTED ) ..." everything works fine.

Can anybody explain me what's going wrong or is this a bug in the mtd code?

Best regards,

Ole Reinhardt

Signature · 4 lines
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--
#1 lore raw

Hi,

you might want to try patch from Todd Poynor sent to this list 16.11.2005. If you wish, I can provide you the direct link to this email in the linux-mts mailing list archive.

Hope that helps,

Best regards,
Vitaly

Quoted 42 lines · Ole Reinhardt

Hello,

I have a problem using 2.6.15-rc7'th mtd with an AMD AM29LV800DB nor flash device.

The flash chip is connected to CS0 and is using 16bit bus width. It is recognised as AM29LV800BB, which is fully software and pin compatible to the AM29LV800DB device.

Everything works quite fine, except writing / erasing. I tracked down the problem downto the following function:

finfo_uaddr() in drivers/mtd/chips/jedec_probe.c

I have a 16bit bus width, so I would expect it to return MTD_UADDR_0x0555_0x02AA, but there are the following lines:

if (uaddr != MTD_UADDR_NOT_SUPPORTED ) {
	/* ASSERT("The unlock addresses for non-8-bit mode
	   are bollocks. We don't really need an array."); */
	uaddr = finfo->uaddr[0];
}

In other words: For my flash chip, always MTD_UADDR_0x0AAA_0x0555 is returned.

This is definatly the wrong unlock address for 16bit mode and every erase command will fail.

If I comment out the "if (uaddr != MTD_UADDR_NOT_SUPPORTED ) ..." everything works fine.

Can anybody explain me what's going wrong or is this a bug in the mtd code?

Best regards,

Ole Reinhardt