Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc38e2ad authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] pxa: Fix RCSR handling



Related to d3930614.

RCSR is only present on PXA2xx CPUs, not on PXA3xx CPUs.  Therefore,
we should not be unconditionally writing to RCSR from generic code.

Since we now clear the RCSR status from the SoC specific PXA PM code
and before reset in the arch_reset() function, the duplication in
the corgi, poodle, spitz and tosa code can be removed.

Acked-by: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ffebabe0
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -493,8 +493,6 @@ static struct platform_device *devices[] __initdata = {

static void corgi_poweroff(void)
{
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

	if (!machine_is_corgi())
		/* Green LED off tells the bootloader to halt */
		reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
@@ -503,8 +501,6 @@ static void corgi_poweroff(void)

static void corgi_restart(char mode)
{
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

	if (!machine_is_corgi())
		/* Green LED on tells the bootloader to reboot */
		set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
+0 −3
Original line number Diff line number Diff line
@@ -46,9 +46,6 @@ int pxa_pm_enter(suspend_state_t state)
			sleep_save_checksum += sleep_save[i];
	}

	/* Clear reset status */
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

	/* *** go zzz *** */
	pxa_cpu_pm_fns->enter(state);
	cpu_init();
+0 −2
Original line number Diff line number Diff line
@@ -326,13 +326,11 @@ static struct platform_device *devices[] __initdata = {

static void poodle_poweroff(void)
{
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
	arm_machine_restart('h');
}

static void poodle_restart(char mode)
{
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
	arm_machine_restart('h');
}

+3 −0
Original line number Diff line number Diff line
@@ -198,6 +198,9 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)

static void pxa25x_cpu_pm_enter(suspend_state_t state)
{
	/* Clear reset status */
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

	switch (state) {
	case PM_SUSPEND_MEM:
		/* set resume return address */
+3 −0
Original line number Diff line number Diff line
@@ -249,6 +249,9 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
	/* Clear edge-detect status register. */
	PEDR = 0xDF12FE1B;

	/* Clear reset status */
	RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

	switch (state) {
	case PM_SUSPEND_STANDBY:
		pxa_cpu_standby();
Loading