linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: yuantian.tang@nxp.com (yuantian.tang at nxp.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ahci: qoriq: report warning when ecc register is missing
Date: Wed, 16 Nov 2016 11:11:19 +0800	[thread overview]
Message-ID: <1479265879-48840-2-git-send-email-yuantian.tang@nxp.com> (raw)
In-Reply-To: <1479265879-48840-1-git-send-email-yuantian.tang@nxp.com>

From: Tang Yuantian <Yuantian.Tang@nxp.com>

For ls1021a and ls1046a socs, sata ecc must be disabled.
If ecc register is not found in sata node in dts, report
a warning.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
---
 drivers/ata/ahci_qoriq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index 45c88de..66eb4b5 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -158,6 +158,7 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 
 	switch (qpriv->type) {
 	case AHCI_LS1021A:
+		WARN_ON(!qpriv->ecc_addr);
 		writel(SATA_ECC_DISABLE, qpriv->ecc_addr);
 		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
 		writel(LS1021A_PORT_PHY2, reg_base + PORT_PHY2);
@@ -185,6 +186,7 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
 		break;
 
 	case AHCI_LS1046A:
+		WARN_ON(!qpriv->ecc_addr);
 		writel(LS1046A_SATA_ECC_DIS, qpriv->ecc_addr);
 		writel(AHCI_PORT_PHY_1_CFG, reg_base + PORT_PHY1);
 		writel(AHCI_PORT_TRANS_CFG, reg_base + PORT_TRANS);
-- 
2.1.0.27.g96db324

  reply	other threads:[~2016-11-16  3:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  3:11 [PATCH 1/2] ahci: qoriq: added a condition to enable dma coherence yuantian.tang at nxp.com
2016-11-16  3:11 ` yuantian.tang at nxp.com [this message]
2016-11-16 15:56   ` [PATCH 2/2] ahci: qoriq: report warning when ecc register is missing Mathieu Poirier
2016-11-16 16:02 ` [PATCH 1/2] ahci: qoriq: added a condition to enable dma coherence Robin Murphy

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=1479265879-48840-2-git-send-email-yuantian.tang@nxp.com \
    --to=yuantian.tang@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).