RE: [PATCH 2/3] nand: add NXP IFC nand driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx> 
Sent: 09 August 2021 20:16
To: Barbier, Renaud <renaud.barbier@xxxxxxxxx>
Cc: barebox@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux