* Re: [PATCH 0/2] New NAND chip IDs [not found] <cover.1438093758.git.hramrach@gmail.com> @ 2015-07-28 14:49 ` Hans de Goede 2015-07-28 15:10 ` Boris Brezillon 2015-07-28 15:19 ` Boris Brezillon 0 siblings, 2 replies; 7+ messages in thread From: Hans de Goede @ 2015-07-28 14:49 UTC (permalink / raw) To: Michal Suchanek, David Woodhouse, Brian Norris, Boris BREZILLON, Petros Angelatos, linux-mtd, linux-kernel Hi, On 07/28/2015 04:29 PM, Michal Suchanek wrote: > Hello, > > the NAND chips on Cubietech boards are not known to Linux. > > I used Petros Angelatos' patch from sunxi experimental tree for one chip and > added another chip. > > I hope it's ok to send both patches to avoid merge conflict. I do not think that these patches are a good idea, this will lead to an ever growing manual maintained list of ids, and that is not maintainable IMHO. For Samsung chips we only need the ecc strength and size the rest is already detected on the fly, and I've a patch in my personal tree to get the ecc strengt and size from the nand without needing to have an entry per chip: https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf This is IMHO a much better solution. I've a bunch of nand fixes / cleanups as a result of doing some work on sunxi nand support. I'll try to submit these upstream soon. Regards, Hans ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 14:49 ` [PATCH 0/2] New NAND chip IDs Hans de Goede @ 2015-07-28 15:10 ` Boris Brezillon 2015-07-28 15:13 ` Boris Brezillon 2015-07-28 15:16 ` Hans de Goede 2015-07-28 15:19 ` Boris Brezillon 1 sibling, 2 replies; 7+ messages in thread From: Boris Brezillon @ 2015-07-28 15:10 UTC (permalink / raw) To: Hans de Goede Cc: Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel Hi Hans, On Tue, 28 Jul 2015 16:49:58 +0200 Hans de Goede <hdegoede@redhat.com> wrote: > Hi, > > On 07/28/2015 04:29 PM, Michal Suchanek wrote: > > Hello, > > > > the NAND chips on Cubietech boards are not known to Linux. > > > > I used Petros Angelatos' patch from sunxi experimental tree for one chip and > > added another chip. > > > > I hope it's ok to send both patches to avoid merge conflict. > > I do not think that these patches are a good idea, this will lead to an > ever growing manual maintained list of ids, and that is not maintainable > IMHO. > > For Samsung chips we only need the ecc strength and size the rest is already > detected on the fly, and I've a patch in my personal tree to get the > ecc strengt and size from the nand without needing to have an entry per > chip: > > https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf > > This is IMHO a much better solution. Hm, IMHO it's not: the nand ids table also store information about supported NAND timings, and maybe we'll have to add new things (like the read-retry implementation to use for a specific chip). Moreover, this information can be automatically deduced from the NAND id, and we try to keep discoverable info out of the DT. I agree that keeping a list of full IDs is not ideal, but it's far better than having to duplicate this information in all the board DTs using a given NAND chip. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 15:10 ` Boris Brezillon @ 2015-07-28 15:13 ` Boris Brezillon 2015-07-28 15:16 ` Hans de Goede 1 sibling, 0 replies; 7+ messages in thread From: Boris Brezillon @ 2015-07-28 15:13 UTC (permalink / raw) To: Boris Brezillon Cc: Hans de Goede, Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel On Tue, 28 Jul 2015 17:10:13 +0200 Boris Brezillon <boris.brezillon@free-electrons.com> wrote: > Hi Hans, > > On Tue, 28 Jul 2015 16:49:58 +0200 > Hans de Goede <hdegoede@redhat.com> wrote: > > > Hi, > > > > On 07/28/2015 04:29 PM, Michal Suchanek wrote: > > > Hello, > > > > > > the NAND chips on Cubietech boards are not known to Linux. > > > > > > I used Petros Angelatos' patch from sunxi experimental tree for one chip and > > > added another chip. > > > > > > I hope it's ok to send both patches to avoid merge conflict. > > > > I do not think that these patches are a good idea, this will lead to an > > ever growing manual maintained list of ids, and that is not maintainable > > IMHO. > > > > For Samsung chips we only need the ecc strength and size the rest is already > > detected on the fly, and I've a patch in my personal tree to get the > > ecc strengt and size from the nand without needing to have an entry per > > chip: > > > > https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf > > > > This is IMHO a much better solution. > > Hm, IMHO it's not: the nand ids table also store information about > supported NAND timings, and maybe we'll have to add new things (like > the read-retry implementation to use for a specific chip). Oops, sorry, I didn't look at the patch before answering, and I thought you were suggesting to put the information inside the DT. Forget my previous answer. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 15:10 ` Boris Brezillon 2015-07-28 15:13 ` Boris Brezillon @ 2015-07-28 15:16 ` Hans de Goede 1 sibling, 0 replies; 7+ messages in thread From: Hans de Goede @ 2015-07-28 15:16 UTC (permalink / raw) To: Boris Brezillon Cc: Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel Hi, On 07/28/2015 05:10 PM, Boris Brezillon wrote: > Hi Hans, > > On Tue, 28 Jul 2015 16:49:58 +0200 > Hans de Goede <hdegoede@redhat.com> wrote: > >> Hi, >> >> On 07/28/2015 04:29 PM, Michal Suchanek wrote: >>> Hello, >>> >>> the NAND chips on Cubietech boards are not known to Linux. >>> >>> I used Petros Angelatos' patch from sunxi experimental tree for one chip and >>> added another chip. >>> >>> I hope it's ok to send both patches to avoid merge conflict. >> >> I do not think that these patches are a good idea, this will lead to an >> ever growing manual maintained list of ids, and that is not maintainable >> IMHO. >> >> For Samsung chips we only need the ecc strength and size the rest is already >> detected on the fly, and I've a patch in my personal tree to get the >> ecc strengt and size from the nand without needing to have an entry per >> chip: >> >> https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf >> >> This is IMHO a much better solution. > > Hm, IMHO it's not: the nand ids table also store information about > supported NAND timings, and maybe we'll have to add new things (like > the read-retry implementation to use for a specific chip). > > Moreover, this information can be automatically deduced from the NAND > id, and we try to keep discoverable info out of the DT. Note I'm not advocating to add stuff to DT, I'm advocating to not add entries to the ID table unless it gives us something which we cannot get another way. The current samsung nand entries in the table only add ecc strength / size info over what is already determined by the generic nand scan code, my patch adds support to get ecc strength / size for samsung nands to the generic code, this allows at least to remove the current samsung nand lines, I believe. Regards, Hans ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 14:49 ` [PATCH 0/2] New NAND chip IDs Hans de Goede 2015-07-28 15:10 ` Boris Brezillon @ 2015-07-28 15:19 ` Boris Brezillon 2015-07-28 15:30 ` Boris Brezillon 1 sibling, 1 reply; 7+ messages in thread From: Boris Brezillon @ 2015-07-28 15:19 UTC (permalink / raw) To: Hans de Goede Cc: Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel Hi Hans, Here is a more appropriate answer ;-) On Tue, 28 Jul 2015 16:49:58 +0200 Hans de Goede <hdegoede@redhat.com> wrote: > Hi, > > On 07/28/2015 04:29 PM, Michal Suchanek wrote: > > Hello, > > > > the NAND chips on Cubietech boards are not known to Linux. > > > > I used Petros Angelatos' patch from sunxi experimental tree for one chip and > > added another chip. > > > > I hope it's ok to send both patches to avoid merge conflict. > > I do not think that these patches are a good idea, this will lead to an > ever growing manual maintained list of ids, and that is not maintainable > IMHO. > > For Samsung chips we only need the ecc strength and size the rest is already > detected on the fly, and I've a patch in my personal tree to get the > ecc strengt and size from the nand without needing to have an entry per > chip: > > https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf > > This is IMHO a much better solution. Yes, indeed, this is a better approach, but AFAIR, not all Samsung chips use this layout to expose the ECC strength/size info, and I guess this is why this method is not used to retrieve the ECC requirements. But I think we could avoid this full ids list by putting some detection code into vendor specific files, this way we could handle chips by families instead of describing all of them. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 15:19 ` Boris Brezillon @ 2015-07-28 15:30 ` Boris Brezillon 2015-07-28 15:32 ` Hans de Goede 0 siblings, 1 reply; 7+ messages in thread From: Boris Brezillon @ 2015-07-28 15:30 UTC (permalink / raw) To: Hans de Goede Cc: Boris Brezillon, Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel On Tue, 28 Jul 2015 17:19:40 +0200 Boris Brezillon <boris.brezillon@free-electrons.com> wrote: > Hi Hans, > > Here is a more appropriate answer ;-) > > On Tue, 28 Jul 2015 16:49:58 +0200 > Hans de Goede <hdegoede@redhat.com> wrote: > > > Hi, > > > > On 07/28/2015 04:29 PM, Michal Suchanek wrote: > > > Hello, > > > > > > the NAND chips on Cubietech boards are not known to Linux. > > > > > > I used Petros Angelatos' patch from sunxi experimental tree for one chip and > > > added another chip. > > > > > > I hope it's ok to send both patches to avoid merge conflict. > > > > I do not think that these patches are a good idea, this will lead to an > > ever growing manual maintained list of ids, and that is not maintainable > > IMHO. > > > > For Samsung chips we only need the ecc strength and size the rest is already > > detected on the fly, and I've a patch in my personal tree to get the > > ecc strengt and size from the nand without needing to have an entry per > > chip: > > > > https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf > > > > This is IMHO a much better solution. > > Yes, indeed, this is a better approach, but AFAIR, not all Samsung > chips use this layout to expose the ECC strength/size info, and I > guess this is why this method is not used to retrieve the ECC > requirements. At least this was true for Hynix chips (see this thread [1]). [1]http://comments.gmane.org/gmane.linux.drivers.mtd/50252 -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] New NAND chip IDs 2015-07-28 15:30 ` Boris Brezillon @ 2015-07-28 15:32 ` Hans de Goede 0 siblings, 0 replies; 7+ messages in thread From: Hans de Goede @ 2015-07-28 15:32 UTC (permalink / raw) To: Boris Brezillon Cc: Michal Suchanek, David Woodhouse, Brian Norris, Petros Angelatos, linux-mtd, linux-kernel Hi, On 07/28/2015 05:30 PM, Boris Brezillon wrote: > On Tue, 28 Jul 2015 17:19:40 +0200 > Boris Brezillon <boris.brezillon@free-electrons.com> wrote: > >> Hi Hans, >> >> Here is a more appropriate answer ;-) >> >> On Tue, 28 Jul 2015 16:49:58 +0200 >> Hans de Goede <hdegoede@redhat.com> wrote: >> >>> Hi, >>> >>> On 07/28/2015 04:29 PM, Michal Suchanek wrote: >>>> Hello, >>>> >>>> the NAND chips on Cubietech boards are not known to Linux. >>>> >>>> I used Petros Angelatos' patch from sunxi experimental tree for one chip and >>>> added another chip. >>>> >>>> I hope it's ok to send both patches to avoid merge conflict. >>> >>> I do not think that these patches are a good idea, this will lead to an >>> ever growing manual maintained list of ids, and that is not maintainable >>> IMHO. >>> >>> For Samsung chips we only need the ecc strength and size the rest is already >>> detected on the fly, and I've a patch in my personal tree to get the >>> ecc strengt and size from the nand without needing to have an entry per >>> chip: >>> >>> https://github.com/jwrdegoede/linux-sunxi/commit/53b335d33232753b7aa70298009158baadf5a6bf >>> >>> This is IMHO a much better solution. >> >> Yes, indeed, this is a better approach, but AFAIR, not all Samsung >> chips use this layout to expose the ECC strength/size info, and I >> guess this is why this method is not used to retrieve the ECC >> requirements. > > At least this was true for Hynix chips (see this thread [1]). > > [1]http://comments.gmane.org/gmane.linux.drivers.mtd/50252 Correct, I tried to write a similar patch and come to the same conclusion, there is no way to reliable detect ecc strength / size in a generic manner for hynix ic-s, for samsung ic-s the bits used seem to be consistent for all samsung nands though. See the list of datasheets I checked in the commit msg. Regards, Hans > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-28 15:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1438093758.git.hramrach@gmail.com>
2015-07-28 14:49 ` [PATCH 0/2] New NAND chip IDs Hans de Goede
2015-07-28 15:10 ` Boris Brezillon
2015-07-28 15:13 ` Boris Brezillon
2015-07-28 15:16 ` Hans de Goede
2015-07-28 15:19 ` Boris Brezillon
2015-07-28 15:30 ` Boris Brezillon
2015-07-28 15:32 ` Hans de Goede
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).