From patchwork Mon Mar 11 23:13:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 2252081 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork1.kernel.org (Postfix) with ESMTP id 7779C4020C for ; Mon, 11 Mar 2013 23:33:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UFCDW-0003kL-QJ; Mon, 11 Mar 2013 23:33:18 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UFCDT-0003kB-Ux for spi-devel-general@lists.sourceforge.net; Mon, 11 Mar 2013 23:33:16 +0000 X-ACL-Warn: Received: from arrakis.dune.hu ([78.24.191.176]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1UFCDT-0004QY-0d for spi-devel-general@lists.sourceforge.net; Mon, 11 Mar 2013 23:33:15 +0000 Received: from arrakis.dune.hu ([127.0.0.1]) by localhost (arrakis.dune.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6wJ79DY_MuoK; Tue, 12 Mar 2013 00:13:41 +0100 (CET) Received: from shaker64.lan (dslb-088-073-030-092.pools.arcor-ip.net [88.73.30.92]) by arrakis.dune.hu (Postfix) with ESMTPSA id 460DE2844E4; Tue, 12 Mar 2013 00:13:41 +0100 (CET) From: Jonas Gorski To: spi-devel-general@lists.sourceforge.net Subject: [PATCH 03/12] spi/bcm63xx: properly prepare clocks before enabling them Date: Tue, 12 Mar 2013 00:13:38 +0100 Message-Id: <1363043627-23524-4-git-send-email-jogo@openwrt.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363043627-23524-1-git-send-email-jogo@openwrt.org> References: <1363043627-23524-1-git-send-email-jogo@openwrt.org> X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1UFCDT-0004QY-0d Cc: Maxime Bizon , Mark Brown , Florian Fainelli , Kevin Cernekee X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net Use proper clk_prepare/unprepare calls in preparation for switching to the generic clock framework. Signed-off-by: Jonas Gorski --- drivers/spi/spi-bcm63xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index d7df435..ef9b89f 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -493,7 +493,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) } /* Initialize hardware */ - clk_enable(bs->clk); + clk_prepare_enable(bs->clk); bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); /* register and we are done */ @@ -509,7 +509,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) return 0; out_clk_disable: - clk_disable(clk); + clk_disable_unprepare(clk); out_err: platform_set_drvdata(pdev, NULL); spi_master_put(master); @@ -530,7 +530,7 @@ static int bcm63xx_spi_remove(struct platform_device *pdev) bcm_spi_writeb(bs, 0, SPI_INT_MASK); /* HW shutdown */ - clk_disable(bs->clk); + clk_disable_unprepare(bs->clk); clk_put(bs->clk); platform_set_drvdata(pdev, 0); @@ -549,7 +549,7 @@ static int bcm63xx_spi_suspend(struct device *dev) spi_master_suspend(master); - clk_disable(bs->clk); + clk_disable_unprepare(bs->clk); return 0; } @@ -560,7 +560,7 @@ static int bcm63xx_spi_resume(struct device *dev) platform_get_drvdata(to_platform_device(dev)); struct bcm63xx_spi *bs = spi_master_get_devdata(master); - clk_enable(bs->clk); + clk_prepare_enable(bs->clk); spi_master_resume(master);