[U-Boot] [U-BOOT]: Add support for numonyx spi flash.

Hi,
We have a numonyx spi flash (N25Q128) on my target.
I tried using u-boot stmicro.c driver as numonyx and stmicro have same manufacturing ID's. The driver detects M25P128 as below ID table
{ .idcode1 = 0x18, .page_size = 256, .pages_per_sector = 1024, .nr_sectors = 64, .name = "M25P128", },
I think this could be because we doesn't have a separate driver to support numonyx. But the problem is N25Q128 and M25P128 are identically different in-terms of number of sectors as well as pages per sector due to this I was unable to program the flash.
So, I edited pages_per_sector and nr_sectors to make my flash read/write will work. and also added an N25Q128 ID table above M25P128 keeping M25P128 will not effect.
Everything is fine up to now.
But I think this process is wired when we have more number of numonyx flashes which identically same manufacturer id's that are supported in stmicro.c with differences in sectors.
I have written a separate driver for numonyx which is identically same as stmicro with added numonyx ID tables, so it will not touch any thing on stmicro.c. The reason I am writing different driver for numonyx because it will be a bit messy If we keep on adding extra things(specific to numonyx) to stmicro.c
Please let me know your views, if my suggestion is good I will send the patch. If am wrong with my understanding, please send an optimized suggestion.
Regards, Jagan.
participants (2)
-
jagan
-
Mike Frysinger