summaryrefslogtreecommitdiff
path: root/cpu/mpc8xx
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-16 16:40:22 +0000
committerwdenk <wdenk>2003-07-16 16:40:22 +0000
commitcb4dbb7bbc271f988e14ec353a5e86d7f10e1da0 (patch)
treeca7b875ee18e09e8aea45ffb22539a15fadaf77c /cpu/mpc8xx
parentad12965db5d145f7cf7595cbeaf03b3402f42897 (diff)
Incorporate Patch by Lutz Dennig, 15 Jul 2003.
Diffstat (limited to 'cpu/mpc8xx')
-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