summaryrefslogtreecommitdiff
path: root/board/friendlyarm
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-04 18:03:26 +0300
committerTom Rini <trini@konsulko.com>2022-12-23 18:07:03 +0300
commitb9d1f88b3aae10c15c0cd767acccc1026f5ef6d8 (patch)
tree07ba6f52b7f2a0f5b3105aede4e842bc7b525671 /board/friendlyarm
parent52d91e1c20b399ddab276e2c03e5788ed5e5fdd2 (diff)
downloadu-boot-b9d1f88b3aae10c15c0cd767acccc1026f5ef6d8.tar.xz
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>
Diffstat (limited to 'board/friendlyarm')
-rw-r--r--board/friendlyarm/nanopi2/board.c4
-rw-r--r--board/friendlyarm/nanopi2/onewire.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c
index 954197282e..393c5a447d 100644
--- a/board/friendlyarm/nanopi2/board.c
+++ b/board/friendlyarm/nanopi2/board.c
@@ -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
diff --git a/board/friendlyarm/nanopi2/onewire.c b/board/friendlyarm/nanopi2/onewire.c
index fb356639be..56f0f2dfce 100644
--- a/board/friendlyarm/nanopi2/onewire.c
+++ b/board/friendlyarm/nanopi2/onewire.c
@@ -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)