diff options
author | Julius Werner <jwerner@chromium.org> | 2019-03-07 17:07:26 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-03-25 11:03:49 +0000 |
commit | 5d1f9a009647c741e8587015b14f1e852e1c489e (patch) | |
tree | b6e87bac2f8a578b7bee6b73111e04bd3750eeb8 /src/mainboard | |
parent | 2de19038beffa154eefe40755b607aa9f94d9f9f (diff) | |
download | coreboot-5d1f9a009647c741e8587015b14f1e852e1c489e.tar.xz |
Fix up remaining boolean uses of CONFIG_XXX to CONFIG(XXX)
This patch cleans up remaining uses of raw boolean Kconfig values I
could find by wrapping them with CONFIG(). The remaining naked config
value warnings in the code should all be false positives now (although
the process was semi-manual and involved some eyeballing so I may have
missed a few).
Change-Id: Ifa0573a535addc3354a74e944c0920befb0666be
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31813
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/olivehillplus/BiosCallOuts.c | 2 | ||||
-rw-r--r-- | src/mainboard/amd/torpedo/gpio.c | 14 | ||||
-rw-r--r-- | src/mainboard/bap/ode_e21XX/BiosCallOuts.c | 2 | ||||
-rw-r--r-- | src/mainboard/pcengines/apu1/mainboard.c | 12 | ||||
-rw-r--r-- | src/mainboard/pcengines/apu2/BiosCallOuts.c | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c index c6e575d9ee..af5d34e613 100644 --- a/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c +++ b/src/mainboard/amd/db-ft3b-lc/BiosCallOuts.c @@ -269,7 +269,7 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) if (StdHeader->Func == AMD_INIT_RESET) { FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *) FchData; printk(BIOS_DEBUG, "Fch OEM config in INIT RESET "); - FchParams->LegacyFree = CONFIG_HUDSON_LEGACY_FREE; + FchParams->LegacyFree = CONFIG(HUDSON_LEGACY_FREE); FchParams->FchReset.SataEnable = hudson_sata_enable(); FchParams->FchReset.IdeEnable = hudson_ide_enable(); FchParams->FchReset.Xhci0Enable = CONFIG(HUDSON_XHCI_ENABLE); diff --git a/src/mainboard/amd/olivehillplus/BiosCallOuts.c b/src/mainboard/amd/olivehillplus/BiosCallOuts.c index a6f4267649..e3107b18a5 100644 --- a/src/mainboard/amd/olivehillplus/BiosCallOuts.c +++ b/src/mainboard/amd/olivehillplus/BiosCallOuts.c @@ -253,7 +253,7 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *) FchData; printk(BIOS_DEBUG, "Fch OEM config in INIT RESET "); //FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */ - FchParams->LegacyFree = CONFIG_HUDSON_LEGACY_FREE; + FchParams->LegacyFree = CONFIG(HUDSON_LEGACY_FREE); FchParams->FchReset.SataEnable = hudson_sata_enable(); FchParams->FchReset.IdeEnable = hudson_ide_enable(); FchParams->FchReset.Xhci0Enable = CONFIG(HUDSON_XHCI_ENABLE); diff --git a/src/mainboard/amd/torpedo/gpio.c b/src/mainboard/amd/torpedo/gpio.c index 4a8861cd33..51e35713ea 100644 --- a/src/mainboard/amd/torpedo/gpio.c +++ b/src/mainboard/amd/torpedo/gpio.c @@ -340,7 +340,7 @@ void gpioEarlyInit(void) { // // Enable/Disable OnBoard LAN // - if (!CONFIG_ONBOARD_LAN) + if (!CONFIG(ONBOARD_LAN)) { // 1 - DISABLED RWMEM (GpioMmioAddr + SB_GPIO_REG197, AccWidthUint8, 0xBF, 0); // LOM_POWER off RWMEM (GpioMmioAddr + SB_GPIO_REG25, AccWidthUint8, 0xBF, 0); @@ -358,7 +358,7 @@ void gpioEarlyInit(void) { // // Enable/Disable 1394 // - if (!CONFIG_ONBOARD_1394) + if (!CONFIG(ONBOARD_1394)) { // 1 - DISABLED // RWMEM (GpioMmioAddr + SB_GPIO_REG170, AccWidthUint8, 0xBF, 0); // set GPIO_GATE_C to LOW RWMEM (GpioMmioAddr + SB_GPIO_REG59, AccWidthUint8, 0xBF, 0); // 1394 power off @@ -387,7 +387,7 @@ void gpioEarlyInit(void) { // GPIO172 used as FCH_USB3.0PORT_EN# 0:ENABLE; 1:DISABLE // if ((Amd_SystemConfiguration.XhciSwitch == 1) || (SystemConfiguration.amdExternalUSBController == 1)) { // disable Onboard NEC USB3.0 controller - if (!CONFIG_ONBOARD_USB30) { + if (!CONFIG(ONBOARD_USB30)) { RWMEM (GpioMmioAddr + SB_GPIO_REG200, AccWidthUint8, 0xBF, 0); RWMEM (GpioMmioAddr + SB_GPIO_REG26, AccWidthUint8, 0xBF, 0); RWMEM (GpioMmioAddr + SB_GPIO_REG46, AccWidthUint8, 0xFF, BIT3); // PULL_UP DISABLE @@ -401,7 +401,7 @@ void gpioEarlyInit(void) { // amdBlueTooth: CMOS, 0 - AUTO, 1 - DISABLE // GPIO07: BT_ON, 0 - OFF, 1 - ON // - if (!CONFIG_ONBOARD_BLUETOOTH) { + if (!CONFIG(ONBOARD_BLUETOOTH)) { //- if (SystemConfiguration.amdBlueTooth == 1) { RWMEM (GpioMmioAddr + SB_GPIO_REG07, AccWidthUint8, 0xBF, 0); //- } @@ -412,7 +412,7 @@ void gpioEarlyInit(void) { // amdWebCam: CMOS, 0 - AUTO, 1 - DISABLE // GPIO34: WEBCAM_ON#, 0 - ON, 1 - OFF // - if (!CONFIG_ONBOARD_WEBCAM) { + if (!CONFIG(ONBOARD_WEBCAM)) { //- if (SystemConfiguration.amdWebCam == 1) { RWMEM (GpioMmioAddr + SB_GPIO_REG34, AccWidthUint8, 0xBF, BIT6); //- } @@ -423,7 +423,7 @@ void gpioEarlyInit(void) { // amdTravisCtrl: CMOS, 0 - DISABLE, 1 - ENABLE // GPIO66: TRAVIS_EN#, 0 - ENABLE, 1 - DISABLE // - if (!CONFIG_ONBOARD_TRAVIS) { + if (!CONFIG(ONBOARD_TRAVIS)) { //- if (SystemConfiguration.amdTravisCtrl == 0) { RWMEM (GpioMmioAddr + SB_GPIO_REG66, AccWidthUint8, 0xBF, BIT6); //- } @@ -432,7 +432,7 @@ void gpioEarlyInit(void) { // // Disable Light Sensor if needed // - if (CONFIG_ONBOARD_LIGHTSENSOR) { + if (CONFIG(ONBOARD_LIGHTSENSOR)) { //- if (SystemConfiguration.amdLightSensor == 1) { RWMEM (IoMuxMmioAddr + SB_GEVENT_REG12, AccWidthUint8, 0x00, 0x1); //- } diff --git a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c index 362b5ba616..1d86d53be9 100644 --- a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c +++ b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c @@ -255,7 +255,7 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *) FchData; printk(BIOS_DEBUG, "Fch OEM config in INIT RESET "); //FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */ - FchParams->LegacyFree = CONFIG_HUDSON_LEGACY_FREE; + FchParams->LegacyFree = CONFIG(HUDSON_LEGACY_FREE); FchParams->FchReset.SataEnable = hudson_sata_enable(); FchParams->FchReset.IdeEnable = hudson_ide_enable(); FchParams->FchReset.Xhci0Enable = CONFIG(HUDSON_XHCI_ENABLE); diff --git a/src/mainboard/pcengines/apu1/mainboard.c b/src/mainboard/pcengines/apu1/mainboard.c index 79a54b51eb..e5e30e031c 100644 --- a/src/mainboard/pcengines/apu1/mainboard.c +++ b/src/mainboard/pcengines/apu1/mainboard.c @@ -139,16 +139,16 @@ static void config_gpio_mux(void) uart = dev_find_slot_pnp(SIO_PORT, NCT5104D_SP3); gpio = dev_find_slot_pnp(SIO_PORT, NCT5104D_GPIO0); if (uart) - uart->enabled = CONFIG_APU1_PINMUX_UART_C; + uart->enabled = CONFIG(APU1_PINMUX_UART_C); if (gpio) - gpio->enabled = CONFIG_APU1_PINMUX_GPIO0; + gpio->enabled = CONFIG(APU1_PINMUX_GPIO0); uart = dev_find_slot_pnp(SIO_PORT, NCT5104D_SP4); gpio = dev_find_slot_pnp(SIO_PORT, NCT5104D_GPIO1); if (uart) - uart->enabled = CONFIG_APU1_PINMUX_UART_D; + uart->enabled = CONFIG(APU1_PINMUX_UART_D); if (gpio) - gpio->enabled = CONFIG_APU1_PINMUX_GPIO1; + gpio->enabled = CONFIG(APU1_PINMUX_GPIO1); } static void pnp_raw_resource(struct device *dev, u8 reg, u8 val) @@ -165,11 +165,11 @@ static void config_addon_uart(void) struct device *uart; uart = dev_find_slot_pnp(SIO_PORT, NCT5104D_SP3); - if (uart && uart->enabled && CONFIG_UART_C_RS485) + if (uart && uart->enabled && CONFIG(UART_C_RS485)) pnp_raw_resource(uart, 0xf2, 0x12); uart = dev_find_slot_pnp(SIO_PORT, NCT5104D_SP4); - if (uart && uart->enabled && CONFIG_UART_D_RS485) + if (uart && uart->enabled && CONFIG(UART_D_RS485)) pnp_raw_resource(uart, 0xf2, 0x12); } diff --git a/src/mainboard/pcengines/apu2/BiosCallOuts.c b/src/mainboard/pcengines/apu2/BiosCallOuts.c index 8fc3d5a9ff..535024a86f 100644 --- a/src/mainboard/pcengines/apu2/BiosCallOuts.c +++ b/src/mainboard/pcengines/apu2/BiosCallOuts.c @@ -69,7 +69,7 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr) FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *) FchData; printk(BIOS_DEBUG, "Fch OEM config in INIT RESET "); //FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */ - FchParams->LegacyFree = CONFIG_HUDSON_LEGACY_FREE; + FchParams->LegacyFree = CONFIG(HUDSON_LEGACY_FREE); FchParams->FchReset.SataEnable = hudson_sata_enable(); FchParams->FchReset.IdeEnable = hudson_ide_enable(); FchParams->FchReset.Xhci0Enable = CONFIG(HUDSON_XHCI_ENABLE); |