Re: [PATCHv2 06/11] CLK: omap: move part of the machine specific clock header contents to driver

2013-06-24 Thread Tero Kristo

On 06/21/2013 10:32 AM, Tony Lindgren wrote:

* Tero Kristo t-kri...@ti.com [130619 06:25]:

Some of the clock.h contents are needed by the new OMAP clock driver,
including dpll_data and clk_hw_omap. Thus, move these to the generic
omap header file which can be accessed by the driver.


Do you mean are only needed by the new OMAP clock driver?


Not only, it is needed by both driver and mach-omap2.


Otherwise it sounds like this will break things for other
omaps that don't yet have clocks configured in DT..


No it doesn't, as you can probably see, the new include/linux/clk/omap.h 
is included from clock.h also.


-Tero



Regards,

Tony



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


Re: [PATCHv2 06/11] CLK: omap: move part of the machine specific clock header contents to driver

2013-06-21 Thread Tony Lindgren
* Tero Kristo t-kri...@ti.com [130619 06:25]:
 Some of the clock.h contents are needed by the new OMAP clock driver,
 including dpll_data and clk_hw_omap. Thus, move these to the generic
 omap header file which can be accessed by the driver.

Do you mean are only needed by the new OMAP clock driver?

Otherwise it sounds like this will break things for other
omaps that don't yet have clocks configured in DT..

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv2 06/11] CLK: omap: move part of the machine specific clock header contents to driver

2013-06-19 Thread Tero Kristo
Some of the clock.h contents are needed by the new OMAP clock driver,
including dpll_data and clk_hw_omap. Thus, move these to the generic
omap header file which can be accessed by the driver.

Signed-off-by: Tero Kristo t-kri...@ti.com
---
 arch/arm/mach-omap2/clock.h |  150 +
 include/linux/clk/omap.h|  155 ++-
 2 files changed, 155 insertions(+), 150 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 7aa32cd..3238c57 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -21,6 +21,7 @@
 
 #include linux/clkdev.h
 #include linux/clk-provider.h
+#include linux/clk/omap.h
 
 struct omap_clk {
u16 cpu;
@@ -178,83 +179,6 @@ struct clksel {
const struct clksel_rate *rates;
 };
 
-/**
- * struct dpll_data - DPLL registers and integration data
- * @mult_div1_reg: register containing the DPLL M and N bitfields
- * @mult_mask: mask of the DPLL M bitfield in @mult_div1_reg
- * @div1_mask: mask of the DPLL N bitfield in @mult_div1_reg
- * @clk_bypass: struct clk pointer to the clock's bypass clock input
- * @clk_ref: struct clk pointer to the clock's reference clock input
- * @control_reg: register containing the DPLL mode bitfield
- * @enable_mask: mask of the DPLL mode bitfield in @control_reg
- * @last_rounded_rate: cache of the last rate result of omap2_dpll_round_rate()
- * @last_rounded_m: cache of the last M result of omap2_dpll_round_rate()
- * @last_rounded_m4xen: cache of the last M4X result of
- * omap4_dpll_regm4xen_round_rate()
- * @last_rounded_lpmode: cache of the last lpmode result of
- *  omap4_dpll_lpmode_recalc()
- * @max_multiplier: maximum valid non-bypass multiplier value (actual)
- * @last_rounded_n: cache of the last N result of omap2_dpll_round_rate()
- * @min_divider: minimum valid non-bypass divider value (actual)
- * @max_divider: maximum valid non-bypass divider value (actual)
- * @modes: possible values of @enable_mask
- * @autoidle_reg: register containing the DPLL autoidle mode bitfield
- * @idlest_reg: register containing the DPLL idle status bitfield
- * @autoidle_mask: mask of the DPLL autoidle mode bitfield in @autoidle_reg
- * @freqsel_mask: mask of the DPLL jitter correction bitfield in @control_reg
- * @idlest_mask: mask of the DPLL idle status bitfield in @idlest_reg
- * @lpmode_mask: mask of the DPLL low-power mode bitfield in @control_reg
- * @m4xen_mask: mask of the DPLL M4X multiplier bitfield in @control_reg
- * @auto_recal_bit: bitshift of the driftguard enable bit in @control_reg
- * @recal_en_bit: bitshift of the PRM_IRQENABLE_* bit for recalibration IRQs
- * @recal_st_bit: bitshift of the PRM_IRQSTATUS_* bit for recalibration IRQs
- * @flags: DPLL type/features (see below)
- *
- * Possible values for @flags:
- * DPLL_J_TYPE: J-type DPLL (only some 36xx, 4xxx DPLLs)
- *
- * @freqsel_mask is only used on the OMAP34xx family and AM35xx.
- *
- * XXX Some DPLLs have multiple bypass inputs, so it's not technically
- * correct to only have one @clk_bypass pointer.
- *
- * XXX The runtime-variable fields (@last_rounded_rate, @last_rounded_m,
- * @last_rounded_n) should be separated from the runtime-fixed fields
- * and placed into a different structure, so that the runtime-fixed data
- * can be placed into read-only space.
- */
-struct dpll_data {
-   void __iomem*mult_div1_reg;
-   u32 mult_mask;
-   u32 div1_mask;
-   struct clk  *clk_bypass;
-   struct clk  *clk_ref;
-   void __iomem*control_reg;
-   u32 enable_mask;
-   unsigned long   last_rounded_rate;
-   u16 last_rounded_m;
-   u8  last_rounded_m4xen;
-   u8  last_rounded_lpmode;
-   u16 max_multiplier;
-   u8  last_rounded_n;
-   u8  min_divider;
-   u16 max_divider;
-   u8  modes;
-   void __iomem*autoidle_reg;
-   void __iomem*idlest_reg;
-   u32 autoidle_mask;
-   u32 freqsel_mask;
-   u32 idlest_mask;
-   u32 dco_mask;
-   u32 sddiv_mask;
-   u32 lpmode_mask;
-   u32 m4xen_mask;
-   u8  auto_recal_bit;
-   u8  recal_en_bit;
-   u8  recal_st_bit;
-   u8  flags;
-};
-
 /*
  * struct clk.flags possibilities
  *
@@ -274,56 +198,6 @@ struct dpll_data {
 #define INVERT_ENABLE  (1  4)/* 0 enables, 1 disables */
 #define CLOCK_CLKOUTX2 (1  5)