]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[POWERPC] Allow pSeries to build without CONFIG_PCI
authorStephen Rothwell <sfr@canb.auug.org.au>
Sun, 4 Mar 2007 06:04:44 +0000 (17:04 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 9 Mar 2007 04:03:26 +0000 (15:03 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/kernel/Makefile
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/setup.c
drivers/video/Kconfig
include/asm-powerpc/ppc-pci.h

index 6dfbd52694ab855600205680beea9b3b49c89ed4..e7205273ff374008cdfe666472acc51966214a02 100644 (file)
@@ -89,7 +89,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
 
 config ARCH_MAY_HAVE_PC_FDC
        bool
-       default y
+       default !PPC_PSERIES || PCI
 
 config PPC_OF
        def_bool y
@@ -1028,7 +1028,8 @@ config MCA
 
 config PCI
        bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
-               || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) || MPC7448HPC2 || PPC_PS3
+               || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
+               || MPC7448HPC2 || PPC_PS3
        default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \
                && !PPC_85xx && !PPC_86xx
        default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
index 8120d428ebfdf0e2cf51beb8d2106a6bd1ddaa0a..e0fa80eca366bcf05af5afee30b7ceb4032a3342 100644 (file)
@@ -25,8 +25,8 @@ obj-$(CONFIG_PPC_970_NAP)     += idle_power4.o
 obj-$(CONFIG_PPC_OF)           += of_device.o of_platform.o prom_parse.o
 procfs-$(CONFIG_PPC64)         := proc_ppc64.o
 obj-$(CONFIG_PROC_FS)          += $(procfs-y)
-rtaspci-$(CONFIG_PPC64)                := rtas_pci.o
-obj-$(CONFIG_PPC_RTAS)         += rtas.o rtas-rtc.o $(rtaspci-y)
+rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI)  := rtas_pci.o
+obj-$(CONFIG_PPC_RTAS)         += rtas.o rtas-rtc.o $(rtaspci-y-y)
 obj-$(CONFIG_RTAS_FLASH)       += rtas_flash.o
 obj-$(CONFIG_RTAS_PROC)                += rtas-proc.o
 obj-$(CONFIG_LPARCFG)          += lparcfg.o
index 2dfd05095a25fac98734f871a9188bba1fbaa1bc..90235d598751ab442221f104a9962574bcc8a0e9 100644 (file)
@@ -2,14 +2,15 @@ ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS           += -mno-minimal-toc
 endif
 
-obj-y                  := pci.o lpar.o hvCall.o nvram.o reconfig.o \
-                          setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
+obj-y                  := lpar.o hvCall.o nvram.o reconfig.o \
+                          setup.o iommu.o ras.o rtasd.o \
                           firmware.o power.o
 obj-$(CONFIG_SMP)      += smp.o
 obj-$(CONFIG_XICS)     += xics.o
 obj-$(CONFIG_SCANLOG)  += scanlog.o
 obj-$(CONFIG_EEH)      += eeh.o eeh_cache.o eeh_driver.o eeh_event.o
 obj-$(CONFIG_KEXEC)    += kexec.o
+obj-$(CONFIG_PCI)      += pci.o pci_dlpar.o
 
 obj-$(CONFIG_HOTPLUG_CPU)      += hotplug-cpu.o
 
index 9322f74e1d8b90f333c2e0364025dc539bbbd76f..f9510a5a3e212c5c95e80e934e741df9d38a35a2 100644 (file)
@@ -242,6 +242,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum)
        return tce_ret;
 }
 
+#ifdef CONFIG_PCI
 static void iommu_table_setparms(struct pci_controller *phb,
                                 struct device_node *dn,
                                 struct iommu_table *tbl)
@@ -478,29 +479,6 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
                       pci_name(dev));
 }
 
-static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
-{
-       int err = NOTIFY_OK;
-       struct device_node *np = node;
-       struct pci_dn *pci = PCI_DN(np);
-
-       switch (action) {
-       case PSERIES_RECONFIG_REMOVE:
-               if (pci && pci->iommu_table &&
-                   get_property(np, "ibm,dma-window", NULL))
-                       iommu_free_table(np);
-               break;
-       default:
-               err = NOTIFY_DONE;
-               break;
-       }
-       return err;
-}
-
-static struct notifier_block iommu_reconfig_nb = {
-       .notifier_call = iommu_reconfig_notifier,
-};
-
 static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
 {
        struct device_node *pdn, *dn;
@@ -554,6 +532,35 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
 
        dev->dev.archdata.dma_data = pci->iommu_table;
 }
+#else  /* CONFIG_PCI */
+#define pci_dma_bus_setup_pSeries      NULL
+#define pci_dma_dev_setup_pSeries      NULL
+#define pci_dma_bus_setup_pSeriesLP    NULL
+#define pci_dma_dev_setup_pSeriesLP    NULL
+#endif /* !CONFIG_PCI */
+
+static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
+{
+       int err = NOTIFY_OK;
+       struct device_node *np = node;
+       struct pci_dn *pci = PCI_DN(np);
+
+       switch (action) {
+       case PSERIES_RECONFIG_REMOVE:
+               if (pci && pci->iommu_table &&
+                   get_property(np, "ibm,dma-window", NULL))
+                       iommu_free_table(np);
+               break;
+       default:
+               err = NOTIFY_DONE;
+               break;
+       }
+       return err;
+}
+
+static struct notifier_block iommu_reconfig_nb = {
+       .notifier_call = iommu_reconfig_notifier,
+};
 
 /* These are called very early. */
 void iommu_init_early_pSeries(void)
index 34aff47b1f551c670eca377eeb148a8f618dc946..ff87b1ad8ce9b9535e2352f4cce77f4b042f4be3 100644 (file)
@@ -65,6 +65,7 @@
 #include <asm/udbg.h>
 #include <asm/smp.h>
 #include <asm/firmware.h>
+#include <asm/eeh.h>
 
 #include "plpar_wrappers.h"
 #include "pseries.h"
@@ -514,6 +515,10 @@ void pSeries_power_off(void)
        for (;;);
 }
 
+#ifndef CONFIG_PCI
+void pSeries_final_fixup(void) { }
+#endif
+
 define_machine(pseries) {
        .name                   = "pSeries",
        .probe                  = pSeries_probe,
index 7f5a59836818c6f1e227dfff3fff655b15f0d64d..35d2abd1ed5010ba6d522aac836c66fbfcf2bff0 100644 (file)
@@ -396,7 +396,7 @@ config FB_ATARI
 
 config FB_OF
        bool "Open Firmware frame buffer device support"
-       depends on (FB = y) && (PPC64 || PPC_OF)
+       depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
index ab6eddb518c737e3c59a6c63154215dc3998ad1e..4a053404bf6b1766a6b90773075eca5d61056655 100644 (file)
@@ -10,6 +10,8 @@
 #define _ASM_POWERPC_PPC_PCI_H
 #ifdef __KERNEL__
 
+#ifdef CONFIG_PCI
+
 #include <linux/pci.h>
 #include <asm/pci-bridge.h>
 
@@ -126,5 +128,10 @@ struct device_node * find_device_pe(struct device_node *dn);
 
 #endif
 
+#else /* CONFIG_PCI */
+static inline void find_and_init_phbs(void) { }
+static inline void init_pci_config_tokens(void) { }
+#endif /* !CONFIG_PCI */
+
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_PPC_PCI_H */