Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374224
b: refs/heads/master
c: f9bb48a
h: refs/heads/master
v: v3
  • Loading branch information
Tomasz Figa authored and Olof Johansson committed Apr 28, 2013
1 parent 7d234c2 commit e589bca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 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: 09d718a78c79ddc270dccbfa1b1070b20b9a9ae1
refs/heads/master: f9bb48a2c25a96757d13795ba7cc52687f94446f
1 change: 0 additions & 1 deletion trunk/drivers/clocksource/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ config CLKSRC_METAG_GENERIC

config CLKSRC_SAMSUNG_PWM
bool
depends on OF
select CLKSRC_MMIO
help
This is a new clocksource driver for the PWM timer found in
Expand Down
16 changes: 14 additions & 2 deletions trunk/drivers/clocksource/samsung_pwm_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static void __init samsung_timer_resources(void)
/*
* PWM master driver
*/
static void __init samsung_pwm_clocksource_init(void)
static void __init _samsung_pwm_clocksource_init(void)
{
u8 mask;
int channel;
Expand All @@ -378,6 +378,17 @@ static void __init samsung_pwm_clocksource_init(void)
samsung_clocksource_init();
}

void __init samsung_pwm_clocksource_init(void __iomem *base,
unsigned int *irqs, struct samsung_pwm_variant *variant)
{
pwm.base = base;
memcpy(&pwm.variant, variant, sizeof(pwm.variant));
memcpy(pwm.irq, irqs, SAMSUNG_PWM_NUM * sizeof(*irqs));

_samsung_pwm_clocksource_init();
}

#ifdef CONFIG_CLKSRC_OF
static void __init samsung_pwm_alloc(struct device_node *np,
const struct samsung_pwm_variant *variant)
{
Expand Down Expand Up @@ -414,7 +425,7 @@ static void __init samsung_pwm_alloc(struct device_node *np,
return;
}

samsung_pwm_clocksource_init();
_samsung_pwm_clocksource_init();
}

static const struct samsung_pwm_variant s3c24xx_variant = {
Expand Down Expand Up @@ -468,3 +479,4 @@ static void __init s5p_pwm_clocksource_init(struct device_node *np)
samsung_pwm_alloc(np, &s5p_variant);
}
CLOCKSOURCE_OF_DECLARE(s5pc100_pwm, "samsung,s5pc100-pwm", s5p_pwm_clocksource_init);
#endif
3 changes: 3 additions & 0 deletions trunk/include/clocksource/samsung_pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ struct samsung_pwm_variant {
bool has_tint_cstat;
};

void samsung_pwm_clocksource_init(void __iomem *base,
unsigned int *irqs, struct samsung_pwm_variant *variant);

#endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */

0 comments on commit e589bca

Please sign in to comment.