From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbaDUENI (ORCPT ); Mon, 21 Apr 2014 00:13:08 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:32988 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbaDUENF (ORCPT ); Mon, 21 Apr 2014 00:13:05 -0400 Message-ID: <53549AE7.8040301@linaro.org> Date: Mon, 21 Apr 2014 12:13:27 +0800 From: "kefeng.wang" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Hans de Goede CC: Kefeng Wang , Tejun Heo , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] ahci: add support for Hisilicon sata References: <1398052903-10322-1-git-send-email-kefeng.wang@linaro.org> <1398052903-10322-3-git-send-email-kefeng.wang@linaro.org> In-Reply-To: <1398052903-10322-3-git-send-email-kefeng.wang@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, A hflags argument is useless in ahci_platform_init_host for another driver's caller, use the pointer of ata_port_info in ahci_probe, is this OK? Regards, Kefeng On 2014-4-21 12:01, Kefeng Wang wrote: > The hip04 SoC of hisilicon has an AHCI compliant SATA controller, > and it is compliant with the ahci 1.3 and sata 3.0 specification. > > There is a wrong bit in HOST_CAP of hip04 sata controller, which > enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to > disable it. > > Cc: Hans de Geode > Signed-off-by: Kefeng Wang > --- > .../devicetree/bindings/ata/ahci-platform.txt | 3 ++- > drivers/ata/ahci_platform.c | 10 ++++++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt > index 48b285f..aab1d70 100644 > --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt > +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt > @@ -7,7 +7,8 @@ Required properties: > - compatible : compatible list, one of "snps,spear-ahci", > "snps,exynos5440-ahci", "ibm,476gtr-ahci", > "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" > - "fsl,imx6q-ahci" or "snps,dwc-ahci" > + "fsl,imx6q-ahci", "snps,dwc-ahci" or > + "hisilicon,hisi-ahci" > - interrupts : > - reg : > > diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c > index ef67e79..48b9feb 100644 > --- a/drivers/ata/ahci_platform.c > +++ b/drivers/ata/ahci_platform.c > @@ -17,11 +17,12 @@ > #include > #include > #include > +#include > #include > #include > #include "ahci.h" > > -static const struct ata_port_info ahci_port_info = { > +static struct ata_port_info ahci_port_info = { > .flags = AHCI_FLAG_COMMON, > .pio_mask = ATA_PIO4, > .udma_mask = ATA_UDMA6, > @@ -32,6 +33,7 @@ static int ahci_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct ahci_platform_data *pdata = dev_get_platdata(dev); > + struct ata_port_info *pi = &ahci_port_info; > struct ahci_host_priv *hpriv; > int rc; > > @@ -55,7 +57,10 @@ static int ahci_probe(struct platform_device *pdev) > goto disable_resources; > } > > - rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0); > + if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) > + pi->private_data = (void *)AHCI_HFLAG_NO_FBS; > + > + rc = ahci_platform_init_host(pdev, hpriv, pi, 0, 0); > if (rc) > goto pdata_exit; > > @@ -76,6 +81,7 @@ static const struct of_device_id ahci_of_match[] = { > { .compatible = "snps,exynos5440-ahci", }, > { .compatible = "ibm,476gtr-ahci", }, > { .compatible = "snps,dwc-ahci", }, > + { .compatible = "hisilicon,hisi-ahci", }, > {}, > }; > MODULE_DEVICE_TABLE(of, ahci_of_match); >