summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/serial/8250.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:55:15 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-07 17:15:30 +0000
commiteab2a29c8bb0fafebd398cf60425dee37df27820 (patch)
tree419dab747e0148442c1a7ac7082fcfe37784ea27 /payloads/libpayload/drivers/serial/8250.c
parentb431833c129e0d6402c6f7be8e6028e4b54e94fb (diff)
payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX)
This patch is a raw application of find payloads/ -type f | \ xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I883b03b189f59b5d998a09a2596b0391a2d5cf33 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/drivers/serial/8250.c')
-rw-r--r--payloads/libpayload/drivers/serial/8250.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/payloads/libpayload/drivers/serial/8250.c b/payloads/libpayload/drivers/serial/8250.c
index 9327304248..f503bdb124 100644
--- a/payloads/libpayload/drivers/serial/8250.c
+++ b/payloads/libpayload/drivers/serial/8250.c
@@ -41,7 +41,7 @@ static uint8_t serial_read_reg(int offset)
{
offset *= lib_sysinfo.serial->regwidth;
-#if IS_ENABLED(CONFIG_LP_IO_ADDRESS_SPACE)
+#if CONFIG(LP_IO_ADDRESS_SPACE)
if (!serial_is_mem_mapped)
return inb(IOBASE + offset);
else
@@ -56,7 +56,7 @@ static void serial_write_reg(uint8_t val, int offset)
{
offset *= lib_sysinfo.serial->regwidth;
-#if IS_ENABLED(CONFIG_LP_IO_ADDRESS_SPACE)
+#if CONFIG(LP_IO_ADDRESS_SPACE)
if (!serial_is_mem_mapped)
outb(val, IOBASE + offset);
else
@@ -67,13 +67,13 @@ static void serial_write_reg(uint8_t val, int offset)
writeb(val, MEMBASE + offset);
}
-#if IS_ENABLED(CONFIG_LP_SERIAL_SET_SPEED)
+#if CONFIG(LP_SERIAL_SET_SPEED)
static void serial_hardware_init(int speed, int word_bits,
int parity, int stop_bits)
{
unsigned char reg;
-#if !IS_ENABLED(CONFIG_LP_PL011_SERIAL_CONSOLE)
+#if !CONFIG(LP_PL011_SERIAL_CONSOLE)
/* Disable interrupts. */
serial_write_reg(0, 0x01);
@@ -114,7 +114,7 @@ void serial_init(void)
(lib_sysinfo.serial->type == CB_SERIAL_TYPE_MEMORY_MAPPED);
if (!serial_is_mem_mapped) {
-#if IS_ENABLED(CONFIG_LP_IO_ADDRESS_SPACE)
+#if CONFIG(LP_IO_ADDRESS_SPACE)
if ((inb(IOBASE + 0x05) == 0xFF) &&
(inb(IOBASE + 0x06) == 0xFF)) {
printf("IO space mapped serial not present.");
@@ -126,7 +126,7 @@ void serial_init(void)
#endif
}
-#if IS_ENABLED(CONFIG_LP_SERIAL_SET_SPEED)
+#if CONFIG(LP_SERIAL_SET_SPEED)
serial_hardware_init(CONFIG_LP_SERIAL_BAUD_RATE, 8, 0, 1);
#endif
}
@@ -147,7 +147,7 @@ void serial_putchar(unsigned int c)
{
if (!serial_hardware_is_present)
return;
-#if !IS_ENABLED(CONFIG_LP_PL011_SERIAL_CONSOLE)
+#if !CONFIG(LP_PL011_SERIAL_CONSOLE)
while ((serial_read_reg(0x05) & 0x20) == 0) ;
#endif
serial_write_reg(c, 0x00);