summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2020-06-29 15:58:38 -0400
committerTom Rini <[email protected]>2020-06-29 15:58:38 -0400
commit50c9b0e1ddce280823484579c4ecc1f069e7833b (patch)
tree16908165e841adefa0e68693bf07a7fdb67084ab /cmd
parent04f005d552eb748582678a45119b55a99f75748e (diff)
parent28964227069d3f0ff3110b8064d547f6cd9fcfa6 (diff)
Merge branch '2020-06-26-more-Kconfig-migration' into next
- Bring in the first pass at cleaning up config headers that reference symbols that already have Kconfig symbols. - In order to do that, bring in the small series that adds CONFIG_SPL_DM_SPI_FLASH and makes more use of CONFIG_$(SPL_TPL_)DM_SPI in order to allow for disabling those features in SPL stuff but using them in full U-Boot
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sf.c4
-rw-r--r--cmd/spi.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/sf.c b/cmd/sf.c
index d18f6a888ce..c0d6a8f8a06 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -91,7 +91,7 @@ static int do_spi_flash_probe(int argc, char *const argv[])
unsigned int speed = CONFIG_SF_DEFAULT_SPEED;
unsigned int mode = CONFIG_SF_DEFAULT_MODE;
char *endp;
-#ifdef CONFIG_DM_SPI_FLASH
+#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
struct udevice *new, *bus_dev;
int ret;
#else
@@ -124,7 +124,7 @@ static int do_spi_flash_probe(int argc, char *const argv[])
return -1;
}
-#ifdef CONFIG_DM_SPI_FLASH
+#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
/* Remove the old device, otherwise probe will just be a nop */
ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new);
if (!ret) {
diff --git a/cmd/spi.c b/cmd/spi.c
index aec912167c6..4aea1914129 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -38,7 +38,7 @@ static int do_spi_xfer(int bus, int cs)
struct spi_slave *slave;
int ret = 0;
-#ifdef CONFIG_DM_SPI
+#if CONFIG_IS_ENABLED(DM_SPI)
char name[30], *str;
struct udevice *dev;
@@ -63,7 +63,7 @@ static int do_spi_xfer(int bus, int cs)
goto done;
ret = spi_xfer(slave, bitlen, dout, din,
SPI_XFER_BEGIN | SPI_XFER_END);
-#ifndef CONFIG_DM_SPI
+#if !CONFIG_IS_ENABLED(DM_SPI)
/* We don't get an error code in this case */
if (ret)
ret = -EIO;
@@ -79,7 +79,7 @@ static int do_spi_xfer(int bus, int cs)
}
done:
spi_release_bus(slave);
-#ifndef CONFIG_DM_SPI
+#if !CONFIG_IS_ENABLED(DM_SPI)
spi_free_slave(slave);
#endif