diff options
author | Tom Rini <trini@konsulko.com> | 2021-09-27 11:09:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-27 11:09:23 -0400 |
commit | 1d1f98c8eed7bb4792300e655c2cb70136928f74 (patch) | |
tree | d08df140d52bd1298fa0e81ce908e2e09a880e5d /drivers/spi/spi-uclass.c | |
parent | e908d20fcbd847e17345591fc171b59d9a156516 (diff) | |
parent | 933bf2644591281ed96f9d5771cbb35fe95bcb00 (diff) |
Merge tag 'dm-pull-next-27sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Various of-platdata improvements, including CONFIG_OF_REAL
Diffstat (limited to 'drivers/spi/spi-uclass.c')
-rw-r--r-- | drivers/spi/spi-uclass.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index d867b27806..f8ec312d71 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,11 +176,11 @@ static int spi_child_post_bind(struct udevice *dev) static int spi_post_probe(struct udevice *bus) { -#if !CONFIG_IS_ENABLED(OF_PLATDATA) - struct dm_spi_bus *spi = dev_get_uclass_priv(bus); + 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); -#endif + spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0); + } #if defined(CONFIG_NEEDS_MANUAL_RELOC) struct dm_spi_ops *ops = spi_get_ops(bus); static int reloc_done; @@ -531,7 +531,7 @@ UCLASS_DRIVER(spi) = { .id = UCLASS_SPI, .name = "spi", .flags = DM_UC_FLAG_SEQ_ALIAS, -#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) +#if CONFIG_IS_ENABLED(OF_REAL) .post_bind = dm_scan_fdt_dev, #endif .post_probe = spi_post_probe, @@ -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 }; |