Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2023-01-05 Thread Miquel Raynal
ma...@denx.de wrote on Thu, 5 Jan 2023 15:51:10 +0100: > On 1/5/23 13:47, Francesco Dolcini wrote: > > Hello Miquel, > > Hi, > > [...] > > >> Let's move forward with this. Let's assume my fears are baseless. We > >> might consider the situation where someone tries to hide the partitions > >

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2023-01-05 Thread Marek Vasut
On 1/5/23 13:47, Francesco Dolcini wrote: Hello Miquel, Hi, [...] Let's move forward with this. Let's assume my fears are baseless. We might consider the situation where someone tries to hide the partitions by setting #size-cell to 0 even wronger and too unlikely. Hopefully we will not break

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2023-01-05 Thread Francesco Dolcini
Hello Miquel, On Thu, Jan 05, 2023 at 12:33:34PM +0100, Miquel Raynal wrote: > miquel.ray...@bootlin.com wrote on Mon, 2 Jan 2023 10:40:04 +0100: > > france...@dolcini.it wrote on Fri, 16 Dec 2022 17:30:18 +0100: > > > On Fri, Dec 16, 2022 at 04:35:01PM +0100, Miquel Raynal wrote: > > > > ma...@

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2023-01-05 Thread Miquel Raynal
Hi Francesco, miquel.ray...@bootlin.com wrote on Mon, 2 Jan 2023 10:40:04 +0100: > Hi Francesco, > > france...@dolcini.it wrote on Fri, 16 Dec 2022 17:30:18 +0100: > > > On Fri, Dec 16, 2022 at 04:35:01PM +0100, Miquel Raynal wrote: > > > ma...@denx.de wrote on Fri, 16 Dec 2022 15:32:28 +0100

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2023-01-02 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Fri, 16 Dec 2022 17:30:18 +0100: > On Fri, Dec 16, 2022 at 04:35:01PM +0100, Miquel Raynal wrote: > > ma...@denx.de wrote on Fri, 16 Dec 2022 15:32:28 +0100: > > > The second part of the message, as far as I understand it, is > > > "ignore problems th

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Francesco Dolcini
On Fri, Dec 16, 2022 at 04:35:01PM +0100, Miquel Raynal wrote: > ma...@denx.de wrote on Fri, 16 Dec 2022 15:32:28 +0100: > > The second part of the message, as far as I understand it, is > > "ignore problems this will cause to users of boards we do not know > > about, let them run into unbootable s

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Fri, 16 Dec 2022 15:32:28 +0100: > On 12/16/22 14:37, Miquel Raynal wrote: > > Hi, > > [...] > > >>> What? > >> > >> Let me rephrase, I was not clear enough. > >> > >>> Since when my proposal is breaking boards? My proposal leads to a > >>> situation where:

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Marek Vasut
On 12/16/22 14:37, Miquel Raynal wrote: Hi, [...] What? Let me rephrase, I was not clear enough. Since when my proposal is breaking boards? My proposal leads to a situation where: - If you have a board that has an inconsistent description but worked, it will still work. - If you have a

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Fri, 16 Dec 2022 13:37:31 +0100: > On Fri, Dec 16, 2022 at 12:01:55PM +0100, Miquel Raynal wrote: > > ma...@denx.de wrote on Fri, 16 Dec 2022 11:46:18 +0100: > > > On 12/16/22 08:45, Francesco Dolcini wrote: > > > > On Thu, Dec 15, 2022 at 08:16:04A

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Francesco Dolcini
On Fri, Dec 16, 2022 at 12:01:55PM +0100, Miquel Raynal wrote: > ma...@denx.de wrote on Fri, 16 Dec 2022 11:46:18 +0100: > > On 12/16/22 08:45, Francesco Dolcini wrote: > > > On Thu, Dec 15, 2022 at 08:16:04AM +0100, Miquel Raynal wrote: > > >> I am still against piggy hacks in the generic ofpart

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Miquel Raynal
ma...@denx.de wrote on Fri, 16 Dec 2022 11:46:18 +0100: > On 12/16/22 08:45, Francesco Dolcini wrote: > > Hello Marek and Miquel, > > Hi, > > > On Thu, Dec 15, 2022 at 08:16:04AM +0100, Miquel Raynal wrote: > >> So my first first idea was to avoid using the broken "fixup mtdparts" > >> fun

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-16 Thread Marek Vasut
On 12/16/22 08:45, Francesco Dolcini wrote: Hello Marek and Miquel, Hi, On Thu, Dec 15, 2022 at 08:16:04AM +0100, Miquel Raynal wrote: So my first first idea was to avoid using the broken "fixup mtdparts" function in U-Boot and I am still convinced this is what we should do in priority. Th

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-15 Thread Francesco Dolcini
On Fri, Dec 16, 2022 at 01:36:03AM +0100, Marek Vasut wrote: > On 12/15/22 09:04, Miquel Raynal wrote: > > > > That would fix all cases and only have an impact on the affected > > > > boards. > > > > > > Sadly, it does only fix the known cases, not the unknown cases > > > like downstream forks whi

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-15 Thread Francesco Dolcini
Hello Marek and Miquel, On Thu, Dec 15, 2022 at 08:16:04AM +0100, Miquel Raynal wrote: > So my first first idea was to avoid using the broken "fixup mtdparts" > function in U-Boot and I am still convinced this is what we should do > in priority. This is something that was already discussed, but I

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-15 Thread Marek Vasut
On 12/15/22 09:04, Miquel Raynal wrote: Hi Marek, Hi, [...] Yesterday while talking about an ACPI mis-description which needed fixing, I realized fixing up what the firmware provides to Linux should preferably be handled as early as possible. So my first first idea was to avoid using the bro

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-15 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Thu, 15 Dec 2022 08:45:33 +0100: > On 12/15/22 08:16, Miquel Raynal wrote: > > Hi Marek & Francesco, > > Hi, > > > ma...@denx.de wrote on Mon, 5 Dec 2022 17:25:11 +0100: > > > >> On 12/5/22 14:49, Miquel Raynal wrote: > >>> Hi Francesco, > >> > >> Hi, >

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-14 Thread Marek Vasut
On 12/15/22 08:16, Miquel Raynal wrote: Hi Marek & Francesco, Hi, ma...@denx.de wrote on Mon, 5 Dec 2022 17:25:11 +0100: On 12/5/22 14:49, Miquel Raynal wrote: Hi Francesco, Hi, france...@dolcini.it wrote on Mon, 5 Dec 2022 12:26:44 +0100: On Fri, Dec 02, 2022 at 06:08:22PM +0100,

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-14 Thread Miquel Raynal
Hi Marek & Francesco, ma...@denx.de wrote on Mon, 5 Dec 2022 17:25:11 +0100: > On 12/5/22 14:49, Miquel Raynal wrote: > > Hi Francesco, > > Hi, > > > france...@dolcini.it wrote on Mon, 5 Dec 2022 12:26:44 +0100: > > > >> On Fri, Dec 02, 2022 at 06:08:22PM +0100, Marek Vasut wrote: > >>>

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-05 Thread Marek Vasut
On 12/5/22 14:49, Miquel Raynal wrote: Hi Francesco, Hi, france...@dolcini.it wrote on Mon, 5 Dec 2022 12:26:44 +0100: On Fri, Dec 02, 2022 at 06:08:22PM +0100, Marek Vasut wrote: But here I would say this is a firmware bug and it might have to be handled like a firmware bug, i.e. with fix

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-05 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Mon, 5 Dec 2022 12:30:16 +0100: > Hello Miquel > > On Fri, Dec 02, 2022 at 06:20:02PM +0100, Francesco Dolcini wrote: > > On Fri, Dec 02, 2022 at 05:42:55PM +0100, Miquel Raynal wrote: > > > Please also do it with the NAND chip described. If, when th

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-05 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Mon, 5 Dec 2022 12:26:44 +0100: > On Fri, Dec 02, 2022 at 06:08:22PM +0100, Marek Vasut wrote: > > But here I would say this is a firmware bug and it might have to be handled > > like a firmware bug, i.e. with fixup in the partition parser. I seem to be

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-05 Thread Francesco Dolcini
Hello Miquel On Fri, Dec 02, 2022 at 06:20:02PM +0100, Francesco Dolcini wrote: > On Fri, Dec 02, 2022 at 05:42:55PM +0100, Miquel Raynal wrote: > > Please also do it with the NAND chip described. If, when the NAND chip > > is described U-Boot tries to create partitions in the controller node, > >

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-05 Thread Francesco Dolcini
On Fri, Dec 02, 2022 at 06:08:22PM +0100, Marek Vasut wrote: > But here I would say this is a firmware bug and it might have to be handled > like a firmware bug, i.e. with fixup in the partition parser. I seem to be > changing my opinion here again. I was thinking at this over the weekend, and I c

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-04 Thread Marek Vasut
On 12/4/22 13:59, Thorsten Leemhuis wrote: On 04.12.22 13:50, Marek Vasut wrote: On 12/2/22 16:56, Thorsten Leemhuis wrote: On 02.12.22 15:31, Marek Vasut wrote: On 12/2/22 15:05, Miquel Raynal wrote: [...] 3. To fix the current situation: Immediately revert commit (and prevent it from

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-04 Thread Thorsten Leemhuis
On 04.12.22 13:50, Marek Vasut wrote: > On 12/2/22 16:56, Thorsten Leemhuis wrote: >> On 02.12.22 15:31, Marek Vasut wrote: >>> On 12/2/22 15:05, Miquel Raynal wrote: >>> [...] 3. To fix the current situation: Immediately revert commit (and prevent it from being backported):    

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-04 Thread Marek Vasut
On 12/2/22 16:56, Thorsten Leemhuis wrote: On 02.12.22 15:31, Marek Vasut wrote: On 12/2/22 15:05, Miquel Raynal wrote: [...] 3. To fix the current situation:     Immediately revert commit (and prevent it from being backported):     753395ea1e45 ("ARM: dts: imx7: Fix NAND controller size-cell

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Thorsten Leemhuis
On 02.12.22 15:31, Marek Vasut wrote: > On 12/2/22 15:05, Miquel Raynal wrote: > [...] >> 3. To fix the current situation: >>     Immediately revert commit (and prevent it from being backported): >>     753395ea1e45 ("ARM: dts: imx7: Fix NAND controller size-cells") >>     This way your own boot fl

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Francesco Dolcini
On Fri, Dec 02, 2022 at 05:42:55PM +0100, Miquel Raynal wrote: > Please also do it with the NAND chip described. If, when the NAND chip > is described U-Boot tries to create partitions in the controller node, > then the situation is even worse than I thought. But I believe It's like that for U-Boo

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Marek Vasut
On 12/2/22 17:57, Miquel Raynal wrote: Hi Marek, Hi, On 12/2/22 17:42, Miquel Raynal wrote: Hi Marek, Hi, [...] However, it should not be empty, at the very least a reg property should indicate on which CS it is wired, as expected there: https://git.kernel.org/pub/scm/linux/kernel/git/m

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Fri, 2 Dec 2022 17:45:37 +0100: > On Fri, Dec 02, 2022 at 05:17:59PM +0100, Marek Vasut wrote: > > On 12/2/22 16:49, Miquel Raynal wrote: > > > , not the NAND controller node. I hope this > > > is correctly supported in U-Boot though. So if there is a

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Fri, 2 Dec 2022 17:52:05 +0100: > On 12/2/22 17:42, Miquel Raynal wrote: > > Hi Marek, > > Hi, > > [...] > > >>> However, it should not be empty, at the very least a reg property > >>> should indicate on which CS it is wired, as expected there: > >>> https://

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Marek Vasut
On 12/2/22 17:42, Miquel Raynal wrote: Hi Marek, Hi, [...] However, it should not be empty, at the very least a reg property should indicate on which CS it is wired, as expected there: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/tree/Documentation/devicetree/bindings/mtd/na

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Francesco Dolcini
On Fri, Dec 02, 2022 at 05:17:59PM +0100, Marek Vasut wrote: > On 12/2/22 16:49, Miquel Raynal wrote: > > , not the NAND controller node. I hope this > > is correctly supported in U-Boot though. So if there is a NAND chip > > subnode, I suppose U-Boot would try to create the partitions that are > >

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Fri, 2 Dec 2022 17:17:59 +0100: > On 12/2/22 16:49, Miquel Raynal wrote: > > Hi Marek, > > Hi, > > >> On 12/2/22 16:00, Miquel Raynal wrote: > >>> Hi Marek, > >> > >> Hi, > >> > >>> ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: > >>> O

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Marek Vasut
On 12/2/22 16:49, Miquel Raynal wrote: Hi Marek, Hi, On 12/2/22 16:00, Miquel Raynal wrote: Hi Marek, Hi, ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: On 12/2/22 15:05, Miquel Raynal wrote: Hi Francesco, Hi, [...] I still strongly disagree with the initial proposal

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
miquel.ray...@bootlin.com wrote on Fri, 2 Dec 2022 16:49:04 +0100: > Hi Marek, > > ma...@denx.de wrote on Fri, 2 Dec 2022 16:23:29 +0100: > > > On 12/2/22 16:00, Miquel Raynal wrote: > > > Hi Marek, > > > > Hi, > > > > > ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: > > >

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Fri, 2 Dec 2022 16:23:29 +0100: > On 12/2/22 16:00, Miquel Raynal wrote: > > Hi Marek, > > Hi, > > > ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: > > > >> On 12/2/22 15:05, Miquel Raynal wrote: > >>> Hi Francesco, > >> > >> Hi, > >> > >> [...]

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Marek Vasut
On 12/2/22 16:00, Miquel Raynal wrote: Hi Marek, Hi, ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: On 12/2/22 15:05, Miquel Raynal wrote: Hi Francesco, Hi, [...] I still strongly disagree with the initial proposal but what I think we can do is: 1. To prevent future breakages

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Marek, ma...@denx.de wrote on Fri, 2 Dec 2022 15:31:40 +0100: > On 12/2/22 15:05, Miquel Raynal wrote: > > Hi Francesco, > > Hi, > > [...] > > > I still strongly disagree with the initial proposal but what I think we > > can do is: > > > > 1. To prevent future breakages: > >Fix fdt_f

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Marek Vasut
On 12/2/22 15:05, Miquel Raynal wrote: Hi Francesco, Hi, [...] I still strongly disagree with the initial proposal but what I think we can do is: 1. To prevent future breakages: Fix fdt_fixup_mtdparts() in u-boot. This way newer U-Boot + any kernel should work. 2. To help tracking do

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Miquel Raynal
Hi Francesco, france...@dolcini.it wrote on Fri, 2 Dec 2022 12:23:37 +0100: > + u-boot list > > On Fri, Dec 02, 2022 at 11:53:27AM +0100, Miquel Raynal wrote: > > france...@dolcini.it wrote on Fri, 2 Dec 2022 11:24:29 +0100: > > > On Fri, Dec 02, 2022 at 11:12:43AM +0100, Francesco Dolcini wro

Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0

2022-12-02 Thread Francesco Dolcini
+ u-boot list On Fri, Dec 02, 2022 at 11:53:27AM +0100, Miquel Raynal wrote: > france...@dolcini.it wrote on Fri, 2 Dec 2022 11:24:29 +0100: > > On Fri, Dec 02, 2022 at 11:12:43AM +0100, Francesco Dolcini wrote: > > > On Fri, Dec 02, 2022 at 10:14:18AM +0100, Miquel Raynal wrote: > > > > france.