Message ID | 1415721691-14073-1-git-send-email-fabio.estevam@freescale.com |
---|---|
State | Accepted |
Commit | 41bed23b78bf79ee68dbdff88c0461271a61f893 |
Headers | show |
On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> mx28evk board has a socket for NAND flash that comes with no NAND flash
Wouldn't it make more sense to fix your board's devicetree/boardfile
to not load the gpmi driver?
On Tue, Nov 11, 2014 at 5:45 PM, Richard Weinberger <richard.weinberger@gmail.com> wrote: > On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam > <fabio.estevam@freescale.com> wrote: >> mx28evk board has a socket for NAND flash that comes with no NAND flash > > Wouldn't it make more sense to fix your board's devicetree/boardfile > to not load the gpmi driver? Then the people who populated the NAND flash in the socket would not be able to use the NAND driver. In my opinion, removing the error message would be better.
Am 11.11.2014 um 20:57 schrieb Fabio Estevam: > On Tue, Nov 11, 2014 at 5:45 PM, Richard Weinberger > <richard.weinberger@gmail.com> wrote: >> On Tue, Nov 11, 2014 at 5:01 PM, Fabio Estevam >> <fabio.estevam@freescale.com> wrote: >>> mx28evk board has a socket for NAND flash that comes with no NAND flash >> >> Wouldn't it make more sense to fix your board's devicetree/boardfile >> to not load the gpmi driver? > > Then the people who populated the NAND flash in the socket would not > be able to use the NAND driver. By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile for *your* board and not for all others. :-) Thanks, //richard
On Tue, Nov 11, 2014 at 6:00 PM, Richard Weinberger <richard@nod.at> wrote: > By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile > for *your* board and not for all others. :-) It's not my board. It is a development board. The board is arch/arm/boot/dts/imx28-evk.dts. This is a development board that comes with a NAND socket. It comes with no NAND flash populated. In this case on every boot we get the: gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 ,which isn't very helpful an this is what this patch tries to avoid. I don't think we should change the dts.
Am 11.11.2014 um 21:05 schrieb Fabio Estevam: > On Tue, Nov 11, 2014 at 6:00 PM, Richard Weinberger <richard@nod.at> wrote: > >> By fixing your devicetree/boardfile I meant fixing *your* devicetree/boardfile >> for *your* board and not for all others. :-) > > It's not my board. It is a development board. > > The board is arch/arm/boot/dts/imx28-evk.dts. This is a development > board that comes with a NAND socket. > > It comes with no NAND flash populated. In this case on every boot we get the: > > gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 > > ,which isn't very helpful an this is what this patch tries to avoid. > > I don't think we should change the dts. If the development board has by default no NAND, disable the driver in imx28-evk.dts file. You can leave a comment how to enable the driver if an user creates a new board based on this eval board with a NAND. Thanks, //richard
On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote: > If the development board has by default no NAND, disable the driver > in imx28-evk.dts file. Again, people are free to put a NAND into the socket and just use it. > You can leave a comment how to enable the driver if an user creates > a new board based on this eval board with a NAND. No, I don't think this is a good idea. BTW, I don't see any other nand driver that prints error on the probe error path like this one.
Am 11.11.2014 um 21:16 schrieb Fabio Estevam: > On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote: > >> If the development board has by default no NAND, disable the driver >> in imx28-evk.dts file. > > Again, people are free to put a NAND into the socket and just use it. If people change their board they are free to fix their dts. :) >> You can leave a comment how to enable the driver if an user creates >> a new board based on this eval board with a NAND. > > No, I don't think this is a good idea. > > BTW, I don't see any other nand driver that prints error on the probe > error path like this one. mpc5121_nfc.c for example does. Before every "goto error" in mpc5121_nfc_probe() it prints an error message. Thanks, //richard
On Tue, Nov 11, 2014 at 6:22 PM, Richard Weinberger <richard@nod.at> wrote: > Am 11.11.2014 um 21:16 schrieb Fabio Estevam: >> On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote: >> >>> If the development board has by default no NAND, disable the driver >>> in imx28-evk.dts file. >> >> Again, people are free to put a NAND into the socket and just use it. > > If people change their board they are free to fix their dts. :) Then in this case I need to remove PCI dts nodes as well, because my dev boards do not come with a PCI device attached to it from the factory ;-) At least PCI driver does not complain about it on every boot ;-)
Am 11.11.2014 um 21:28 schrieb Fabio Estevam: > On Tue, Nov 11, 2014 at 6:22 PM, Richard Weinberger <richard@nod.at> wrote: >> Am 11.11.2014 um 21:16 schrieb Fabio Estevam: >>> On Tue, Nov 11, 2014 at 6:10 PM, Richard Weinberger <richard@nod.at> wrote: >>> >>>> If the development board has by default no NAND, disable the driver >>>> in imx28-evk.dts file. >>> >>> Again, people are free to put a NAND into the socket and just use it. >> >> If people change their board they are free to fix their dts. :) > > Then in this case I need to remove PCI dts nodes as well, because my > dev boards do not come with a PCI device attached to it from the > factory ;-) > > At least PCI driver does not complain about it on every boot ;-) Maybe this is why nobody fixed the dts so far? ;-) Thanks, //richard
On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote: > BTW, I don't see any other nand driver that prints error on the probe > error path like this one. You're probably still going to see failure prints like nand: No NAND device found in nand_scan_ident(), right? Or does driver probe fail earlier than that somehow? In general, I don't think you can expect non-discoverable hardware types not to complain at all when you falsely declare them as "present" in the device tree. If this is really the only thing being printed though, I can apply the patch. It's not worth too much more discussion anyway, IMO. (BTW, one thing you have going for you; you *do* print something when you successfully probe. The absence of such a message in your log tells you almost as much as the failure print you're trying to remove does.) Brian
On Wed, Nov 26, 2014 at 1:18 AM, Brian Norris <computersforpeace@gmail.com> wrote: > On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote: >> BTW, I don't see any other nand driver that prints error on the probe >> error path like this one. > > You're probably still going to see failure prints like > > nand: No NAND device found > > in nand_scan_ident(), right? Or does driver probe fail earlier than that > somehow? Yes, this is what I get currently: [ 1.645433] nand: No NAND device found [ 1.650372] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 In my opinion the "No NAND device found" is enough. Thanks
Am 26.11.2014 um 12:44 schrieb Fabio Estevam: > On Wed, Nov 26, 2014 at 1:18 AM, Brian Norris > <computersforpeace@gmail.com> wrote: >> On Tue, Nov 11, 2014 at 06:16:29PM -0200, Fabio Estevam wrote: >>> BTW, I don't see any other nand driver that prints error on the probe >>> error path like this one. >> >> You're probably still going to see failure prints like >> >> nand: No NAND device found >> >> in nand_scan_ident(), right? Or does driver probe fail earlier than that >> somehow? > > Yes, this is what I get currently: > > [ 1.645433] nand: No NAND device found > [ 1.650372] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 > > In my opinion the "No NAND device found" is enough. If we remove the said log message and one really has a NAND installed which fails to probe will he notice that and get the correct error code printed? If yes, the removal won't hurt. My point is that having non-existing hardware in the device does not make much sense. Lot's of DTs are very generic and carry a lot of unused stuff with them, but this is not a good practice as DTs should describe the actual hardware and not all possible board variants. Thanks, //richard
On Tue, Nov 11, 2014 at 02:01:31PM -0200, Fabio Estevam wrote: > mx28evk board has a socket for NAND flash that comes with no NAND flash > populated, and then we get this message on every boot: > > [ 1.657603] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 > > ,which is not very helpful, so get rid of this error message. > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Enough pointless discussion has been had. There's enough other context for most errors, I think. Applied to l2-mtd.git/next. Brian
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 959cb9b..1ecf0e3 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -1828,7 +1828,6 @@ static int gpmi_nand_probe(struct platform_device *pdev) exit_nfc_init: release_resources(this); exit_acquire_resources: - dev_err(this->dev, "driver registration failed: %d\n", ret); return ret; }
mx28evk board has a socket for NAND flash that comes with no NAND flash populated, and then we get this message on every boot: [ 1.657603] gpmi-nand 8000c000.gpmi-nand: driver registration failed: -19 ,which is not very helpful, so get rid of this error message. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 - 1 file changed, 1 deletion(-)