summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-11-19 09:06:44 -0500
committerTom Rini <trini@konsulko.com>2015-11-19 09:06:44 -0500
commit4c60850792e003bcafd16c324237a19307763829 (patch)
treed1e10e279d5505e71fa9e263eb80e0a23c5bfc1b /drivers/spi
parenta7c06cd3a6c2c889bd115f43f3de0c9fcc066f96 (diff)
parent2588f2ddfd60ac617c05def14e9a92fd329721fe (diff)
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-uclass.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 58388efbc3..3c7d64ae63 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -118,6 +118,26 @@ static int spi_post_probe(struct udevice *bus)
spi->max_hz = fdtdec_get_int(gd->fdt_blob, bus->of_offset,
"spi-max-frequency", 0);
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
+ struct dm_spi_ops *ops = spi_get_ops(bus);
+
+
+ if (ops->claim_bus)
+ ops->claim_bus += gd->reloc_off;
+ if (ops->release_bus)
+ ops->release_bus += gd->reloc_off;
+ if (ops->set_wordlen)
+ ops->set_wordlen += gd->reloc_off;
+ if (ops->xfer)
+ ops->xfer += gd->reloc_off;
+ if (ops->set_speed)
+ ops->set_speed += gd->reloc_off;
+ if (ops->set_mode)
+ ops->set_mode += gd->reloc_off;
+ if (ops->cs_info)
+ ops->cs_info += gd->reloc_off;
+#endif
+
return 0;
}