]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blame - arch/powerpc/platforms/85xx/p1010rdb.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
[mirror_ubuntu-eoan-kernel.git] / arch / powerpc / platforms / 85xx / p1010rdb.c
CommitLineData
2874c5fd 1// SPDX-License-Identifier: GPL-2.0-or-later
2d05c392
PK
2/*
3 * P1010RDB Board Setup
4 *
5 * Copyright 2011 Freescale Semiconductor Inc.
2d05c392
PK
6 */
7
8#include <linux/stddef.h>
9#include <linux/kernel.h>
10#include <linux/pci.h>
11#include <linux/delay.h>
12#include <linux/interrupt.h>
13#include <linux/of_platform.h>
14
2d05c392
PK
15#include <asm/time.h>
16#include <asm/machdep.h>
17#include <asm/pci-bridge.h>
18#include <mm/mmu_decl.h>
19#include <asm/prom.h>
20#include <asm/udbg.h>
21#include <asm/mpic.h>
22
23#include <sysdev/fsl_soc.h>
24#include <sysdev/fsl_pci.h>
25
199bfbe6
KG
26#include "mpc85xx.h"
27
2d05c392
PK
28void __init p1010_rdb_pic_init(void)
29{
e55d7f73 30 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
5019609f 31 MPIC_SINGLE_DEST_CPU,
2d05c392
PK
32 0, 256, " OpenPIC ");
33
34 BUG_ON(mpic == NULL);
2d05c392
PK
35
36 mpic_init(mpic);
2d05c392
PK
37}
38
39
40/*
41 * Setup the architecture
42 */
43static void __init p1010_rdb_setup_arch(void)
44{
2d05c392
PK
45 if (ppc_md.progress)
46 ppc_md.progress("p1010_rdb_setup_arch()", 0);
47
905e75c4 48 fsl_pci_assign_primary();
2d05c392
PK
49
50 printk(KERN_INFO "P1010 RDB board from Freescale Semiconductor\n");
51}
52
905e75c4 53machine_arch_initcall(p1010_rdb, mpc85xx_common_publish_devices);
2d05c392
PK
54
55/*
56 * Called very early, device-tree isn't unflattened
57 */
58static int __init p1010_rdb_probe(void)
59{
56571384 60 if (of_machine_is_compatible("fsl,P1010RDB"))
2d05c392 61 return 1;
56571384 62 if (of_machine_is_compatible("fsl,P1010RDB-PB"))
fd1348d0 63 return 1;
2d05c392
PK
64 return 0;
65}
66
67define_machine(p1010_rdb) {
68 .name = "P1010 RDB",
69 .probe = p1010_rdb_probe,
70 .setup_arch = p1010_rdb_setup_arch,
71 .init_IRQ = p1010_rdb_pic_init,
72#ifdef CONFIG_PCI
73 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
48b16180 74 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
2d05c392
PK
75#endif
76 .get_irq = mpic_get_irq,
2d05c392
PK
77 .calibrate_decr = generic_calibrate_decr,
78 .progress = udbg_progress,
79};