cregit-Linux how code gets into the kernel

Release 4.11 arch/arm/mach-omap2/devices.c

/*
 * linux/arch/arm/mach-omap2/devices.c
 *
 * OMAP2 platform device setup/initialization
 *
 * 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/gpio.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/pinctrl/machine.h>

#include <asm/mach-types.h>
#include <asm/mach/map.h>

#include <linux/omap-dma.h>

#include "iomap.h"
#include "omap_hwmod.h"
#include "omap_device.h"

#include "soc.h"
#include "common.h"
#include "control.h"
#include "display.h"


#define L3_MODULES_MAX_LEN 12

#define L3_MODULES 3


static int __init omap3_l3_init(void) { struct omap_hwmod *oh; struct platform_device *pdev; char oh_name[L3_MODULES_MAX_LEN]; /* * To avoid code running on other OMAPs in * multi-omap builds */ if (!(cpu_is_omap34xx()) || of_have_populated_dt()) return -ENODEV; snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); oh = omap_hwmod_lookup(oh_name); if (!oh) pr_err("could not look up %s\n", oh_name); pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0); WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); return PTR_ERR_OR_ZERO(pdev); }

Contributors

PersonTokensPropCommitsCommitProp
R Sricharan9189.22%120.00%
Kevin Hilman54.90%120.00%
Tony Lindgren32.94%120.00%
Aaro Koskinen21.96%120.00%
Nicholas Krause10.98%120.00%
Total102100.00%5100.00%

omap_postcore_initcall(omap3_l3_init);
static inline void omap_init_sti(void) {}

Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren8100.00%1100.00%
Total8100.00%1100.00%

#if IS_ENABLED(CONFIG_SPI_OMAP24XX) #include <linux/platform_data/spi-omap2-mcspi.h>
static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused) { struct platform_device *pdev; char *name = "omap2_mcspi"; struct omap2_mcspi_platform_config *pdata; static int spi_num; struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr; pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { pr_err("Memory allocation for McSPI device failed\n"); return -ENOMEM; } pdata->num_cs = mcspi_attrib->num_chipselect; switch (oh->class->rev) { case OMAP2_MCSPI_REV: case OMAP3_MCSPI_REV: pdata->regs_offset = 0; break; case OMAP4_MCSPI_REV: pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET; break; default: pr_err("Invalid McSPI Revision value\n"); kfree(pdata); return -EINVAL; } spi_num++; pdev = omap_device_build(name, spi_num, oh, pdata, sizeof(*pdata)); WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n", name, oh->name); kfree(pdata); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Varadarajan, Charulatha12571.02%110.00%
Tony Lindgren1910.80%330.00%
Juha Yrjölä137.39%110.00%
Syed Rafiuddin84.55%110.00%
Julia Lawall52.84%110.00%
Kevin Hilman52.84%220.00%
Lucas De Marchi10.57%110.00%
Total176100.00%10100.00%


static void omap_init_mcspi(void) { omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren1164.71%266.67%
Varadarajan, Charulatha635.29%133.33%
Total17100.00%3100.00%

#else
static inline void omap_init_mcspi(void) {}

Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren8100.00%1100.00%
Total8100.00%1100.00%

#endif /** * omap_init_rng - bind the RNG hwmod to the RNG omap_device * * Bind the RNG hwmod to the RNG omap_device. No return value. */
static void omap_init_rng(void) { struct omap_hwmod *oh; struct platform_device *pdev; oh = omap_hwmod_lookup("rng"); if (!oh) return; pdev = omap_device_build("omap_rng", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Walmsley57100.00%1100.00%
Total57100.00%1100.00%


static void __init omap_init_sham(void) { struct omap_hwmod *oh; struct platform_device *pdev; oh = omap_hwmod_lookup("sham"); if (!oh) return; pdev = omap_device_build("omap-sham", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Mark A. Greer4679.31%250.00%
Dmitry Kasatkin610.34%125.00%
Tony Lindgren610.34%125.00%
Total58100.00%4100.00%


static void __init omap_init_aes(void) { struct omap_hwmod *oh; struct platform_device *pdev; oh = omap_hwmod_lookup("aes"); if (!oh) return; pdev = omap_device_build("omap-aes", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "Can't build omap_device for omap-aes\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Mark A. Greer4679.31%240.00%
Kevin Hilman712.07%120.00%
Kishore Kadiyala46.90%120.00%
Dmitry Kasatkin11.72%120.00%
Total58100.00%5100.00%

/*-------------------------------------------------------------------------*/ #if IS_ENABLED(CONFIG_VIDEO_OMAP2_VOUT) #if IS_ENABLED(CONFIG_FB_OMAP2) static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = { }; #else static struct resource omap_vout_resource[2] = { }; #endif static struct platform_device omap_vout_device = { .name = "omap_vout", .num_resources = ARRAY_SIZE(omap_vout_resource), .resource = &omap_vout_resource[0], .id = -1, };
int __init omap_init_vout(void) { return platform_device_register(&omap_vout_device); }

Contributors

PersonTokensPropCommitsCommitProp
Vaibhav Hiremath1173.33%150.00%
Archit Taneja426.67%150.00%
Total15100.00%2100.00%

#else
int __init omap_init_vout(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Archit Taneja763.64%150.00%
Vaibhav Hiremath436.36%150.00%
Total11100.00%2100.00%

#endif /*-------------------------------------------------------------------------*/
static int __init omap2_init_devices(void) { /* Enable dummy states for those platforms without pinctrl support */ if (!of_have_populated_dt()) pinctrl_provide_dummies(); /* If dtb is there, the devices will be created dynamically */ if (!of_have_populated_dt()) { /* * please keep these calls, and their implementations above, * in alphabetical order so they're easier to sort through. */ omap_init_mcspi(); omap_init_sham(); omap_init_aes(); omap_init_rng(); } omap_init_sti(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren1531.91%220.00%
Matt Porter1021.28%110.00%
Benoît Cousson714.89%110.00%
Mark A. Greer612.77%220.00%
Lokesh Vutla36.38%110.00%
Juha Yrjölä36.38%110.00%
Peter Ujfalusi36.38%220.00%
Total47100.00%10100.00%

omap_arch_initcall(omap2_init_devices);
static int __init omap_gpmc_init(void) { struct omap_hwmod *oh; struct platform_device *pdev; char *oh_name = "gpmc"; /* * if the board boots up with a populated DT, do not * manually add the device from this initcall */ if (of_have_populated_dt()) return -ENODEV; oh = omap_hwmod_lookup(oh_name); if (!oh) { pr_err("Could not look up %s\n", oh_name); return -ENODEV; } pdev = omap_device_build("omap-gpmc", -1, oh, NULL, 0); WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); return PTR_ERR_OR_ZERO(pdev); }

Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren9398.94%150.00%
Nicholas Krause11.06%150.00%
Total94100.00%2100.00%

omap_postcore_initcall(omap_gpmc_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Tony Lindgren21525.97%1325.49%
Varadarajan, Charulatha13916.79%23.92%
R Sricharan10312.44%23.92%
Mark A. Greer9811.84%611.76%
Vaibhav Hiremath8710.51%11.96%
Paul Walmsley597.13%23.92%
Juha Yrjölä232.78%11.96%
Kevin Hilman202.42%35.88%
Matt Porter131.57%11.96%
Archit Taneja121.45%11.96%
Benoît Cousson111.33%23.92%
Dmitry Kasatkin91.09%23.92%
Syed Rafiuddin80.97%11.96%
Julia Lawall50.60%11.96%
Kishore Kadiyala40.48%11.96%
Russell King40.48%23.92%
Peter Ujfalusi30.36%23.92%
Lokesh Vutla30.36%11.96%
Javier Martinez Canillas30.36%11.96%
Aaro Koskinen20.24%11.96%
Nicholas Krause20.24%11.96%
Laurent Pinchart20.24%11.96%
Arnd Bergmann10.12%11.96%
Lucas De Marchi10.12%11.96%
Felipe Balbi10.12%11.96%
Total828100.00%51100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.