[PATCH v2 08/30] ide: Drop weak functions

Simon Glass sjg at chromium.org
Tue Apr 25 18:54:33 CEST 2023


These are not used from outside this file anymore. Make them static and
remove them from the header file.

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

(no changes since v1)

 drivers/block/ide.c | 14 +++++++-------
 include/ide.h       | 13 -------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 58f1ef8f177..46e110fec5e 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -75,7 +75,7 @@ static void ide_reset(void)
 #define ide_reset()	/* dummy */
 #endif /* CONFIG_IDE_RESET */
 
-__weak void ide_outb(int dev, int port, unsigned char val)
+static void ide_outb(int dev, int port, unsigned char val)
 {
 	debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
 	      dev, port, val, ATA_CURR_BASE(dev) + port);
@@ -83,7 +83,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
 	outb(val, ATA_CURR_BASE(dev) + port);
 }
 
-__weak unsigned char ide_inb(int dev, int port)
+static unsigned char ide_inb(int dev, int port)
 {
 	uchar val;
 
@@ -94,7 +94,7 @@ __weak unsigned char ide_inb(int dev, int port)
 	return val;
 }
 
-__weak void ide_input_swap_data(int dev, ulong *sect_buf, int words)
+static void ide_input_swap_data(int dev, ulong *sect_buf, int words)
 {
 	uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
 	ushort *dbuf = (ushort *)sect_buf;
@@ -164,7 +164,7 @@ OUT:
 
 /* since ATAPI may use commands with not 4 bytes alligned length
  * we have our own transfer functions, 2 bytes alligned */
-__weak void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts)
+static void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts)
 {
 	uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
 	ushort *dbuf;
@@ -179,7 +179,7 @@ __weak void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts)
 	}
 }
 
-__weak void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts)
+static void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts)
 {
 	uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
 	ushort *dbuf;
@@ -778,7 +778,7 @@ static void ide_init(void)
 	schedule();
 }
 
-__weak void ide_output_data(int dev, const ulong *sect_buf, int words)
+static void ide_output_data(int dev, const ulong *sect_buf, int words)
 {
 	uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
 	ushort *dbuf;
@@ -792,7 +792,7 @@ __weak void ide_output_data(int dev, const ulong *sect_buf, int words)
 	}
 }
 
-__weak void ide_input_data(int dev, ulong *sect_buf, int words)
+static void ide_input_data(int dev, ulong *sect_buf, int words)
 {
 	uintptr_t paddr = (ATA_CURR_BASE(dev) + ATA_DATA_REG);
 	ushort *dbuf;
diff --git a/include/ide.h b/include/ide.h
index 09b0117879f..8c0eb2a022f 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -22,17 +22,4 @@ ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
 ulong ide_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
 		const void *buffer);
 
-/*
- * I/O function overrides
- */
-unsigned char ide_inb(int dev, int port);
-void ide_outb(int dev, int port, unsigned char val);
-void ide_input_swap_data(int dev, ulong *sect_buf, int words);
-void ide_input_data(int dev, ulong *sect_buf, int words);
-void ide_output_data(int dev, const ulong *sect_buf, int words);
-void ide_input_data_shorts(int dev, ushort *sect_buf, int shorts);
-void ide_output_data_shorts(int dev, ushort *sect_buf, int shorts);
-
-void ide_led(uchar led, uchar status);
-
 #endif /* _IDE_H */
-- 
2.40.0.634.g4ca3ef3211-goog



More information about the U-Boot mailing list