Re: [PATCH v3 1/3] driver core: handle -EPROBE_DEFER from bus_type.match()

2015-12-01 Thread Ulf Hansson
rhaps multiple times, whenever a new device or > driver > - * is added for this bus. It should return a nonzero value if the > + * is added for this bus. It should return a positive value if > the Perhaps add some more information about what happens when returning err

Re: [PATCH v3 3/3] ARM: amba: Properly handle devices with power domains

2015-12-01 Thread Ulf Hansson
access device's registers. > > Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com> Reviewed-by: Ulf Hansson <ulf.hans...@linaro.org> Kind regards Uffe > --- > drivers/amba/bus.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/amba/bus

Re: [PATCH v3 2/3] ARM: amba: Move reading of periphid to amba_match()

2015-12-01 Thread Ulf Hansson
, > + ret); If you anyway are printing errors in the driver core, why do it here as well? I guess you need to make a call, either here or in driver core. I am fine with whatever way, just not both. > + return ret; > +

Re: [PATCH v2 2/4] driver core: handle -EPROBE_DEFER from bus_type.match()

2015-12-01 Thread Ulf Hansson
[...] >>> @@ -500,8 +501,17 @@ static int __device_attach_driver(struct >>> device_driver *drv, void *_data) >>> if (dev->driver) >>> return -EBUSY; >>> >>> - if (!driver_match_device(drv, dev)) >>> + ret = driver_match_device(drv, dev); >>> + if (!ret)

Re: [PATCH v2 3/4] ARM: amba: Move reading of periphid to amba_match()

2015-11-30 Thread Ulf Hansson
On 26 November 2015 at 13:49, Marek Szyprowski wrote: > From: Tomeu Vizoso > > Reading the periphid when the Primecell device is registered means that > the apb pclk must be available by then or the device won't be registered > at all. > > By

Re: [PATCH v2 2/4] driver core: handle -EPROBE_DEFER from bus_type.match()

2015-11-30 Thread Ulf Hansson
On 26 November 2015 at 13:49, Marek Szyprowski wrote: > From: Tomeu Vizoso > > Lets implementations of the match() callback in struct bus_type to /s/Lets/Allow > return errors and if it's -EPROBE_DEFER then queue the device for > deferred

Re: [PATCH 1/2] drivers: amba: properly handle devices with power domains

2015-11-26 Thread Ulf Hansson
On 26 November 2015 at 09:39, Marek Szyprowski <m.szyprow...@samsung.com> wrote: > Hello, > > On 2015-11-25 19:09, Russell King - ARM Linux wrote: >> >> On Wed, Nov 25, 2015 at 02:56:10PM +0100, Ulf Hansson wrote: >>> >>> On 25 November 2015 at 14:3

Re: [PATCH 1/2] drivers: amba: properly handle devices with power domains

2015-11-25 Thread Ulf Hansson
On 25 November 2015 at 14:34, Marek Szyprowski wrote: > Hello, > > On 2015-11-25 14:24, Russell King - ARM Linux wrote: >> >> On Wed, Nov 25, 2015 at 01:58:09PM +0100, Marek Szyprowski wrote: >>> >>> To read pid/cid registers, the probed device need to be properly turned

Re: [PATCH v3 00/10] Add tune support of Mediatek MMC driver

2015-10-27 Thread Ulf Hansson
On 27 October 2015 at 07:24, Chaotian Jing wrote: > Change in v3: > Fix checkpatch errors and warnings for patch 8 > Split patch 9, make DT parts enabling hw reset separately > > Change in v2: > Drop the 400mhz and use assigned-clock-parents to instead > Split the

Re: [PATCH] mmc: pwrseq: Use highest priority for eMMC restart handler

2015-10-27 Thread Ulf Hansson
On 21 October 2015 at 17:15, Javier Martinez Canillas wrote: > The pwrseq_emmc driver does a eMMC card reset before a system reboot to > allow broken or limited ROM boot-loaders (that don't have an eMMC reset > logic) to be able to read the second stage from the eMMC. > >

Re: [PATCH v2 0/9] Add tune support of Mediatek MMC driver

2015-10-20 Thread Ulf Hansson
On 20 October 2015 at 11:13, Chaotian Jing wrote: > Change in v2: > Drop the 400mhz and use assigned-clock-parents to instead > Split the original tune patch to several independent patches > Re-write the mmc_send_tuning() > Fix GPD checksum error > Move the HS400

Re: [PATCH 1/1] mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc()

2015-04-14 Thread Ulf Hansson
On 13 April 2015 at 16:07, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: If the struct mmc_pwrseq_match .alloc function used to allocate a struct mmc_pwrseq fails, the error is propagated to mmc_of_parse(). But instead of returning the error code in pwrseq, host-pwrseq is

Re: [PATCH v4 1/3] mmc: pwrseq: add driver for emmc hardware reset

2015-02-04 Thread Ulf Hansson
. See below. Kind regards Uffe --- Changelog: v4: - fixed minor issues reported by Ulf Hansson (comment adjustments, removed .shutdown callback, reduced delay time) v3: http://www.spinics.net/lists/linux-samsung-soc/msg41956.html - removed optional support for reset-gpio, reported by Javier

Re: [PATCH v3 1/3] mmc: pwrseq: add driver for emmc hardware reset

2015-02-02 Thread Ulf Hansson
On 2 February 2015 at 11:05, Marek Szyprowski m.szyprow...@samsung.com wrote: This patch provides a simple mmc-pwrseq-emmc driver, which controls single gpio line. It perform standard eMMC hw reset procedure, as descibed by Jedec 4.4 specification. This procedure is performed just after MMC

Re: [PATCH v3 0/6] Add multiple GPIO and external clock to MMC pwrseq_simple

2015-01-30 Thread Ulf Hansson
On 29 January 2015 at 16:00, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Hello Ulf, Many WLAN chips attached to an SDIO interface needs more than one GPIO for their reset sequence and also an external clock to be operational. Since this is very common, this series extend

Re: [PATCH v3 4/6] mmc: pwrseq_simple: Add optional reference clock support

2015-01-30 Thread Ulf Hansson
.power_off can be called prior to .pre_power_on. Suggested by Ulf Hansson. - clk_get() does not return -ENOSYS so don't check for that. Suggested by Ulf Hansson. Changes since v1: - Rebase on top of latest changes. - Use IS_ERR() instead of checking for NULL to see if the clock exists

Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line

2015-01-30 Thread Ulf Hansson
On 30 January 2015 at 11:37, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 2015-01-29 11:56, Javier Martinez Canillas wrote: On Thu, Jan 29, 2015 at 10:15 AM, Marek Szyprowski m.szyprow...@samsung.com wrote: Also, I wonder whether we could extend the mmc-pwrseq to cover your

Re: [PATCH v2 4/6] mmc: pwrseq_simple: Add optional reference clock support

2015-01-29 Thread Ulf Hansson
On 28 January 2015 at 19:15, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Some WLAN chips attached to a SDIO interface, need a reference clock. Since this is very common, extend the prseq_simple driver to support an optional clock that is enabled prior the card power up

Re: [PATCH 1/2] mmc: dw_mmc-exynos: add support for controlling emmc reset pin

2015-01-28 Thread Ulf Hansson
On 28 January 2015 at 16:23, Tobias Jakobi liquid.a...@gmx.net wrote: Ulf Hansson wrote: On 28 January 2015 at 13:41, Tobias Jakobi liquid.a...@gmx.net wrote: Hello! Jaehoon Chung wrote: mmc core supported to hw_reset function. So i think we can use it. It's called at only initial time

Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line

2015-01-28 Thread Ulf Hansson
On 28 January 2015 at 14:59, Marek Szyprowski m.szyprow...@samsung.com wrote: There are boards (like Hardkernel's Odroid boards) on which eMMC card's reset line is connected to GPIO line instead of the hardware reset logic. In case of such boards, if first stage of bootloader is loaded from

Re: [PATCH] mmc: dw_mmc: exynos: remove incorrect __exit_p()

2015-01-27 Thread Ulf Hansson
On 24 January 2015 at 01:33, Dmitry Torokhov dmitry.torok...@gmail.com wrote: dw_mci_pltfm_remove() is not (nor should it be) marked as __exit, so we should not be using __exit_p() wrapper with it. Signed-off-by: Dmitry Torokhov dmitry.torok...@gmail.com Thanks! Applied for next. Kind

[PATCH 4/8] PM / Domains: Don't check for an existing device when adding a new

2015-01-27 Thread Ulf Hansson
When adding a device to a genpd, we no longer need to walk genpd's list of existing devices to verify it hasn't already been added. Instead we can now rely on the verification of not allowing existing generic_pm_domain_data for a device, since that has the same meaning. Signed-off-by: Ulf

[PATCH 7/8] PM / Domains: Re-order initialization of generic_pm_domain_data

2015-01-27 Thread Ulf Hansson
regions for where genpd's mutex is being held and for where the device's power related spinlock is being held. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/base/power/domain.c | 67 +++-- 1 file changed, 35 insertions(+), 32 deletions

[PATCH 1/8] PM / Domains: Rename __pm_genpd_alloc|free_dev_data()

2015-01-27 Thread Ulf Hansson
: pm_genpd_* _pm_genpd_* __pm_genpd_* Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/base/power/domain.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c5280f2..f9e7df5 100644 --- a/drivers

[PATCH 2/8] PM / Domains: Remove reference counting for the generic_pm_domain_data

2015-01-27 Thread Ulf Hansson
The reference counting was needed when genpd supported PM domain device callbacks. Since this option has been removed, let's also remove the reference counting of the struct generic_pm_domain_data. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/base/power/domain.c | 10

[PATCH V2 4/8] [media] exynos-gsc: Make runtime PM callbacks available for CONFIG_PM

2015-01-19 Thread Ulf Hansson
There are no need to set up the runtime PM callbacks unless they are being used. It also causes compiler warnings about unused functions. Silence the warnings by making them available for CONFIG_PM. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc

[PATCH V2 6/8] [media] exynos-gsc: Do full clock gating at runtime PM suspend

2015-01-19 Thread Ulf Hansson
To potentially save more power in runtime PM suspend state, let's also prepare/unprepare the clock from the runtime PM callbacks. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH V2 5/8] [media] exynos-gsc: Fixup clock management at -remove()

2015-01-19 Thread Ulf Hansson
To make sure the clock is fully gated in -remove(), we first need to to bring the device into full power by invoking pm_runtime_get_sync(). Then, let's both unprepare and disable the clock. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c | 7

[PATCH V2 2/8] [media] exynos-gsc: Convert gsc_m2m_resume() from int to void

2015-01-19 Thread Ulf Hansson
Since gsc_m2m_resume() always returns 0, convert it to a void instead. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b

[PATCH V2 3/8] [media] exynos-gsc: Make driver functional when CONFIG_PM is unset

2015-01-19 Thread Ulf Hansson
The driver depended on CONFIG_PM to be functional. Let's remove that dependency, by enable the runtime PM resourses during -probe() and update the device's runtime PM status to reflect this. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c | 19

[PATCH V2 1/8] [media] exynos-gsc: Simplify clock management

2015-01-19 Thread Ulf Hansson
Instead of having separate functions that fecthes, prepares and unprepares the clock, let's encapsulate this code into -probe(). This makes error handling easier and decreases the lines of code. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c

[PATCH V2 0/8] [media] exynos-gsc: Fixup PM support

2015-01-19 Thread Ulf Hansson
to potentially save some more power at runtime PM suspend. Ulf Hansson (8): [media] exynos-gsc: Simplify clock management [media] exynos-gsc: Convert gsc_m2m_resume() from int to void [media] exynos-gsc: Make driver functional when CONFIG_PM is unset [media] exynos-gsc: Make runtime PM

[PATCH V2 7/8] [media] exynos-gsc: Make system PM callbacks available for CONFIG_PM_SLEEP

2015-01-19 Thread Ulf Hansson
There are no need to set up the system PM callbacks unless they are being used. It also causes compiler warnings about unused functions. Silence the warnings by making them available for CONFIG_PM_SLEEP. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc

[PATCH V2 8/8] [media] exynos-gsc: Simplify system PM

2015-01-19 Thread Ulf Hansson
It's not needed to keep a local flag about the current system PM state. Let's just remove that code and the corresponding debug print. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- drivers/media/platform/exynos-gsc/gsc-core.c | 21 - drivers/media/platform/exynos-gsc

Re: [PATCH v3 2/7] ARM: Exynos: add support for sub-power domains

2015-01-16 Thread Ulf Hansson
enabled to be operational. Based on previous work by Amit Daniel Kachhap amit.dan...@samsung.com Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com Reviewed-by: Ulf Hansson ulf.hans...@linaro.org I also had a look at the other patches in this patchset from a PM domain DT point of view

Re: [RFC 0/3] mmc: Add dynamic frequency scaling

2015-01-15 Thread Ulf Hansson
+ Mike, Stephen (Clock maintainers) On 12 January 2015 at 10:23, Krzysztof Kozlowski k.kozlow...@samsung.com wrote: Hi, I would like to hear some comments about idea of scaling MMC clock frequency. The basic idea is to lower the clock when device is completely idle or not busy enough. We

Re: [RFC 0/3] mmc: Add dynamic frequency scaling

2015-01-15 Thread Ulf Hansson
On 15 January 2015 at 10:20, Krzysztof Kozlowski k.kozlow...@samsung.com wrote: On czw, 2015-01-15 at 09:20 +0100, Ulf Hansson wrote: + Mike, Stephen (Clock maintainers) On 12 January 2015 at 10:23, Krzysztof Kozlowski k.kozlow...@samsung.com wrote: Hi, I would like to hear some

Re: [PATCH v3 1/7 RESEND] PM / Domains: Add a note about power domain subdomains

2015-01-14 Thread Ulf Hansson
m.szyprow...@samsung.com Reviewed-by: Ulf Hansson ulf.hans...@linaro.org Kind regards Uffe --- RESEND version: - fixed spelling mistakes, thanks go to Geert! --- .../devicetree/bindings/power/power_domain.txt | 29 ++ 1 file changed, 29 insertions(+) diff --git

Re: [PATCH v4 0/2] mmc: dw_mmc: exynos: Add HS400 support

2015-01-14 Thread Ulf Hansson
On 14 January 2015 at 16:35, Kukjin Kim kg...@kernel.org wrote: On 01/14/15 22:32, Jaehoon Chung wrote: Hi, Alim. On 01/14/2015 07:30 PM, Alim Akhtar wrote: This adds HS400 mode support for exynos dw_mmc host controller. Currently tested on Exynos5800-peach-pi platform for HS400 mode.

Re: [PATCH v2 1/6] ARM: Exynos: add support for sub-power domains

2015-01-13 Thread Ulf Hansson
On 13 January 2015 at 11:53, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 2015-01-13 11:44, Ulf Hansson wrote: On 13 January 2015 at 10:39, Marek Szyprowski m.szyprow...@samsung.com wrote: This patch adds support for making one power domain a sub-domain of other domain

Re: [PATCH v2 1/6] ARM: Exynos: add support for sub-power domains

2015-01-13 Thread Ulf Hansson
On 13 January 2015 at 10:39, Marek Szyprowski m.szyprow...@samsung.com wrote: This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain

Re: [PATCH v3 1/4] mmc: dw_mmc: exynos: incorporate ciu_div into timing property

2015-01-02 Thread Ulf Hansson
On 31 December 2014 at 07:43, Alim Akhtar alim.akh...@samsung.com wrote: From: Seungwon Jeon tgih@samsung.com ciu_div may not be common value for all speed mode. So, it needs to be attached to CLKSEL timing. This also introduce a new compatibale 'dw-mshc-hs200-timing' for selecting hs200

Re: [PATCH 4/4] PM: Eliminate CONFIG_PM_RUNTIME

2014-12-18 Thread Ulf Hansson
the tree. Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com I am impressed , in this short period of time we managed to remove all *PM_RUNTIME configurations! Great work! Reviewed-by: Ulf Hansson ulf.hans...@linaro.org --- arch/arm/configs/ape6evm_defconfig |2 +- arch

Re: [PATCH V4 1/3] PM / Domains: Initial PM clock support for genpd

2014-12-04 Thread Ulf Hansson
On 2 December 2014 at 02:09, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: It's quite common for PM domains to use PM clocks. Typically from SOC specific code, the per device PM clock list is created and pm_clk_suspend|resume() are invoked to handle clock

Re: [PATCH] PM/ Domains: Export of_genpd_get_from_provider function.

2014-12-04 Thread Ulf Hansson
is already registered. Signed-off-by: Amit Daniel Kachhap amit.dan...@samsung.com --- This patch may solve the same purpose which is done by earlier posts 1) https://lkml.org/lkml/2014/11/24/319 - In this there were comments for not using the PM domain name. 2) Ulf Hansson posted a patch http

Re: [PATCH V2] PM / Domains: Add pm_genpd_lookup() API to lookup domain by firmware node

2014-12-04 Thread Ulf Hansson
On 1 December 2014 at 12:57, amit daniel kachhap amit.dan...@samsung.com wrote: On Mon, Dec 1, 2014 at 3:56 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 29 November 2014 at 01:30, Rafael J. Wysocki r...@rjwysocki.net wrote: On Friday, November 28, 2014 11:38:35 AM Ulf Hansson wrote

Re: [PATCH V2] PM / Domains: Add pm_genpd_lookup() API to lookup domain by firmware node

2014-12-01 Thread Ulf Hansson
On 29 November 2014 at 01:30, Rafael J. Wysocki r...@rjwysocki.net wrote: On Friday, November 28, 2014 11:38:35 AM Ulf Hansson wrote: In a step to move away from using genpd's name based APIs, such as the pm_genpd_add_subdomain_names(), provide an API to lookup an already initialized generic

[PATCH V4 2/3] ARM: shmobile: Convert to genpd flags for PM clocks for r8a7779

2014-12-01 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to GENPD_FLAG_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Acked-by: Geert Uytterhoeven geert+rene...@glider.be --- Changes in v4: Convert to renamed define

[PATCH V4 0/3] PM / Domains: Add initial PM clock support to genpd

2014-12-01 Thread Ulf Hansson
that are keen on using PM clocks thus we need to provide this a configuration option for genpd. In patch 2 and patch 3, we convert some of the SH-MOBILE SOCs to start using the new PM clock support in genpd. Ulf Hansson (3): PM / Domains: Initial PM clock support for genpd ARM: shmobile: Convert

[PATCH V4 3/3] ARM: shmobile: Convert to genpd flags for PM clocks for R-mobile

2014-12-01 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to GENPD_FLAG_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Acked-by: Geert Uytterhoeven geert+rene...@glider.be Tested-by: Geert Uytterhoeven geert+rene...@glider.be

[PATCH V4 1/3] PM / Domains: Initial PM clock support for genpd

2014-12-01 Thread Ulf Hansson
users of genpd that are keen on using PM clocks, thus we need to provide this a configuration option for genpd. Therefore let's add flag field in the genpd struct to keep this information and define a new GENDP_FLAG_PM_CLK bit for it. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Acked-by: Geert

[PATCH V3 2/3] ARM: shmobile: Convert to genpd flags for PM clocks for r8a7779

2014-11-28 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to GENPD_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v3: Convert to renamed define. Changes in v2: None. --- arch/arm/mach-shmobile

[PATCH V3 3/3] ARM: shmobile: Convert to genpd flags for PM clocks for R-mobile

2014-11-28 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to GENPD_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v3: Convert to renamed define. Changes in v2: None. --- arch/arm/mach-shmobile

[PATCH V3 1/3] PM / Domains: Initial PM clock support for genpd

2014-11-28 Thread Ulf Hansson
users of genpd that are keen on using PM clocks, thus we need to provide this a configuration option for genpd. Therefore let's add flag field in the genpd struct to keep this information and define a new GENDP_PM_CLK bit for it. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v3

[PATCH V3 0/3] PM / Domains: Add initial PM clock support to genpd

2014-11-28 Thread Ulf Hansson
and patch 3, we convert some of the SH-MOBILE SOCs to start using the new PM clock support in genpd. Ulf Hansson (3): PM / Domains: Initial PM clock support for genpd ARM: shmobile: Convert to genpd flags for PM clocks for r8a7779 ARM: shmobile: Convert to genpd flags for PM clocks for R-mobile

[PATCH V2] PM / Domains: Add pm_genpd_lookup() API to lookup domain by firmware node

2014-11-28 Thread Ulf Hansson
() to find the domain. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v2: Change from using struct device_node to struct fwnode_handle. Updated commit header accordingly. --- drivers/base/power/domain.c | 27 +++ include/linux/pm_domain.h

[PATCH] PM / Domains: Add pm_genpd_lookup() API to lookup domain by device node

2014-11-27 Thread Ulf Hansson
() to find the domain. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- The background to why I propose this patch comes from a discussion around the below patchset: https://lkml.org/lkml/2014/11/24/290 --- drivers/base/power/domain.c | 26 ++ include/linux/pm_domain.h

[PATCH V2 2/3] ARM: shmobile: Convert to genpd flags for PM clocks for r8a7779

2014-11-27 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to PM_DOMAIN_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v2: None. --- arch/arm/mach-shmobile/pm-r8a7779.c | 3 +-- 1 file changed, 1

[PATCH V2 0/3] PM / Domains: Add initial PM clock support to genpd

2014-11-27 Thread Ulf Hansson
, but that left to future patchsets to address. It's not every users of genpd that are keen on using PM clocks thus we need to provide this a configuration option for genpd. In patch 2 and patch 3, we convert some of the SH-MOBILE SOCs to start using the new PM clock support in genpd. Ulf Hansson (3): PM

[PATCH V2 3/3] ARM: shmobile: Convert to genpd flags for PM clocks for R-mobile

2014-11-27 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to PM_DOMAIN_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v2: None. --- arch/arm/mach-shmobile/pm-rmobile.c | 3 +-- 1 file changed, 1

[PATCH V2 1/3] PM / Domains: Initial PM clock support for genpd

2014-11-27 Thread Ulf Hansson
users of genpd that are keen on using PM clocks thus we need to provide this a configuration option for genpd. Therefore let's add flag field in the genpd struct to keep this information and define a new PM_DOMAIN_PM_CLK bit can then be set at initialization. Signed-off-by: Ulf Hansson ulf.hans

Re: [PATCH RFC v2 06/12] driver: soc: exynos-pmu: Add exynos7 power domain on/off ops

2014-11-24 Thread Ulf Hansson
On 24 November 2014 at 14:04, Amit Daniel Kachhap amit.dan...@samsung.com wrote: This patch uses the restructuring done in PD handlers and adds PD on/off/status handlers for exynos7. In this SoC, some extra settings need to be done prior to turning on/off power domains. Some of those settings

Re: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name

2014-11-24 Thread Ulf Hansson
On 24 November 2014 at 14:04, Amit Daniel Kachhap amit.dan...@samsung.com wrote: This API may be needed to set the power domain parent/child relationship in the power domain platform driver. The parent relationship is generally set after the child power domain is registered with the power

Re: [PATCH RFC v2 08/12] soc: samsung: pm_domain: Add support for parent power domain

2014-11-24 Thread Ulf Hansson
On 24 November 2014 at 14:04, Amit Daniel Kachhap amit.dan...@samsung.com wrote: This patch adds supports for parent power domain. This will ensure invoking of parent/child power domain on/off in a correct sequence. In exynos7 SOC's, power domain controllers have parent and child hierarchy.

Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes

2014-11-20 Thread Ulf Hansson
On 20 November 2014 01:35, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, November 19, 2014 09:54:00 AM Ulf Hansson wrote: [...] Scenario 5), a platform driver with/without runtime PM callbacks. -probe() - do some initialization - may fetch handles to runtime PM resources

Re: [PATCH 0/3] PM / Domains: Add initial PM clock support to genpd

2014-11-20 Thread Ulf Hansson
On 20 November 2014 01:33, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: It's quite common for PM domains to use PM clocks. Typically from SOC specific code, the per device PM clock list is created and pm_clk_suspend|resume() are invoked to handle clock

Re: [PATCH 1/3] PM / Domains: Initial PM clock support for genpd

2014-11-20 Thread Ulf Hansson
On 19 November 2014 18:25, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Wed, Nov 19, 2014 at 03:00:36PM +0100, Ulf Hansson wrote: It's quite common for PM domains to use PM clocks. Typically from SOC specific code, the per device PM clock list is created and pm_clk_suspend|resume

Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes

2014-11-20 Thread Ulf Hansson
On 20 November 2014 13:17, Grygorii Strashko grygorii.stras...@ti.com wrote: On 11/19/2014 10:54 AM, Ulf Hansson wrote: [...] Scenario 5), a platform driver with/without runtime PM callbacks. -probe() - do some initialization - may fetch handles to runtime PM resources - pm_runtime_enable

Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes

2014-11-19 Thread Ulf Hansson
[...] Scenario 5), a platform driver with/without runtime PM callbacks. -probe() - do some initialization - may fetch handles to runtime PM resources - pm_runtime_enable() Well, and now how the driver knows if the device is on before accessing it? In this case the driver don't need to

[PATCH 2/3] ARM: shmobile: Convert to genpd flags for PM clocks for r8a7779

2014-11-19 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to PM_DOMAIN_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- arch/arm/mach-shmobile/pm-r8a7779.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 0/3] PM / Domains: Add initial PM clock support to genpd

2014-11-19 Thread Ulf Hansson
not every users of genpd that are keen on using PM clocks thus we need to provide this a configuration option for genpd. In patch 2 and patch 3, we convert some of the SH-MOBILE SOCs to start using the new PM clock support in genpd. Ulf Hansson (3): PM / Domains: Initial PM clock support for genpd

[PATCH 1/3] PM / Domains: Initial PM clock support for genpd

2014-11-19 Thread Ulf Hansson
users of genpd that are keen on using PM clocks thus we need to provide this a configuration option for genpd. Therefore let's add flag field in the genpd struct to keep this information and define a new PM_DOMAIN_PM_CLK bit can then be set at initialization. Signed-off-by: Ulf Hansson ulf.hans

[PATCH 3/3] ARM: shmobile: Convert to genpd flags for PM clocks for R-mobile

2014-11-19 Thread Ulf Hansson
Instead of using the dev_ops -stop|start() callbacks for genpd, let's convert to use genpd's flag field and set it to PM_DOMAIN_PM_CLK. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- arch/arm/mach-shmobile/pm-rmobile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes

2014-11-18 Thread Ulf Hansson
[...] It would not be the same for all buses. Each bus will have its own way of recognizing whether or not a driver has been probed (i.e., by checking some field in the bus-specific part of the device structure). However, is it allowed to call

[PATCH] PM / Domains: Power on the PM domain right after attach completes

2014-11-17 Thread Ulf Hansson
to the device. The generic PM domain stays powered until all of its devices becomes runtime PM enabled and runtime PM suspended. The old SOCs which makes use of the generic PM domain but don't use the generic OF-based PM domain look-up, will not be affected from this change. Signed-off-by: Ulf Hansson

Re: [PATCH] mmc: dw_mmc: exynos: Add support for exynos7

2014-11-12 Thread Ulf Hansson
On 12 November 2014 02:41, Jaehoon Chung jh80.ch...@samsung.com wrote: Hi, Alim. I have also tested this patch with my board. It's working fine. Looks good to me. Dear, Ulf. Could you merge this patch at your repository? Acked-by: Jaehoon Chung jh80.ch...@samsung.com Thanks! Applied for

[PATCH V2] PM / Domains: Fix initial default state of the need_restore flag

2014-11-11 Thread Ulf Hansson
) Reported-by: Sylwester Nawrocki s.nawro...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com Reviewed-by: Kevin Hilman khil...@linaro.org Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- I am resending the v2, since I realized

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-11 Thread Ulf Hansson
[...] 2) There are no requirements for arch/platforms/drivers to work in both cases CONFIG_PM_RUNTIME=y/n. But they must be built without errors/warning for both cases. For cross SoC drivers this statement is not correct! Driver _must_ support the various combinations of CONFIG_PM*.

[PATCH] PM / Domains: Fix initial default state of the need_restore flag

2014-11-10 Thread Ulf Hansson
) Reported-by: Sylwester Nawrocki s.nawro...@samsung.com Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com Reviewed-by: Kevin Hilman khil...@linaro.org Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- Changes in v2: Applied some Reviewed

Re: [PATCH] PM / Domains: Fix initial default state of the need_restore flag

2014-11-10 Thread Ulf Hansson
[...] I guess we do need it for 3.18, but when we are talking about 3.19, before we make any more changes can we outline how power domains are supposed to work? 1. How do we attach a device to power domain? Right now it seems that individual buses are responsible for attaching their devices

[PATCH] PM / Domains: Fix initial default state of the need_restore flag

2014-11-07 Thread Ulf Hansson
) Reported-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- This patch is intended as fix for 3.18 rc[n] due to the regression for Exynos SOCs. I would also like to call for help in getting this thoroughly tested. I have tested this on Arndale Dual

Re: [PATCH] PM / Domains: Change prototype for the -attach_dev() callback

2014-11-06 Thread Ulf Hansson
: Rafael J. Wysocki r...@rjwysocki.net writes: On Thursday, October 30, 2014 01:02:49 PM Ulf Hansson wrote: Convert the prototype to return and int. This is just an initial step, needed to support error handling. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org Acked-by: Kevin

Re: [PATCH v2 1/4] PM / Domains: Remove pm_genpd_dev_need_restore() API

2014-11-06 Thread Ulf Hansson
[...] Yes they would, although they require some minor additional adaptations. Those resources that are enabled from the driver's runtime PM resume callback, should also be enabled during -probe(). The pm_runtime_set_active() will then update the state to reflect this. Then, if

Re: [PATCH 3/4] PM / Domains: Improve error handling while adding/removing devices

2014-11-05 Thread Ulf Hansson
On 5 November 2014 08:47, Geert Uytterhoeven ge...@linux-m68k.org wrote: On Tue, Oct 28, 2014 at 3:38 PM, Ulf Hansson ulf.hans...@linaro.org wrote: --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1358,25 +1358,81 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); #endif

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-05 Thread Ulf Hansson
On 4 November 2014 22:38, Rafael J. Wysocki r...@rjwysocki.net wrote: On Tuesday, November 04, 2014 10:29:20 AM Dmitry Torokhov wrote: On Tue, Nov 04, 2014 at 06:01:44PM +0100, Ulf Hansson wrote: Devices that are created while discoverable buses are being probed can't be attached

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-04 Thread Ulf Hansson
[...] Generally, there are two or even three levels of runtime PM handling, driver, (possibly) bus type and (possibly) PM domain (and multiple levels of these are possible in principle). All of them have to be initialized at different times. Quite arguably, the PM domain and/or bus type

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-04 Thread Ulf Hansson
On 4 November 2014 10:05, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Tue, Nov 04, 2014 at 09:54:19AM +0100, Ulf Hansson wrote: [...] Generally, there are two or even three levels of runtime PM handling, driver, (possibly) bus type and (possibly) PM domain (and multiple levels

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-04 Thread Ulf Hansson
On 4 November 2014 14:51, Rafael J. Wysocki r...@rjwysocki.net wrote: On Tuesday, November 04, 2014 09:54:19 AM Ulf Hansson wrote: [...] Generally, there are two or even three levels of runtime PM handling, driver, (possibly) bus type and (possibly) PM domain (and multiple levels

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-04 Thread Ulf Hansson
Devices that are created while discoverable buses are being probed can't be attached to a PM domain before the probing is done, because those simply doesn't exist. Honestly, I'm not sure what you're talking about. Devices on a discoverable* bus (say PCI) are added when the *controller* is

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-11-03 Thread Ulf Hansson
On 1 November 2014 01:20, Rafael J. Wysocki r...@rjwysocki.net wrote: On Friday, October 31, 2014 10:16:14 AM Ulf Hansson wrote: On 24 October 2014 18:12, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: Changes in v3: -Rework the entire

Re: [PATCH 03/12] PM / Domains: Add notifier support for power domain transitions

2014-11-03 Thread Ulf Hansson
On 3 November 2014 15:54, Rafael J. Wysocki r...@rjwysocki.net wrote: CC: Kevin, Ulf, Geert. On Monday, November 03, 2014 09:23:01 AM Amit Daniel Kachhap wrote: These power domain transition notifiers will assist in carrying out some activity associated with domain power on/off such as some

Re: [PATCH v3 0/9] PM / Domains: Fix race conditions during boot

2014-10-31 Thread Ulf Hansson
On 24 October 2014 18:12, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: Changes in v3: -Rework the entire intermediate step which was suggested in v2. That means solving the race condition, but also cope with PM domains

Re: [PATCH v3 4/9] drivercore / platform: Keep PM domain powered during -probe()

2014-10-31 Thread Ulf Hansson
On 30 October 2014 21:47, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: To sucessfully probe some devices their corresponding PM domains may need to be powered. Isn't that what pm_runtime_get*() is supposed to be doing? Why isn't that working? Let stay

Re: [PATCH v3 4/9] drivercore / platform: Keep PM domain powered during -probe()

2014-10-31 Thread Ulf Hansson
On 31 October 2014 01:07, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Thu, Oct 30, 2014 at 01:47:27PM -0700, Kevin Hilman wrote: Ulf Hansson ulf.hans...@linaro.org writes: To sucessfully probe some devices their corresponding PM domains may need to be powered. Isn't that what

Re: [PATCH 3/4] PM / Domains: Improve error handling while adding/removing devices

2014-10-30 Thread Ulf Hansson
On 30 October 2014 00:57, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: To improve error handling while adding/removing devices from their PM domains, we need to restructure the code a bit. Let's do this by moving the device specific parts into a separate

Re: [PATCH 3/4] PM / Domains: Improve error handling while adding/removing devices

2014-10-30 Thread Ulf Hansson
On 30 October 2014 00:53, Kevin Hilman khil...@kernel.org wrote: Ulf Hansson ulf.hans...@linaro.org writes: To improve error handling while adding/removing devices from their PM domains, we need to restructure the code a bit. Let's do this by moving the device specific parts into a separate

Re: [PATCH 4/4] PM / Domains: Let the -attach_dev() callback return an error code

2014-10-30 Thread Ulf Hansson
On 29 October 2014 22:10, Kevin Hilman khil...@kernel.org wrote: Geert Uytterhoeven ge...@linux-m68k.org writes: Hi Ulf, Rafael, On Tue, Oct 28, 2014 at 3:38 PM, Ulf Hansson ulf.hans...@linaro.org wrote: Typically an -attach_dev() callback would fetch some PM resourses. Those operations

[PATCH] PM / Domains: Change prototype for the -attach_dev() callback

2014-10-30 Thread Ulf Hansson
Convert the prototype to return and int. This is just an initial step, needed to support error handling. Signed-off-by: Ulf Hansson ulf.hans...@linaro.org --- This patch is intended as fix for 3.18 rc[n]. Why? There are other SOC specific patches around that adds genpd support and which

Re: [PATCH 4/4] PM / Domains: Let the -attach_dev() callback return an error code

2014-10-29 Thread Ulf Hansson
On 28 October 2014 21:31, Geert Uytterhoeven ge...@linux-m68k.org wrote: Hi Ulf, Rafael, On Tue, Oct 28, 2014 at 3:38 PM, Ulf Hansson ulf.hans...@linaro.org wrote: Typically an -attach_dev() callback would fetch some PM resourses. Those operations, like for example clk_get() may fail

Re: [PATCH 4/4] PM / Domains: Let the -attach_dev() callback return an error code

2014-10-29 Thread Ulf Hansson
On 29 October 2014 10:32, Geert Uytterhoeven ge...@linux-m68k.org wrote: Hi Ulf, On Wed, Oct 29, 2014 at 10:26 AM, Ulf Hansson ulf.hans...@linaro.org wrote: On 28 October 2014 21:31, Geert Uytterhoeven ge...@linux-m68k.org wrote: On Tue, Oct 28, 2014 at 3:38 PM, Ulf Hansson ulf.hans

  1   2   3   >