aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/ops-titan.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 03:43:28 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 03:43:28 -0400
commit959f85f8a3223c116bbe95dd8a9b207790b5d4d3 (patch)
treee7da9ccf292f860bfa0ff9cc8b2682cd1d6bad4d /arch/sh/drivers/pci/ops-titan.c
parente108b2ca2349f510ce7d7f910eda89f71d710d84 (diff)
sh: Consolidated SH7751/SH7780 PCI support.
This cleans up quite a lot of the PCI mess that we currently have, and attempts to consolidate the duplication in the SH7780 and SH7751 PCI controllers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/ops-titan.c')
-rw-r--r--arch/sh/drivers/pci/ops-titan.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c
index f76e4e963ac1..9c8b2027c35d 100644
--- a/arch/sh/drivers/pci/ops-titan.c
+++ b/arch/sh/drivers/pci/ops-titan.c
@@ -16,12 +16,11 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/delay.h>
20#include <asm/io.h> 19#include <asm/io.h>
21#include <asm/titan.h> 20#include <asm/titan.h>
22#include "pci-sh7751.h" 21#include "pci-sh4.h"
23 22
24int __init pcibios_map_platform_irq(u8 slot, u8 pin) 23int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
25{ 24{
26 int irq = -1; 25 int irq = -1;
27 26
@@ -32,7 +31,8 @@ int __init pcibios_map_platform_irq(u8 slot, u8 pin)
32 case 3: irq = TITAN_IRQ_MPCIB; break; /* mPCI B */ 31 case 3: irq = TITAN_IRQ_MPCIB; break; /* mPCI B */
33 case 4: irq = TITAN_IRQ_USB; break; /* USB */ 32 case 4: irq = TITAN_IRQ_USB; break; /* USB */
34 default: 33 default:
35 printk(KERN_INFO "PCI: Bad IRQ mapping request for slot %d\n", slot); 34 printk(KERN_INFO "PCI: Bad IRQ mapping "
35 "request for slot %d\n", slot);
36 return -1; 36 return -1;
37 } 37 }
38 38
@@ -56,15 +56,13 @@ static struct resource sh7751_mem_resource = {
56 .flags = IORESOURCE_MEM 56 .flags = IORESOURCE_MEM
57}; 57};
58 58
59extern struct pci_ops sh7751_pci_ops;
60
61struct pci_channel board_pci_channels[] = { 59struct pci_channel board_pci_channels[] = {
62 { &sh7751_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff }, 60 { &sh4_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff },
63 { NULL, NULL, NULL, 0, 0 }, 61 { NULL, NULL, NULL, 0, 0 },
64}; 62};
65EXPORT_SYMBOL(board_pci_channels); 63EXPORT_SYMBOL(board_pci_channels);
66 64
67static struct sh7751_pci_address_map sh7751_pci_map = { 65static struct sh4_pci_address_map sh7751_pci_map = {
68 .window0 = { 66 .window0 = {
69 .base = SH7751_CS2_BASE_ADDR, 67 .base = SH7751_CS2_BASE_ADDR,
70 .size = SH7751_MEM_REGION_SIZE*2, /* cs2 and cs3 */ 68 .size = SH7751_MEM_REGION_SIZE*2, /* cs2 and cs3 */
@@ -75,7 +73,7 @@ static struct sh7751_pci_address_map sh7751_pci_map = {
75 .size = SH7751_MEM_REGION_SIZE*2, 73 .size = SH7751_MEM_REGION_SIZE*2,
76 }, 74 },
77 75
78 .flags = SH7751_PCIC_NO_RESET, 76 .flags = SH4_PCIC_NO_RESET,
79}; 77};
80 78
81int __init pcibios_init_platform(void) 79int __init pcibios_init_platform(void)