Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93464
b: refs/heads/master
c: 6ec859e
h: refs/heads/master
v: v3
  • Loading branch information
Ishizaki Kou authored and Paul Mackerras committed Apr 24, 2008
1 parent 7827c2f commit 331fca9
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 358 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cfb62a2e820b6032c08835dbd996d8518af14a3
refs/heads/master: 6ec859e1b21ab42bfc36bb3b51db275480165c8a
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/platforms/cell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
spufs/

obj-$(CONFIG_PCI_MSI) += axon_msi.o


# celleb stuff
ifeq ($(CONFIG_PPC_CELLEB),y)
obj-y += io-workarounds.o spider-pci.o
endif
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/celleb/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
obj-y += interrupt.o iommu.o setup.o \
htab.o beat.o hvCall.o pci.o \
scc_epci.o scc_uhc.o \
io-workarounds.o
scc_epci.o scc_uhc.o

obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o
Expand Down
280 changes: 0 additions & 280 deletions trunk/arch/powerpc/platforms/celleb/io-workarounds.c

This file was deleted.

41 changes: 26 additions & 15 deletions trunk/arch/powerpc/platforms/celleb/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <asm/pci-bridge.h>
#include <asm/ppc-pci.h>

#include "../cell/io-workarounds.h"
#include "pci.h"
#include "interrupt.h"

Expand Down Expand Up @@ -457,33 +458,39 @@ static int __init celleb_setup_fake_pci(struct device_node *dev,
return 0;
}

void __init fake_pci_workaround_init(struct pci_controller *phb)
{
/**
* We will add fake pci bus to scc_pci_bus for the purpose to improve
* I/O Macro performance. But device-tree and device drivers
* are not ready to use address with a token.
*/

/* celleb_pci_add_one(phb, NULL); */
}
static struct celleb_phb_spec celleb_fake_pci_spec __initdata = {
.setup = celleb_setup_fake_pci,
};

static struct of_device_id celleb_phb_match[] __initdata = {
{
.name = "pci-pseudo",
.data = celleb_setup_fake_pci,
.data = &celleb_fake_pci_spec,
}, {
.name = "epci",
.data = celleb_setup_epci,
.data = &celleb_epci_spec,
}, {
},
};

static int __init celleb_io_workaround_init(struct pci_controller *phb,
struct celleb_phb_spec *phb_spec)
{
if (phb_spec->ops) {
iowa_register_bus(phb, phb_spec->ops, phb_spec->iowa_init,
phb_spec->iowa_data);
io_workaround_init();
}

return 0;
}

int __init celleb_setup_phb(struct pci_controller *phb)
{
struct device_node *dev = phb->dn;
const struct of_device_id *match;
int (*setup_func)(struct device_node *, struct pci_controller *);
struct celleb_phb_spec *phb_spec;
int rc;

match = of_match_node(celleb_phb_match, dev);
if (!match)
Expand All @@ -492,8 +499,12 @@ int __init celleb_setup_phb(struct pci_controller *phb)
phb_set_bus_ranges(dev, phb);
phb->buid = 1;

setup_func = match->data;
return (*setup_func)(dev, phb);
phb_spec = match->data;
rc = (*phb_spec->setup)(dev, phb);
if (rc)
return 1;

return celleb_io_workaround_init(phb, phb_spec);
}

int celleb_pci_probe_mode(struct pci_bus *bus)
Expand Down
Loading

0 comments on commit 331fca9

Please sign in to comment.