aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/amba-pl011.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index bf82e28770a9..72ba0c6d3551 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -826,6 +826,28 @@ static int pl011_remove(struct amba_device *dev)
826 return 0; 826 return 0;
827} 827}
828 828
829#ifdef CONFIG_PM
830static int pl011_suspend(struct amba_device *dev, pm_message_t state)
831{
832 struct uart_amba_port *uap = amba_get_drvdata(dev);
833
834 if (!uap)
835 return -EINVAL;
836
837 return uart_suspend_port(&amba_reg, &uap->port);
838}
839
840static int pl011_resume(struct amba_device *dev)
841{
842 struct uart_amba_port *uap = amba_get_drvdata(dev);
843
844 if (!uap)
845 return -EINVAL;
846
847 return uart_resume_port(&amba_reg, &uap->port);
848}
849#endif
850
829static struct amba_id pl011_ids[] __initdata = { 851static struct amba_id pl011_ids[] __initdata = {
830 { 852 {
831 .id = 0x00041011, 853 .id = 0x00041011,
@@ -847,6 +869,10 @@ static struct amba_driver pl011_driver = {
847 .id_table = pl011_ids, 869 .id_table = pl011_ids,
848 .probe = pl011_probe, 870 .probe = pl011_probe,
849 .remove = pl011_remove, 871 .remove = pl011_remove,
872#ifdef CONFIG_PM
873 .suspend = pl011_suspend,
874 .resume = pl011_resume,
875#endif
850}; 876};
851 877
852static int __init pl011_init(void) 878static int __init pl011_init(void)