From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Subject: [PATCH v2 05/10] ata: ahci: mvebu: Add a parameter to a platform data callback Date: Wed, 6 Mar 2019 11:21:41 +0100 Message-ID: <20190306102146.13005-6-miquel.raynal@bootlin.com> References: <20190306102146.13005-1-miquel.raynal@bootlin.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190306102146.13005-1-miquel.raynal@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Gregory Clement , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Mark Rutland , Jens Axboe , Hans de Goede , Thomas Gleixner , Marc Zyngier Cc: devicetree@vger.kernel.org, Baruch Siach , Antoine Tenart , Maxime Chevallier , Nadav Haklai , linux-ide@vger.kernel.org, Thomas Petazzoni , Miquel Raynal , linux-arm-kernel@lists.infradead.org List-Id: linux-ide@vger.kernel.org Before using the ahci_mvebu.c driver with Armada 8k hardware (right now it is using the ahci_platform.c generic driver), let's add a 'struct device' pointer to the argument list of the ->plat_config() callback. This parameter will be used by the A8k's callback. Signed-off-by: Miquel Raynal --- drivers/ata/ahci_mvebu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c index 43bb2db59698..507ee7c5437c 100644 --- a/drivers/ata/ahci_mvebu.c +++ b/drivers/ata/ahci_mvebu.c @@ -29,7 +29,7 @@ #define AHCI_WINDOW_SIZE(win) (0x68 + ((win) << 4)) struct ahci_mvebu_plat_data { - int (*plat_config)(struct ahci_host_priv *hpriv); + int (*plat_config)(struct ahci_host_priv *hpriv, struct device *dev); unsigned int host_flags; }; @@ -67,7 +67,8 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA); } -static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv) +static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv, + struct device *dev) { const struct mbus_dram_target_info *dram; int rc = 0; @@ -83,7 +84,8 @@ static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv) return rc; } -static int ahci_mvebu_armada_3700_config(struct ahci_host_priv *hpriv) +static int ahci_mvebu_armada_3700_config(struct ahci_host_priv *hpriv, + struct device *dev) { u32 reg; @@ -162,7 +164,7 @@ static int ahci_mvebu_resume(struct platform_device *pdev) struct ahci_host_priv *hpriv = host->private_data; const struct ahci_mvebu_plat_data *pdata = hpriv->plat_data; - pdata->plat_config(hpriv); + pdata->plat_config(hpriv, &pdev->dev); return ahci_platform_resume_host(&pdev->dev); } @@ -205,7 +207,7 @@ static int ahci_mvebu_probe(struct platform_device *pdev) hpriv->stop_engine = ahci_mvebu_stop_engine; - rc = pdata->plat_config(hpriv); + rc = pdata->plat_config(hpriv, &pdev->dev); if (rc) goto disable_resources; -- 2.19.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAC41C43381 for ; Wed, 6 Mar 2019 10:22:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB62620675 for ; Wed, 6 Mar 2019 10:22:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mBZQJLhx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB62620675 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Ps1Ykf5XbslhOmWdnhaurpGP5/2FD8M8DSo+jkPMVaA=; b=mBZQJLhx5fBeZk uuzeNOOjlO669Y5HpLdQG8oXxUVT1z57ZuBLnLApU9JB4tnhDqhMK3mmQrfNNws9RUHJdQIaDuLJO uLJHhg/ba9oC4sGZMOHWwxdEN44R7i1R+CotaxqbXTLo6+Mv1YsjAz4aTbsQ9TYH0tWj3DpSlQR+8 nTAIgtDJLIGoZ7FLszTm5R876/svAduPpPRwIdyZo7ifX5JMz8KJOYHwYZdJzvSiUjn9l9aRVyOXj Q35msPqItvXHZtRI85v8O2QZb+BoSRQfg6fxiICbQRm2X/D7Arw6TxBU6Zz6A5rSshNzqIyZ3psbl V5w2UstqoKiNlXU/jYdg==; 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 1h1ThA-0002hd-Ut; Wed, 06 Mar 2019 10:22:40 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1Tgh-00021c-1Y for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2019 10:22:15 +0000 X-Originating-IP: 90.88.150.179 Received: from localhost.localdomain (aaubervilliers-681-1-31-179.w90-88.abo.wanadoo.fr [90.88.150.179]) (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 02F7BFF813; Wed, 6 Mar 2019 10:22:05 +0000 (UTC) From: Miquel Raynal To: Gregory Clement , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Mark Rutland , Jens Axboe , Hans de Goede , Thomas Gleixner , Marc Zyngier Subject: [PATCH v2 05/10] ata: ahci: mvebu: Add a parameter to a platform data callback Date: Wed, 6 Mar 2019 11:21:41 +0100 Message-Id: <20190306102146.13005-6-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190306102146.13005-1-miquel.raynal@bootlin.com> References: <20190306102146.13005-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190306_022211_534486_5349476F X-CRM114-Status: GOOD ( 15.68 ) 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: devicetree@vger.kernel.org, Baruch Siach , Antoine Tenart , Maxime Chevallier , Nadav Haklai , linux-ide@vger.kernel.org, Thomas Petazzoni , Miquel Raynal , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Before using the ahci_mvebu.c driver with Armada 8k hardware (right now it is using the ahci_platform.c generic driver), let's add a 'struct device' pointer to the argument list of the ->plat_config() callback. This parameter will be used by the A8k's callback. Signed-off-by: Miquel Raynal --- drivers/ata/ahci_mvebu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c index 43bb2db59698..507ee7c5437c 100644 --- a/drivers/ata/ahci_mvebu.c +++ b/drivers/ata/ahci_mvebu.c @@ -29,7 +29,7 @@ #define AHCI_WINDOW_SIZE(win) (0x68 + ((win) << 4)) struct ahci_mvebu_plat_data { - int (*plat_config)(struct ahci_host_priv *hpriv); + int (*plat_config)(struct ahci_host_priv *hpriv, struct device *dev); unsigned int host_flags; }; @@ -67,7 +67,8 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA); } -static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv) +static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv, + struct device *dev) { const struct mbus_dram_target_info *dram; int rc = 0; @@ -83,7 +84,8 @@ static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv) return rc; } -static int ahci_mvebu_armada_3700_config(struct ahci_host_priv *hpriv) +static int ahci_mvebu_armada_3700_config(struct ahci_host_priv *hpriv, + struct device *dev) { u32 reg; @@ -162,7 +164,7 @@ static int ahci_mvebu_resume(struct platform_device *pdev) struct ahci_host_priv *hpriv = host->private_data; const struct ahci_mvebu_plat_data *pdata = hpriv->plat_data; - pdata->plat_config(hpriv); + pdata->plat_config(hpriv, &pdev->dev); return ahci_platform_resume_host(&pdev->dev); } @@ -205,7 +207,7 @@ static int ahci_mvebu_probe(struct platform_device *pdev) hpriv->stop_engine = ahci_mvebu_stop_engine; - rc = pdata->plat_config(hpriv); + rc = pdata->plat_config(hpriv, &pdev->dev); if (rc) goto disable_resources; -- 2.19.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel