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;
+ if (!uart_console(port)) {
+ retval = clk_prepare_enable(sport->clk_per);
+ if (retval)
+ goto error_out1;
+ retval = clk_prepare_enable(sport->clk_ipg);
+ if (retval) {
+ clk_disable_unprepare(sport->clk_per);
+ goto error_out1;
+ }
+ }
imx_setup_ufcr(sport, 0);
goto deinit;
platform_set_drvdata(pdev, sport);
- clk_disable_unprepare(sport->clk_per);
- clk_disable_unprepare(sport->clk_ipg);
+ if (!uart_console(&sport->port)) {
+ clk_disable_unprepare(sport->clk_per);
+ clk_disable_unprepare(sport->clk_ipg);
+ }
return 0;
deinit: