19 #include <linux/stddef.h>
20 #include <linux/kernel.h>
21 #include <linux/pci.h>
22 #include <linux/kdev_t.h>
28 #include <asm/machdep.h>
29 #include <asm/pci-bridge.h>
35 #include <asm/nvram.h>
46 #define DBG (fmt...) do { printk(KERN_ERR "PPC9A: " fmt); } while (0)
48 #define DBG (fmt...) do { } while (0)
53 static void __init gef_ppc9a_init_irq(
void)
70 of_node_put(cascade_node);
73 static void __init gef_ppc9a_setup_arch(
void)
83 fsl_pci_assign_primary();
94 #if defined(CONFIG_MMIO_NVRAM)
100 static unsigned int gef_ppc9a_get_pcb_rev(
void)
105 return (reg >> 16) & 0xff;
109 static unsigned int gef_ppc9a_get_board_rev(
void)
114 return (reg >> 8) & 0xff;
118 static unsigned int gef_ppc9a_get_fpga_rev(
void)
127 static unsigned int gef_ppc9a_get_vme_geo_addr(
void)
136 static unsigned int gef_ppc9a_get_vme_is_syscon(
void)
141 return (reg >> 9) & 0x1;
144 static void gef_ppc9a_show_cpuinfo(
struct seq_file *
m)
148 seq_printf(m,
"Vendor\t\t: GE Intelligent Platforms\n");
150 seq_printf(m,
"Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(),
151 (
'A' + gef_ppc9a_get_board_rev()));
152 seq_printf(m,
"FPGA Revision\t: %u\n", gef_ppc9a_get_fpga_rev());
156 seq_printf(m,
"VME geo. addr\t: %u\n", gef_ppc9a_get_vme_geo_addr());
159 gef_ppc9a_get_vme_is_syscon() ?
"yes" :
"no");
167 if (!machine_is(gef_ppc9a))
173 pci_read_config_dword(pdev, 0xe0, &val);
174 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x5);
177 pci_write_config_dword(pdev, 0xe4, 1 << 5);
180 gef_ppc9a_nec_fixup);
190 static int __init gef_ppc9a_probe(
void)
192 unsigned long root = of_get_flat_dt_root();
194 if (of_flat_dt_is_compatible(root,
"gef,ppc9a"))
200 static long __init mpc86xx_time_init(
void)
208 temp =
mfspr(SPRN_HID0);
210 mtspr(SPRN_HID0, temp);
211 asm volatile(
"isync");
217 { .compatible =
"simple-bus", },
218 { .compatible =
"gianfar", },
219 { .compatible =
"fsl,mpc8641-pcie", },
223 static int __init declare_of_platform_devices(
void)
226 of_platform_bus_probe(
NULL, of_bus_ids,
NULL);
234 .probe = gef_ppc9a_probe,
235 .setup_arch = gef_ppc9a_setup_arch,
236 .init_IRQ = gef_ppc9a_init_irq,
237 .show_cpuinfo = gef_ppc9a_show_cpuinfo,
239 .restart = fsl_rstcr_restart,
240 .time_init = mpc86xx_time_init,
244 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,