From 9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 22 Mar 2016 20:10:30 +0100 Subject: sunxi: Turn satapwr on from board_init There are 2 reasons for doing this: 1) The main reason for doing this is to move it outside of board/sunxi/ahci.c, so that it can be used on boards which use a usb<->sata chip too; 2) While doing this I realized that doing it from board_init also meant doing it much earlier. Some printf get_timer(0) calls show that the time between board_init() and scsi_init() is more then 600 ms, so we can drop the mdelay(500) While at it also drop the printf("SUNXI SCSI INIT\n") AHCI init is noisy enough by itself. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- board/sunxi/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'board/sunxi/board.c') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index e16718f..2e2a1f5 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -90,6 +90,10 @@ int board_init(void) if (ret) return ret; +#ifdef CONFIG_SATAPWR + gpio_request(CONFIG_SATAPWR, "satapwr"); + gpio_direction_output(CONFIG_SATAPWR, 1); +#endif #ifdef CONFIG_MACPWR gpio_request(CONFIG_MACPWR, "macpwr"); gpio_direction_output(CONFIG_MACPWR, 1); -- cgit v1.1