Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281650
b: refs/heads/master
c: 742face
h: refs/heads/master
v: v3
  • Loading branch information
Peter De Schrijver authored and Olof Johansson committed Dec 18, 2011
1 parent b74058b commit 32d76ef
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2bbbc4d5bfde68d4a2b45ee8592d012826ffa70
refs/heads/master: 742face03f57727b5a86d0df631e47a1ef0498d2
20 changes: 4 additions & 16 deletions trunk/arch/arm/mach-tegra/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,15 @@ EXPORT_SYMBOL(tegra_clk_init_from_table);

void tegra_periph_reset_deassert(struct clk *c)
{
tegra2_periph_reset_deassert(c);
BUG_ON(!c->ops->reset);
c->ops->reset(c, false);
}
EXPORT_SYMBOL(tegra_periph_reset_deassert);

void tegra_periph_reset_assert(struct clk *c)
{
tegra2_periph_reset_assert(c);
BUG_ON(!c->ops->reset);
c->ops->reset(c, true);
}
EXPORT_SYMBOL(tegra_periph_reset_assert);

Expand All @@ -402,20 +404,6 @@ void __init tegra_init_clock(void)
tegra2_init_clocks();
}

/*
* The SDMMC controllers have extra bits in the clock source register that
* adjust the delay between the clock and data to compenstate for delays
* on the PCB.
*/
void tegra_sdmmc_tap_delay(struct clk *c, int delay)
{
unsigned long flags;

spin_lock_irqsave(&c->spinlock, flags);
tegra2_sdmmc_tap_delay(c, delay);
spin_unlock_irqrestore(&c->spinlock, flags);
}

#ifdef CONFIG_DEBUG_FS

static int __clk_lock_all_spinlocks(void)
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-tegra/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,12 @@ struct tegra_clk_init_table {
};

void tegra2_init_clocks(void);
void tegra2_periph_reset_deassert(struct clk *c);
void tegra2_periph_reset_assert(struct clk *c);
void clk_init(struct clk *clk);
struct clk *tegra_get_clock_by_name(const char *name);
unsigned long clk_measure_input_freq(void);
int clk_reparent(struct clk *c, struct clk *parent);
void tegra_clk_init_from_table(struct tegra_clk_init_table *table);
unsigned long clk_get_rate_locked(struct clk *c);
int clk_set_rate_locked(struct clk *c, unsigned long rate);
void tegra2_sdmmc_tap_delay(struct clk *c, int delay);

#endif
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-tegra/include/mach/clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ void tegra_periph_reset_deassert(struct clk *c);
void tegra_periph_reset_assert(struct clk *c);

unsigned long clk_get_rate_all_locked(struct clk *c);
void tegra_sdmmc_tap_delay(struct clk *c, int delay);
void tegra2_sdmmc_tap_delay(struct clk *c, int delay);

#endif
17 changes: 5 additions & 12 deletions trunk/arch/arm/mach-tegra/tegra2_clocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,6 @@ static struct clk_ops tegra_clk_m_ops = {
.disable = tegra2_clk_m_disable,
};

void tegra2_periph_reset_assert(struct clk *c)
{
BUG_ON(!c->ops->reset);
c->ops->reset(c, true);
}

void tegra2_periph_reset_deassert(struct clk *c)
{
BUG_ON(!c->ops->reset);
c->ops->reset(c, false);
}

/* super clock functions */
/* "super clocks" on tegra have two-stage muxes and a clock skipping
* super divider. We will ignore the clock skipping divider, since we
Expand Down Expand Up @@ -1132,13 +1120,18 @@ static struct clk_ops tegra_periph_clk_ops = {
void tegra2_sdmmc_tap_delay(struct clk *c, int delay)
{
u32 reg;
unsigned long flags;

spin_lock_irqsave(&c->spinlock, flags);

delay = clamp(delay, 0, 15);
reg = clk_readl(c->reg);
reg &= ~SDMMC_CLK_INT_FB_DLY_MASK;
reg |= SDMMC_CLK_INT_FB_SEL;
reg |= delay << SDMMC_CLK_INT_FB_DLY_SHIFT;
clk_writel(reg, c->reg);

spin_unlock_irqrestore(&c->spinlock, flags);
}

/* External memory controller clock ops */
Expand Down

0 comments on commit 32d76ef

Please sign in to comment.