summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/ata.c4
-rw-r--r--firmware/drivers/i2c-pp5020.c2
-rw-r--r--firmware/drivers/lcd-ipod.c6
-rw-r--r--firmware/drivers/power.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 87f41b4ff1..d4a3856a76 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1452,7 +1452,7 @@ void ata_poweroff(bool enable)
1452 1452
1453bool ata_disk_is_active(void) 1453bool ata_disk_is_active(void)
1454{ 1454{
1455#ifdef APPLE_IPODNANO 1455#ifdef IPOD_NANO
1456 return false; 1456 return false;
1457#else 1457#else
1458 return !sleeping; 1458 return !sleeping;
@@ -1465,7 +1465,7 @@ static int ata_perform_sleep(void)
1465 1465
1466 /* ATA sleep is currently broken on Nano, and will hang all subsequent 1466 /* ATA sleep is currently broken on Nano, and will hang all subsequent
1467 accesses, so disable until we find a cure. */ 1467 accesses, so disable until we find a cure. */
1468#ifndef APPLE_IPODNANO 1468#ifndef IPOD_NANO
1469 mutex_lock(&ata_mtx); 1469 mutex_lock(&ata_mtx);
1470 1470
1471 SET_REG(ATA_SELECT, ata_device); 1471 SET_REG(ATA_SELECT, ata_device);
diff --git a/firmware/drivers/i2c-pp5020.c b/firmware/drivers/i2c-pp5020.c
index 8b48375e3d..e81783dba0 100644
--- a/firmware/drivers/i2c-pp5020.c
+++ b/firmware/drivers/i2c-pp5020.c
@@ -195,7 +195,7 @@ void i2c_init(void)
195{ 195{
196 /* From ipodlinux */ 196 /* From ipodlinux */
197 197
198#if defined(APPLE_IPODMINI) 198#ifdef IPOD_MINI
199 /* GPIO port C disable port 0x10 */ 199 /* GPIO port C disable port 0x10 */
200 GPIOC_ENABLE &= ~0x10; 200 GPIOC_ENABLE &= ~0x10;
201 201
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 74bda3bfb9..67f9e7c23f 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -134,7 +134,7 @@ void lcd_init_device(void)
134 lcd_set_flip(false); 134 lcd_set_flip(false);
135 lcd_cmd_and_data(R_ENTRY_MODE, 0x0000); 135 lcd_cmd_and_data(R_ENTRY_MODE, 0x0000);
136 136
137#ifdef APPLE_IPOD4G 137#ifdef IPOD_4G
138 outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */ 138 outl(inl(0x6000d004) | 0x4, 0x6000d004); /* B02 enable */
139 outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */ 139 outl(inl(0x6000d004) | 0x8, 0x6000d004); /* B03 enable */
140 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */ 140 outl(inl(0x70000084) | 0x2000000, 0x70000084); /* D01 enable */
@@ -184,12 +184,12 @@ void lcd_set_flip(bool yesno)
184 if (yesno) { 184 if (yesno) {
185 /* 168x128, inverse SEG & COM order */ 185 /* 168x128, inverse SEG & COM order */
186 lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x030f); 186 lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x030f);
187 lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x8304); /* 0..127 */ 187 lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x8304); /* 4..131 */
188 addr_offset = (4 << 5) | (20 - 1); 188 addr_offset = (4 << 5) | (20 - 1);
189 } else { 189 } else {
190 /* 168x128 */ 190 /* 168x128 */
191 lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x000f); 191 lcd_cmd_and_data(R_DRV_OUTPUT_CONTROL, 0x000f);
192 lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x7f00); /* 4..131 */ 192 lcd_cmd_and_data(R_1ST_SCR_DRV_POS, 0x7f00); /* 0..127 */
193 addr_offset = 20; 193 addr_offset = 20;
194 } 194 }
195#endif 195#endif
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index cf90e0fc8c..9cc751e41e 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -123,7 +123,7 @@ bool charger_inserted(void)
123 return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF); 123 return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF);
124#elif defined(TOSHIBA_GIGABEAT_F) 124#elif defined(TOSHIBA_GIGABEAT_F)
125 return false; 125 return false;
126#elif defined(APPLE_IPODVIDEO) 126#elif defined(IPOD_VIDEO)
127 return (GPIOL_INPUT_VAL & 0x08)?false:true; 127 return (GPIOL_INPUT_VAL & 0x08)?false:true;
128#elif defined(IPOD_ARCH) 128#elif defined(IPOD_ARCH)
129 /* This needs filling in for other ipods. */ 129 /* This needs filling in for other ipods. */
@@ -158,7 +158,7 @@ bool charging_state(void) {
158 return charger_inserted(); 158 return charger_inserted();
159#elif defined(IRIVER_H300_SERIES) 159#elif defined(IRIVER_H300_SERIES)
160 return (GPIO_READ & 0x00800000)?true:false; 160 return (GPIO_READ & 0x00800000)?true:false;
161#elif defined(APPLE_IPODVIDEO) 161#elif defined(IPOD_VIDEO)
162 return (GPIOB_INPUT_VAL & 0x01)?false:true; 162 return (GPIOB_INPUT_VAL & 0x01)?false:true;
163#endif 163#endif
164} 164}