[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160416110720.462822e6@bbrezillon>
Date: Sat, 16 Apr 2016 11:07:20 +0200
From: Boris Brezillon <boris.brezillon@...e-electrons.com>
To: Han Xu <han.xu@....com>
Cc: Roger Quadros <rogerq@...com>, Tony Lindgren <tony@...mide.com>,
Wenyou Yang <wenyou.yang@...el.com>,
Josh Wu <rainyfeeling@...look.com>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Richard Weinberger <richard@....at>,
linux-mtd@...ts.infradead.org,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Kamal Dasu <kdasu.kdev@...il.com>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
Stefan Agner <stefan@...er.ch>, linux-omap@...r.kernel.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Gregory CLEMENT <gregory.clement@...e-electrons.com>,
Jason Cooper <jason@...edaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Andrew Lunn <andrew@...n.ch>, Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
bcm-kernel-feedback-list@...adcom.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Chen-Yu Tsai <wens@...e.org>, linux-sunxi@...glegroups.com,
Zhou Wang <wangzhou1@...ilicon.com>,
Alex Smith <alex.smith@...tec.com>,
Harvey Hunt <harvey.hunt@...tec.com>
Subject: Re: [PATCH 06/12] mtd: nand: gpmi: rely on generic DT parsing done
in nand_scan_ident()
Hi Han,
On Fri, 1 Apr 2016 14:54:26 +0200
Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:
> The core now takes care of parsing generic DT properties in
> nand_scan_ident() when nand_set_flash_node() has been called.
> Rely on this initialization instead of calling of_get_nand_xxx()
> manually.
Can you review/test this patch? I'd like to have the whole series
merged in this release.
Thanks,
Boris
>
> Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> ---
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 8122c69..c6e8a1c 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -25,7 +25,6 @@
> #include <linux/mtd/partitions.h>
> #include <linux/of.h>
> #include <linux/of_device.h>
> -#include <linux/of_mtd.h>
> #include "gpmi-nand.h"
> #include "bch-regs.h"
>
> @@ -1914,16 +1913,6 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
> /* Set up swap_block_mark, must be set before the gpmi_set_geometry() */
> this->swap_block_mark = !GPMI_IS_MX23(this);
>
> - if (of_get_nand_on_flash_bbt(this->dev->of_node)) {
> - chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
> -
> - if (of_property_read_bool(this->dev->of_node,
> - "fsl,no-blockmark-swap"))
> - this->swap_block_mark = false;
> - }
> - dev_dbg(this->dev, "Blockmark swapping %sabled\n",
> - this->swap_block_mark ? "en" : "dis");
> -
> /*
> * Allocate a temporary DMA buffer for reading ID in the
> * nand_scan_ident().
> @@ -1938,6 +1927,16 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
> if (ret)
> goto err_out;
>
> + if (chip->bbt_options & NAND_BBT_USE_FLASH) {
> + chip->bbt_options |= NAND_BBT_NO_OOB;
> +
> + if (of_property_read_bool(this->dev->of_node,
> + "fsl,no-blockmark-swap"))
> + this->swap_block_mark = false;
> + }
> + dev_dbg(this->dev, "Blockmark swapping %sabled\n",
> + this->swap_block_mark ? "en" : "dis");
> +
> ret = gpmi_init_last(this);
> if (ret)
> goto err_out;
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Powered by blists - more mailing lists