[PATCH 01/30] ide: Move ATA_CURR_BASE to C file

Simon Glass sjg at chromium.org
Mon Mar 27 21:06:48 CEST 2023


This is not used outside one C file. Move it out of the header to
reduce its visbility.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/block/ide.c | 3 +++
 include/ide.h       | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 1ad9b6c1267e..f36bec8b3a8a 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -36,6 +36,9 @@ ulong ide_bus_offset[CONFIG_SYS_IDE_MAXBUS] = {
 #endif
 };
 
+#define ATA_CURR_BASE(dev)	(CONFIG_SYS_ATA_BASE_ADDR + \
+		ide_bus_offset[IDE_BUS(dev)])
+
 static int ide_bus_ok[CONFIG_SYS_IDE_MAXBUS];
 
 struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
diff --git a/include/ide.h b/include/ide.h
index 426cef4e39e0..58f6640c61be 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -11,9 +11,6 @@
 
 #define IDE_BUS(dev)	(dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS))
 
-#define	ATA_CURR_BASE(dev)	(CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)])
-extern ulong ide_bus_offset[];
-
 /*
  * Function Prototypes
  */
-- 
2.40.0.348.gf938b09366-goog



More information about the U-Boot mailing list