From 11eef455c2834e192c6ffe9f3ffd09af70fafe81 Mon Sep 17 00:00:00 2001 From: Ishizaki Kou Date: Thu, 24 Apr 2008 19:26:28 +1000 Subject: [PATCH] [POWERPC] celleb: Move the SCC related code for celleb This moves the SCC (Super Companion Chip) related code for celleb into platforms/cell/. All files in this patch are used by celleb-beat and celleb-native commonly. Signed-off-by: Kou Ishizaki Acked-by: Arnd Bergmann Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/cell/Makefile | 5 ++++- .../{celleb/scc.h => cell/celleb_scc.h} | 0 .../scc_epci.c => cell/celleb_scc_epci.c} | 18 ++++++------------ .../scc_sio.c => cell/celleb_scc_sio.c} | 0 .../scc_uhc.c => cell/celleb_scc_uhc.c} | 2 +- arch/powerpc/platforms/celleb/Makefile | 4 +--- 6 files changed, 12 insertions(+), 17 deletions(-) rename arch/powerpc/platforms/{celleb/scc.h => cell/celleb_scc.h} (100%) rename arch/powerpc/platforms/{celleb/scc_epci.c => cell/celleb_scc_epci.c} (96%) rename arch/powerpc/platforms/{celleb/scc_sio.c => cell/celleb_scc_sio.c} (100%) rename arch/powerpc/platforms/{celleb/scc_uhc.c => cell/celleb_scc_uhc.c} (99%) diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index b644f5717fc2..3b6ee08701f5 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile @@ -32,6 +32,9 @@ obj-$(CONFIG_PCI_MSI) += axon_msi.o # celleb stuff ifeq ($(CONFIG_PPC_CELLEB),y) obj-y += celleb_setup.o \ - celleb_pci.o \ + celleb_pci.o celleb_scc_epci.o \ + celleb_scc_uhc.o \ io-workarounds.o spider-pci.o + +obj-$(CONFIG_SERIAL_TXX9) += celleb_scc_sio.o endif diff --git a/arch/powerpc/platforms/celleb/scc.h b/arch/powerpc/platforms/cell/celleb_scc.h similarity index 100% rename from arch/powerpc/platforms/celleb/scc.h rename to arch/powerpc/platforms/cell/celleb_scc.h diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/cell/celleb_scc_epci.c similarity index 96% rename from arch/powerpc/platforms/celleb/scc_epci.c rename to arch/powerpc/platforms/cell/celleb_scc_epci.c index 3f7aef947633..08c285b10e30 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/cell/celleb_scc_epci.c @@ -30,13 +30,11 @@ #include #include #include -#include #include #include -#include "scc.h" -#include "../cell/celleb_pci.h" -#include "interrupt.h" +#include "celleb_scc.h" +#include "celleb_pci.h" #define MAX_PCI_DEVICES 32 #define MAX_PCI_FUNCTIONS 8 @@ -111,10 +109,8 @@ static int celleb_epci_check_abort(struct pci_controller *hose, return PCIBIOS_SUCCESSFUL; } -static PCI_IO_ADDR celleb_epci_make_config_addr( - struct pci_bus *bus, - struct pci_controller *hose, - unsigned int devfn, int where) +static PCI_IO_ADDR celleb_epci_make_config_addr(struct pci_bus *bus, + struct pci_controller *hose, unsigned int devfn, int where) { PCI_IO_ADDR addr; @@ -410,8 +406,7 @@ static int __init celleb_setup_epci(struct device_node *node, if (!hose->cfg_addr) goto error; pr_debug("EPCI: cfg_addr map 0x%016lx->0x%016lx + 0x%016lx\n", - r.start, (unsigned long)hose->cfg_addr, - (r.end - r.start + 1)); + r.start, (unsigned long)hose->cfg_addr, (r.end - r.start + 1)); if (of_address_to_resource(node, 2, &r)) goto error; @@ -419,8 +414,7 @@ static int __init celleb_setup_epci(struct device_node *node, if (!hose->cfg_data) goto error; pr_debug("EPCI: cfg_data map 0x%016lx->0x%016lx + 0x%016lx\n", - r.start, (unsigned long)hose->cfg_data, - (r.end - r.start + 1)); + r.start, (unsigned long)hose->cfg_data, (r.end - r.start + 1)); hose->ops = &celleb_epci_ops; celleb_epci_init(hose); diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c similarity index 100% rename from arch/powerpc/platforms/celleb/scc_sio.c rename to arch/powerpc/platforms/cell/celleb_scc_sio.c diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/cell/celleb_scc_uhc.c similarity index 99% rename from arch/powerpc/platforms/celleb/scc_uhc.c rename to arch/powerpc/platforms/cell/celleb_scc_uhc.c index cb4307994087..d63b720bfe3a 100644 --- a/arch/powerpc/platforms/celleb/scc_uhc.c +++ b/arch/powerpc/platforms/cell/celleb_scc_uhc.c @@ -25,7 +25,7 @@ #include #include -#include "scc.h" +#include "celleb_scc.h" #define UHC_RESET_WAIT_MAX 10000 diff --git a/arch/powerpc/platforms/celleb/Makefile b/arch/powerpc/platforms/celleb/Makefile index 5b1096b40afb..edb6d5e858a1 100644 --- a/arch/powerpc/platforms/celleb/Makefile +++ b/arch/powerpc/platforms/celleb/Makefile @@ -1,8 +1,6 @@ obj-y += interrupt.o iommu.o \ - htab.o beat.o hvCall.o \ - scc_epci.o scc_uhc.o + htab.o beat.o hvCall.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o -obj-$(CONFIG_SERIAL_TXX9) += scc_sio.o obj-$(CONFIG_SPU_BASE) += spu_priv1.o -- 2.30.2