From patchwork Mon Apr 30 08:24:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10371105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6805360234 for ; Mon, 30 Apr 2018 08:59:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54EA6288D4 for ; Mon, 30 Apr 2018 08:59:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48F0D28986; Mon, 30 Apr 2018 08:59:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A3D9288D4 for ; Mon, 30 Apr 2018 08:59:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MuIGxwU/IpNqkzA9bRl3fs4Bvw+e0pl88kx2lIU5Kbk=; b=i1He5K8OHVfQ19sv8VIe1UNSbR AD7+ixmy9Rh6Rpbikzjns9/9wh6prMraCNUDckwRq7QoWKMTCEJa+gkVPAsDXbfvmNUb9L6t7j+Ur F73ibgW4HyqkHda2O4R84foq/IHZ8O4AD+qh049X+Vwq/1cIn2T7VGPDrQNrcUA4fnNaIqBgxukHW Q5RqmaS7EP4A/+vi6yh0nE+drIFGfBtC0OdWNDKB3jPTI+vrnzNO82+bPW1f47qaTTSuee4+5ffcc DraREL6fXRiLdpwsHRn44udD/gE8noaDclbKu3jJ7vU3bqh56/oWOj6zb6K5myvo4oYxUlAqLaLf9 EWs2UIRA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD4eW-00014n-Th; Mon, 30 Apr 2018 08:59:20 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD4dt-0000Yn-Fa for linux-arm-kernel@bombadil.infradead.org; Mon, 30 Apr 2018 08:58:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MmsvJ9Me+R2FR01H0zYkOyZOmPaFB4DatnPj1IzvdgQ=; b=Y9RCPgLh1LBSLWgCI2pYGX6DJ onMIXYbk1eSLU4bleb1OJ+4Z6YPG6XADFcr3TrqkJBmBOqcCv2XF+r9Fpqni+bjAhGhdSesyl/Pc2 wEBeeRBz5bEvJHtmHw8G0QMLADpdYHwm7M4049Gnw01D2hi1D11fPSIGePy8CufruQjE+4OFZZTDA NAvDCVmRp6x8tmc3oyg1cmm7GJ8sM4T5Er2NOodgaZK7S2xffP7IKDCVOkhsWV4vMXhuhBtxryN77 9BcCvx7wXrYx54ERA+q9IGz8SV3al4EgZadiWA7d7p+ytJBHbTlS+RsWAGOb9nT/ZvhNiH47yxMlG B4VTqAv8A==; Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD47v-0002zn-5Z for linux-arm-kernel@lists.infradead.org; Mon, 30 Apr 2018 08:25:40 +0000 Received: by mail-wm0-x244.google.com with SMTP id n10so12826247wmc.1 for ; Mon, 30 Apr 2018 01:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MmsvJ9Me+R2FR01H0zYkOyZOmPaFB4DatnPj1IzvdgQ=; b=gCjVGl+biK0ME5QweL/3ssxVpUQZPSGRhO8DrNYm0fowWnha1DLdnzqNTVgOpypwQ9 dCPWXCRG9206daN2IzyvExhxbiPXhC5CArbF79+9e9GyS/KTkZqwJbKmj2uvLNxj4xTh 8hOqgjROcuLh2kfDfSOfdVZP3vYrI9U3WuR5o0vilrnvI6Mi9zEQRiP4BLvCc8z26Xar bxcgmmUZYVzgdT085Ndg9teged3eTbismxv0J0jfVT6X+vUCOOj+J8vX4q05d6vcW4Tl onzk/02HJ2PzjxURANTg7IecBkeXcsKMTn2yHwlJC2uVla6OXdI3RCPXrROHLghHkMUi yJgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MmsvJ9Me+R2FR01H0zYkOyZOmPaFB4DatnPj1IzvdgQ=; b=RkMeIudG0Gc1UyDuJBc4bicEaM53e+TahEP3qSZNuiD5wXGwgkRmsJipm8j6qfxv3s npeevbDqNICqI0TMKLmS5T7zmcQcPwvvatqfkLNyKqGf0xbVzxRpJrv7RNtZbUoE6uqC CN7QK6X/gZPeFNt4AP3nrqSgI3jCcEGiaZuGDMxY7ip+MDj+Mr1nHbHBLBBk7zLk3RsN 5AmWKP3XnSf2JhKlzxmdkaici9TIBqa8k31zCqu73kovPTrqQCOpEr2OjC6BDBwItysn XifCTnc9E/IxLUDUVPvCCrEwOPU5WaiqZdK9BrCjlmpqu6Drw2B/sI2Xl4SoPllDFQvU 8zTg== X-Gm-Message-State: ALQs6tCIzszt7wNRHAj6pdXXKoRhJYwuhPvZcpa0ud27F37KLV0z7uEK Dkw5wU/yh+ePQLFHY6gCOMt51w== X-Google-Smtp-Source: AB8JxZoUibvfkBFyO35v3F8Bq8axvRw0Fennzf2kC7+tSUzr1yx6D+AJmd1jqqebM7GAvKbAFgulpQ== X-Received: by 10.28.110.30 with SMTP id j30mr6293031wmc.62.1525076732791; Mon, 30 Apr 2018 01:25:32 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-84-58.w2-15.abo.wanadoo.fr. [2.15.173.58]) by smtp.gmail.com with ESMTPSA id a13-v6sm6475266wrc.19.2018.04.30.01.25.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 01:25:32 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Tony Lindgren , Krzysztof Kozlowski Subject: [PATCH 12/12] ARM: davinci: aemif: stop using pdev->id as nand chipselect Date: Mon, 30 Apr 2018 10:24:53 +0200 Message-Id: <20180430082453.8091-13-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430082453.8091-1-brgl@bgdev.pl> References: <20180430082453.8091-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180430_092539_314844_ECBE8F92 X-CRM114-Status: GOOD ( 18.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski All platforms now use the core_chipsel field in platform_data. Stop using pdev->id in the aemif code. Signed-off-by: Bartosz Golaszewski --- 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");