]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - arch/powerpc/platforms/85xx/p1010rdb.c
Merge branch 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kerne...
[mirror_ubuntu-focal-kernel.git] / arch / powerpc / platforms / 85xx / p1010rdb.c
CommitLineData
2d05c392
PK
1/*
2 * P1010RDB Board Setup
3 *
4 * Copyright 2011 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/pci.h>
15#include <linux/delay.h>
16#include <linux/interrupt.h>
17#include <linux/of_platform.h>
18
2d05c392
PK
19#include <asm/time.h>
20#include <asm/machdep.h>
21#include <asm/pci-bridge.h>
22#include <mm/mmu_decl.h>
23#include <asm/prom.h>
24#include <asm/udbg.h>
25#include <asm/mpic.h>
26
27#include <sysdev/fsl_soc.h>
28#include <sysdev/fsl_pci.h>
29
199bfbe6
KG
30#include "mpc85xx.h"
31
2d05c392
PK
32void __init p1010_rdb_pic_init(void)
33{
e55d7f73 34 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
5019609f 35 MPIC_SINGLE_DEST_CPU,
2d05c392
PK
36 0, 256, " OpenPIC ");
37
38 BUG_ON(mpic == NULL);
2d05c392
PK
39
40 mpic_init(mpic);
2d05c392
PK
41}
42
43
44/*
45 * Setup the architecture
46 */
47static void __init p1010_rdb_setup_arch(void)
48{
2d05c392
PK
49 if (ppc_md.progress)
50 ppc_md.progress("p1010_rdb_setup_arch()", 0);
51
905e75c4 52 fsl_pci_assign_primary();
2d05c392
PK
53
54 printk(KERN_INFO "P1010 RDB board from Freescale Semiconductor\n");
55}
56
905e75c4 57machine_arch_initcall(p1010_rdb, mpc85xx_common_publish_devices);
2d05c392
PK
58
59/*
60 * Called very early, device-tree isn't unflattened
61 */
62static int __init p1010_rdb_probe(void)
63{
56571384 64 if (of_machine_is_compatible("fsl,P1010RDB"))
2d05c392 65 return 1;
56571384 66 if (of_machine_is_compatible("fsl,P1010RDB-PB"))
fd1348d0 67 return 1;
2d05c392
PK
68 return 0;
69}
70
71define_machine(p1010_rdb) {
72 .name = "P1010 RDB",
73 .probe = p1010_rdb_probe,
74 .setup_arch = p1010_rdb_setup_arch,
75 .init_IRQ = p1010_rdb_pic_init,
76#ifdef CONFIG_PCI
77 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
48b16180 78 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
2d05c392
PK
79#endif
80 .get_irq = mpic_get_irq,
2d05c392
PK
81 .calibrate_decr = generic_calibrate_decr,
82 .progress = udbg_progress,
83};