summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/pbell/vibe500/button-vibe500.c2
-rw-r--r--firmware/target/arm/samsung/button-yh82x_yh92x.c4
-rw-r--r--firmware/target/arm/usb-drv-arc.c6
-rw-r--r--firmware/target/coldfire/iaudio/m3/button-m3.c4
-rw-r--r--firmware/target/coldfire/iriver/h100/button-h100.c11
-rw-r--r--firmware/target/coldfire/iriver/h300/button-h300.c9
-rw-r--r--firmware/target/coldfire/mpio/ata-mpio.c4
-rw-r--r--firmware/target/coldfire/mpio/hd200/button-hd200.c6
8 files changed, 34 insertions, 12 deletions
diff --git a/firmware/target/arm/pbell/vibe500/button-vibe500.c b/firmware/target/arm/pbell/vibe500/button-vibe500.c
index 9afc9eecab..1279e86725 100644
--- a/firmware/target/arm/pbell/vibe500/button-vibe500.c
+++ b/firmware/target/arm/pbell/vibe500/button-vibe500.c
@@ -97,9 +97,11 @@ int button_read_device(void)
int buttons = int_btn;
unsigned char state;
static bool hold_button = false;
+#ifndef BOOTLOADER
bool hold_button_old;
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
#ifndef BOOTLOADER
diff --git a/firmware/target/arm/samsung/button-yh82x_yh92x.c b/firmware/target/arm/samsung/button-yh82x_yh92x.c
index ff8a580d2a..7d0f390644 100644
--- a/firmware/target/arm/samsung/button-yh82x_yh92x.c
+++ b/firmware/target/arm/samsung/button-yh82x_yh92x.c
@@ -103,10 +103,14 @@ int button_read_device(void)
int btn = BUTTON_NONE;
#endif /* (SAMSUNG_YH920) || (SAMSUNG_YH925) */
static bool hold_button = false;
+#ifndef BOOTLOADER
bool hold_button_old;
+#endif
/* Hold */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
#ifndef BOOTLOADER
diff --git a/firmware/target/arm/usb-drv-arc.c b/firmware/target/arm/usb-drv-arc.c
index 44d006b30f..b19b635923 100644
--- a/firmware/target/arm/usb-drv-arc.c
+++ b/firmware/target/arm/usb-drv-arc.c
@@ -352,12 +352,16 @@ static struct queue_head qh_array[USB_NUM_ENDPOINTS*2]
static struct semaphore transfer_completion_signal[USB_NUM_ENDPOINTS*2]
SHAREDBSS_ATTR;
-static const unsigned int pipe2mask[] = {
+static const unsigned int pipe2mask[USB_NUM_ENDPOINTS*2] = {
0x01, 0x010000,
0x02, 0x020000,
0x04, 0x040000,
+#if USB_NUM_ENDPOINTS > 3
0x08, 0x080000,
+#endif
+#if USB_NUM_ENDPOINTS > 4
0x10, 0x100000,
+#endif
};
/*-------------------------------------------------------------------------*/
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c
index 53d02ec449..1c7f4a15de 100644
--- a/firmware/target/coldfire/iaudio/m3/button-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/button-m3.c
@@ -50,15 +50,11 @@ int button_read_device(void)
{
int btn = BUTTON_NONE;
#ifndef BOOTLOADER
- bool hold_button_old;
bool remote_hold_button_old;
#endif
int data;
/* normal buttons */
-#ifndef BOOTLOADER
- hold_button_old = hold_button;
-#endif
hold_button = button_hold();
if (!hold_button)
diff --git a/firmware/target/coldfire/iriver/h100/button-h100.c b/firmware/target/coldfire/iriver/h100/button-h100.c
index dbaefdcf2a..63f772b65e 100644
--- a/firmware/target/coldfire/iriver/h100/button-h100.c
+++ b/firmware/target/coldfire/iriver/h100/button-h100.c
@@ -40,7 +40,7 @@ bool button_hold(void)
}
static bool remote_button_hold_only(void)
-{
+{
if(remote_type() == REMOTETYPE_H300_NONLCD)
return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */
else
@@ -68,14 +68,17 @@ int button_read_device(void)
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
-
-
+
#ifndef BOOTLOADER
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
@@ -120,7 +123,9 @@ int button_read_device(void)
}
/* remote buttons */
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = remote_button_hold_only();
#ifndef BOOTLOADER
diff --git a/firmware/target/coldfire/iriver/h300/button-h300.c b/firmware/target/coldfire/iriver/h300/button-h300.c
index 74c14fb144..437c9fd2d3 100644
--- a/firmware/target/coldfire/iriver/h300/button-h300.c
+++ b/firmware/target/coldfire/iriver/h300/button-h300.c
@@ -84,14 +84,17 @@ int button_read_device(void)
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
-
-
+
#ifndef BOOTLOADER
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
@@ -130,7 +133,9 @@ int button_read_device(void)
}
/* remote buttons */
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = remote_button_hold_only();
#ifndef BOOTLOADER
diff --git a/firmware/target/coldfire/mpio/ata-mpio.c b/firmware/target/coldfire/mpio/ata-mpio.c
index af082640bf..94a572a0e8 100644
--- a/firmware/target/coldfire/mpio/ata-mpio.c
+++ b/firmware/target/coldfire/mpio/ata-mpio.c
@@ -39,7 +39,9 @@ void ata_reset(void)
void ata_enable(bool on)
{
+#ifndef BOOTLOADER
static bool init = true;
+#endif
/* Ide power toggling is a nasty hack to allow USB bridge operation
* in rockbox. For some reason GL811E bridge doesn't like the state
@@ -59,8 +61,8 @@ void ata_enable(bool on)
sleep(1);
ide_power_enable(true);
}
-#endif
init = false;
+#endif
}
else
{
diff --git a/firmware/target/coldfire/mpio/hd200/button-hd200.c b/firmware/target/coldfire/mpio/hd200/button-hd200.c
index 27b0d50fb5..5ff70783cd 100644
--- a/firmware/target/coldfire/mpio/hd200/button-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/button-hd200.c
@@ -69,17 +69,21 @@ int button_read_device(void)
static bool hold_button = false;
bool remote_hold_button = false;
+#ifndef BOOTLOADER
bool hold_button_old;
+#endif
bool remote_present;
/* check if we have remote connected */
remote_present = remote_detect();
/* read hold buttons status */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
remote_hold_button = remote_button_hold();
-
+
#ifndef BOOTLOADER
/* Only main hold affects backlight */
if (hold_button != hold_button_old)