summaryrefslogtreecommitdiff
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)
97 int buttons = int_btn; 97 int buttons = int_btn;
98 unsigned char state; 98 unsigned char state;
99 static bool hold_button = false; 99 static bool hold_button = false;
100#ifndef BOOTLOADER
100 bool hold_button_old; 101 bool hold_button_old;
101 102
102 hold_button_old = hold_button; 103 hold_button_old = hold_button;
104#endif
103 hold_button = button_hold(); 105 hold_button = button_hold();
104 106
105#ifndef BOOTLOADER 107#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)
103 int btn = BUTTON_NONE; 103 int btn = BUTTON_NONE;
104#endif /* (SAMSUNG_YH920) || (SAMSUNG_YH925) */ 104#endif /* (SAMSUNG_YH920) || (SAMSUNG_YH925) */
105 static bool hold_button = false; 105 static bool hold_button = false;
106#ifndef BOOTLOADER
106 bool hold_button_old; 107 bool hold_button_old;
108#endif
107 109
108 /* Hold */ 110 /* Hold */
111#ifndef BOOTLOADER
109 hold_button_old = hold_button; 112 hold_button_old = hold_button;
113#endif
110 hold_button = button_hold(); 114 hold_button = button_hold();
111 115
112#ifndef BOOTLOADER 116#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]
352static struct semaphore transfer_completion_signal[USB_NUM_ENDPOINTS*2] 352static struct semaphore transfer_completion_signal[USB_NUM_ENDPOINTS*2]
353 SHAREDBSS_ATTR; 353 SHAREDBSS_ATTR;
354 354
355static const unsigned int pipe2mask[] = { 355static const unsigned int pipe2mask[USB_NUM_ENDPOINTS*2] = {
356 0x01, 0x010000, 356 0x01, 0x010000,
357 0x02, 0x020000, 357 0x02, 0x020000,
358 0x04, 0x040000, 358 0x04, 0x040000,
359#if USB_NUM_ENDPOINTS > 3
359 0x08, 0x080000, 360 0x08, 0x080000,
361#endif
362#if USB_NUM_ENDPOINTS > 4
360 0x10, 0x100000, 363 0x10, 0x100000,
364#endif
361}; 365};
362 366
363/*-------------------------------------------------------------------------*/ 367/*-------------------------------------------------------------------------*/
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)
50{ 50{
51 int btn = BUTTON_NONE; 51 int btn = BUTTON_NONE;
52#ifndef BOOTLOADER 52#ifndef BOOTLOADER
53 bool hold_button_old;
54 bool remote_hold_button_old; 53 bool remote_hold_button_old;
55#endif 54#endif
56 int data; 55 int data;
57 56
58 /* normal buttons */ 57 /* normal buttons */
59#ifndef BOOTLOADER
60 hold_button_old = hold_button;
61#endif
62 hold_button = button_hold(); 58 hold_button = button_hold();
63 59
64 if (!hold_button) 60 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)
40} 40}
41 41
42static bool remote_button_hold_only(void) 42static bool remote_button_hold_only(void)
43{ 43{
44 if(remote_type() == REMOTETYPE_H300_NONLCD) 44 if(remote_type() == REMOTETYPE_H300_NONLCD)
45 return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ 45 return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */
46 else 46 else
@@ -68,14 +68,17 @@ int button_read_device(void)
68 static bool remote_hold_button = false; 68 static bool remote_hold_button = false;
69 static int prev_data = 0xff; 69 static int prev_data = 0xff;
70 static int last_valid = 0xff; 70 static int last_valid = 0xff;
71#ifndef BOOTLOADER
71 bool hold_button_old; 72 bool hold_button_old;
72 bool remote_hold_button_old; 73 bool remote_hold_button_old;
74#endif
73 75
74 /* normal buttons */ 76 /* normal buttons */
77#ifndef BOOTLOADER
75 hold_button_old = hold_button; 78 hold_button_old = hold_button;
79#endif
76 hold_button = button_hold(); 80 hold_button = button_hold();
77 81
78
79#ifndef BOOTLOADER 82#ifndef BOOTLOADER
80 if (hold_button != hold_button_old) 83 if (hold_button != hold_button_old)
81 backlight_hold_changed(hold_button); 84 backlight_hold_changed(hold_button);
@@ -120,7 +123,9 @@ int button_read_device(void)
120 } 123 }
121 124
122 /* remote buttons */ 125 /* remote buttons */
126#ifndef BOOTLOADER
123 remote_hold_button_old = remote_hold_button; 127 remote_hold_button_old = remote_hold_button;
128#endif
124 remote_hold_button = remote_button_hold_only(); 129 remote_hold_button = remote_button_hold_only();
125 130
126#ifndef BOOTLOADER 131#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)
84 static bool remote_hold_button = false; 84 static bool remote_hold_button = false;
85 static int prev_data = 0xff; 85 static int prev_data = 0xff;
86 static int last_valid = 0xff; 86 static int last_valid = 0xff;
87#ifndef BOOTLOADER
87 bool hold_button_old; 88 bool hold_button_old;
88 bool remote_hold_button_old; 89 bool remote_hold_button_old;
90#endif
89 91
90 /* normal buttons */ 92 /* normal buttons */
93#ifndef BOOTLOADER
91 hold_button_old = hold_button; 94 hold_button_old = hold_button;
95#endif
92 hold_button = button_hold(); 96 hold_button = button_hold();
93 97
94
95#ifndef BOOTLOADER 98#ifndef BOOTLOADER
96 if (hold_button != hold_button_old) 99 if (hold_button != hold_button_old)
97 backlight_hold_changed(hold_button); 100 backlight_hold_changed(hold_button);
@@ -130,7 +133,9 @@ int button_read_device(void)
130 } 133 }
131 134
132 /* remote buttons */ 135 /* remote buttons */
136#ifndef BOOTLOADER
133 remote_hold_button_old = remote_hold_button; 137 remote_hold_button_old = remote_hold_button;
138#endif
134 remote_hold_button = remote_button_hold_only(); 139 remote_hold_button = remote_button_hold_only();
135 140
136#ifndef BOOTLOADER 141#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)
39 39
40void ata_enable(bool on) 40void ata_enable(bool on)
41{ 41{
42#ifndef BOOTLOADER
42 static bool init = true; 43 static bool init = true;
44#endif
43 45
44 /* Ide power toggling is a nasty hack to allow USB bridge operation 46 /* Ide power toggling is a nasty hack to allow USB bridge operation
45 * in rockbox. For some reason GL811E bridge doesn't like the state 47 * in rockbox. For some reason GL811E bridge doesn't like the state
@@ -59,8 +61,8 @@ void ata_enable(bool on)
59 sleep(1); 61 sleep(1);
60 ide_power_enable(true); 62 ide_power_enable(true);
61 } 63 }
62#endif
63 init = false; 64 init = false;
65#endif
64 } 66 }
65 else 67 else
66 { 68 {
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)
69 static bool hold_button = false; 69 static bool hold_button = false;
70 bool remote_hold_button = false; 70 bool remote_hold_button = false;
71 71
72#ifndef BOOTLOADER
72 bool hold_button_old; 73 bool hold_button_old;
74#endif
73 bool remote_present; 75 bool remote_present;
74 76
75 /* check if we have remote connected */ 77 /* check if we have remote connected */
76 remote_present = remote_detect(); 78 remote_present = remote_detect();
77 79
78 /* read hold buttons status */ 80 /* read hold buttons status */
81#ifndef BOOTLOADER
79 hold_button_old = hold_button; 82 hold_button_old = hold_button;
83#endif
80 hold_button = button_hold(); 84 hold_button = button_hold();
81 remote_hold_button = remote_button_hold(); 85 remote_hold_button = remote_button_hold();
82 86
83#ifndef BOOTLOADER 87#ifndef BOOTLOADER
84 /* Only main hold affects backlight */ 88 /* Only main hold affects backlight */
85 if (hold_button != hold_button_old) 89 if (hold_button != hold_button_old)