Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105116
b: refs/heads/master
c: 13f7558
h: refs/heads/master
v: v3
  • Loading branch information
Ian Molton committed Jul 10, 2008
1 parent 5cd752e commit 205ccca
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 35 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: ed847782f6459a5c94aa0c9f93679f6a4176a47a
refs/heads/master: 13f7558237ed841b19f11e0920c01c4d6d50fcc5
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, "GPIO27_CLK");
sachip->clk = clk_get(me, "SA1111_CLK");
if (!sachip->clk) {
ret = PTR_ERR(sachip->clk);
goto err_free;
Expand Down
30 changes: 0 additions & 30 deletions trunk/arch/arm/mach-pxa/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,6 @@ 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 @@ -131,14 +116,6 @@ 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 @@ -148,10 +125,3 @@ 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);
31 changes: 29 additions & 2 deletions trunk/arch/arm/mach-pxa/pxa25x.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,29 @@ static const struct clkops clk_pxa25x_gpio12_ops = {
.disable = clk_gpio12_disable,
};

static unsigned long gpio11_config_3m6[] = {
GPIO11_3_6MHz,
};

static unsigned long gpio11_config_gpio[] = {
GPIO11_GPIO,
};

static void clk_gpio11_enable(struct clk *clk)
{
pxa2xx_mfp_config(gpio11_config_3m6, 1);
}

static void clk_gpio11_disable(struct clk *clk)
{
pxa2xx_mfp_config(gpio11_config_gpio, 1);
}

static const struct clkops clk_pxa25x_gpio11_ops = {
.enable = clk_gpio11_enable,
.disable = clk_gpio11_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 @@ -151,6 +174,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("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL),
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 All @@ -169,7 +193,10 @@ static struct clk pxa25x_clks[] = {
INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
};

static struct clk gpio7_clk = INIT_CKOTHER("GPIO7_CK", &pxa25x_clks[4], NULL);
static struct clk pxa2xx_clk_aliases[] = {
INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL),
INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL),
};

#ifdef CONFIG_PM

Expand Down Expand Up @@ -344,7 +371,7 @@ static int __init pxa25x_init(void)
if (cpu_is_pxa255())
ret = platform_device_register(&pxa_device_hwuart);

clks_register(&gpio7_clk, 1);
clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases));

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-sa1100/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void clk_gpio27_disable(void)
}

static struct clk clk_gpio27 = {
.name = "GPIO27_CLK",
.name = "SA1111_CLK",
.rate = 3686400,
.enable = clk_gpio27_enable,
.disable = clk_gpio27_disable,
Expand Down

0 comments on commit 205ccca

Please sign in to comment.