summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/i2c-meg-fx.c1
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.c1
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.h1
-rw-r--r--firmware/target/arm/ipod/power-ipod.c1
-rw-r--r--firmware/target/arm/iriver/h10/power-h10.c1
-rw-r--r--firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c1
-rw-r--r--firmware/target/arm/iriver/ifp7xx/usb-ifp7xx.c1
-rw-r--r--firmware/target/arm/tatung/tpj1022/power-tpj1022.c1
-rw-r--r--firmware/target/sh/archos/ata-archos.c2
-rw-r--r--firmware/target/sh/archos/fm_v2/usb-fm_v2.c2
-rw-r--r--firmware/target/sh/archos/lcd-archos-bitmap.c2
-rw-r--r--firmware/target/sh/archos/ondio/usb-ondio.c4
-rw-r--r--firmware/target/sh/archos/player/hwcompat-player.c26
-rw-r--r--firmware/target/sh/archos/recorder/usb-recorder.c2
14 files changed, 32 insertions, 14 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/i2c-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/i2c-meg-fx.c
index 770f4eb4e6..670d6cd04c 100644
--- a/firmware/target/arm/gigabeat/meg-fx/i2c-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/i2c-meg-fx.c
@@ -21,7 +21,6 @@
21#include <stdbool.h> 21#include <stdbool.h>
22#include "kernel.h" 22#include "kernel.h"
23#include "system.h" 23#include "system.h"
24#include "hwcompat.h"
25#include "logf.h" 24#include "logf.h"
26#include "debug.h" 25#include "debug.h"
27#include "string.h" 26#include "string.h"
diff --git a/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.c
index f9cb35f884..e69eab432a 100644
--- a/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.c
@@ -3,7 +3,6 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include "kernel.h" 4#include "kernel.h"
5#include "system.h" 5#include "system.h"
6#include "hwcompat.h"
7#include "logf.h" 6#include "logf.h"
8#include "debug.h" 7#include "debug.h"
9#include "string.h" 8#include "string.h"
diff --git a/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.h b/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.h
index df7a654b36..3ea0917e86 100644
--- a/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.h
+++ b/firmware/target/arm/gigabeat/meg-fx/sc606-meg-fx.h
@@ -3,7 +3,6 @@
3#include <stdbool.h> 3#include <stdbool.h>
4#include "kernel.h" 4#include "kernel.h"
5#include "system.h" 5#include "system.h"
6#include "hwcompat.h"
7#include "logf.h" 6#include "logf.h"
8#include "debug.h" 7#include "debug.h"
9#include "string.h" 8#include "string.h"
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c
index 8932b95cdd..4fde6faac1 100644
--- a/firmware/target/arm/ipod/power-ipod.c
+++ b/firmware/target/arm/ipod/power-ipod.c
@@ -23,7 +23,6 @@
23#include "kernel.h" 23#include "kernel.h"
24#include "system.h" 24#include "system.h"
25#include "power.h" 25#include "power.h"
26#include "hwcompat.h"
27#include "logf.h" 26#include "logf.h"
28#include "pcf50605.h" 27#include "pcf50605.h"
29#include "usb.h" 28#include "usb.h"
diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c
index d85cdb70ab..63eb2dc189 100644
--- a/firmware/target/arm/iriver/h10/power-h10.c
+++ b/firmware/target/arm/iriver/h10/power-h10.c
@@ -28,7 +28,6 @@
28#include "kernel.h" 28#include "kernel.h"
29#include "system.h" 29#include "system.h"
30#include "power.h" 30#include "power.h"
31#include "hwcompat.h"
32#include "logf.h" 31#include "logf.h"
33#include "usb.h" 32#include "usb.h"
34 33
diff --git a/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c b/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c
index 1c3cc2b4bf..4e4f585298 100644
--- a/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c
+++ b/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c
@@ -23,7 +23,6 @@
23#include "kernel.h" 23#include "kernel.h"
24#include "system.h" 24#include "system.h"
25#include "power.h" 25#include "power.h"
26#include "hwcompat.h"
27#include "logf.h" 26#include "logf.h"
28#include "usb.h" 27#include "usb.h"
29 28
diff --git a/firmware/target/arm/iriver/ifp7xx/usb-ifp7xx.c b/firmware/target/arm/iriver/ifp7xx/usb-ifp7xx.c
index 1ab7534d4c..a22a227b15 100644
--- a/firmware/target/arm/iriver/ifp7xx/usb-ifp7xx.c
+++ b/firmware/target/arm/iriver/ifp7xx/usb-ifp7xx.c
@@ -32,7 +32,6 @@
32#include "button.h" 32#include "button.h"
33#include "sprintf.h" 33#include "sprintf.h"
34#include "string.h" 34#include "string.h"
35#include "hwcompat.h"
36 35
37void usb_init_device(void) 36void usb_init_device(void)
38{ 37{
diff --git a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c
index e8bc4e1fb0..18835134a3 100644
--- a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c
+++ b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c
@@ -28,7 +28,6 @@
28#include "kernel.h" 28#include "kernel.h"
29#include "system.h" 29#include "system.h"
30#include "power.h" 30#include "power.h"
31#include "hwcompat.h"
32#include "logf.h" 31#include "logf.h"
33#include "usb.h" 32#include "usb.h"
34 33
diff --git a/firmware/target/sh/archos/ata-archos.c b/firmware/target/sh/archos/ata-archos.c
index 5ad30d6891..53276ce8df 100644
--- a/firmware/target/sh/archos/ata-archos.c
+++ b/firmware/target/sh/archos/ata-archos.c
@@ -57,7 +57,7 @@ void ata_device_init(void)
57 or_b(0x02, &PADRH); /* release ATA reset */ 57 or_b(0x02, &PADRH); /* release ATA reset */
58 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ 58 PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
59 59
60 if (read_hw_mask() & ATA_ADDRESS_200) 60 if (HW_MASK & ATA_ADDRESS_200)
61 ata_control = ATA_CONTROL1; 61 ata_control = ATA_CONTROL1;
62 else 62 else
63 ata_control = ATA_CONTROL2; 63 ata_control = ATA_CONTROL2;
diff --git a/firmware/target/sh/archos/fm_v2/usb-fm_v2.c b/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
index 2b4632e4f7..3dcc3559a3 100644
--- a/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
+++ b/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
@@ -30,7 +30,7 @@ bool usb_detect(void)
30 30
31void usb_enable(bool on) 31void usb_enable(bool on)
32{ 32{
33 if(read_hw_mask() & USB_ACTIVE_HIGH) 33 if(HW_MASK & USB_ACTIVE_HIGH)
34 on = !on; 34 on = !on;
35 35
36 if(on) 36 if(on)
diff --git a/firmware/target/sh/archos/lcd-archos-bitmap.c b/firmware/target/sh/archos/lcd-archos-bitmap.c
index b458c81098..28600a9769 100644
--- a/firmware/target/sh/archos/lcd-archos-bitmap.c
+++ b/firmware/target/sh/archos/lcd-archos-bitmap.c
@@ -73,7 +73,7 @@ static int xoffset; /* needed for flip */
73 73
74int lcd_default_contrast(void) 74int lcd_default_contrast(void)
75{ 75{
76 return (read_hw_mask() & LCD_CONTRAST_BIAS) ? 31 : 49; 76 return (HW_MASK & LCD_CONTRAST_BIAS) ? 31 : 49;
77} 77}
78 78
79void lcd_set_contrast(int val) 79void lcd_set_contrast(int val)
diff --git a/firmware/target/sh/archos/ondio/usb-ondio.c b/firmware/target/sh/archos/ondio/usb-ondio.c
index 7c09bf3877..c856f3ae2c 100644
--- a/firmware/target/sh/archos/ondio/usb-ondio.c
+++ b/firmware/target/sh/archos/ondio/usb-ondio.c
@@ -35,14 +35,14 @@ void usb_enable(bool on)
35 { 35 {
36 mmc_enable_int_flash_clock(!mmc_detect()); 36 mmc_enable_int_flash_clock(!mmc_detect());
37 37
38 if (!(read_hw_mask() & MMC_CLOCK_POLARITY)) 38 if (!(HW_MASK & MMC_CLOCK_POLARITY))
39 and_b(~0x20, &PBDRH); /* old circuit needs SCK1 = low while on USB */ 39 and_b(~0x20, &PBDRH); /* old circuit needs SCK1 = low while on USB */
40 or_b(0x20, &PADRL); /* enable USB */ 40 or_b(0x20, &PADRL); /* enable USB */
41 and_b(~0x08, &PADRL); /* assert card detect */ 41 and_b(~0x08, &PADRL); /* assert card detect */
42 } 42 }
43 else 43 else
44 { 44 {
45 if (!(read_hw_mask() & MMC_CLOCK_POLARITY)) 45 if (!(HW_MASK & MMC_CLOCK_POLARITY))
46 or_b(0x20, &PBDRH); /* reset SCK1 = high for old circuit */ 46 or_b(0x20, &PBDRH); /* reset SCK1 = high for old circuit */
47 and_b(~0x20, &PADRL); /* disable USB */ 47 and_b(~0x20, &PADRL); /* disable USB */
48 or_b(0x08, &PADRL); /* deassert card detect */ 48 or_b(0x08, &PADRL); /* deassert card detect */
diff --git a/firmware/target/sh/archos/player/hwcompat-player.c b/firmware/target/sh/archos/player/hwcompat-player.c
new file mode 100644
index 0000000000..71bdea383f
--- /dev/null
+++ b/firmware/target/sh/archos/player/hwcompat-player.c
@@ -0,0 +1,26 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <stdbool.h>
21#include "hwcompat.h"
22
23bool is_new_player(void)
24{
25 return (ROM_VERSION > 449) || (ROM_VERSION == 116);
26}
diff --git a/firmware/target/sh/archos/recorder/usb-recorder.c b/firmware/target/sh/archos/recorder/usb-recorder.c
index 2934b32a3c..7ed237068e 100644
--- a/firmware/target/sh/archos/recorder/usb-recorder.c
+++ b/firmware/target/sh/archos/recorder/usb-recorder.c
@@ -30,7 +30,7 @@ bool usb_detect(void)
30 30
31void usb_enable(bool on) 31void usb_enable(bool on)
32{ 32{
33 if(read_hw_mask() & USB_ACTIVE_HIGH) 33 if(HW_MASK & USB_ACTIVE_HIGH)
34 on = !on; 34 on = !on;
35 35
36 if(on) 36 if(on)