msm_serial_hs_lite: Enable clocks when adding the port

Enable the GSBI bus clock when calling uart_add_one_port in
the probe function to allow a clean transition from the
early console to the regular console. The TTY layer may try
to configure the port before the early console became
deactivated, which will prematurely disable the clocks and
cause a lockup.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
Stepan Moskovchenko
2011-08-23 17:08:55 -07:00
committed by Bryan Huntsman
parent 7706e8ed97
commit 72029d6bca

View File

@@ -1171,8 +1171,15 @@ static int __devinit msm_serial_hsl_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, port);
pm_runtime_enable(port->dev);
msm_hsl_debugfs_init(msm_hsl_port, pdev->id);
ret = uart_add_one_port(&msm_hsl_uart_driver, port);
/* Temporarily increase the refcount on the GSBI clock to avoid a race
* condition with the earlyprintk handover mechanism.
*/
if (msm_hsl_port->pclk)
clk_enable(msm_hsl_port->pclk);
ret = uart_add_one_port(&msm_hsl_uart_driver, port);
if (msm_hsl_port->pclk)
clk_disable(msm_hsl_port->pclk);
return ret;
}