Skip to content

Commit

Permalink
sh: pci: Consolidate SH7780 PCIC IRQ routing.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Apr 17, 2009
1 parent 4c7a47d commit a6d377b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 137 deletions.
8 changes: 4 additions & 4 deletions arch/sh/drivers/pci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o
obj-$(CONFIG_SH_SECUREEDGE5410) += ops-snapgear.o
obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o
obj-$(CONFIG_SH_SH03) += ops-sh03.o fixups-sh03.o
obj-$(CONFIG_SH_HIGHLANDER) += ops-r7780rp.o fixups-r7780rp.o
obj-$(CONFIG_SH_SDK7780) += ops-sdk7780.o fixups-sdk7780.o
obj-$(CONFIG_SH_HIGHLANDER) += fixups-r7780rp.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_LANDISK) += ops-landisk.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_SH7785LCR) += ops-sh7785lcr.o fixups-r7780rp.o
10 changes: 9 additions & 1 deletion arch/sh/drivers/pci/fixups-r7780rp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@
* for more details.
*/
#include <linux/pci.h>
#include <linux/io.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)
{
pci_write_reg(chan, 0x000043ff, SH4_PCIINTM);
Expand Down
19 changes: 18 additions & 1 deletion arch/sh/drivers/pci/fixups-sdk7780.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@
*
* Copyright (C) 2003 Lineo uSolutions, Inc.
* 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
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/pci.h>
#include <linux/io.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)
{
/* Enable all interrupts, so we know what to fix */
Expand Down
27 changes: 0 additions & 27 deletions arch/sh/drivers/pci/ops-r7780rp.c

This file was deleted.

35 changes: 0 additions & 35 deletions arch/sh/drivers/pci/ops-sdk7780.c

This file was deleted.

42 changes: 0 additions & 42 deletions arch/sh/drivers/pci/ops-se7780.c

This file was deleted.

27 changes: 0 additions & 27 deletions arch/sh/drivers/pci/ops-sh7785lcr.c

This file was deleted.

0 comments on commit a6d377b

Please sign in to comment.