aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci-sh7751.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7751.c')
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index 9c2c01490d6..230db8bd974 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -32,7 +32,7 @@
32 * space mapping) will be called via the platform defined function 32 * space mapping) will be called via the platform defined function
33 * pcibios_init_platform(). 33 * pcibios_init_platform().
34 */ 34 */
35static int __init sh7751_pci_init(void) 35int __init sh7751_pci_init(struct pci_channel *chan)
36{ 36{
37 unsigned int id; 37 unsigned int id;
38 int ret; 38 int ret;
@@ -40,19 +40,18 @@ static int __init sh7751_pci_init(void)
40 pr_debug("PCI: Starting intialization.\n"); 40 pr_debug("PCI: Starting intialization.\n");
41 41
42 /* check for SH7751/SH7751R hardware */ 42 /* check for SH7751/SH7751R hardware */
43 id = pci_read_reg(NULL, SH7751_PCICONF0); 43 id = pci_read_reg(chan, SH7751_PCICONF0);
44 if (id != ((SH7751_DEVICE_ID << 16) | SH7751_VENDOR_ID) && 44 if (id != ((SH7751_DEVICE_ID << 16) | SH7751_VENDOR_ID) &&
45 id != ((SH7751R_DEVICE_ID << 16) | SH7751_VENDOR_ID)) { 45 id != ((SH7751R_DEVICE_ID << 16) | SH7751_VENDOR_ID)) {
46 pr_debug("PCI: This is not an SH7751(R) (%x)\n", id); 46 pr_debug("PCI: This is not an SH7751(R) (%x)\n", id);
47 return -ENODEV; 47 return -ENODEV;
48 } 48 }
49 49
50 if ((ret = sh4_pci_check_direct(NULL)) != 0) 50 if ((ret = sh4_pci_check_direct(chan)) != 0)
51 return ret; 51 return ret;
52 52
53 return pcibios_init_platform(); 53 return pcibios_init_platform();
54} 54}
55subsys_initcall(sh7751_pci_init);
56 55
57static int __init __area_sdram_check(struct pci_channel *chan, 56static int __init __area_sdram_check(struct pci_channel *chan,
58 unsigned int area) 57 unsigned int area)
@@ -178,7 +177,7 @@ int __init sh7751_pcic_init(struct pci_channel *chan,
178 } 177 }
179 178
180 if (!word) 179 if (!word)
181 return 0; 180 return -1;
182 181
183 /* configure the wait control registers */ 182 /* configure the wait control registers */
184 word = ctrl_inl(SH7751_WCR1); 183 word = ctrl_inl(SH7751_WCR1);
@@ -202,5 +201,5 @@ int __init sh7751_pcic_init(struct pci_channel *chan,
202 word = SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_ARBM; 201 word = SH4_PCICR_PREFIX | SH4_PCICR_CFIN | SH4_PCICR_ARBM;
203 pci_write_reg(chan, word, SH4_PCICR); 202 pci_write_reg(chan, word, SH4_PCICR);
204 203
205 return 1; 204 return 0;
206} 205}