Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105115
b: refs/heads/master
c: ed84778
h: refs/heads/master
i:
  105113: 183c75e
  105111: 86ba5c3
v: v3
  • Loading branch information
Ian Molton committed Jul 10, 2008
1 parent 776760d commit 5cd752e
Show file tree
Hide file tree
Showing 3 changed files with 34 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: aa9ae8eb1a917c8794bceef0a8e6ff1f4d7c46de
refs/heads/master: ed847782f6459a5c94aa0c9f93679f6a4176a47a
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-pxa/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ 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
24 changes: 24 additions & 0 deletions trunk/arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,29 @@ static const struct clkops clk_pxa25x_lcd_ops = {
.getrate = clk_pxa25x_lcd_getrate,
};

static unsigned long gpio12_config_32k[] = {
GPIO12_32KHz,
};

static unsigned long gpio12_config_gpio[] = {
GPIO12_GPIO,
};

static void clk_gpio12_enable(struct clk *clk)
{
pxa2xx_mfp_config(gpio12_config_32k, 1);
}

static void clk_gpio12_disable(struct clk *clk)
{
pxa2xx_mfp_config(gpio12_config_gpio, 1);
}

static const struct clkops clk_pxa25x_gpio12_ops = {
.enable = clk_gpio12_enable,
.disable = clk_gpio12_disable,
};

/*
* 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz)
* 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
Expand All @@ -128,6 +151,7 @@ static struct clk pxa25x_clks[] = {
INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev),
INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL),
INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),

Expand Down

0 comments on commit 5cd752e

Please sign in to comment.