aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/83xx/Makefile1
-rw-r--r--arch/powerpc/platforms/83xx/mpc831x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_rdk.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h1
-rw-r--r--arch/powerpc/platforms/83xx/pci.c91
-rw-r--r--arch/powerpc/platforms/83xx/sbc834x.c1
14 files changed, 11 insertions, 94 deletions
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index a95298810c1..6159c5d4e5f 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -3,7 +3,7 @@ menuconfig PPC_83xx
3 depends on 6xx && PPC_MULTIPLATFORM 3 depends on 6xx && PPC_MULTIPLATFORM
4 select PPC_UDBG_16550 4 select PPC_UDBG_16550
5 select PPC_PCI_CHOICE 5 select PPC_PCI_CHOICE
6 select PPC_INDIRECT_PCI 6 select FSL_PCI if PCI
7 select FSL_SOC 7 select FSL_SOC
8 select IPIC 8 select IPIC
9 9
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 32c7ad13911..ba5028e2989 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -2,7 +2,6 @@
2# Makefile for the PowerPC 83xx linux kernel. 2# Makefile for the PowerPC 83xx linux kernel.
3# 3#
4obj-y := misc.o usb.o 4obj-y := misc.o usb.o
5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_SUSPEND) += suspend.o suspend-asm.o 5obj-$(CONFIG_SUSPEND) += suspend.o suspend-asm.o
7obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o 6obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o
8obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o 7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index c4db5172b27..a428f8d1ac8 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -19,6 +19,7 @@
19#include <asm/time.h> 19#include <asm/time.h>
20#include <asm/ipic.h> 20#include <asm/ipic.h>
21#include <asm/udbg.h> 21#include <asm/udbg.h>
22#include <sysdev/fsl_pci.h>
22 23
23#include "mpc83xx.h" 24#include "mpc83xx.h"
24 25
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 6dbc6eabcb0..dd4be4aee31 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -36,6 +36,7 @@
36#include <asm/prom.h> 36#include <asm/prom.h>
37#include <asm/udbg.h> 37#include <asm/udbg.h>
38#include <sysdev/fsl_soc.h> 38#include <sysdev/fsl_soc.h>
39#include <sysdev/fsl_pci.h>
39#include <asm/qe.h> 40#include <asm/qe.h>
40#include <asm/qe_ic.h> 41#include <asm/qe_ic.h>
41 42
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index e7f706b624f..f049d692d4c 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -27,6 +27,7 @@
27#include <asm/qe.h> 27#include <asm/qe.h>
28#include <asm/qe_ic.h> 28#include <asm/qe_ic.h>
29#include <sysdev/fsl_soc.h> 29#include <sysdev/fsl_soc.h>
30#include <sysdev/fsl_pci.h>
30 31
31#include "mpc83xx.h" 32#include "mpc83xx.h"
32 33
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 50e8f632061..7301d77a08e 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -35,6 +35,7 @@
35#include <asm/prom.h> 35#include <asm/prom.h>
36#include <asm/udbg.h> 36#include <asm/udbg.h>
37#include <sysdev/fsl_soc.h> 37#include <sysdev/fsl_soc.h>
38#include <sysdev/fsl_pci.h>
38 39
39#include "mpc83xx.h" 40#include "mpc83xx.h"
40 41
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 2b8a0a3f855..30d509aa9f0 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -35,6 +35,7 @@
35#include <asm/prom.h> 35#include <asm/prom.h>
36#include <asm/udbg.h> 36#include <asm/udbg.h>
37#include <sysdev/fsl_soc.h> 37#include <sysdev/fsl_soc.h>
38#include <sysdev/fsl_pci.h>
38 39
39#include "mpc83xx.h" 40#include "mpc83xx.h"
40 41
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index c2e5de60c05..75b80e83657 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -42,6 +42,7 @@
42#include <asm/prom.h> 42#include <asm/prom.h>
43#include <asm/udbg.h> 43#include <asm/udbg.h>
44#include <sysdev/fsl_soc.h> 44#include <sysdev/fsl_soc.h>
45#include <sysdev/fsl_pci.h>
45#include <asm/qe.h> 46#include <asm/qe.h>
46#include <asm/qe_ic.h> 47#include <asm/qe_ic.h>
47 48
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
index c10dec4bf17..a5273bb28e1 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
@@ -23,6 +23,7 @@
23#include <asm/qe.h> 23#include <asm/qe.h>
24#include <asm/qe_ic.h> 24#include <asm/qe_ic.h>
25#include <sysdev/fsl_soc.h> 25#include <sysdev/fsl_soc.h>
26#include <sysdev/fsl_pci.h>
26 27
27#include "mpc83xx.h" 28#include "mpc83xx.h"
28 29
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 64d17b0d645..be62de23bea 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -19,6 +19,7 @@
19#include <asm/ipic.h> 19#include <asm/ipic.h>
20#include <asm/udbg.h> 20#include <asm/udbg.h>
21#include <asm/prom.h> 21#include <asm/prom.h>
22#include <sysdev/fsl_pci.h>
22 23
23#include "mpc83xx.h" 24#include "mpc83xx.h"
24 25
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index c00356bdb1d..da030afa2e2 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -17,6 +17,7 @@
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ipic.h> 18#include <asm/ipic.h>
19#include <asm/udbg.h> 19#include <asm/udbg.h>
20#include <sysdev/fsl_pci.h>
20 21
21#include "mpc83xx.h" 22#include "mpc83xx.h"
22 23
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 88a3b5cabb1..393dfecdbf5 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -55,7 +55,6 @@
55 * mpc83xx_* files. Mostly for use by mpc83xx_setup 55 * mpc83xx_* files. Mostly for use by mpc83xx_setup
56 */ 56 */
57 57
58extern int mpc83xx_add_bridge(struct device_node *dev);
59extern void mpc83xx_restart(char *cmd); 58extern void mpc83xx_restart(char *cmd);
60extern long mpc83xx_time_init(void); 59extern long mpc83xx_time_init(void);
61extern int mpc834x_usb_cfg(void); 60extern int mpc834x_usb_cfg(void);
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
deleted file mode 100644
index 14f1080c6c9..00000000000
--- a/arch/powerpc/platforms/83xx/pci.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * FSL SoC setup code
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/pci.h>
17#include <linux/delay.h>
18#include <linux/irq.h>
19#include <linux/module.h>
20
21#include <asm/system.h>
22#include <asm/atomic.h>
23#include <asm/io.h>
24#include <asm/pci-bridge.h>
25#include <asm/prom.h>
26#include <sysdev/fsl_soc.h>
27
28#undef DEBUG
29
30#ifdef DEBUG
31#define DBG(x...) printk(x)
32#else
33#define DBG(x...)
34#endif
35
36int __init mpc83xx_add_bridge(struct device_node *dev)
37{
38 int len;
39 struct pci_controller *hose;
40 struct resource rsrc;
41 const int *bus_range;
42 int primary = 1, has_address = 0;
43 phys_addr_t immr = get_immrbase();
44
45 DBG("Adding PCI host bridge %s\n", dev->full_name);
46
47 /* Fetch host bridge registers address */
48 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
49
50 /* Get bus range if any */
51 bus_range = of_get_property(dev, "bus-range", &len);
52 if (bus_range == NULL || len < 2 * sizeof(int)) {
53 printk(KERN_WARNING "Can't get bus-range for %s, assume"
54 " bus 0\n", dev->full_name);
55 }
56
57 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
58 hose = pcibios_alloc_controller(dev);
59 if (!hose)
60 return -ENOMEM;
61
62 hose->first_busno = bus_range ? bus_range[0] : 0;
63 hose->last_busno = bus_range ? bus_range[1] : 0xff;
64
65 /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar
66 * the other at 0x8600, we consider the 0x8500 the primary controller
67 */
68 /* PCI 1 */
69 if ((rsrc.start & 0xfffff) == 0x8500) {
70 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0);
71 }
72 /* PCI 2 */
73 if ((rsrc.start & 0xfffff) == 0x8600) {
74 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0);
75 primary = 0;
76 }
77
78 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
79 "Firmware bus number: %d->%d\n",
80 (unsigned long long)rsrc.start, hose->first_busno,
81 hose->last_busno);
82
83 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
84 hose, hose->cfg_addr, hose->cfg_data);
85
86 /* Interpret the "ranges" property */
87 /* This also maps the I/O region and sets isa_io/mem_base */
88 pci_process_bridge_OF_ranges(hose, dev, primary);
89
90 return 0;
91}
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
index cf382474a83..fc21f5c15ba 100644
--- a/arch/powerpc/platforms/83xx/sbc834x.c
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -37,6 +37,7 @@
37#include <asm/prom.h> 37#include <asm/prom.h>
38#include <asm/udbg.h> 38#include <asm/udbg.h>
39#include <sysdev/fsl_soc.h> 39#include <sysdev/fsl_soc.h>
40#include <sysdev/fsl_pci.h>
40 41
41#include "mpc83xx.h" 42#include "mpc83xx.h"
42 43