u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Kever Yang <kever.yang@rock-chips.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	Mugunthan V N <mugunthanvnm@ti.com>
Cc: Stefan Agner <stefan@agner.ch>,
	u-boot@lists.denx.de, Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH v3 1/3] ata: dwc_ahci: Fix support for other platforms
Date: Sat, 22 Jul 2023 14:02:12 +0000 (UTC)	[thread overview]
Message-ID: <20230722140209.1897117-2-jonas@kwiboo.se> (raw)
In-Reply-To: <20230722140209.1897117-1-jonas@kwiboo.se>

The dwc_ahci driver use platform specific defines, place the platform
specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and
use of the driver on Rockchip platform.

Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
v3:
- No changes

v2:
- No changes

 drivers/ata/dwc_ahci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 826fea71cc5b..1dc91e7fce70 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -13,7 +13,9 @@
 #include <ahci.h>
 #include <scsi.h>
 #include <sata.h>
+#ifdef CONFIG_ARCH_OMAP2PLUS
 #include <asm/arch/sata.h>
+#endif
 #include <asm/io.h>
 #include <generic-phy.h>
 
@@ -72,12 +74,14 @@ static int dwc_ahci_probe(struct udevice *dev)
 		return ret;
 	}
 
+#ifdef CONFIG_ARCH_OMAP2PLUS
 	if (priv->wrapper_base) {
 		u32 val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
 
 		/* Enable SATA module, No Idle, No Standby */
 		writel(val, priv->wrapper_base + TI_SATA_SYSCONFIG);
 	}
+#endif
 
 	return ahci_probe_scsi(dev, (ulong)priv->base);
 }
-- 
2.41.0


  reply	other threads:[~2023-07-22 14:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22 14:02 [PATCH v3 0/3] board: rockchip: Add Hardkernel ODROID-M1 Jonas Karlman
2023-07-22 14:02 ` Jonas Karlman [this message]
2023-07-22 14:02 ` [PATCH v3 2/3] cmd: ini: Fix build warning Jonas Karlman
2023-07-28  9:47   ` Kever Yang
2023-07-22 14:02 ` [PATCH v3 3/3] board: rockchip: Add Hardkernel ODROID-M1 Jonas Karlman
2023-07-26  1:44   ` Kever Yang
2023-07-26  1:47 ` [PATCH v3 0/3] " Kever Yang
2023-07-26  6:34   ` Jonas Karlman
2023-07-26 13:37     ` Tom Rini

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=20230722140209.1897117-2-jonas@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=jjhiblot@ti.com \
    --cc=kever.yang@rock-chips.com \
    --cc=mugunthanvnm@ti.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=sjg@chromium.org \
    --cc=stefan@agner.ch \
    --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 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).