|
@@ -2596,6 +2596,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
|
|
|
device_init_wakeup(&pdev->dev, 1);
|
|
|
platform_set_drvdata(pdev, port);
|
|
|
|
|
|
+ /*
|
|
|
+ * The peripheral clock has been disabled by atmel_init_port():
|
|
|
+ * enable it before accessing I/O registers
|
|
|
+ */
|
|
|
+ clk_prepare_enable(port->clk);
|
|
|
+
|
|
|
if (rs485_enabled) {
|
|
|
UART_PUT_MR(&port->uart, ATMEL_US_USMODE_NORMAL);
|
|
|
UART_PUT_CR(&port->uart, ATMEL_US_RTSEN);
|
|
@@ -2606,6 +2612,12 @@ static int atmel_serial_probe(struct platform_device *pdev)
|
|
|
*/
|
|
|
atmel_get_ip_name(&port->uart);
|
|
|
|
|
|
+ /*
|
|
|
+ * The peripheral clock can now safely be disabled till the port
|
|
|
+ * is used
|
|
|
+ */
|
|
|
+ clk_disable_unprepare(port->clk);
|
|
|
+
|
|
|
return 0;
|
|
|
|
|
|
err_add_port:
|