16 #include <linux/kernel.h>
20 #include <linux/export.h>
27 { .compatible =
"fsl,mpc5200-xlb", },
28 { .compatible =
"mpc5200-xlb", },
31 static struct of_device_id mpc52xx_bus_ids[] __initdata = {
33 { .compatible =
"fsl,mpc5200b-immr", },
34 { .compatible =
"simple-bus", },
37 { .compatible =
"fsl,lpb", },
38 { .type =
"builtin", .compatible =
"mpc5200", },
39 { .type =
"soc", .compatible =
"mpc5200", },
67 "Error mapping XLB in mpc52xx_setup_cpu(). "
68 "Expect some abnormal behavior\n");
104 if (of_platform_populate(
NULL, mpc52xx_bus_ids,
NULL,
NULL))
105 pr_err(__FILE__
": Error while populating devices from DT\n");
111 static struct of_device_id mpc52xx_gpt_ids[] __initdata = {
113 { .compatible =
"mpc5200-gpt", },
116 static struct of_device_id mpc52xx_cdm_ids[] __initdata = {
118 { .compatible =
"mpc5200-cdm", },
121 static const struct of_device_id mpc52xx_gpio_simple[] = {
122 { .compatible =
"fsl,mpc5200-gpio", },
126 { .compatible =
"fsl,mpc5200-gpio-wkup", },
143 for_each_matching_node(np, mpc52xx_gpt_ids) {
185 mclken_div = 0x8000 | (clkdiv & 0x1FF);
200 spin_unlock_irqrestore(&mpc52xx_lock, flags);
259 "mpc52xx_restart: Can't access wdt. "
260 "Restart impossible, system halted.\n");
265 #define PSC1_RESET 0x1
266 #define PSC1_SYNC 0x4
267 #define PSC1_SDATA_OUT 0x1
268 #define PSC2_RESET 0x2
269 #define PSC2_SYNC (0x4<<4)
270 #define PSC2_SDATA_OUT (0x1<<4)
271 #define MPC52xx_GPIO_PSC1_MASK 0x7
272 #define MPC52xx_GPIO_PSC2_MASK (0x7<<4)
288 if ((!simple_gpio) || (!wkup_gpio))
291 switch (psc_number) {
305 pr_err(__FILE__
": Unable to determine PSC, no ac97 "
306 "cold-reset will be performed\n");
320 setbits8(&wkup_gpio->
wkup_ddr, reset);
321 setbits32(&simple_gpio->
simple_ddr, sync | out);
324 clrbits32(&simple_gpio->
simple_dvo, sync | out);
325 clrbits8(&wkup_gpio->
wkup_dvo, reset);
331 setbits8(&wkup_gpio->
wkup_dvo, reset);
340 spin_unlock_irqrestore(&gpio_lock, flags);