drivers/clocksource/sh_tmu.c:353

Table of Contents

1 sh_tmu users and clock trees

1.1 platform_device sh-tmu

1.1.1 arch/sh/kernel/cpu/sh4/setup-sh4-202.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init().

    Device relevant input clock
    sh-tmu.0 peripheral_clk
    peripheral_clk &master_clk
    master_clk  

    Likewise for sh-tmu.1, sh-tmu.2, sh-tmu-sh3.0.

1.1.3 arch/sh/kernel/cpu/sh4/setup-sh7760.c

Instantiations of tmu0_device:

Used by SH_EDOSK7760 board.

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.1.4 arch/sh/kernel/cpu/sh4a/setup-sh7343.c

  1. Clock tree

    Initialized through arch_clk_init(). Seems odd: only adds an alias for tmu_fck.

    Device relevant input clock
    tmu_fck &mstp_clks[MSTP015]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &dll_clk or &extal_clk
    dll_clk &r_clk
    r_clk  
    extal_clk  

1.1.5 arch/sh/kernel/cpu/sh4a/setup-sh7366.c

Instantiations of tmu0_device:

Not used by any board?

  1. Clock tree

    Initialized through arch_clk_init(). Seems odd: only adds an alias for tmu_fck.

    Device relevant input clock
    tmu_fck &mstp_clks[MSTP015]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &dll_clk or &extal_clk
    dll_clk &r_clk
    r_clk  
    extal_clk  

1.1.6 arch/sh/kernel/cpu/sh4a/setup-sh7722.c

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[HWBLK_TMU]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &dll_clk or &extal_clk
    dll_clk &r_clk
    r_clk  
    extal_clk  

1.1.7 arch/sh/kernel/cpu/sh4a/setup-sh7723.c

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[HWBLK_TMU0]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &dll_clk or &extal_clk
    dll_clk &r_clk
    r_clk  
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[HWBLK_TMU1]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &dll_clk or &extal_clk
    dll_clk &r_clk
    r_clk  
    extal_clk  

1.1.8 arch/sh/kernel/cpu/sh4a/setup-sh7724.c

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[HWBLK_TMU0]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &fll_clk or &extal_clk
    fll_clk &r_clk
    r_clk  
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[HWBLK_TMU1]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk either &fll_clk or &extal_clk
    fll_clk &r_clk
    r_clk  
    extal_clk  

1.1.9 arch/sh/kernel/cpu/sh4a/setup-sh7734.c

Instantiations of tmu0_device, tmu1_device, tmu2_device:

Not used by any board?

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[MSTP016]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[MSTP015]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.2 &mstp_clks[MSTP014]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  

1.1.10 arch/sh/kernel/cpu/sh4a/setup-sh7757.c

Instantiations of tmu0_device:

Used by SH_SH7757LCR board.

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[MSTP113]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[MSTP114]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  

1.1.11 arch/sh/kernel/cpu/sh4a/setup-sh7763.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.1.12 arch/sh/kernel/cpu/sh4a/setup-sh7770.c

Instantiations of tmu0_device, tmu1_device, tmu2_device:

Not used by any board?

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.1.13 arch/sh/kernel/cpu/sh4a/setup-sh7780.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.1.14 arch/sh/kernel/cpu/sh4a/setup-sh7785.c

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[MSTP008]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    &pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[MSTP009]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    &pll_clk &extal_clk
    extal_clk  

1.1.15 arch/sh/kernel/cpu/sh4a/setup-sh7786.c

Instantiations of tmu0_device, tmu1_device, tmu2_device:

Note that tmu3_device isn't instantiated anywhere. Used by SH_SDK7786, SH_URQUELL, SH_APSH4AD0A boards.

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[MSTP008]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[MSTP009]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.2 &mstp_clks[MSTP010]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.3 &mstp_clks[MSTP011]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  

1.1.16 arch/sh/kernel/cpu/sh4a/setup-shx3.c

  1. Clock tree

    Initialized through arch_clk_init().

    Device relevant input clock
    sh-tmu.0 &mstp_clks[MSTP008]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  
    Device relevant input clock
    sh-tmu.1 &mstp_clks[MSTP009]
    mstp_clks &div4_clks[DIV4_P]
    div4_clks &pll_clk
    pll_clk &extal_clk
    extal_clk  

1.1.17 arch/sh/kernel/cpu/sh5/setup-sh5.c

Instantiations of tmu0_device:

Used by SH_CAYMAN board.

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.2 platform_device sh-tmu-sh3

1.2.1 arch/sh/kernel/cpu/sh3/setup-sh7705.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.2.2 arch/sh/kernel/cpu/sh3/setup-sh770x.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.2.3 arch/sh/kernel/cpu/sh3/setup-sh7710.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.2.4 arch/sh/kernel/cpu/sh3/setup-sh7720.c

  1. Clock tree

    Initialized through arch_clk_init(), cpg_clk_init(). C.f. CPG clock tree.

1.3 Device tree nodes with compatible=renesas,tmu

1.3.1 arch/arm/boot/dts/r8a7740.dtsi

Included from arch/arm/boot/dts/r8a7740-armadillo800eva.dts:12. Board has no ->init_time, the of_clk_init() path in arm's time_init() is taken.

  1. Clock tree
    Node compatible relevant input clock
    tmu0 renesas,tmu-r8a7740, renesas,tmu <&mstp1_clks R8A7740_CLK_TMU0>
    mstp1_clks renesas,r8a7740-mstp-clocks, renesas,cpg-mstp-clocks <&sub_clk>
    sub_clk renesas,r8a7740-div6-clock, renesas,cpg-div6-clock <&pllc1_div2_clk>, <&cpg_clocks R8A7740_CLK_USB24S>
    pllc1_div2_clk fixed-factor-clock <&cpg_clocks R8A7740_CLK_PLLC1>
    cpg_clocks renesas,r8a7740-cpg-clocks <&extal1_clk>, <&extalr_clk>
    extal1_clk fixed-clock  
    extalr_clk fixed-clock  
    Node compatible relevant input clock
    tmu1 renesas,tmu-r8a7740, renesas,tmu <&mstp1_clks R8A7740_CLK_TMU1>
    mstp1_clks renesas,r8a7740-mstp-clocks, renesas,cpg-mstp-clocks <&sub_clk>
    sub_clk renesas,r8a7740-div6-clock, renesas,cpg-div6-clock <&pllc1_div2_clk>, <&cpg_clocks R8A7740_CLK_USB24S>
    pllc1_div2_clk fixed-factor-clock <&cpg_clocks R8A7740_CLK_PLLC1>
    cpg_clocks renesas,r8a7740-cpg-clocks <&extal1_clk>, <&extalr_clk>
    extal1_clk fixed-clock  
    extalr_clk fixed-clock  

1.3.2 arch/arm/boot/dts/r8a7778.dtsi

Included from arch/arm/boot/dts/r8a7778-bockw.dts:18. Board has no ->init_time, the of_clk_init() path in arm's time_init() is taken.

  1. Clock tree
    Node compatible relevant input clock
    tmu0 renesas,tmu-r8a7778, renesas,tmu <&mstp0_clks R8A7778_CLK_TMU0>
    mstp0_clks renesas,r8a7778-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7778_CLK_P>
    cpg_clocks renesas,r8a7778-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  
    Node compatible relevant input clock
    tmu1 renesas,tmu-r8a7778, renesas,tmu <&mstp0_clks R8A7778_CLK_TMU1>
    mstp0_clks renesas,r8a7778-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7778_CLK_P>
    cpg_clocks renesas,r8a7778-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  
    Node compatible relevant input clock
    tmu2 renesas,tmu-r8a7778, renesas,tmu <&mstp0_clks R8A7778_CLK_TMU2>
    mstp0_clks renesas,r8a7778-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7778_CLK_P>
    cpg_clocks renesas,r8a7778-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  

1.3.3 arch/arm/boot/dts/r8a7779.dtsi

Included from arch/arm/boot/dts/r8a7779-marzen.dts:13. Board has no ->init_time, the of_clk_init() path in arm's time_init() is taken.

  1. Clock tree
    Node compatible relevant input clock
    tmu0 renesas,tmu-r8a7779, renesas,tmu <&mstp0_clks R8A7779_CLK_TMU0>
    mstp0_clks renesas,r8a7779-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7779_CLK_P>
    cpg_clocks renesas,r8a7779-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  
    Node compatible relevant input clock
    tmu1 renesas,tmu-r8a7779, renesas,tmu <&mstp0_clks R8A7779_CLK_TMU1>
    mstp0_clks renesas,r8a7779-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7779_CLK_P>
    cpg_clocks renesas,r8a7779-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  
    Node compatible relevant input clock
    tmu2 renesas,tmu-r8a7779, renesas,tmu <&mstp0_clks R8A7779_CLK_TMU2>
    mstp0_clks renesas,r8a7779-mstp-clocks, renesas,cpg-mstp-clocks <&cpg_clocks R8A7779_CLK_P>
    cpg_clocks renesas,r8a7779-cpg-clocks <&extal_clk>
    extal_clk fixed-clock  

2 Clock rate/parent changers in arch/arm and arch/sh

git grep -n 'clk_set_\(rate\|parent\)' -- arch/arm arch/sh

Manually cleaned up.

2.1 arch/arm

2.1.1 arch/arm/mach-davinci/

ARCH_DAVINCI boards do not use sh_tmu.

  1. arch/arm/mach-davinci/clock.c:594
    clk_set_rate(refclk, rate);
    
  2. arch/arm/mach-davinci/da850.c:1202
    return clk_set_rate(pllclk, index);
    

2.1.2 arch/arm/mach-mvebu/platsmp.c:68

clk_set_rate(cpu_clk, rate);

ARCH_MVEBU boards do not use sh_tmu.

2.1.3 arch/arm/mach-omap1/

ARCH_OMAP1 boards do not use sh_tmu.

  1. arch/arm/mach-omap1/clock.c:696
    ret = omap1_clk_set_rate(clk, rate);
    
  2. arch/arm/mach-omap1/serial.c:149
    clk_set_rate(uart1_ck, 12000000);
    
  3. arch/arm/mach-omap1/serial.c:159
    clk_set_rate(uart2_ck, 12000000);
    
  4. arch/arm/mach-omap1/serial.c:161
    clk_set_rate(uart2_ck, 48000000);
    
  5. arch/arm/mach-omap1/serial.c:171
    clk_set_rate(uart3_ck, 12000000);
    

2.1.4 arch/arm/mach-omap2/

ARCH_OMAP2PLUS boards do not use sh_tmu.

  1. arch/arm/mach-omap2/io.c:399
    v = clk_set_rate(dpll3_m2_ck, rate);
    
  2. arch/arm/mach-omap2/omap2-restart.c:39
    clk_set_rate(reset_virt_prcm_set_ck, rate);
    

2.1.5 arch/arm/mach-s3c24xx/cpufreq-utils.c:65

clk_set_rate(cfg->mpll, cfg->pll.frequency);

ARCH_S3C24XX boards do not use sh_tmu.

2.1.6 arch/arm/mach-spear/

PLAT_SPEAR boards do not use sh_tmu.

  1. arch/arm/mach-spear/spear13xx.c:122
    clk_set_parent(gpt_clk, pclk);
    
  2. arch/arm/mach-spear/spear3xx.c:111
    clk_set_parent(gpt_clk, pclk);
    
  3. arch/arm/mach-spear/spear6xx.c:398
    clk_set_parent(gpt_clk, pclk);
    

2.1.7 arch/arm/plat-omap/

ARCH_OMAP boards do not use sh_tmu.

  1. arch/arm/plat-omap/dmtimer.c:157
    ret = clk_set_parent(timer->fclk, parent);
    
  2. arch/arm/plat-omap/dmtimer.c:563
    ret = clk_set_parent(timer->fclk, parent);
    

2.2 arch/sh

2.2.1 arch/sh/boards/board-apsh4a3a.c:131

ret = clk_set_rate(clk, 33333000);

SH_APSH4A3A depends on CPU_SUBTYPE_SH7785 and thus, does use sh_tmu. Furthermore, clk is extal which is part of the sh_tmu clock tree on CPU_SUBTYPE_SH7785. However, that clk_set_rate() is done from the board's ->mv_clk_init() and thus, from arch/sh's time_init(), clk_init().

2.2.2 arch/sh/boards/board-apsh4ad0a.c:109

ret = clk_set_rate(clk, 33333000);

SH_APSH4AD0A depends on CPU_SUBTYPE_SH7786 and thus, does use sh_tmu. Furthermore, clk is extal which is part of the sh_tmu clock tree on CPU_SUBTYPE_SH7786. However, that clk_set_rate() is done from the board's ->mv_clk_init() and thus, from arch/sh's time_init(), clk_init().

2.2.3 arch/sh/boards/board-sh7785lcr.c:306

ret = clk_set_rate(clk, 33333333);

SH_SH7785LCR depends on CPU_SUBTYPE_SH7785 and thus, does use sh_tmu. Furthermore, clk is extal which is part of the sh_tmu clock tree on CPU_SUBTYPE_SH7785. However, that clk_set_rate() is done from the board's ->mv_clk_init() and thus, from arch/sh's time_init(), clk_init().

2.2.4 arch/sh/boards/board-urquell.c:196

ret = clk_set_rate(clk, 33333333);

SH_URQUELL depends on CPU_SUBTYPE_SH7786 and thus, does use sh_tmu. Furthermore, clk is extal which is part of the sh_tmu clock tree on CPU_SUBTYPE_SH7786. However, that clk_set_rate() is done from the board's ->mv_clk_init() and thus, from arch/sh's time_init(), clk_init().

2.2.5 arch/sh/boards/mach-ecovec24/

SH_ECOVEC depends on CPU_SUBTYPE_SH7724 and thus, does use the sh_tmu device.

  1. arch/sh/boards/mach-ecovec24/setup.c:1359
    clk_set_rate(clk, clk_round_rate(clk, 83333333));
    

    clk is spu_clk which is equivalent to &div6_clks[DIV6_S]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

  2. arch/sh/boards/mach-ecovec24/setup.c:1367
    clk_set_rate(&sh7724_fsimckb_clk, 48000);
    

    sh7724_fsimckb_clk isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

  3. arch/sh/boards/mach-ecovec24/setup.c:1368
    clk_set_parent(clk, &sh7724_fsimckb_clk);
    clk_set_rate(clk, 48000);
    

    clk is fsib_clk which is equivalent to &div6_clks[DIV6_FB]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

  4. arch/sh/boards/mach-ecovec24/setup.c:1384
    clk_set_rate(clk, clk_round_rate(clk, 166000000));
    

    clk is vpu_clk which is equivalent to &div4_clks[DIV4_M1]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

2.2.6 arch/sh/boards/mach-kfr2r09/setup.c:286

ret = clk_set_rate(camera_clk, rate);

SH_KFR2R09 depends on CPU_SUBTYPE_SH7724 and thus, does use the sh_tmu device.

However, camera_clk is video_clk which is equivalent to &div6_clks[DIV6_V]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

2.2.7 arch/sh/boards/mach-migor/setup.c:315

clk_set_rate(camera_clk, 10000000);

SH_MIGOR depends on CPU_SUBTYPE_SH7722 and thus, does use the sh_tmu device.

However, camera_clk is video_clk which is equivalent to &div6_clks[DIV6_V]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7722.

2.2.8 arch/sh/boards/mach-sdk7786/setup.c:207

ret = clk_set_rate(clk, 33333333);

SH_SDK7786 depends on CPU_SUBTYPE_SH7786 and thus, does use sh_tmu. Furthermore, clk is extal which is part of the sh_tmu clock tree on CPU_SUBTYPE_SH7786. However, that clk_set_rate() is done from the board's ->mv_clk_init() and thus, from arch/sh's time_init(), clk_init().

2.2.9 arch/sh/boards/mach-se/7724/

SH_7724_SOLUTION_ENGINE depends on CPU_SUBTYPE_SH7724 and thus, does use the sh_tmu device.

  1. arch/sh/boards/mach-se/7724/setup.c:844
    clk_set_rate(clk, clk_round_rate(clk, 83333333));
    

    clk is spu_clk which is equivalent to &div6_clks[DIV6_S]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

  2. arch/sh/boards/mach-se/7724/setup.c:852
    clk_set_rate(&sh7724_fsimcka_clk, 48000);
    

    sh7724_fsimcka_clk isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

  3. arch/sh/boards/mach-se/7724/setup.c:853
    clk_set_parent(clk, &sh7724_fsimcka_clk);
    clk_set_rate(clk, 48000);
    

    clk is fsia_clk which is equivalent to &div6_clks[DIV6_FA]. This isn't a member of the sh_tmu clock tree on CPU_SUBTYPE_SH7724.

Author: Nicolai Stange

Created: 2017-02-05 Sun 15:31

Emacs 25.1.1 (Org mode 8.2.10)

Validate