Skip to content

Commit

Permalink
spl: sata: support boot without ahci or scsi
Browse files Browse the repository at this point in the history
Use non-ahci sata_get_dev and sata_initialize to access sata from spl in
absence of CONFIG_AHCI and CONFIG_SCSI.

Signed-off-by: Josua Mayer <josua@solid-run.com>
  • Loading branch information
Josua-SR committed Sep 4, 2023
1 parent b7569bf commit 5b6bc28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/spl/spl_sata.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,20 @@ static int spl_sata_load_image(struct spl_image_info *spl_image,
{
int err;
struct blk_desc *stor_dev;

#ifndef CONFIG_AHCI
err = sata_initialize();
#else
err = init_sata(CONFIG_SPL_SATA_BOOT_DEVICE);
#endif
if (err) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("spl: sata init failed: err - %d\n", err);
#endif
return err;
} else {
#ifndef CONFIG_AHCI
stor_dev = sata_get_dev(CONFIG_SPL_SATA_BOOT_DEVICE);
#endif
#ifdef CONFIG_SCSI
/* try to recognize storage devices immediately */
scsi_scan(false);
Expand Down

0 comments on commit 5b6bc28

Please sign in to comment.