]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ARM: sa1111: fix pcmcia suspend/resume
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 6 Sep 2016 13:34:05 +0000 (14:34 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:07:11 +0000 (08:07 -0500)
commit1f4c88297ea303f82099e78813e9c76ee8ac9458
tree846eaf9c4f506837e51c0c36130d330de39c2e8e
parent18ad588428bc3a3ce65fa47376efd9d144800146
ARM: sa1111: fix pcmcia suspend/resume

BugLink: http://bugs.launchpad.net/bugs/1631468
commit 06dfe5cc0cc684e735cb0232fdb756d30780b05d upstream.

SA1111 PCMCIA was broken when PCMCIA switched to using dev_pm_ops for
the PCMCIA socket class.  PCMCIA used to handle suspend/resume via the
socket hosting device, which happened at normal device suspend/resume
time.

However, the referenced commit changed this: much of the resume now
happens much earlier, in the noirq resume handler of dev_pm_ops.

However, on SA1111, the PCMCIA device is not accessible as the SA1111
has not been resumed at _noirq time.  It's slightly worse than that,
because the SA1111 has already been put to sleep at _noirq time, so
suspend doesn't work properly.

Fix this by converting the core SA1111 code to use dev_pm_ops as well,
and performing its own suspend/resume at noirq time.

This fixes these errors in the kernel log:

pcmcia_socket pcmcia_socket0: time out after reset
pcmcia_socket pcmcia_socket1: time out after reset

and the resulting lack of PCMCIA cards after a S2RAM cycle.

Fixes: d7646f7632549 ("pcmcia: use dev_pm_ops for class pcmcia_socket_class")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/arm/common/sa1111.c