Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162645
b: refs/heads/master
c: 0531d7b
h: refs/heads/master
i:
  162643: e1a81fe
v: v3
  • Loading branch information
Greg Ungerer committed Sep 15, 2009
1 parent 0392ffe commit acf8ea2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 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: 1985d2538cccdcdb444d03bc5994be82e85e1f60
refs/heads/master: 0531d7b36b9894b60ba9c0633993d49a813555ff
44 changes: 29 additions & 15 deletions trunk/arch/m68knommu/platform/68360/ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,33 @@ extern void *_ramvec[];
/* The number of spurious interrupts */
volatile unsigned int num_spurious;

static void intc_irq_unmask(unsigned int irq)
{
pquicc->intr_cimr |= (1 << irq);
}

static void intc_irq_mask(unsigned int irq)
{
pquicc->intr_cimr &= ~(1 << irq);
}

static void intc_irq_ack(unsigned int irq)
{
pquicc->intr_cisr = (1 << irq);
}

static struct irq_chip intc_irq_chip = {
.name = "M68K-INTC",
.mask = intc_irq_mask,
.unmask = intc_irq_unmask,
.ack = intc_irq_ack,
};

/*
* This function should be called during kernel startup to initialize
* the vector table.
*/
void init_vectors(void)
void init_IRQ(void)
{
int i;
int vba = (CPM_VECTOR_BASE<<4);
Expand Down Expand Up @@ -109,20 +131,12 @@ void init_vectors(void)

/* turn off all CPM interrupts */
pquicc->intr_cimr = 0x00000000;
}

void enable_vector(unsigned int irq)
{
pquicc->intr_cimr |= (1 << irq);
}

void disable_vector(unsigned int irq)
{
pquicc->intr_cimr &= ~(1 << irq);
}

void ack_vector(unsigned int irq)
{
pquicc->intr_cisr = (1 << irq);
for (i = 0; (i < NR_IRQS); i++) {
irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].action = NULL;
irq_desc[i].depth = 1;
irq_desc[i].chip = &intc_irq_chip;
}
}

0 comments on commit acf8ea2

Please sign in to comment.