* [PATCH 1/1] Revert "nand_base: detect more ONFI flash" @ 2013-05-07 20:21 Jean-Christophe PLAGNIOL-VILLARD 2013-05-08 5:11 ` Sascha Hauer 0 siblings, 1 reply; 9+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-07 20:21 UTC (permalink / raw) To: barebox this brake the nand support on at91sam9x5ek where we have a non compliant ONFI nand NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- drivers/mtd/nand/nand_base.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index e8103cf..67e913a 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -1179,15 +1179,16 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, return ERR_PTR(-ENODEV); } - if (!type) - type = nand_flash_ids; - - for (; type->name != NULL; type++) - if (dev_id == type->id) + /* Lookup the flash id */ + for (i = 0; nand_flash_ids[i].name != NULL; i++) { + if (dev_id == nand_flash_ids[i].id) { + type = &nand_flash_ids[i]; break; + } + } chip->onfi_version = 0; - if (!type->name || !type->pagesize) { + if (!type) { /* Check is chip is ONFI compliant */ ret = nand_flash_detect_onfi(mtd, chip, &busw); if (ret) -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-07 20:21 [PATCH 1/1] Revert "nand_base: detect more ONFI flash" Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-08 5:11 ` Sascha Hauer 2013-05-08 7:30 ` Jean-Christophe PLAGNIOL-VILLARD 0 siblings, 1 reply; 9+ messages in thread From: Sascha Hauer @ 2013-05-08 5:11 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > this brake the nand support on at91sam9x5ek > where we have a non compliant ONFI nand > NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. Thank you for letting us know that this patch causes a regression for you. I this happens, please first try and fix the regression. If that doesn't work please tell us what about the original patch is so wrong that it needs to be reverted. With a good explanation it could be that someone else has an idea. And whatever you do, put the original author, Eric in this case, on Cc. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-08 5:11 ` Sascha Hauer @ 2013-05-08 7:30 ` Jean-Christophe PLAGNIOL-VILLARD 2013-05-08 16:25 ` Eric Bénard 0 siblings, 1 reply; 9+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-08 7:30 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox On May 8, 2013, at 1:11 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: >> this brake the nand support on at91sam9x5ek >> where we have a non compliant ONFI nand >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 >> >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > Thank you for letting us know that this patch causes a regression for > you. I this happens, please first try and fix the regression. If that > doesn't work please tell us what about the original patch is so wrong > that it needs to be reverted. With a good explanation it could be that > someone else has an idea. And whatever you do, put the original author, > Eric in this case, on Cc. This commit was supposed just able to detect that a Nand is ONFI but instead it brake supported Nand So Eric can fix it but I've not time to debug this before 1 month and the few platform that use ONFI are all busy So as the commit just allow to detect a band is ONFI can we revert it to keep non-ONFI Nand to work Best Regards, J. > > Sascha > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-08 7:30 ` Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-08 16:25 ` Eric Bénard 2013-05-08 16:36 ` Jean-Christophe PLAGNIOL-VILLARD 2013-05-15 6:46 ` Re[2]: " Alexander Shiyan 0 siblings, 2 replies; 9+ messages in thread From: Eric Bénard @ 2013-05-08 16:25 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox Hi Jean-Christophe, Le Wed, 8 May 2013 15:30:24 +0800, Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> a écrit : > > On May 8, 2013, at 1:11 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > >> this brake the nand support on at91sam9x5ek > >> where we have a non compliant ONFI nand > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > >> > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > Thank you for letting us know that this patch causes a regression for > > you. I this happens, please first try and fix the regression. If that > > doesn't work please tell us what about the original patch is so wrong > > that it needs to be reverted. With a good explanation it could be that > > someone else has an idea. And whatever you do, put the original author, > > Eric in this case, on Cc. > > This commit was supposed just able to detect that a Nand is ONFI > > but instead it brake supported Nand > > So Eric can fix it but I've not time to debug this before 1 month > and the few platform that use ONFI are all busy > > So as the commit just allow to detect a band is ONFI can we revert it > > to keep non-ONFI Nand to work > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash and that worked fine unless I made a mistake in my tests which is always possible. I've just sent a patch which may fix your problem, please give it a try (only compile tested, not tested on real hardware). Eric _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-08 16:25 ` Eric Bénard @ 2013-05-08 16:36 ` Jean-Christophe PLAGNIOL-VILLARD 2013-05-15 6:46 ` Re[2]: " Alexander Shiyan 1 sibling, 0 replies; 9+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-08 16:36 UTC (permalink / raw) To: Eric Bénard; +Cc: barebox On 18:25 Wed 08 May , Eric Bénard wrote: > Hi Jean-Christophe, > > Le Wed, 8 May 2013 15:30:24 +0800, > Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> a écrit : > > > > > On May 8, 2013, at 1:11 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > >> this brake the nand support on at91sam9x5ek > > >> where we have a non compliant ONFI nand > > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > >> > > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > > > Thank you for letting us know that this patch causes a regression for > > > you. I this happens, please first try and fix the regression. If that > > > doesn't work please tell us what about the original patch is so wrong > > > that it needs to be reverted. With a good explanation it could be that > > > someone else has an idea. And whatever you do, put the original author, > > > Eric in this case, on Cc. > > > > This commit was supposed just able to detect that a Nand is ONFI > > > > but instead it brake supported Nand > > > > So Eric can fix it but I've not time to debug this before 1 month > > and the few platform that use ONFI are all busy > > > > So as the commit just allow to detect a band is ONFI can we revert it > > > > to keep non-ONFI Nand to work > > > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash > and that worked fine unless I made a mistake in my tests which is > always possible. > > I've just sent a patch which may fix your problem, please give it a try > (only compile tested, not tested on real hardware). ok will try > > Eric > _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re[2]: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-08 16:25 ` Eric Bénard 2013-05-08 16:36 ` Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-15 6:46 ` Alexander Shiyan 2013-05-15 6:59 ` Sascha Hauer 1 sibling, 1 reply; 9+ messages in thread From: Alexander Shiyan @ 2013-05-15 6:46 UTC (permalink / raw) To: Eric Bénard; +Cc: barebox > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > >> this brake the nand support on at91sam9x5ek > > >> where we have a non compliant ONFI nand > > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > >> > > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > > > Thank you for letting us know that this patch causes a regression for > > > you. I this happens, please first try and fix the regression. If that > > > doesn't work please tell us what about the original patch is so wrong > > > that it needs to be reverted. With a good explanation it could be that > > > someone else has an idea. And whatever you do, put the original author, > > > Eric in this case, on Cc. > > > > This commit was supposed just able to detect that a Nand is ONFI > > > > but instead it brake supported Nand > > > > So Eric can fix it but I've not time to debug this before 1 month > > and the few platform that use ONFI are all busy > > > > So as the commit just allow to detect a band is ONFI can we revert it > > > > to keep non-ONFI Nand to work > > > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash > and that worked fine unless I made a mistake in my tests which is > always possible. > > I've just sent a patch which may fix your problem, please give it a try > (only compile tested, not tested on real hardware). What is a patch to fix this? I've got some errors after update to latest master tree: Board: ConnectCore i.MX51 detected i.MX51 revision 3.0 mmu: Error: Can't request SDRAM region for ttb Error: Cannot request SDRAM region for stack Module Variant: i.MX515@600MHz, PHY, Accel (0x0b) Module HW Rev : 03 Module Serial : B111156789 mc13xxx-spi mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a] nand: ONFI flash detected ... nand: ONFI param page 0 valid nand: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), page size: 2048, OOB size: 64 BUG: failure at arch/arm/cpu/mmu.c:122/find_pte()! BUG! no stack data available --- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-15 6:46 ` Re[2]: " Alexander Shiyan @ 2013-05-15 6:59 ` Sascha Hauer 2013-05-15 7:08 ` Re[2]: " Alexander Shiyan 0 siblings, 1 reply; 9+ messages in thread From: Sascha Hauer @ 2013-05-15 6:59 UTC (permalink / raw) To: Alexander Shiyan; +Cc: barebox On Wed, May 15, 2013 at 10:46:13AM +0400, Alexander Shiyan wrote: > > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > >> this brake the nand support on at91sam9x5ek > > > >> where we have a non compliant ONFI nand > > > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > > >> > > > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > > > > > Thank you for letting us know that this patch causes a regression for > > > > you. I this happens, please first try and fix the regression. If that > > > > doesn't work please tell us what about the original patch is so wrong > > > > that it needs to be reverted. With a good explanation it could be that > > > > someone else has an idea. And whatever you do, put the original author, > > > > Eric in this case, on Cc. > > > > > > This commit was supposed just able to detect that a Nand is ONFI > > > > > > but instead it brake supported Nand > > > > > > So Eric can fix it but I've not time to debug this before 1 month > > > and the few platform that use ONFI are all busy > > > > > > So as the commit just allow to detect a band is ONFI can we revert it > > > > > > to keep non-ONFI Nand to work > > > > > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash > > and that worked fine unless I made a mistake in my tests which is > > always possible. > > > > I've just sent a patch which may fix your problem, please give it a try > > (only compile tested, not tested on real hardware). > > What is a patch to fix this? I've got some errors after update to latest master tree: This one: http://comments.gmane.org/gmane.comp.boot-loaders.barebox/8883 Eric, you mentioned you would send a final version of this patch. Could you do this? master is still broken. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re[2]: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-15 6:59 ` Sascha Hauer @ 2013-05-15 7:08 ` Alexander Shiyan 2013-05-15 7:50 ` Re[3]: " Alexander Shiyan 0 siblings, 1 reply; 9+ messages in thread From: Alexander Shiyan @ 2013-05-15 7:08 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox > > > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > >> this brake the nand support on at91sam9x5ek > > > > >> where we have a non compliant ONFI nand > > > > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > > > >> > > > > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > > > > > > > Thank you for letting us know that this patch causes a regression for > > > > > you. I this happens, please first try and fix the regression. If that > > > > > doesn't work please tell us what about the original patch is so wrong > > > > > that it needs to be reverted. With a good explanation it could be that > > > > > someone else has an idea. And whatever you do, put the original author, > > > > > Eric in this case, on Cc. > > > > > > > > This commit was supposed just able to detect that a Nand is ONFI > > > > > > > > but instead it brake supported Nand > > > > > > > > So Eric can fix it but I've not time to debug this before 1 month > > > > and the few platform that use ONFI are all busy > > > > > > > > So as the commit just allow to detect a band is ONFI can we revert it > > > > > > > > to keep non-ONFI Nand to work > > > > > > > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash > > > and that worked fine unless I made a mistake in my tests which is > > > always possible. > > > > > > I've just sent a patch which may fix your problem, please give it a try > > > (only compile tested, not tested on real hardware). > > > > What is a patch to fix this? I've got some errors after update to latest master tree: > > This one: > > http://comments.gmane.org/gmane.comp.boot-loaders.barebox/8883 > > Eric, you mentioned you would send a final version of this patch. Could > you do this? master is still broken. Oh, sorry. It was other error. SDRAM size detection for this board is not fully completed yet. --- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re[3]: [PATCH 1/1] Revert "nand_base: detect more ONFI flash" 2013-05-15 7:08 ` Re[2]: " Alexander Shiyan @ 2013-05-15 7:50 ` Alexander Shiyan 0 siblings, 0 replies; 9+ messages in thread From: Alexander Shiyan @ 2013-05-15 7:50 UTC (permalink / raw) To: Sascha Hauer, barebox > > > > > > On Tue, May 07, 2013 at 10:21:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > > >> this brake the nand support on at91sam9x5ek > > > > > >> where we have a non compliant ONFI nand > > > > > >> NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64 > > > > > >> > > > > > >> This reverts commit 4c2bdc8728016b3412523e3264651651fe752860. > > > > > > > > > > > > Thank you for letting us know that this patch causes a regression for > > > > > > you. I this happens, please first try and fix the regression. If that > > > > > > doesn't work please tell us what about the original patch is so wrong > > > > > > that it needs to be reverted. With a good explanation it could be that > > > > > > someone else has an idea. And whatever you do, put the original author, > > > > > > Eric in this case, on Cc. > > > > > > > > > > This commit was supposed just able to detect that a Nand is ONFI > > > > > > > > > > but instead it brake supported Nand > > > > > > > > > > So Eric can fix it but I've not time to debug this before 1 month > > > > > and the few platform that use ONFI are all busy > > > > > > > > > > So as the commit just allow to detect a band is ONFI can we revert it > > > > > > > > > > to keep non-ONFI Nand to work > > > > > > > > > IIRC, I tested this patch on some i.MX board with non ONFI NAND flash > > > > and that worked fine unless I made a mistake in my tests which is > > > > always possible. > > > > > > > > I've just sent a patch which may fix your problem, please give it a try > > > > (only compile tested, not tested on real hardware). > > > > > > What is a patch to fix this? I've got some errors after update to latest master tree: > > > > This one: > > > > http://comments.gmane.org/gmane.comp.boot-loaders.barebox/8883 > > > > Eric, you mentioned you would send a final version of this patch. Could > > you do this? master is still broken. > > Oh, sorry. It was other error. SDRAM size detection for this board is not > fully completed yet. I any case I have tested both my modules with this patch. One module contain chip with ONFI, second chip w/o ONFI. This is error of non-ONFI module without patch: mc13xxx-spi mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a] nand: NAND type unknown: ec,dc nand: No NAND device found (-19)! imx_nand imx_nand0: probe failed: No such device or address Then with patch: mc13xxx-spi mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a] nand: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit), page size: 2048, OOB size: 64 With ONFI chip: mc13xxx-spi mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a] nand: ONFI flash detected ... nand: ONFI param page 0 valid nand: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), page size: 2048, OOB size: 64 So, now both works fine. --- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-05-15 7:51 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-05-07 20:21 [PATCH 1/1] Revert "nand_base: detect more ONFI flash" Jean-Christophe PLAGNIOL-VILLARD 2013-05-08 5:11 ` Sascha Hauer 2013-05-08 7:30 ` Jean-Christophe PLAGNIOL-VILLARD 2013-05-08 16:25 ` Eric Bénard 2013-05-08 16:36 ` Jean-Christophe PLAGNIOL-VILLARD 2013-05-15 6:46 ` Re[2]: " Alexander Shiyan 2013-05-15 6:59 ` Sascha Hauer 2013-05-15 7:08 ` Re[2]: " Alexander Shiyan 2013-05-15 7:50 ` Re[3]: " Alexander Shiyan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox