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 "SBC610: " fmt); } while (0)
48 #define DBG (fmt...) do { } while (0)
53 static void __init gef_sbc610_init_irq(
void)
70 of_node_put(cascade_node);
73 static void __init gef_sbc610_setup_arch(
void)
83 fsl_pci_assign_primary();
94 #if defined(CONFIG_MMIO_NVRAM)
100 static unsigned int gef_sbc610_get_pcb_rev(
void)
105 return (reg >> 8) & 0xff;
109 static unsigned int gef_sbc610_get_board_rev(
void)
114 return (reg >> 16) & 0xff;
118 static unsigned int gef_sbc610_get_fpga_rev(
void)
123 return (reg >> 24) & 0xf;
126 static void gef_sbc610_show_cpuinfo(
struct seq_file *
m)
130 seq_printf(m,
"Vendor\t\t: GE Intelligent Platforms\n");
132 seq_printf(m,
"Revision\t: %u%c\n", gef_sbc610_get_pcb_rev(),
133 (
'A' + gef_sbc610_get_board_rev() - 1));
134 seq_printf(m,
"FPGA Revision\t: %u\n", gef_sbc610_get_fpga_rev());
144 if (!machine_is(gef_sbc610))
150 pci_read_config_dword(pdev, 0xe0, &val);
151 pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x5);
154 pci_write_config_dword(pdev, 0xe4, 1 << 5);
157 gef_sbc610_nec_fixup);
167 static int __init gef_sbc610_probe(
void)
169 unsigned long root = of_get_flat_dt_root();
171 if (of_flat_dt_is_compatible(root,
"gef,sbc610"))
177 static long __init mpc86xx_time_init(
void)
185 temp =
mfspr(SPRN_HID0);
187 mtspr(SPRN_HID0, temp);
188 asm volatile(
"isync");
194 { .compatible =
"simple-bus", },
195 { .compatible =
"gianfar", },
196 { .compatible =
"fsl,mpc8641-pcie", },
200 static int __init declare_of_platform_devices(
void)
203 of_platform_bus_probe(
NULL, of_bus_ids,
NULL);
211 .probe = gef_sbc610_probe,
212 .setup_arch = gef_sbc610_setup_arch,
213 .init_IRQ = gef_sbc610_init_irq,
214 .show_cpuinfo = gef_sbc610_show_cpuinfo,
216 .restart = fsl_rstcr_restart,
217 .time_init = mpc86xx_time_init,
221 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,