1. 19 Apr, 2016 1 commit
  2. 29 Jan, 2016 1 commit
  3. 22 Dec, 2015 1 commit
  4. 24 Aug, 2015 1 commit
  5. 28 Jul, 2015 1 commit
    • Stephen Boyd's avatar
      clk: basic-type: Silence warnings about lock imbalances · 661e2180
      Stephen Boyd authored
      The basic clock types use conditional locking for the register
      accessor spinlocks. Add __acquire() and __release() markings in
      the right locations so that sparse isn't tripped up on the
      conditional locking.
      
      drivers/clk/clk-mux.c:68:12: warning: context imbalance in 'clk_mux_set_parent' - different lock contexts for basic block
      drivers/clk/clk-divider.c:379:12: warning: context imbalance in 'clk_divider_set_rate' - different lock contexts for basic block
      drivers/clk/clk-gate.c:71:9: warning: context imbalance in 'clk_gate_endisable' - different lock contexts for basic block
      drivers/clk/clk-fractional-divider.c:36:9: warning: context imbalance in 'clk_fd_recalc_rate' - different lock contexts for basic block
      drivers/clk/clk-fractional-divider.c:68:12: warning: context imbalance in 'clk_fd_set_rate' - different lock contexts for basic block
      
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      661e2180
  6. 20 Jul, 2015 1 commit
  7. 05 May, 2015 1 commit
  8. 17 Jan, 2015 1 commit
  9. 19 Nov, 2014 1 commit
    • Hans de Goede's avatar
      clk_mux: Fix set_parent doing the wrong thing when INDEX_BIT && index >= 3 · 6793b3cd
      Hans de Goede authored
      If CLK_MUX_INDEX_BIT is set, then each bit turns on / off a single parent,
      so theoretically multiple parents could be enabled at the same time, but in
      practice only one bit should ever be 1. So to select parent 0, set
      the register (*) to 0x01, to select parent 1 set it 0x02, parent 2, 0x04,
      parent 3, 0x08, etc.
      
      But the current code does:
      
                      if (mux->flags & CLK_MUX_INDEX_BIT)
                              index = (1 << ffs(index));
      
      Which means that:
      
      For an input index of 0, ffs returns 0, so we set the register
      to 0x01, ok.
      
      For an input index of 1, ffs returns 1, so we set the register
      to 0x02, ok.
      
      For an input index of 2, ffs returns 2, so we set the register
      to 0x04, ok.
      
      For an input index of 3, ffs returns 1, so we set the register
      to 0x02, not good!
      
      The code should simply be:
      
                      if (mux->flags & CLK_MUX_INDEX_BIT)
                              index = 1 << index;
      
      Which always does the right thing, this commit fixes this.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
      6793b3cd
  10. 27 Aug, 2013 1 commit
  11. 19 Aug, 2013 1 commit
  12. 16 Aug, 2013 1 commit
  13. 05 Aug, 2013 1 commit
  14. 15 Jun, 2013 1 commit
  15. 22 Mar, 2013 1 commit
  16. 11 Jul, 2012 1 commit
    • Rajendra Nayak's avatar
      clk: Add CLK_IS_BASIC flag to identify basic clocks · f7d8caad
      Rajendra Nayak authored
      Most platforms end up using a mix of basic clock types and
      some which use clk_hw_foo struct for filling in custom platform
      information when the clocks don't fit into basic types supported.
      
      In platform code, its useful to know if a clock is using a basic
      type or clk_hw_foo, which helps platforms know if they can
      safely use to_clk_hw_foo to derive the clk_hw_foo pointer from
      clk_hw.
      
      Mark all basic clocks with a CLK_IS_BASIC flag.
      Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      f7d8caad
  17. 08 May, 2012 1 commit
  18. 01 May, 2012 1 commit
    • Saravana Kannan's avatar
      clk: Use a separate struct for holding init data. · 0197b3ea
      Saravana Kannan authored
      Create a struct clk_init_data to hold all data that needs to be passed from
      the platfrom specific driver to the common clock framework during clock
      registration. Add a pointer to this struct inside clk_hw.
      
      This has several advantages:
      * Completely hides struct clk from many clock platform drivers and static
        clock initialization code that don't care for static initialization of
        the struct clks.
      * For platforms that want to do complete static initialization, it removed
        the need to directly mess with the struct clk's fields while still
        allowing to statically allocate struct clk. This keeps the code more
        future proof even if they include clk-private.h.
      * Simplifies the generic clk_register() function and allows adding optional
        fields in the future without modifying the function signature.
      * Simplifies the static initialization of clocks on all platforms by
        removing the need for forward delcarations or convoluted macros.
      Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
      [mturquette@linaro.org: kept DEFINE_CLK_* macros and __clk_init]
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnd Bergman <arnd.bergmann@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Jamie Iles <jamie@jamieiles.com>
      Cc: Richard Zhao <richard.zhao@linaro.org>
      Cc: Saravana Kannan <skannan@codeaurora.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Linus Walleij <linus.walleij@stericsson.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Amit Kucheria <amit.kucheria@linaro.org>
      Cc: Deepak Saxena <dsaxena@linaro.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      0197b3ea
  19. 24 Apr, 2012 5 commits
  20. 16 Mar, 2012 1 commit
    • Mike Turquette's avatar
      clk: basic clock hardware types · 9d9f78ed
      Mike Turquette authored
      Many platforms support simple gateable clocks, fixed-rate clocks,
      adjustable divider clocks and multi-parent multiplexer clocks.
      
      This patch introduces basic clock types for the above-mentioned hardware
      which share some common characteristics.
      
      Based on original work by Jeremy Kerr and contribution by Jamie Iles.
      Dividers and multiplexor clocks originally contributed by Richard Zhao &
      Sascha Hauer.
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      Signed-off-by: default avatarMike Turquette <mturquette@ti.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnd Bergman <arnd.bergmann@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Jamie Iles <jamie@jamieiles.com>
      Cc: Richard Zhao <richard.zhao@linaro.org>
      Cc: Saravana Kannan <skannan@codeaurora.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Linus Walleij <linus.walleij@stericsson.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Amit Kucheria <amit.kucheria@linaro.org>
      Cc: Deepak Saxena <dsaxena@linaro.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      9d9f78ed