diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/iriver/h10/adc-h10.c | 90 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/adc-target.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/button-h10.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/powermgmt-h10.c | 18 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/power-c200_e200.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/system-pp502x.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/usb-fw-pp502x.c | 4 | ||||
-rw-r--r-- | firmware/target/arm/wmcodec-pp.c | 2 |
10 files changed, 92 insertions, 57 deletions
diff --git a/firmware/target/arm/iriver/h10/adc-h10.c b/firmware/target/arm/iriver/h10/adc-h10.c index df9b16359b..f63e8b8013 100644 --- a/firmware/target/arm/iriver/h10/adc-h10.c +++ b/firmware/target/arm/iriver/h10/adc-h10.c | |||
@@ -25,29 +25,21 @@ | |||
25 | 25 | ||
26 | static unsigned short adcdata[NUM_ADC_CHANNELS]; | 26 | static unsigned short adcdata[NUM_ADC_CHANNELS]; |
27 | 27 | ||
28 | /* Scan ADC so that adcdata[channel] gets updated */ | 28 | /* Scan ADC so that adcdata[channel] gets updated. */ |
29 | unsigned short adc_scan(int channel) | 29 | unsigned short adc_scan(int channel) |
30 | { | 30 | { |
31 | unsigned int adc_data_1; | 31 | unsigned int adc_data_1; |
32 | unsigned int adc_data_2; | 32 | unsigned int adc_data_2; |
33 | 33 | ||
34 | /* Initialise */ | 34 | /* Start conversion */ |
35 | ADC_ADDR=0x130; | 35 | ADC_ADDR |= 0x80000000; |
36 | ADC_STATUS=0; /* 4 bytes, 1 per channel. Each byte is 0 if the channel is | ||
37 | off, 0x40 if the channel is on */ | ||
38 | 36 | ||
39 | /* Enable Channel */ | 37 | /* Wait for conversion to complete */ |
40 | ADC_ADDR |= (0x1000000<<channel); | 38 | while((ADC_STATUS & (0x40<<8*channel))==0); |
39 | |||
40 | /* Stop conversion */ | ||
41 | ADC_ADDR &=~ 0x80000000; | ||
41 | 42 | ||
42 | /* Start? */ | ||
43 | ADC_ADDR |= 0x20000000; | ||
44 | ADC_ADDR |= 0x80000000; | ||
45 | |||
46 | #if 0 | ||
47 | /* wait for ADC ready. THIS IS NOT WORKING (locks up) */ | ||
48 | while(ADC_STATUS & (0x40 << (channel*8))); /* add loop protection here */ | ||
49 | #endif | ||
50 | |||
51 | /* ADC_DATA_1 and ADC_DATA_2 are both four bytes, one byte per channel. | 43 | /* ADC_DATA_1 and ADC_DATA_2 are both four bytes, one byte per channel. |
52 | For each channel, ADC_DATA_1 stores the 8-bit msb, ADC_DATA_2 stores the | 44 | For each channel, ADC_DATA_1 stores the 8-bit msb, ADC_DATA_2 stores the |
53 | 2-bit lsb (in bits 0 and 1). Each channel is 10 bits total. */ | 45 | 2-bit lsb (in bits 0 and 1). Each channel is 10 bits total. */ |
@@ -56,6 +48,13 @@ unsigned short adc_scan(int channel) | |||
56 | 48 | ||
57 | adcdata[channel] = (adc_data_1<<2 | adc_data_2); | 49 | adcdata[channel] = (adc_data_1<<2 | adc_data_2); |
58 | 50 | ||
51 | /* ADC values read low if PLL is enabled */ | ||
52 | if(PLL_CONTROL & 0x80000000){ | ||
53 | adcdata[channel] += 0x14; | ||
54 | if(adcdata[channel] > 0x400) | ||
55 | adcdata[channel] = 0x400; | ||
56 | } | ||
57 | |||
59 | return adcdata[channel]; | 58 | return adcdata[channel]; |
60 | } | 59 | } |
61 | 60 | ||
@@ -79,25 +78,64 @@ static void adc_tick(void) | |||
79 | } | 78 | } |
80 | } | 79 | } |
81 | 80 | ||
81 | /* Figured out from how the OF does things */ | ||
82 | void adc_init(void) | 82 | void adc_init(void) |
83 | { | 83 | { |
84 | /* Enable ADC */ | 84 | ADC_INIT |= 1; |
85 | ADC_ENABLE_ADDR |= ADC_ENABLE; | 85 | ADC_INIT |= 0x40000000; |
86 | udelay(100); | ||
87 | |||
88 | /* Reset ADC */ | ||
89 | DEV_RS2 |= 0x20; | ||
90 | udelay(100); | ||
91 | |||
92 | DEV_RS2 &=~ 0x20; | ||
93 | udelay(100); | ||
86 | 94 | ||
87 | /* Initialise */ | 95 | /* Enable ADC */ |
88 | ADC_INIT=0; | 96 | DEV_EN2 |= 0x20; |
97 | udelay(100); | ||
98 | |||
99 | ADC_CLOCK_SRC |= 0x3; | ||
100 | udelay(100); | ||
101 | |||
102 | ADC_ADDR |= 0x40; | ||
103 | ADC_ADDR |= 0x20000000; | ||
104 | udelay(100); | ||
105 | |||
106 | ADC_INIT; | ||
107 | ADC_INIT = 0; | ||
108 | udelay(100); | ||
109 | |||
110 | ADC_STATUS = 0; | ||
111 | |||
112 | /* Enable channel 0 (battery) */ | ||
113 | DEV_INIT1 &=~0x3; | ||
114 | ADC_ADDR |= 0x1000000; | ||
115 | ADC_STATUS |= 0x20; | ||
116 | |||
117 | /* Enable channel 1 (unknown, temperature?) */ | ||
118 | DEV_INIT1 &=~30; | ||
119 | ADC_ADDR |= 0x2000000; | ||
120 | ADC_STATUS |= 0x2000; | ||
121 | |||
122 | /* Enable channel 2 (remote) */ | ||
123 | DEV_INIT1 &=~0x300; | ||
124 | DEV_INIT1 |= 0x100; | ||
125 | ADC_ADDR |= 0x4000000; | ||
126 | ADC_STATUS |= 0x200000; | ||
127 | |||
128 | /* Enable channel 3 (scroll pad) */ | ||
129 | DEV_INIT1 &=~0x3000; | ||
130 | DEV_INIT1 |= 0x1000; | ||
131 | ADC_ADDR |= 0x8000000; | ||
132 | ADC_STATUS |= 0x20000000; | ||
89 | 133 | ||
90 | /* Force a scan of all channels to get initial values */ | 134 | /* Force a scan of all channels to get initial values */ |
91 | adc_scan(ADC_BATTERY); | 135 | adc_scan(ADC_BATTERY); |
92 | adc_scan(ADC_UNKNOWN_1); | 136 | adc_scan(ADC_UNKNOWN_1); |
93 | adc_scan(ADC_REMOTE); | 137 | adc_scan(ADC_REMOTE); |
94 | adc_scan(ADC_SCROLLPAD); | 138 | adc_scan(ADC_SCROLLPAD); |
95 | |||
96 | /* FIXME: The ADC sometimes reads 0 for the battery | ||
97 | voltage for the first few seconds. It would be better to fix this by | ||
98 | figuring out how to use the ADC properly. Until then, work around the | ||
99 | problem by waiting until it reads a proper value*/ | ||
100 | while(adc_scan(ADC_UNREG_POWER)==0); | ||
101 | 139 | ||
102 | tick_add_task(adc_tick); | 140 | tick_add_task(adc_tick); |
103 | } | 141 | } |
diff --git a/firmware/target/arm/iriver/h10/adc-target.h b/firmware/target/arm/iriver/h10/adc-target.h index 741c293baa..f761e761ef 100644 --- a/firmware/target/arm/iriver/h10/adc-target.h +++ b/firmware/target/arm/iriver/h10/adc-target.h | |||
@@ -19,9 +19,6 @@ | |||
19 | #ifndef _ADC_TARGET_H_ | 19 | #ifndef _ADC_TARGET_H_ |
20 | #define _ADC_TARGET_H_ | 20 | #define _ADC_TARGET_H_ |
21 | 21 | ||
22 | #define ADC_ENABLE_ADDR (*(volatile unsigned long*)(0x70000010)) | ||
23 | #define ADC_ENABLE 0x1100 | ||
24 | |||
25 | #define ADC_ADDR (*(volatile unsigned long*)(0x7000ad00)) | 22 | #define ADC_ADDR (*(volatile unsigned long*)(0x7000ad00)) |
26 | #define ADC_STATUS (*(volatile unsigned long*)(0x7000ad04)) | 23 | #define ADC_STATUS (*(volatile unsigned long*)(0x7000ad04)) |
27 | #define ADC_DATA_1 (*(volatile unsigned long*)(0x7000ad20)) | 24 | #define ADC_DATA_1 (*(volatile unsigned long*)(0x7000ad20)) |
diff --git a/firmware/target/arm/iriver/h10/button-h10.c b/firmware/target/arm/iriver/h10/button-h10.c index d8a82cf170..ac09d245e6 100644 --- a/firmware/target/arm/iriver/h10/button-h10.c +++ b/firmware/target/arm/iriver/h10/button-h10.c | |||
@@ -52,7 +52,7 @@ bool button_hold(void) | |||
52 | 52 | ||
53 | bool remote_button_hold(void) | 53 | bool remote_button_hold(void) |
54 | { | 54 | { |
55 | return adc_scan(ADC_REMOTE) < 0x17; | 55 | return adc_scan(ADC_REMOTE) < 0x2B; |
56 | } | 56 | } |
57 | 57 | ||
58 | /* | 58 | /* |
@@ -102,7 +102,7 @@ int button_read_device(void) | |||
102 | data = adc_scan(ADC_SCROLLPAD); | 102 | data = adc_scan(ADC_SCROLLPAD); |
103 | GPIOD_OUTPUT_VAL |= 0x40; | 103 | GPIOD_OUTPUT_VAL |= 0x40; |
104 | 104 | ||
105 | if(data < 0x210) | 105 | if(data < 0x224) |
106 | { | 106 | { |
107 | btn |= BUTTON_SCROLL_DOWN; | 107 | btn |= BUTTON_SCROLL_DOWN; |
108 | } else { | 108 | } else { |
@@ -115,7 +115,7 @@ int button_read_device(void) | |||
115 | remote_hold_button_old = remote_hold_button; | 115 | remote_hold_button_old = remote_hold_button; |
116 | 116 | ||
117 | data = adc_scan(ADC_REMOTE); | 117 | data = adc_scan(ADC_REMOTE); |
118 | remote_hold_button = data < 0x17; | 118 | remote_hold_button = data < 0x2B; |
119 | 119 | ||
120 | #ifndef BOOTLOADER | 120 | #ifndef BOOTLOADER |
121 | if (remote_hold_button != remote_hold_button_old) | 121 | if (remote_hold_button != remote_hold_button_old) |
@@ -126,13 +126,13 @@ int button_read_device(void) | |||
126 | { | 126 | { |
127 | if (data < 0x3FF) | 127 | if (data < 0x3FF) |
128 | { | 128 | { |
129 | if(data < 0x1F0) | 129 | if(data < 0x204) |
130 | if(data < 0x141) | 130 | if(data < 0x155) |
131 | btn |= BUTTON_RC_FF; | 131 | btn |= BUTTON_RC_FF; |
132 | else | 132 | else |
133 | btn |= BUTTON_RC_REW; | 133 | btn |= BUTTON_RC_REW; |
134 | else | 134 | else |
135 | if(data < 0x2BC) | 135 | if(data < 0x2D0) |
136 | btn |= BUTTON_RC_VOL_DOWN; | 136 | btn |= BUTTON_RC_VOL_DOWN; |
137 | else | 137 | else |
138 | btn |= BUTTON_RC_VOL_UP; | 138 | btn |= BUTTON_RC_VOL_UP; |
diff --git a/firmware/target/arm/iriver/h10/powermgmt-h10.c b/firmware/target/arm/iriver/h10/powermgmt-h10.c index 18e3879c43..6f8cd12276 100644 --- a/firmware/target/arm/iriver/h10/powermgmt-h10.c +++ b/firmware/target/arm/iriver/h10/powermgmt-h10.c | |||
@@ -25,18 +25,18 @@ | |||
25 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | 25 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = |
26 | { | 26 | { |
27 | #ifdef IRIVER_H10 | 27 | #ifdef IRIVER_H10 |
28 | 3760 | 28 | 3733 |
29 | #elif defined IRIVER_H10_5GB | 29 | #elif defined IRIVER_H10_5GB |
30 | 3720 | 30 | 3695 |
31 | #endif | 31 | #endif |
32 | }; | 32 | }; |
33 | 33 | ||
34 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | 34 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = |
35 | { | 35 | { |
36 | #ifdef IRIVER_H10 | 36 | #ifdef IRIVER_H10 |
37 | 3650 | 37 | 3627 |
38 | #elif defined IRIVER_H10_5GB | 38 | #elif defined IRIVER_H10_5GB |
39 | 3650 | 39 | 3627 |
40 | #endif | 40 | #endif |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -44,9 +44,9 @@ const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | |||
44 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | 44 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = |
45 | { | 45 | { |
46 | #ifdef IRIVER_H10 | 46 | #ifdef IRIVER_H10 |
47 | { 3760, 3800, 3850, 3870, 3900, 3950, 4020, 4070, 4110, 4180, 4240 } | 47 | { 3733, 3772, 3821, 3840, 3869, 3917, 3985, 4034, 4072, 4140, 4198 } |
48 | #elif defined IRIVER_H10_5GB | 48 | #elif defined IRIVER_H10_5GB |
49 | { 3720, 3740, 3800, 3820, 3840, 3880, 3940, 4020, 4060, 4150, 4240 } | 49 | { 3695, 3714, 3772, 3791, 3811, 3850, 3908, 3985, 4024, 4111, 4198 } |
50 | #endif | 50 | #endif |
51 | }; | 51 | }; |
52 | 52 | ||
@@ -54,14 +54,14 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | |||
54 | const unsigned short percent_to_volt_charge[11] = | 54 | const unsigned short percent_to_volt_charge[11] = |
55 | { | 55 | { |
56 | #ifdef IRIVER_H10 | 56 | #ifdef IRIVER_H10 |
57 | 3990, 4030, 4060, 4080, 4100, 4120, 4150, 4180, 4220, 4260, 4310 | 57 | 3956, 3995, 4024, 4043, 4063, 4082, 4111, 4140, 4179, 4218, 4266 |
58 | #elif defined IRIVER_H10_5GB | 58 | #elif defined IRIVER_H10_5GB |
59 | /* TODO: Not yet calibrated */ | 59 | /* TODO: Not yet calibrated */ |
60 | 3880, 3920, 3960, 4000, 4060, 4100, 4150, 4190, 4240, 4280, 4330 | 60 | 3850, 3888, 3927, 3966, 4024, 4063, 4111, 4150, 4198, 4237, 4286 |
61 | #endif | 61 | #endif |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #define BATTERY_SCALE_FACTOR 4800 | 64 | #define BATTERY_SCALE_FACTOR 4650 |
65 | /* full-scale ADC readout (2^10) in millivolt */ | 65 | /* full-scale ADC readout (2^10) in millivolt */ |
66 | 66 | ||
67 | /* Returns battery voltage from ADC [millivolts] */ | 67 | /* Returns battery voltage from ADC [millivolts] */ |
diff --git a/firmware/target/arm/sandisk/power-c200_e200.c b/firmware/target/arm/sandisk/power-c200_e200.c index 910c3aaead..8745aa3fb6 100644 --- a/firmware/target/arm/sandisk/power-c200_e200.c +++ b/firmware/target/arm/sandisk/power-c200_e200.c | |||
@@ -85,7 +85,7 @@ bool tuner_power_nolock(bool status) | |||
85 | #if defined(SANSA_E200) | 85 | #if defined(SANSA_E200) |
86 | outl(inl(0x70000084) | 0x1, 0x70000084); | 86 | outl(inl(0x70000084) | 0x1, 0x70000084); |
87 | #else /* SANSA_C200 */ | 87 | #else /* SANSA_C200 */ |
88 | DEV_INIT &= ~0x800; | 88 | DEV_INIT2 &= ~0x800; |
89 | #endif | 89 | #endif |
90 | udelay(5); | 90 | udelay(5); |
91 | 91 | ||
@@ -120,7 +120,7 @@ bool tuner_power_nolock(bool status) | |||
120 | #if defined (SANSA_E200) | 120 | #if defined (SANSA_E200) |
121 | outl(inl(0x70000084) & ~0x1, 0x70000084); | 121 | outl(inl(0x70000084) & ~0x1, 0x70000084); |
122 | #else | 122 | #else |
123 | DEV_INIT |= 0x800; | 123 | DEV_INIT2 |= 0x800; |
124 | #endif | 124 | #endif |
125 | } | 125 | } |
126 | 126 | ||
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c index 24a7585508..5975ab159d 100644 --- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c +++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | |||
@@ -88,7 +88,7 @@ void lcd_init_device(void) | |||
88 | outl(inl(0x70000010) & ~0xfc000000, 0x70000010); | 88 | outl(inl(0x70000010) & ~0xfc000000, 0x70000010); |
89 | outl(inl(0x70000010), 0x70000010); | 89 | outl(inl(0x70000010), 0x70000010); |
90 | 90 | ||
91 | DEV_INIT &= ~0x400; | 91 | DEV_INIT2 &= ~0x400; |
92 | udelay(10000); | 92 | udelay(10000); |
93 | 93 | ||
94 | LCD1_CONTROL &= ~0x4; | 94 | LCD1_CONTROL &= ~0x4; |
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c index 41926bb885..bf1fcf9926 100644 --- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | |||
@@ -372,7 +372,7 @@ void lcd_init_device(void) | |||
372 | /* Controller init */ | 372 | /* Controller init */ |
373 | outl((inl(0x70000084) | (1 << 28)), 0x70000084); | 373 | outl((inl(0x70000084) | (1 << 28)), 0x70000084); |
374 | outl((inl(0x70000080) & ~(1 << 28)), 0x70000080); | 374 | outl((inl(0x70000080) & ~(1 << 28)), 0x70000080); |
375 | outl(((inl(0x70000010) & (0x03ffffff)) | (0x15 << 26)), 0x70000010); | 375 | DEV_INIT1 = ( (DEV_INIT1 & 0x03ffffff) | (0x15 << 26) ); |
376 | outl(((inl(0x70000014) & (0x0fffffff)) | (0x5 << 28)), 0x70000014); | 376 | outl(((inl(0x70000014) & (0x0fffffff)) | (0x5 << 28)), 0x70000014); |
377 | outl((inl(0x70000020) & ~(0x3 << 10)), 0x70000020); | 377 | outl((inl(0x70000020) & ~(0x3 << 10)), 0x70000020); |
378 | DEV_EN |= DEV_LCD; /* Enable controller */ | 378 | DEV_EN |= DEV_LCD; /* Enable controller */ |
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c index d24d19f747..0882d9f212 100644 --- a/firmware/target/arm/system-pp502x.c +++ b/firmware/target/arm/system-pp502x.c | |||
@@ -240,17 +240,17 @@ void system_init(void) | |||
240 | { | 240 | { |
241 | #if defined(SANSA_E200) || defined(SANSA_C200) | 241 | #if defined(SANSA_E200) || defined(SANSA_C200) |
242 | /* Reset all devices */ | 242 | /* Reset all devices */ |
243 | DEV_OFF_MASK |= 0x20; | 243 | DEV_RS2 |= 0x20; |
244 | DEV_RS = 0x3bfffef8; | 244 | DEV_RS = 0x3bfffef8; |
245 | DEV_OFF_MASK = -1; | 245 | DEV_RS2 = -1; |
246 | DEV_RS = 0; | 246 | DEV_RS = 0; |
247 | DEV_OFF_MASK = 0; | 247 | DEV_RS2 = 0; |
248 | #elif defined (IRIVER_H10) | 248 | #elif defined (IRIVER_H10) |
249 | DEV_RS = 0x3ffffef8; | 249 | DEV_RS = 0x3ffffef8; |
250 | DEV_OFF_MASK = -1; | 250 | DEV_RS2 = -1; |
251 | outl(inl(0x70000024) | 0xc0, 0x70000024); | 251 | outl(inl(0x70000024) | 0xc0, 0x70000024); |
252 | DEV_RS = 0; | 252 | DEV_RS = 0; |
253 | DEV_OFF_MASK = 0; | 253 | DEV_RS2 = 0; |
254 | #endif | 254 | #endif |
255 | 255 | ||
256 | #if !defined(SANSA_E200) && !defined(SANSA_C200) | 256 | #if !defined(SANSA_E200) && !defined(SANSA_C200) |
@@ -289,7 +289,7 @@ void system_init(void) | |||
289 | outl(inl(0x6000a000) | 0x80000000, 0x6000a000); /* Init DMA controller? */ | 289 | outl(inl(0x6000a000) | 0x80000000, 0x6000a000); /* Init DMA controller? */ |
290 | #endif | 290 | #endif |
291 | 291 | ||
292 | DEV_INIT |= 1 << 30; /* enable PLL power */ | 292 | DEV_INIT2 |= 1 << 30; /* enable PLL power */ |
293 | 293 | ||
294 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 294 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
295 | #if NUM_CORES > 1 | 295 | #if NUM_CORES > 1 |
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c index 792a1b0131..7d197f03b8 100644 --- a/firmware/target/arm/usb-fw-pp502x.c +++ b/firmware/target/arm/usb-fw-pp502x.c | |||
@@ -44,7 +44,7 @@ void usb_init_device(void) | |||
44 | DEV_RS |= DEV_USB; /* reset usb start */ | 44 | DEV_RS |= DEV_USB; /* reset usb start */ |
45 | DEV_RS &=~DEV_USB;/* reset usb end */ | 45 | DEV_RS &=~DEV_USB;/* reset usb end */ |
46 | 46 | ||
47 | DEV_INIT |= INIT_USB; | 47 | DEV_INIT2 |= INIT_USB; |
48 | while ((inl(0x70000028) & 0x80) == 0); | 48 | while ((inl(0x70000028) & 0x80) == 0); |
49 | 49 | ||
50 | UDC_PORTSC1 |= PORTSCX_PORT_RESET; | 50 | UDC_PORTSC1 |= PORTSCX_PORT_RESET; |
@@ -70,7 +70,7 @@ void usb_init_device(void) | |||
70 | 70 | ||
71 | /* Note from IPL source (referring to next 5 lines of code: | 71 | /* Note from IPL source (referring to next 5 lines of code: |
72 | THIS NEEDS TO BE CHANGED ONCE THERE IS KERNEL USB */ | 72 | THIS NEEDS TO BE CHANGED ONCE THERE IS KERNEL USB */ |
73 | DEV_INIT |= INIT_USB; | 73 | DEV_INIT2 |= INIT_USB; |
74 | DEV_EN |= DEV_USB; | 74 | DEV_EN |= DEV_USB; |
75 | while ((inl(0x70000028) & 0x80) == 0); | 75 | while ((inl(0x70000028) & 0x80) == 0); |
76 | outl(inl(0x70000028) | 0x2, 0x70000028); | 76 | outl(inl(0x70000028) | 0x2, 0x70000028); |
diff --git a/firmware/target/arm/wmcodec-pp.c b/firmware/target/arm/wmcodec-pp.c index a2c83f33b3..3dd00695ae 100644 --- a/firmware/target/arm/wmcodec-pp.c +++ b/firmware/target/arm/wmcodec-pp.c | |||
@@ -46,7 +46,7 @@ void audiohw_init(void) { | |||
46 | 46 | ||
47 | #ifdef CPU_PP502x | 47 | #ifdef CPU_PP502x |
48 | /* normal outputs for CDI and I2S pin groups */ | 48 | /* normal outputs for CDI and I2S pin groups */ |
49 | DEV_INIT &= ~0x300; | 49 | DEV_INIT2 &= ~0x300; |
50 | 50 | ||
51 | /*mini2?*/ | 51 | /*mini2?*/ |
52 | outl(inl(0x70000010) & ~0x3000000, 0x70000010); | 52 | outl(inl(0x70000010) & ~0x3000000, 0x70000010); |