diff options
author | Olof Johansson <olof@lixom.net> | 2012-02-09 00:32:04 +0100 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-02-09 00:32:04 +0100 |
commit | ac819a86a76dc29d18306f5c998c38af1ebb58cd (patch) | |
tree | c1d5b4280897edebdf8954b4290b26b105110c84 /drivers | |
parent | Merge branch 'at91-3.4-base+device_board' of git://github.com/at91linux/linux... (diff) | |
parent | mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare (diff) | |
download | linux-ac819a86a76dc29d18306f5c998c38af1ebb58cd.tar.xz linux-ac819a86a76dc29d18306f5c998c38af1ebb58cd.zip |
Merge branch 'features/imx-clk-prepare' of git://git.pengutronix.de/git/imx/linux-2.6 into next/drivers
* 'features/imx-clk-prepare' of git://git.pengutronix.de/git/imx/linux-2.6:
mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
i2c: imx: add clk_prepare/clk_unprepare
serial: imx: add clk_prepare/clk_unprepare
ARM: mx31moboard: add clk_prepare/clk_unprepare
ARM: pm-imx5: add clk_prepare/clk_unprepare
ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
ARM: mxc: epit: add clk_prepare/clk_unprepare
ARM: mxc: pwm: add clk_prepare/clk_unprepare
ARM: mxc: ahci: add clk_prepare/clk_unprepare
ARM: mxc: time: add clk_prepare/clk_unprepare
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 6 | ||||
-rw-r--r-- | drivers/tty/serial/imx.c | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 58832e578fff..8d1ab6fa88e1 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -196,7 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx) dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__); - clk_enable(i2c_imx->clk); + clk_prepare_enable(i2c_imx->clk); writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR); /* Enable I2C controller */ writeb(0, i2c_imx->base + IMX_I2C_I2SR); @@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) /* Disable I2C controller */ writeb(0, i2c_imx->base + IMX_I2C_I2CR); - clk_disable(i2c_imx->clk); + clk_disable_unprepare(i2c_imx->clk); } static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d601e41af282..f4e82d45cafa 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -463,7 +463,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev) err = PTR_ERR(clk); goto err_clk_get; } - clk_enable(clk); + clk_prepare_enable(clk); pltfm_host->clk = clk; if (!is_imx25_esdhc(imx_data)) @@ -558,7 +558,7 @@ no_card_detect_irq: gpio_free(boarddata->wp_gpio); no_card_detect_pin: no_board_data: - clk_disable(pltfm_host->clk); + clk_disable_unprepare(pltfm_host->clk); clk_put(pltfm_host->clk); err_clk_get: kfree(imx_data); @@ -585,7 +585,7 @@ static int __devexit sdhci_esdhc_imx_remove(struct platform_device *pdev) gpio_free(boarddata->cd_gpio); } - clk_disable(pltfm_host->clk); + clk_disable_unprepare(pltfm_host->clk); clk_put(pltfm_host->clk); kfree(imx_data); diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 0b7fed746b27..e7feceeebc2f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1508,7 +1508,7 @@ static int serial_imx_probe(struct platform_device *pdev) ret = PTR_ERR(sport->clk); goto unmap; } - clk_enable(sport->clk); + clk_prepare_enable(sport->clk); sport->port.uartclk = clk_get_rate(sport->clk); @@ -1531,8 +1531,8 @@ deinit: if (pdata && pdata->exit) pdata->exit(pdev); clkput: + clk_disable_unprepare(sport->clk); clk_put(sport->clk); - clk_disable(sport->clk); unmap: iounmap(sport->port.membase); free: @@ -1552,11 +1552,10 @@ static int serial_imx_remove(struct platform_device *pdev) if (sport) { uart_remove_one_port(&imx_reg, &sport->port); + clk_disable_unprepare(sport->clk); clk_put(sport->clk); } - clk_disable(sport->clk); - if (pdata && pdata->exit) pdata->exit(pdev); |