Release 4.7 drivers/soc/samsung/exynos-pmu.c
/*
* Copyright (c) 2011-2014 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* EXYNOS - CPU PMU(Power Management Unit) support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/soc/samsung/exynos-regs-pmu.h>
#include <linux/soc/samsung/exynos-pmu.h>
#include "exynos-pmu.h"
struct exynos_pmu_context {
struct device *dev;
const struct exynos_pmu_data *pmu_data;
};
void __iomem *pmu_base_addr;
static struct exynos_pmu_context *pmu_context;
void pmu_raw_writel(u32 val, u32 offset)
{
writel_relaxed(val, pmu_base_addr + offset);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 12 | 60.00% | 1 | 50.00% |
abhilash kesavan | abhilash kesavan | 8 | 40.00% | 1 | 50.00% |
| Total | 20 | 100.00% | 2 | 100.00% |
u32 pmu_raw_readl(u32 offset)
{
return readl_relaxed(pmu_base_addr + offset);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 13 | 81.25% | 1 | 50.00% |
abhilash kesavan | abhilash kesavan | 3 | 18.75% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
void exynos_sys_powerdown_conf(enum sys_powerdown mode)
{
unsigned int i;
const struct exynos_pmu_data *pmu_data;
if (!pmu_context)
return;
pmu_data = pmu_context->pmu_data;
if (pmu_data->powerdown_conf)
pmu_data->powerdown_conf(mode);
if (pmu_data->pmu_config) {
for (i = 0; (pmu_data->pmu_config[i].offset != PMU_TABLE_END); i++)
pmu_raw_writel(pmu_data->pmu_config[i].val[mode],
pmu_data->pmu_config[i].offset);
}
if (pmu_data->powerdown_conf_extra)
pmu_data->powerdown_conf_extra(mode);
if (pmu_data->pmu_config_extra) {
for (i = 0; pmu_data->pmu_config_extra[i].offset != PMU_TABLE_END; i++)
pmu_raw_writel(pmu_data->pmu_config_extra[i].val[mode],
pmu_data->pmu_config_extra[i].offset);
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 47 | 28.83% | 3 | 33.33% |
inderpal singh | inderpal singh | 37 | 22.70% | 1 | 11.11% |
abhilash kesavan | abhilash kesavan | 30 | 18.40% | 1 | 11.11% |
jongpill lee | jongpill lee | 22 | 13.50% | 2 | 22.22% |
jaecheol lee | jaecheol lee | 14 | 8.59% | 1 | 11.11% |
bartlomiej zolnierkiewicz | bartlomiej zolnierkiewicz | 13 | 7.98% | 1 | 11.11% |
| Total | 163 | 100.00% | 9 | 100.00% |
/*
* PMU platform driver and devicetree bindings.
*/
static const struct of_device_id exynos_pmu_of_device_ids[] = {
{
.compatible = "samsung,exynos3250-pmu",
.data = &exynos3250_pmu_data,
}, {
.compatible = "samsung,exynos4210-pmu",
.data = &exynos4210_pmu_data,
}, {
.compatible = "samsung,exynos4212-pmu",
.data = &exynos4212_pmu_data,
}, {
.compatible = "samsung,exynos4412-pmu",
.data = &exynos4412_pmu_data,
}, {
.compatible = "samsung,exynos5250-pmu",
.data = &exynos5250_pmu_data,
}, {
.compatible = "samsung,exynos5420-pmu",
.data = &exynos5420_pmu_data,
},
{ /*sentinel*/ },
};
static int exynos_pmu_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
struct device *dev = &pdev->dev;
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pmu_base_addr = devm_ioremap_resource(dev, res);
if (IS_ERR(pmu_base_addr))
return PTR_ERR(pmu_base_addr);
pmu_context = devm_kzalloc(&pdev->dev,
sizeof(struct exynos_pmu_context),
GFP_KERNEL);
if (!pmu_context) {
dev_err(dev, "Cannot allocate memory.\n");
return -ENOMEM;
}
pmu_context->dev = dev;
match = of_match_node(exynos_pmu_of_device_ids, dev->of_node);
pmu_context->pmu_data = match->data;
if (pmu_context->pmu_data->pmu_init)
pmu_context->pmu_data->pmu_init();
platform_set_drvdata(pdev, pmu_context);
dev_dbg(dev, "Exynos PMU Driver probe done\n");
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 145 | 91.77% | 1 | 20.00% |
jongpill lee | jongpill lee | 12 | 7.59% | 3 | 60.00% |
jaecheol lee | jaecheol lee | 1 | 0.63% | 1 | 20.00% |
| Total | 158 | 100.00% | 5 | 100.00% |
static struct platform_driver exynos_pmu_driver = {
.driver = {
.name = "exynos-pmu",
.of_match_table = exynos_pmu_of_device_ids,
},
.probe = exynos_pmu_probe,
};
static int __init exynos_pmu_init(void)
{
return platform_driver_register(&exynos_pmu_driver);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 16 | 100.00% | 1 | 100.00% |
| Total | 16 | 100.00% | 1 | 100.00% |
postcore_initcall(exynos_pmu_init);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
pankaj dubey | pankaj dubey | 363 | 66.48% | 7 | 43.75% |
abhilash kesavan | abhilash kesavan | 61 | 11.17% | 1 | 6.25% |
jongpill lee | jongpill lee | 38 | 6.96% | 4 | 25.00% |
inderpal singh | inderpal singh | 37 | 6.78% | 1 | 6.25% |
bartlomiej zolnierkiewicz | bartlomiej zolnierkiewicz | 26 | 4.76% | 1 | 6.25% |
jaecheol lee | jaecheol lee | 19 | 3.48% | 1 | 6.25% |
kukjin kim | kukjin kim | 2 | 0.37% | 1 | 6.25% |
| Total | 546 | 100.00% | 16 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.