cregit-Linux how code gets into the kernel

Release 4.14 arch/powerpc/platforms/85xx/mpc85xx_ads.c

/*
 * MPC85xx setup and early boot code plus other random bits.
 *
 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
 *
 * Copyright 2005 Freescale Semiconductor Inc.
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/of_platform.h>

#include <asm/time.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/mpic.h>
#include <mm/mmu_decl.h>
#include <asm/udbg.h>

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>

#ifdef CONFIG_CPM2
#include <asm/cpm2.h>
#include <sysdev/cpm2_pic.h>
#endif

#include "mpc85xx.h"


static void __init mpc85xx_ads_pic_init(void) { struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN, 0, 256, " OpenPIC "); BUG_ON(mpic == NULL); mpic_init(mpic); mpc85xx_cpm2_pic_init(); }

Contributors

PersonTokensPropCommitsCommitProp
Becky Bruce3068.18%112.50%
Andy Fleming511.36%112.50%
Kumar Gala36.82%225.00%
Kyle Moffett36.82%225.00%
Dmitry Baryshkov24.55%112.50%
Vitaly Bordug12.27%112.50%
Total44100.00%8100.00%

/* * Setup the architecture */ #ifdef CONFIG_CPM2 struct cpm_pin { int port, pin, flags; }; static const struct cpm_pin mpc8560_ads_pins[] = { /* SCC1 */ {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* SCC2 */ {2, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {2, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* FCC2 */ {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK14 */ {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK13 */ /* FCC3 */ {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 14, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK16 */ {2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK15 */ {2, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, };
static void __init init_ioports(void) { int i; for (i = 0; i < ARRAY_SIZE(mpc8560_ads_pins); i++) { const struct cpm_pin *pin = &mpc8560_ads_pins[i]; cpm2_set_pin(pin->port, pin->pin, pin->flags); } cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX); cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX); cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK15, CPM_CLK_RX); cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK16, CPM_CLK_TX); }

Contributors

PersonTokensPropCommitsCommitProp
Scott Wood6953.49%125.00%
Vitaly Bordug5945.74%250.00%
Kumar Gala10.78%125.00%
Total129100.00%4100.00%

#endif
static void __init mpc85xx_ads_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc85xx_ads_setup_arch()", 0); #ifdef CONFIG_CPM2 cpm2_reset(); init_ioports(); #endif fsl_pci_assign_primary(); }

Contributors

PersonTokensPropCommitsCommitProp
Becky Bruce2668.42%125.00%
Vitaly Bordug615.79%125.00%
Scott Wood37.89%125.00%
Jia Hongtao37.89%125.00%
Total38100.00%4100.00%


static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) { uint pvid, svid, phid1; pvid = mfspr(SPRN_PVR); svid = mfspr(SPRN_SVR); seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "SVR\t\t: 0x%x\n", svid); /* Display cpu Pll setting */ phid1 = mfspr(SPRN_HID1); seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); }

Contributors

PersonTokensPropCommitsCommitProp
Becky Bruce8198.78%266.67%
Kumar Gala11.22%133.33%
Total82100.00%3100.00%

machine_arch_initcall(mpc85xx_ads, mpc85xx_common_publish_devices); /* * Called very early, device-tree isn't unflattened */
static int __init mpc85xx_ads_probe(void) { return of_machine_is_compatible("MPC85xxADS"); }

Contributors

PersonTokensPropCommitsCommitProp
Kumar Gala960.00%250.00%
Becky Bruce533.33%125.00%
Benjamin Herrenschmidt16.67%125.00%
Total15100.00%4100.00%

define_machine(mpc85xx_ads) { .name = "MPC85xx ADS", .probe = mpc85xx_ads_probe, .setup_arch = mpc85xx_ads_setup_arch, .init_IRQ = mpc85xx_ads_pic_init, .show_cpuinfo = mpc85xx_ads_show_cpuinfo, .get_irq = mpic_get_irq, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, };

Overall Contributors

PersonTokensPropCommitsCommitProp
Scott Wood47655.48%14.76%
Becky Bruce20523.89%29.52%
Vitaly Bordug11313.17%314.29%
Kumar Gala435.01%628.57%
Dmitry Baryshkov60.70%29.52%
Andy Fleming50.58%14.76%
Jia Hongtao40.47%14.76%
Kyle Moffett30.35%29.52%
Roy Zang10.12%14.76%
Paul Gortmaker10.12%14.76%
Benjamin Herrenschmidt10.12%14.76%
Total858100.00%21100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.