]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/spi/tegra20_slink.c
tpm: tpm_tis_i2c: Merge struct tpm into tpm_chip
[karo-tx-uboot.git] / drivers / spi / tegra20_slink.c
index 213fa5f7939a848889e0168d1991040dd9830a61..fbb665b86f3f3faa4d2cd4dcbcca21c0da799790 100644 (file)
@@ -106,7 +106,7 @@ static int tegra30_spi_ofdata_to_platdata(struct udevice *bus)
        const void *blob = gd->fdt_blob;
        int node = bus->of_offset;
 
-       plat->base = fdtdec_get_addr(blob, node, "reg");
+       plat->base = dev_get_addr(bus);
        plat->periph_id = clock_decode_periph_id(blob, node);
 
        if (plat->periph_id == PERIPH_ID_NONE) {
@@ -141,8 +141,9 @@ static int tegra30_spi_probe(struct udevice *bus)
        return 0;
 }
 
-static int tegra30_spi_claim_bus(struct udevice *bus)
+static int tegra30_spi_claim_bus(struct udevice *dev)
 {
+       struct udevice *bus = dev->parent;
        struct tegra30_spi_priv *priv = dev_get_priv(bus);
        struct spi_regs *regs = priv->regs;
        u32 reg;
@@ -361,6 +362,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,
 };