Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372377
b: refs/heads/master
c: fdcccbd
h: refs/heads/master
i:
  372375: f992e82
v: v3
  • Loading branch information
Peter De Schrijver authored and Stephen Warren committed Apr 4, 2013
1 parent 1ff3894 commit 160f48e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a26a029893096204f08a3ff5e262f99e1a75e273
refs/heads/master: fdcccbd804088eb96881c9f6532de04868f9dbc1
9 changes: 9 additions & 0 deletions trunk/drivers/clk/tegra/clk-periph-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ static DEFINE_SPINLOCK(periph_ref_lock);

#define periph_clk_to_bit(gate) (1 << (gate->clk_num % 32))

#define LVL2_CLK_GATE_OVRE 0x554

/* Peripheral gate clock ops */
static int clk_periph_is_enabled(struct clk_hw *hw)
{
Expand Down Expand Up @@ -83,6 +85,13 @@ static int clk_periph_enable(struct clk_hw *hw)
}
}

if (gate->flags & TEGRA_PERIPH_WAR_1005168) {
writel_relaxed(0, gate->clk_base + LVL2_CLK_GATE_OVRE);
writel_relaxed(BIT(22), gate->clk_base + LVL2_CLK_GATE_OVRE);
udelay(1);
writel_relaxed(0, gate->clk_base + LVL2_CLK_GATE_OVRE);
}

spin_unlock_irqrestore(&periph_ref_lock, flags);

return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/clk/tegra/clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ struct tegra_clk_periph_regs {
* TEGRA_PERIPH_ON_APB - If peripheral is in the APB bus then read the
* bus to flush the write operation in apb bus. This flag indicates
* that this peripheral is in apb bus.
* TEGRA_PERIPH_WAR_1005168 - Apply workaround for Tegra114 MSENC bug
*/
struct tegra_clk_periph_gate {
u32 magic;
Expand All @@ -377,6 +378,7 @@ struct tegra_clk_periph_gate {
#define TEGRA_PERIPH_NO_RESET BIT(0)
#define TEGRA_PERIPH_MANUAL_RESET BIT(1)
#define TEGRA_PERIPH_ON_APB BIT(2)
#define TEGRA_PERIPH_WAR_1005168 BIT(3)

void tegra_periph_reset(struct tegra_clk_periph_gate *gate, bool assert);
extern const struct clk_ops tegra_clk_periph_gate_ops;
Expand Down

0 comments on commit 160f48e

Please sign in to comment.