Skip to content

Commit

Permalink
[POWERPC] Use Freescale pci/pcie common code for 85xx boards
Browse files Browse the repository at this point in the history
Switch the 85xx platform over to using the FSL generic PCI code.  This
gets ups PCIe support in addition to base PCI support.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Roy Zang authored and Kumar Gala committed Jul 23, 2007
1 parent 344ffde commit 3f6c5da
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 104 deletions.
5 changes: 3 additions & 2 deletions arch/powerpc/platforms/85xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ config MPC8560
config MPC85xx
bool
select PPC_UDBG_16550
select PPC_INDIRECT_PCI
select PPC_INDIRECT_PCI_BE
select PPC_INDIRECT_PCI if PCI
select PPC_INDIRECT_PCI_BE if PCI
select MPIC
select FSL_PCI if PCI
select SERIAL_8250_SHARE_IRQ if SERIAL_8250
default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \
|| MPC85xx_MDS || MPC8544_DS
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/85xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for the PowerPC 85xx linux kernel.
#
obj-$(CONFIG_PPC_85xx) += misc.o pci.o
obj-$(CONFIG_PPC_85xx) += misc.o
obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/85xx/mpc85xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
*/

extern void mpc85xx_restart(char *);
extern int mpc85xx_add_bridge(struct device_node *dev);
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/85xx/mpc85xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <asm/udbg.h>

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"

#ifdef CONFIG_CPM2
Expand Down Expand Up @@ -217,7 +218,7 @@ static void __init mpc85xx_ads_setup_arch(void)

#ifdef CONFIG_PCI
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
mpc85xx_add_bridge(np);
fsl_add_bridge(np, 1);
ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif
}
Expand Down
14 changes: 9 additions & 5 deletions arch/powerpc/platforms/85xx/mpc85xx_cds.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <asm/i8259.h>

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"

static int cds_pci_slot = 2;
Expand All @@ -58,8 +59,6 @@ static volatile u8 *cadmus;
static int mpc85xx_exclude_device(struct pci_controller *hose,
u_char bus, u_char devfn)
{
if ((bus == hose->first_busno) && PCI_SLOT(devfn) == 0)
return PCIBIOS_DEVICE_NOT_FOUND;
/* We explicitly do not go past the Tundra 320 Bridge */
if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
return PCIBIOS_DEVICE_NOT_FOUND;
Expand Down Expand Up @@ -218,9 +217,14 @@ static void __init mpc85xx_cds_setup_arch(void)
}

#ifdef CONFIG_PCI
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
mpc85xx_add_bridge(np);

for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
struct resource rsrc;
of_address_to_resource(np, 0, &rsrc);
if ((rsrc.start & 0xfffff) == 0x9000)
fsl_add_bridge(np, 0);
else
fsl_add_bridge(np, 1);
}
ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup;
ppc_md.pci_exclude_device = mpc85xx_exclude_device;
#endif
Expand Down
6 changes: 3 additions & 3 deletions arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <asm/prom.h>
#include <asm/udbg.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include <asm/qe.h>
#include <asm/qe_ic.h>
#include <asm/mpic.h>
Expand Down Expand Up @@ -94,9 +95,8 @@ static void __init mpc85xx_mds_setup_arch(void)
}

#ifdef CONFIG_PCI
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
mpc85xx_add_bridge(np);
}
for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
fsl_add_bridge(np, 1);
of_node_put(np);
#endif

Expand Down
91 changes: 0 additions & 91 deletions arch/powerpc/platforms/85xx/pci.c

This file was deleted.

7 changes: 7 additions & 0 deletions arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,12 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
return 0;
}

DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0012, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0013, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0014, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0015, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0018, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x0019, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x001a, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7010, quirk_fsl_pcie_transparent);
DECLARE_PCI_FIXUP_EARLY(0x1957, 0x7011, quirk_fsl_pcie_transparent);

0 comments on commit 3f6c5da

Please sign in to comment.