* Re: [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency
@ 2015-01-19 9:31 MyungJoo Ham
0 siblings, 0 replies; 3+ messages in thread
From: MyungJoo Ham @ 2015-01-19 9:31 UTC (permalink / raw)
To: 최찬우, kgene@kernel.org
Cc: 박경민, rafael.j.wysocki@intel.com,
mark.rutland@arm.com, ABHILASH KESAVAN, tomasz.figa@gmail.com,
Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
robh+dt@kernel.org, 대인기,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki
>
> This patch adds the divider clock id for Exynos4 memory bus frequency.
> The clock id is used fo DVFS (Dynamic Voltage/Frequency Scaling)
> feature of exynos memory bus frequency.
>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Anyway, you will need reviews from Sylwester and/or Tomasz for this one.
Cheers,
MyungJoo
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v4 0/9] devfreq: Add generic exynos memory-bus frequency driver
@ 2015-01-15 1:50 Chanwoo Choi
2015-01-15 1:50 ` [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency Chanwoo Choi
0 siblings, 1 reply; 3+ messages in thread
From: Chanwoo Choi @ 2015-01-15 1:50 UTC (permalink / raw)
To: myungjoo.ham, kgene
Cc: mark.rutland, k.kozlowski, linux-samsung-soc, b.zolnierkie,
linux-pm, rafael.j.wysocki, tomasz.figa, linux-kernel, inki.dae,
cw00.choi, kyungmin.park, robh+dt, a.kesavan, linux-arm-kernel
This patch-set adds the generic exynos bus frequency driver for memory bus
with DEVFREQ framework. The Samsung Exynos SoCs have the common architecture
for memory bus between DRAM memory and MMC/sub IP in SoC. This driver can
support the memory bus frequency driver for Exynos SoCs.
Each memory bus block has a clock for memory bus speed and frequency
table which is changed according to the utilization of memory bus on runtime.
And then each memory bus group has the one more memory bus blocks and
OPP table (including frequency and voltage), regulator, devfreq-event
devices.
There are a little difference about the number of memory bus because each Exynos
SoC have the different sub-IP and different memory bus speed. In spite of this
difference among Exynos SoCs, we can support almost Exynos SoC by adding
unique data of memory bus to devicetree file.
Depend on:
- [PATCHv8 0/9] devfreq: Add devfreq-event class to provide raw data for devfreq device
: https://lkml.org/lkml/2015/1/7/795
Changelog:
Changes from v3:
(https://lkml.org/lkml/2015/1/7/872)
- Change the driver name and path by comment
: drivers/devfreq/exynos-busfreq.c -> drivers/devfreq/exynos/exynos-bus.c
- Disable regulator when entering suspend state in exynos-bus.c
and enable it after wake-up from suspend state.
- Add 'exynos,saturation-ratio' property to calibrate the performance count
against cycle count.
- Add new patch to remove unused old driver
: drivers/devfreq/exynos/exynos4_bus.{c|h}
- Clean-up code for minor issue
- Add acked tag by Myungjoo Ham (DEVFREQ maintainer)
Changes from v2:
(https://lkml.org/lkml/2014/12/31/2)
- Support the memory bus frequency feature for Exynos3250-based Monk board
- Fix build warning about variable uninitialized
Changes from v1:
(https://lkml.org/lkml/2014/12/23/178)
- This patchset is rebased on v3.19-rc2.
- Fix bug after wake-up from suspend state. If devfreq device fail to get event,
exynos-busfreq retry to set the event for starting.
- Add memory bus group of Exynos4x12/Exynos4210
- Add divider clock id for Exynos4 memory bus frequency
- Support memory bus frequency driver on Exynos4412-based TRATS2 board
- This patch-set has the dependency on following patch-set[1]:
[1] [PATCHv6 0/9] devfreq: Add devfreq-event class to provide raw data for devfreq device
: https://lkml.org/lkml/2014/12/28/139
Chanwoo Choi (9):
devfreq: exynos: Add generic exynos memory bus frequency driver
devfreq: exynos: Add documentation for generic exynos memory bus frequency driver
ARM: dts: Add memory bus node for Exynos3250
clk: samsung: exynos4: Add divider clock id for memory bus frequency
ARM: dts: Add memory bus node for Exynos4x12
ARM: dts: Add memory bus node for Exynos4210
ARM: dts: Add the support for exynos busfreq on Exynos3250-based Rinato/Monk board
ARM: dts: Add the support for exynos busfreq on Exynos4412-based TRATS2 board
devfreq: exynos: Remove unused exynos4 memory busfreq driver
.../devicetree/bindings/devfreq/exynos-bus.txt | 188 ++++
arch/arm/boot/dts/exynos3250-monk.dts | 12 +
arch/arm/boot/dts/exynos3250-rinato.dts | 12 +
arch/arm/boot/dts/exynos3250.dtsi | 125 +++
arch/arm/boot/dts/exynos4210.dtsi | 93 ++
arch/arm/boot/dts/exynos4412-trats2.dts | 12 +
arch/arm/boot/dts/exynos4x12.dtsi | 121 +++
drivers/clk/samsung/clk-exynos4.c | 10 +-
drivers/devfreq/Kconfig | 17 +-
drivers/devfreq/Makefile | 1 +
drivers/devfreq/exynos/Makefile | 2 +-
drivers/devfreq/exynos/exynos-bus.c | 598 +++++++++++
drivers/devfreq/exynos/exynos4_bus.c | 1055 --------------------
drivers/devfreq/exynos/exynos4_bus.h | 110 --
include/dt-bindings/clock/exynos4.h | 7 +-
15 files changed, 1184 insertions(+), 1179 deletions(-)
create mode 100644 Documentation/devicetree/bindings/devfreq/exynos-bus.txt
create mode 100644 drivers/devfreq/exynos/exynos-bus.c
delete mode 100644 drivers/devfreq/exynos/exynos4_bus.c
delete mode 100644 drivers/devfreq/exynos/exynos4_bus.h
--
1.8.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency 2015-01-15 1:50 [PATCH v4 0/9] devfreq: Add generic exynos memory-bus frequency driver Chanwoo Choi @ 2015-01-15 1:50 ` Chanwoo Choi 2015-01-20 14:17 ` Sylwester Nawrocki 0 siblings, 1 reply; 3+ messages in thread From: Chanwoo Choi @ 2015-01-15 1:50 UTC (permalink / raw) To: myungjoo.ham, kgene Cc: mark.rutland, k.kozlowski, linux-samsung-soc, b.zolnierkie, linux-pm, rafael.j.wysocki, tomasz.figa, linux-kernel, inki.dae, cw00.choi, kyungmin.park, robh+dt, Sylwester Nawrocki, a.kesavan, linux-arm-kernel This patch adds the divider clock id for Exynos4 memory bus frequency. The clock id is used fo DVFS (Dynamic Voltage/Frequency Scaling) feature of exynos memory bus frequency. Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Cc: Tomasz Figa <tomasz.figa@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- drivers/clk/samsung/clk-exynos4.c | 10 +++++----- include/dt-bindings/clock/exynos4.h | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index 88e8c6b..51462e8 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c @@ -703,12 +703,12 @@ static struct samsung_mux_clock exynos4x12_mux_clks[] __initdata = { /* list of divider clocks supported in all exynos4 soc's */ static struct samsung_div_clock exynos4_div_clks[] __initdata = { - DIV(0, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 3), + DIV(CLK_DIV_GDL, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 3), DIV(0, "div_gpl", "div_gdl", DIV_LEFTBUS, 4, 3), DIV(0, "div_clkout_leftbus", "mout_clkout_leftbus", CLKOUT_CMU_LEFTBUS, 8, 6), - DIV(0, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 3), + DIV(CLK_DIV_GDR, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 3), DIV(0, "div_gpr", "div_gdr", DIV_RIGHTBUS, 4, 3), DIV(0, "div_clkout_rightbus", "mout_clkout_rightbus", CLKOUT_CMU_RIGHTBUS, 8, 6), @@ -781,10 +781,10 @@ static struct samsung_div_clock exynos4_div_clks[] __initdata = { CLK_SET_RATE_PARENT, 0), DIV(0, "div_clkout_top", "mout_clkout_top", CLKOUT_CMU_TOP, 8, 6), - DIV(0, "div_acp", "mout_dmc_bus", DIV_DMC0, 0, 3), + DIV(CLK_DIV_ACP, "div_acp", "mout_dmc_bus", DIV_DMC0, 0, 3), DIV(0, "div_acp_pclk", "div_acp", DIV_DMC0, 4, 3), DIV(0, "div_dphy", "mout_dphy", DIV_DMC0, 8, 3), - DIV(0, "div_dmc", "mout_dmc_bus", DIV_DMC0, 12, 3), + DIV(CLK_DIV_DMC, "div_dmc", "mout_dmc_bus", DIV_DMC0, 12, 3), DIV(0, "div_dmcd", "div_dmc", DIV_DMC0, 16, 3), DIV(0, "div_dmcp", "div_dmcd", DIV_DMC0, 20, 3), DIV(0, "div_pwi", "mout_pwi", DIV_DMC1, 8, 4), @@ -829,7 +829,7 @@ static struct samsung_div_clock exynos4x12_div_clks[] __initdata = { DIV_F(CLK_DIV_MCUISP1, "div_mcuisp1", "div_mcuisp0", E4X12_DIV_ISP1, 8, 3, CLK_GET_RATE_NOCACHE, 0), DIV(CLK_SCLK_FIMG2D, "sclk_fimg2d", "mout_g2d", DIV_DMC1, 0, 4), - DIV(0, "div_c2c", "mout_c2c", DIV_DMC1, 4, 3), + DIV(CLK_DIV_C2C, "div_c2c", "mout_c2c", DIV_DMC1, 4, 3), DIV(0, "div_c2c_aclk", "div_c2c", DIV_DMC1, 12, 3), }; diff --git a/include/dt-bindings/clock/exynos4.h b/include/dt-bindings/clock/exynos4.h index 34fe28c..c4b1676 100644 --- a/include/dt-bindings/clock/exynos4.h +++ b/include/dt-bindings/clock/exynos4.h @@ -262,8 +262,13 @@ #define CLK_DIV_MCUISP1 453 /* Exynos4x12 only */ #define CLK_DIV_ACLK200 454 /* Exynos4x12 only */ #define CLK_DIV_ACLK400_MCUISP 455 /* Exynos4x12 only */ +#define CLK_DIV_ACP 456 +#define CLK_DIV_DMC 457 +#define CLK_DIV_C2C 458 /* Exynos4x12 only */ +#define CLK_DIV_GDL 459 +#define CLK_DIV_GDR 460 /* must be greater than maximal clock id */ -#define CLK_NR_CLKS 456 +#define CLK_NR_CLKS 461 #endif /* _DT_BINDINGS_CLOCK_EXYNOS_4_H */ -- 1.8.5.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency 2015-01-15 1:50 ` [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency Chanwoo Choi @ 2015-01-20 14:17 ` Sylwester Nawrocki 0 siblings, 0 replies; 3+ messages in thread From: Sylwester Nawrocki @ 2015-01-20 14:17 UTC (permalink / raw) To: Chanwoo Choi, kgene Cc: myungjoo.ham, kyungmin.park, rafael.j.wysocki, mark.rutland, a.kesavan, tomasz.figa, k.kozlowski, b.zolnierkie, robh+dt, inki.dae, linux-pm, linux-kernel, linux-arm-kernel, linux-samsung-soc, Mike Turquette On 15/01/15 02:50, Chanwoo Choi wrote: > This patch adds the divider clock id for Exynos4 memory bus frequency. > The clock id is used fo DVFS (Dynamic Voltage/Frequency Scaling) > feature of exynos memory bus frequency. > > Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> > Cc: Tomasz Figa <tomasz.figa@gmail.com> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> I've queued this patch for the clk tree, please let me know if a topic branch is needed. -- Thanks, Sylwester > drivers/clk/samsung/clk-exynos4.c | 10 +++++----- > include/dt-bindings/clock/exynos4.h | 7 ++++++- > 2 files changed, 11 insertions(+), 6 deletions(-) > > diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c > index 88e8c6b..51462e8 100644 > --- a/drivers/clk/samsung/clk-exynos4.c > +++ b/drivers/clk/samsung/clk-exynos4.c > @@ -703,12 +703,12 @@ static struct samsung_mux_clock exynos4x12_mux_clks[] __initdata = { > > /* list of divider clocks supported in all exynos4 soc's */ > static struct samsung_div_clock exynos4_div_clks[] __initdata = { > - DIV(0, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 3), > + DIV(CLK_DIV_GDL, "div_gdl", "mout_gdl", DIV_LEFTBUS, 0, 3), > DIV(0, "div_gpl", "div_gdl", DIV_LEFTBUS, 4, 3), > DIV(0, "div_clkout_leftbus", "mout_clkout_leftbus", > CLKOUT_CMU_LEFTBUS, 8, 6), > > - DIV(0, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 3), > + DIV(CLK_DIV_GDR, "div_gdr", "mout_gdr", DIV_RIGHTBUS, 0, 3), > DIV(0, "div_gpr", "div_gdr", DIV_RIGHTBUS, 4, 3), > DIV(0, "div_clkout_rightbus", "mout_clkout_rightbus", > CLKOUT_CMU_RIGHTBUS, 8, 6), > @@ -781,10 +781,10 @@ static struct samsung_div_clock exynos4_div_clks[] __initdata = { > CLK_SET_RATE_PARENT, 0), > DIV(0, "div_clkout_top", "mout_clkout_top", CLKOUT_CMU_TOP, 8, 6), > > - DIV(0, "div_acp", "mout_dmc_bus", DIV_DMC0, 0, 3), > + DIV(CLK_DIV_ACP, "div_acp", "mout_dmc_bus", DIV_DMC0, 0, 3), > DIV(0, "div_acp_pclk", "div_acp", DIV_DMC0, 4, 3), > DIV(0, "div_dphy", "mout_dphy", DIV_DMC0, 8, 3), > - DIV(0, "div_dmc", "mout_dmc_bus", DIV_DMC0, 12, 3), > + DIV(CLK_DIV_DMC, "div_dmc", "mout_dmc_bus", DIV_DMC0, 12, 3), > DIV(0, "div_dmcd", "div_dmc", DIV_DMC0, 16, 3), > DIV(0, "div_dmcp", "div_dmcd", DIV_DMC0, 20, 3), > DIV(0, "div_pwi", "mout_pwi", DIV_DMC1, 8, 4), > @@ -829,7 +829,7 @@ static struct samsung_div_clock exynos4x12_div_clks[] __initdata = { > DIV_F(CLK_DIV_MCUISP1, "div_mcuisp1", "div_mcuisp0", E4X12_DIV_ISP1, > 8, 3, CLK_GET_RATE_NOCACHE, 0), > DIV(CLK_SCLK_FIMG2D, "sclk_fimg2d", "mout_g2d", DIV_DMC1, 0, 4), > - DIV(0, "div_c2c", "mout_c2c", DIV_DMC1, 4, 3), > + DIV(CLK_DIV_C2C, "div_c2c", "mout_c2c", DIV_DMC1, 4, 3), > DIV(0, "div_c2c_aclk", "div_c2c", DIV_DMC1, 12, 3), > }; > > diff --git a/include/dt-bindings/clock/exynos4.h b/include/dt-bindings/clock/exynos4.h > index 34fe28c..c4b1676 100644 > --- a/include/dt-bindings/clock/exynos4.h > +++ b/include/dt-bindings/clock/exynos4.h > @@ -262,8 +262,13 @@ > #define CLK_DIV_MCUISP1 453 /* Exynos4x12 only */ > #define CLK_DIV_ACLK200 454 /* Exynos4x12 only */ > #define CLK_DIV_ACLK400_MCUISP 455 /* Exynos4x12 only */ > +#define CLK_DIV_ACP 456 > +#define CLK_DIV_DMC 457 > +#define CLK_DIV_C2C 458 /* Exynos4x12 only */ > +#define CLK_DIV_GDL 459 > +#define CLK_DIV_GDR 460 > > /* must be greater than maximal clock id */ > -#define CLK_NR_CLKS 456 > +#define CLK_NR_CLKS 461 > > #endif /* _DT_BINDINGS_CLOCK_EXYNOS_4_H */ > -- 1.8.5.5 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-20 14:17 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-19 9:31 [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency MyungJoo Ham -- strict thread matches above, loose matches on Subject: below -- 2015-01-15 1:50 [PATCH v4 0/9] devfreq: Add generic exynos memory-bus frequency driver Chanwoo Choi 2015-01-15 1:50 ` [PATCH v4 4/9] clk: samsung: exynos4: Add divider clock id for memory bus frequency Chanwoo Choi 2015-01-20 14:17 ` Sylwester Nawrocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).