Re: [linux-pm] [PATCH v4 2/4] mfd: omap: control: core system control driver

2012-08-09 Thread Konstantin Baydarov
Hi, Tony. On 08/08/2012 06:59 PM, Konstantin Baydarov wrote: Yes, omap_type() is called very early , that is why I'm using early_initcall for omap_control_base initialization. Do you mean following?: void __init omap2_set_globals_control(struct omap_globals *omap2_globals

Re: [linux-pm] [PATCH v4 2/4] mfd: omap: control: core system control driver

2012-08-08 Thread Konstantin Baydarov
Hi, Tony. On 08/08/2012 06:39 PM, Tony Lindgren wrote: * Tony Lindgren t...@atomide.com [120808 07:11]: * Tony Lindgren t...@atomide.com [120808 07:05]: * Konstantin Baydarov kbaida...@dev.rtsoft.ru [120725 04:10]: + +u32 omap_control_status_read(void) +{ + return __raw_readl

[PATCH v4 0/4] OMAP System Control Module

2012-07-25 Thread Konstantin Baydarov
Hello. This is a next version of series of patches(based on Eduardo Valentin's patch set) adding a basic support for system control module, on OMAP4+ context. As Bandgap and usb phy drivers are now independent from control module driver and they will be sent separately. IIUC, Bandgap driver

[PATCH v4 2/4] mfd: omap: control: core system control driver

2012-07-25 Thread Konstantin Baydarov
Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru --- .../devicetree/bindings/mfd/omap_control.txt | 32 arch/arm/mach-omap2/Kconfig|1 + arch/arm/plat-omap/Kconfig |4 + drivers/mfd/Kconfig

[PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type

2012-07-25 Thread Konstantin Baydarov
OMAP system control module can be probed early, then omap_type is safe to use its APIs. TODO: add support for other omap versions Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru --- arch/arm/mach-omap2/id.c | 11 ++- 1

[PATCH v4 4/4] ARM: DT: Add support to system control module for OMAP4

2012-07-25 Thread Konstantin Baydarov
This patch add device tree entries on OMAP4 based boards for System Control Module (SCM). Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru --- arch/arm/boot/dts/omap4.dtsi | 10 ++ 1 files changed, 10 insertions(+), 0

Re: [PATCH v4 1/4] ARM: OMAP4: Remove un-used control module headers and defines.

2012-07-25 Thread Konstantin Baydarov
Hi, Balbi. On 07/25/2012 03:06 PM, Felipe Balbi wrote: Hi, On Wed, Jul 25, 2012 at 03:05:13PM +0400, Konstantin Baydarov wrote: Most of the OMAP4 control module register defines are not used and can be removed. Keep only needed defines and move them to common control module header just

Re: [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type

2012-07-25 Thread Konstantin Baydarov
HI, Sergei. On 07/25/2012 04:39 PM, Sergei Shtylyov wrote: Hello. On 25-07-2012 15:05, Konstantin Baydarov wrote: OMAP system control module can be probed early, then omap_type is safe to use its APIs. TODO: add support for other omap versions Signed-off-by: Eduardo Valentin

Re: [PATCH v3 2/7] mfd: omap: control: core system control driver

2012-06-28 Thread Konstantin Baydarov
Hi. On 06/28/2012 08:50 AM, Eduardo Valentin wrote: Hello, On Wed, Jun 27, 2012 at 10:04:54PM +0400, Konstantin Baydarov wrote: This patch introduces a MFD core device driver for OMAP system control module. The control module allows software control of various static modes supported

Re: [PATCH v3 2/7] mfd: omap: control: core system control driver

2012-06-28 Thread Konstantin Baydarov
Hello. On 06/28/2012 01:49 PM, Valentin, Eduardo wrote: Hello, On Thu, Jun 28, 2012 at 12:37 PM, Konstantin Baydarov kbaida...@dev.rtsoft.ru wrote: Hi. On 06/28/2012 08:50 AM, Eduardo Valentin wrote: Hello, On Wed, Jun 27, 2012 at 10:04:54PM +0400, Konstantin Baydarov wrote

Re: [PATCH v3 2/7] mfd: omap: control: core system control driver

2012-06-28 Thread Konstantin Baydarov
On 06/28/2012 02:12 PM, Konstantin Baydarov wrote: The interface(design) of omap-control-core.c has already been discussed many times :( Eduardo, in his patch set, suggested following design: - omap-control-core.c ioremaps SCM window and provide functions to read/write SCP register

[PATCH v3 0/7] OMAP System Control Module

2012-06-27 Thread Konstantin Baydarov
Hello. This is a next version of series of patches(based on Eduardo Valentin's patch set) adding a basic support for system control module, on OMAP4+ context. It is a working in progress. Main changes since previous patch set version: - Bandgap and usb phy: drivers are now independent from

[PATCH v3 2/7] mfd: omap: control: core system control driver

2012-06-27 Thread Konstantin Baydarov
-control-core: removed omap_control_get, omap_control_readl, omap_control_writel - omap-control-core: added omap_control_status_read that is used early in omap_type Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Signed-off-by: J Keerthy j-keer...@ti.com Signed-off-by: Kishon Vijay Abraham

[PATCH v3 3/7] OMAP2+: use control module mfd driver in omap_type

2012-06-27 Thread Konstantin Baydarov
OMAP system control module can be probed early, then omap_type is safe to use its APIs. TODO: add support for other omap versions Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru --- arch/arm/mach-omap2/id.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff

[PATCH v3 4/7] mfd: omap: control: usb-phy: introduce the ctrl-module usb driver

2012-06-27 Thread Konstantin Baydarov
in omap4 is present in system control module) [kis...@ti.com: wrote the original API's related to USB functions] Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/usb/otg

[PATCH v3 6/7] omap4: thermal: add basic CPU thermal zone

2012-06-27 Thread Konstantin Baydarov
omap4: thermal: add basic CPU thermal zone This patch exposes OMAP4 thermal sensor as a thermal zone named cpu. Only thermal creation is done here. TODO: - Add cooling bindings - Add extrapolation rules Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com ---

Re: [RFC PATCH v2 03/11] mfd: omap: control: core system control driver

2012-06-20 Thread Konstantin Baydarov
Hi, Tony. On 06/20/2012 02:22 PM, Tony Lindgren wrote: * Konstantin Baydarov kbaida...@dev.rtsoft.ru [120618 04:36]: This patch introduces a MFD core device driver for OMAP system control module. The control module allows software control of various static modes supported by the device

[RFC PATCH v2 00/11] OMAP System Control Module

2012-06-18 Thread Konstantin Baydarov
Hello. This is a next version of series of patches(based on Eduardo Valentin's patch set) adding a basic support for system control module, on OMAP4+ context. It is a working in progress. Main changes since previous patch set version: - Bandgap and usb phy: drivers are now independent from

[RFC PATCH v2 02/11] ARM: OMAP: expose control.h to mach area

2012-06-18 Thread Konstantin Baydarov
This patch exposes the definitions under control.h to drivers outside the machine code. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- arch/arm/mach-omap2/am35xx-emac.c|2 +- arch/arm/mach-omap2/board-3430sdp.c |2 +-

[RFC PATCH v2 03/11] mfd: omap: control: core system control driver

2012-06-18 Thread Konstantin Baydarov
arguments, becuase there can be only one instance control module device. Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Signed-off-by: J Keerthy j-keer...@ti.com Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- Documentation

[RFC PATCH v2 05/11] mfd: omap: control: usb-phy: introduce the ctrl-module usb driver

2012-06-18 Thread Konstantin Baydarov
-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/usb/otg/Kconfig | 12 ++ drivers/usb/otg/Makefile |1 drivers/usb/otg/omap4-usb-phy.c | 167

[RFC PATCH v2 06/11] ARM: OMAP4+: Adding the temperature sensor register set bit fields

2012-06-18 Thread Konstantin Baydarov
OMAP4460 specific temperature sensor register bit fields are added. Existing OMAP4 entries are renamed to OMAP4430. Signed-off-by: Keerthy j-keer...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- arch/arm/mach-omap2/include/mach/control.h | 116

[RFC PATCH v2 04/11] OMAP2+: use control module mfd driver in omap_type

2012-06-18 Thread Konstantin Baydarov
OMAP system control module can be probed early, then omap_type is safe to use its APIs. TODO: add support for other omap versions Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru --- arch/arm/mach-omap2/id.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) Index: linux

[RFC PATCH v2 07/11] ARM: OMAP4+: thermal: introduce bandgap temperature sensor

2012-06-18 Thread Konstantin Baydarov
of bandgap dynamically in bandgap driver probe function by reading omap core control module revision register CONTROL_GEN_CORE_REVISION. Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com Signed-off-by: Keerthy j-keer...@ti.com

[RFC PATCH v2 08/11] omap4: thermal: add basic CPU thermal zone

2012-06-18 Thread Konstantin Baydarov
This patch exposes OMAP4 thermal sensor as a thermal zone named cpu. Only thermal creation is done here. TODO: - Add cooling bindings - Add extrapolation rules Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/Kconfig | 12 ++ drivers/thermal/Makefile

[RFC PATCH v2 09/11] ARM: DT: Add support to system control module for OMAP4

2012-06-18 Thread Konstantin Baydarov
This patch adds device tree entries on OMAP4 based boards for System Control Module (SCM). TODO: The IOMEM windows of ctrl_module_core, bandgap, usbphy overlap, so probably only specific registers should be specified in dts for bandgap and usb phy entries. Signed-off-by: Konstantin Baydarov

Re: [RFC PATCH 03/11] arm: omap: device: create a device for system control module

2012-06-14 Thread Konstantin Baydarov
() call? BR, Konstantin Baydarov. Regards, Benoit Signed-off-by: Kishon Vijay Abraham Ikis...@ti.com Signed-off-by: Eduardo Valentineduardo.valen...@ti.com --- arch/arm/mach-omap2/devices.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff

Re: [RFC PATCH 05/11] mfd: omap: control: core system control driver

2012-06-01 Thread Konstantin Baydarov
= L4_44XX_VIRT, .pfn= __phys_to_pfn(L4_44XX_PHYS), .length= L4_44XX_SIZE, .type= MT_DEVICE, ... So ioremap() always returns same virtual address (0xfc002000). BR, Konstantin Baydarov. Regards, Tony

Re: [RFC PATCH 05/11] mfd: omap: control: core system control driver

2012-06-01 Thread Konstantin Baydarov
On 06/01/2012 06:13 PM, Tony Lindgren wrote: * Konstantin Baydarov kbaida...@dev.rtsoft.ru [120601 06:44]: On 06/01/2012 03:29 PM, Tony Lindgren wrote: We can have a static map for the SCM, so ioremapping each driver individually should not be an issue. Actually SCM registers window is mapped

Re: [RFC PATCH 11/11] ARM: DT: Add support to system control module for OMAP4

2012-05-31 Thread Konstantin Baydarov
Hi. On 05/30/2012 01:26 PM, Cousson, Benoit wrote: On 5/30/2012 11:05 AM, Konstantin Baydarov wrote: On 05/30/2012 12:38 PM, Cousson, Benoit wrote: On 5/29/2012 11:49 AM, Konstantin Baydarov wrote: Hi, Eduardo. On 05/25/2012 12:26 PM, Eduardo Valentin wrote: This patch add device tree

Re: [RFC PATCH 11/11] ARM: DT: Add support to system control module for OMAP4

2012-05-31 Thread Konstantin Baydarov
Hi. On 05/31/2012 04:52 PM, Cousson, Benoit wrote: On 5/31/2012 2:49 PM, Eduardo Valentin wrote: Hello, On Thu, May 31, 2012 at 04:06:00PM +0400, Konstantin Baydarov wrote: Hi. On 05/30/2012 01:26 PM, Cousson, Benoit wrote: On 5/30/2012 11:05 AM, Konstantin Baydarov wrote: On 05/30

Re: [RFC PATCH 11/11] ARM: DT: Add support to system control module for OMAP4

2012-05-30 Thread Konstantin Baydarov
On 05/30/2012 12:38 PM, Cousson, Benoit wrote: On 5/29/2012 11:49 AM, Konstantin Baydarov wrote: Hi, Eduardo. On 05/25/2012 12:26 PM, Eduardo Valentin wrote: This patch add device tree entries on OMAP4 based boards for System Control Module (SCM). Signed-off-by: Eduardo

Re: [RFC PATCH 11/11] ARM: DT: Add support to system control module for OMAP4

2012-05-30 Thread Konstantin Baydarov
Hi. On 05/30/2012 01:26 PM, Cousson, Benoit wrote: On 5/30/2012 11:05 AM, Konstantin Baydarov wrote: On 05/30/2012 12:38 PM, Cousson, Benoit wrote: On 5/29/2012 11:49 AM, Konstantin Baydarov wrote: Hi, Eduardo. On 05/25/2012 12:26 PM, Eduardo Valentin wrote: This patch add device tree

Re: [RFC PATCH 11/11] ARM: DT: Add support to system control module for OMAP4

2012-05-29 Thread Konstantin Baydarov
; + interrupts = 0 126 4; /* talert */ + ti,tshut-gpio = 86; /* tshut */ + }; I believe that CPU-specific bandgap definition should be moved to bard specific dts. BR, Konstantin Baydarov. + usb

Re: [RFC PATCH 03/11] arm: omap: device: create a device for system control module

2012-05-29 Thread Konstantin Baydarov
that is used by the bandgap driver, I'm wondering if the THERMAL_ALERT interrupt will be fired when CONTROL_GEN_CORE module clock is gated? Probably bandgap driver should set CONTROL_GEN_CORE idle mode to SIDLE_NO, to prevent loosing THERMAL_ALERT interrupt? BR, Konstantin Baydarov

Re: [RFC PATCH 00/11] OMAP System Control Module

2012-05-25 Thread Konstantin Baydarov
. But feel free to propose better ways. In my latest version I got rid from early API set, check out patch for V3 patch set. I'll attach patch for current version later. BR, Konstantin Baydarov. This code has been ripped off from the Android 3.1 branch. I have rewritten a couple of things

Re: [RFC PATCH 04/11] OMAP: Add early device for system control module

2012-05-25 Thread Konstantin Baydarov
[c078f9ec] (kernel_init+0x54/0x1a4) [0.428771] [c078f9ec] (kernel_init+0x54/0x1a4) from [c0013818] (kernel_thread_exit+0x0/0x8) [0.437957] ---[ end trace da227214a82491b7 ]-- ... BR, Konstantin Baydarov. + + return 0; +} +early_initcall(plat_early_device_setup); + static

Re: [RFC PATCH 04/11] OMAP: Add early device for system control module

2012-05-25 Thread Konstantin Baydarov
, + }, +}; Init control module platform device resources from device tree instead of hard-coding them. Prevent control module driver registering itself second time after it has already been registered by early_platform_driver_register_all(). Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Index: omap

Re: [RFC PATCH 00/11] OMAP System Control Module

2012-05-25 Thread Konstantin Baydarov
Hi. On 05/25/2012 03:11 PM, Valentin, Eduardo wrote: Konstantin, On Fri, May 25, 2012 at 1:50 PM, Konstantin Baydarov kbaida...@dev.rtsoft.ru wrote: Hi. On 05/25/2012 12:25 PM, Eduardo Valentin wrote: Hello Paul and Tony, This is a series of patches adding a basic support for system

Re: [RFC PATCH 09/11] ARM: OMAP4+: thermal: introduce bandgap temperature sensor

2012-05-25 Thread Konstantin Baydarov
access. I wasn't able to test - I have panda 4430 board. TODO: Prevent over-usage of spin_lock/spin_unlock for sequential calls of bg_writel(). Signed-off-by: Konstantin Baydarov kbaida...@dev.rtsoft.ru Index: omap-thermal/drivers/mfd/omap-control-core.c