summaryrefslogtreecommitdiff
path: root/src/commonlib/storage
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:53:33 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-08 08:33:24 +0000
commitcd49cce7b70e80b4acc49b56bb2bb94370b4d867 (patch)
tree8e89136e2da7cf54453ba8c112eda94415b56242 /src/commonlib/storage
parentb3a8cc54dbaf833c590a56f912209a5632b71f49 (diff)
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>
Diffstat (limited to 'src/commonlib/storage')
-rw-r--r--src/commonlib/storage/mmc.c2
-rw-r--r--src/commonlib/storage/sd_mmc.c4
-rw-r--r--src/commonlib/storage/sd_mmc.h8
-rw-r--r--src/commonlib/storage/sdhci.c6
-rw-r--r--src/commonlib/storage/sdhci_display.c6
-rw-r--r--src/commonlib/storage/storage.c20
6 files changed, 23 insertions, 23 deletions
diff --git a/src/commonlib/storage/mmc.c b/src/commonlib/storage/mmc.c
index fb00892acd..3c82f51a4f 100644
--- a/src/commonlib/storage/mmc.c
+++ b/src/commonlib/storage/mmc.c
@@ -127,7 +127,7 @@ int mmc_send_ext_csd(struct sd_mmc_ctrlr *ctrlr, unsigned char *ext_csd)
rv = ctrlr->send_cmd(ctrlr, &cmd, &data);
- if (!rv && IS_ENABLED(CONFIG_SD_MMC_TRACE)) {
+ if (!rv && CONFIG(SD_MMC_TRACE)) {
int i, size;
size = data.blocks * data.blocksize;
diff --git a/src/commonlib/storage/sd_mmc.c b/src/commonlib/storage/sd_mmc.c
index 0c89085ca7..bda8d7470c 100644
--- a/src/commonlib/storage/sd_mmc.c
+++ b/src/commonlib/storage/sd_mmc.c
@@ -168,7 +168,7 @@ int sd_mmc_enter_standby(struct storage_media *media)
/* Test for SD version 2 */
err = CARD_TIMEOUT;
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_SD)) {
+ if (CONFIG(COMMONLIB_STORAGE_SD)) {
err = sd_send_if_cond(media);
/* Get SD card operating condition */
@@ -177,7 +177,7 @@ int sd_mmc_enter_standby(struct storage_media *media)
}
/* If the command timed out, we check for an MMC card */
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC) && (err == CARD_TIMEOUT)) {
+ if (CONFIG(COMMONLIB_STORAGE_MMC) && (err == CARD_TIMEOUT)) {
/* Some cards seem to need this */
sd_mmc_go_idle(media);
diff --git a/src/commonlib/storage/sd_mmc.h b/src/commonlib/storage/sd_mmc.h
index e37f8f4e13..f3a6e8adbd 100644
--- a/src/commonlib/storage/sd_mmc.h
+++ b/src/commonlib/storage/sd_mmc.h
@@ -75,12 +75,12 @@ int sd_set_partition(struct storage_media *media,
/* Controller debug functions */
#define sdhc_debug(format...) \
do { \
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)) \
+ if (CONFIG(SDHC_DEBUG)) \
printk(BIOS_DEBUG, format); \
} while (0)
#define sdhc_trace(format...) \
do { \
- if (IS_ENABLED(CONFIG_SDHC_TRACE)) \
+ if (CONFIG(SDHC_TRACE)) \
printk(BIOS_DEBUG, format); \
} while (0)
#define sdhc_error(format...) printk(BIOS_ERR, "ERROR: " format)
@@ -88,12 +88,12 @@ int sd_set_partition(struct storage_media *media,
/* Card/device debug functions */
#define sd_mmc_debug(format...) \
do { \
- if (IS_ENABLED(CONFIG_SD_MMC_DEBUG)) \
+ if (CONFIG(SD_MMC_DEBUG)) \
printk(BIOS_DEBUG, format); \
} while (0)
#define sd_mmc_trace(format...) \
do { \
- if (IS_ENABLED(CONFIG_SD_MMC_TRACE)) \
+ if (CONFIG(SD_MMC_TRACE)) \
printk(BIOS_DEBUG, format); \
} while (0)
#define sd_mmc_error(format...) printk(BIOS_ERR, "ERROR: " format)
diff --git a/src/commonlib/storage/sdhci.c b/src/commonlib/storage/sdhci.c
index fd3915f92e..8482488236 100644
--- a/src/commonlib/storage/sdhci.c
+++ b/src/commonlib/storage/sdhci.c
@@ -318,7 +318,7 @@ static int sdhci_send_command(struct sd_mmc_ctrlr *ctrlr,
sdhc_log_command(cmd);
- if (IS_ENABLED(CONFIG_SDHCI_BOUNCE_BUFFER) && data) {
+ if (CONFIG(SDHCI_BOUNCE_BUFFER) && data) {
if (data->flags & DATA_FLAG_READ) {
buf = data->dest;
bbflags = GEN_BB_WRITE;
@@ -348,7 +348,7 @@ static int sdhci_send_command(struct sd_mmc_ctrlr *ctrlr,
sdhci_led_control(ctrlr, 0);
sdhc_log_ret(ret);
- if (IS_ENABLED(CONFIG_SDHCI_BOUNCE_BUFFER) && bbstate)
+ if (CONFIG(SDHCI_BOUNCE_BUFFER) && bbstate)
bounce_buffer_stop(bbstate);
return ret;
@@ -594,7 +594,7 @@ static void sdhci_set_ios(struct sd_mmc_ctrlr *ctrlr)
}
/* Set the new bus width */
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)
+ if (CONFIG(SDHC_DEBUG)
&& ((ctrl ^ previous_ctrl) & (SDHCI_CTRL_4BITBUS
| ((version >= SDHCI_SPEC_300) ? SDHCI_CTRL_8BITBUS : 0))))
sdhc_debug("SDHCI bus width: %d bit%s\n", bus_width,
diff --git a/src/commonlib/storage/sdhci_display.c b/src/commonlib/storage/sdhci_display.c
index 68747f4b86..6545424e07 100644
--- a/src/commonlib/storage/sdhci_display.c
+++ b/src/commonlib/storage/sdhci_display.c
@@ -26,7 +26,7 @@
static void sdhci_display_bus_width(struct sdhci_ctrlr *sdhci_ctrlr)
{
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)) {
+ if (CONFIG(SDHC_DEBUG)) {
int bits;
uint8_t host_ctrl;
uint16_t host2;
@@ -53,7 +53,7 @@ static void sdhci_display_bus_width(struct sdhci_ctrlr *sdhci_ctrlr)
static void sdhci_display_clock(struct sdhci_ctrlr *sdhci_ctrlr)
{
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)) {
+ if (CONFIG(SDHC_DEBUG)) {
uint16_t clk_ctrl;
uint32_t clock;
uint32_t divisor;
@@ -79,7 +79,7 @@ static void sdhci_display_clock(struct sdhci_ctrlr *sdhci_ctrlr)
static void sdhci_display_voltage(struct sdhci_ctrlr *sdhci_ctrlr)
{
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)) {
+ if (CONFIG(SDHC_DEBUG)) {
u8 pwr_ctrl;
const char *voltage;
const char *voltage_table[8] = {
diff --git a/src/commonlib/storage/storage.c b/src/commonlib/storage/storage.c
index 927e12ff30..d8ff4bc729 100644
--- a/src/commonlib/storage/storage.c
+++ b/src/commonlib/storage/storage.c
@@ -70,7 +70,7 @@ static void display_capacity(struct storage_media *media, int partition_number)
capacity = media->capacity[partition_number];
name = storage_partition_name(media, partition_number);
separator = "";
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC) && !IS_SD(media))
+ if (CONFIG(COMMONLIB_STORAGE_MMC) && !IS_SD(media))
separator = ": ";
/* Determine the decimal divisor for the capacity */
@@ -124,7 +124,7 @@ void storage_display_setup(struct storage_media *media)
* media->write_bl_len);
/* Display the partition capacities */
- if (IS_ENABLED(CONFIG_SDHC_DEBUG)) {
+ if (CONFIG(SDHC_DEBUG)) {
for (partition_number = 0; partition_number
< ARRAY_SIZE(media->capacity); partition_number++) {
if (!media->capacity[partition_number])
@@ -175,9 +175,9 @@ int storage_startup(struct storage_media *media)
return err;
/* Increase the bus frequency */
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_SD) && IS_SD(media))
+ if (CONFIG(COMMONLIB_STORAGE_SD) && IS_SD(media))
err = sd_change_freq(media);
- else if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC)) {
+ else if (CONFIG(COMMONLIB_STORAGE_MMC)) {
err = mmc_change_freq(media);
if (!err)
mmc_update_capacity(media);
@@ -189,9 +189,9 @@ int storage_startup(struct storage_media *media)
media->caps &= ctrlr->caps;
/* Increase the bus width if possible */
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_SD) && IS_SD(media))
+ if (CONFIG(COMMONLIB_STORAGE_SD) && IS_SD(media))
err = sd_set_bus_width(media);
- else if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC))
+ else if (CONFIG(COMMONLIB_STORAGE_MMC))
err = mmc_set_bus_width(media);
if (err)
return err;
@@ -329,9 +329,9 @@ int storage_set_partition(struct storage_media *media,
/* Select the partition */
err = -1;
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_SD) && IS_SD(media))
+ if (CONFIG(COMMONLIB_STORAGE_SD) && IS_SD(media))
err = sd_set_partition(media, partition_number);
- else if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC))
+ else if (CONFIG(COMMONLIB_STORAGE_MMC))
err = mmc_set_partition(media, partition_number);
if (err)
sd_mmc_error("Invalid partition number!\n");
@@ -345,9 +345,9 @@ const char *storage_partition_name(struct storage_media *media,
/* Get the partition name */
name = NULL;
- if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_SD) && IS_SD(media))
+ if (CONFIG(COMMONLIB_STORAGE_SD) && IS_SD(media))
name = sd_partition_name(media, partition_number);
- else if (IS_ENABLED(CONFIG_COMMONLIB_STORAGE_MMC))
+ else if (CONFIG(COMMONLIB_STORAGE_MMC))
name = mmc_partition_name(media, partition_number);
return name;
}