public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH 1/2] mtd: physmap_of: Move custom initialization
Date: Fri, 12 Oct 2018 11:20:54 +0200	[thread overview]
Message-ID: <20181012112054.2c74b9c7@bbrezillon> (raw)
In-Reply-To: <20181011185326.1371-1-linus.walleij@linaro.org>

Hi Linus,

On Thu, 11 Oct 2018 20:53:25 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:

> In order to be able to assign custom complex mappings
> to the physmap_of plugin for Gemini, move the initialization
> so that the simple map is initialized before we enter the
> platform-specific functions so the latter can override
> them.

I forgot to Cc you but I'm currently reworking the physmap driver to
merge the physmap_of logic in it [1]. I'll probably ask you to rebase
this patchset on top of mtd/next once [1] is applied.

Sorry for the inconvenience.

Boris

[1]https://patchwork.ozlabs.org/cover/980800/

> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/mtd/maps/physmap_of_core.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mtd/maps/physmap_of_core.c b/drivers/mtd/maps/physmap_of_core.c
> index 4129535b8e46..74ad753265f3 100644
> --- a/drivers/mtd/maps/physmap_of_core.c
> +++ b/drivers/mtd/maps/physmap_of_core.c
> @@ -239,13 +239,6 @@ static int of_flash_probe(struct platform_device *dev)
>  		else if (of_property_read_bool(dp, "little-endian"))
>  			info->list[i].map.swap = CFI_LITTLE_ENDIAN;
>  
> -		err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
> -		if (err)
> -			goto err_out;
> -		err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
> -		if (err)
> -			goto err_out;
> -
>  		err = -ENOMEM;
>  		info->list[i].map.virt = ioremap(info->list[i].map.phys,
>  						 info->list[i].map.size);
> @@ -257,6 +250,14 @@ static int of_flash_probe(struct platform_device *dev)
>  
>  		simple_map_init(&info->list[i].map);
>  
> +		/* Variants can override map accessors */
> +		err = of_flash_probe_gemini(dev, dp, &info->list[i].map);
> +		if (err)
> +			goto err_out;
> +		err = of_flash_probe_versatile(dev, dp, &info->list[i].map);
> +		if (err)
> +			goto err_out;
> +
>  		/*
>  		 * On some platforms (e.g. MPC5200) a direct 1:1 mapping
>  		 * may cause problems with JFFS2 usage, as the local bus (LPB)

  parent reply	other threads:[~2018-10-12  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 18:53 [PATCH 1/2] mtd: physmap_of: Move custom initialization Linus Walleij
2018-10-11 18:53 ` [PATCH 2/2] mtd: physmap_of_gemini: Handle pin control Linus Walleij
2018-10-12  9:20 ` Boris Brezillon [this message]
2018-10-13 16:26   ` [PATCH 1/2] mtd: physmap_of: Move custom initialization Linus Walleij
2018-10-14  6:34     ` Boris Brezillon

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=20181012112054.2c74b9c7@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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