From patchwork Thu Apr 10 05:24:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28123 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E7DA42145A for ; Thu, 10 Apr 2014 05:26:34 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf10074546pdj.7 for ; Wed, 09 Apr 2014 22:26:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=35/jQcICccyrW0Y9Ex+8P4c3mUbusn+EKzxutkid8xE=; b=l3mGuRBAshM9xgM99RewfSw21k0n6o22aVWuwy5zs8fkrovL1yLa3KYUItlmZ+9ud9 U5kuD6YgjRRmSznbQNlkYpXU/v/ZZ2rTroCkqZaF8YUuf/KDxkiYMrafUFzVWFKaGPSo X/yMT+5omuq0Lfv82m7vevpUHrnh8W9y+lvQeenOXBB+LIoOANQdAiiTb14UM+2w2wx2 A+Nwd5nfN2STN2G8TGNQ2tY9WBK5G1n30QiYXtBlAb0SxCfptcShjh3HojWKvJAMTerv h0TK+dDPwC7LaUnu14GVWITAD5CrCrZuj4F8F5ZZLyRuQcHmmnX9zQWkIR/HGWC//FPW UGBQ== X-Gm-Message-State: ALoCoQm5kF4w4N8wLCb5MpyzROujSLz6bC2RYBcqv/f+LbIhcShMzO+8lMkW/T46rBd+dDhEN3wG X-Received: by 10.66.159.36 with SMTP id wz4mr7033071pab.14.1397107593848; Wed, 09 Apr 2014 22:26:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.165 with SMTP id 34ls1028643qgb.30.gmail; Wed, 09 Apr 2014 22:26:33 -0700 (PDT) X-Received: by 10.58.105.105 with SMTP id gl9mr12413360veb.3.1397107593644; Wed, 09 Apr 2014 22:26:33 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id sn5si521222vdc.65.2014.04.09.22.26.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 22:26:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so3052091vcb.29 for ; Wed, 09 Apr 2014 22:26:33 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr12678132vcx.7.1397107593542; Wed, 09 Apr 2014 22:26:33 -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 ib8csp29675vcb; Wed, 9 Apr 2014 22:26:33 -0700 (PDT) X-Received: by 10.68.139.36 with SMTP id qv4mr17231795pbb.82.1397107592383; Wed, 09 Apr 2014 22:26:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk5si1474497pbc.510.2014.04.09.22.26.31; Wed, 09 Apr 2014 22:26:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934651AbaDJF0P (ORCPT + 27 others); Thu, 10 Apr 2014 01:26:15 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:4221 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934575AbaDJF0I (ORCPT ); Thu, 10 Apr 2014 01:26:08 -0400 Received: from 172.24.2.119 (EHLO szxeml214-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BTW99369; Thu, 10 Apr 2014 13:26:00 +0800 (CST) Received: from SZXEML451-HUB.china.huawei.com (10.82.67.194) by szxeml214-edg.china.huawei.com (172.24.2.29) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 10 Apr 2014 13:25:39 +0800 Received: from localhost (10.177.21.224) by szxeml451-hub.china.huawei.com (10.82.67.194) with Microsoft SMTP Server id 14.3.158.1; Thu, 10 Apr 2014 13:25:32 +0800 From: Kefeng Wang To: Tejun Heo CC: Hans de Goede , , , , Kefeng Wang Subject: [PATCH V2 2/2] ahci: add support for Hisilicon sata Date: Thu, 10 Apr 2014 13:24:28 +0800 Message-ID: <1397107468-640-3-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.msysgit.0 In-Reply-To: <1397107468-640-1-git-send-email-wangkefeng.wang@huawei.com> References: <1397107468-640-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.21.224] X-CFilter-Loop: Reflected 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: wangkefeng.wang@huawei.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , From: Kefeng Wang 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 | 6 +++++- 2 files changed, 7 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 ef67e79..2ee1923 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -32,6 +32,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; @@ -54,8 +55,10 @@ static int ahci_probe(struct platform_device *pdev) if (rc) goto disable_resources; } + if (of_device_is_compatible(pdev->dev.of_node, "hisilicon,hisi-ahci")) + pi.private_data = (void *)AHCI_HFLAG_NO_FBS; - rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0); + rc = ahci_platform_init_host(pdev, hpriv, &pi, 0, 0); if (rc) goto pdata_exit; @@ -76,6 +79,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);