From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Pankaj Dubey <pankaj.dubey@samsung.com>,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: kgene.kim@samsung.com, thomas.ab@samsung.com, amitdanielk@gmail.com
Subject: Re: [PATCH v3 3/7] ARCH: EXYNOS: split up exynos3250 SoC specific PMU data
Date: Tue, 03 Nov 2015 10:55:04 +0900 [thread overview]
Message-ID: <563813F8.6000201@samsung.com> (raw)
In-Reply-To: <1445864143-25695-4-git-send-email-pankaj.dubey@samsung.com>
On 26.10.2015 21:55, Pankaj Dubey wrote:
> This patch splits up mach-exynos/pmu.c file, and moves exynos3250 PMU
> configuration data and functions handing those data into exynos3250
> SoC specific PMU file mach-exynos/exynos3250-pmu.c.
>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> arch/arm/mach-exynos/Makefile | 2 +-
> arch/arm/mach-exynos/exynos-pmu.h | 47 +++++++++
> arch/arm/mach-exynos/exynos3250-pmu.c | 175 +++++++++++++++++++++++++++++++
> arch/arm/mach-exynos/pmu.c | 189 +---------------------------------
> 4 files changed, 224 insertions(+), 189 deletions(-)
> create mode 100644 arch/arm/mach-exynos/exynos-pmu.h
> create mode 100644 arch/arm/mach-exynos/exynos3250-pmu.c
>
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index 2f30676..e869f86 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -9,7 +9,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)
>
> # Core
>
> -obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o
> +obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o exynos3250-pmu.o
>
> obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
> obj-$(CONFIG_PM_SLEEP) += suspend.o
> diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h
> new file mode 100644
> index 0000000..2da4964
> --- /dev/null
> +++ b/arch/arm/mach-exynos/exynos-pmu.h
> @@ -0,0 +1,47 @@
> +/*
> + * Copyright (c) 2015 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
__EXYNOS_PMU_H
(and rename it in last patch)
> +
> +#include <linux/io.h>
> +
> +#define PMU_TABLE_END (-1U)
> +
> +extern void __iomem *pmu_base_addr;
> +
> +struct exynos_pmu_conf {
> + unsigned int offset;
> + u8 val[NUM_SYS_POWERDOWN];
> +};
> +
> +struct exynos_pmu_data {
> + const struct exynos_pmu_conf *pmu_config;
> + const struct exynos_pmu_conf *pmu_config_extra;
> +
> + void (*pmu_init)(void);
> + void (*powerdown_conf)(enum sys_powerdown);
> + void (*powerdown_conf_extra)(enum sys_powerdown);
> +};
> +
> +static inline void pmu_raw_writel(u32 val, u32 offset)
> +{
> + writel_relaxed(val, pmu_base_addr + offset);
> +}
> +
> +static inline u32 pmu_raw_readl(u32 offset)
> +{
> + return readl_relaxed(pmu_base_addr + offset);
> +}
These shouldn't be static inlines in header because you will duplicate
it in each compiled object. Leave optimizations to compiler.
Rest looks good,
Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/7] ARCH: EXYNOS: split up exynos3250 SoC specific PMU data
Date: Tue, 03 Nov 2015 10:55:04 +0900 [thread overview]
Message-ID: <563813F8.6000201@samsung.com> (raw)
In-Reply-To: <1445864143-25695-4-git-send-email-pankaj.dubey@samsung.com>
On 26.10.2015 21:55, Pankaj Dubey wrote:
> This patch splits up mach-exynos/pmu.c file, and moves exynos3250 PMU
> configuration data and functions handing those data into exynos3250
> SoC specific PMU file mach-exynos/exynos3250-pmu.c.
>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
> arch/arm/mach-exynos/Makefile | 2 +-
> arch/arm/mach-exynos/exynos-pmu.h | 47 +++++++++
> arch/arm/mach-exynos/exynos3250-pmu.c | 175 +++++++++++++++++++++++++++++++
> arch/arm/mach-exynos/pmu.c | 189 +---------------------------------
> 4 files changed, 224 insertions(+), 189 deletions(-)
> create mode 100644 arch/arm/mach-exynos/exynos-pmu.h
> create mode 100644 arch/arm/mach-exynos/exynos3250-pmu.c
>
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index 2f30676..e869f86 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -9,7 +9,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)
>
> # Core
>
> -obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o
> +obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o exynos3250-pmu.o
>
> obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
> obj-$(CONFIG_PM_SLEEP) += suspend.o
> diff --git a/arch/arm/mach-exynos/exynos-pmu.h b/arch/arm/mach-exynos/exynos-pmu.h
> new file mode 100644
> index 0000000..2da4964
> --- /dev/null
> +++ b/arch/arm/mach-exynos/exynos-pmu.h
> @@ -0,0 +1,47 @@
> +/*
> + * Copyright (c) 2015 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
__EXYNOS_PMU_H
(and rename it in last patch)
> +
> +#include <linux/io.h>
> +
> +#define PMU_TABLE_END (-1U)
> +
> +extern void __iomem *pmu_base_addr;
> +
> +struct exynos_pmu_conf {
> + unsigned int offset;
> + u8 val[NUM_SYS_POWERDOWN];
> +};
> +
> +struct exynos_pmu_data {
> + const struct exynos_pmu_conf *pmu_config;
> + const struct exynos_pmu_conf *pmu_config_extra;
> +
> + void (*pmu_init)(void);
> + void (*powerdown_conf)(enum sys_powerdown);
> + void (*powerdown_conf_extra)(enum sys_powerdown);
> +};
> +
> +static inline void pmu_raw_writel(u32 val, u32 offset)
> +{
> + writel_relaxed(val, pmu_base_addr + offset);
> +}
> +
> +static inline u32 pmu_raw_readl(u32 offset)
> +{
> + return readl_relaxed(pmu_base_addr + offset);
> +}
These shouldn't be static inlines in header because you will duplicate
it in each compiled object. Leave optimizations to compiler.
Rest looks good,
Krzysztof
next prev parent reply other threads:[~2015-11-03 1:55 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 12:55 [PATCH v3 0/7] samsung: pmu: split up SoC specific PMU data Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 1/7] ARM: EXYNOS: removing redundant code from regs-pmu.h Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 1:37 ` Krzysztof Kozlowski
2015-11-03 1:37 ` Krzysztof Kozlowski
2015-11-05 5:27 ` Pankaj Dubey
2015-11-05 5:27 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 2/7] ARM: EXYNOS: Move pmu specific headers under "linux/soc/samsung" Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 1:46 ` Krzysztof Kozlowski
2015-11-03 1:46 ` Krzysztof Kozlowski
2015-11-05 5:28 ` Pankaj Dubey
2015-11-05 5:28 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 3/7] ARCH: EXYNOS: split up exynos3250 SoC specific PMU data Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 1:55 ` Krzysztof Kozlowski [this message]
2015-11-03 1:55 ` Krzysztof Kozlowski
2015-11-05 5:31 ` Pankaj Dubey
2015-11-05 5:31 ` Pankaj Dubey
2015-11-06 0:35 ` Krzysztof Kozlowski
2015-11-06 0:35 ` Krzysztof Kozlowski
2015-10-26 12:55 ` [PATCH v3 4/7] ARCH: EXYNOS: split up exynos4 " Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 1:56 ` Krzysztof Kozlowski
2015-11-03 1:56 ` Krzysztof Kozlowski
2015-11-05 5:33 ` Pankaj Dubey
2015-11-05 5:33 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 5/7] ARCH: EXYNOS: split up exynos5250 " Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 2:07 ` Krzysztof Kozlowski
2015-11-03 2:07 ` Krzysztof Kozlowski
2015-11-05 5:31 ` Pankaj Dubey
2015-11-05 5:31 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 6/7] ARCH: EXYNOS: split up exynos5420 " Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 2:10 ` Krzysztof Kozlowski
2015-11-03 2:10 ` Krzysztof Kozlowski
2015-11-05 5:31 ` Pankaj Dubey
2015-11-05 5:31 ` Pankaj Dubey
2015-10-26 12:55 ` [PATCH v3 7/7] drivers: soc: Add support for Exynos PMU driver Pankaj Dubey
2015-10-26 12:55 ` Pankaj Dubey
2015-11-03 2:22 ` Krzysztof Kozlowski
2015-11-03 2:22 ` Krzysztof Kozlowski
2015-11-05 5:31 ` Pankaj Dubey
2015-11-05 5:31 ` Pankaj Dubey
2015-11-06 0:47 ` Krzysztof Kozlowski
2015-11-06 0:47 ` Krzysztof Kozlowski
2015-11-03 2:06 ` [PATCH v3 0/7] samsung: pmu: split up SoC specific PMU data Krzysztof Kozlowski
2015-11-03 2:06 ` Krzysztof Kozlowski
2015-11-05 5:27 ` Pankaj Dubey
2015-11-05 5:27 ` Pankaj Dubey
2015-11-06 0:18 ` Krzysztof Kozlowski
2015-11-06 0:18 ` Krzysztof Kozlowski
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=563813F8.6000201@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=amitdanielk@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=pankaj.dubey@samsung.com \
--cc=thomas.ab@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.