summaryrefslogtreecommitdiff
path: root/firmware/target/arm/system-pp502x.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/system-pp502x.c')
-rw-r--r--firmware/target/arm/system-pp502x.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c
index 1f1cdf47b6..72e3a9b361 100644
--- a/firmware/target/arm/system-pp502x.c
+++ b/firmware/target/arm/system-pp502x.c
@@ -56,12 +56,21 @@ void irq(void)
56/* TODO: this should really be in the target tree, but moving it there caused 56/* TODO: this should really be in the target tree, but moving it there caused
57 crt0.S not to find it while linking */ 57 crt0.S not to find it while linking */
58/* TODO: Even if it isn't in the target tree, this should be the default case */ 58/* TODO: Even if it isn't in the target tree, this should be the default case */
59extern void button_int(void);
60extern void clickwheel_int(void);
61
59void irq(void) 62void irq(void)
60{ 63{
61 if(CURRENT_CORE == CPU) 64 if(CURRENT_CORE == CPU) {
62 { 65 if (CPU_INT_STAT & TIMER1_MASK) {
63 if (CPU_INT_STAT & TIMER1_MASK) 66#ifdef SANSA_E200
67 if (GPIOF_INT_STAT & 0xff)
68 button_int();
69 if (GPIOH_INT_STAT & 0xc0)
70 clickwheel_int();
71#endif
64 TIMER1(); 72 TIMER1();
73 }
65 else if (CPU_INT_STAT & TIMER2_MASK) 74 else if (CPU_INT_STAT & TIMER2_MASK)
66 TIMER2(); 75 TIMER2();
67 } else { 76 } else {
@@ -222,7 +231,20 @@ void system_init(void)
222 COP_INT_CLR = -1; 231 COP_INT_CLR = -1;
223 CPU_INT_CLR = -1; 232 CPU_INT_CLR = -1;
224 INT_FORCED_CLR = -1; 233 INT_FORCED_CLR = -1;
225 234
235 GPIOA_INT_EN = 0;
236 GPIOB_INT_EN = 0;
237 GPIOC_INT_EN = 0;
238 GPIOD_INT_EN = 0;
239 GPIOE_INT_EN = 0;
240 GPIOF_INT_EN = 0;
241 GPIOG_INT_EN = 0;
242 GPIOH_INT_EN = 0;
243 GPIOI_INT_EN = 0;
244 GPIOJ_INT_EN = 0;
245 GPIOK_INT_EN = 0;
246 GPIOL_INT_EN = 0;
247
226# if NUM_CORES > 1 && defined(HAVE_ADJUSTABLE_CPU_FREQ) 248# if NUM_CORES > 1 && defined(HAVE_ADJUSTABLE_CPU_FREQ)
227 spinlock_init(&boostctrl_mtx); 249 spinlock_init(&boostctrl_mtx);
228# endif 250# endif