sh: pci: Consolidate SH7780 PCIC IRQ routing.
Now that the platform code is a bit leaner, we can start consolidating the various IRQ routing implementations. There are effectively only 2 variants, and the others can use those directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
4c7a47de89
commit
a6d377b696
@ -16,11 +16,11 @@ obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o
|
|||||||
obj-$(CONFIG_SH_SECUREEDGE5410) += ops-snapgear.o
|
obj-$(CONFIG_SH_SECUREEDGE5410) += ops-snapgear.o
|
||||||
obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o
|
obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o
|
||||||
obj-$(CONFIG_SH_SH03) += ops-sh03.o fixups-sh03.o
|
obj-$(CONFIG_SH_SH03) += ops-sh03.o fixups-sh03.o
|
||||||
obj-$(CONFIG_SH_HIGHLANDER) += ops-r7780rp.o fixups-r7780rp.o
|
obj-$(CONFIG_SH_HIGHLANDER) += fixups-r7780rp.o
|
||||||
obj-$(CONFIG_SH_SDK7780) += ops-sdk7780.o fixups-sdk7780.o
|
obj-$(CONFIG_SH_SH7785LCR) += fixups-r7780rp.o
|
||||||
|
obj-$(CONFIG_SH_SDK7780) += fixups-sdk7780.o
|
||||||
|
obj-$(CONFIG_SH_7780_SOLUTION_ENGINE) += fixups-sdk7780.o
|
||||||
obj-$(CONFIG_SH_TITAN) += ops-titan.o
|
obj-$(CONFIG_SH_TITAN) += ops-titan.o
|
||||||
obj-$(CONFIG_SH_LANDISK) += ops-landisk.o
|
obj-$(CONFIG_SH_LANDISK) += ops-landisk.o
|
||||||
obj-$(CONFIG_SH_LBOX_RE2) += ops-lboxre2.o fixups-lboxre2.o
|
obj-$(CONFIG_SH_LBOX_RE2) += ops-lboxre2.o fixups-lboxre2.o
|
||||||
obj-$(CONFIG_SH_7780_SOLUTION_ENGINE) += ops-se7780.o fixups-sdk7780.o
|
|
||||||
obj-$(CONFIG_SH_CAYMAN) += ops-cayman.o
|
obj-$(CONFIG_SH_CAYMAN) += ops-cayman.o
|
||||||
obj-$(CONFIG_SH_SH7785LCR) += ops-sh7785lcr.o fixups-r7780rp.o
|
|
||||||
|
@ -11,9 +11,17 @@
|
|||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include "pci-sh4.h"
|
#include "pci-sh4.h"
|
||||||
#include <asm/io.h>
|
|
||||||
|
|
||||||
|
static char irq_tab[] __initdata = {
|
||||||
|
65, 66, 67, 68,
|
||||||
|
};
|
||||||
|
|
||||||
|
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||||
|
{
|
||||||
|
return irq_tab[slot];
|
||||||
|
}
|
||||||
int pci_fixup_pcic(struct pci_channel *chan)
|
int pci_fixup_pcic(struct pci_channel *chan)
|
||||||
{
|
{
|
||||||
pci_write_reg(chan, 0x000043ff, SH4_PCIINTM);
|
pci_write_reg(chan, 0x000043ff, SH4_PCIINTM);
|
||||||
|
@ -5,15 +5,32 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2003 Lineo uSolutions, Inc.
|
* Copyright (C) 2003 Lineo uSolutions, Inc.
|
||||||
* Copyright (C) 2004 - 2006 Paul Mundt
|
* Copyright (C) 2004 - 2006 Paul Mundt
|
||||||
|
* Copyright (C) 2006 Nobuhiro Iwamatsu
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include "pci-sh4.h"
|
#include "pci-sh4.h"
|
||||||
#include <asm/io.h>
|
|
||||||
|
|
||||||
|
/* IDSEL [16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31] */
|
||||||
|
static char sdk7780_irq_tab[4][16] __initdata = {
|
||||||
|
/* INTA */
|
||||||
|
{ 65, 68, 67, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||||
|
/* INTB */
|
||||||
|
{ 66, 65, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||||
|
/* INTC */
|
||||||
|
{ 67, 66, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||||
|
/* INTD */
|
||||||
|
{ 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||||
|
};
|
||||||
|
|
||||||
|
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
||||||
|
{
|
||||||
|
return sdk7780_irq_tab[pin-1][slot];
|
||||||
|
}
|
||||||
int pci_fixup_pcic(struct pci_channel *chan)
|
int pci_fixup_pcic(struct pci_channel *chan)
|
||||||
{
|
{
|
||||||
/* Enable all interrupts, so we know what to fix */
|
/* Enable all interrupts, so we know what to fix */
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: Ian DaSilva (idasilva@mvista.com)
|
|
||||||
*
|
|
||||||
* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
|
|
||||||
*
|
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
|
||||||
* License. See linux/COPYING for more information.
|
|
||||||
*
|
|
||||||
* PCI initialization for the Renesas SH7780 Highlander R7780RP-1 board
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <mach/highlander.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include "pci-sh4.h"
|
|
||||||
|
|
||||||
static char irq_tab[] __initdata = {
|
|
||||||
65, 66, 67, 68,
|
|
||||||
};
|
|
||||||
|
|
||||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
|
||||||
{
|
|
||||||
return irq_tab[slot];
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/sh/drivers/pci/ops-sdk7780.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Nobuhiro Iwamatsu
|
|
||||||
*
|
|
||||||
* PCI initialization for the SDK7780SE03
|
|
||||||
*
|
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
|
||||||
* License. See linux/COPYING for more information.
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <mach/sdk7780.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include "pci-sh4.h"
|
|
||||||
|
|
||||||
/* IDSEL [16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31] */
|
|
||||||
static char sdk7780_irq_tab[4][16] __initdata = {
|
|
||||||
/* INTA */
|
|
||||||
{ 65, 68, 67, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTB */
|
|
||||||
{ 66, 65, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTC */
|
|
||||||
{ 67, 66, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTD */
|
|
||||||
{ 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
};
|
|
||||||
|
|
||||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
|
||||||
{
|
|
||||||
return sdk7780_irq_tab[pin-1][slot];
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/sh/drivers/pci/ops-se7780.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006 Nobuhiro Iwamatsu
|
|
||||||
*
|
|
||||||
* PCI initialization for the Hitachi UL Solution Engine 7780SE03
|
|
||||||
*
|
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
|
||||||
* License. See linux/COPYING for more information.
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <mach-se/mach/se7780.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include "pci-sh4.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IDSEL = AD16 PCI slot
|
|
||||||
* IDSEL = AD17 PCI slot
|
|
||||||
* IDSEL = AD18 Serial ATA Controller (Silicon Image SiL3512A)
|
|
||||||
* IDSEL = AD19 USB Host Controller (NEC uPD7210100A)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* IDSEL [16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31] */
|
|
||||||
static char se7780_irq_tab[4][16] __initdata = {
|
|
||||||
/* INTA */
|
|
||||||
{ 65, 68, 67, 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTB */
|
|
||||||
{ 66, 65, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTC */
|
|
||||||
{ 67, 66, -1, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
/* INTD */
|
|
||||||
{ 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
|
|
||||||
};
|
|
||||||
|
|
||||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
|
||||||
{
|
|
||||||
return se7780_irq_tab[pin-1][slot];
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: Ian DaSilva (idasilva@mvista.com)
|
|
||||||
*
|
|
||||||
* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
|
|
||||||
*
|
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
|
||||||
* License. See linux/COPYING for more information.
|
|
||||||
*
|
|
||||||
* PCI initialization for the Renesas R0P7785LC0011RL board
|
|
||||||
* Based on arch/sh/drivers/pci/ops-r7780rp.c
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include "pci-sh4.h"
|
|
||||||
|
|
||||||
static char irq_tab[] __initdata = {
|
|
||||||
65, 66, 67, 68,
|
|
||||||
};
|
|
||||||
|
|
||||||
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
|
|
||||||
{
|
|
||||||
return irq_tab[slot];
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user