Commit 77938289 authored by Tom Rini's avatar Tom Rini

Merge kernel.crashing.org:/home/trini/work/kernel/pristine/linux-2.6

into kernel.crashing.org:/home/trini/work/kernel/pristine/for-linus-ppc
parents 81bef2b0 ae73786b
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
...@@ -371,6 +371,16 @@ static void __init chrp_find_openpic(void) ...@@ -371,6 +371,16 @@ static void __init chrp_find_openpic(void)
} }
} }
static int __init
chrp_request_cascade(void)
{
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
return 0;
}
arch_initcall(chrp_request_cascade);
void __init chrp_init_IRQ(void) void __init chrp_init_IRQ(void)
{ {
struct device_node *np; struct device_node *np;
...@@ -400,9 +410,6 @@ void __init chrp_init_IRQ(void) ...@@ -400,9 +410,6 @@ void __init chrp_init_IRQ(void)
OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS; OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
openpic_init(NUM_8259_INTERRUPTS); openpic_init(NUM_8259_INTERRUPTS);
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
for (i = 0; i < NUM_8259_INTERRUPTS; i++) for (i = 0; i < NUM_8259_INTERRUPTS; i++)
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
......
...@@ -258,6 +258,17 @@ lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data, ...@@ -258,6 +258,17 @@ lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data,
} }
#endif /* BLK_DEV_IDE */ #endif /* BLK_DEV_IDE */
static int __init
lopec_request_cascade(void)
{
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
&i8259_irq);
return 0;
}
arch_initcall(lopec_request_cascade);
static void __init static void __init
lopec_init_IRQ(void) lopec_init_IRQ(void)
{ {
...@@ -271,10 +282,6 @@ lopec_init_IRQ(void) ...@@ -271,10 +282,6 @@ lopec_init_IRQ(void)
mpc10x_set_openpic(); mpc10x_set_openpic();
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
&i8259_irq);
/* Map i8259 interrupts */ /* Map i8259 interrupts */
for(i = 0; i < NUM_8259_INTERRUPTS; i++) for(i = 0; i < NUM_8259_INTERRUPTS; i++)
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
......
...@@ -363,6 +363,15 @@ mcpn765_init2(void) ...@@ -363,6 +363,15 @@ mcpn765_init2(void)
return; return;
} }
static int __init
mcpn765_request_cascade(void)
{
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
return 0;
}
arch_initcall(mcpn765_request_cascade);
/* /*
* Interrupt setup and service. * Interrupt setup and service.
* Have MPIC on HAWK and cascaded 8259s on VIA 82586 cascaded to MPIC. * Have MPIC on HAWK and cascaded 8259s on VIA 82586 cascaded to MPIC.
...@@ -376,8 +385,6 @@ mcpn765_init_IRQ(void) ...@@ -376,8 +385,6 @@ mcpn765_init_IRQ(void)
ppc_md.progress("init_irq: enter", 0); ppc_md.progress("init_irq: enter", 0);
openpic_init(NUM_8259_INTERRUPTS); openpic_init(NUM_8259_INTERRUPTS);
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
for(i=0; i < NUM_8259_INTERRUPTS; i++) for(i=0; i < NUM_8259_INTERRUPTS; i++)
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
......
...@@ -204,6 +204,17 @@ mvme5100_init2(void) ...@@ -204,6 +204,17 @@ mvme5100_init2(void)
return; return;
} }
static int __init
mvme5100_request_cascade(void)
{
#ifdef CONFIG_MVME5100_IPMC761_PRESENT
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
&i8259_irq);
#endif
return 0;
}
arch_initcall(mvme5100_request_cascade);
/* /*
* Interrupt setup and service. * Interrupt setup and service.
* Have MPIC on HAWK and cascaded 8259s on Winbond cascaded to MPIC. * Have MPIC on HAWK and cascaded 8259s on Winbond cascaded to MPIC.
...@@ -221,14 +232,12 @@ mvme5100_init_IRQ(void) ...@@ -221,14 +232,12 @@ mvme5100_init_IRQ(void)
openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000); openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000);
#ifdef CONFIG_MVME5100_IPMC761_PRESENT #ifdef CONFIG_MVME5100_IPMC761_PRESENT
openpic_init(NUM_8259_INTERRUPTS); openpic_init(NUM_8259_INTERRUPTS);
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
&i8259_irq);
/* Map i8259 interrupts. */ /* Map i8259 interrupts. */
for (i = 0; i < NUM_8259_INTERRUPTS; i++) for (i = 0; i < NUM_8259_INTERRUPTS; i++)
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
i8259_init(NULL); i8259_init((long)NULL);
#else #else
openpic_init(0); openpic_init(0);
#endif #endif
......
...@@ -654,6 +654,16 @@ static unsigned int pplus_irq_canonicalize(u_int irq) ...@@ -654,6 +654,16 @@ static unsigned int pplus_irq_canonicalize(u_int irq)
return irq; return irq;
} }
static int __init
pplus_request_cascade(void)
{
if (OpenPIC_Addr != NULL)
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
return 0;
}
arch_initcall(pplus_request_cascade);
static void __init pplus_init_IRQ(void) static void __init pplus_init_IRQ(void)
{ {
int i; int i;
...@@ -668,8 +678,6 @@ static void __init pplus_init_IRQ(void) ...@@ -668,8 +678,6 @@ static void __init pplus_init_IRQ(void)
openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000); openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000);
openpic_init(NUM_8259_INTERRUPTS); openpic_init(NUM_8259_INTERRUPTS);
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
ppc_md.get_irq = openpic_get_irq; ppc_md.get_irq = openpic_get_irq;
} }
......
...@@ -958,6 +958,16 @@ prep_irq_canonicalize(u_int irq) ...@@ -958,6 +958,16 @@ prep_irq_canonicalize(u_int irq)
} }
} }
static int __init
prep_request_cascade(void)
{
if (OpenPIC_Addr != NULL)
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
return 0;
}
arch_initcall(prep_request_cascade);
static void __init static void __init
prep_init_IRQ(void) prep_init_IRQ(void)
{ {
...@@ -966,9 +976,6 @@ prep_init_IRQ(void) ...@@ -966,9 +976,6 @@ prep_init_IRQ(void)
if (OpenPIC_Addr != NULL) { if (OpenPIC_Addr != NULL) {
openpic_init(NUM_8259_INTERRUPTS); openpic_init(NUM_8259_INTERRUPTS);
/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
} }
for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ )
irq_desc[i].handler = &i8259_pic; irq_desc[i].handler = &i8259_pic;
......
...@@ -252,38 +252,6 @@ sandpoint_find_bridges(void) ...@@ -252,38 +252,6 @@ sandpoint_find_bridges(void)
return; return;
} }
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
static void __init
sandpoint_early_serial_map(void)
{
struct uart_port serial_req;
/* Setup serial port access */
memset(&serial_req, 0, sizeof(serial_req));
serial_req.uartclk = UART_CLK;
serial_req.irq = 4;
serial_req.flags = STD_COM_FLAGS;
serial_req.iotype = SERIAL_IO_MEM;
serial_req.membase = (u_char *)SANDPOINT_SERIAL_0;
gen550_init(0, &serial_req);
if (early_serial_setup(&serial_req) != 0)
printk(KERN_ERR "Early serial init of port 0 failed\n");
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req.line = 1;
serial_req.irq = 3; /* XXXX */
serial_req.membase = (u_char *)SANDPOINT_SERIAL_1;
gen550_init(1, &serial_req);
if (early_serial_setup(&serial_req) != 0)
printk(KERN_ERR "Early serial init of port 1 failed\n");
}
#endif
static void __init static void __init
sandpoint_setup_arch(void) sandpoint_setup_arch(void)
{ {
...@@ -415,6 +383,15 @@ sandpoint_request_io(void) ...@@ -415,6 +383,15 @@ sandpoint_request_io(void)
arch_initcall(sandpoint_request_io); arch_initcall(sandpoint_request_io);
static int __init
sandpoint_request_cascade(void)
{
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
return 0;
}
arch_initcall(sandpoint_request_cascade);
/* /*
* Interrupt setup and service. Interrrupts on the Sandpoint come * Interrupt setup and service. Interrrupts on the Sandpoint come
* from the four PCI slots plus the 8259 in the Winbond Super I/O (SIO). * from the four PCI slots plus the 8259 in the Winbond Super I/O (SIO).
...@@ -430,8 +407,6 @@ sandpoint_init_IRQ(void) ...@@ -430,8 +407,6 @@ sandpoint_init_IRQ(void)
OpenPIC_NumInitSenses = sizeof(sandpoint_openpic_initsenses); OpenPIC_NumInitSenses = sizeof(sandpoint_openpic_initsenses);
mpc10x_set_openpic(); mpc10x_set_openpic();
openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
i8259_irq);
/* /*
* openpic_init() has set up irq_desc[16-31] to be openpic * openpic_init() has set up irq_desc[16-31] to be openpic
...@@ -689,16 +664,12 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -689,16 +664,12 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.nvram_read_val = todc_mc146818_read_val; ppc_md.nvram_read_val = todc_mc146818_read_val;
ppc_md.nvram_write_val = todc_mc146818_write_val; ppc_md.nvram_write_val = todc_mc146818_write_val;
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
sandpoint_early_serial_map();
#ifdef CONFIG_KGDB #ifdef CONFIG_KGDB
ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;
#endif #endif
#ifdef CONFIG_SERIAL_TEXT_DEBUG #ifdef CONFIG_SERIAL_TEXT_DEBUG
ppc_md.progress = gen550_progress; ppc_md.progress = gen550_progress;
#endif #endif
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_irq = sandpoint_ide_default_irq; ppc_ide_md.default_irq = sandpoint_ide_default_irq;
......
...@@ -52,7 +52,8 @@ obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \ ...@@ -52,7 +52,8 @@ obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \ obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o hawk_common.o pci_auto.o hawk_common.o
obj-$(CONFIG_MVME5100_IPMC761_PRESENT) += i8259.o
obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o
obj-$(CONFIG_PAL4) += cpc700_pic.o obj-$(CONFIG_PAL4) += cpc700_pic.o
obj-$(CONFIG_PCORE) += todc_time.o i8259.o pci_auto.o obj-$(CONFIG_PCORE) += todc_time.o i8259.o pci_auto.o
......
...@@ -40,12 +40,12 @@ static int shift; ...@@ -40,12 +40,12 @@ static int shift;
unsigned long direct_inb(unsigned long addr) unsigned long direct_inb(unsigned long addr)
{ {
return readb(addr); return readb((void __iomem *)addr);
} }
void direct_outb(unsigned long addr, unsigned char val) void direct_outb(unsigned long addr, unsigned char val)
{ {
writeb(val, addr); writeb(val, (void __iomem *)addr);
} }
unsigned long io_inb(unsigned long port) unsigned long io_inb(unsigned long port)
......
...@@ -151,6 +151,17 @@ static struct resource pic_edgectrl_iores = { ...@@ -151,6 +151,17 @@ static struct resource pic_edgectrl_iores = {
"8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY
}; };
static int __init
i8259_hook_cascade(void)
{
/* reserve our resources */
request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT,
"82c59 secondary cascade", NULL );
return 0;
}
arch_initcall(i8259_hook_cascade);
/* /*
* i8259_init() * i8259_init()
* intack_addr - PCI interrupt acknowledge (real) address which will return * intack_addr - PCI interrupt acknowledge (real) address which will return
...@@ -184,9 +195,6 @@ i8259_init(long intack_addr) ...@@ -184,9 +195,6 @@ i8259_init(long intack_addr)
spin_unlock_irqrestore(&i8259_lock, flags); spin_unlock_irqrestore(&i8259_lock, flags);
/* reserve our resources */
request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT,
"82c59 secondary cascade", NULL );
request_resource(&ioport_resource, &pic1_iores); request_resource(&ioport_resource, &pic1_iores);
request_resource(&ioport_resource, &pic2_iores); request_resource(&ioport_resource, &pic2_iores);
request_resource(&ioport_resource, &pic_edgectrl_iores); request_resource(&ioport_resource, &pic_edgectrl_iores);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment