Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133352
b: refs/heads/master
c: 3bf5092
h: refs/heads/master
v: v3
  • Loading branch information
Rafael Ignacio Zurita authored and Paul Mundt committed Mar 20, 2009
1 parent cc82143 commit ef3332b
Show file tree
Hide file tree
Showing 4 changed files with 18 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: 7a8fe8e320251d25274e89f610ffee936769250a
refs/heads/master: 3bf509230a626d11cba0e0145f552918092f586d
1 change: 0 additions & 1 deletion trunk/arch/sh/boards/mach-hp6xx/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ static struct sh_machine_vector mv_hp6xx __initmv = {
.mv_setup = hp6xx_setup,
/* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */
.mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6,
.mv_irq_demux = hd64461_irq_demux,
/* Enable IRQ0 -> IRQ3 in IRQ_MODE */
.mv_init_irq = hp6xx_init_irq,
};
30 changes: 17 additions & 13 deletions trunk/arch/sh/cchips/hd6446x/hd64461.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,22 @@ static struct irq_chip hd64461_irq_chip = {
.unmask = hd64461_unmask_irq,
};

int hd64461_irq_demux(int irq)
static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc)
{
if (irq == CONFIG_HD64461_IRQ) {
unsigned short bit;
unsigned short nirr = inw(HD64461_NIRR);
unsigned short nimr = inw(HD64461_NIMR);
int i;

nirr &= ~nimr;
for (bit = 1, i = 0; i < 16; bit <<= 1, i++)
if (nirr & bit)
break;
irq = HD64461_IRQBASE + i;
unsigned short intv = ctrl_inw(HD64461_NIRR);
struct irq_desc *ext_desc;
unsigned int ext_irq = HD64461_IRQBASE;

intv &= (1 << HD64461_IRQ_NUM) - 1;

while (intv) {
if (intv & 1) {
ext_desc = irq_desc + ext_irq;
handle_level_irq(ext_irq, ext_desc);
}
intv >>= 1;
ext_irq++;
}
return irq;
}

int __init setup_hd64461(void)
Expand All @@ -93,6 +94,9 @@ int __init setup_hd64461(void)
set_irq_chip_and_handler(i, &hd64461_irq_chip,
handle_level_irq);

set_irq_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux);
set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW);

#ifdef CONFIG_HD64461_ENABLER
printk(KERN_INFO "HD64461: enabling PCMCIA devices\n");
__raw_writeb(0x4c, HD64461_PCC1CSCIER);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sh/include/asm/hd64461.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@
#include <asm/io_generic.h>

/* arch/sh/cchips/hd6446x/hd64461/setup.c */
int hd64461_irq_demux(int irq);
void hd64461_register_irq_demux(int irq,
int (*demux) (int irq, void *dev), void *dev);
void hd64461_unregister_irq_demux(int irq);
Expand Down

0 comments on commit ef3332b

Please sign in to comment.