[PATCH v2 09/30] ide: Create a prototype for ide_set_reset()

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


This is used by a board so should be in the header file. Add it.

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

(no changes since v1)

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

diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 46e110fec5e..fa5f68ffeb0 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -50,8 +50,6 @@ struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
 
 #ifdef CONFIG_IDE_RESET
-extern void ide_set_reset(int idereset);
-
 static void ide_reset(void)
 {
 	int i;
diff --git a/include/ide.h b/include/ide.h
index 8c0eb2a022f..b586ba3df4b 100644
--- a/include/ide.h
+++ b/include/ide.h
@@ -22,4 +22,14 @@ 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);
 
+/**
+ * ide_set_reset() - Assert or de-assert reset for the IDE device
+ *
+ * This is provided by boards which need to reset the device through another
+ * means, e.g. a GPIO.
+ *
+ * @idereset: 1 to assert reset, 0 to de-assert it
+ */
+void ide_set_reset(int idereset);
+
 #endif /* _IDE_H */
-- 
2.40.0.634.g4ca3ef3211-goog



More information about the U-Boot mailing list