mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 02:15:57 +00:00
[ARM] pxa: save/restore PGSR on suspend/resume.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
This commit is contained in:
parent
1406de8e11
commit
818bc81444
@ -322,6 +322,7 @@ static inline void pxa27x_mfp_init(void) {}
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static unsigned long saved_gafr[2][4];
|
static unsigned long saved_gafr[2][4];
|
||||||
static unsigned long saved_gpdr[4];
|
static unsigned long saved_gpdr[4];
|
||||||
|
static unsigned long saved_pgsr[4];
|
||||||
|
|
||||||
static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
|
static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
|
||||||
{
|
{
|
||||||
@ -332,6 +333,7 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
|
|||||||
saved_gafr[0][i] = GAFR_L(i);
|
saved_gafr[0][i] = GAFR_L(i);
|
||||||
saved_gafr[1][i] = GAFR_U(i);
|
saved_gafr[1][i] = GAFR_U(i);
|
||||||
saved_gpdr[i] = GPDR(i * 32);
|
saved_gpdr[i] = GPDR(i * 32);
|
||||||
|
saved_pgsr[i] = PGSR(i);
|
||||||
|
|
||||||
GPDR(i * 32) = gpdr_lpm[i];
|
GPDR(i * 32) = gpdr_lpm[i];
|
||||||
}
|
}
|
||||||
@ -346,6 +348,7 @@ static int pxa2xx_mfp_resume(struct sys_device *d)
|
|||||||
GAFR_L(i) = saved_gafr[0][i];
|
GAFR_L(i) = saved_gafr[0][i];
|
||||||
GAFR_U(i) = saved_gafr[1][i];
|
GAFR_U(i) = saved_gafr[1][i];
|
||||||
GPDR(i * 32) = saved_gpdr[i];
|
GPDR(i * 32) = saved_gpdr[i];
|
||||||
|
PGSR(i) = saved_pgsr[i];
|
||||||
}
|
}
|
||||||
PSSR = PSSR_RDH | PSSR_PH;
|
PSSR = PSSR_RDH | PSSR_PH;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user