summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 16:24:04 +0300
committerSimon Glass <sjg@chromium.org>2021-09-25 18:46:15 +0300
commit95397385091da9d0d3acd7e69199ae23114ac22c (patch)
tree6e1aae135d09408f32f16c8195e1af185a5b132b /drivers/spi
parent414cc15144f69b66d12aa8881192e34862bc6042 (diff)
downloadu-boot-95397385091da9d0d3acd7e69199ae23114ac22c.tar.xz
treewide: Use OF_REAL instead of !OF_PLATDATA
Now that we have a 'positive' Kconfig option, use this instead of the negative one, which is harder to understand. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/ich.c6
-rw-r--r--drivers/spi/pl022_spi.c4
-rw-r--r--drivers/spi/rk_spi.c2
-rw-r--r--drivers/spi/spi-uclass.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 08d54e86f4..42071bb70c 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -604,7 +604,7 @@ static int ich_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op)
return ret;
}
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
/**
* ich_spi_get_basics() - Get basic information about the ICH device
*
@@ -672,7 +672,7 @@ static int ich_get_mmap_bus(struct udevice *bus, ulong *map_basep,
uint *map_sizep, uint *offsetp)
{
pci_dev_t spi_bdf;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
if (device_is_on_pci_bus(bus)) {
struct pci_child_plat *pplat;
@@ -940,7 +940,7 @@ static int ich_spi_of_to_plat(struct udevice *dev)
{
struct ich_spi_plat *plat = dev_get_plat(dev);
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct ich_spi_priv *priv = dev_get_priv(dev);
int ret;
diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c
index 9856a5669c..ea1691438b 100644
--- a/drivers/spi/pl022_spi.c
+++ b/drivers/spi/pl022_spi.c
@@ -286,7 +286,7 @@ static const struct dm_spi_ops pl022_spi_ops = {
.cs_info = pl022_cs_info,
};
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
static int pl022_spi_of_to_plat(struct udevice *bus)
{
struct pl022_spi_pdata *plat = dev_get_plat(bus);
@@ -315,7 +315,7 @@ static const struct udevice_id pl022_spi_ids[] = {
U_BOOT_DRIVER(pl022_spi) = {
.name = "pl022_spi",
.id = UCLASS_SPI,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
.of_match = pl022_spi_ids,
.of_to_plat = pl022_spi_of_to_plat,
#endif
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 40bd8851b7..e504e306fd 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -193,7 +193,7 @@ static int conv_of_plat(struct udevice *dev)
static int rockchip_spi_of_to_plat(struct udevice *bus)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct rockchip_spi_plat *plat = dev_get_plat(bus);
struct rockchip_spi_priv *priv = dev_get_priv(bus);
int ret;
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 5a2a743678..655fb1407a 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -162,7 +162,7 @@ int spi_write_then_read(struct spi_slave *slave, const u8 *opcode,
return ret;
}
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
static int spi_child_post_bind(struct udevice *dev)
{
struct dm_spi_slave_plat *plat = dev_get_parent_plat(dev);
@@ -176,7 +176,7 @@ static int spi_child_post_bind(struct udevice *dev)
static int spi_post_probe(struct udevice *bus)
{
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0);
@@ -539,7 +539,7 @@ UCLASS_DRIVER(spi) = {
.per_device_auto = sizeof(struct dm_spi_bus),
.per_child_auto = sizeof(struct spi_slave),
.per_child_plat_auto = sizeof(struct dm_spi_slave_plat),
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
.child_post_bind = spi_child_post_bind,
#endif
};