diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 08:27:15 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 08:27:15 -0400 |
commit | 37c8ac361efdbae969eff1a603bc39412d3e873f (patch) | |
tree | c5cb5d28ebc09bc00ec27f3c285ed9d8f9519d3f | |
parent | 84972ec0c206b73ffb74e5114b574186ce6166b8 (diff) |
sh: pci: Consolidate lboxre2 and r2d IRQ fixups.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/drivers/pci/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/drivers/pci/fixups-lboxre2.c | 23 | ||||
-rw-r--r-- | arch/sh/drivers/pci/fixups-rts7751r2d.c | 25 | ||||
-rw-r--r-- | arch/sh/drivers/pci/ops-rts7751r2d.c | 31 |
4 files changed, 26 insertions, 57 deletions
diff --git a/arch/sh/drivers/pci/Makefile b/arch/sh/drivers/pci/Makefile index abd931c14965..fbebd73b22f6 100644 --- a/arch/sh/drivers/pci/Makefile +++ b/arch/sh/drivers/pci/Makefile | |||
@@ -15,7 +15,7 @@ obj-$(CONFIG_CPU_SH5) += pci-sh5.o ops-sh5.o | |||
15 | obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \ | 15 | obj-$(CONFIG_SH_DREAMCAST) += ops-dreamcast.o fixups-dreamcast.o \ |
16 | pci-dreamcast.o | 16 | pci-dreamcast.o |
17 | obj-$(CONFIG_SH_SECUREEDGE5410) += fixups-snapgear.o | 17 | obj-$(CONFIG_SH_SECUREEDGE5410) += fixups-snapgear.o |
18 | obj-$(CONFIG_SH_RTS7751R2D) += ops-rts7751r2d.o fixups-rts7751r2d.o | 18 | obj-$(CONFIG_SH_RTS7751R2D) += fixups-rts7751r2d.o |
19 | obj-$(CONFIG_SH_SH03) += fixups-sh03.o | 19 | obj-$(CONFIG_SH_SH03) += fixups-sh03.o |
20 | obj-$(CONFIG_SH_HIGHLANDER) += fixups-r7780rp.o | 20 | obj-$(CONFIG_SH_HIGHLANDER) += fixups-r7780rp.o |
21 | obj-$(CONFIG_SH_SH7785LCR) += fixups-r7780rp.o | 21 | obj-$(CONFIG_SH_SH7785LCR) += fixups-r7780rp.o |
@@ -23,5 +23,5 @@ obj-$(CONFIG_SH_SDK7780) += fixups-sdk7780.o | |||
23 | obj-$(CONFIG_SH_7780_SOLUTION_ENGINE) += fixups-sdk7780.o | 23 | obj-$(CONFIG_SH_7780_SOLUTION_ENGINE) += fixups-sdk7780.o |
24 | obj-$(CONFIG_SH_TITAN) += fixups-titan.o | 24 | obj-$(CONFIG_SH_TITAN) += fixups-titan.o |
25 | obj-$(CONFIG_SH_LANDISK) += fixups-landisk.o | 25 | obj-$(CONFIG_SH_LANDISK) += fixups-landisk.o |
26 | obj-$(CONFIG_SH_LBOX_RE2) += fixups-lboxre2.o fixups-rts7751r2d.o | 26 | obj-$(CONFIG_SH_LBOX_RE2) += fixups-rts7751r2d.o |
27 | obj-$(CONFIG_SH_CAYMAN) += fixups-cayman.o | 27 | obj-$(CONFIG_SH_CAYMAN) += fixups-cayman.o |
diff --git a/arch/sh/drivers/pci/fixups-lboxre2.c b/arch/sh/drivers/pci/fixups-lboxre2.c deleted file mode 100644 index 6db2c209737f..000000000000 --- a/arch/sh/drivers/pci/fixups-lboxre2.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/drivers/pci/ops-lboxre2.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Nobuhiro Iwamatsu | ||
5 | * | ||
6 | * PCI initialization for the NTT COMWARE L-BOX RE2 | ||
7 | */ | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/types.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/pci.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <mach/lboxre2.h> | ||
14 | #include "pci-sh4.h" | ||
15 | |||
16 | static char lboxre2_irq_tab[] __initdata = { | ||
17 | IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD, | ||
18 | }; | ||
19 | |||
20 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | ||
21 | { | ||
22 | return lboxre2_irq_tab[slot]; | ||
23 | } | ||
diff --git a/arch/sh/drivers/pci/fixups-rts7751r2d.c b/arch/sh/drivers/pci/fixups-rts7751r2d.c index 38852334d479..052b354236dc 100644 --- a/arch/sh/drivers/pci/fixups-rts7751r2d.c +++ b/arch/sh/drivers/pci/fixups-rts7751r2d.c | |||
@@ -1,21 +1,44 @@ | |||
1 | /* | 1 | /* |
2 | * arch/sh/drivers/pci/fixups-rts7751r2d.c | 2 | * arch/sh/drivers/pci/fixups-rts7751r2d.c |
3 | * | 3 | * |
4 | * RTS7751R2D PCI fixups | 4 | * RTS7751R2D / LBOXRE2 PCI fixups |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Lineo uSolutions, Inc. | 6 | * Copyright (C) 2003 Lineo uSolutions, Inc. |
7 | * Copyright (C) 2004 Paul Mundt | 7 | * Copyright (C) 2004 Paul Mundt |
8 | * Copyright (C) 2007 Nobuhiro Iwamatsu | ||
8 | * | 9 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 10 | * This file is subject to the terms and conditions of the GNU General Public |
10 | * License. See the file "COPYING" in the main directory of this archive | 11 | * License. See the file "COPYING" in the main directory of this archive |
11 | * for more details. | 12 | * for more details. |
12 | */ | 13 | */ |
13 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <mach/lboxre2.h> | ||
16 | #include <mach/r2d.h> | ||
14 | #include "pci-sh4.h" | 17 | #include "pci-sh4.h" |
18 | #include <asm/machtypes.h> | ||
15 | 19 | ||
16 | #define PCIMCR_MRSET_OFF 0xBFFFFFFF | 20 | #define PCIMCR_MRSET_OFF 0xBFFFFFFF |
17 | #define PCIMCR_RFSH_OFF 0xFFFFFFFB | 21 | #define PCIMCR_RFSH_OFF 0xFFFFFFFB |
18 | 22 | ||
23 | static u8 rts7751r2d_irq_tab[] __initdata = { | ||
24 | IRQ_PCI_INTA, | ||
25 | IRQ_PCI_INTB, | ||
26 | IRQ_PCI_INTC, | ||
27 | IRQ_PCI_INTD, | ||
28 | }; | ||
29 | |||
30 | static char lboxre2_irq_tab[] __initdata = { | ||
31 | IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD, | ||
32 | }; | ||
33 | |||
34 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | ||
35 | { | ||
36 | if (mach_is_lboxre2()) | ||
37 | return lboxre2_irq_tab[slot]; | ||
38 | else | ||
39 | return rts7751r2d_irq_tab[slot]; | ||
40 | } | ||
41 | |||
19 | int pci_fixup_pcic(struct pci_channel *chan) | 42 | int pci_fixup_pcic(struct pci_channel *chan) |
20 | { | 43 | { |
21 | unsigned long bcr1, mcr; | 44 | unsigned long bcr1, mcr; |
diff --git a/arch/sh/drivers/pci/ops-rts7751r2d.c b/arch/sh/drivers/pci/ops-rts7751r2d.c deleted file mode 100644 index d950b8ab25f1..000000000000 --- a/arch/sh/drivers/pci/ops-rts7751r2d.c +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/drivers/pci/ops-rts7751r2d.c | ||
3 | * | ||
4 | * Author: Ian DaSilva (idasilva@mvista.com) | ||
5 | * | ||
6 | * Highly leveraged from pci-bigsur.c, written by Dustin McIntire. | ||
7 | * | ||
8 | * May be copied or modified under the terms of the GNU General Public | ||
9 | * License. See linux/COPYING for more information. | ||
10 | * | ||
11 | * PCI initialization for the Renesas SH7751R RTS7751R2D board | ||
12 | */ | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/pci.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <mach/r2d.h> | ||
19 | #include "pci-sh4.h" | ||
20 | |||
21 | static u8 rts7751r2d_irq_tab[] __initdata = { | ||
22 | IRQ_PCI_INTA, | ||
23 | IRQ_PCI_INTB, | ||
24 | IRQ_PCI_INTC, | ||
25 | IRQ_PCI_INTD, | ||
26 | }; | ||
27 | |||
28 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | ||
29 | { | ||
30 | return rts7751r2d_irq_tab[slot]; | ||
31 | } | ||