linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mtd@lists.infradead.org, Rob Herring <robh+dt@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	"linux-stable #4 . 14+" <stable@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v4 1/5] mtd: rawnand: denali_dt: set clk_x_rate to 200 MHz unconditionally
Date: Fri, 22 Jun 2018 18:49:47 +0200	[thread overview]
Message-ID: <20180622184947.339694b6@bbrezillon> (raw)
In-Reply-To: <1529683598-25783-2-git-send-email-yamada.masahiro@socionext.com>

On Sat, 23 Jun 2018 01:06:34 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Since commit 1bb88666775e ("mtd: nand: denali: handle timing parameters
> by setup_data_interface()"), denali_dt.c gets the clock rate from the
> clock driver.  The driver expects the frequency of the bus interface
> clock, whereas the clock driver of SOCFPGA provides the core clock.
> Thus, the setup_data_interface() hook calculates timing parameters
> based on a wrong frequency.
> 
> To make it work without relying on the clock driver, hard-code the clock
> frequency, 200MHz.  This is fine for existing DT of UniPhier, and also
> fixes the issue of SOCFPGA because both platforms use 200 MHz for the
> bus interface clock.
> 
> Fixes: 1bb88666775e ("mtd: nand: denali: handle timing parameters by setup_data_interface()")
> Cc: linux-stable <stable@vger.kernel.org> #4.14+
> Reported-by: Philipp Rosenberger <p.rosenberger@linutronix.de>
> Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Tested-by: Richard Weinberger <richard@nod.at>

Applied.

Thanks,

Boris

> ---
> 
> Changes in v4:
>   - split into a very simple patch for backport candiate
> 
>  drivers/mtd/nand/raw/denali_dt.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
> index cfd33e6..5869e90 100644
> --- a/drivers/mtd/nand/raw/denali_dt.c
> +++ b/drivers/mtd/nand/raw/denali_dt.c
> @@ -123,7 +123,11 @@ static int denali_dt_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	denali->clk_x_rate = clk_get_rate(dt->clk);
> +	/*
> +	 * Hardcode the clock rate for the backward compatibility.
> +	 * This works for both SOCFPGA and UniPhier.
> +	 */
> +	denali->clk_x_rate = 200000000;
>  
>  	ret = denali_init(denali);
>  	if (ret)

  reply	other threads:[~2018-06-22 16:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 16:06 [PATCH v4 0/5] mtd: rawnand: denali: add new clocks and improve setup_data_interface Masahiro Yamada
2018-06-22 16:06 ` [PATCH v4 1/5] mtd: rawnand: denali_dt: set clk_x_rate to 200 MHz unconditionally Masahiro Yamada
2018-06-22 16:49   ` Boris Brezillon [this message]
2018-06-22 16:06 ` [PATCH v4 2/5] mtd: rawnand: denali_dt: use dev as a shorthand of &pdev->dev Masahiro Yamada
2018-06-22 16:06 ` [PATCH v4 3/5] dt-binding: mtd: denali_dt: document clock property Masahiro Yamada
2018-06-22 16:53   ` Boris Brezillon
2018-06-25 15:59   ` Rob Herring
2018-06-22 16:06 ` [PATCH v4 4/5] mtd: rawnand: denali_dt: add more clocks based on IP datasheet Masahiro Yamada
2018-06-22 16:54   ` Boris Brezillon
2018-06-22 16:06 ` [PATCH v4 5/5] mtd: rawnand: denali: optimize timing parameters for data interface Masahiro Yamada
2018-07-02 12:28 ` [PATCH v4 0/5] mtd: rawnand: denali: add new clocks and improve setup_data_interface Miquel Raynal

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=20180622184947.339694b6@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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;
as well as URLs for NNTP newsgroup(s).