Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754691AbbKCBzT (ORCPT ); Mon, 2 Nov 2015 20:55:19 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:52329 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753416AbbKCBzP (ORCPT ); Mon, 2 Nov 2015 20:55:15 -0500 X-AuditID: cbfec7f5-f794b6d000001495-36-56381400df3e Subject: Re: [PATCH v3 3/7] ARCH: EXYNOS: split up exynos3250 SoC specific PMU data To: Pankaj Dubey , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1445864143-25695-1-git-send-email-pankaj.dubey@samsung.com> <1445864143-25695-4-git-send-email-pankaj.dubey@samsung.com> Cc: kgene.kim@samsung.com, thomas.ab@samsung.com, amitdanielk@gmail.com From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <563813F8.6000201@samsung.com> Date: Tue, 03 Nov 2015 10:55:04 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-version: 1.0 In-reply-to: <1445864143-25695-4-git-send-email-pankaj.dubey@samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsVy+t/xa7oMIhZhBk/aBC0+rn7JZvH6haFF 74KrbBabHl9jtbi8aw6bxYzz+5gsFm39wm7RsYzRgcNj56y77B6bl9R79G1ZxejxeZNcAEsU l01Kak5mWWqRvl0CV8a3juVMBU/EKp58OMvcwHhPqIuRk0NCwERiyq4GFghbTOLCvfVsXYxc HEICSxkl7nz/CeV8YZT4teghM0iVsECoxNHvZ1hBEiICUxglLvYsY4SoameUaLzwkQmkilnA XWJl9x9GEJtNwFhi8/IlbBA75CR6uyeB7eMV0JLYcng3UJyDg0VAVaJhAy9IWFQgQmLihAZW iBJBiR+T74GVcwp4Srz/fxGsnFlAT+L+RS2ITfISm9e8ZZ7AKDgLSccshKpZSKoWMDKvYhRN LU0uKE5KzzXSK07MLS7NS9dLzs/dxAgJ+687GJceszrEKMDBqMTDu2CJeZgQa2JZcWXuIUYJ DmYlEd6XXBZhQrwpiZVVqUX58UWlOanFhxilOViUxHln7nofIiSQnliSmp2aWpBaBJNl4uCU amA0m8pTNU06eEZxeMzr8vY0JtX4JoXkBEM3btfadd90nc/O+ilzw/WndRPjF7YbSu9u9kwx 7H345/jW3uSZFT/55cMD9z/7/nDpErPgpe/flCo18M7Xe1BVqO+lxlMtfe4Tx0J1ne03G5q6 wnR7TQ2k+o4v62mM2/g2KEnt2f1JfcycP5t+7FNiKc5INNRiLipOBAD4DQLtdwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3073 Lines: 93 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 > --- > 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 > + > +#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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/