sh: mach-se: irq_data conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
e28abafbab
commit
15ff2c67ab
|
@ -25,8 +25,9 @@
|
||||||
#define INTC_IPR01 0xfffe0818
|
#define INTC_IPR01 0xfffe0818
|
||||||
#define INTC_ICR1 0xfffe0802
|
#define INTC_ICR1 0xfffe0802
|
||||||
|
|
||||||
static void disable_se7206_irq(unsigned int irq)
|
static void disable_se7206_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
unsigned short val;
|
unsigned short val;
|
||||||
unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq)));
|
unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq)));
|
||||||
unsigned short msk0,msk1;
|
unsigned short msk0,msk1;
|
||||||
|
@ -55,8 +56,9 @@ static void disable_se7206_irq(unsigned int irq)
|
||||||
__raw_writew(msk1, INTMSK1);
|
__raw_writew(msk1, INTMSK1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_se7206_irq(unsigned int irq)
|
static void enable_se7206_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
unsigned short val;
|
unsigned short val;
|
||||||
unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq)));
|
unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq)));
|
||||||
unsigned short msk0,msk1;
|
unsigned short msk0,msk1;
|
||||||
|
@ -86,13 +88,14 @@ static void enable_se7206_irq(unsigned int irq)
|
||||||
__raw_writew(msk1, INTMSK1);
|
__raw_writew(msk1, INTMSK1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void eoi_se7206_irq(unsigned int irq)
|
static void eoi_se7206_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned short sts0,sts1;
|
unsigned short sts0,sts1;
|
||||||
|
unsigned int irq = data->irq;
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
struct irq_desc *desc = irq_to_desc(irq);
|
||||||
|
|
||||||
if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
||||||
enable_se7206_irq(irq);
|
enable_se7206_irq(data);
|
||||||
/* FPGA isr clear */
|
/* FPGA isr clear */
|
||||||
sts0 = __raw_readw(INTSTS0);
|
sts0 = __raw_readw(INTSTS0);
|
||||||
sts1 = __raw_readw(INTSTS1);
|
sts1 = __raw_readw(INTSTS1);
|
||||||
|
@ -115,10 +118,9 @@ static void eoi_se7206_irq(unsigned int irq)
|
||||||
|
|
||||||
static struct irq_chip se7206_irq_chip __read_mostly = {
|
static struct irq_chip se7206_irq_chip __read_mostly = {
|
||||||
.name = "SE7206-FPGA",
|
.name = "SE7206-FPGA",
|
||||||
.mask = disable_se7206_irq,
|
.irq_mask = disable_se7206_irq,
|
||||||
.unmask = enable_se7206_irq,
|
.irq_unmask = enable_se7206_irq,
|
||||||
.mask_ack = disable_se7206_irq,
|
.irq_eoi = eoi_se7206_irq,
|
||||||
.eoi = eoi_se7206_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void make_se7206_irq(unsigned int irq)
|
static void make_se7206_irq(unsigned int irq)
|
||||||
|
@ -126,7 +128,7 @@ static void make_se7206_irq(unsigned int irq)
|
||||||
disable_irq_nosync(irq);
|
disable_irq_nosync(irq);
|
||||||
set_irq_chip_and_handler_name(irq, &se7206_irq_chip,
|
set_irq_chip_and_handler_name(irq, &se7206_irq_chip,
|
||||||
handle_level_irq, "level");
|
handle_level_irq, "level");
|
||||||
disable_se7206_irq(irq);
|
disable_se7206_irq(irq_get_irq_data(irq));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -18,23 +18,22 @@
|
||||||
|
|
||||||
unsigned int se7343_fpga_irq[SE7343_FPGA_IRQ_NR] = { 0, };
|
unsigned int se7343_fpga_irq[SE7343_FPGA_IRQ_NR] = { 0, };
|
||||||
|
|
||||||
static void disable_se7343_irq(unsigned int irq)
|
static void disable_se7343_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned int bit = (unsigned int)get_irq_chip_data(irq);
|
unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
|
||||||
__raw_writew(__raw_readw(PA_CPLD_IMSK) | 1 << bit, PA_CPLD_IMSK);
|
__raw_writew(__raw_readw(PA_CPLD_IMSK) | 1 << bit, PA_CPLD_IMSK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_se7343_irq(unsigned int irq)
|
static void enable_se7343_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned int bit = (unsigned int)get_irq_chip_data(irq);
|
unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
|
||||||
__raw_writew(__raw_readw(PA_CPLD_IMSK) & ~(1 << bit), PA_CPLD_IMSK);
|
__raw_writew(__raw_readw(PA_CPLD_IMSK) & ~(1 << bit), PA_CPLD_IMSK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip se7343_irq_chip __read_mostly = {
|
static struct irq_chip se7343_irq_chip __read_mostly = {
|
||||||
.name = "SE7343-FPGA",
|
.name = "SE7343-FPGA",
|
||||||
.mask = disable_se7343_irq,
|
.irq_mask = disable_se7343_irq,
|
||||||
.unmask = enable_se7343_irq,
|
.irq_unmask = enable_se7343_irq,
|
||||||
.mask_ack = disable_se7343_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
|
static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||||
|
|
|
@ -18,23 +18,22 @@
|
||||||
|
|
||||||
unsigned int se7722_fpga_irq[SE7722_FPGA_IRQ_NR] = { 0, };
|
unsigned int se7722_fpga_irq[SE7722_FPGA_IRQ_NR] = { 0, };
|
||||||
|
|
||||||
static void disable_se7722_irq(unsigned int irq)
|
static void disable_se7722_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned int bit = (unsigned int)get_irq_chip_data(irq);
|
unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
|
||||||
__raw_writew(__raw_readw(IRQ01_MASK) | 1 << bit, IRQ01_MASK);
|
__raw_writew(__raw_readw(IRQ01_MASK) | 1 << bit, IRQ01_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_se7722_irq(unsigned int irq)
|
static void enable_se7722_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned int bit = (unsigned int)get_irq_chip_data(irq);
|
unsigned int bit = (unsigned int)irq_data_get_irq_chip_data(data);
|
||||||
__raw_writew(__raw_readw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK);
|
__raw_writew(__raw_readw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip se7722_irq_chip __read_mostly = {
|
static struct irq_chip se7722_irq_chip __read_mostly = {
|
||||||
.name = "SE7722-FPGA",
|
.name = "SE7722-FPGA",
|
||||||
.mask = disable_se7722_irq,
|
.irq_mask = disable_se7722_irq,
|
||||||
.unmask = enable_se7722_irq,
|
.irq_unmask = enable_se7722_irq,
|
||||||
.mask_ack = disable_se7722_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
|
static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||||
|
|
|
@ -68,25 +68,26 @@ static struct fpga_irq get_fpga_irq(unsigned int irq)
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable_se7724_irq(unsigned int irq)
|
static void disable_se7724_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
|
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
|
||||||
unsigned int bit = irq - set.base;
|
unsigned int bit = irq - set.base;
|
||||||
__raw_writew(__raw_readw(set.mraddr) | 0x0001 << bit, set.mraddr);
|
__raw_writew(__raw_readw(set.mraddr) | 0x0001 << bit, set.mraddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_se7724_irq(unsigned int irq)
|
static void enable_se7724_irq(struct irq_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = data->irq;
|
||||||
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
|
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
|
||||||
unsigned int bit = irq - set.base;
|
unsigned int bit = irq - set.base;
|
||||||
__raw_writew(__raw_readw(set.mraddr) & ~(0x0001 << bit), set.mraddr);
|
__raw_writew(__raw_readw(set.mraddr) & ~(0x0001 << bit), set.mraddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip se7724_irq_chip __read_mostly = {
|
static struct irq_chip se7724_irq_chip __read_mostly = {
|
||||||
.name = "SE7724-FPGA",
|
.name = "SE7724-FPGA",
|
||||||
.mask = disable_se7724_irq,
|
.irq_mask = disable_se7724_irq,
|
||||||
.unmask = enable_se7724_irq,
|
.irq_unmask = enable_se7724_irq,
|
||||||
.mask_ack = disable_se7724_irq,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)
|
static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||||
|
|
Loading…
Reference in New Issue