mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
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 <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
This commit is contained in:
parent
fc8991c61c
commit
9fbb0c3aa4
2 changed files with 4 additions and 8 deletions
|
@ -72,14 +72,6 @@ static int sunxi_ahci_phy_init(u32 base)
|
||||||
|
|
||||||
void scsi_init(void)
|
void scsi_init(void)
|
||||||
{
|
{
|
||||||
printf("SUNXI SCSI INIT\n");
|
|
||||||
#ifdef CONFIG_SATAPWR
|
|
||||||
gpio_request(CONFIG_SATAPWR, "satapwr");
|
|
||||||
gpio_direction_output(CONFIG_SATAPWR, 1);
|
|
||||||
/* Give attached sata device time to power-up to avoid link timeouts */
|
|
||||||
mdelay(500);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (sunxi_ahci_phy_init(SUNXI_SATA_BASE) < 0)
|
if (sunxi_ahci_phy_init(SUNXI_SATA_BASE) < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,10 @@ int board_init(void)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
#ifdef CONFIG_SATAPWR
|
||||||
|
gpio_request(CONFIG_SATAPWR, "satapwr");
|
||||||
|
gpio_direction_output(CONFIG_SATAPWR, 1);
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_MACPWR
|
#ifdef CONFIG_MACPWR
|
||||||
gpio_request(CONFIG_MACPWR, "macpwr");
|
gpio_request(CONFIG_MACPWR, "macpwr");
|
||||||
gpio_direction_output(CONFIG_MACPWR, 1);
|
gpio_direction_output(CONFIG_MACPWR, 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue