src: Don't use a #defines like Kconfig symbols

This is spotted using ./util/lint/kconfig_lint
To work around the issue, rename the prefix from `CONFIG_` to `CONF_`.

Change-Id: Ia31aed366bf768ab167ed5f8595bee8234aac46b
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Elyes HAOUAS
2019-01-23 11:36:44 +01:00
committed by Patrick Georgi
parent 9e946079e8
commit 251514d986
10 changed files with 42 additions and 42 deletions

View File

@@ -40,7 +40,7 @@
#define PNP_IRQ1 IRQ1
#define PNP_DMA0 DMA0
#define CONFIG_MODE_MUTEX CMMX
#define CONF_MODE_MUTEX CMMX
#define ENTER_CONFIG_MODE ENCM
#define EXIT_CONFIG_MODE EXCM
#define SWITCH_LDN SWLD

View File

@@ -37,7 +37,7 @@
* Mutex for accesses to the configuration ports (prolog and
* epilog commands are used, so synchronization is useful)
*/
Mutex(CONFIG_MODE_MUTEX, 1)
Mutex(CONF_MODE_MUTEX, 1)
/*
* Enter configuration mode (and aquire mutex)
@@ -47,7 +47,7 @@ Mutex(CONFIG_MODE_MUTEX, 1)
*/
Method (ENTER_CONFIG_MODE, 1)
{
Acquire (CONFIG_MODE_MUTEX, 0xFFFF)
Acquire (CONF_MODE_MUTEX, 0xFFFF)
#ifdef PNP_ENTER_MAGIC_1ST
Store (PNP_ENTER_MAGIC_1ST, PNP_ADDR_REG)
#ifdef PNP_ENTER_MAGIC_2ND
@@ -77,12 +77,12 @@ Method (EXIT_CONFIG_MODE)
#if defined(PNP_EXIT_SPECIAL_REG) && defined(PNP_EXIT_SPECIAL_VAL)
Store (PNP_EXIT_SPECIAL_VAL, PNP_EXIT_SPECIAL_REG)
#endif
Release (CONFIG_MODE_MUTEX)
Release (CONF_MODE_MUTEX)
}
/*
* Just change the LDN. Make sure that you are in config mode (or
* have otherwise acquired CONFIG_MODE_MUTEX), when calling.
* have otherwise acquired CONF_MODE_MUTEX), when calling.
*/
Method (SWITCH_LDN, 1)
{

View File

@@ -49,16 +49,16 @@ void try_enabling_LPC47N207_uart(void)
u16 lpc_port;
int i, j;
#define CONFIG_ENABLE 0x55
#define CONFIG_DISABLE 0xaa
#define CONF_ENABLE 0x55
#define CONF_DISABLE 0xaa
for (j = 0; j < ARRAY_SIZE(lpc_ports); j++) {
lpc_port = lpc_ports[j];
/* enable CONFIG mode */
outb(CONFIG_ENABLE, lpc_port);
outb(CONF_ENABLE, lpc_port);
reg_value = inb(lpc_port);
if (reg_value != CONFIG_ENABLE) {
if (reg_value != CONF_ENABLE) {
continue; /* There is no LPC device at this address */
}
@@ -94,6 +94,6 @@ void try_enabling_LPC47N207_uart(void)
outb(reg_value, lpc_port + 1);
}
} while (0);
outb(CONFIG_DISABLE, lpc_port);
outb(CONF_DISABLE, lpc_port);
}
}