Merge tag 'for-linus-v4.8' of git://github.com/martinbrandenburg/linux
[deliverable/linux.git] / arch / powerpc / platforms / 86xx / sbc8641d.c
1 /*
2 * SBC8641D board specific routines
3 *
4 * Copyright 2008 Wind River Systems Inc.
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the 8641 HPCN support by Freescale Semiconductor Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16 #include <linux/stddef.h>
17 #include <linux/kernel.h>
18 #include <linux/pci.h>
19 #include <linux/kdev_t.h>
20 #include <linux/delay.h>
21 #include <linux/seq_file.h>
22 #include <linux/of_platform.h>
23
24 #include <asm/time.h>
25 #include <asm/machdep.h>
26 #include <asm/pci-bridge.h>
27 #include <asm/prom.h>
28 #include <mm/mmu_decl.h>
29 #include <asm/udbg.h>
30
31 #include <asm/mpic.h>
32
33 #include <sysdev/fsl_pci.h>
34 #include <sysdev/fsl_soc.h>
35
36 #include "mpc86xx.h"
37
38 static void __init
39 sbc8641_setup_arch(void)
40 {
41 if (ppc_md.progress)
42 ppc_md.progress("sbc8641_setup_arch()", 0);
43
44 printk("SBC8641 board from Wind River\n");
45
46 #ifdef CONFIG_SMP
47 mpc86xx_smp_init();
48 #endif
49
50 fsl_pci_assign_primary();
51 }
52
53
54 static void
55 sbc8641_show_cpuinfo(struct seq_file *m)
56 {
57 uint svid = mfspr(SPRN_SVR);
58
59 seq_printf(m, "Vendor\t\t: Wind River Systems\n");
60
61 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
62 }
63
64
65 /*
66 * Called very early, device-tree isn't unflattened
67 */
68 static int __init sbc8641_probe(void)
69 {
70 if (of_machine_is_compatible("wind,sbc8641"))
71 return 1; /* Looks good */
72
73 return 0;
74 }
75
76 machine_arch_initcall(sbc8641, mpc86xx_common_publish_devices);
77
78 define_machine(sbc8641) {
79 .name = "SBC8641D",
80 .probe = sbc8641_probe,
81 .setup_arch = sbc8641_setup_arch,
82 .init_IRQ = mpc86xx_init_irq,
83 .show_cpuinfo = sbc8641_show_cpuinfo,
84 .get_irq = mpic_get_irq,
85 .restart = fsl_rstcr_restart,
86 .time_init = mpc86xx_time_init,
87 .calibrate_decr = generic_calibrate_decr,
88 .progress = udbg_progress,
89 #ifdef CONFIG_PCI
90 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
91 #endif
92 };
This page took 0.036598 seconds and 5 git commands to generate.