Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72766
b: refs/heads/master
c: 310a09d
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Oct 29, 2007
1 parent dcde5b5 commit 3b43c10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be5f1f2114665508a722e3924a3a7f477c502841
refs/heads/master: 310a09d8508b8e048c7efdf53bb91f2cd787b58e
32 changes: 0 additions & 32 deletions trunk/arch/mips/au1000/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,38 +318,6 @@ static struct irq_chip level_irq_type = {
.end = end_irq,
};

#ifdef CONFIG_PM
void startup_match20_interrupt(irq_handler_t handler)
{
struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT];

static struct irqaction action;
memset(&action, 0, sizeof(struct irqaction));

/*
* This is a big problem.... since we didn't use request_irq
* when kernel/irq.c calls probe_irq_xxx this interrupt will
* be probed for usage. This will end up disabling the device :(
* Give it a bogus "action" pointer -- this will keep it from
* getting auto-probed!
*
* By setting the status to match that of request_irq() we
* can avoid it. --cgray
*/
action.dev_id = handler;
action.flags = IRQF_DISABLED;
cpus_clear(action.mask);
action.name = "Au1xxx TOY";
action.handler = handler;
action.next = NULL;

desc->action = &action;
desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);

local_enable_irq(AU1000_TOY_MATCH2_INT);
}
#endif

static void __init setup_local_irq(unsigned int irq_nr, int type, int int_req)
{
unsigned int bit = irq_nr - AU1000_INTC0_INT_BASE;
Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/mips/au1000/common/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(time_lock);
unsigned long wtimer;

#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;
int time_elapsed;
Expand Down Expand Up @@ -117,6 +117,13 @@ irqreturn_t counter0_irq(int irq, void *dev_id)
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
* timer ticks we have missed.
*/
Expand Down Expand Up @@ -280,7 +287,7 @@ void __init plat_timer_setup(struct irqaction *irq)
au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
au_sync();
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.
*/
Expand Down

0 comments on commit 3b43c10

Please sign in to comment.