* [PATCH 2/4] msm: add CLK_MINMAX to pmdh_clk
2010-12-03 0:39 [PATCH 1/4] msm: trout: add gpio_to_irq Daniel Walker
@ 2010-12-03 0:39 ` Daniel Walker
2010-12-03 0:39 ` [PATCH 3/4] msm: trout: change name of pmdh_clk to mddi_clk Daniel Walker
2010-12-03 0:39 ` [PATCH 4/4] msm: add handling for clocks tagged as CLK_MINMAX Daniel Walker
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Walker @ 2010-12-03 0:39 UTC (permalink / raw)
To: linux-arm-kernel
This adds in the CLK_MINMAX flag to the pmdh_clk since it's actual
a min/max clock instead of a single frequency clock.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
arch/arm/mach-msm/devices-msm7x00.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c
index 4e8c0bc..3bf8cb5 100644
--- a/arch/arm/mach-msm/devices-msm7x00.c
+++ b/arch/arm/mach-msm/devices-msm7x00.c
@@ -364,7 +364,7 @@ struct clk msm_clocks_7x01a[] = {
CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
CLK_PCOM("pbus_clk", PBUS_CLK, NULL, 0),
CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
- CLK_PCOM("pmdh_clk", PMDH_CLK, NULL, OFF ),
+ CLK_PCOM("pmdh_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
CLK_PCOM("sdc_clk", SDC1_CLK, &msm_device_sdc1.dev, OFF),
CLK_PCOM("sdc_pclk", SDC1_P_CLK, &msm_device_sdc1.dev, OFF),
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/4] msm: trout: change name of pmdh_clk to mddi_clk
2010-12-03 0:39 [PATCH 1/4] msm: trout: add gpio_to_irq Daniel Walker
2010-12-03 0:39 ` [PATCH 2/4] msm: add CLK_MINMAX to pmdh_clk Daniel Walker
@ 2010-12-03 0:39 ` Daniel Walker
2010-12-03 0:39 ` [PATCH 4/4] msm: add handling for clocks tagged as CLK_MINMAX Daniel Walker
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Walker @ 2010-12-03 0:39 UTC (permalink / raw)
To: linux-arm-kernel
This clock is used in the framebuffer driver as mddi_clk.
This just changes the name to match that. This also
mirrors a change in Google tree.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
arch/arm/mach-msm/devices-msm7x00.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c
index 3bf8cb5..b00a94b 100644
--- a/arch/arm/mach-msm/devices-msm7x00.c
+++ b/arch/arm/mach-msm/devices-msm7x00.c
@@ -364,7 +364,7 @@ struct clk msm_clocks_7x01a[] = {
CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
CLK_PCOM("pbus_clk", PBUS_CLK, NULL, 0),
CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
- CLK_PCOM("pmdh_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
+ CLK_PCOM("mddi_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
CLK_PCOM("sdc_clk", SDC1_CLK, &msm_device_sdc1.dev, OFF),
CLK_PCOM("sdc_pclk", SDC1_P_CLK, &msm_device_sdc1.dev, OFF),
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4/4] msm: add handling for clocks tagged as CLK_MINMAX
2010-12-03 0:39 [PATCH 1/4] msm: trout: add gpio_to_irq Daniel Walker
2010-12-03 0:39 ` [PATCH 2/4] msm: add CLK_MINMAX to pmdh_clk Daniel Walker
2010-12-03 0:39 ` [PATCH 3/4] msm: trout: change name of pmdh_clk to mddi_clk Daniel Walker
@ 2010-12-03 0:39 ` Daniel Walker
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Walker @ 2010-12-03 0:39 UTC (permalink / raw)
To: linux-arm-kernel
CLK_MINMAX is used to denote clocks that have a wide variation
in possible frequencies. This handling just sets the min and
max values to the same value.
This code was original created by Saravana Kannan.
Cc: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
arch/arm/mach-msm/clock.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
index c57210f..2069bfa 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -120,6 +120,21 @@ EXPORT_SYMBOL(clk_get_rate);
int clk_set_rate(struct clk *clk, unsigned long rate)
{
+ int ret;
+ if (clk->flags & CLKFLAG_MAX) {
+ ret = clk->ops->set_max_rate(clk->id, rate);
+ if (ret)
+ return ret;
+ }
+ if (clk->flags & CLKFLAG_MIN) {
+ ret = clk->ops->set_min_rate(clk->id, rate);
+ if (ret)
+ return ret;
+ }
+
+ if (clk->flags & CLKFLAG_MAX || clk->flags & CLKFLAG_MIN)
+ return ret;
+
return clk->ops->set_rate(clk->id, rate);
}
EXPORT_SYMBOL(clk_set_rate);
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 4+ messages in thread