diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-04-19 13:01:09 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-21 08:59:29 +0000 |
commit | 0a937754ee81ba7491d9687f9473096d8364e9f4 (patch) | |
tree | 808d4ca9b4e5aae44140f94b0eb731664b21e798 /src/southbridge/intel/i82801jx/sata.c | |
parent | 8d94b36eed2a182fab008e5477a4eddc4dd282df (diff) |
sb/intel/x/sata.c: Use `get_int_option` for `sata_mode`
Change-Id: Ifd1f3969281e67d1a6ab7eb99dd048799c0cb17d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/southbridge/intel/i82801jx/sata.c')
-rw-r--r-- | src/southbridge/intel/i82801jx/sata.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/southbridge/intel/i82801jx/sata.c b/src/southbridge/intel/i82801jx/sata.c index fa56654e47..4d83388d43 100644 --- a/src/southbridge/intel/i82801jx/sata.c +++ b/src/southbridge/intel/i82801jx/sata.c @@ -129,7 +129,6 @@ static void sata_init(struct device *const dev) /* Get the chip configuration */ const config_t *const config = dev->chip_info; - u8 sata_mode; printk(BIOS_DEBUG, "i82801jx_sata: initializing...\n"); @@ -139,9 +138,8 @@ static void sata_init(struct device *const dev) return; } - if (get_option(&sata_mode, "sata_mode") != CB_SUCCESS) - /* Default to AHCI */ - sata_mode = 0; + /* Default to AHCI */ + u8 sata_mode = get_int_option("sata_mode", 0); /* * TODO: In contrast to ICH7 and PCH code we don't set @@ -202,14 +200,12 @@ static void sata_enable(struct device *dev) const config_t *const config = dev->chip_info; u16 map = 0; - u8 sata_mode; if (!config) return; - if (get_option(&sata_mode, "sata_mode") != CB_SUCCESS) - /* Default to AHCI */ - sata_mode = 0; + /* Default to AHCI */ + u8 sata_mode = get_int_option("sata_mode", 0); /* * Set SATA controller mode early so the resource allocator can |