exynos: Rework legacy PWM usage
The way that the timer support is currently done for exynos/nexell platforms relies on the legacy PWM infrastructure, and that needs to be updated. However, we really cannot safely undef CONFIG_DM_PWM to build the timer.c file without warnings. For now, rename the relevant legacy functions to be prefixed with s5p_ and add prototypes to the arch pwm.h files. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Dzmitry Sankouski <dsankouski@gmail.com> Cc: Stefan Bosch <stefan_b@posteo.net> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -80,9 +80,9 @@ static void bd_backlight_on(void)
|
||||
|
||||
#elif defined(BACKLIGHT_CH)
|
||||
/* pwm backlight ON: HIGH, ON: LOW */
|
||||
pwm_init(BACKLIGHT_CH,
|
||||
s5p_pwm_init(BACKLIGHT_CH,
|
||||
BACKLIGHT_DIV, BACKLIGHT_INV);
|
||||
pwm_config(BACKLIGHT_CH,
|
||||
s5p_pwm_config(BACKLIGHT_CH,
|
||||
TO_DUTY_NS(BACKLIGHT_DUTY, BACKLIGHT_HZ),
|
||||
TO_PERIOD_NS(BACKLIGHT_HZ));
|
||||
#endif
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <errno.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/clk.h>
|
||||
#include <asm/arch/pwm.h>
|
||||
#include <i2c.h>
|
||||
#include <pwm.h>
|
||||
|
||||
#include <irq_func.h>
|
||||
|
||||
@@ -102,7 +102,7 @@ static int onewire_init_timer(void)
|
||||
/* range: 1080~1970 */
|
||||
period_ns -= 1525;
|
||||
|
||||
return pwm_config(PWM_CH, period_ns >> 1, period_ns);
|
||||
return s5p_pwm_config(PWM_CH, period_ns >> 1, period_ns);
|
||||
}
|
||||
|
||||
static void wait_one_tick(void)
|
||||
|
||||
Reference in New Issue
Block a user