Commit f826caa4 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Haavard Skinnemoen

atmel_serial: Fix build on avr32 with CONFIG_PM enabled

AVR32 doesn't have at91_suspend_entering_slow_clock(). Just assume the
clock will keep running for now.

David has a better solution for this, but this works for now. Leaving
the USART clock running won't prevent the PM code from entering deep
power-down modes anyway.
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Victor <linux@maxim.org.za>
parent 38510754
...@@ -1439,6 +1439,15 @@ static struct uart_driver atmel_uart = { ...@@ -1439,6 +1439,15 @@ static struct uart_driver atmel_uart = {
}; };
#ifdef CONFIG_PM #ifdef CONFIG_PM
static bool atmel_serial_clk_will_stop(void)
{
#ifdef CONFIG_ARCH_AT91
return at91_suspend_entering_slow_clock();
#else
return false;
#endif
}
static int atmel_serial_suspend(struct platform_device *pdev, static int atmel_serial_suspend(struct platform_device *pdev,
pm_message_t state) pm_message_t state)
{ {
...@@ -1446,7 +1455,7 @@ static int atmel_serial_suspend(struct platform_device *pdev, ...@@ -1446,7 +1455,7 @@ static int atmel_serial_suspend(struct platform_device *pdev,
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
if (device_may_wakeup(&pdev->dev) if (device_may_wakeup(&pdev->dev)
&& !at91_suspend_entering_slow_clock()) && !atmel_serial_clk_will_stop())
enable_irq_wake(port->irq); enable_irq_wake(port->irq);
else { else {
uart_suspend_port(&atmel_uart, port); uart_suspend_port(&atmel_uart, port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment