From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933282AbcHJUxg (ORCPT ); Wed, 10 Aug 2016 16:53:36 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:32312 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932807AbcHJSJw (ORCPT ); Wed, 10 Aug 2016 14:09:52 -0400 From: To: Tejun Heo , , , CC: , Subject: [PATCH 1/2] ahci: st: Add ports-implemented property in support Date: Wed, 10 Aug 2016 17:37:29 +0200 Message-ID: <1470843450-20068-2-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470843450-20068-1-git-send-email-patrice.chotard@st.com> References: <1470843450-20068-1-git-send-email-patrice.chotard@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.48.1.66] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-10_12:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Patrice Chotard Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL returns 0. So force_port_map to 1 by using ports-implemented DT property. Signed-off-by: Patrice Chotard --- drivers/ata/ahci_st.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index 8ff428f..bc345f2 100644 --- a/drivers/ata/ahci_st.c +++ b/drivers/ata/ahci_st.c @@ -147,6 +147,7 @@ static struct scsi_host_template ahci_platform_sht = { static int st_ahci_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct st_ahci_drv_data *drv_data; struct ahci_host_priv *hpriv; int err; @@ -170,6 +171,9 @@ static int st_ahci_probe(struct platform_device *pdev) st_ahci_configure_oob(hpriv->mmio); + of_property_read_u32(dev->of_node, + "ports-implemented", &hpriv->force_port_map); + err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, &ahci_platform_sht); if (err) { -- 1.9.1