From patchwork Wed Apr 23 12:36:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28878 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F8762057C for ; Wed, 23 Apr 2014 12:37:49 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf5166515oag.1 for ; Wed, 23 Apr 2014 05:37:49 -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=PIjTm5Y6fIzEenOoQcI4Wkncm0XO7F9tpFuDOTrf4p47cqA8yZJxMMffujezE0xaki tQTKfCIII1jttYZ/LGoOPxrhiunTxl2QzIZg+cVHKg4+UPCEeCQOs/BAcJ/bkdJSdoGw lVUyQAhurxIWrX+JbwXmIMP54vSsW5/vARARRIaSGAtAqBxKkoCCz4TSjnH2/UYV+DLn QcUlojaroSotlYP32YokycWeyhIB4dGsC8FhH+uehqgoScDmcMu1J6CnYKW/0M5gg6+A /9dAG74NaMzzKkmeyOaDMeEvgJTyvNAt+CYhJW/3g/LaG3a4/f1PQcEVlldDHYLBrk5o pi9w== X-Gm-Message-State: ALoCoQnD3L4mzspfiUl6s5eUxdUl5RANSCexELkHd7g+DVDqARywgCJmz3qxmoYEX1LqQyUtqWTC X-Received: by 10.42.107.146 with SMTP id d18mr19719019icp.8.1398256669030; Wed, 23 Apr 2014 05:37:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.4 with SMTP id t4ls556338qge.1.gmail; Wed, 23 Apr 2014 05:37:48 -0700 (PDT) X-Received: by 10.58.1.5 with SMTP id 5mr45895457vei.8.1398256668899; Wed, 23 Apr 2014 05:37:48 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id cq3si137316vcb.162.2014.04.23.05.37.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 05:37:48 -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.169; Received: by mail-vc0-f169.google.com with SMTP id im17so1073271vcb.0 for ; Wed, 23 Apr 2014 05:37:48 -0700 (PDT) X-Received: by 10.221.62.131 with SMTP id xa3mr42438311vcb.13.1398256668802; Wed, 23 Apr 2014 05:37:48 -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 ib8csp100512vcb; Wed, 23 Apr 2014 05:37:48 -0700 (PDT) X-Received: by 10.50.79.161 with SMTP id k1mr2126929igx.31.1398256668093; Wed, 23 Apr 2014 05:37:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qf5si557770pac.170.2014.04.23.05.37.47; Wed, 23 Apr 2014 05:37:47 -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 S1755753AbaDWMh3 (ORCPT + 27 others); Wed, 23 Apr 2014 08:37:29 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:40999 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754358AbaDWMhV (ORCPT ); Wed, 23 Apr 2014 08:37:21 -0400 Received: by mail-pa0-f45.google.com with SMTP id kq14so86615pab.18 for ; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) X-Received: by 10.68.159.228 with SMTP id xf4mr54585631pbb.74.1398256640976; Wed, 23 Apr 2014 05:37:20 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ha11sm2297548pbd.17.2014.04.23.05.37.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 05:37:20 -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 v5 3/3] ahci: add support for Hisilicon sata Date: Wed, 23 Apr 2014 20:36:43 +0800 Message-Id: <1398256603-20160-4-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398256603-20160-1-git-send-email-kefeng.wang@linaro.org> References: <1398256603-20160-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;