Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137283
b: refs/heads/master
c: 897dcde
h: refs/heads/master
i:
  137281: 408570a
  137279: ebec4c1
v: v3
  • Loading branch information
Russell King authored and Russell King committed Feb 8, 2009
1 parent 0c34fd7 commit 78ecaad
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 94 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: 548d849574847b788fe846fe21a41386063be161
refs/heads/master: 897dcded6fb6565f4d1c22a55d21f135403db132
3 changes: 0 additions & 3 deletions trunk/arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,6 @@ static int omap1_clk_enable_generic(struct clk *clk)
__u16 regval16;
__u32 regval32;

if (clk->flags & ALWAYS_ENABLED)
return 0;

if (unlikely(clk->enable_reg == NULL)) {
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
clk->name);
Expand Down
78 changes: 36 additions & 42 deletions trunk/arch/arm/mach-omap1/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ static struct mpu_rate rate_table[] = {

static struct clk ck_ref = {
.name = "ck_ref",
.ops = &clkops_generic,
.ops = &clkops_null,
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
CLOCK_IN_OMAP310,
};

static struct clk ck_dpll1 = {
.name = "ck_dpll1",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &ck_ref,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
CLOCK_IN_OMAP310 | RATE_PROPAGATES,
};

static struct arm_idlect1_clk ck_dpll1out = {
Expand Down Expand Up @@ -186,11 +186,10 @@ static struct clk sossi_ck = {

static struct clk arm_ck = {
.name = "arm_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES |
ALWAYS_ENABLED,
CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES,
.rate_offset = CKCTL_ARMDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
};
Expand Down Expand Up @@ -265,9 +264,9 @@ static struct arm_idlect1_clk armwdt_ck = {

static struct clk arminth_ck16xx = {
.name = "arminth_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &arm_ck,
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP16XX,
.recalc = &followparent_recalc,
/* Note: On 16xx the frequency can be divided by 2 by programming
* ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
Expand All @@ -290,10 +289,10 @@ static struct clk dsp_ck = {

static struct clk dspmmu_ck = {
.name = "dspmmu_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
RATE_CKCTL | ALWAYS_ENABLED,
RATE_CKCTL,
.rate_offset = CKCTL_DSPMMUDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
};
Expand Down Expand Up @@ -337,12 +336,12 @@ static struct clk dsptim_ck = {
static struct arm_idlect1_clk tc_ck = {
.clk = {
.name = "tc_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
RATE_CKCTL | RATE_PROPAGATES |
ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
CLOCK_IDLE_CONTROL,
.rate_offset = CKCTL_TCDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
},
Expand All @@ -351,10 +350,9 @@ static struct arm_idlect1_clk tc_ck = {

static struct clk arminth_ck1510 = {
.name = "arminth_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
.recalc = &followparent_recalc,
/* Note: On 1510 the frequency follows TC_CK
*
Expand All @@ -365,10 +363,9 @@ static struct clk arminth_ck1510 = {
static struct clk tipb_ck = {
/* No-idle controlled by "tc_ck" */
.name = "tipb_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
.recalc = &followparent_recalc,
};

Expand Down Expand Up @@ -406,18 +403,18 @@ static struct clk tc2_ck = {
static struct clk dma_ck = {
/* No-idle controlled by "tc_ck" */
.name = "dma_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
CLOCK_IN_OMAP310,
.recalc = &followparent_recalc,
};

static struct clk dma_lcdfree_ck = {
.name = "dma_lcdfree_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP16XX,
.recalc = &followparent_recalc,
};

Expand Down Expand Up @@ -451,17 +448,17 @@ static struct arm_idlect1_clk lb_ck = {

static struct clk rhea1_ck = {
.name = "rhea1_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP16XX,
.recalc = &followparent_recalc,
};

static struct clk rhea2_ck = {
.name = "rhea2_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
.flags = CLOCK_IN_OMAP16XX,
.recalc = &followparent_recalc,
};

Expand Down Expand Up @@ -493,13 +490,12 @@ static struct arm_idlect1_clk lcd_ck_1510 = {

static struct clk uart1_1510 = {
.name = "uart1_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
ENABLE_REG_32BIT | ALWAYS_ENABLED |
CLOCK_NO_IDLE_PARENT,
ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
Expand All @@ -523,13 +519,13 @@ static struct uart_clk uart1_16xx = {

static struct clk uart2_ck = {
.name = "uart2_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | ENABLE_REG_32BIT |
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
Expand All @@ -538,13 +534,12 @@ static struct clk uart2_ck = {

static struct clk uart3_1510 = {
.name = "uart3_ck",
.ops = &clkops_generic,
.ops = &clkops_null,
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
ENABLE_REG_32BIT | ALWAYS_ENABLED |
CLOCK_NO_IDLE_PARENT,
ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
Expand Down Expand Up @@ -680,9 +675,9 @@ static struct clk mmc2_ck = {

static struct clk virtual_ck_mpu = {
.name = "mpu",
.ops = &clkops_generic,
.ops = &clkops_null,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
CLOCK_IN_OMAP310,
.parent = &arm_ck, /* Is smarter alias for */
.recalc = &followparent_recalc,
.set_rate = &omap1_select_table_rate,
Expand All @@ -694,19 +689,18 @@ remains active during MPU idle whenever this is enabled */
static struct clk i2c_fck = {
.name = "i2c_fck",
.id = 1,
.ops = &clkops_generic,
.ops = &clkops_null,
.flags = CLOCK_IN_OMAP310 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
CLOCK_NO_IDLE_PARENT | ALWAYS_ENABLED,
CLOCK_NO_IDLE_PARENT,
.parent = &armxor_ck.clk,
.recalc = &followparent_recalc,
};

static struct clk i2c_ick = {
.name = "i2c_ick",
.id = 1,
.ops = &clkops_generic,
.flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT |
ALWAYS_ENABLED,
.ops = &clkops_null,
.flags = CLOCK_IN_OMAP16XX | CLOCK_NO_IDLE_PARENT,
.parent = &armper_ck.clk,
.recalc = &followparent_recalc,
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ int _omap2_clk_enable(struct clk *clk)
{
u32 regval32;

if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
if (clk->flags & PARENT_CONTROLS_CLOCK)
return 0;

if (clk->ops && clk->ops->enable)
Expand Down Expand Up @@ -301,7 +301,7 @@ void _omap2_clk_disable(struct clk *clk)
{
u32 regval32;

if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
if (clk->flags & PARENT_CONTROLS_CLOCK)
return;

if (clk->ops && clk->ops->disable) {
Expand Down
Loading

0 comments on commit 78ecaad

Please sign in to comment.