int retval;
unsigned long flags, temp;
+ retval = clk_prepare_enable(sport->clk_per);
+ if (retval)
+ goto error_out1;
+
+ retval = clk_prepare_enable(sport->clk_ipg);
+ if (retval)
+ goto error_out1;
+
imx_setup_ufcr(sport, 0);
/* disable the DREN bit (Data Ready interrupt enable) before
writel(temp, sport->port.membase + UCR1);
spin_unlock_irqrestore(&sport->port.lock, flags);
+
+ clk_disable_unprepare(sport->clk_per);
+ clk_disable_unprepare(sport->clk_ipg);
}
static void
goto deinit;
platform_set_drvdata(pdev, sport);
+ clk_disable_unprepare(sport->clk_per);
+ clk_disable_unprepare(sport->clk_ipg);
+
return 0;
deinit:
if (pdata && pdata->exit)
uart_remove_one_port(&imx_reg, &sport->port);
- clk_disable_unprepare(sport->clk_per);
- clk_disable_unprepare(sport->clk_ipg);
-
if (pdata && pdata->exit)
pdata->exit(pdev);