aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-06-21 20:15:52 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 21:46:31 -0400
commit145d01e4287b8cbf50f87c3283e33bf5c84e8468 (patch)
tree368786294f6cf7b8b909aceaac8cc4d90be2ab7d
parent7f74e79fe749da035cc150446f02aec29938a5c8 (diff)
[PATCH] ppc64 iSeries: allow build with no PCI
This patch allows iSeries to build with CONFIG_PCI=n. This is useful for partitions that have only virtual I/O. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc64/Kconfig2
-rw-r--r--arch/ppc64/kernel/Makefile6
-rw-r--r--arch/ppc64/kernel/dma.c4
-rw-r--r--arch/ppc64/kernel/iSeries_iommu.c3
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c8
-rw-r--r--arch/ppc64/kernel/sys_ppc32.c3
-rw-r--r--arch/ppc64/lib/Makefile2
-rw-r--r--drivers/char/mem.c8
-rw-r--r--drivers/serial/Kconfig2
-rw-r--r--include/asm-ppc64/dma.h3
-rw-r--r--include/asm-ppc64/iommu.h4
11 files changed, 33 insertions, 12 deletions
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index 5cb343883e4d..0f1fa289744e 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -323,7 +323,7 @@ config EISA
323 bool 323 bool
324 324
325config PCI 325config PCI
326 bool 326 bool "support for PCI devices" if (EMBEDDED && PPC_ISERIES)
327 default y 327 default y
328 help 328 help
329 Find out whether your system includes a PCI bus. PCI is the name of 329 Find out whether your system includes a PCI bus. PCI is the name of
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index ebf9b3cbf33d..b5e167cf1a05 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -16,13 +16,13 @@ obj-y += vdso32/ vdso64/
16 16
17obj-$(CONFIG_PPC_OF) += of_device.o 17obj-$(CONFIG_PPC_OF) += of_device.o
18 18
19pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_VpdInfo.o 19pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_irq.o \
20 iSeries_VpdInfo.o
20pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o 21pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
21 22
22obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) 23obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y)
23 24
24obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \ 25obj-$(CONFIG_PPC_ISERIES) += HvCall.o HvLpConfig.o LparData.o \
25 HvCall.o HvLpConfig.o LparData.o \
26 iSeries_setup.o ItLpQueue.o hvCall.o \ 26 iSeries_setup.o ItLpQueue.o hvCall.o \
27 mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ 27 mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \
28 iSeries_iommu.o 28 iSeries_iommu.o
diff --git a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c
index ce714c927134..4da8e31b2b61 100644
--- a/arch/ppc64/kernel/dma.c
+++ b/arch/ppc64/kernel/dma.c
@@ -15,8 +15,10 @@
15 15
16static struct dma_mapping_ops *get_dma_ops(struct device *dev) 16static struct dma_mapping_ops *get_dma_ops(struct device *dev)
17{ 17{
18#ifdef CONFIG_PCI
18 if (dev->bus == &pci_bus_type) 19 if (dev->bus == &pci_bus_type)
19 return &pci_dma_ops; 20 return &pci_dma_ops;
21#endif
20#ifdef CONFIG_IBMVIO 22#ifdef CONFIG_IBMVIO
21 if (dev->bus == &vio_bus_type) 23 if (dev->bus == &vio_bus_type)
22 return &vio_dma_ops; 24 return &vio_dma_ops;
@@ -37,8 +39,10 @@ EXPORT_SYMBOL(dma_supported);
37 39
38int dma_set_mask(struct device *dev, u64 dma_mask) 40int dma_set_mask(struct device *dev, u64 dma_mask)
39{ 41{
42#ifdef CONFIG_PCI
40 if (dev->bus == &pci_bus_type) 43 if (dev->bus == &pci_bus_type)
41 return pci_set_dma_mask(to_pci_dev(dev), dma_mask); 44 return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
45#endif
42#ifdef CONFIG_IBMVIO 46#ifdef CONFIG_IBMVIO
43 if (dev->bus == &vio_bus_type) 47 if (dev->bus == &vio_bus_type)
44 return -EIO; 48 return -EIO;
diff --git a/arch/ppc64/kernel/iSeries_iommu.c b/arch/ppc64/kernel/iSeries_iommu.c
index 4e1a47c8a802..f8ff1bb054dc 100644
--- a/arch/ppc64/kernel/iSeries_iommu.c
+++ b/arch/ppc64/kernel/iSeries_iommu.c
@@ -83,7 +83,7 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages)
83 } 83 }
84} 84}
85 85
86 86#ifdef CONFIG_PCI
87/* 87/*
88 * This function compares the known tables to find an iommu_table 88 * This function compares the known tables to find an iommu_table
89 * that has already been built for hardware TCEs. 89 * that has already been built for hardware TCEs.
@@ -159,6 +159,7 @@ void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn)
159 else 159 else
160 kfree(tbl); 160 kfree(tbl);
161} 161}
162#endif
162 163
163static void iommu_dev_setup_iSeries(struct pci_dev *dev) { } 164static void iommu_dev_setup_iSeries(struct pci_dev *dev) { }
164static void iommu_bus_setup_iSeries(struct pci_bus *bus) { } 165static void iommu_bus_setup_iSeries(struct pci_bus *bus) { }
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 3d3ed631499a..b31962436fe3 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -76,7 +76,11 @@ extern void ppcdbg_initialize(void);
76static void build_iSeries_Memory_Map(void); 76static void build_iSeries_Memory_Map(void);
77static void setup_iSeries_cache_sizes(void); 77static void setup_iSeries_cache_sizes(void);
78static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); 78static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
79#ifdef CONFIG_PCI
79extern void iSeries_pci_final_fixup(void); 80extern void iSeries_pci_final_fixup(void);
81#else
82static void iSeries_pci_final_fixup(void) { }
83#endif
80 84
81/* Global Variables */ 85/* Global Variables */
82static unsigned long procFreqHz; 86static unsigned long procFreqHz;
@@ -876,6 +880,10 @@ static int set_spread_lpevents(char *str)
876} 880}
877__setup("spread_lpevents=", set_spread_lpevents); 881__setup("spread_lpevents=", set_spread_lpevents);
878 882
883#ifndef CONFIG_PCI
884void __init iSeries_init_IRQ(void) { }
885#endif
886
879void __init iSeries_early_setup(void) 887void __init iSeries_early_setup(void)
880{ 888{
881 iSeries_fixup_klimit(); 889 iSeries_fixup_klimit();
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c
index 9c8e317c598d..118436e8085a 100644
--- a/arch/ppc64/kernel/sys_ppc32.c
+++ b/arch/ppc64/kernel/sys_ppc32.c
@@ -741,6 +741,7 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu
741 741
742asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) 742asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
743{ 743{
744#ifdef CONFIG_PCI
744 struct pci_controller* hose; 745 struct pci_controller* hose;
745 struct list_head *ln; 746 struct list_head *ln;
746 struct pci_bus *bus = NULL; 747 struct pci_bus *bus = NULL;
@@ -786,7 +787,7 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
786 case IOBASE_ISA_MEM: 787 case IOBASE_ISA_MEM:
787 return -EINVAL; 788 return -EINVAL;
788 } 789 }
789 790#endif /* CONFIG_PCI */
790 return -EOPNOTSUPP; 791 return -EOPNOTSUPP;
791} 792}
792 793
diff --git a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile
index bf7b5bbfc04e..76fbfa9f706f 100644
--- a/arch/ppc64/lib/Makefile
+++ b/arch/ppc64/lib/Makefile
@@ -12,7 +12,7 @@ lib-$(CONFIG_SMP) += locks.o
12 12
13# e2a provides EBCDIC to ASCII conversions. 13# e2a provides EBCDIC to ASCII conversions.
14ifdef CONFIG_PPC_ISERIES 14ifdef CONFIG_PPC_ISERIES
15obj-$(CONFIG_PCI) += e2a.o 15obj-y += e2a.o
16endif 16endif
17 17
18lib-$(CONFIG_DEBUG_KERNEL) += sstep.o 18lib-$(CONFIG_DEBUG_KERNEL) += sstep.o
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 257b8ee605e5..e3085b22a365 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -484,7 +484,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
484 return virtr + wrote; 484 return virtr + wrote;
485} 485}
486 486
487#if defined(CONFIG_ISA) || !defined(__mc68000__) 487#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
488static ssize_t read_port(struct file * file, char __user * buf, 488static ssize_t read_port(struct file * file, char __user * buf,
489 size_t count, loff_t *ppos) 489 size_t count, loff_t *ppos)
490{ 490{
@@ -744,7 +744,7 @@ static struct file_operations null_fops = {
744 .write = write_null, 744 .write = write_null,
745}; 745};
746 746
747#if defined(CONFIG_ISA) || !defined(__mc68000__) 747#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
748static struct file_operations port_fops = { 748static struct file_operations port_fops = {
749 .llseek = memory_lseek, 749 .llseek = memory_lseek,
750 .read = read_port, 750 .read = read_port,
@@ -804,7 +804,7 @@ static int memory_open(struct inode * inode, struct file * filp)
804 case 3: 804 case 3:
805 filp->f_op = &null_fops; 805 filp->f_op = &null_fops;
806 break; 806 break;
807#if defined(CONFIG_ISA) || !defined(__mc68000__) 807#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
808 case 4: 808 case 4:
809 filp->f_op = &port_fops; 809 filp->f_op = &port_fops;
810 break; 810 break;
@@ -846,7 +846,7 @@ static const struct {
846 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, 846 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
847 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, 847 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
848 {3, "null", S_IRUGO | S_IWUGO, &null_fops}, 848 {3, "null", S_IRUGO | S_IWUGO, &null_fops},
849#if defined(CONFIG_ISA) || !defined(__mc68000__) 849#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
850 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, 850 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
851#endif 851#endif
852 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, 852 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 6e44b46c9e9d..6a15703f1cb9 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -753,7 +753,7 @@ config SERIAL_MPC52xx_CONSOLE_BAUD
753 753
754config SERIAL_ICOM 754config SERIAL_ICOM
755 tristate "IBM Multiport Serial Adapter" 755 tristate "IBM Multiport Serial Adapter"
756 depends on PPC_ISERIES || PPC_PSERIES 756 depends on PCI && (PPC_ISERIES || PPC_PSERIES)
757 select SERIAL_CORE 757 select SERIAL_CORE
758 help 758 help
759 This driver is for a family of multiport serial adapters 759 This driver is for a family of multiport serial adapters
diff --git a/include/asm-ppc64/dma.h b/include/asm-ppc64/dma.h
index d693b8026bc3..dfd1f69059ba 100644
--- a/include/asm-ppc64/dma.h
+++ b/include/asm-ppc64/dma.h
@@ -27,6 +27,8 @@
27/* Doesn't really apply... */ 27/* Doesn't really apply... */
28#define MAX_DMA_ADDRESS (~0UL) 28#define MAX_DMA_ADDRESS (~0UL)
29 29
30#if !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)
31
30#define dma_outb outb 32#define dma_outb outb
31#define dma_inb inb 33#define dma_inb inb
32 34
@@ -323,4 +325,5 @@ extern int isa_dma_bridge_buggy;
323#else 325#else
324#define isa_dma_bridge_buggy (0) 326#define isa_dma_bridge_buggy (0)
325#endif 327#endif
328#endif /* !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI) */
326#endif /* _ASM_DMA_H */ 329#endif /* _ASM_DMA_H */
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h
index d9b53374d23a..729de5cc21d9 100644
--- a/include/asm-ppc64/iommu.h
+++ b/include/asm-ppc64/iommu.h
@@ -137,8 +137,12 @@ extern void iommu_init_early_pSeries(void);
137extern void iommu_init_early_iSeries(void); 137extern void iommu_init_early_iSeries(void);
138extern void iommu_init_early_u3(void); 138extern void iommu_init_early_u3(void);
139 139
140#ifdef CONFIG_PCI
140extern void pci_iommu_init(void); 141extern void pci_iommu_init(void);
141extern void pci_direct_iommu_init(void); 142extern void pci_direct_iommu_init(void);
143#else
144static inline void pci_iommu_init(void) { }
145#endif
142 146
143extern void alloc_u3_dart_table(void); 147extern void alloc_u3_dart_table(void);
144 148