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>
diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c
index 9541972..393c5a4 100644
--- a/board/friendlyarm/nanopi2/board.c
+++ b/board/friendlyarm/nanopi2/board.c
@@ -80,9 +80,9 @@
 
 #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 fb35663..56f0f2d 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 @@
 	/* 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)