aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx
diff options
context:
space:
mode:
authorLaurentiu TUDOR <Laurentiu.Tudor@freescale.com>2014-06-11 11:13:19 -0400
committerScott Wood <scottwood@freescale.com>2014-07-02 18:33:10 -0400
commitcd1154770ba984f4c766cac5ea42c38880080b1d (patch)
treef2d2c5d5cfb13f9d0d6f3bacb834780cadf1aedf /arch/powerpc/platforms/85xx
parent4c18be2bf55747c6eb178069dc9f0c32cacbfc09 (diff)
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>
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r--arch/powerpc/platforms/85xx/corenet_generic.c52
1 files changed, 20 insertions, 32 deletions
diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index b2cda69ba1dc..4f22ad1e14ac 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -132,31 +132,14 @@ static const char * const boards[] __initconst = {
132 NULL 132 NULL
133}; 133};
134 134
135static const char * const hv_boards[] __initconst = {
136 "fsl,P2041RDB-hv",
137 "fsl,P3041DS-hv",
138 "fsl,OCA4080-hv",
139 "fsl,P4080DS-hv",
140 "fsl,P5020DS-hv",
141 "fsl,P5040DS-hv",
142 "fsl,T2080QDS-hv",
143 "fsl,T2081QDS-hv",
144 "fsl,T4240QDS-hv",
145 "fsl,T4240RDB-hv",
146 "fsl,B4860QDS-hv",
147 "fsl,B4420QDS-hv",
148 "fsl,B4220QDS-hv",
149 "fsl,T1040QDS-hv",
150 "fsl,T1042QDS-hv",
151 NULL
152};
153
154/* 135/*
155 * Called very early, device-tree isn't unflattened 136 * Called very early, device-tree isn't unflattened
156 */ 137 */
157static int __init corenet_generic_probe(void) 138static int __init corenet_generic_probe(void)
158{ 139{
159 unsigned long root = of_get_flat_dt_root(); 140 unsigned long root = of_get_flat_dt_root();
141 char hv_compat[24];
142 int i;
160#ifdef CONFIG_SMP 143#ifdef CONFIG_SMP
161 extern struct smp_ops_t smp_85xx_ops; 144 extern struct smp_ops_t smp_85xx_ops;
162#endif 145#endif
@@ -165,21 +148,26 @@ static int __init corenet_generic_probe(void)
165 return 1; 148 return 1;
166 149
167 /* Check if we're running under the Freescale hypervisor */ 150 /* Check if we're running under the Freescale hypervisor */
168 if (of_flat_dt_match(root, hv_boards)) { 151 for (i = 0; boards[i]; i++) {
169 ppc_md.init_IRQ = ehv_pic_init; 152 snprintf(hv_compat, sizeof(hv_compat), "%s-hv", boards[i]);
170 ppc_md.get_irq = ehv_pic_get_irq; 153 if (of_flat_dt_is_compatible(root, hv_compat)) {
171 ppc_md.restart = fsl_hv_restart; 154 ppc_md.init_IRQ = ehv_pic_init;
172 ppc_md.power_off = fsl_hv_halt; 155
173 ppc_md.halt = fsl_hv_halt; 156 ppc_md.get_irq = ehv_pic_get_irq;
157 ppc_md.restart = fsl_hv_restart;
158 ppc_md.power_off = fsl_hv_halt;
159 ppc_md.halt = fsl_hv_halt;
174#ifdef CONFIG_SMP 160#ifdef CONFIG_SMP
175 /* 161 /*
176 * Disable the timebase sync operations because we can't write 162 * Disable the timebase sync operations because we
177 * to the timebase registers under the hypervisor. 163 * can't write to the timebase registers under the
178 */ 164 * hypervisor.
179 smp_85xx_ops.give_timebase = NULL; 165 */
180 smp_85xx_ops.take_timebase = NULL; 166 smp_85xx_ops.give_timebase = NULL;
167 smp_85xx_ops.take_timebase = NULL;
181#endif 168#endif
182 return 1; 169 return 1;
170 }
183 } 171 }
184 172
185 return 0; 173 return 0;