23 Feb, 2016

1 commit

  • There are some Arria10 clocks of type "altr,socfpga-a10-perip-clk" that can
    have multiple parents. Fix up the __socfpga_periph_init() to call
    of_clk_parent_fill() that will return the appropriate number of parents.

    Also, update __socfpga_gate_init() to call of_clk_parent_fill() helper
    function.

    Signed-off-by: Dinh Nguyen
    Signed-off-by: Stephen Boyd

    Dinh Nguyen
     

09 Feb, 2016

1 commit

  • clang found a bug with the __socfpga_pll_init definition:

    drivers/clk/socfpga/clk-pll-a10.c:77:15: error: '__section__' attribute only applies to functions and
    global variables

    This moves the __init annotation to the right place so the function
    actually gets discarded.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Stephen Boyd

    Arnd Bergmann
     

25 Aug, 2015

1 commit


29 Jul, 2015

1 commit


21 Jul, 2015

1 commit

  • Clock provider drivers generally shouldn't include clk.h because
    it's the consumer API. Remove the include here because this is a
    provider driver. The clkdev.h include isn't used either, remove
    it and add in slab.h to make sure things keep compiling.

    Acked-by: Dinh Nguyen
    Signed-off-by: Stephen Boyd

    Stephen Boyd
     

10 Jun, 2015

1 commit


06 Jun, 2015

1 commit


22 May, 2015

2 commits


15 May, 2015

2 commits


13 May, 2014

2 commits


01 May, 2014

1 commit

  • commit [1771b10d6 clk: respect the clock dependencies in of_clk_init]
    exposed a flaw in the socfpga clock driver and prevents the platform
    from booting on 3.15-rc1.

    Because the "altr,clk-mgr" is not really a clock, it should not be using
    CLK_OF_DECLARE, instead we should be mapping the clk-mgr's base address
    one of the functional clock init function. Use the socfpga_pll_init function
    to map the clk_mgr_base_addr as this clock should always be initialized first.

    Signed-off-by: Dinh Nguyen
    Tested-by: Pavel Machek

    Dinh Nguyen
     

19 Mar, 2014

1 commit

  • WARNING: drivers/clk/socfpga/built-in.o(.data+0xc0): Section mismatch in
    reference from the variable socfpga_child_clocks to the function
    .init.text:socfpga_pll_init()
    The variable socfpga_child_clocks references
    the function __init socfpga_pll_init()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: drivers/clk/socfpga/built-in.o(.data+0x184): Section mismatch in
    reference from the variable socfpga_child_clocks to the function
    .init.text:socfpga_periph_init()
    The variable socfpga_child_clocks references
    the function __init socfpga_periph_init()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    WARNING: drivers/clk/socfpga/built-in.o(.data+0x248): Section mismatch in
    reference from the variable socfpga_child_clocks to the function
    .init.text:socfpga_gate_init()
    The variable socfpga_child_clocks references
    the function __init socfpga_gate_init()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    Reported-by: Mike Turquette
    Signed-off-by: Dinh Nguyen
    Signed-off-by: Mike Turquette

    Dinh Nguyen
     

27 Feb, 2014

2 commits


19 Feb, 2014

7 commits

  • The clk-phase property is used to represent the 2 clock phase values that is
    needed for the SD/MMC driver. Add a prepare function to the clk_ops, that will
    use the syscon driver to set sdmmc_clk's phase shift that is located in the
    system manager.

    Signed-off-by: Dinh Nguyen
    Acked-by: Zhangfei Gao
    Acked-by: Jaehoon Chung
    ---
    v9: none
    v8: Use degrees in the clk-phase binding property
    v7: Add dts property to represent the clk phase of the sdmmc_clk. Add a
    prepare function to the gate clk that will toggle clock phase setting.
    Remove the "altr,socfpga-sdmmc-sdr-clk" clock type.
    v6: Add a new clock type "altr,socfpga-sdmmc-sdr-clk" that will be used to
    set the phase shift settings.
    v5: Use the "snps,dw-mshc" binding
    v4: Use the sdmmc_clk prepare function to set the phase shift settings
    v3: Not use the syscon driver because as of 3.13-rc1, the syscon driver is
    loaded after the clock driver.
    v2: Use the syscon driver

    Dinh Nguyen
     
  • Move the different kinds of clocks into their own files. The reason is to aid
    readability of the code. This also goes along with the other SoC-specific
    clock drivers.

    The split introduces new structs for the three types of clocks and uses them.
    Other changes are not done to the code.

    Signed-off-by: Steffen Trumtrar
    Signed-off-by: Dinh Nguyen

    Steffen Trumtrar
     
  • It should be SOCFPGA instead of SOCFGPA.

    Signed-off-by: Steffen Trumtrar
    Signed-off-by: Dinh Nguyen

    Steffen Trumtrar
     
  • The clk_name field from the socfpga_clk struct is unused.
    Remove it.

    Signed-off-by: Steffen Trumtrar
    Signed-off-by: Dinh Nguyen

    Steffen Trumtrar
     
  • The only thing that socfpga_init_clocks was doing is setting up the smp_twd clk.
    Now that twd-timer's clock phandle is populated in the DTS, we can remove
    this function.

    Signed-off-by: Dinh Nguyen
    Acked-by: Arnd Bergmann

    Dinh Nguyen
     
  • After the patch:
    "clk: socfpga: Map the clk manager base address in the clock driver"

    The clk->name field in socfpga_clk_recalc_rate() was getting cleared. Replace
    looking for the GPIO_DB_CLK by its divider offset instead.

    Also rename the define SOCFPGA_DB_CLK_OFFSET -> SOCFPGA_GPIO_DB_CLK_OFFSET, as
    this represents the GPIO_DB_CLK.

    Signed-off-by: Dinh Nguyen

    Dinh Nguyen
     
  • The clk manager's base address was being mapped in SOCFPGA's arch code and
    being extern'ed out to the clock driver. This method is not correct, and the
    arch code was not really doing anything with that clk manager anyways.

    This patch moves the mapping of the clk manager's base address in the clock
    driver itself. Cleans up CLK_OF_DECLARE() into a single registration of all
    the clocks.

    Suggested-by: Arnd Bergmann
    Signed-off-by: Dinh Nguyen
    Acked-by: Arnd Bergmann
    ---
    v2: Use a static declaration for the clk_mgr_base_addr. Clean up the
    CLK_OF_DECLARE() as suggested by Arnd.

    Dinh Nguyen
     

20 Dec, 2013

1 commit


28 Nov, 2013

1 commit


08 Oct, 2013

1 commit

  • The SD/MMC clock is named "sdmmc_clk", and NOT "mmc_clk". Because of this,
    the SD driver was getting the incorrect clock value. This prevented the
    SD driver from initializing correctly.

    Signed-off-by: Dinh Nguyen
    CC: Arnd Bergmann
    CC: Olof Johansson
    Reviewed-by: Pavel Machek
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Mike Turquette

    Dinh Nguyen
     

12 Jun, 2013

1 commit

  • Add support to gate the clocks that directly feed peripherals. For clocks
    with multiple parents, add the ability to determine the correct parent,
    and also set parents. Also add support to calculate and set the clocks'
    rate.

    Signed-off-by: Dinh Nguyen
    Reviewed-by: Pavel Machek
    Acked-by: Mike Turquette
    Cc: Mike Turquette
    CC: Arnd Bergmann
    CC: Olof Johansson
    Cc: Pavel Machek
    CC:

    v4:
    - Add Acked-by: Mike Turquette

    v3:
    - Addressed comments from Pavel

    v2:
    - Fix space/indent errors
    - Add streq for strcmp == 0
    Signed-off-by: Olof Johansson

    Dinh Nguyen
     

15 Apr, 2013

1 commit


19 Jul, 2012

1 commit