coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX)
This patch is a raw application of find src/ -type f | xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I6262d6d5c23cabe23c242b4f38d446b74fe16b88 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31774 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
committed by
Patrick Georgi
parent
b3a8cc54db
commit
cd49cce7b7
@@ -162,7 +162,7 @@ static int adesto_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -188,7 +188,7 @@ static int adesto_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: adesto: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
@@ -201,7 +201,7 @@ out:
|
||||
static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = adesto_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
@@ -136,7 +136,7 @@ static int amic_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -163,7 +163,7 @@ static int amic_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
byte_addr = 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: AMIC: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
@@ -176,7 +176,7 @@ out:
|
||||
static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = amic_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
@@ -118,7 +118,7 @@ static int atmel_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -144,7 +144,7 @@ static int atmel_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: Atmel: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
@@ -157,7 +157,7 @@ out:
|
||||
static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = atmel_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
@@ -257,7 +257,7 @@ static int eon_write(const struct spi_flash *flash,
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW,
|
||||
"PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zu\n",
|
||||
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -279,7 +279,7 @@ static int eon_write(const struct spi_flash *flash,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: EON: Successfully programmed %zu bytes @ %#x\n",
|
||||
len, (unsigned int)(offset - len));
|
||||
#endif
|
||||
|
@@ -184,7 +184,7 @@ static int gigadevice_write(const struct spi_flash *flash, u32 offset,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW,
|
||||
"PP gigadevice.c: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
@@ -206,7 +206,7 @@ static int gigadevice_write(const struct spi_flash *flash, u32 offset,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW,
|
||||
"SF gigadevice.c: Successfully programmed %zu bytes @ %#x\n",
|
||||
len, (unsigned int)(offset - len));
|
||||
@@ -222,7 +222,7 @@ static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = gigadevice_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
.status = spi_flash_cmd_status,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
@@ -230,7 +230,7 @@ static int macronix_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n",
|
||||
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -256,7 +256,7 @@ static int macronix_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: Macronix: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
@@ -268,7 +268,7 @@ static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = macronix_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
.status = spi_flash_cmd_status,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
@@ -245,7 +245,7 @@ static int spansion_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n",
|
||||
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -271,7 +271,7 @@ static int spansion_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: SPANSION: Successfully programmed %zu bytes @ 0x%x\n",
|
||||
len, offset);
|
||||
#endif
|
||||
|
@@ -217,7 +217,7 @@ int spi_flash_cmd_erase(const struct spi_flash *flash, u32 offset, size_t len)
|
||||
spi_flash_addr(offset, cmd);
|
||||
offset += erase_size;
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: erase %2x %2x %2x %2x (%x)\n", cmd[0], cmd[1],
|
||||
cmd[2], cmd[3], offset);
|
||||
#endif
|
||||
@@ -276,38 +276,38 @@ static struct {
|
||||
struct spi_flash *flash);
|
||||
} flashes[] = {
|
||||
/* Keep it sorted by define name */
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_AMIC)
|
||||
#if CONFIG(SPI_FLASH_AMIC)
|
||||
{ 0, 0x37, spi_flash_probe_amic, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_ATMEL)
|
||||
#if CONFIG(SPI_FLASH_ATMEL)
|
||||
{ 0, 0x1f, spi_flash_probe_atmel, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_EON)
|
||||
#if CONFIG(SPI_FLASH_EON)
|
||||
{ 0, 0x1c, spi_flash_probe_eon, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_GIGADEVICE)
|
||||
#if CONFIG(SPI_FLASH_GIGADEVICE)
|
||||
{ 0, 0xc8, spi_flash_probe_gigadevice, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_MACRONIX)
|
||||
#if CONFIG(SPI_FLASH_MACRONIX)
|
||||
{ 0, 0xc2, spi_flash_probe_macronix, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_SPANSION)
|
||||
#if CONFIG(SPI_FLASH_SPANSION)
|
||||
{ 0, 0x01, spi_flash_probe_spansion, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_SST)
|
||||
#if CONFIG(SPI_FLASH_SST)
|
||||
{ 0, 0xbf, spi_flash_probe_sst, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_STMICRO)
|
||||
#if CONFIG(SPI_FLASH_STMICRO)
|
||||
{ 0, 0x20, spi_flash_probe_stmicro, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_WINBOND)
|
||||
#if CONFIG(SPI_FLASH_WINBOND)
|
||||
{ 0, 0xef, spi_flash_probe_winbond, },
|
||||
#endif
|
||||
/* Keep it sorted by best detection */
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_STMICRO)
|
||||
#if CONFIG(SPI_FLASH_STMICRO)
|
||||
{ 0, 0xff, spi_flash_probe_stmicro, },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_ADESTO)
|
||||
#if CONFIG(SPI_FLASH_ADESTO)
|
||||
{ 0, 0x1f, spi_flash_probe_adesto, },
|
||||
#endif
|
||||
};
|
||||
@@ -324,7 +324,7 @@ int spi_flash_generic_probe(const struct spi_slave *spi,
|
||||
if (ret)
|
||||
return -1;
|
||||
|
||||
if (IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)) {
|
||||
if (CONFIG(DEBUG_SPI_FLASH)) {
|
||||
printk(BIOS_SPEW, "SF: Got idcode: ");
|
||||
for (i = 0; i < sizeof(idcode); i++)
|
||||
printk(BIOS_SPEW, "%02x ", idcode[i]);
|
||||
@@ -511,7 +511,7 @@ int spi_flash_volatile_group_begin(const struct spi_flash *flash)
|
||||
uint32_t count;
|
||||
int ret = 0;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||
return ret;
|
||||
|
||||
count = car_get_var(volatile_group_count);
|
||||
@@ -528,7 +528,7 @@ int spi_flash_volatile_group_end(const struct spi_flash *flash)
|
||||
uint32_t count;
|
||||
int ret = 0;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||
return ret;
|
||||
|
||||
count = car_get_var(volatile_group_count);
|
||||
@@ -547,7 +547,7 @@ void lb_spi_flash(struct lb_header *header)
|
||||
struct lb_spi_flash *flash;
|
||||
const struct spi_flash *spi_flash_dev;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_BOOT_DEVICE_SPI_FLASH))
|
||||
if (!CONFIG(BOOT_DEVICE_SPI_FLASH))
|
||||
return;
|
||||
|
||||
flash = (struct lb_spi_flash *)lb_new_record(header);
|
||||
|
@@ -168,7 +168,7 @@ sst_byte_write(const struct spi_flash *flash, u32 offset, const void *buf)
|
||||
offset,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "BP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
||||
spi_w8r8(&flash->spi, CMD_SST_RDSR), buf, cmd[0], offset);
|
||||
#endif
|
||||
@@ -223,7 +223,7 @@ static int sst_write_256(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n",
|
||||
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -250,7 +250,7 @@ static int sst_write_256(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
}
|
||||
|
||||
done:
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: SST: program %s %zu bytes @ 0x%lx\n",
|
||||
ret ? "failure" : "success", len, (unsigned long)offset - actual);
|
||||
#endif
|
||||
@@ -284,7 +284,7 @@ static int sst_write_ai(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[3] = offset;
|
||||
|
||||
for (; actual < len - 1; actual += 2) {
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "WP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
||||
spi_w8r8(&flash->spi, CMD_SST_RDSR), buf + actual, cmd[0],
|
||||
offset);
|
||||
@@ -313,7 +313,7 @@ static int sst_write_ai(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
ret = sst_byte_write(flash, offset, buf + actual);
|
||||
|
||||
done:
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: SST: program %s %zu bytes @ 0x%lx\n",
|
||||
ret ? "failure" : "success", len, (unsigned long)offset - actual);
|
||||
#endif
|
||||
|
@@ -312,7 +312,7 @@ static int stmicro_write(const struct spi_flash *flash,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n",
|
||||
buf + actual, cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -338,7 +338,7 @@ static int stmicro_write(const struct spi_flash *flash,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: STMicro: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
|
@@ -300,7 +300,7 @@ static int winbond_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
cmd[1] = (offset >> 16) & 0xff;
|
||||
cmd[2] = (offset >> 8) & 0xff;
|
||||
cmd[3] = offset & 0xff;
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "PP: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
@@ -326,7 +326,7 @@ static int winbond_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
offset += chunk_len;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
|
||||
#if CONFIG(DEBUG_SPI_FLASH)
|
||||
printk(BIOS_SPEW, "SF: Winbond: Successfully programmed %zu bytes @"
|
||||
" 0x%lx\n", len, (unsigned long)(offset - len));
|
||||
#endif
|
||||
@@ -657,7 +657,7 @@ static const struct spi_flash_ops spi_flash_ops = {
|
||||
.write = winbond_write,
|
||||
.erase = spi_flash_cmd_erase,
|
||||
.status = spi_flash_cmd_status,
|
||||
#if IS_ENABLED(CONFIG_SPI_FLASH_NO_FAST_READ)
|
||||
#if CONFIG(SPI_FLASH_NO_FAST_READ)
|
||||
.read = spi_flash_cmd_read_slow,
|
||||
#else
|
||||
.read = spi_flash_cmd_read_fast,
|
||||
|
Reference in New Issue
Block a user