ARM: OMAP2+: UART: Remove old and unused clocks handling funcs
With runtime adaptation done remove clock_enable/disbale API's Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
This commit is contained in:
committed by
Kevin Hilman
parent
62f3ec5fbd
commit
634bd6e481
@@ -56,8 +56,6 @@ struct omap_uart_state {
|
|||||||
int num;
|
int num;
|
||||||
int can_sleep;
|
int can_sleep;
|
||||||
|
|
||||||
int clocked;
|
|
||||||
|
|
||||||
struct list_head node;
|
struct list_head node;
|
||||||
struct omap_hwmod *oh;
|
struct omap_hwmod *oh;
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
@@ -66,36 +64,8 @@ struct omap_uart_state {
|
|||||||
static LIST_HEAD(uart_list);
|
static LIST_HEAD(uart_list);
|
||||||
static u8 num_uarts;
|
static u8 num_uarts;
|
||||||
|
|
||||||
static inline void omap_uart_enable_clocks(struct omap_uart_state *uart)
|
|
||||||
{
|
|
||||||
if (uart->clocked)
|
|
||||||
return;
|
|
||||||
|
|
||||||
omap_device_enable(uart->pdev);
|
|
||||||
uart->clocked = 1;
|
|
||||||
omap_uart_restore_context(uart);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
||||||
static inline void omap_uart_disable_clocks(struct omap_uart_state *uart)
|
|
||||||
{
|
|
||||||
if (!uart->clocked)
|
|
||||||
return;
|
|
||||||
|
|
||||||
omap_uart_save_context(uart);
|
|
||||||
uart->clocked = 0;
|
|
||||||
omap_device_idle(uart->pdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void omap_uart_block_sleep(struct omap_uart_state *uart)
|
|
||||||
{
|
|
||||||
omap_uart_enable_clocks(uart);
|
|
||||||
|
|
||||||
omap_uart_smart_idle_enable(uart, 0);
|
|
||||||
uart->can_sleep = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int omap_uart_can_sleep(void)
|
int omap_uart_can_sleep(void)
|
||||||
{
|
{
|
||||||
struct omap_uart_state *uart;
|
struct omap_uart_state *uart;
|
||||||
@@ -154,11 +124,6 @@ static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
|
|||||||
{}
|
{}
|
||||||
static void omap_uart_set_noidle(struct platform_device *pdev) {}
|
static void omap_uart_set_noidle(struct platform_device *pdev) {}
|
||||||
static void omap_uart_set_forceidle(struct platform_device *pdev) {}
|
static void omap_uart_set_forceidle(struct platform_device *pdev) {}
|
||||||
static void omap_uart_block_sleep(struct omap_uart_state *uart)
|
|
||||||
{
|
|
||||||
/* Needed to enable UART clocks when built without CONFIG_PM */
|
|
||||||
omap_uart_enable_clocks(uart);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
#ifdef CONFIG_OMAP_MUX
|
#ifdef CONFIG_OMAP_MUX
|
||||||
@@ -407,7 +372,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
|
|||||||
omap_device_enable(uart->pdev);
|
omap_device_enable(uart->pdev);
|
||||||
omap_device_idle(uart->pdev);
|
omap_device_idle(uart->pdev);
|
||||||
|
|
||||||
omap_uart_block_sleep(uart);
|
|
||||||
console_unlock();
|
console_unlock();
|
||||||
|
|
||||||
if ((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
|
if ((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
|
||||||
|
Reference in New Issue
Block a user