linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vikas Sajjan <vikas.sajjan@samsung.com>
To: Pankaj Dubey <pankaj.dubey@samsung.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
	linux@arm.linux.org.uk, Tomasz Figa <t.figa@samsung.com>,
	sunil joshi <joshi@samsung.com>,
	naushad@samsung.com, Thomas Abraham <thomas.ab@samsung.com>,
	chow.kim@samsung.com
Subject: Re: [PATCH v5 0/5] ARM: Exynos: PMU cleanup and refactoring for using DT
Date: Thu, 26 Jun 2014 17:00:05 +0530	[thread overview]
Message-ID: <CAGm_ybjparwowjYPxYSU8XPxUtETUDG2bNWZ+GDgbO_2z8Q4pA@mail.gmail.com> (raw)
In-Reply-To: <1403705032-14835-1-git-send-email-pankaj.dubey@samsung.com>

On Wed, Jun 25, 2014 at 7:33 PM, Pankaj Dubey <pankaj.dubey@samsung.com> wrote:
> This patch series, modifies Exynos Power Management Unit (PMU) related code
> for converting it into a platform_driver. This is also preparation for moving
> PMU related code out of machine folder into a either "drivers/mfd", or
> "drivers/power" or some other suitable place so that ARM64 based SoC can
> utilize common piece of code.
>
> These patches are created on top of Kukjin Kim's for-next.
> I have tested this patches on Exynos5250 Snow board for system boot and S2R.
>
> This patch series depends on following two patch series:
> [1]: mfd: syscon: Decouple syscon interface from syscon devices.
>      https://lkml.org/lkml/2014/6/24/188
>
> [2]: Cleanup patches for mach-exynos.
>      http://www.spinics.net/lists/arm-kernel/msg341474.html
>
> Patch v4 and discussion can be found here:
> https://lkml.org/lkml/2014/5/10/29
>
> Changes Since v4:
>  - Splitted patch series in two parts. Part 1 has code cleanup under mach-exynos
>    and posted as separate patch [2]. Current patchset is part 2 which modified
>    exynos pmu implementation for making it platform driver.
>  - Removed dependency over early_syscon API.
>  - Removed usage of regmap read/write APIs.
>  - Modified probe function to register exynos pmu as syscon provider using
>    Tomasz Figa's syscon patch [1].
>  - Address various other review comments from Tomasz Figa.
>  - Removed signed-off-by of Young-Gun Jang <yg1004.jang@samsung.com>,
>    as this id is no more valid. Taking ownership of all his patches.
>
> Changes Since v3:
>  - Optimized exynos_pmu_probe function by removing exynos_pmu_data_init
>    as suggested by Vikas Sajjan.
>  - Modified syscon_early_regmap_lookup_by_phandle and
>    syscon_regmap_lookup_by_phandle function call to pass property as NULL.
>
> Changes Since v2:
>  - Rebased on top of Daniel Lezcano's Exynos cpuidle refactor patches.
>  - Removed early mapping of PMU base address from exynos.c and removed
>    "get_exynos_pmuaddr" function. Instead of this added code in platsmp.c
>    to get PMU base address using of_iomap as suggested by Tomasz Figa.
>  - Converted PMU implementation into platform_driver by using static
>    platform_device method.
>
> Changes Since v1:
>  - Rebased on latest for-next of Kukjin Kim's tree.
>  - Updated patch: Add support for mapping PMU base address via DT
>         - Removed __initdata from declaration of "exynos_pmu_base", as it caused
>         kernel crash as pointed out by Vikas Sajjan.
>         - Added support for Syscon initialization and getting PMU regmap handle
>         as suggested by Sylwester. Since current implementation of early
>         intialization [1] has limitation that "early_syscon_init" requires
>         DT to be unflattened and system should be able to allocate memory,
>         we can't use regmap handles for platsmp.c file as "smp_secondary_init"
>         will be called before DT unflattening. So I have kept both method for
>         accessing PMU base address. platsmp.c will use ioremmaped address where
>         as rest other files can use regmap handle.
>  - Updated patch: Refactored code for PMU register mapping via DT
>         - Modified to use regmap_read/write when using regmap handle.
>  - Added patch: Add device tree based initialization support for PMU.
>         - Convert existing PMU implementation to be a device tree based
>          before moving it to "drivers/mfd" folder. As suggested by Bartlomiej.
>         - Dropped making a platform_driver for PMU, as currently PMU binding
>         has two compatibility strings as "samsung, exynosxxx-pmu", "syscon",
>         once we enable MFD_SYSCON config option, current "syscon" driver probe
>         gets called and PMU probe never gets called. So modified PMU
>         initialization code to scan DT and match against supported compatiblity
>         string in driver code, and once we get matching node use that for
>         accessing PMU regmap handle using "syscon_early_regmap_lookup_by_phandle".
>         If there is any better solution please suggest.
>
> Pankaj Dubey (5):
>   ARM: EXYNOS: Add support for mapping PMU base address via DT
>   ARM: EXYNOS: Refactored code for using PMU address via DT
>   ARM: EXYNOS: Move "mach/map.h" inclusion from regs-pmu.h to platsmp.c
>   ARM: EXYNOS: Add platform driver support for Exynos PMU
>   ARM: EXYNOS: Move PMU specific definitions from common.h
>
>  arch/arm/mach-exynos/Kconfig                 |    1 +
>  arch/arm/mach-exynos/common.h                |   18 +-
>  arch/arm/mach-exynos/exynos-pmu.h            |   31 ++
>  arch/arm/mach-exynos/exynos.c                |   63 +++-
>  arch/arm/mach-exynos/include/mach/map.h      |    3 -
>  arch/arm/mach-exynos/mcpm-exynos.c           |    5 +-
>  arch/arm/mach-exynos/platsmp.c               |    4 +-
>  arch/arm/mach-exynos/pm.c                    |   80 ++--
>  arch/arm/mach-exynos/pmu.c                   |  223 ++++++++---
>  arch/arm/mach-exynos/regs-pmu.h              |  510 +++++++++++++-------------
>  arch/arm/plat-samsung/include/plat/map-s5p.h |    1 -
>  11 files changed, 556 insertions(+), 383 deletions(-)
>  create mode 100644 arch/arm/mach-exynos/exynos-pmu.h
>

Tested S2R with the entire series on exynos5420 based Chromebook.

Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>


> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-06-26 11:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 14:03 [PATCH v5 0/5] ARM: Exynos: PMU cleanup and refactoring for using DT Pankaj Dubey
2014-06-25 14:03 ` [PATCH v5 1/5] ARM: EXYNOS: Add support for mapping PMU base address via DT Pankaj Dubey
2014-06-30 16:11   ` Tomasz Figa
2014-07-05  6:31     ` Pankaj Dubey
2014-06-25 14:03 ` [PATCH v5 2/5] ARM: EXYNOS: Refactored code for using PMU " Pankaj Dubey
2014-06-30 16:19   ` Tomasz Figa
2014-07-05  6:34     ` Pankaj Dubey
2014-06-25 14:03 ` [PATCH v5 3/5] ARM: EXYNOS: Move "mach/map.h" inclusion from regs-pmu.h to platsmp.c Pankaj Dubey
2014-06-30 16:20   ` Tomasz Figa
2014-07-05  6:35     ` Pankaj Dubey
2014-06-25 14:03 ` [PATCH v5 4/5] ARM: EXYNOS: Add platform driver support for Exynos PMU Pankaj Dubey
2014-06-30 17:05   ` Tomasz Figa
2014-07-05  7:09     ` Pankaj Dubey
2014-07-08 14:14       ` Tomasz Figa
2014-06-25 14:03 ` [PATCH v5 5/5] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey
2014-06-30 17:15   ` Tomasz Figa
2014-07-05  7:10     ` Pankaj Dubey
2014-06-26 11:30 ` Vikas Sajjan [this message]

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=CAGm_ybjparwowjYPxYSU8XPxUtETUDG2bNWZ+GDgbO_2z8Q4pA@mail.gmail.com \
    --to=vikas.sajjan@samsung.com \
    --cc=chow.kim@samsung.com \
    --cc=joshi@samsung.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=linux@arm.linux.org.uk \
    --cc=naushad@samsung.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=t.figa@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 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).