Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36597
b: refs/heads/master
c: c852ac8
h: refs/heads/master
i:
  36595: 4d8b43d
v: v3
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Sep 25, 2006
1 parent 2d8d3ff commit 2ee9e63
Show file tree
Hide file tree
Showing 42 changed files with 377 additions and 559 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: 475549faa161f4e002225f2ef75fdd2a6d83d151
refs/heads/master: c852ac80440db9b0a47f48578e9c6303078abbc1
9 changes: 5 additions & 4 deletions trunk/arch/arm/mach-iop32x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ config ARCH_IQ80321
bool "Enable support for IQ80321"
help
Say Y here if you want to run your kernel on the Intel IQ80321
evaluation kit for the IOP321 chipset.
evaluation kit for the IOP321 processor.

config ARCH_IQ31244
bool "Enable support for IQ31244"
bool "Enable support for EP80219/IQ31244"
help
Say Y here if you want to run your kernel on the Intel IQ31244
evaluation kit for the IOP321 chipset.
Say Y here if you want to run your kernel on the Intel EP80219
evaluation kit for the Intel 80219 processor (a IOP321 variant)
or the IQ31244 evaluation kit for the IOP321 processor.

endmenu

Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/arm/mach-iop32x/iq31244.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ ep80219_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)

if (slot == 0) {
/* CFlash */
irq = IRQ_IOP321_XINT1;
irq = IRQ_IOP32X_XINT1;
} else if (slot == 1) {
/* 82551 Pro 100 */
irq = IRQ_IOP321_XINT0;
irq = IRQ_IOP32X_XINT0;
} else if (slot == 2) {
/* PCI-X Slot */
irq = IRQ_IOP321_XINT3;
irq = IRQ_IOP32X_XINT3;
} else if (slot == 3) {
/* SATA */
irq = IRQ_IOP321_XINT2;
irq = IRQ_IOP32X_XINT2;
} else {
printk(KERN_ERR "ep80219_pci_map_irq() called for unknown "
"device PCI:%d:%d:%d\n", dev->bus->number,
Expand All @@ -134,18 +134,18 @@ iq31244_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)

if (slot == 0) {
/* CFlash */
irq = IRQ_IOP321_XINT1;
irq = IRQ_IOP32X_XINT1;
} else if (slot == 1) {
/* SATA */
irq = IRQ_IOP321_XINT2;
irq = IRQ_IOP32X_XINT2;
} else if (slot == 2) {
/* PCI-X Slot */
irq = IRQ_IOP321_XINT3;
irq = IRQ_IOP32X_XINT3;
} else if (slot == 3) {
/* 82546 GigE */
irq = IRQ_IOP321_XINT0;
irq = IRQ_IOP32X_XINT0;
} else {
printk(KERN_ERR "iq31244_pci_map_irq() called for unknown "
printk(KERN_ERR "iq31244_pci_map_irq called for unknown "
"device PCI:%d:%d:%d\n", dev->bus->number,
PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
irq = -1;
Expand Down Expand Up @@ -206,7 +206,7 @@ static struct plat_serial8250_port iq31244_serial_port[] = {
{
.mapbase = IQ31244_UART,
.membase = (char *)IQ31244_UART,
.irq = IRQ_IOP321_XINT1,
.irq = IRQ_IOP32X_XINT1,
.flags = UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 0,
Expand Down Expand Up @@ -287,7 +287,7 @@ MACHINE_START(IQ31244, "Intel IQ31244")
.io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc,
.boot_params = 0xa0000100,
.map_io = iq31244_map_io,
.init_irq = iop321_init_irq,
.init_irq = iop32x_init_irq,
.timer = &iq31244_timer,
.init_machine = iq31244_init_machine,
MACHINE_END
14 changes: 7 additions & 7 deletions trunk/arch/arm/mach-iop32x/iq80321.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ iq80321_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)

if ((slot == 2 || slot == 6) && pin == 1) {
/* PCI-X Slot INTA */
irq = IRQ_IOP321_XINT2;
irq = IRQ_IOP32X_XINT2;
} else if ((slot == 2 || slot == 6) && pin == 2) {
/* PCI-X Slot INTA */
irq = IRQ_IOP321_XINT3;
irq = IRQ_IOP32X_XINT3;
} else if ((slot == 2 || slot == 6) && pin == 3) {
/* PCI-X Slot INTA */
irq = IRQ_IOP321_XINT0;
irq = IRQ_IOP32X_XINT0;
} else if ((slot == 2 || slot == 6) && pin == 4) {
/* PCI-X Slot INTA */
irq = IRQ_IOP321_XINT1;
irq = IRQ_IOP32X_XINT1;
} else if (slot == 4 || slot == 8) {
/* Gig-E */
irq = IRQ_IOP321_XINT0;
irq = IRQ_IOP32X_XINT0;
} else {
printk(KERN_ERR "iq80321_pci_map_irq() called for unknown "
"device PCI:%d:%d:%d\n", dev->bus->number,
Expand Down Expand Up @@ -148,7 +148,7 @@ static struct plat_serial8250_port iq80321_serial_port[] = {
{
.mapbase = IQ80321_UART,
.membase = (char *)IQ80321_UART,
.irq = IRQ_IOP321_XINT1,
.irq = IRQ_IOP32X_XINT1,
.flags = UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 0,
Expand Down Expand Up @@ -187,7 +187,7 @@ MACHINE_START(IQ80321, "Intel IQ80321")
.io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc,
.boot_params = 0xa0000100,
.map_io = iq80321_map_io,
.init_irq = iop321_init_irq,
.init_irq = iop32x_init_irq,
.timer = &iq80321_timer,
.init_machine = iq80321_init_machine,
MACHINE_END
54 changes: 22 additions & 32 deletions trunk/arch/arm/mach-iop32x/irq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/arch/arm/mach-iop32x/irq.c
* arch/arm/mach-iop32x/irq.c
*
* Generic IOP32X IRQ handling functionality
*
Expand All @@ -9,76 +9,66 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Added IOP3XX chipset and IQ80321 board masking code.
*
*/

#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/list.h>

#include <asm/mach/irq.h>
#include <asm/irq.h>
#include <asm/hardware.h>

#include <asm/mach-types.h>

static u32 iop321_mask /* = 0 */;
static u32 iop32x_mask;

static inline void intctl_write(u32 val)
{
iop3xx_cp6_enable();
asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val));
asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val));
iop3xx_cp6_disable();
}

static inline void intstr_write(u32 val)
{
iop3xx_cp6_enable();
asm volatile("mcr p6,0,%0,c4,c0,0"::"r" (val));
asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (val));
iop3xx_cp6_disable();
}

static void
iop321_irq_mask (unsigned int irq)
iop32x_irq_mask(unsigned int irq)
{

iop321_mask &= ~(1 << irq);

intctl_write(iop321_mask);
iop32x_mask &= ~(1 << irq);
intctl_write(iop32x_mask);
}

static void
iop321_irq_unmask (unsigned int irq)
iop32x_irq_unmask(unsigned int irq)
{
iop321_mask |= (1 << irq);

intctl_write(iop321_mask);
iop32x_mask |= 1 << irq;
intctl_write(iop32x_mask);
}

struct irq_chip ext_chip = {
.name = "IOP",
.ack = iop321_irq_mask,
.mask = iop321_irq_mask,
.unmask = iop321_irq_unmask,
.name = "IOP32x",
.ack = iop32x_irq_mask,
.mask = iop32x_irq_mask,
.unmask = iop32x_irq_unmask,
};

void __init iop321_init_irq(void)
void __init iop32x_init_irq(void)
{
unsigned int i;
int i;

intctl_write(0); // disable all interrupts
intstr_write(0); // treat all as IRQ
if(machine_is_iq80321() ||
machine_is_iq31244()) // all interrupts are inputs to chip
intctl_write(0);
intstr_write(0);
if (machine_is_iq80321() ||
machine_is_iq31244())
*IOP3XX_PCIIRSR = 0x0f;

for(i = 0; i < NR_IRQS; i++)
{
for (i = 0; i < NR_IRQS; i++) {
set_irq_chip(i, &ext_chip);
set_irq_handler(i, do_level_IRQ);
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);

}
}

12 changes: 6 additions & 6 deletions trunk/arch/arm/mach-iop33x/iq80331.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ iq80331_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)

if (slot == 1 && pin == 1) {
/* PCI-X Slot INTA */
irq = IRQ_IOP331_XINT1;
irq = IRQ_IOP33X_XINT1;
} else if (slot == 1 && pin == 2) {
/* PCI-X Slot INTB */
irq = IRQ_IOP331_XINT2;
irq = IRQ_IOP33X_XINT2;
} else if (slot == 1 && pin == 3) {
/* PCI-X Slot INTC */
irq = IRQ_IOP331_XINT3;
irq = IRQ_IOP33X_XINT3;
} else if (slot == 1 && pin == 4) {
/* PCI-X Slot INTD */
irq = IRQ_IOP331_XINT0;
irq = IRQ_IOP33X_XINT0;
} else if (slot == 2) {
/* GigE */
irq = IRQ_IOP331_XINT2;
irq = IRQ_IOP33X_XINT2;
} else {
printk(KERN_ERR "iq80331_pci_map_irq() called for unknown "
"device PCI:%d:%d:%d\n", dev->bus->number,
Expand Down Expand Up @@ -142,7 +142,7 @@ MACHINE_START(IQ80331, "Intel IQ80331")
.io_pg_offst = ((0xfffff000) >> 18) & 0xfffc,
.boot_params = 0x00000100,
.map_io = iop3xx_map_io,
.init_irq = iop331_init_irq,
.init_irq = iop33x_init_irq,
.timer = &iq80331_timer,
.init_machine = iq80331_init_machine,
MACHINE_END
12 changes: 6 additions & 6 deletions trunk/arch/arm/mach-iop33x/iq80332.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ iq80332_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)

if (slot == 4 && pin == 1) {
/* PCI-X Slot INTA */
irq = IRQ_IOP331_XINT0;
irq = IRQ_IOP33X_XINT0;
} else if (slot == 4 && pin == 2) {
/* PCI-X Slot INTB */
irq = IRQ_IOP331_XINT1;
irq = IRQ_IOP33X_XINT1;
} else if (slot == 4 && pin == 3) {
/* PCI-X Slot INTC */
irq = IRQ_IOP331_XINT2;
irq = IRQ_IOP33X_XINT2;
} else if (slot == 4 && pin == 4) {
/* PCI-X Slot INTD */
irq = IRQ_IOP331_XINT3;
irq = IRQ_IOP33X_XINT3;
} else if (slot == 6) {
/* GigE */
irq = IRQ_IOP331_XINT2;
irq = IRQ_IOP33X_XINT2;
} else {
printk(KERN_ERR "iq80332_pci_map_irq() called for unknown "
"device PCI:%d:%d:%d\n", dev->bus->number,
Expand Down Expand Up @@ -142,7 +142,7 @@ MACHINE_START(IQ80332, "Intel IQ80332")
.io_pg_offst = ((0xfffff000) >> 18) & 0xfffc,
.boot_params = 0x00000100,
.map_io = iop3xx_map_io,
.init_irq = iop331_init_irq,
.init_irq = iop33x_init_irq,
.timer = &iq80332_timer,
.init_machine = iq80332_init_machine,
MACHINE_END
Loading

0 comments on commit 2ee9e63

Please sign in to comment.