dm: spi: Move the per-child data size to the uclass

This is common to all SPI drivers and specifies a structure used by the
uclass. It makes more sense to define it in the uclass.

Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
master
Simon Glass 10 years ago
parent dac8db2ce6
commit 19a25f672c
  1. 1
      drivers/spi/cadence_qspi.c
  2. 1
      drivers/spi/designware_spi.c
  3. 1
      drivers/spi/exynos_spi.c
  4. 1
      drivers/spi/sandbox_spi.c
  5. 1
      drivers/spi/soft_spi.c
  6. 1
      drivers/spi/spi-uclass.c
  7. 1
      drivers/spi/tegra114_spi.c
  8. 1
      drivers/spi/tegra20_sflash.c
  9. 1
      drivers/spi/tegra20_slink.c

@ -340,6 +340,5 @@ U_BOOT_DRIVER(cadence_spi) = {
.ofdata_to_platdata = cadence_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct cadence_spi_platdata),
.priv_auto_alloc_size = sizeof(struct cadence_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = cadence_spi_probe,
};

@ -421,6 +421,5 @@ U_BOOT_DRIVER(dw_spi) = {
.ofdata_to_platdata = dw_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct dw_spi_platdata),
.priv_auto_alloc_size = sizeof(struct dw_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = dw_spi_probe,
};

@ -425,6 +425,5 @@ U_BOOT_DRIVER(exynos_spi) = {
.ofdata_to_platdata = exynos_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct exynos_spi_platdata),
.priv_auto_alloc_size = sizeof(struct exynos_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = exynos_spi_probe,
};

@ -160,6 +160,5 @@ U_BOOT_DRIVER(spi_sandbox) = {
.name = "spi_sandbox",
.id = UCLASS_SPI,
.of_match = sandbox_spi_ids,
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.ops = &sandbox_spi_ops,
};

@ -240,7 +240,6 @@ U_BOOT_DRIVER(soft_spi) = {
.ofdata_to_platdata = soft_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct soft_spi_platdata),
.priv_auto_alloc_size = sizeof(struct soft_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = soft_spi_probe,
.child_pre_probe = soft_spi_child_pre_probe,
};

@ -348,6 +348,7 @@ UCLASS_DRIVER(spi) = {
.post_bind = spi_post_bind,
.post_probe = spi_post_probe,
.per_device_auto_alloc_size = sizeof(struct dm_spi_bus),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
};
UCLASS_DRIVER(spi_generic) = {

@ -407,6 +407,5 @@ U_BOOT_DRIVER(tegra114_spi) = {
.ofdata_to_platdata = tegra114_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct tegra_spi_platdata),
.priv_auto_alloc_size = sizeof(struct tegra114_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = tegra114_spi_probe,
};

@ -348,6 +348,5 @@ U_BOOT_DRIVER(tegra20_sflash) = {
.ofdata_to_platdata = tegra20_sflash_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct tegra_spi_platdata),
.priv_auto_alloc_size = sizeof(struct tegra20_sflash_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = tegra20_sflash_probe,
};

@ -361,6 +361,5 @@ U_BOOT_DRIVER(tegra30_spi) = {
.ofdata_to_platdata = tegra30_spi_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct tegra_spi_platdata),
.priv_auto_alloc_size = sizeof(struct tegra30_spi_priv),
.per_child_auto_alloc_size = sizeof(struct spi_slave),
.probe = tegra30_spi_probe,
};

Loading…
Cancel
Save