summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-04-11 23:51:00 +0000
committerJens Arnold <amiconn@rockbox.org>2007-04-11 23:51:00 +0000
commit8636e6949e802556da1588b814e454155358df90 (patch)
treefb668ba4b210d21185ee6f46a8e80e61171af8bf /firmware/target
parentb16137e10b0b309ccd9bf81fb2d70f24b090aa7d (diff)
downloadrockbox-8636e6949e802556da1588b814e454155358df90.tar.gz
rockbox-8636e6949e802556da1588b814e454155358df90.zip
Moved SH1 system code to target tree. * First shot at hwcompat cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13114 a1c6a512-1295-4272-9138-f99709370657
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 @@
#include <stdbool.h>
#include "kernel.h"
#include "system.h"
-#include "hwcompat.h"
#include "logf.h"
#include "debug.h"
#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 @@
#include <stdbool.h>
#include "kernel.h"
#include "system.h"
-#include "hwcompat.h"
#include "logf.h"
#include "debug.h"
#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 @@
#include <stdbool.h>
#include "kernel.h"
#include "system.h"
-#include "hwcompat.h"
#include "logf.h"
#include "debug.h"
#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 @@
#include "kernel.h"
#include "system.h"
#include "power.h"
-#include "hwcompat.h"
#include "logf.h"
#include "pcf50605.h"
#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 @@
#include "kernel.h"
#include "system.h"
#include "power.h"
-#include "hwcompat.h"
#include "logf.h"
#include "usb.h"
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 @@
#include "kernel.h"
#include "system.h"
#include "power.h"
-#include "hwcompat.h"
#include "logf.h"
#include "usb.h"
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 @@
#include "button.h"
#include "sprintf.h"
#include "string.h"
-#include "hwcompat.h"
void usb_init_device(void)
{
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 @@
#include "kernel.h"
#include "system.h"
#include "power.h"
-#include "hwcompat.h"
#include "logf.h"
#include "usb.h"
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)
or_b(0x02, &PADRH); /* release ATA reset */
PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
- if (read_hw_mask() & ATA_ADDRESS_200)
+ if (HW_MASK & ATA_ADDRESS_200)
ata_control = ATA_CONTROL1;
else
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)
void usb_enable(bool on)
{
- if(read_hw_mask() & USB_ACTIVE_HIGH)
+ if(HW_MASK & USB_ACTIVE_HIGH)
on = !on;
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 */
int lcd_default_contrast(void)
{
- return (read_hw_mask() & LCD_CONTRAST_BIAS) ? 31 : 49;
+ return (HW_MASK & LCD_CONTRAST_BIAS) ? 31 : 49;
}
void 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)
{
mmc_enable_int_flash_clock(!mmc_detect());
- if (!(read_hw_mask() & MMC_CLOCK_POLARITY))
+ if (!(HW_MASK & MMC_CLOCK_POLARITY))
and_b(~0x20, &PBDRH); /* old circuit needs SCK1 = low while on USB */
or_b(0x20, &PADRL); /* enable USB */
and_b(~0x08, &PADRL); /* assert card detect */
}
else
{
- if (!(read_hw_mask() & MMC_CLOCK_POLARITY))
+ if (!(HW_MASK & MMC_CLOCK_POLARITY))
or_b(0x20, &PBDRH); /* reset SCK1 = high for old circuit */
and_b(~0x20, &PADRL); /* disable USB */
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 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2002 by Linus Nielsen Feltzing
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <stdbool.h>
+#include "hwcompat.h"
+
+bool is_new_player(void)
+{
+ return (ROM_VERSION > 449) || (ROM_VERSION == 116);
+}
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)
void usb_enable(bool on)
{
- if(read_hw_mask() & USB_ACTIVE_HIGH)
+ if(HW_MASK & USB_ACTIVE_HIGH)
on = !on;
if(on)