diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2008-02-24 08:34:45 -0500 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-02 05:05:00 -0400 |
commit | f826caa44902ddbe93174f0b642d8abf9698c08e (patch) | |
tree | 65bacbe5fc6d31291d57fcdc390ccb3d6ba87bb1 | |
parent | 38510754a50192a072210e24fdc4ae65592182f0 (diff) |
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: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Victor <linux@maxim.org.za>
-rw-r--r-- | drivers/serial/atmel_serial.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 42be8b01a40f..5f0414fc1b10 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1439,6 +1439,15 @@ static struct uart_driver atmel_uart = { | |||
1439 | }; | 1439 | }; |
1440 | 1440 | ||
1441 | #ifdef CONFIG_PM | 1441 | #ifdef CONFIG_PM |
1442 | static bool atmel_serial_clk_will_stop(void) | ||
1443 | { | ||
1444 | #ifdef CONFIG_ARCH_AT91 | ||
1445 | return at91_suspend_entering_slow_clock(); | ||
1446 | #else | ||
1447 | return false; | ||
1448 | #endif | ||
1449 | } | ||
1450 | |||
1442 | static int atmel_serial_suspend(struct platform_device *pdev, | 1451 | static int atmel_serial_suspend(struct platform_device *pdev, |
1443 | pm_message_t state) | 1452 | pm_message_t state) |
1444 | { | 1453 | { |
@@ -1446,7 +1455,7 @@ static int atmel_serial_suspend(struct platform_device *pdev, | |||
1446 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); | 1455 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); |
1447 | 1456 | ||
1448 | if (device_may_wakeup(&pdev->dev) | 1457 | if (device_may_wakeup(&pdev->dev) |
1449 | && !at91_suspend_entering_slow_clock()) | 1458 | && !atmel_serial_clk_will_stop()) |
1450 | enable_irq_wake(port->irq); | 1459 | enable_irq_wake(port->irq); |
1451 | else { | 1460 | else { |
1452 | uart_suspend_port(&atmel_uart, port); | 1461 | uart_suspend_port(&atmel_uart, port); |