Commit e2415489 authored by Tomasz Figa's avatar Tomasz Figa

clocksource: samsung_pwm_timer: Do not request PWM mem region

PWM registers are shared between clocksource and PWM drivers and so can
not be claimed for exclusive use.
Signed-off-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: default avatarMark Brown <broonie@linaro.org>
Tested-by: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c095ba72
...@@ -404,7 +404,6 @@ void __init samsung_pwm_clocksource_init(void __iomem *base, ...@@ -404,7 +404,6 @@ void __init samsung_pwm_clocksource_init(void __iomem *base,
static void __init samsung_pwm_alloc(struct device_node *np, static void __init samsung_pwm_alloc(struct device_node *np,
const struct samsung_pwm_variant *variant) const struct samsung_pwm_variant *variant)
{ {
struct resource res;
struct property *prop; struct property *prop;
const __be32 *cur; const __be32 *cur;
u32 val; u32 val;
...@@ -423,17 +422,9 @@ static void __init samsung_pwm_alloc(struct device_node *np, ...@@ -423,17 +422,9 @@ static void __init samsung_pwm_alloc(struct device_node *np,
pwm.variant.output_mask |= 1 << val; pwm.variant.output_mask |= 1 << val;
} }
of_address_to_resource(np, 0, &res); pwm.base = of_iomap(np, 0);
if (!request_mem_region(res.start,
resource_size(&res), "samsung-pwm")) {
pr_err("%s: failed to request IO mem region\n", __func__);
return;
}
pwm.base = ioremap(res.start, resource_size(&res));
if (!pwm.base) { if (!pwm.base) {
pr_err("%s: failed to map PWM registers\n", __func__); pr_err("%s: failed to map PWM registers\n", __func__);
release_mem_region(res.start, resource_size(&res));
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment