summaryrefslogtreecommitdiff
path: root/firmware/target/sh
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh')
-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
6 files changed, 32 insertions, 6 deletions
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)