mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
bootstd: sata: Add bootstd support for ahci sata
Add ahci sata bootdev and corresponding hunting function. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
7a790f018a
commit
a7527fbbf2
5 changed files with 113 additions and 5 deletions
|
@ -188,12 +188,20 @@ static int script_boot(struct udevice *dev, struct bootflow *bflow)
|
|||
{
|
||||
struct blk_desc *desc = dev_get_uclass_plat(bflow->blk);
|
||||
ulong addr;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (desc->uclass_id == UCLASS_USB)
|
||||
if (desc->uclass_id == UCLASS_USB) {
|
||||
ret = env_set("devtype", "usb");
|
||||
else
|
||||
ret = env_set("devtype", blk_get_devtype(bflow->blk));
|
||||
} else {
|
||||
/* If the uclass is AHCI, but the driver is ATA
|
||||
* (not scsi), set devtype to sata
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_SATA) &&
|
||||
desc->uclass_id == UCLASS_AHCI)
|
||||
ret = env_set("devtype", "sata");
|
||||
else
|
||||
ret = env_set("devtype", blk_get_devtype(bflow->blk));
|
||||
}
|
||||
if (!ret)
|
||||
ret = env_set_hex("devnum", desc->devnum);
|
||||
if (!ret)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue