Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105117
b: refs/heads/master
c: 3c85bce
h: refs/heads/master
i:
  105115: 5cd752e
v: v3
  • Loading branch information
Mike Rapoport authored and Russell King committed Jul 9, 2008
1 parent 205ccca commit aec168f
Show file tree
Hide file tree
Showing 8 changed files with 330 additions and 159 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: 13f7558237ed841b19f11e0920c01c4d6d50fcc5
refs/heads/master: 3c85bce6f820258b49bb74c53d2f47c058199f1b
2 changes: 1 addition & 1 deletion trunk/arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
if (!sachip)
return -ENOMEM;

sachip->clk = clk_get(me, "SA1111_CLK");
sachip->clk = clk_get(me, "GPIO27_CLK");
if (!sachip->clk) {
ret = PTR_ERR(sachip->clk);
goto err_free;
Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/arm/mach-pxa/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ unsigned long clk_get_rate(struct clk *clk)
EXPORT_SYMBOL(clk_get_rate);


static void clk_gpio27_enable(struct clk *clk)
{
pxa_gpio_mode(GPIO11_3_6MHz_MD);
}

static void clk_gpio27_disable(struct clk *clk)
{
}

static const struct clkops clk_gpio27_ops = {
.enable = clk_gpio27_enable,
.disable = clk_gpio27_disable,
};


void clk_cken_enable(struct clk *clk)
{
CKEN |= 1 << clk->cken;
Expand All @@ -116,6 +131,14 @@ const struct clkops clk_cken_ops = {
.disable = clk_cken_disable,
};

static struct clk common_clks[] = {
{
.name = "GPIO27_CLK",
.ops = &clk_gpio27_ops,
.rate = 3686400,
},
};

void clks_register(struct clk *clks, size_t num)
{
int i;
Expand All @@ -125,3 +148,10 @@ void clks_register(struct clk *clks, size_t num)
list_add(&clks[i].node, &clocks);
mutex_unlock(&clocks_mutex);
}

static int __init clk_init(void)
{
clks_register(common_clks, ARRAY_SIZE(common_clks));
return 0;
}
arch_initcall(clk_init);
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-pxa/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ struct clk {
.other = _other, \
}

#define INIT_CLK(_name, _ops, _rate, _delay, _dev) \
{ \
.name = _name, \
.dev = _dev, \
.ops = _ops, \
.rate = _rate, \
.delay = _delay, \
}

extern const struct clkops clk_cken_ops;

void clk_cken_enable(struct clk *clk);
Expand Down
Loading

0 comments on commit aec168f

Please sign in to comment.