1. 30 Sep, 2014 10 commits
  2. 29 Sep, 2014 5 commits
    • Peter Ujfalusi's avatar
      clk: ti: dra7-atl-clock: Mark the device as pm_runtime_irq_safe · 04ed831f
      Peter Ujfalusi authored
      It is safe to call the pm sync calls in interrupt context in this driver.
      Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      04ed831f
    • Behan Webster's avatar
      clk: ti: LLVMLinux: Move __init outside of type definition · e8627a9e
      Behan Webster authored
      As written, the __init for ti_clk_get_div_table is in the middle of the return
      type.
      
      The gcc documentation indicates that section attributes should be added to the
      end of the function declaration:
      
        extern void foobar (void) __attribute__ ((section ("bar")));
      
      However gcc seems to be very permissive with where attributes can be placed.
      clang on the other hand isn't so permissive, and fails if you put the section
      definition in the middle of the return type:
      
      drivers/clk/ti/divider.c:298:28: error: expected ';' after struct
      static struct clk_div_table
                                 ^
                                 ;
      drivers/clk/ti/divider.c:298:1: warning: 'static' ignored on this
            declaration [-Wmissing-declarations]
      static struct clk_div_table
      ^
      drivers/clk/ti/divider.c:299:9: error: type specifier missing,
            defaults to 'int' [-Werror,-Wimplicit-int]
      __init *ti_clk_get_div_table(struct device_node *node)
      ~~~~~~  ^
      drivers/clk/ti/divider.c:345:9: warning: incompatible pointer types
            returning 'struct clk_div_table *' from a function with result type 'int *' [-Wincompatible-pointer-types]
              return table;
                     ^~~~~
      drivers/clk/ti/divider.c:419:9: warning: incompatible pointer types
            assigning to 'const struct clk_div_table *' from 'int *' [-Wincompatible-pointer-types]
              *table = ti_clk_get_div_table(node);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      3 warnings and 2 errors generated.
      
      By convention, most of the kernel code puts section attributes between the
      return type and function name. In the case where the return type is a pointer,
      it's important to place the '*' on left of the __init.
      
      This updated code works for both gcc and clang.
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Reviewed-by: default avatarMark Charlebois <charlebm@gmail.com>
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      e8627a9e
    • Sebastian Andrzej Siewior's avatar
      clk: ti: consider the fact that of_clk_get() might return an error · 319f1276
      Sebastian Andrzej Siewior authored
      I "forgot" to update the dtb and the kernel crashed:
      |Unable to handle kernel NULL pointer dereference at virtual address 0000002e
      |PC is at __clk_get_flags+0x4/0xc
      |LR is at ti_dt_clockdomains_setup+0x70/0xe8
      
      because I did not have the clock nodes. of_clk_get() returns an error
      pointer which is not checked here.
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      319f1276
    • Tero Kristo's avatar
      clk: ti: dra7-atl-clock: fix a memory leak · 73b5d5f7
      Tero Kristo authored
      of_clk_add_provider makes an internal copy of the parent_names property
      while its called, thus it is no longer needed after this call and can
      be freed.
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
      73b5d5f7
    • Tero Kristo's avatar
      clk: ti: change clock init to use generic of_clk_init · c08ee14c
      Tero Kristo authored
      Previously, the TI clock driver initialized all the clocks hierarchically
      under each separate clock provider node. Now, each clock that requires
      IO access will instead check their parent node to find out which IO range
      to use.
      
      This patch allows the TI clock driver to use a few new features provided
      by the generic of_clk_init, and also allows registration of clock nodes
      outside the clock hierarchy (for example, any external clocks.)
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Stefan Assmann <sassmann@kpanic.de>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      c08ee14c
  3. 28 Sep, 2014 5 commits
  4. 27 Sep, 2014 20 commits