Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Arnd Bergmann
On Friday 16 March 2012, Turquette, Mike wrote:
 On Fri, Mar 16, 2012 at 3:21 PM, Paul Walmsley p...@pwsan.com wrote:
  From: Paul Walmsley p...@pwsan.com
  Date: Fri, 16 Mar 2012 16:06:30 -0600
  Subject: [PATCH] clk: mark the common clk code as EXPERIMENTAL for now
 
  Mark the common clk code as depending on CONFIG_EXPERIMENTAL.  The API
  is not well-defined and both it and the underlying mechanics are likely
  to need significant changes to support non-trivial uses of the rate
  changing code, such as DVFS with external I/O devices.  So any platforms
  that switch their implementation over to this may need to revise much
  of their driver code and revalidate their implementations until the
  behavior of the code is better-defined.
 
  A good time for removing this EXPERIMENTAL designation would be after at
  least two platforms that do DVFS on groups of external I/O devices have
  ported their clock implementations over to the common clk code.
 
  Signed-off-by: Paul Walmsley p...@pwsan.com
  Cc: Mike Turquette mturque...@ti.com
 
 ACK.  This will set some reasonable expectations while things are in flux.
 
 Arnd are you willing to take this in?

I think it's rather pointless, because the option is not going to
be user selectable but will get selected by the platform unless I'm
mistaken. The platform maintainers that care already know the state
of the framework. Also, there are no user space interfaces that we
have to warn users about not being stable, because the framework
is internal to the kernel.

However, I wonder whether we need the patch below to prevent
users from accidentally enabling COMMON_CLK on platforms that
already provide their own implementation.

Arnd

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 2eaf17e..a0a83de 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -12,7 +12,7 @@ config HAVE_MACH_CLKDEV

 menuconfig COMMON_CLK
-   bool Common Clock Framework
+   bool
select HAVE_CLK_PREPARE
---help---
  The common clock framework is a single definition of struct
  clk, useful across many platforms, as well as an

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v7 2/3] clk: introduce the common clock framework

2012-03-17 Thread Saravana Kannan

On 03/15/2012 11:11 PM, Mike Turquette wrote:

The common clock framework defines a common struct clk useful across
most platforms as well as an implementation of the clk api that drivers
can use safely for managing clocks.

The net result is consolidation of many different struct clk definitions
and platform-specific clock framework implementations.

This patch introduces the common struct clk, struct clk_ops and an
implementation of the well-known clock api in include/clk/clk.h.
Platforms may define their own hardware-specific clock structure and
their own clock operation callbacks, so long as it wraps an instance of
struct clk_hw.

See Documentation/clk.txt for more details.

This patch is based on the work of Jeremy Kerr, which in turn was based
on the work of Ben Herrenschmidt.

Signed-off-by: Mike Turquettemturque...@linaro.org
Signed-off-by: Mike Turquettemturque...@ti.com
Reviewed-by: Thomas Gleixnert...@linutronix.de
Tested-by: Andrew Lunnand...@lunn.ch
Reviewed-by: Rob Herringrob.herringat  calxeda.com
Cc: Russell Kingli...@arm.linux.org.uk
Cc: Jeremy Kerrjeremy.k...@canonical.com
Cc: Arnd Bergmanarnd.bergm...@linaro.org
Cc: Paul Walmsleyp...@pwsan.com
Cc: Shawn Guoshawn@freescale.com
Cc: Sascha Hauers.ha...@pengutronix.de
Cc: Richard Zhaorichard.z...@linaro.org
Cc: Saravana Kannanskan...@codeaurora.org
Cc: Magnus Dammmagnus.d...@gmail.com
Cc: Mark Brownbroo...@opensource.wolfsonmicro.com
Cc: Linus Walleijlinus.wall...@stericsson.com
Cc: Stephen Boydsb...@codeaurora.org
Cc: Amit Kucheriaamit.kuche...@linaro.org
Cc: Deepak Saxenadsax...@linaro.org
Cc: Grant Likelygrant.lik...@secretlab.ca
---


Mike,

Thanks for the patches! Glad to see that it's finally getting in! I sent 
a request for a minor change as a reply to the v5 series (since it had 
more context). Can you please take a look at that and let me know if you 
can send out a v8 or a patch on top of this to do that?


Thanks,
Saravana

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Saravana Kannan

On 03/16/2012 05:54 PM, Rob Herring wrote:

On 03/16/2012 06:47 PM, Sascha Hauer wrote:

Hi Paul,

On Fri, Mar 16, 2012 at 04:21:17PM -0600, Paul Walmsley wrote:

Hi

On Fri, 16 Mar 2012, Arnd Bergmann wrote:


If the common clock code is to go upstream now, it should be marked as
experimental.


No, please don't do this. This effectively marks the architectures using
the generic clock framework experimental. We can mark drivers as 'you
have been warned', but marking an architecture as experimental is the
wrong sign for both its users and people willing to adopt the framework.
Also we get this:

warning: (ARCH_MX1  MACH_MX21  ARCH_MX25  MACH_MX27) selects COMMON_CLK 
which has unmet direct dependencies (EXPERIMENTAL)

(and no, I don't want to support to clock frameworks in parallel)



+1

For simple users at least, the api is perfectly adequate and it is not
experimental (unless new means experimental).



+1 - not experimental please.

While I agree with Mike and Paul that there is room for a lot of 
improvements to the clock APIs, I think the existing APIs in this patch 
series can become macro wrappers around any new APIs improvements we add 
in the future.


We should have really done that for the 
clk_prepare_enable/unprepare_disable(), but it should certainly be 
doable for future API additions now that we have the atomic/non-atomic 
differentiation out of the way.


Thanks,
Saravana


--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v5 3/4] clk: introduce the common clock framework

2012-03-17 Thread Saravana Kannan

On 03/07/2012 01:20 PM, Turquette, Mike wrote:

On Tue, Mar 6, 2012 at 11:00 AM, Sascha Hauers.ha...@pengutronix.de  wrote:

On Mon, Mar 05, 2012 at 12:03:15PM -0800, Turquette, Mike wrote:

On Sun, Mar 4, 2012 at 11:38 PM, Sascha Hauers.ha...@pengutronix.de  wrote:

On Sun, Mar 04, 2012 at 04:12:21PM -0800, Turquette, Mike wrote:


I believe this patch already does what you suggest, but I might be
missing your point.


In include/linux/clk-private.h you expose struct clk outside the core.
This has to be done to make static initializers possible. There is a big
warning in this file that it must not be included from files implementing
struct clk_ops. You can simply avoid this warning by declaring struct clk
with only a single member:

include/linux/clk.h:

struct clk {
struct clk_internal *internal;
};

This way everybody knows struct clk (thus can embed it in their static
initializers), but doesn't know anything about the internal members. Now
in drivers/clk/clk.c you declare struct clk_internal exactly like struct
clk was declared before:

struct clk_internal {
const char  *name;
const struct clk_ops*ops;
struct clk_hw   *hw;
struct clk  *parent;
char**parent_names;
struct clk  **parents;
u8  num_parents;
unsigned long   rate;
unsigned long   flags;
unsigned intenable_count;
unsigned intprepare_count;
struct hlist_head   children;
struct hlist_node   child_node;
unsigned intnotifier_count;
#ifdef CONFIG_COMMON_CLK_DEBUG
struct dentry   *dentry;
#endif
};

An instance of struct clk_internal will be allocated in
__clk_init/clk_register. Now the private data stays completely inside
the core and noone can abuse it.


Hi Sascha,

I see the disconnect here.  For OMAP (and possibly other platforms) at
least some clock data is necessary during early boot, before the
regular allocation methods are available (timers for instance).


We had this problem on i.MX aswell. It turned out that the timer clock
is the only clock that is needed so early. We solved this by moving the
clock init to the system timer init function.


When you say mov[ed] the clock init to the system timer init
function do you mean that you statically allocated struct clk and
used the clk framework api, or instead you just did some direct
register writes to initialize things properly?


I meant that on i.MX we do the clock tree initialization when kmalloc is
available, see the attached patch for omap4 based on your branch which
does the same for Omap. The first clock you need is the one for the
timer, so you can initialize the clocktree at the beginning of
time_init() and don't need statically initialized clocks anymore.



Well, the file is work in progress, you probably fix this before sending
it out, but I bet people will include clk-private.h and nobody else
notices it.


clock44xx_data.c does not violate that rule.  None of the logic that
implements ops for those clocks is present clock44xx_data.c.


Indeed, I missed that. It only has the ops but not the individual
functions.


All of
the code in that file is simply initialization and registration of
OMAP4 clocks.  Many of the clocks are basic clock types (divider,
multiplexer and fixed-rate are used in that file) with protected code
drivers/clk/clk-*.c and the remaining clocks are of the struct
clk_hw_omap variety, which has code spread across several files:

arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clkt_dpll.c
arch/arm/mach-omap2/clkt_clksel.c
arch/arm/mach-omap2/dpll3xxx.c
arch/arm/mach-omap2/dpll4xxx.c

All of the above files include linux/clk-provider.h, not
linux/clk-private.h.  That code makes heavy use of the
__clk_get_whatever helpers and shows how a platform might honor the
layer of separation between struct clk and stuct clk_ops/struct
clk_foo.  You are correct that the code is a work-in-progress, but
there are no layering violations that I can see.

I also think we are talking past each other to some degree.  One point
I would like to make (and maybe you already know this from code
review) is that it is unnecessary to have pointers to your parent
struct clk*'s when either initializing or registering your clocks.  In
fact the existing clk_register_foo functions don't even allow you to
pass in parent pointers and rely wholly on string name matching.  I
just wanted to point that out in case it went unnoticed, as it is a
new way of doing things from the previous series and was born out of
Thomas' review of V4 and multi-parent handling.  This also keeps
device-tree in mind where we might not know the struct clk *pointer at
compile time for connecting discrete devices.


Yes, I've seen this and I really like it. Also the change that
multiplexers return an index to an 

[PATCH 02/02] HWMON: HWMON driver for DA9052/53 PMIC v4

2012-03-17 Thread Ashish Jangam
The DA9052 PMIC provides an Analogue to Digital Converter with 10 bits
resolution and 10 channels.

This patch monitors the DA9052 PMIC's ADC channels mostly for battery
parameters like battery temperature, junction temperature, battery
current etc.

This patch is functionally tested on Samsung SMDKV6410

Signed-off-by: David Dajun Chen dc...@diasemi.com
Signed-off-by: Ashish Jangam ashish.jan...@kpitcummins.com
--- 
Changes since V3
- Add DIV_ROUND_CLOSEST() macro
Changes since v2
- Update documentation file
Changes since v1
- Update documentation file for url
- Modify the entry in Kconfig file
- Correct reporting of junction temperature
- Add conversion function for backup battery voltage
- Change labels for temperatures in the device attributes to follow
sensor index
---
 Documentation/hwmon/da9052   |   61 
 drivers/hwmon/Kconfig|   10 ++
 drivers/hwmon/Makefile   |1 +
 drivers/hwmon/da9052-hwmon.c |  344 ++
 4 files changed, 416 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/hwmon/da9052
 create mode 100644 drivers/hwmon/da9052-hwmon.c

diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052
new file mode 100644
index 000..ef89855
--- /dev/null
+++ b/Documentation/hwmon/da9052
@@ -0,0 +1,61 @@
+Supported chips:
+  * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
+Prefix: 'da9052'
+Datasheet: Datasheet is not publicly available.
+
+Authors: David Dajun Chen dc...@diasemi.com
+
+Description
+---
+
+The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits
+resolution and track and hold circuitry combined with an analogue input
+multiplexer. The analogue input multiplexer will allow conversion of up to 10
+different inputs. The track and hold circuit ensures stable input voltages at
+the input of the ADC during the conversion.
+
+The ADC is used to measure the following inputs:
+Channel 0: VDDOUT - measurement of the system voltage
+Channel 1: ICH - internal battery charger current measurement
+Channel 2: TBAT - output from the battery NTC
+Channel 3: VBAT - measurement of the battery voltage
+Channel 4: ADC_IN4 - high impedance input (0 - 2.5V)
+Channel 5: ADC_IN5 - high impedance input (0 - 2.5V)
+Channel 6: ADC_IN6 - high impedance input (0 - 2.5V)
+Channel 7: XY - TSI interface to measure the X and Y voltage of the touch
+  screen resistive potentiometers
+Channel 8: Internal Tjunc. - sense (internal temp. sensor)
+Channel 9: VBBAT - measurement of the backup battery voltage
+
+By using sysfs attributes we can measure the system voltage VDDOUT, the battery
+charging current ICH, battery temperature TBAT, battery junction temperature
+TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
+
+Voltage Monitoring
+--
+
+Voltages are sampled by a 10 bit ADC.
+
+The battery voltage is calculated as:
+   Milli volt = ((ADC value * 1000) / 512) + 2500
+
+The backup battery voltage is calculated as:
+   Milli volt = (ADC value * 2500) / 512;
+
+The voltages on ADC channels 4, 5 and 6 are calculated as:
+   Milli volt = (ADC value * 2500) / 1023
+
+Temperature Monitoring
+--
+
+Temperatures are sampled by a 10 bit ADC.  Junction and battery temperatures
+are monitored by the ADC channels.
+
+The junction temperature is calculated:
+   Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8
+The junction temperature attribute is supported by the driver.
+
+The battery temperature is calculated:
+   Degree Celcius = 1 / (t1 + 1/298)- 273
+where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255))
+Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively.
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 12bc500..5549c5b 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -313,6 +313,16 @@ config SENSORS_DS1621
  This driver can also be built as a module.  If so, the module
  will be called ds1621.
 
+config SENSORS_DA9052_ADC
+   tristate Dialog DA9052/DA9053 ADC
+   depends on PMIC_DA9052
+   help
+ Say y here to support the ADC found on Dialog Semiconductor
+ DA9052-BC and DA9053-AA/Bx PMICs.
+
+ This driver can also be built as module. If so, the module
+ will be called da9052-hwmon.
+
 config SENSORS_EXYNOS4_TMU
tristate Temperature sensor on Samsung EXYNOS4
depends on ARCH_EXYNOS4
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 6d3f11f..a950362 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_SENSORS_APPLESMC)+= applesmc.o
 obj-$(CONFIG_SENSORS_ASC7621)  += asc7621.o
 obj-$(CONFIG_SENSORS_ATXP1)+= atxp1.o
 obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
+obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
 obj-$(CONFIG_SENSORS_DME1737)  += dme1737.o
 obj-$(CONFIG_SENSORS_DS620)+= ds620.o
 

Re: [PATCH 02/02] HWMON: HWMON driver for DA9052/53 PMIC v4

2012-03-17 Thread Guenter Roeck
On Sat, Mar 17, 2012 at 06:04:41AM -0400, Ashish Jangam wrote:
 The DA9052 PMIC provides an Analogue to Digital Converter with 10 bits
 resolution and 10 channels.
 
 This patch monitors the DA9052 PMIC's ADC channels mostly for battery
 parameters like battery temperature, junction temperature, battery
 current etc.
 
 This patch is functionally tested on Samsung SMDKV6410
 
 Signed-off-by: David Dajun Chen dc...@diasemi.com
 Signed-off-by: Ashish Jangam ashish.jan...@kpitcummins.com

Acked-by: Guenter Roeck guenter.ro...@ericsson.com

 ---
 Changes since V3
 - Add DIV_ROUND_CLOSEST() macro
 Changes since v2
 - Update documentation file
 Changes since v1
 - Update documentation file for url
 - Modify the entry in Kconfig file
 - Correct reporting of junction temperature
 - Add conversion function for backup battery voltage
 - Change labels for temperatures in the device attributes to follow
 sensor index
 ---
  Documentation/hwmon/da9052   |   61 
  drivers/hwmon/Kconfig|   10 ++
  drivers/hwmon/Makefile   |1 +
  drivers/hwmon/da9052-hwmon.c |  344 
 ++
  4 files changed, 416 insertions(+), 0 deletions(-)
  create mode 100644 Documentation/hwmon/da9052
  create mode 100644 drivers/hwmon/da9052-hwmon.c
 
 diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052
 new file mode 100644
 index 000..ef89855
 --- /dev/null
 +++ b/Documentation/hwmon/da9052
 @@ -0,0 +1,61 @@
 +Supported chips:
 +  * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
 +Prefix: 'da9052'
 +Datasheet: Datasheet is not publicly available.
 +
 +Authors: David Dajun Chen dc...@diasemi.com
 +
 +Description
 +---
 +
 +The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits
 +resolution and track and hold circuitry combined with an analogue input
 +multiplexer. The analogue input multiplexer will allow conversion of up to 10
 +different inputs. The track and hold circuit ensures stable input voltages at
 +the input of the ADC during the conversion.
 +
 +The ADC is used to measure the following inputs:
 +Channel 0: VDDOUT - measurement of the system voltage
 +Channel 1: ICH - internal battery charger current measurement
 +Channel 2: TBAT - output from the battery NTC
 +Channel 3: VBAT - measurement of the battery voltage
 +Channel 4: ADC_IN4 - high impedance input (0 - 2.5V)
 +Channel 5: ADC_IN5 - high impedance input (0 - 2.5V)
 +Channel 6: ADC_IN6 - high impedance input (0 - 2.5V)
 +Channel 7: XY - TSI interface to measure the X and Y voltage of the touch
 +  screen resistive potentiometers
 +Channel 8: Internal Tjunc. - sense (internal temp. sensor)
 +Channel 9: VBBAT - measurement of the backup battery voltage
 +
 +By using sysfs attributes we can measure the system voltage VDDOUT, the 
 battery
 +charging current ICH, battery temperature TBAT, battery junction temperature
 +TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
 +
 +Voltage Monitoring
 +--
 +
 +Voltages are sampled by a 10 bit ADC.
 +
 +The battery voltage is calculated as:
 +   Milli volt = ((ADC value * 1000) / 512) + 2500
 +
 +The backup battery voltage is calculated as:
 +   Milli volt = (ADC value * 2500) / 512;
 +
 +The voltages on ADC channels 4, 5 and 6 are calculated as:
 +   Milli volt = (ADC value * 2500) / 1023
 +
 +Temperature Monitoring
 +--
 +
 +Temperatures are sampled by a 10 bit ADC.  Junction and battery temperatures
 +are monitored by the ADC channels.
 +
 +The junction temperature is calculated:
 +   Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8
 +The junction temperature attribute is supported by the driver.
 +
 +The battery temperature is calculated:
 +   Degree Celcius = 1 / (t1 + 1/298)- 273
 +where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255))
 +Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively.
 diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
 index 12bc500..5549c5b 100644
 --- a/drivers/hwmon/Kconfig
 +++ b/drivers/hwmon/Kconfig
 @@ -313,6 +313,16 @@ config SENSORS_DS1621
   This driver can also be built as a module.  If so, the module
   will be called ds1621.
 
 +config SENSORS_DA9052_ADC
 +   tristate Dialog DA9052/DA9053 ADC
 +   depends on PMIC_DA9052
 +   help
 + Say y here to support the ADC found on Dialog Semiconductor
 + DA9052-BC and DA9053-AA/Bx PMICs.
 +
 + This driver can also be built as module. If so, the module
 + will be called da9052-hwmon.
 +
  config SENSORS_EXYNOS4_TMU
 tristate Temperature sensor on Samsung EXYNOS4
 depends on ARCH_EXYNOS4
 diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
 index 6d3f11f..a950362 100644
 --- a/drivers/hwmon/Makefile
 +++ b/drivers/hwmon/Makefile
 @@ -42,6 +42,7 @@ obj-$(CONFIG_SENSORS_APPLESMC)+= applesmc.o
  obj-$(CONFIG_SENSORS_ASC7621)  += asc7621.o
  

Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Turquette, Mike
On Sat, Mar 17, 2012 at 2:05 AM, Arnd Bergmann a...@arndb.de wrote:
 On Friday 16 March 2012, Turquette, Mike wrote:
 On Fri, Mar 16, 2012 at 3:21 PM, Paul Walmsley p...@pwsan.com wrote:
  From: Paul Walmsley p...@pwsan.com
  Date: Fri, 16 Mar 2012 16:06:30 -0600
  Subject: [PATCH] clk: mark the common clk code as EXPERIMENTAL for now
 
  Mark the common clk code as depending on CONFIG_EXPERIMENTAL.  The API
  is not well-defined and both it and the underlying mechanics are likely
  to need significant changes to support non-trivial uses of the rate
  changing code, such as DVFS with external I/O devices.  So any platforms
  that switch their implementation over to this may need to revise much
  of their driver code and revalidate their implementations until the
  behavior of the code is better-defined.
 
  A good time for removing this EXPERIMENTAL designation would be after at
  least two platforms that do DVFS on groups of external I/O devices have
  ported their clock implementations over to the common clk code.
 
  Signed-off-by: Paul Walmsley p...@pwsan.com
  Cc: Mike Turquette mturque...@ti.com

 ACK.  This will set some reasonable expectations while things are in flux.

 Arnd are you willing to take this in?

 I think it's rather pointless, because the option is not going to
 be user selectable but will get selected by the platform unless I'm
 mistaken. The platform maintainers that care already know the state
 of the framework. Also, there are no user space interfaces that we
 have to warn users about not being stable, because the framework
 is internal to the kernel.

The consensus seems to be to not set experimental.

 However, I wonder whether we need the patch below to prevent
 users from accidentally enabling COMMON_CLK on platforms that
 already provide their own implementation.

        Arnd

 diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
 index 2eaf17e..a0a83de 100644
 --- a/drivers/clk/Kconfig
 +++ b/drivers/clk/Kconfig
 @@ -12,7 +12,7 @@ config HAVE_MACH_CLKDEV

  menuconfig COMMON_CLK
 -       bool Common Clock Framework
 +       bool
        select HAVE_CLK_PREPARE
        ---help---
          The common clock framework is a single definition of struct
          clk, useful across many platforms, as well as an

Much like experimental I'm not sure how needed this change is.  The
help section does say to leave it disabled by default, if unsure.  If
you merge it I won't object but this might be fixing an imaginary
problem.

Regards,
Mike

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Arnd Bergmann
On Saturday 17 March 2012, Turquette, Mike wrote:
  diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
  index 2eaf17e..a0a83de 100644
  --- a/drivers/clk/Kconfig
  +++ b/drivers/clk/Kconfig
  @@ -12,7 +12,7 @@ config HAVE_MACH_CLKDEV
 
   menuconfig COMMON_CLK
  -   bool Common Clock Framework
  +   bool
 select HAVE_CLK_PREPARE
 ---help---
   The common clock framework is a single definition of struct
   clk, useful across many platforms, as well as an
 
 Much like experimental I'm not sure how needed this change is.  The
 help section does say to leave it disabled by default, if unsure.  If
 you merge it I won't object but this might be fixing an imaginary
 problem.

Well, it doesn't have any consequences for real users, but it I think it
does for randconfig builds, which we are trying to repair currently.

Arnd

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Sascha Hauer
On Sat, Mar 17, 2012 at 11:02:11AM -0700, Turquette, Mike wrote:
 On Sat, Mar 17, 2012 at 2:05 AM, Arnd Bergmann a...@arndb.de wrote:
  On Friday 16 March 2012, Turquette, Mike wrote:
  On Fri, Mar 16, 2012 at 3:21 PM, Paul Walmsley p...@pwsan.com wrote:
   From: Paul Walmsley p...@pwsan.com
   Date: Fri, 16 Mar 2012 16:06:30 -0600
   Subject: [PATCH] clk: mark the common clk code as EXPERIMENTAL for now
  
   Mark the common clk code as depending on CONFIG_EXPERIMENTAL.  The API
   is not well-defined and both it and the underlying mechanics are likely
   to need significant changes to support non-trivial uses of the rate
   changing code, such as DVFS with external I/O devices.  So any platforms
   that switch their implementation over to this may need to revise much
   of their driver code and revalidate their implementations until the
   behavior of the code is better-defined.
  
   A good time for removing this EXPERIMENTAL designation would be after at
   least two platforms that do DVFS on groups of external I/O devices have
   ported their clock implementations over to the common clk code.
  
   Signed-off-by: Paul Walmsley p...@pwsan.com
   Cc: Mike Turquette mturque...@ti.com
 
  ACK.  This will set some reasonable expectations while things are in flux.
 
  Arnd are you willing to take this in?
 
  I think it's rather pointless, because the option is not going to
  be user selectable but will get selected by the platform unless I'm
  mistaken. The platform maintainers that care already know the state
  of the framework. Also, there are no user space interfaces that we
  have to warn users about not being stable, because the framework
  is internal to the kernel.
 
 The consensus seems to be to not set experimental.
 
  However, I wonder whether we need the patch below to prevent
  users from accidentally enabling COMMON_CLK on platforms that
  already provide their own implementation.
 
         Arnd
 
  diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
  index 2eaf17e..a0a83de 100644
  --- a/drivers/clk/Kconfig
  +++ b/drivers/clk/Kconfig
  @@ -12,7 +12,7 @@ config HAVE_MACH_CLKDEV
 
   menuconfig COMMON_CLK
  -       bool Common Clock Framework
  +       bool
         select HAVE_CLK_PREPARE
         ---help---
           The common clock framework is a single definition of struct
           clk, useful across many platforms, as well as an
 
 Much like experimental I'm not sure how needed this change is.  The
 help section does say to leave it disabled by default, if unsure.  If
 you merge it I won't object but this might be fixing an imaginary
 problem.

Architectures without common clock support won't build with this option
enabled (multiple definition of clk_enable etc), so I think this should
not be user visible.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v7 1/3] Documentation: common clk API

2012-03-17 Thread Arnd Bergmann
On Saturday 17 March 2012, Sascha Hauer wrote:
 On Sat, Mar 17, 2012 at 11:02:11AM -0700, Turquette, Mike wrote:
 
  Much like experimental I'm not sure how needed this change is.  The
  help section does say to leave it disabled by default, if unsure.  If
  you merge it I won't object but this might be fixing an imaginary
  problem.
 
 Architectures without common clock support won't build with this option
 enabled (multiple definition of clk_enable etc), so I think this should
 not be user visible.

I've applied this patch now.

Arnd

commit c173033d154e9792b1b5059783b802f82536d48f
Author: Arnd Bergmann a...@arndb.de
Date:   Sat Mar 17 21:10:51 2012 +

clk: make CONFIG_COMMON_CLK invisible

All platforms that use the common clk infrastructure should select
COMMON_CLK from platform code, and on all other platforms, it must
not be enabled, so there is no point making the option visible to
users, and when it is visible, we break randconfig builds.

Signed-off-by: Arnd Bergmann a...@arndb.de

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 2eaf17e..82bcfbd 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -10,18 +10,14 @@ config HAVE_MACH_CLKDEV
bool
 
 menuconfig COMMON_CLK
-   bool Common Clock Framework
+   bool
select HAVE_CLK_PREPARE
---help---
  The common clock framework is a single definition of struct
  clk, useful across many platforms, as well as an
  implementation of the clock API in include/linux/clk.h.
  Architectures utilizing the common struct clk should select
- this automatically, but it may be necessary to manually select
- this option for loadable modules requiring the common clock
- framework.
-
- If in doubt, say N.
+ this option.
 
 if COMMON_CLK
 


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


ux500 : ethernet not working ?

2012-03-17 Thread Daniel Lezcano


Hi,

I am not succeeding to make ethernet to work on a 3.3-rc6 for the snowball.

I noticed the same problem occured a few versions ago and was fixed [1].
But it seems some modification around the fix location was made for the 
3.3 and perhaps resulted on a new regression.


Was this problem already spotted for this version ? Is there a patch in 
this case ?


Thanks
-- Daniel

[1] https://bugs.launchpad.net/linaro-landing-team-ste/+bug/804209

--
 http://www.linaro.org/  Linaro.org │ Open source software for ARM SoCs

Follow Linaro:http://www.facebook.com/pages/Linaro  Facebook |
http://twitter.com/#!/linaroorg  Twitter |
http://www.linaro.org/linaro-blog/  Blog



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev