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

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

Version: ~ [ linux-6.3-rc3 ] ~ [ linux-6.2.7 ] ~ [ linux-6.1.20 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.103 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.175 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.237 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.278 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.310 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ 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 /*
  2  * ppa8548 setup and early boot code.
  3  *
  4  * Copyright 2009 Prodrive B.V..
  5  *
  6  * By Stef van Os (see MAINTAINERS for contact information)
  7  *
  8  * Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.
  9  * Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.
 10  *
 11  * This program is free software; you can redistribute  it and/or modify it
 12  * under  the terms of  the GNU General  Public License as published by the
 13  * Free Software Foundation;  either version 2 of the  License, or (at your
 14  * option) any later version.
 15  */
 16 
 17 #include <linux/stddef.h>
 18 #include <linux/kernel.h>
 19 #include <linux/init.h>
 20 #include <linux/reboot.h>
 21 #include <linux/seq_file.h>
 22 #include <linux/of_fdt.h>
 23 #include <linux/of_platform.h>
 24 
 25 #include <asm/machdep.h>
 26 #include <asm/udbg.h>
 27 #include <asm/mpic.h>
 28 
 29 #include <sysdev/fsl_soc.h>
 30 
 31 static void __init ppa8548_pic_init(void)
 32 {
 33         struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
 34                         0, 256, " OpenPIC  ");
 35         BUG_ON(mpic == NULL);
 36         mpic_init(mpic);
 37 }
 38 
 39 /*
 40  * Setup the architecture
 41  */
 42 static void __init ppa8548_setup_arch(void)
 43 {
 44         if (ppc_md.progress)
 45                 ppc_md.progress("ppa8548_setup_arch()", 0);
 46 }
 47 
 48 static void ppa8548_show_cpuinfo(struct seq_file *m)
 49 {
 50         uint32_t svid, phid1;
 51 
 52         svid = mfspr(SPRN_SVR);
 53 
 54         seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
 55         seq_printf(m, "SVR\t\t: 0x%x\n", svid);
 56 
 57         /* Display cpu Pll setting */
 58         phid1 = mfspr(SPRN_HID1);
 59         seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
 60 }
 61 
 62 static const struct of_device_id of_bus_ids[] __initconst = {
 63         { .name = "soc", },
 64         { .type = "soc", },
 65         { .compatible = "simple-bus", },
 66         { .compatible = "gianfar", },
 67         { .compatible = "fsl,srio", },
 68         {},
 69 };
 70 
 71 static int __init declare_of_platform_devices(void)
 72 {
 73         of_platform_bus_probe(NULL, of_bus_ids, NULL);
 74 
 75         return 0;
 76 }
 77 machine_device_initcall(ppa8548, declare_of_platform_devices);
 78 
 79 /*
 80  * Called very early, device-tree isn't unflattened
 81  */
 82 static int __init ppa8548_probe(void)
 83 {
 84         return of_machine_is_compatible("ppa8548");
 85 }
 86 
 87 define_machine(ppa8548) {
 88         .name           = "ppa8548",
 89         .probe          = ppa8548_probe,
 90         .setup_arch     = ppa8548_setup_arch,
 91         .init_IRQ       = ppa8548_pic_init,
 92         .show_cpuinfo   = ppa8548_show_cpuinfo,
 93         .get_irq        = mpic_get_irq,
 94         .calibrate_decr = generic_calibrate_decr,
 95         .progress       = udbg_progress,
 96 };
 97 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp