From: Chee Hong Ang Date: Wed, 5 Aug 2020 18:18:38 +0800 Subject: [PATCH v1] spi: cadence_qspi: Probe fail if QSPI clock is not set Message-ID: <20200805101838.180134-1-chee.hong.ang@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If the QSPI clock is not set (read as 0), QSPI driver probe shall fail and prevent further QSPI access. Signed-off-by: Chee Hong Ang --- drivers/spi/cadence_qspi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index 1e85749209..3bb5c7031d 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -170,6 +170,9 @@ static int cadence_spi_probe(struct udevice *bus) struct clk clk; int ret; + if (!CONFIG_CQSPI_REF_CLK) + return -ENODEV; + priv->regbase = plat->regbase; priv->ahbbase = plat->ahbbase; -- 2.19.0