OpenWrt – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 // SPDX-License-Identifier: GPL-2.0+
2  
3 /*
4 * Sophos RED 15w Rev.1 Board Setup
5 *
6 * Copyright (C) 2019 David Bauer <mail@david-bauer.net>
7 *
8 * Based on:
9 * p1010rdb.c:
10 * P1010 RDB Board Setup
11 * Copyright 2011 Freescale Semiconductor Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18  
19 #include <linux/stddef.h>
20 #include <linux/kernel.h>
21 #include <linux/delay.h>
22 #include <linux/interrupt.h>
23 #include <linux/of_platform.h>
24  
25 #include <asm/time.h>
26 #include <asm/machdep.h>
27 #include <asm/pci-bridge.h>
28 #include <mm/mmu_decl.h>
29 #include <asm/prom.h>
30 #include <asm/udbg.h>
31 #include <asm/mpic.h>
32  
33 #include <sysdev/fsl_soc.h>
34 #include <sysdev/fsl_pci.h>
35  
36 #include "mpc85xx.h"
37  
38 void __init red_15w_rev1_pic_init(void)
39 {
40 struct mpic *mpic;
41  
42 mpic = mpic_alloc(NULL, 0,
43 MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU,
44 0, 256, " OpenPIC ");
45  
46 BUG_ON(mpic == NULL);
47 mpic_init(mpic);
48 }
49  
50 /*
51 * Setup the architecture
52 */
53 static void __init red_15w_rev1_setup_arch(void)
54 {
55 if (ppc_md.progress)
56 ppc_md.progress("red_15w_rev1_setup_arch()", 0);
57  
58 fsl_pci_assign_primary();
59  
60 pr_info("RED 15w Rev.1 from Sophos\n");
61 }
62  
63 machine_arch_initcall(red_15w_rev1, mpc85xx_common_publish_devices);
64  
65 /*
66 * Called very early, device-tree isn't unflattened
67 */
68 static int __init red_15w_rev1_probe(void)
69 {
70 if (of_machine_is_compatible("sophos,red-15w-rev1"))
71 return 1;
72 return 0;
73 }
74  
75 define_machine(red_15w_rev1) {
76 .name = "P1010 RDB",
77 .probe = red_15w_rev1_probe,
78 .setup_arch = red_15w_rev1_setup_arch,
79 .init_IRQ = red_15w_rev1_pic_init,
80 #ifdef CONFIG_PCI
81 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
82 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
83 #endif
84 .get_irq = mpic_get_irq,
85 .calibrate_decr = generic_calibrate_decr,
86 .progress = udbg_progress,
87 };