powerpc/85xx: drop hypervisor specific board compatibles
They're almost a duplicate of the boards array and we can build them at run-time. Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
4c18be2bf5
commit
cd1154770b
|
@ -132,31 +132,14 @@ static const char * const boards[] __initconst = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * const hv_boards[] __initconst = {
|
|
||||||
"fsl,P2041RDB-hv",
|
|
||||||
"fsl,P3041DS-hv",
|
|
||||||
"fsl,OCA4080-hv",
|
|
||||||
"fsl,P4080DS-hv",
|
|
||||||
"fsl,P5020DS-hv",
|
|
||||||
"fsl,P5040DS-hv",
|
|
||||||
"fsl,T2080QDS-hv",
|
|
||||||
"fsl,T2081QDS-hv",
|
|
||||||
"fsl,T4240QDS-hv",
|
|
||||||
"fsl,T4240RDB-hv",
|
|
||||||
"fsl,B4860QDS-hv",
|
|
||||||
"fsl,B4420QDS-hv",
|
|
||||||
"fsl,B4220QDS-hv",
|
|
||||||
"fsl,T1040QDS-hv",
|
|
||||||
"fsl,T1042QDS-hv",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called very early, device-tree isn't unflattened
|
* Called very early, device-tree isn't unflattened
|
||||||
*/
|
*/
|
||||||
static int __init corenet_generic_probe(void)
|
static int __init corenet_generic_probe(void)
|
||||||
{
|
{
|
||||||
unsigned long root = of_get_flat_dt_root();
|
unsigned long root = of_get_flat_dt_root();
|
||||||
|
char hv_compat[24];
|
||||||
|
int i;
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
extern struct smp_ops_t smp_85xx_ops;
|
extern struct smp_ops_t smp_85xx_ops;
|
||||||
#endif
|
#endif
|
||||||
|
@ -165,21 +148,26 @@ static int __init corenet_generic_probe(void)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Check if we're running under the Freescale hypervisor */
|
/* Check if we're running under the Freescale hypervisor */
|
||||||
if (of_flat_dt_match(root, hv_boards)) {
|
for (i = 0; boards[i]; i++) {
|
||||||
ppc_md.init_IRQ = ehv_pic_init;
|
snprintf(hv_compat, sizeof(hv_compat), "%s-hv", boards[i]);
|
||||||
ppc_md.get_irq = ehv_pic_get_irq;
|
if (of_flat_dt_is_compatible(root, hv_compat)) {
|
||||||
ppc_md.restart = fsl_hv_restart;
|
ppc_md.init_IRQ = ehv_pic_init;
|
||||||
ppc_md.power_off = fsl_hv_halt;
|
|
||||||
ppc_md.halt = fsl_hv_halt;
|
ppc_md.get_irq = ehv_pic_get_irq;
|
||||||
|
ppc_md.restart = fsl_hv_restart;
|
||||||
|
ppc_md.power_off = fsl_hv_halt;
|
||||||
|
ppc_md.halt = fsl_hv_halt;
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/*
|
/*
|
||||||
* Disable the timebase sync operations because we can't write
|
* Disable the timebase sync operations because we
|
||||||
* to the timebase registers under the hypervisor.
|
* can't write to the timebase registers under the
|
||||||
*/
|
* hypervisor.
|
||||||
smp_85xx_ops.give_timebase = NULL;
|
*/
|
||||||
smp_85xx_ops.take_timebase = NULL;
|
smp_85xx_ops.give_timebase = NULL;
|
||||||
|
smp_85xx_ops.take_timebase = NULL;
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue