Commit 12082ba2 authored by Shinya Kuribayashi's avatar Shinya Kuribayashi Committed by Greg Kroah-Hartman

serial8250-em: convert to clk_prepare/unprepare

Add calls to clk_prepare and unprepare so that EMMA Mobile EV2 can
migrate to the common clock framework.
Signed-off-by: default avatarShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
[takashi.yoshii.ze@renesas.com: edited for conflicts]
Signed-off-by: default avatarTakashi Yoshii <takashi.yoshii.zj@renesas.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8eaede49
...@@ -122,7 +122,7 @@ static int serial8250_em_probe(struct platform_device *pdev) ...@@ -122,7 +122,7 @@ static int serial8250_em_probe(struct platform_device *pdev)
up.port.dev = &pdev->dev; up.port.dev = &pdev->dev;
up.port.private_data = priv; up.port.private_data = priv;
clk_enable(priv->sclk); clk_prepare_enable(priv->sclk);
up.port.uartclk = clk_get_rate(priv->sclk); up.port.uartclk = clk_get_rate(priv->sclk);
up.port.iotype = UPIO_MEM32; up.port.iotype = UPIO_MEM32;
...@@ -134,7 +134,7 @@ static int serial8250_em_probe(struct platform_device *pdev) ...@@ -134,7 +134,7 @@ static int serial8250_em_probe(struct platform_device *pdev)
ret = serial8250_register_8250_port(&up); ret = serial8250_register_8250_port(&up);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "unable to register 8250 port\n"); dev_err(&pdev->dev, "unable to register 8250 port\n");
clk_disable(priv->sclk); clk_disable_unprepare(priv->sclk);
return ret; return ret;
} }
...@@ -148,7 +148,7 @@ static int serial8250_em_remove(struct platform_device *pdev) ...@@ -148,7 +148,7 @@ static int serial8250_em_remove(struct platform_device *pdev)
struct serial8250_em_priv *priv = platform_get_drvdata(pdev); struct serial8250_em_priv *priv = platform_get_drvdata(pdev);
serial8250_unregister_port(priv->line); serial8250_unregister_port(priv->line);
clk_disable(priv->sclk); clk_disable_unprepare(priv->sclk);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment