summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-06 02:32:15 +0000
committerDave Chapman <dave@dchapman.com>2006-02-06 02:32:15 +0000
commit383b8d41c1fa1343b0d985632d0872170df04b2b (patch)
tree800a77d3407b23ed3d8751c9365a1f235d126847 /firmware/drivers
parent2f11278b5923adc41e8f285f59bf6b7747340a31 (diff)
Some bugfixes for the iPod 4G greyscale version of the LCD driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8594 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-ipod.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 529509f4d8..b6a764d996 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -45,12 +45,16 @@ static int timer_check(int clock_start, int usecs)
/*** hardware configuration ***/
+#if CONFIG_CPU == PP5002
#define IPOD_LCD_BASE 0xc0001000
-#define IPOD_LCD_BUSY_MASK 0x80000000
+#define IPOD_LCD_BUSY_MASK 0x80000000
+#else /* PP5020 */
+#define IPOD_LCD_BASE 0x70003000
+#define IPOD_LCD_BUSY_MASK 0x00008000
+#endif
/* LCD command codes for HD66789R */
-
#define LCD_CMD 0x08
#define LCD_DATA 0x10
@@ -98,7 +102,7 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi)
int lcd_default_contrast(void)
{
- return 28;
+ return 96;
}
/**
@@ -109,6 +113,15 @@ void lcd_init_device(void){
/* driver output control - 160x128 */
lcd_cmd_and_data(0x1, 0x1, 0xf);
lcd_cmd_and_data(0x5, 0x0, 0x10);
+
+#ifdef APPLE_IPOD4G
+ outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */
+ outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */
+ outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */
+ outl(inl(0x70000080) | 0x2000000, 0x70000080); /* D01 =1 */
+
+ outl(inl(0x6000600c) | 0x20000, 0x6000600c); /* PWM enable */
+#endif
}
/*** update functions ***/