summaryrefslogtreecommitdiff
path: root/cpu/mpc8xx/lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/mpc8xx/lcd.c')
-rw-r--r--cpu/mpc8xx/lcd.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c
index ec9fbfce0d5..c1509284b0a 100644
--- a/cpu/mpc8xx/lcd.c
+++ b/cpu/mpc8xx/lcd.c
@@ -1044,11 +1044,25 @@ static void lcd_enable (void)
#if defined(CONFIG_R360MPI)
{
extern void r360_i2c_lcd_write (uchar data0, uchar data1);
+ unsigned long bgi, ctr;
+ char *p;
+
+ if ((p = getenv("lcdbgi")) != NULL) {
+ bgi = simple_strtoul (p, 0, 10) & 0xFFF;
+ } else {
+ bgi = 0xFFF;
+ }
+
+ if ((p = getenv("lcdctr")) != NULL) {
+ ctr = simple_strtoul (p, 0, 10) & 0xFFF;
+ } else {
+ ctr=0x7FF;
+ }
r360_i2c_lcd_write(0x10, 0x01);
r360_i2c_lcd_write(0x20, 0x01);
- r360_i2c_lcd_write(0x3F, 0xFF);
- r360_i2c_lcd_write(0x47, 0xFF);
+ r360_i2c_lcd_write(0x30 | ((bgi>>8) & 0xF), bgi & 0xFF);
+ r360_i2c_lcd_write(0x40 | ((ctr>>8) & 0xF), ctr & 0xFF);
}
#endif /* CONFIG_R360MPI */
#ifdef CONFIG_RBC823