All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Wunderlich <frank-w@public-files.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] ata: ahci: Don't forget to clear upper address regs.
Date: Wed, 31 Jul 2019 13:51:43 +0200	[thread overview]
Message-ID: <20190731115145.22095-3-frank-w@public-files.de> (raw)
In-Reply-To: <20190731115145.22095-1-frank-w@public-files.de>

From: Oleksandr Rybalko <ray@ddteam.net>

In 32bits mode upper bits need to be set to 0, otherwise controller will
try to DMA into not existing memory and stops with error.

Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Oleksandr Rybalko <ray@ddteam.net>
---
 drivers/ata/ahci.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index e3135bb75f..716f9c1c7e 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -593,10 +593,15 @@ static int ahci_port_start(struct ahci_uc_priv *uc_priv, u8 port)
 	pp->cmd_tbl_sg =
 			(struct ahci_sg *)(uintptr_t)virt_to_phys((void *)mem);

-	writel_with_flush((unsigned long)pp->cmd_slot,
-			  port_mmio + PORT_LST_ADDR);
+	writel_with_flush((u32)pp->cmd_slot, port_mmio + PORT_LST_ADDR);
+#ifndef CONFIG_PHYS_64BIT
+	writel_with_flush(0, port_mmio + PORT_LST_ADDR_HI);
+#endif

 	writel_with_flush(pp->rx_fis, port_mmio + PORT_FIS_ADDR);
+#ifndef CONFIG_PHYS_64BIT
+	writel_with_flush(0, port_mmio + PORT_FIS_ADDR_HI);
+#endif

 #ifdef CONFIG_SUNXI_AHCI
 	sunxi_dma_init(port_mmio);
--
2.17.1

  parent reply	other threads:[~2019-07-31 11:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 11:51 [U-Boot] [PATCH 0/4] add pcie/ahci for mt7623/bpi-r2 Frank Wunderlich
2019-07-31 11:51 ` [U-Boot] [PATCH 1/4] ahci-pci: ASM1061 report wrong class, but support AHCI Frank Wunderlich
2019-07-31 11:51 ` Frank Wunderlich [this message]
2019-07-31 11:51 ` [U-Boot] [PATCH 3/4] pci: mediatek: Add pci-driver for mt2701 Frank Wunderlich
2019-07-31 12:45   ` Ryder Lee
2019-07-31 14:13     ` Aleksandr Rybalko
2019-07-31 14:35       ` Ryder Lee
2019-07-31 15:23         ` Ryder Lee
2019-07-31 16:09           ` Frank Wunderlich
2019-08-01  7:32             ` Ryder Lee
2019-08-04 14:35   ` Frank Wunderlich
2019-07-31 11:51 ` [U-Boot] [PATCH 4/4] arm: dts: Add PCI-E controller for mt7623 Frank Wunderlich
2019-08-04 14:53 ` [U-Boot] [PATCH 0/4] add pcie/ahci for mt7623/bpi-r2 Frank Wunderlich

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=20190731115145.22095-3-frank-w@public-files.de \
    --to=frank-w@public-files.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.