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

Commit 2c74a0ce authored by Russell King's avatar Russell King
Browse files

ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform code



The first and second arguments shouldn't concern platform code, so
hide them from each platforms caller.

Tested-by: default avatarKevin Hilman <khilman@ti.com>
Acked-by: default avatarJean Pihet <j-pihet@ti.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 14c79bbe
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
#ifndef __ASM_ARM_SUSPEND_H
#define __ASM_ARM_SUSPEND_H

#include <asm/memory.h>

extern void cpu_resume(void);

/*
 * Hide the first two arguments to __cpu_suspend - these are an implementation
 * detail which platform code shouldn't have to know about.
 */
static inline void cpu_suspend(unsigned long arg, void (*fn)(unsigned long))
{
	extern void __cpu_suspend(int, long, unsigned long,
				  void (*)(unsigned long));
	__cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, arg, fn);
}

#endif
+0 −2
Original line number Diff line number Diff line
@@ -106,8 +106,6 @@ extern void __show_regs(struct pt_regs *);

extern int cpu_architecture(void);
extern void cpu_init(void);
extern void cpu_suspend(int, long, unsigned long, void (*)(unsigned long));
extern void cpu_resume(void);

void arm_machine_restart(char mode, const char *cmd);
extern void (*arm_pm_restart)(char str, const char *cmd);
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 *  r3 = suspend function
 * Note: does not return until system resumes
 */
ENTRY(cpu_suspend)
ENTRY(__cpu_suspend)
	stmfd	sp!, {r4 - r11, lr}
#ifdef MULTI_CPU
	ldr	r10, =processor
@@ -56,7 +56,7 @@ ENTRY(cpu_suspend)
	bl	__cpuc_flush_kern_all
#endif
	ldmfd	sp!, {r0, pc}		@ call suspend fn
ENDPROC(cpu_suspend)
ENDPROC(__cpu_suspend)
	.ltorg

/*
+3 −2
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
#include <linux/console.h>
#include <trace/events/power.h>

#include <asm/suspend.h>

#include <plat/sram.h>
#include "clockdomain.h"
#include "powerdomain.h"
@@ -411,8 +413,7 @@ void omap_sram_idle(void)
	 * from there before resuming.
	 */
	if (save_state == 1 || save_state == 3)
		cpu_suspend(0, PHYS_OFFSET - PAGE_OFFSET, save_state,
			    omap34xx_do_sram_idle);
		cpu_suspend(save_state, omap34xx_do_sram_idle);
	else
		omap34xx_do_sram_idle(save_state);

+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <linux/i2c-gpio.h>

#include <asm/mach-types.h>
#include <asm/suspend.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

Loading