~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/platforms/85xx/p2020.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*
  3  * Freescale P2020 board Setup
  4  *
  5  * Copyright 2007,2009,2012-2013 Freescale Semiconductor Inc.
  6  * Copyright 2022-2023 Pali Rohár <pali@kernel.org>
  7  */
  8 
  9 #include <linux/stddef.h>
 10 #include <linux/kernel.h>
 11 #include <linux/of.h>
 12 
 13 #include <asm/machdep.h>
 14 #include <asm/udbg.h>
 15 #include <asm/mpic.h>
 16 #include <asm/swiotlb.h>
 17 #include <asm/ppc-pci.h>
 18 
 19 #include <sysdev/fsl_pci.h>
 20 
 21 #include "smp.h"
 22 #include "mpc85xx.h"
 23 
 24 static void __init p2020_pic_init(void)
 25 {
 26         struct mpic *mpic;
 27         int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU;
 28 
 29         mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC  ");
 30 
 31         if (WARN_ON(!mpic))
 32                 return;
 33 
 34         mpic_init(mpic);
 35         mpc85xx_8259_init();
 36 }
 37 
 38 /*
 39  * Setup the architecture
 40  */
 41 static void __init p2020_setup_arch(void)
 42 {
 43         swiotlb_detect_4g();
 44         fsl_pci_assign_primary();
 45         uli_init();
 46         mpc85xx_smp_init();
 47         mpc85xx_qe_par_io_init();
 48 }
 49 
 50 /*
 51  * Called very early, device-tree isn't unflattened
 52  */
 53 static int __init p2020_probe(void)
 54 {
 55         struct device_node *p2020_cpu;
 56 
 57         /*
 58          * There is no common compatible string for all P2020 boards.
 59          * The only common thing is "PowerPC,P2020@0" cpu node.
 60          * So check for P2020 board via this cpu node.
 61          */
 62         p2020_cpu = of_find_node_by_path("/cpus/PowerPC,P2020@0");
 63         of_node_put(p2020_cpu);
 64 
 65         return !!p2020_cpu;
 66 }
 67 
 68 machine_arch_initcall(p2020, mpc85xx_common_publish_devices);
 69 
 70 define_machine(p2020) {
 71         .name                   = "Freescale P2020",
 72         .probe                  = p2020_probe,
 73         .setup_arch             = p2020_setup_arch,
 74         .init_IRQ               = p2020_pic_init,
 75 #ifdef CONFIG_PCI
 76         .pcibios_fixup_bus      = fsl_pcibios_fixup_bus,
 77         .pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
 78 #endif
 79         .get_irq                = mpic_get_irq,
 80         .progress               = udbg_progress,
 81 };
 82 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php