From: jonghwa3.lee@samsung.com (jonghwa3.lee at samsung.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] soc: samsung: pmu: split up SoC specific PMU data
Date: Wed, 03 Dec 2014 14:34:20 +0900 [thread overview]
Message-ID: <547EA0DC.70800@samsung.com> (raw)
In-Reply-To: <1417364162-29981-1-git-send-email-pankaj.dubey@samsung.com>
On 2014? 12? 01? 01:16, Pankaj Dubey wrote:
> This patch splits up exynos-pmu.c file, and moves PMU configuration data
> and functions handing those data into SoC specific PMU files, keeping
> driver structure and common functionality into exynos-pmu.c.
>
> At the same time it also separates compilation of these different SoC PMU files
> based on CONFIG_ARM64 and CONFIG_ARM. This way we can reduce overhead of ARM64
> SoC's PMU getting compiled when kernel is built for ARM and vice-versa.
>
> This patch also removes .owner field from exynos-pmu.c as it's redundant for
> drivers calling platform_driver_register to register platform_driver.
>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> This patch is prepared on top of kgene/for-next and following patch [1] from
> Amit Daniel.
>
> [1]: http://www.spinics.net/lists/linux-samsung-soc/msg39797.html
>
> This patch tries to address some of concerns raised for using exynos-pmu.c for
> ARM and ARM64 based SoC at these threads [2], [3].
>
> [2]: http://www.spinics.net/lists/linux-samsung-soc/msg39809.html
> [3]: https://lkml.org/lkml/2014/11/24/322
>
> Since Exynos SoC's has similar PMU IP, and already existing bindings can be
> used, it makes sense to keep single driver for both ARM and ARM64 based SoCs.
> All common functionalties are in exynos-pmu.c whereas SoC specific data and
> handling are moved into SoC specific exynosNNNN-pmu files.
>
> All changes are compiled tested only. Any improvements/suggestions are most
> welcome.
>
> drivers/soc/samsung/Makefile | 9 +-
> drivers/soc/samsung/exynos-pmu.c | 1293 +---------------------------------
> drivers/soc/samsung/exynos-pmu.h | 63 ++
> drivers/soc/samsung/exynos3250-pmu.c | 176 +++++
> drivers/soc/samsung/exynos4-pmu.c | 223 ++++++
> drivers/soc/samsung/exynos5250-pmu.c | 196 ++++++
> drivers/soc/samsung/exynos5420-pmu.c | 298 ++++++++
> drivers/soc/samsung/exynos7-pmu.c | 441 ++++++++++++
> 8 files changed, 1412 insertions(+), 1287 deletions(-)
> create mode 100644 drivers/soc/samsung/exynos-pmu.h
> create mode 100644 drivers/soc/samsung/exynos3250-pmu.c
> create mode 100644 drivers/soc/samsung/exynos4-pmu.c
> create mode 100644 drivers/soc/samsung/exynos5250-pmu.c
> create mode 100644 drivers/soc/samsung/exynos5420-pmu.c
> create mode 100644 drivers/soc/samsung/exynos7-pmu.c
>
...
> diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h
> new file mode 100644
> index 0000000..4adc5a3
> --- /dev/null
> +++ b/drivers/soc/samsung/exynos-pmu.h
> @@ -0,0 +1,63 @@
> +/*
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Header for EXYNOS PMU Driver 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.
> + */
> +
> +#ifndef __EXYNOSPMU_H
> +#define __EXYNOSPMU_H
> +
> +#include <linux/io.h>
> +
> +#define PMU_TABLE_END (-1U)
> +
> +static void __iomem *pmu_base_addr;
> +
AFAIK, static variable in header file can't be used globally. It would be placed
in exynos-pmu.c or elsewhere and then only extern declaration is allowed here.
If I'm wrong, please let me know.
Thanks.
Jonghwa
next parent reply other threads:[~2014-12-03 5:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1417364162-29981-1-git-send-email-pankaj.dubey@samsung.com>
2014-12-03 5:34 ` jonghwa3.lee at samsung.com [this message]
2014-12-04 3:32 ` [PATCH] soc: samsung: pmu: split up SoC specific PMU data Pankaj Dubey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547EA0DC.70800@samsung.com \
--to=jonghwa3.lee@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).