diff options
author | Simon Glass <sjg@chromium.org> | 2015-07-03 03:16:11 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-06 06:06:14 +0300 |
commit | c7d50e7fb9cc7e71dde7d630b157334e7f8b63fb (patch) | |
tree | dcae32ebbabfd184d6c4681b4e618913857ef9db /drivers/spi/exynos_spi.c | |
parent | 048dba0191b55f635468671d942347651067d7e4 (diff) | |
download | u-boot-c7d50e7fb9cc7e71dde7d630b157334e7f8b63fb.tar.xz |
exynos: spi: Convert the timeout to debug()
Since the timeout is reported through normal channels, and is sometimes
expected (e.g. if the bus is being probed for a non-existent device),
don't display the message in the driver.
In general, drivers should not write to the console as this limits their
usefulness in error conditions.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi/exynos_spi.c')
-rw-r--r-- | drivers/spi/exynos_spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index 67f6b2d7cd..6d77c319e7 100644 --- a/drivers/spi/exynos_spi.c +++ b/drivers/spi/exynos_spi.c @@ -190,9 +190,9 @@ static int spi_rx_tx(struct exynos_spi_priv *priv, int todo, spi_request_bytes(regs, toread, step); } if (priv->skip_preamble && get_timer(start) > 100) { - printf("SPI timeout: in_bytes=%d, out_bytes=%d, ", - in_bytes, out_bytes); - return -1; + debug("SPI timeout: in_bytes=%d, out_bytes=%d, ", + in_bytes, out_bytes); + return -ETIMEDOUT; } } |