[U-Boot] [PATCH 05/23] dm: sunxi: Make sure that GPIOs are requested

Simon Glass sjg at chromium.org
Sat Oct 4 19:29:39 CEST 2014


The scsi_init() function uses a GPIO so should request it. There is no
way to return an error here, and the request may be made multiple times,
so just ignore errors for now.

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

 board/sunxi/ahci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/sunxi/ahci.c b/board/sunxi/ahci.c
index 0c262ea..5e12328 100644
--- a/board/sunxi/ahci.c
+++ b/board/sunxi/ahci.c
@@ -74,6 +74,7 @@ void scsi_init(void)
 {
 	printf("SUNXI SCSI INIT\n");
 #ifdef CONFIG_SATAPWR
+	gpio_request(CONFIG_SATAPWR, "satapwr");
 	gpio_direction_output(CONFIG_SATAPWR, 1);
 #endif
 
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list