summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-ipod.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-03-30 17:29:21 +0000
committerJens Arnold <amiconn@rockbox.org>2006-03-30 17:29:21 +0000
commitd3feb78e4053d287755a4f8404c3a9ce1a491e93 (patch)
treeb68592c039f004e2eabf41e89efece89030cc58b /firmware/drivers/lcd-ipod.c
parent1ccc81bf8f4382e56f0f0ae0779381fb5d4a88c4 (diff)
downloadrockbox-d3feb78e4053d287755a4f8404c3a9ce1a491e93.tar.gz
rockbox-d3feb78e4053d287755a4f8404c3a9ce1a491e93.zip
Initial support for iPod mini 2G: Rockbox boots, LCD driver is working. No sound, no buttons, and hangs at the boot screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9363 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-ipod.c')
-rw-r--r--firmware/drivers/lcd-ipod.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 2d190d3d70..8936dad912 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -76,20 +76,28 @@ static void lcd_wait_write(void)
76static void lcd_send_data(int data_lo, int data_hi) 76static void lcd_send_data(int data_lo, int data_hi)
77{ 77{
78 lcd_wait_write(); 78 lcd_wait_write();
79 outl(data_lo, IPOD_LCD_BASE + LCD_DATA); 79#ifdef IPOD_MINI2G
80 lcd_wait_write(); 80 outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE);
81 outl(data_hi, IPOD_LCD_BASE + LCD_DATA); 81 outl(data_hi | (data_lo << 8) | 0x760000, IPOD_LCD_BASE+8);
82#else
83 outl(data_lo, IPOD_LCD_BASE + LCD_DATA);
84 lcd_wait_write();
85 outl(data_hi, IPOD_LCD_BASE + LCD_DATA);
86#endif
82} 87}
83 88
84/* send LCD command */ 89/* send LCD command */
85static void lcd_prepare_cmd(int cmd) 90static void lcd_prepare_cmd(int cmd)
86{ 91{
87 lcd_wait_write(); 92 lcd_wait_write();
88 93#ifdef IPOD_MINI2G
89 outl(0x0, IPOD_LCD_BASE + LCD_CMD); 94 outl((inl(IPOD_LCD_BASE) & ~0x1f00000) | 0x1700000, IPOD_LCD_BASE);
90 lcd_wait_write(); 95 outl(cmd | 0x740000, IPOD_LCD_BASE+8);
91 outl(cmd, IPOD_LCD_BASE + LCD_CMD); 96#else
92 97 outl(0x0, IPOD_LCD_BASE + LCD_CMD);
98 lcd_wait_write();
99 outl(cmd, IPOD_LCD_BASE + LCD_CMD);
100#endif
93} 101}
94 102
95/* send LCD command and data */ 103/* send LCD command and data */
@@ -105,7 +113,8 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi)
105 * LCD init 113 * LCD init
106 **/ 114 **/
107void lcd_init_device(void){ 115void lcd_init_device(void){
108#ifdef APPLE_IPODMINI 116#if defined(IPOD_MINI) || defined(IPOD_MINI2G)
117 /* driver output control - 160x112 (ipod mini) */
109 lcd_cmd_and_data(0x1, 0x0, 0xd); 118 lcd_cmd_and_data(0x1, 0x0, 0xd);
110#else 119#else
111 /* driver output control - 160x128 */ 120 /* driver output control - 160x128 */