diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-11-14 20:56:43 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-11-20 19:02:12 +0100 |
commit | 84693d3dd40bdb291ec8dd92f99a4349da0db62b (patch) | |
tree | 1c7bce1b7ac1f6f8fa80a0bf32f9cdd360ca81c5 /src/southbridge/amd/agesa/hudson/hudson.h | |
parent | 3bff5d906423fa4ac3bc3877f0f82dfa8426e86f (diff) | |
download | coreboot-84693d3dd40bdb291ec8dd92f99a4349da0db62b.tar.xz |
AGESA: Refactor HUDSON_SATA_MODE
Expose one CONFIG_ variable instead of seven to C preprocessor.
Change-Id: Ib815127561d320a5e8f8e6ef168933d81809521e
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7494
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/southbridge/amd/agesa/hudson/hudson.h')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/hudson.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/southbridge/amd/agesa/hudson/hudson.h b/src/southbridge/amd/agesa/hudson/hudson.h index 286e11ca37..90c3205ed1 100644 --- a/src/southbridge/amd/agesa/hudson/hudson.h +++ b/src/southbridge/amd/agesa/hudson/hudson.h @@ -55,6 +55,18 @@ #define SPI_ROM_ENABLE 0x02 #define SPI_BASE_ADDRESS 0xFEC10000 +static inline int hudson_sata_enable(void) +{ + /* True if IDE or AHCI. */ + return (CONFIG_HUDSON_SATA_MODE == 0) || (CONFIG_HUDSON_SATA_MODE == 2); +} + +static inline int hudson_ide_enable(void) +{ + /* True if IDE or LEGACY IDE. */ + return (CONFIG_HUDSON_SATA_MODE == 0) || (CONFIG_HUDSON_SATA_MODE == 3); +} + #ifndef __SMM__ void pm_write8(u8 reg, u8 value); |