|
@@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(time_lock);
|
|
unsigned long wtimer;
|
|
unsigned long wtimer;
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
#ifdef CONFIG_PM
|
|
-irqreturn_t counter0_irq(int irq, void *dev_id)
|
|
|
|
|
|
+static irqreturn_t counter0_irq(int irq, void *dev_id)
|
|
{
|
|
{
|
|
unsigned long pc0;
|
|
unsigned long pc0;
|
|
int time_elapsed;
|
|
int time_elapsed;
|
|
@@ -117,6 +117,13 @@ irqreturn_t counter0_irq(int irq, void *dev_id)
|
|
return IRQ_HANDLED;
|
|
return IRQ_HANDLED;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+struct irqaction counter0_action = {
|
|
|
|
+ .handler = counter0_irq,
|
|
|
|
+ .flags = IRQF_DISABLED,
|
|
|
|
+ .name = "alchemy-toy",
|
|
|
|
+ .dev_id = NULL,
|
|
|
|
+};
|
|
|
|
+
|
|
/* When we wakeup from sleep, we have to "catch up" on all of the
|
|
/* When we wakeup from sleep, we have to "catch up" on all of the
|
|
* timer ticks we have missed.
|
|
* timer ticks we have missed.
|
|
*/
|
|
*/
|
|
@@ -280,7 +287,7 @@ void __init plat_timer_setup(struct irqaction *irq)
|
|
au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
|
|
au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
|
|
au_sync();
|
|
au_sync();
|
|
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
|
|
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
|
|
- startup_match20_interrupt(counter0_irq);
|
|
|
|
|
|
+ setup_irq(AU1000_TOY_MATCH2_INT, &counter0_action);
|
|
|
|
|
|
/* We can use the real 'wait' instruction.
|
|
/* We can use the real 'wait' instruction.
|
|
*/
|
|
*/
|