mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Barbier, Renaud" <renaud.barbier@abaco.com>
To: Sascha Hauer <sha@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: RE: [PATCH 2/3] nand: add NXP IFC nand driver
Date: Tue, 10 Aug 2021 08:33:42 +0000	[thread overview]
Message-ID: <MN2PR16MB31353E5032A5C1D316AFA71191F79@MN2PR16MB3135.namprd16.prod.outlook.com> (raw)
In-Reply-To: <20210809191625.GB24834@pengutronix.de>

I first ported this driver in 2015. It was derived from U-boot (2015-10) commit cce573e and had a few updates over the years.


-----Original Message-----
From: Sascha Hauer <sha@pengutronix.de> 
Sent: 09 August 2021 20:16
To: Barbier, Renaud <renaud.barbier@abaco.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/3] nand: add NXP IFC nand driver



[**EXTERNAL SOURCE**]:Please verify the source before clicking link or opening attachment.

Hi Renaud,

On Mon, Aug 02, 2021 at 11:40:03AM +0100, Renaud Barbier wrote:
> Add the NXP IFC nand driver support. This driver can be used with the 
> NXP QorIQ cores.

Could you leave a few words here which base you used for the driver? Is it based on Linux or U-Boot, which version?

> +static void fsl_ifc_ctrl_init(void)
> +{
> +     struct fsl_ifc_ctrl *ctrl;
> +     struct device_node *np;
> +
> +     np = of_find_compatible_node(NULL, NULL, "fsl,ifc");
> +     if (!np)
> +             return;

Looks like this function can fail, it should return an error.

> +             while (!is_timeout(time_start, IFC_TIMEOUT_MS * MSECOND)) {
> +                     ifc_ctrl->nand_stat =
> +                             ifc_in32(ctrl->rregs + 
> + FSL_IFC_NAND_EVTER_STAT);
> +
> +                     if (!(ifc_ctrl->nand_stat & IFC_NAND_SRAM_INIT_EN))
> +                             return 0;
> +             }
> +             pr_err("fsl-ifc: Failed to Initialise SRAM\n");
> +             return 1;

It would be better to return an error code here and propagate that.

Sascha

--
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pengutronix.de%2F&amp;data=04%7C01%7Crenaud.barbier%40abaco.com%7C5542b21e348444c35e0908d95b6a2fd6%7Ce6f27451899d4d0db8fa88baafa551a7%7C0%7C0%7C637641333904496165%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=eBdLLjmiSrNN%2F2VJjk6sRWhCgnPKOZUpkzYkePKh%2Fuk%3D&amp;reserved=0  |
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


  reply	other threads:[~2021-08-10  8:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 10:40 [PATCH v2 0/3] " Renaud Barbier
2021-08-02 10:40 ` [PATCH 1/3] ARM: atomic.h: add 64-bit counter support Renaud Barbier
2021-08-09 11:01   ` Ahmad Fatoum
2021-08-02 10:40 ` [PATCH 2/3] nand: add NXP IFC nand driver Renaud Barbier
2021-08-09 19:16   ` Sascha Hauer
2021-08-10  8:33     ` Barbier, Renaud [this message]
2021-08-02 10:40 ` [PATCH 3/3] ls1046ardb: enable IFC NAND Renaud Barbier
2021-08-09 10:49   ` Ahmad Fatoum
2021-08-10 10:33     ` Barbier, Renaud
2021-08-13  8:16 [PATCH v3 0/3] NXP IFC nand driver Renaud Barbier
2021-08-13  8:16 ` [PATCH 2/3] nand: add " Renaud Barbier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR16MB31353E5032A5C1D316AFA71191F79@MN2PR16MB3135.namprd16.prod.outlook.com \
    --to=renaud.barbier@abaco.com \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox