From 5325533ce7440d6a9afa7d1cfbe80f53a4849fa3 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Tue, 8 Jan 2019 15:53:49 +0200 Subject: [PATCH] spi: Be more verbose in case of unsupported SoCs Signed-off-by: Priit Laes --- fel-spiflash.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fel-spiflash.c b/fel-spiflash.c index 4359e21..0039b06 100644 --- a/fel-spiflash.c +++ b/fel-spiflash.c @@ -144,8 +144,11 @@ static bool spi0_init(feldev_handle *dev) { uint32_t reg_val; soc_info_t *soc_info = dev->soc_info; - if (!soc_info) + if (!soc_info) { + printf("Unable to fetch device information. " + "Possibly unknown device.\n"); return false; + } /* Setup SPI0 pins muxing */ switch (soc_info->soc_id) { @@ -164,6 +167,8 @@ static bool spi0_init(feldev_handle *dev) gpio_set_cfgpin(dev, PC, 3, SUN50I_GPC_SPI0); break; default: /* Unknown/Unsupported SoC */ + printf("SPI support not implemented yet for %x (%s)!\n", + soc_info->soc_id, soc_info->name); return false; }