From patchwork Wed Apr 23 11:36:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28869 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F187203AC for ; Wed, 23 Apr 2014 11:37:40 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id i8sf2935860qcq.0 for ; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=wXKL+4gloUx2sbcIwQEO2TDVEb04fq70EUnOSEksfHc=; b=QJ2b/5RQ+VPeRYJ0deagimdYo7Q/Wzvcnt9BHE5KRerri/3B1WLCrGmVoqEC9qTIHD l7mI2iuYKg/Jtivore0YsXYXk6LBu8o69zxskP6ZvFUfIGpnq41mPPMvYRUnwvTD/ZVM zEdlndlvONKzUgEdqipAxhBJ+38cE/scWhRfNHGXDsaLfqw+2+ieUF4zxAM5a/qyMtSY OToNDU0zr1T1K+M41gu1b0uYLX1lmCDru+wMCC3nyWOHLf/a5INlyvw0BRgXpu+JRHsS KF8lJkeFC6aPBPb6N0jtfDOoM66ok/szDC0wTSVA0Zm4GuuneJg84iTNAhK/dhaWHK84 KGRw== X-Gm-Message-State: ALoCoQm/YfPgsnjmPmRQ4B71ZiD7ze0csZrzD2idQdlDFW0BFY+jIDWNto6bmXFbexyh0NSNS7ya X-Received: by 10.236.188.134 with SMTP id a6mr22835680yhn.11.1398253060779; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.118 with SMTP id f109ls507073qge.8.gmail; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) X-Received: by 10.221.58.144 with SMTP id wk16mr13823557vcb.23.1398253060654; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id pd4si116248veb.51.2014.04.23.04.37.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:37:40 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ib6so968732vcb.13 for ; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) X-Received: by 10.52.95.135 with SMTP id dk7mr5730603vdb.32.1398253060512; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp96556vcb; Wed, 23 Apr 2014 04:37:40 -0700 (PDT) X-Received: by 10.68.129.169 with SMTP id nx9mr19140499pbb.136.1398253058969; Wed, 23 Apr 2014 04:37:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qd9si455162pac.269.2014.04.23.04.37.38; Wed, 23 Apr 2014 04:37:38 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753190AbaDWLhT (ORCPT + 27 others); Wed, 23 Apr 2014 07:37:19 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:38570 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbaDWLhO (ORCPT ); Wed, 23 Apr 2014 07:37:14 -0400 Received: by mail-pd0-f170.google.com with SMTP id v10so695186pde.1 for ; Wed, 23 Apr 2014 04:37:14 -0700 (PDT) X-Received: by 10.68.198.97 with SMTP id jb1mr53836233pbc.104.1398253034129; Wed, 23 Apr 2014 04:37:14 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id qc8sm1892576pbc.68.2014.04.23.04.37.09 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:37:13 -0700 (PDT) From: Kefeng Wang To: Tejun Heo , Hans de Goede , Maxime Ripard , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Cc: wangkefeng.wang@huawei.com, kefeng.wang@linaro.org Subject: [PATCH v4 3/3] ahci: add support for Hisilicon sata Date: Wed, 23 Apr 2014 19:36:47 +0800 Message-Id: <1398253008-17059-4-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398253008-17059-1-git-send-email-kefeng.wang@linaro.org> References: <1398253008-17059-1-git-send-email-kefeng.wang@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kefeng.wang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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. Signed-off-by: Kefeng Wang --- .../devicetree/bindings/ata/ahci-platform.txt | 3 ++- drivers/ata/ahci_platform.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 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 a476a1f..10d41c3 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ static int ahci_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct ahci_platform_data *pdata = dev_get_platdata(dev); struct ahci_host_priv *hpriv; + unsigned int hflags = 0; int rc; hpriv = ahci_platform_get_resources(pdev); @@ -55,7 +57,11 @@ static int ahci_probe(struct platform_device *pdev) goto disable_resources; } - rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0, 0); + if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) + hflags |= AHCI_HFLAG_NO_FBS; + + rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, + hflags, 0, 0); if (rc) goto pdata_exit;