mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <patrice.chotard@st.com>
To: Tejun Heo <tj@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
	<linux-ide@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <patrice.chotard@st.com>, <kernel@stlinux.com>
Subject: [PATCH 1/2] ahci: st: Add ports-implemented property in support
Date: Wed, 10 Aug 2016 17:37:29 +0200	[thread overview]
Message-ID: <1470843450-20068-2-git-send-email-patrice.chotard@st.com> (raw)
In-Reply-To: <1470843450-20068-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

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 <patrice.chotard@st.com>
---
 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

  reply	other threads:[~2016-08-10 20:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10 15:37 [PATCH 0/2] STi: Add ports-implemented property support patrice.chotard
2016-08-10 15:37 ` patrice.chotard [this message]
2016-08-11 11:04   ` [PATCH 1/2] ahci: st: Add ports-implemented property in support Sergei Shtylyov
2016-08-10 15:37 ` [PATCH 2/2] ARM: dts: STiH407-family: Add ports-implemented property in sata nodes patrice.chotard
2016-08-10 16:24 ` [PATCH 0/2] STi: Add ports-implemented property support Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470843450-20068-2-git-send-email-patrice.chotard@st.com \
    --to=patrice.chotard@st.com \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®