Merge branch 'master' of git://git.denx.de/u-boot-imx
[oweals/u-boot.git] / drivers / spi / tegra20_slink.c
index 238edec23ba59e65d9b90e0b8a0f485b5b9c66ce..1d99a1e910e5cff3151c6fdd32d554373b9eb527 100644 (file)
@@ -94,7 +94,7 @@ static int tegra30_spi_ofdata_to_platdata(struct udevice *bus)
 {
        struct tegra_spi_platdata *plat = bus->platdata;
        const void *blob = gd->fdt_blob;
-       int node = bus->of_offset;
+       int node = dev_of_offset(bus);
 
        plat->base = dev_get_addr(bus);
        plat->periph_id = clock_decode_periph_id(blob, node);
@@ -128,6 +128,10 @@ static int tegra30_spi_probe(struct udevice *bus)
        priv->freq = plat->frequency;
        priv->periph_id = plat->periph_id;
 
+       /* Change SPI clock to correct frequency, PLLP_OUT0 source */
+       clock_start_periph_pll(priv->periph_id, CLOCK_ID_PERIPH,
+                              priv->freq);
+
        return 0;
 }