* [PATCH 1/5] clk: tegra: Fix clock rate computation
@ 2013-11-18 15:11 Thierry Reding
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
To: Peter De Schrijver
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
The PLL output frequency is multiplied during the P-divider computation,
so it needs to be divided by the P-divider again before returning.
This fixes an issue where clk_round_rate() would return the multiplied
frequency instead of the real one after the P-divider.
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/clk/tegra/clk-pll.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 193457b81a90..7aec773a5ca6 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -441,6 +441,8 @@ static int _calc_rate(struct clk_hw *hw, struct tegra_clk_pll_freq_table *cfg,
return -EINVAL;
}
+ cfg->output_rate >>= p_div;
+
if (pll->params->pdiv_tohw) {
ret = _p_div_to_hw(hw, 1 << p_div);
if (ret < 0)
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] clk: tegra: Initialize DSI low-power clocks
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-18 15:11 ` Thierry Reding
2013-11-18 15:11 ` [PATCH 3/5] clk: tegra: add locking to periph clks Thierry Reding
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
To: Peter De Schrijver
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
The low-power DSI clocks are used during host-driven transactions on the
DSI bus. Documentation recommends that they be children of PLLP and run
at a frequency of at least 52 MHz.
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Note: The 68 MHz that they are configured to is what the downstream
kernel uses. It seems as good a default as any.
drivers/clk/tegra/clk-tegra114.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
index 9036a22ee5aa..ceb4477ec651 100644
--- a/drivers/clk/tegra/clk-tegra114.c
+++ b/drivers/clk/tegra/clk-tegra114.c
@@ -1305,6 +1305,8 @@ static struct tegra_clk_init_table init_table[] __initdata = {
{TEGRA114_CLK_DISP2, TEGRA114_CLK_PLL_P, 600000000, 0},
{TEGRA114_CLK_GR2D, TEGRA114_CLK_PLL_C2, 300000000, 0},
{TEGRA114_CLK_GR3D, TEGRA114_CLK_PLL_C2, 300000000, 0},
+ {TEGRA114_CLK_DSIALP, TEGRA114_CLK_PLL_P, 68000000, 0},
+ {TEGRA114_CLK_DSIBLP, TEGRA114_CLK_PLL_P, 68000000, 0},
/* This MUST be the last entry. */
{TEGRA114_CLK_CLK_MAX, TEGRA114_CLK_CLK_MAX, 0, 0},
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] clk: tegra: add locking to periph clks
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-18 15:11 ` [PATCH 2/5] clk: tegra: Initialize DSI low-power clocks Thierry Reding
@ 2013-11-18 15:11 ` Thierry Reding
2013-11-18 15:11 ` [PATCH 4/5] clk: tegra: add TEGRA_PERIPH_NO_GATE Thierry Reding
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
To: Peter De Schrijver
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
From: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tegra124 has periph clocks which share the hw register. Hence locking is
required.
Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/clk/tegra/clk-tegra-periph.c | 36 +++++++++++++++++++++---------------
drivers/clk/tegra/clk.h | 10 ++++++----
2 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c
index 9125d0234e39..18509821fdc4 100644
--- a/drivers/clk/tegra/clk-tegra-periph.c
+++ b/drivers/clk/tegra/clk-tegra-periph.c
@@ -132,69 +132,75 @@
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 8, 1, 0, \
- _clk_num, _gate_flags, _clk_id, _parents##_idx, 0)
+ _clk_num, _gate_flags, _clk_id, _parents##_idx, 0, \
+ NULL)
#define MUX_FLAGS(_name, _parents, _offset,\
_clk_num, _gate_flags, _clk_id, flags)\
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 8, 1, 0, _clk_num, \
- _gate_flags, _clk_id, _parents##_idx, flags)
+ _gate_flags, _clk_id, _parents##_idx, flags, NULL)
#define MUX8(_name, _parents, _offset, \
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
29, MASK(3), 0, 0, 8, 1, 0, _clk_num, \
- _gate_flags, _clk_id, _parents##_idx, 0)
+ _gate_flags, _clk_id, _parents##_idx, 0, NULL)
#define INT(_name, _parents, _offset, \
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 8, 1, TEGRA_DIVIDER_INT,\
- _clk_num, _gate_flags, _clk_id, _parents##_idx, 0)
+ _clk_num, _gate_flags, _clk_id, _parents##_idx, 0, \
+ NULL)
#define INT_FLAGS(_name, _parents, _offset,\
_clk_num, _gate_flags, _clk_id, flags)\
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 8, 1, TEGRA_DIVIDER_INT,\
- _clk_num, _gate_flags, _clk_id, _parents##_idx, flags)
+ _clk_num, _gate_flags, _clk_id, _parents##_idx, \
+ flags, NULL)
#define INT8(_name, _parents, _offset,\
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
29, MASK(3), 0, 0, 8, 1, TEGRA_DIVIDER_INT,\
- _clk_num, _gate_flags, _clk_id, _parents##_idx, 0)
+ _clk_num, _gate_flags, _clk_id, _parents##_idx, 0, \
+ NULL)
#define UART(_name, _parents, _offset,\
_clk_num, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 16, 1, TEGRA_DIVIDER_UART,\
- _clk_num, 0, _clk_id, _parents##_idx, 0)
+ _clk_num, 0, _clk_id, _parents##_idx, 0, NULL)
#define I2C(_name, _parents, _offset,\
_clk_num, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
30, MASK(2), 0, 0, 16, 0, 0, _clk_num, \
- 0, _clk_id, _parents##_idx, 0)
+ 0, _clk_id, _parents##_idx, 0, NULL)
#define XUSB(_name, _parents, _offset, \
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset, \
29, MASK(3), 0, 0, 8, 1, TEGRA_DIVIDER_INT,\
- _clk_num, _gate_flags, _clk_id, _parents##_idx, 0)
+ _clk_num, _gate_flags, _clk_id, _parents##_idx, 0, \
+ NULL)
#define AUDIO(_name, _offset, _clk_num,\
_gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, mux_d_audio_clk, \
_offset, 16, 0xE01F, 0, 0, 8, 1, 0, _clk_num, \
- _gate_flags , _clk_id, mux_d_audio_clk_idx, 0)
+ _gate_flags , _clk_id, mux_d_audio_clk_idx, 0, \
+ NULL)
#define NODIV(_name, _parents, _offset, \
_mux_shift, _mux_mask, _clk_num, \
- _gate_flags, _clk_id) \
+ _gate_flags, _clk_id, _lock) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
_mux_shift, _mux_mask, 0, 0, 0, 0, 0,\
_clk_num, (_gate_flags) | TEGRA_PERIPH_NO_DIV,\
- _clk_id, _parents##_idx, 0)
+ _clk_id, _parents##_idx, 0, _lock)
#define GATE(_name, _parent_name, \
_clk_num, _gate_flags, _clk_id, _flags) \
@@ -203,7 +209,7 @@
.clk_id = _clk_id, \
.p.parent_name = _parent_name, \
.periph = TEGRA_CLK_PERIPH(0, 0, 0, 0, 0, 0, 0, \
- _clk_num, _gate_flags, 0), \
+ _clk_num, _gate_flags, 0, NULL), \
.flags = _flags \
}
@@ -456,8 +462,8 @@ static struct tegra_periph_init_data periph_clks[] = {
MUX8("clk72mhz", mux_pllp3_pllc_clkm, CLK_SOURCE_CLK72MHZ, 177, TEGRA_PERIPH_NO_RESET, tegra_clk_clk72Mhz),
MUX8("sor0", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_SOR0, 182, 0, tegra_clk_sor0),
MUX_FLAGS("csite", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_CSITE, 73, TEGRA_PERIPH_ON_APB, tegra_clk_csite, CLK_IGNORE_UNUSED),
- NODIV("disp1", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP1, 29, 7, 27, 0, tegra_clk_disp1),
- NODIV("disp2", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP2, 29, 7, 26, 0, tegra_clk_disp2),
+ NODIV("disp1", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP1, 29, 7, 27, 0, tegra_clk_disp1, NULL),
+ NODIV("disp2", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP2, 29, 7, 26, 0, tegra_clk_disp2, NULL),
UART("uarta", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTA, 6, tegra_clk_uarta),
UART("uartb", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTB, 7, tegra_clk_uartb),
UART("uartc", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTC, 55, tegra_clk_uartc),
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index 7f110acfe2a1..f984ebed9f1f 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -439,19 +439,21 @@ struct clk *tegra_clk_register_periph_nodiv(const char *name,
#define TEGRA_CLK_PERIPH(_mux_shift, _mux_mask, _mux_flags, \
_div_shift, _div_width, _div_frac_width, \
_div_flags, _clk_num,\
- _gate_flags, _table) \
+ _gate_flags, _table, _lock) \
{ \
.mux = { \
.flags = _mux_flags, \
.shift = _mux_shift, \
.mask = _mux_mask, \
.table = _table, \
+ .lock = _lock, \
}, \
.divider = { \
.flags = _div_flags, \
.shift = _div_shift, \
.width = _div_width, \
.frac_width = _div_frac_width, \
+ .lock = _lock, \
}, \
.gate = { \
.flags = _gate_flags, \
@@ -481,7 +483,7 @@ struct tegra_periph_init_data {
_mux_shift, _mux_mask, _mux_flags, _div_shift, \
_div_width, _div_frac_width, _div_flags, \
_clk_num, _gate_flags, _clk_id, _table, \
- _flags) \
+ _flags, _lock) \
{ \
.name = _name, \
.clk_id = _clk_id, \
@@ -491,7 +493,7 @@ struct tegra_periph_init_data {
_mux_flags, _div_shift, \
_div_width, _div_frac_width, \
_div_flags, _clk_num, \
- _gate_flags, _table), \
+ _gate_flags, _table, _lock), \
.offset = _offset, \
.con_id = _con_id, \
.dev_id = _dev_id, \
@@ -506,7 +508,7 @@ struct tegra_periph_init_data {
_mux_shift, BIT(_mux_width) - 1, _mux_flags, \
_div_shift, _div_width, _div_frac_width, _div_flags, \
_clk_num, _gate_flags, _clk_id,\
- NULL, 0)
+ NULL, 0, NULL)
/**
* struct clk_super_mux - super clock
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] clk: tegra: add TEGRA_PERIPH_NO_GATE
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-18 15:11 ` [PATCH 2/5] clk: tegra: Initialize DSI low-power clocks Thierry Reding
2013-11-18 15:11 ` [PATCH 3/5] clk: tegra: add locking to periph clks Thierry Reding
@ 2013-11-18 15:11 ` Thierry Reding
2013-11-18 15:11 ` [PATCH 5/5] clk: tegra: rework sor0 clock for Tegra124 Thierry Reding
2013-11-25 14:09 ` [PATCH 1/5] clk: tegra: Fix clock rate computation Peter De Schrijver
4 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
To: Peter De Schrijver
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
From: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tegra124 has a clock which consists of a mux and a fractional divider.
Add support for this.
Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/clk/tegra/clk-periph.c | 18 +++++++++++++++---
drivers/clk/tegra/clk-tegra-periph.c | 6 ++++++
drivers/clk/tegra/clk.h | 1 +
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c
index b5feccca2f1e..d62b396863c1 100644
--- a/drivers/clk/tegra/clk-periph.c
+++ b/drivers/clk/tegra/clk-periph.c
@@ -170,6 +170,14 @@ const struct clk_ops tegra_clk_periph_nodiv_ops = {
.disable = clk_periph_disable,
};
+const struct clk_ops tegra_clk_periph_no_gate_ops = {
+ .get_parent = clk_periph_get_parent,
+ .set_parent = clk_periph_set_parent,
+ .recalc_rate = clk_periph_recalc_rate,
+ .round_rate = clk_periph_round_rate,
+ .set_rate = clk_periph_set_rate,
+};
+
static struct clk *_tegra_clk_register_periph(const char *name,
const char **parent_names, int num_parents,
struct tegra_clk_periph *periph,
@@ -181,11 +189,15 @@ static struct clk *_tegra_clk_register_periph(const char *name,
struct tegra_clk_periph_regs *bank;
bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV);
- flags |= periph->gate.flags & TEGRA_PERIPH_NO_DIV ?
- CLK_SET_RATE_PARENT : 0;
+ if (periph->gate.flags & TEGRA_PERIPH_NO_DIV) {
+ flags |= CLK_SET_RATE_PARENT;
+ init.ops = &tegra_clk_periph_nodiv_ops;
+ } else if (periph->gate.flags & TEGRA_PERIPH_NO_GATE)
+ init.ops = &tegra_clk_periph_no_gate_ops;
+ else
+ init.ops = &tegra_clk_periph_ops;
init.name = name;
- init.ops = div ? &tegra_clk_periph_ops : &tegra_clk_periph_nodiv_ops;
init.flags = flags;
init.parent_names = parent_names;
init.num_parents = num_parents;
diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c
index 18509821fdc4..d3978e734ad6 100644
--- a/drivers/clk/tegra/clk-tegra-periph.c
+++ b/drivers/clk/tegra/clk-tegra-periph.c
@@ -147,6 +147,12 @@
29, MASK(3), 0, 0, 8, 1, 0, _clk_num, \
_gate_flags, _clk_id, _parents##_idx, 0, NULL)
+#define MUX8_NOGATE_LOCK(_name, _parents, _offset, _clk_id, _lock) \
+ TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset, \
+ 29, MASK(3), 0, 0, 8, 1, 0, 0, \
+ TEGRA_PERIPH_NO_GATE, _clk_id, \
+ _parents##_idx, 0, _lock)
+
#define INT(_name, _parents, _offset, \
_clk_num, _gate_flags, _clk_id) \
TEGRA_INIT_DATA_TABLE(_name, NULL, NULL, _parents, _offset,\
diff --git a/drivers/clk/tegra/clk.h b/drivers/clk/tegra/clk.h
index f984ebed9f1f..40fb011233c0 100644
--- a/drivers/clk/tegra/clk.h
+++ b/drivers/clk/tegra/clk.h
@@ -391,6 +391,7 @@ struct tegra_clk_periph_gate {
#define TEGRA_PERIPH_ON_APB BIT(2)
#define TEGRA_PERIPH_WAR_1005168 BIT(3)
#define TEGRA_PERIPH_NO_DIV BIT(4)
+#define TEGRA_PERIPH_NO_GATE BIT(5)
void tegra_periph_reset(struct tegra_clk_periph_gate *gate, bool assert);
extern const struct clk_ops tegra_clk_periph_gate_ops;
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] clk: tegra: rework sor0 clock for Tegra124
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2013-11-18 15:11 ` [PATCH 4/5] clk: tegra: add TEGRA_PERIPH_NO_GATE Thierry Reding
@ 2013-11-18 15:11 ` Thierry Reding
2013-11-25 14:09 ` [PATCH 1/5] clk: tegra: Fix clock rate computation Peter De Schrijver
4 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
To: Peter De Schrijver
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
From: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Rework the sor0 clock as 2 clocks: sor0, which comprises the 2nd level
mux and the gate and sor0_lvds which comprises the 1st level mux and the
fractional divider.
Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/clk/tegra/clk-id.h | 1 +
drivers/clk/tegra/clk-tegra-periph.c | 10 +++++++++-
drivers/clk/tegra/clk-tegra124.c | 1 +
include/dt-bindings/clock/tegra124-car.h | 3 ++-
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/tegra/clk-id.h b/drivers/clk/tegra/clk-id.h
index 836b0545fd17..0273ef43ff6c 100644
--- a/drivers/clk/tegra/clk-id.h
+++ b/drivers/clk/tegra/clk-id.h
@@ -186,6 +186,7 @@ enum clk_id {
tegra_clk_se,
tegra_clk_soc_therm,
tegra_clk_sor0,
+ tegra_clk_sor0_lvds,
tegra_clk_spdif,
tegra_clk_spdif_2x,
tegra_clk_spdif_in,
diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c
index d3978e734ad6..4e81df1a0f2a 100644
--- a/drivers/clk/tegra/clk-tegra-periph.c
+++ b/drivers/clk/tegra/clk-tegra-periph.c
@@ -231,6 +231,7 @@
static DEFINE_SPINLOCK(PLLP_OUTA_lock);
static DEFINE_SPINLOCK(PLLP_OUTB_lock);
static DEFINE_SPINLOCK(PLLP_OUTC_lock);
+static DEFINE_SPINLOCK(sor0_lock);
#define MUX_I2S_SPDIF(_id) \
static const char *mux_pllaout0_##_id##_2x_pllp_clkm[] = { "pll_a_out0", \
@@ -371,6 +372,12 @@ static u32 mux_pllm_pllc_pllp_plla_pllc2_c3_clkm_idx[] = {
[0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 6,
};
+static const char *mux_clkm_plldp_sor0lvds[] = {
+ "clk_m", "pll_dp", "sor0_lvds",
+};
+
+#define mux_clkm_plldp_sor0lvds_idx NULL
+
static struct tegra_periph_init_data periph_clks[] = {
AUDIO("d_audio", CLK_SOURCE_D_AUDIO, 106, TEGRA_PERIPH_ON_APB, tegra_clk_d_audio),
AUDIO("dam0", CLK_SOURCE_DAM0, 108, TEGRA_PERIPH_ON_APB, tegra_clk_dam0),
@@ -466,10 +473,11 @@ static struct tegra_periph_init_data periph_clks[] = {
MUX8("entropy", mux_pllp_clkm1, CLK_SOURCE_ENTROPY, 149, 0, tegra_clk_entropy),
MUX8("hdmi_audio", mux_pllp3_pllc_clkm, CLK_SOURCE_HDMI_AUDIO, 176, TEGRA_PERIPH_NO_RESET, tegra_clk_hdmi_audio),
MUX8("clk72mhz", mux_pllp3_pllc_clkm, CLK_SOURCE_CLK72MHZ, 177, TEGRA_PERIPH_NO_RESET, tegra_clk_clk72Mhz),
- MUX8("sor0", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_SOR0, 182, 0, tegra_clk_sor0),
+ MUX8_NOGATE_LOCK("sor0_lvds", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_SOR0, tegra_clk_sor0_lvds, &sor0_lock),
MUX_FLAGS("csite", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_CSITE, 73, TEGRA_PERIPH_ON_APB, tegra_clk_csite, CLK_IGNORE_UNUSED),
NODIV("disp1", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP1, 29, 7, 27, 0, tegra_clk_disp1, NULL),
NODIV("disp2", mux_pllp_pllm_plld_plla_pllc_plld2_clkm, CLK_SOURCE_DISP2, 29, 7, 26, 0, tegra_clk_disp2, NULL),
+ NODIV("sor0", mux_clkm_plldp_sor0lvds, CLK_SOURCE_SOR0, 14, 3, 182, 0, tegra_clk_sor0, &sor0_lock),
UART("uarta", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTA, 6, tegra_clk_uarta),
UART("uartb", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTB, 7, tegra_clk_uartb),
UART("uartc", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_UARTC, 55, tegra_clk_uartc),
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c
index 266e80b51d38..97e1eef8c1c7 100644
--- a/drivers/clk/tegra/clk-tegra124.c
+++ b/drivers/clk/tegra/clk-tegra124.c
@@ -857,6 +857,7 @@ static struct tegra_clk tegra124_clks[tegra_clk_max] __initdata = {
[tegra_clk_adx1] = { .dt_id = TEGRA124_CLK_ADX1, .present = true },
[tegra_clk_dpaux] = { .dt_id = TEGRA124_CLK_DPAUX, .present = true },
[tegra_clk_sor0] = { .dt_id = TEGRA124_CLK_SOR0, .present = true },
+ [tegra_clk_sor0_lvds] = { .dt_id = TEGRA124_CLK_SOR0_LVDS, .present = true },
[tegra_clk_gpu] = { .dt_id = TEGRA124_CLK_GPU, .present = true },
[tegra_clk_amx1] = { .dt_id = TEGRA124_CLK_AMX1, .present = true },
[tegra_clk_uartb] = { .dt_id = TEGRA124_CLK_UARTB, .present = true },
diff --git a/include/dt-bindings/clock/tegra124-car.h b/include/dt-bindings/clock/tegra124-car.h
index 855d94d18506..a1116a3b54ef 100644
--- a/include/dt-bindings/clock/tegra124-car.h
+++ b/include/dt-bindings/clock/tegra124-car.h
@@ -335,6 +335,7 @@
#define TEGRA124_CLK_CLK_OUT_3_MUX 308
#define TEGRA124_CLK_DSIA_MUX 309
#define TEGRA124_CLK_DSIB_MUX 310
-#define TEGRA124_CLK_CLK_MAX 311
+#define TEGRA124_CLK_SOR0_LVDS 311
+#define TEGRA124_CLK_CLK_MAX 312
#endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_H */
--
1.8.4.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/5] clk: tegra: Fix clock rate computation
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
` (3 preceding siblings ...)
2013-11-18 15:11 ` [PATCH 5/5] clk: tegra: rework sor0 clock for Tegra124 Thierry Reding
@ 2013-11-25 14:09 ` Peter De Schrijver
[not found] ` <20131125140910.GI26617-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
4 siblings, 1 reply; 7+ messages in thread
From: Peter De Schrijver @ 2013-11-25 14:09 UTC (permalink / raw)
To: Thierry Reding
Cc: Mike Turquette, Stephen Warren,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Mon, Nov 18, 2013 at 04:11:35PM +0100, Thierry Reding wrote:
> The PLL output frequency is multiplied during the P-divider computation,
> so it needs to be divided by the P-divider again before returning.
>
> This fixes an issue where clk_round_rate() would return the multiplied
> frequency instead of the real one after the P-divider.
>
Series Acked-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
I will squash the Tegra124 fixes in the Tegra124 series.
Cheers,
Peter.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/5] clk: tegra: Fix clock rate computation
[not found] ` <20131125140910.GI26617-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
@ 2013-11-25 17:16 ` Stephen Warren
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2013-11-25 17:16 UTC (permalink / raw)
To: Peter De Schrijver, Thierry Reding
Cc: Mike Turquette,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 11/25/2013 07:09 AM, Peter De Schrijver wrote:
> On Mon, Nov 18, 2013 at 04:11:35PM +0100, Thierry Reding wrote:
>> The PLL output frequency is multiplied during the P-divider computation,
>> so it needs to be divided by the P-divider again before returning.
>>
>> This fixes an issue where clk_round_rate() would return the multiplied
>> frequency instead of the real one after the P-divider.
>>
>
> Series Acked-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> I will squash the Tegra124 fixes in the Tegra124 series.
BTW, as a maintainer of some code, you usually do one of:
a) Apply the patch yourself.
b) Ack the patch for someone else to apply.
It's unusual to do both, unless there's some confusion which tree the
patch will go through, so you do e.g. (b) first then later find out that
(a) was more correct, or vice-versa.
Also, in the past I've been asked to make sure that all ARM-related
patches go to the main ARM list as well as the Tegra-specific list, to
make sure they get full visibility.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-25 17:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18 15:11 [PATCH 1/5] clk: tegra: Fix clock rate computation Thierry Reding
[not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-18 15:11 ` [PATCH 2/5] clk: tegra: Initialize DSI low-power clocks Thierry Reding
2013-11-18 15:11 ` [PATCH 3/5] clk: tegra: add locking to periph clks Thierry Reding
2013-11-18 15:11 ` [PATCH 4/5] clk: tegra: add TEGRA_PERIPH_NO_GATE Thierry Reding
2013-11-18 15:11 ` [PATCH 5/5] clk: tegra: rework sor0 clock for Tegra124 Thierry Reding
2013-11-25 14:09 ` [PATCH 1/5] clk: tegra: Fix clock rate computation Peter De Schrijver
[not found] ` <20131125140910.GI26617-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2013-11-25 17:16 ` Stephen Warren
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).