summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/debug_menu.c2
-rw-r--r--apps/plugins/pacbox/pacbox.h2
-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
-rw-r--r--firmware/export/config-ipod3g.h2
-rw-r--r--firmware/export/config-ipod4g.h2
-rw-r--r--firmware/export/config-ipodcolor.h2
-rw-r--r--firmware/export/config-ipodmini.h2
-rwxr-xr-xfirmware/export/config-ipodmini2g.h2
-rw-r--r--firmware/export/config-ipodnano.h2
-rw-r--r--firmware/export/config-ipodvideo.h2
-rw-r--r--firmware/usb.c6
14 files changed, 13 insertions, 27 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 008e0a2518..9ad1c5f94c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1353,7 +1353,7 @@ bool view_battery(void)
1353 lcd_puts(0, 6, buf); 1353 lcd_puts(0, 6, buf);
1354 lcd_puts(0, 7, power_message); 1354 lcd_puts(0, 7, power_message);
1355#else /* !HAVE_CHARGE_CTRL */ 1355#else /* !HAVE_CHARGE_CTRL */
1356#if defined APPLE_IPODNANO || defined APPLE_IPODVIDEO 1356#if defined IPOD_NANO || defined IPOD_VIDEO
1357 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false; 1357 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;
1358 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true; 1358 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true;
1359 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false; 1359 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false;
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index c852608680..8712448b5b 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -106,7 +106,7 @@
106/* How many video frames (out of a possible 60) we display each second. 106/* How many video frames (out of a possible 60) we display each second.
107 NOTE: pacbox.c assumes this is an integer divisor of 60 107 NOTE: pacbox.c assumes this is an integer divisor of 60
108 */ 108 */
109#ifdef APPLE_IPOD_NANO 109#ifdef IPOD_NANO
110/* The Nano can manage full-speed at 30fps (1 in 2 frames) */ 110/* The Nano can manage full-speed at 30fps (1 in 2 frames) */
111#define FPS 30 111#define FPS 30
112#else 112#else
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}
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index 8cca000961..ad555d875a 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod 3g 2 * This config file is for the Apple iPod 3g
3 */ 3 */
4#define APPLE_IPOD3G 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index d4d4f28629..370d46a08c 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Color/Photo 2 * This config file is for the Apple iPod Color/Photo
3 */ 3 */
4#define APPLE_IPOD4G 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index a48bde5f4b..ff5a0c5d37 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Color/Photo 2 * This config file is for the Apple iPod Color/Photo
3 */ 3 */
4#define APPLE_IPODCOLOR 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 1cb18a7a89..ced21425f0 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Mini (1st Gen) 2 * This config file is for the Apple iPod Mini (1st Gen)
3 */ 3 */
4#define APPLE_IPODMINI 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index 5afc672fd6..ac69bc38ba 100755
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Mini 2nd Gen 2 * This config file is for the Apple iPod Mini 2nd Gen
3 */ 3 */
4#define APPLE_IPODMINI 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index 7264beaa88..a801cc23b9 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Nano 2 * This config file is for the Apple iPod Nano
3 */ 3 */
4#define APPLE_IPODNANO 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index 9536cc8b8f..071a8a3273 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * This config file is for the Apple iPod Video 2 * This config file is for the Apple iPod Video
3 */ 3 */
4#define APPLE_IPODVIDEO 1
5
6#define IPOD_ARCH 1 4#define IPOD_ARCH 1
7 5
8/* For Rolo and boot loader */ 6/* For Rolo and boot loader */
diff --git a/firmware/usb.c b/firmware/usb.c
index 18f2a2aa07..a8a3e6b3eb 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -176,10 +176,10 @@ void usb_enable(bool on)
176 if (on) 176 if (on)
177 { 177 {
178 /* The following code is copied from ipodlinux */ 178 /* The following code is copied from ipodlinux */
179#if defined(APPLE_IPODCOLOR) || defined(APPLE_IPOD3G) || \ 179#if defined(IPOD_COLOR) || defined(IPOD_3G) || \
180 defined(APPLE_IPOD4G) || defined(IPOD_MINI) 180 defined(IPOD_4G) || defined(IPOD_MINI)
181 unsigned char* storage_ptr = (unsigned char *)0x40017F00; 181 unsigned char* storage_ptr = (unsigned char *)0x40017F00;
182#elif defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO) || defined(IPOD_MINI2G) 182#elif defined(IPOD_NANO) || defined(IPOD_VIDEO) || defined(IPOD_MINI2G)
183 unsigned char* storage_ptr = (unsigned char *)0x4001FF00; 183 unsigned char* storage_ptr = (unsigned char *)0x4001FF00;
184#endif 184#endif
185 memcpy(storage_ptr, "diskmode\0\0hotstuff\0\0\1", 21); 185 memcpy(storage_ptr, "diskmode\0\0hotstuff\0\0\1", 21);