aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Kconfig5
-rw-r--r--arch/powerpc/kernel/Makefile4
-rw-r--r--arch/powerpc/platforms/pseries/Makefile5
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c53
-rw-r--r--arch/powerpc/platforms/pseries/setup.c5
5 files changed, 43 insertions, 29 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6dfbd52694ab..e7205273ff37 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -89,7 +89,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
89 89
90config ARCH_MAY_HAVE_PC_FDC 90config ARCH_MAY_HAVE_PC_FDC
91 bool 91 bool
92 default y 92 default !PPC_PSERIES || PCI
93 93
94config PPC_OF 94config PPC_OF
95 def_bool y 95 def_bool y
@@ -1028,7 +1028,8 @@ config MCA
1028 1028
1029config PCI 1029config PCI
1030 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 1030 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
1031 || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) || MPC7448HPC2 || PPC_PS3 1031 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
1032 || MPC7448HPC2 || PPC_PS3
1032 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ 1033 default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \
1033 && !PPC_85xx && !PPC_86xx 1034 && !PPC_85xx && !PPC_86xx
1034 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS 1035 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 8120d428ebfd..e0fa80eca366 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -25,8 +25,8 @@ obj-$(CONFIG_PPC_970_NAP) += idle_power4.o
25obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o 25obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o
26procfs-$(CONFIG_PPC64) := proc_ppc64.o 26procfs-$(CONFIG_PPC64) := proc_ppc64.o
27obj-$(CONFIG_PROC_FS) += $(procfs-y) 27obj-$(CONFIG_PROC_FS) += $(procfs-y)
28rtaspci-$(CONFIG_PPC64) := rtas_pci.o 28rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o
29obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y) 29obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y)
30obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o 30obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
31obj-$(CONFIG_RTAS_PROC) += rtas-proc.o 31obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
32obj-$(CONFIG_LPARCFG) += lparcfg.o 32obj-$(CONFIG_LPARCFG) += lparcfg.o
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 2dfd05095a25..90235d598751 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -2,14 +2,15 @@ ifeq ($(CONFIG_PPC64),y)
2EXTRA_CFLAGS += -mno-minimal-toc 2EXTRA_CFLAGS += -mno-minimal-toc
3endif 3endif
4 4
5obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ 5obj-y := lpar.o hvCall.o nvram.o reconfig.o \
6 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ 6 setup.o iommu.o ras.o rtasd.o \
7 firmware.o power.o 7 firmware.o power.o
8obj-$(CONFIG_SMP) += smp.o 8obj-$(CONFIG_SMP) += smp.o
9obj-$(CONFIG_XICS) += xics.o 9obj-$(CONFIG_XICS) += xics.o
10obj-$(CONFIG_SCANLOG) += scanlog.o 10obj-$(CONFIG_SCANLOG) += scanlog.o
11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o 11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o
12obj-$(CONFIG_KEXEC) += kexec.o 12obj-$(CONFIG_KEXEC) += kexec.o
13obj-$(CONFIG_PCI) += pci.o pci_dlpar.o
13 14
14obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o 15obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
15 16
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9322f74e1d8b..f9510a5a3e21 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -242,6 +242,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum)
242 return tce_ret; 242 return tce_ret;
243} 243}
244 244
245#ifdef CONFIG_PCI
245static void iommu_table_setparms(struct pci_controller *phb, 246static void iommu_table_setparms(struct pci_controller *phb,
246 struct device_node *dn, 247 struct device_node *dn,
247 struct iommu_table *tbl) 248 struct iommu_table *tbl)
@@ -478,29 +479,6 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
478 pci_name(dev)); 479 pci_name(dev));
479} 480}
480 481
481static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
482{
483 int err = NOTIFY_OK;
484 struct device_node *np = node;
485 struct pci_dn *pci = PCI_DN(np);
486
487 switch (action) {
488 case PSERIES_RECONFIG_REMOVE:
489 if (pci && pci->iommu_table &&
490 get_property(np, "ibm,dma-window", NULL))
491 iommu_free_table(np);
492 break;
493 default:
494 err = NOTIFY_DONE;
495 break;
496 }
497 return err;
498}
499
500static struct notifier_block iommu_reconfig_nb = {
501 .notifier_call = iommu_reconfig_notifier,
502};
503
504static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) 482static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
505{ 483{
506 struct device_node *pdn, *dn; 484 struct device_node *pdn, *dn;
@@ -554,6 +532,35 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
554 532
555 dev->dev.archdata.dma_data = pci->iommu_table; 533 dev->dev.archdata.dma_data = pci->iommu_table;
556} 534}
535#else /* CONFIG_PCI */
536#define pci_dma_bus_setup_pSeries NULL
537#define pci_dma_dev_setup_pSeries NULL
538#define pci_dma_bus_setup_pSeriesLP NULL
539#define pci_dma_dev_setup_pSeriesLP NULL
540#endif /* !CONFIG_PCI */
541
542static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node)
543{
544 int err = NOTIFY_OK;
545 struct device_node *np = node;
546 struct pci_dn *pci = PCI_DN(np);
547
548 switch (action) {
549 case PSERIES_RECONFIG_REMOVE:
550 if (pci && pci->iommu_table &&
551 get_property(np, "ibm,dma-window", NULL))
552 iommu_free_table(np);
553 break;
554 default:
555 err = NOTIFY_DONE;
556 break;
557 }
558 return err;
559}
560
561static struct notifier_block iommu_reconfig_nb = {
562 .notifier_call = iommu_reconfig_notifier,
563};
557 564
558/* These are called very early. */ 565/* These are called very early. */
559void iommu_init_early_pSeries(void) 566void iommu_init_early_pSeries(void)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 34aff47b1f55..ff87b1ad8ce9 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -65,6 +65,7 @@
65#include <asm/udbg.h> 65#include <asm/udbg.h>
66#include <asm/smp.h> 66#include <asm/smp.h>
67#include <asm/firmware.h> 67#include <asm/firmware.h>
68#include <asm/eeh.h>
68 69
69#include "plpar_wrappers.h" 70#include "plpar_wrappers.h"
70#include "pseries.h" 71#include "pseries.h"
@@ -514,6 +515,10 @@ void pSeries_power_off(void)
514 for (;;); 515 for (;;);
515} 516}
516 517
518#ifndef CONFIG_PCI
519void pSeries_final_fixup(void) { }
520#endif
521
517define_machine(pseries) { 522define_machine(pseries) {
518 .name = "pSeries", 523 .name = "pSeries",
519 .probe = pSeries_probe, 524 .probe = pSeries_probe,