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

Commit 34e5f4f1 authored by Russell King's avatar Russell King
Browse files

Merge branches 'debug' and 'idle' into for-armsoc

parents e76f4750 a570067d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ extern void cpu_init(void);

void soft_restart(unsigned long);
extern void (*arm_pm_restart)(char str, const char *cmd);
extern void (*arm_pm_idle)(void);

#define UDBG_UNDEFINED	(1 << 0)
#define UDBG_SYSCALL	(1 << 1)
+16 −11
Original line number Diff line number Diff line
@@ -61,8 +61,6 @@ extern void setup_mm_for_reboot(void);

static volatile int hlt_counter;

#include <mach/system.h>

void disable_hlt(void)
{
	hlt_counter++;
@@ -181,13 +179,17 @@ void cpu_idle_wait(void)
EXPORT_SYMBOL_GPL(cpu_idle_wait);

/*
 * This is our default idle handler.  We need to disable
 * interrupts here to ensure we don't miss a wakeup call.
 * This is our default idle handler.
 */

void (*arm_pm_idle)(void);

static void default_idle(void)
{
	if (!need_resched())
		arch_idle();
	if (arm_pm_idle)
		arm_pm_idle();
	else
		cpu_do_idle();
	local_irq_enable();
}

@@ -215,6 +217,10 @@ void cpu_idle(void)
				cpu_die();
#endif

			/*
			 * We need to disable interrupts here
			 * to ensure we don't miss a wakeup call.
			 */
			local_irq_disable();
#ifdef CONFIG_PL310_ERRATA_769419
			wmb();
@@ -222,20 +228,19 @@ void cpu_idle(void)
			if (hlt_counter) {
				local_irq_enable();
				cpu_relax();
			} else {
			} else if (!need_resched()) {
				stop_critical_timings();
				if (cpuidle_idle_call())
					pm_idle();
				start_critical_timings();
				/*
				 * This will eventually be removed - pm_idle
				 * functions should always return with IRQs
				 * enabled.
				 * pm_idle functions must always
				 * return with IRQs enabled.
				 */
				WARN_ON(irqs_disabled());
			} else
				local_irq_enable();
		}
		}
		leds_event(led_idle_end);
		rcu_idle_exit();
		tick_nohz_idle_exit();
+8 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@

#include <linux/module.h>

#include <asm/proc-fns.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -314,6 +315,12 @@ static struct at91_gpio_bank at91cap9_gpio[] __initdata = {
	}
};

static void at91cap9_idle(void)
{
	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
	cpu_do_idle();
}

static void at91cap9_restart(char mode, const char *cmd)
{
	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
@@ -337,6 +344,7 @@ static void __init at91cap9_ioremap_registers(void)

static void __init at91cap9_initialize(void)
{
	arm_pm_idle = at91cap9_idle;
	arm_pm_restart = at91cap9_restart;
	at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);

+10 −0
Original line number Diff line number Diff line
@@ -289,6 +289,15 @@ static struct at91_gpio_bank at91rm9200_gpio[] __initdata = {
	}
};

static void at91rm9200_idle(void)
{
	/*
	 * Disable the processor clock.  The processor will be automatically
	 * re-enabled by an interrupt or by a reset.
	 */
	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
}

static void at91rm9200_restart(char mode, const char *cmd)
{
	/*
@@ -314,6 +323,7 @@ static void __init at91rm9200_ioremap_registers(void)

static void __init at91rm9200_initialize(void)
{
	arm_pm_idle = at91rm9200_idle;
	arm_pm_restart = at91rm9200_restart;
	at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
			| (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
+8 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <linux/module.h>

#include <asm/proc-fns.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -327,8 +328,15 @@ static void __init at91sam9260_ioremap_registers(void)
	at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC);
}

static void at91sam9260_idle(void)
{
	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
	cpu_do_idle();
}

static void __init at91sam9260_initialize(void)
{
	arm_pm_idle = at91sam9260_idle;
	arm_pm_restart = at91sam9_alt_restart;
	at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
			| (1 << AT91SAM9260_ID_IRQ2);
Loading