X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fspi%2Fspi-pl022.c;h=7026af1956830d5c32693a21e039a273b6d14d62;hb=d3d0b024348c040f0d6851e2e59fc961677d5169;hp=43abaf22ec47ca43a17f1eb42ff8ee9970845371;hpb=9d5c627323dcf0983d699d26dd486272fc98bef2;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 43abaf22ec47..7026af195683 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2184,6 +2184,12 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) goto err_clk_prep; } + status = clk_enable(pl022->clk); + if (status) { + dev_err(&adev->dev, "could not enable SSP/SPI bus clock\n"); + goto err_no_clk_en; + } + /* Disable SSP */ writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); @@ -2237,6 +2243,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) free_irq(adev->irq[0], pl022); err_no_irq: + clk_disable(pl022->clk); + err_no_clk_en: clk_unprepare(pl022->clk); err_clk_prep: clk_put(pl022->clk);