mb/amd/crater/ec: Make macro ENABLE_M2_SSD1 a Kconfig option

Move the option to enable M.2 SDD slot to Kconfig file instead of using
a macro. Its already used like a Kconfig option later on, so the if
condition actually works now.

Change-Id: I104eae5501da6ed1fe43039f88d6722c1e54e82d
Signed-off-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com>
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Ana Carolina Cabral 2025-04-24 11:12:49 -03:00 committed by Felix Held
commit c9f124a8fb
2 changed files with 8 additions and 3 deletions

View file

@ -92,6 +92,12 @@ config ENABLE_EVAL_19V
help
Enable the 19V rail for Eval Card PCIe slot
config ENABLE_M2_SSD
bool "Enable M.2 SSD Slot"
default y
help
Use GPP[8:11] connected to M.2 SSD
choice
prompt "XGBE/WWAN/WLAN/DT Selection"
default XGBE_WWAN_WLAN

View file

@ -9,7 +9,6 @@
#define CRATER_EC_CMD 0x666
#define CRATER_EC_DATA 0x662
#define ENABLE_M2_SSD1 1
#define EC_GPIO_0_ADDR 0xA0
#define EC_EVAL_PWREN BIT(0)
@ -144,7 +143,7 @@ static void configure_ec_gpio(void)
ec_write(EC_GPIO_4_ADDR, tmp);
tmp = ec_read(EC_GPIO_7_ADDR);
if (CONFIG(ENABLE_M2_SSD1)) {
if (CONFIG(ENABLE_M2_SSD)) {
tmp |= (EC7_ODD_SSD_SW | EC7_SSD_HDD_SW);
} else {
tmp &= ~(EC7_ODD_SSD_SW | EC7_SSD_HDD_SW);
@ -162,7 +161,7 @@ static void configure_ec_gpio(void)
ec_write(EC_GPIO_7_ADDR, tmp);
tmp = ec_read(EC_GPIO_8_ADDR);
if (CONFIG(ENABLE_M2_SSD1)) {
if (CONFIG(ENABLE_M2_SSD)) {
tmp |= EC8_M2SSD_PWREN;
} else {
tmp &= ~EC8_M2SSD_PWREN;