提交 145d01e4 编写于 作者: S Stephen Rothwell 提交者: Linus Torvalds

[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: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 7f74e79f
...@@ -323,7 +323,7 @@ config EISA ...@@ -323,7 +323,7 @@ config EISA
bool bool
config PCI config PCI
bool bool "support for PCI devices" if (EMBEDDED && PPC_ISERIES)
default y default y
help help
Find out whether your system includes a PCI bus. PCI is the name of Find out whether your system includes a PCI bus. PCI is the name of
......
...@@ -16,13 +16,13 @@ obj-y += vdso32/ vdso64/ ...@@ -16,13 +16,13 @@ obj-y += vdso32/ vdso64/
obj-$(CONFIG_PPC_OF) += of_device.o obj-$(CONFIG_PPC_OF) += of_device.o
pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_VpdInfo.o pci-obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o iSeries_irq.o \
iSeries_VpdInfo.o
pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y)
obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \ obj-$(CONFIG_PPC_ISERIES) += HvCall.o HvLpConfig.o LparData.o \
HvCall.o HvLpConfig.o LparData.o \
iSeries_setup.o ItLpQueue.o hvCall.o \ iSeries_setup.o ItLpQueue.o hvCall.o \
mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \
iSeries_iommu.o iSeries_iommu.o
......
...@@ -15,8 +15,10 @@ ...@@ -15,8 +15,10 @@
static struct dma_mapping_ops *get_dma_ops(struct device *dev) static struct dma_mapping_ops *get_dma_ops(struct device *dev)
{ {
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) if (dev->bus == &pci_bus_type)
return &pci_dma_ops; return &pci_dma_ops;
#endif
#ifdef CONFIG_IBMVIO #ifdef CONFIG_IBMVIO
if (dev->bus == &vio_bus_type) if (dev->bus == &vio_bus_type)
return &vio_dma_ops; return &vio_dma_ops;
...@@ -37,8 +39,10 @@ EXPORT_SYMBOL(dma_supported); ...@@ -37,8 +39,10 @@ EXPORT_SYMBOL(dma_supported);
int dma_set_mask(struct device *dev, u64 dma_mask) int dma_set_mask(struct device *dev, u64 dma_mask)
{ {
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) if (dev->bus == &pci_bus_type)
return pci_set_dma_mask(to_pci_dev(dev), dma_mask); return pci_set_dma_mask(to_pci_dev(dev), dma_mask);
#endif
#ifdef CONFIG_IBMVIO #ifdef CONFIG_IBMVIO
if (dev->bus == &vio_bus_type) if (dev->bus == &vio_bus_type)
return -EIO; return -EIO;
......
...@@ -83,7 +83,7 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) ...@@ -83,7 +83,7 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages)
} }
} }
#ifdef CONFIG_PCI
/* /*
* This function compares the known tables to find an iommu_table * This function compares the known tables to find an iommu_table
* that has already been built for hardware TCEs. * that has already been built for hardware TCEs.
...@@ -159,6 +159,7 @@ void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn) ...@@ -159,6 +159,7 @@ void iommu_devnode_init_iSeries(struct iSeries_Device_Node *dn)
else else
kfree(tbl); kfree(tbl);
} }
#endif
static void iommu_dev_setup_iSeries(struct pci_dev *dev) { } static void iommu_dev_setup_iSeries(struct pci_dev *dev) { }
static void iommu_bus_setup_iSeries(struct pci_bus *bus) { } static void iommu_bus_setup_iSeries(struct pci_bus *bus) { }
......
...@@ -76,7 +76,11 @@ extern void ppcdbg_initialize(void); ...@@ -76,7 +76,11 @@ extern void ppcdbg_initialize(void);
static void build_iSeries_Memory_Map(void); static void build_iSeries_Memory_Map(void);
static void setup_iSeries_cache_sizes(void); static void setup_iSeries_cache_sizes(void);
static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
#ifdef CONFIG_PCI
extern void iSeries_pci_final_fixup(void); extern void iSeries_pci_final_fixup(void);
#else
static void iSeries_pci_final_fixup(void) { }
#endif
/* Global Variables */ /* Global Variables */
static unsigned long procFreqHz; static unsigned long procFreqHz;
...@@ -876,6 +880,10 @@ static int set_spread_lpevents(char *str) ...@@ -876,6 +880,10 @@ static int set_spread_lpevents(char *str)
} }
__setup("spread_lpevents=", set_spread_lpevents); __setup("spread_lpevents=", set_spread_lpevents);
#ifndef CONFIG_PCI
void __init iSeries_init_IRQ(void) { }
#endif
void __init iSeries_early_setup(void) void __init iSeries_early_setup(void)
{ {
iSeries_fixup_klimit(); iSeries_fixup_klimit();
......
...@@ -741,6 +741,7 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu ...@@ -741,6 +741,7 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu
asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
{ {
#ifdef CONFIG_PCI
struct pci_controller* hose; struct pci_controller* hose;
struct list_head *ln; struct list_head *ln;
struct pci_bus *bus = NULL; struct pci_bus *bus = NULL;
...@@ -786,7 +787,7 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) ...@@ -786,7 +787,7 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
case IOBASE_ISA_MEM: case IOBASE_ISA_MEM:
return -EINVAL; return -EINVAL;
} }
#endif /* CONFIG_PCI */
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -12,7 +12,7 @@ lib-$(CONFIG_SMP) += locks.o ...@@ -12,7 +12,7 @@ lib-$(CONFIG_SMP) += locks.o
# e2a provides EBCDIC to ASCII conversions. # e2a provides EBCDIC to ASCII conversions.
ifdef CONFIG_PPC_ISERIES ifdef CONFIG_PPC_ISERIES
obj-$(CONFIG_PCI) += e2a.o obj-y += e2a.o
endif endif
lib-$(CONFIG_DEBUG_KERNEL) += sstep.o lib-$(CONFIG_DEBUG_KERNEL) += sstep.o
...@@ -484,7 +484,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, ...@@ -484,7 +484,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
return virtr + wrote; return virtr + wrote;
} }
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
static ssize_t read_port(struct file * file, char __user * buf, static ssize_t read_port(struct file * file, char __user * buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -744,7 +744,7 @@ static struct file_operations null_fops = { ...@@ -744,7 +744,7 @@ static struct file_operations null_fops = {
.write = write_null, .write = write_null,
}; };
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
static struct file_operations port_fops = { static struct file_operations port_fops = {
.llseek = memory_lseek, .llseek = memory_lseek,
.read = read_port, .read = read_port,
...@@ -804,7 +804,7 @@ static int memory_open(struct inode * inode, struct file * filp) ...@@ -804,7 +804,7 @@ static int memory_open(struct inode * inode, struct file * filp)
case 3: case 3:
filp->f_op = &null_fops; filp->f_op = &null_fops;
break; break;
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
case 4: case 4:
filp->f_op = &port_fops; filp->f_op = &port_fops;
break; break;
...@@ -846,7 +846,7 @@ static const struct { ...@@ -846,7 +846,7 @@ static const struct {
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
{2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
{3, "null", S_IRUGO | S_IWUGO, &null_fops}, {3, "null", S_IRUGO | S_IWUGO, &null_fops},
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
#endif #endif
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
......
...@@ -753,7 +753,7 @@ config SERIAL_MPC52xx_CONSOLE_BAUD ...@@ -753,7 +753,7 @@ config SERIAL_MPC52xx_CONSOLE_BAUD
config SERIAL_ICOM config SERIAL_ICOM
tristate "IBM Multiport Serial Adapter" tristate "IBM Multiport Serial Adapter"
depends on PPC_ISERIES || PPC_PSERIES depends on PCI && (PPC_ISERIES || PPC_PSERIES)
select SERIAL_CORE select SERIAL_CORE
help help
This driver is for a family of multiport serial adapters This driver is for a family of multiport serial adapters
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
/* Doesn't really apply... */ /* Doesn't really apply... */
#define MAX_DMA_ADDRESS (~0UL) #define MAX_DMA_ADDRESS (~0UL)
#if !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)
#define dma_outb outb #define dma_outb outb
#define dma_inb inb #define dma_inb inb
...@@ -323,4 +325,5 @@ extern int isa_dma_bridge_buggy; ...@@ -323,4 +325,5 @@ extern int isa_dma_bridge_buggy;
#else #else
#define isa_dma_bridge_buggy (0) #define isa_dma_bridge_buggy (0)
#endif #endif
#endif /* !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI) */
#endif /* _ASM_DMA_H */ #endif /* _ASM_DMA_H */
...@@ -137,8 +137,12 @@ extern void iommu_init_early_pSeries(void); ...@@ -137,8 +137,12 @@ extern void iommu_init_early_pSeries(void);
extern void iommu_init_early_iSeries(void); extern void iommu_init_early_iSeries(void);
extern void iommu_init_early_u3(void); extern void iommu_init_early_u3(void);
#ifdef CONFIG_PCI
extern void pci_iommu_init(void); extern void pci_iommu_init(void);
extern void pci_direct_iommu_init(void); extern void pci_direct_iommu_init(void);
#else
static inline void pci_iommu_init(void) { }
#endif
extern void alloc_u3_dart_table(void); extern void alloc_u3_dart_table(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册