aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 81b70628df75..e77c869d3916 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -69,6 +69,37 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
69 return PCIBIOS_SUCCESSFUL; 69 return PCIBIOS_SUCCESSFUL;
70} 70}
71 71
72static void mpc85xx_cds_restart(char *cmd)
73{
74 struct pci_dev *dev;
75 u_char tmp;
76
77 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686,
78 NULL))) {
79
80 /* Use the VIA Super Southbridge to force a PCI reset */
81 pci_read_config_byte(dev, 0x47, &tmp);
82 pci_write_config_byte(dev, 0x47, tmp | 1);
83
84 /* Flush the outbound PCI write queues */
85 pci_read_config_byte(dev, 0x47, &tmp);
86
87 /*
88 * At this point, the harware reset should have triggered.
89 * However, if it doesn't work for some mysterious reason,
90 * just fall through to the default reset below.
91 */
92
93 pci_dev_put(dev);
94 }
95
96 /*
97 * If we can't find the VIA chip (maybe the P2P bridge is disabled)
98 * or the VIA chip reset didn't work, just use the default reset.
99 */
100 mpc85xx_restart(NULL);
101}
102
72static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) 103static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
73{ 104{
74 u_char c; 105 u_char c;
@@ -304,7 +335,11 @@ define_machine(mpc85xx_cds) {
304 .init_IRQ = mpc85xx_cds_pic_init, 335 .init_IRQ = mpc85xx_cds_pic_init,
305 .show_cpuinfo = mpc85xx_cds_show_cpuinfo, 336 .show_cpuinfo = mpc85xx_cds_show_cpuinfo,
306 .get_irq = mpic_get_irq, 337 .get_irq = mpic_get_irq,
338#ifdef CONFIG_PCI
339 .restart = mpc85xx_cds_restart,
340#else
307 .restart = mpc85xx_restart, 341 .restart = mpc85xx_restart,
342#endif
308 .calibrate_decr = generic_calibrate_decr, 343 .calibrate_decr = generic_calibrate_decr,
309 .progress = udbg_progress, 344 .progress = udbg_progress,
310 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 345 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,