summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2013-07-30 13:38:13 -0700
committerPatrick Georgi <patrick@georgi-clan.de>2013-12-21 10:48:40 +0100
commit9a9d7e8ad049041bec21b29180e2dc94d8ef37e2 (patch)
tree367ac9c3a1dac9582f4502c3d4042f8b5f029f05
parentc0f82d222294b339582a5b15aadccab2933364c4 (diff)
exynos5250: Fix consts in the pwm code
The code generally intended to make the pointer const instead of the thing it pointed at, but it had const backwards. Sometimes both the pointer and the data could be const, but sometimes there were writes where only the pointer should be. Change-Id: Ifcd5495769b86b47d7b583cce63ed5c2158bec4e Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/63775 Reviewed-by: David Hendricks <dhendrix@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-on: http://review.coreboot.org/4397 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
-rw-r--r--src/cpu/samsung/exynos5250/pwm.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/cpu/samsung/exynos5250/pwm.c b/src/cpu/samsung/exynos5250/pwm.c
index 34fc2b1319..eeb67211c6 100644
--- a/src/cpu/samsung/exynos5250/pwm.c
+++ b/src/cpu/samsung/exynos5250/pwm.c
@@ -25,8 +25,7 @@
int pwm_enable(int pwm_id)
{
- const struct s5p_timer *pwm =
- samsung_get_base_timer();
+ struct s5p_timer *const pwm = samsung_get_base_timer();
unsigned long tcon;
tcon = readl(&pwm->tcon);
@@ -39,8 +38,7 @@ int pwm_enable(int pwm_id)
int pwm_check_enabled(int pwm_id)
{
- const struct s5p_timer *pwm =
- samsung_get_base_timer();
+ const struct s5p_timer *pwm = samsung_get_base_timer();
const unsigned long tcon = readl(&pwm->tcon);
return tcon & TCON_START(pwm_id);
@@ -48,8 +46,7 @@ int pwm_check_enabled(int pwm_id)
void pwm_disable(int pwm_id)
{
- const struct s5p_timer *pwm =
- samsung_get_base_timer();
+ struct s5p_timer *const pwm = samsung_get_base_timer();
unsigned long tcon;
tcon = readl(&pwm->tcon);
@@ -77,8 +74,7 @@ static unsigned long pwm_calc_tin(int pwm_id, unsigned long freq)
int pwm_config(int pwm_id, int duty_ns, int period_ns)
{
- const struct s5p_timer *pwm =
- samsung_get_base_timer();
+ struct s5p_timer *const pwm = samsung_get_base_timer();
unsigned int offset;
unsigned long tin_rate;
unsigned long tin_ns;
@@ -134,8 +130,7 @@ int pwm_config(int pwm_id, int duty_ns, int period_ns)
int pwm_init(int pwm_id, int div, int invert)
{
u32 val;
- const struct s5p_timer *pwm =
- samsung_get_base_timer();
+ struct s5p_timer *const pwm = samsung_get_base_timer();
unsigned long ticks_per_period;
unsigned int offset, prescaler;