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>
This commit is contained in:
committed by
David S. Miller
parent
684151a75b
commit
7279b82cb1
@@ -30,6 +30,7 @@ struct amba_apb_device leon_percpu_timer_dev[16];
|
||||
int leondebug_irq_disable;
|
||||
int leon_debug_irqout;
|
||||
static int dummy_master_l10_counter;
|
||||
unsigned long amba_system_id;
|
||||
|
||||
unsigned long leon3_gptimer_irq; /* interrupt controller irq number */
|
||||
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)
|
||||
master_l10_counter = (unsigned int *)&dummy_master_l10_counter;
|
||||
dummy_master_l10_counter = 0;
|
||||
|
||||
/*Find IRQMP IRQ Controller Registers base address otherwise bail out.*/
|
||||
rootnp = of_find_node_by_path("/ambapp0");
|
||||
if (!rootnp)
|
||||
goto bad;
|
||||
|
||||
/* Find System ID: GRLIB build ID and optional CHIP ID */
|
||||
pp = of_find_property(rootnp, "systemid", &len);
|
||||
if (pp)
|
||||
amba_system_id = *(unsigned long *)pp->value;
|
||||
|
||||
/* Find IRQMP IRQ Controller Registers base adr otherwise bail out */
|
||||
np = of_find_node_by_name(rootnp, "GAISLER_IRQMP");
|
||||
if (!np) {
|
||||
np = of_find_node_by_name(rootnp, "01_00d");
|
||||
|
Reference in New Issue
Block a user