linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 12/12] ARM: davinci: aemif: stop using pdev->id as nand chipselect
Date: Mon, 30 Apr 2018 10:24:53 +0200	[thread overview]
Message-ID: <20180430082453.8091-13-brgl@bgdev.pl> (raw)
In-Reply-To: <20180430082453.8091-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

All platforms now use the core_chipsel field in platform_data. Stop
using pdev->id in the aemif code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/aemif.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-davinci/aemif.c b/arch/arm/mach-davinci/aemif.c
index ff8b7e76b6e9..e4ab3f3a2a1f 100644
--- a/arch/arm/mach-davinci/aemif.c
+++ b/arch/arm/mach-davinci/aemif.c
@@ -189,7 +189,7 @@ int davinci_aemif_setup(struct platform_device *pdev)
 	 * Setup Async configuration register in case we did not boot
 	 * from NAND and so bootloader did not bother to set it up.
 	 */
-	val = davinci_aemif_readl(base, A1CR_OFFSET + pdev->id * 4);
+	val = davinci_aemif_readl(base, A1CR_OFFSET + pdata->core_chipsel * 4);
 	/*
 	 * Extended Wait is not valid and Select Strobe mode is not
 	 * used
@@ -198,13 +198,13 @@ int davinci_aemif_setup(struct platform_device *pdev)
 	if (pdata->options & NAND_BUSWIDTH_16)
 		val |= 0x1;
 
-	davinci_aemif_writel(base, A1CR_OFFSET + pdev->id * 4, val);
+	davinci_aemif_writel(base, A1CR_OFFSET + pdata->core_chipsel * 4, val);
 
 	clkrate = clk_get_rate(clk);
 
 	if (pdata->timing)
-		ret = davinci_aemif_setup_timing(pdata->timing, base, pdev->id,
-						 clkrate);
+		ret = davinci_aemif_setup_timing(pdata->timing, base,
+						 pdata->core_chipsel, clkrate);
 
 	if (ret < 0)
 		dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
-- 
2.17.0

  parent reply	other threads:[~2018-04-30  8:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  8:24 [PATCH 00/12] mtd: nand: davinci: stop using pdev->id as chipselect Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 01/12] mtd: nand: davinci: store the core chipselect number in platform data Bartosz Golaszewski
2018-05-01  9:25   ` Sekhar Nori
2018-05-01  9:53     ` Sekhar Nori
2018-05-01 10:29       ` Sekhar Nori
2018-05-01 10:39         ` Sekhar Nori
2018-05-02 10:45         ` Bartosz Golaszewski
2018-05-02 15:00           ` Sekhar Nori
2018-04-30  8:24 ` [PATCH 02/12] ARM: davinci: da830-evm: specify the chipselect in davinci_nand_pdata Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 03/12] ARM: davinci: da850-evm: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 04/12] ARM: davinci: dm355-evm: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 05/12] ARM: davinci: dm355-leopard: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 06/12] ARM: davinci: dm365-evm: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 07/12] ARM: davinci: dm644x-evm: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 08/12] ARM: davinci: mityomapl138: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 09/12] ARM: davinci: dm646x-evm: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 10/12] ARM: davinci: neuros-osd2: " Bartosz Golaszewski
2018-04-30  8:24 ` [PATCH 11/12] mtd: nand: davinci: stop using pdev->id as chipselect Bartosz Golaszewski
2018-04-30  8:24 ` Bartosz Golaszewski [this message]
2018-04-30 10:09 ` [PATCH 00/12] " Boris Brezillon
2018-04-30 16:45   ` Bartosz Golaszewski
2018-04-30 16:47     ` Boris Brezillon
2018-05-01 10:12       ` Sekhar Nori
2018-05-03  9:41       ` Sekhar Nori
2018-05-01 10:31   ` Sekhar Nori
2018-05-01 15:02     ` 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=20180430082453.8091-13-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bgolaszewski@baylibre.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.vasut@gmail.com \
    --cc=nsekhar@ti.com \
    --cc=richard@nod.at \
    --cc=tony@atomide.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).