From patchwork Wed May 14 06:13:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 30148 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 20D2F20446 for ; Wed, 14 May 2014 06:15:22 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kq14sf6863705pab.6 for ; Tue, 13 May 2014 23:15:22 -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=w43SM/o1rmigTH8gsHL6CBeOAnuCHSBhFGNQWVL/qws=; b=MPpWCsRb8NrK8nNZdZcOx/uhjANhXzpp5w5yB7PcD4nmxaRvjdWPk51+FfxVn3zK5R HKXERwDVb3ATF4dCnEjM1EbM0rcothenOUXUrUXJXGWnFiASEGkAtqKd0km9fs96836L o3YFJMukSAM1s4VFZizU7d1rCEmwQwsAqxuR42QOEAgaURJ7z0l+//7VraTHf9UdpNNn tnepRhj5OE2G1jvF3SZPAL7A+Xpy83E+GtQBRkQ/pn3YY+RBMV/9wgFfkz8ZZlNRDWc6 NG1jKT1oPzM2GAwgS7nXWEifCXydlW8fRDdU7L42psNZKDRj69LIiSViKAC4O4zHObnj NU6w== X-Gm-Message-State: ALoCoQkTkRz+75pALs00qM33uMg3GeFBzx3A5FrIcexsqIyATMPfSnMq4UgZk8J0kVDI2LinJ0xc X-Received: by 10.66.216.130 with SMTP id oq2mr768304pac.44.1400048122193; Tue, 13 May 2014 23:15:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.14 with SMTP id o14ls2205129qgo.63.gmail; Tue, 13 May 2014 23:15:22 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr1365362vcm.11.1400048122093; Tue, 13 May 2014 23:15:22 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id tv3si153819vdc.144.2014.05.13.23.15.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 23:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so1810419vcb.22 for ; Tue, 13 May 2014 23:15:22 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr1365357vcm.11.1400048122019; Tue, 13 May 2014 23:15:22 -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 ib8csp208982vcb; Tue, 13 May 2014 23:15:21 -0700 (PDT) X-Received: by 10.68.193.166 with SMTP id hp6mr1913623pbc.144.1400048121255; Tue, 13 May 2014 23:15:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ov9si442421pbc.213.2014.05.13.23.15.20; Tue, 13 May 2014 23:15:20 -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 S1754159AbaENGPK (ORCPT + 27 others); Wed, 14 May 2014 02:15:10 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:36494 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbaENGPE (ORCPT ); Wed, 14 May 2014 02:15:04 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so1265363pbb.22 for ; Tue, 13 May 2014 23:15:04 -0700 (PDT) X-Received: by 10.66.149.102 with SMTP id tz6mr1971941pab.76.1400048104092; Tue, 13 May 2014 23:15:04 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ba5sm1438111pbc.61.2014.05.13.23.14.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 23:15:03 -0700 (PDT) From: Kefeng Wang To: tj@kernel.org Cc: hdegoede@redhat.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, xuwei5@hisilicon.com, kefeng.wang@linaro.org Subject: [PATCH v7 3/3] ahci: add support for Hisilicon sata Date: Wed, 14 May 2014 14:13:42 +0800 Message-Id: <1400048022-15795-4-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400048022-15795-1-git-send-email-kefeng.wang@linaro.org> References: <1400048022-15795-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) 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. Reviewed-by: Hans de Goede Signed-off-by: Kefeng Wang --- .../devicetree/bindings/ata/ahci-platform.txt | 1 + drivers/ata/ahci_platform.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index d6b07e8..c96d8dc 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt @@ -8,6 +8,7 @@ Required properties: - "allwinner,sun4i-a10-ahci" - "fsl,imx53-ahci" - "fsl,imx6q-ahci" + - "hisilicon,hisi-ahci" - "ibm,476gtr-ahci" - "marvell,armada-380-ahci" - "snps,dwc-ahci" diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index a476a1f..ebe505c 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 long 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; @@ -76,6 +82,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);