diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-01-26 20:26:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:04 -0400 |
commit | 7279b82cb1975ba4e337a549757f17418cfdffad (patch) | |
tree | be97311b59bf95471ab2aa6e303e92c9a4427ac9 /arch/sparc/kernel/leon_kernel.c | |
parent | 684151a75bf25f5aeb8a23010da91a34e17b7353 (diff) |
SPARC/LEON: power down instruction different of different LEONs
The way a LEON is powered down is implemented differently depending
on CHIP type. The AMBA Plug&Play system ID tells revision of GRLIB
and CHIP.
This is for example needed by the GR-LEON4-ITX board and the UT699.
Previously the power down support for LEON was limited to SMP, now
both SMP and UP systems use the instruction.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/leon_kernel.c')
-rw-r--r-- | arch/sparc/kernel/leon_kernel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index fdab7f854f80..2f8a9a25d10d 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -30,6 +30,7 @@ struct amba_apb_device leon_percpu_timer_dev[16]; | |||
30 | int leondebug_irq_disable; | 30 | int leondebug_irq_disable; |
31 | int leon_debug_irqout; | 31 | int leon_debug_irqout; |
32 | static int dummy_master_l10_counter; | 32 | static int dummy_master_l10_counter; |
33 | unsigned long amba_system_id; | ||
33 | 34 | ||
34 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ | 35 | unsigned long leon3_gptimer_irq; /* interrupt controller irq number */ |
35 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ | 36 | unsigned long leon3_gptimer_idx; /* Timer Index (0..6) within Timer Core */ |
@@ -117,10 +118,16 @@ void __init leon_init_timers(irq_handler_t counter_fn) | |||
117 | master_l10_counter = (unsigned int *)&dummy_master_l10_counter; | 118 | master_l10_counter = (unsigned int *)&dummy_master_l10_counter; |
118 | dummy_master_l10_counter = 0; | 119 | dummy_master_l10_counter = 0; |
119 | 120 | ||
120 | /*Find IRQMP IRQ Controller Registers base address otherwise bail out.*/ | ||
121 | rootnp = of_find_node_by_path("/ambapp0"); | 121 | rootnp = of_find_node_by_path("/ambapp0"); |
122 | if (!rootnp) | 122 | if (!rootnp) |
123 | goto bad; | 123 | goto bad; |
124 | |||
125 | /* Find System ID: GRLIB build ID and optional CHIP ID */ | ||
126 | pp = of_find_property(rootnp, "systemid", &len); | ||
127 | if (pp) | ||
128 | amba_system_id = *(unsigned long *)pp->value; | ||
129 | |||
130 | /* Find IRQMP IRQ Controller Registers base adr otherwise bail out */ | ||
124 | np = of_find_node_by_name(rootnp, "GAISLER_IRQMP"); | 131 | np = of_find_node_by_name(rootnp, "GAISLER_IRQMP"); |
125 | if (!np) { | 132 | if (!np) { |
126 | np = of_find_node_by_name(rootnp, "01_00d"); | 133 | np = of_find_node_by_name(rootnp, "01_00d"); |