summaryrefslogtreecommitdiff
path: root/board/BuR/common/common.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2015-07-10 09:21:44 +0200
committerStefano Babic <sbabic@denx.de>2015-07-10 09:21:44 +0200
commit1254ff97abb7606ccd0d7bdcd9f22581c50fe535 (patch)
tree61b31e61173154abd38aaa6584e84ea77314b861 /board/BuR/common/common.c
parent54e0f96f764f662be186baae7d6c2c97423bc29d (diff)
parentf3edfd30541d6f245d7dfa6fa7354cc916cc53e1 (diff)
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'board/BuR/common/common.c')
-rw-r--r--board/BuR/common/common.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 7830d1a200e..441465c005e 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -64,8 +64,7 @@ void lcdbacklight(int on)
unsigned int pwmfrq = getenv_ulong("ds1_pwmfreq", 10, ~0UL);
#endif
unsigned int tmp;
-
- struct gptimer *const timerhw = (struct gptimer *)DM_TIMER6_BASE;
+ struct gptimer *timerhw;
if (on)
bright = bright != ~0UL ? bright : 50;
@@ -73,6 +72,14 @@ void lcdbacklight(int on)
bright = 0;
switch (driver) {
+ case 2:
+ timerhw = (struct gptimer *)DM_TIMER5_BASE;
+ break;
+ default:
+ timerhw = (struct gptimer *)DM_TIMER6_BASE;
+ }
+
+ switch (driver) {
case 0: /* PMIC LED-Driver */
/* brightness level */
tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
@@ -83,7 +90,8 @@ void lcdbacklight(int on)
bright != 0 ? 0x0A : 0x02,
0xFF);
break;
- case 1: /* PWM using timer6 */
+ case 1:
+ case 2: /* PWM using timer */
if (pwmfrq != ~0UL) {
timerhw->tiocp_cfg = TCFG_RESET;
udelay(10);