diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-04-27 03:23:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-29 04:02:02 -0400 |
commit | c7f0e8cb5654a50986c6097b3c0cca972e406899 (patch) | |
tree | dc8a8e590c5cf97d8b7cae2f1e93bdbef178f89f /arch/powerpc/platforms/iseries | |
parent | dd721ffd95d5e1516380da0b254ef737582a258f (diff) |
[PATCH] powerpc: merge the rest of the vio code
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r-- | arch/powerpc/platforms/iseries/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/iommu.h | 35 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/vio.c | 67 |
5 files changed, 2 insertions, 106 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index ce8c0b943fa0..7e67a20c18ab 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
@@ -3,7 +3,6 @@ EXTRA_CFLAGS += -mno-minimal-toc | |||
3 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ | 3 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ |
4 | hvcall.o proc.o htab.o iommu.o misc.o irq.o | 4 | hvcall.o proc.o htab.o iommu.o misc.o irq.o |
5 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o | 5 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o |
6 | obj-$(CONFIG_IBMVIO) += vio.o | ||
7 | obj-$(CONFIG_SMP) += smp.o | 6 | obj-$(CONFIG_SMP) += smp.o |
8 | obj-$(CONFIG_VIOPATH) += viopath.o | 7 | obj-$(CONFIG_VIOPATH) += viopath.o |
9 | obj-$(CONFIG_MODULES) += ksyms.o | 8 | obj-$(CONFIG_MODULES) += ksyms.o |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bea0b703f409..a8d96314c982 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -33,8 +33,7 @@ | |||
33 | #include <asm/abs_addr.h> | 33 | #include <asm/abs_addr.h> |
34 | #include <asm/pci-bridge.h> | 34 | #include <asm/pci-bridge.h> |
35 | #include <asm/iseries/hv_call_xm.h> | 35 | #include <asm/iseries/hv_call_xm.h> |
36 | 36 | #include <asm/iseries/iommu.h> | |
37 | #include "iommu.h" | ||
38 | 37 | ||
39 | extern struct list_head iSeries_Global_Device_List; | 38 | extern struct list_head iSeries_Global_Device_List; |
40 | 39 | ||
diff --git a/arch/powerpc/platforms/iseries/iommu.h b/arch/powerpc/platforms/iseries/iommu.h deleted file mode 100644 index cb5658fbe657..000000000000 --- a/arch/powerpc/platforms/iseries/iommu.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #ifndef _PLATFORMS_ISERIES_IOMMU_H | ||
2 | #define _PLATFORMS_ISERIES_IOMMU_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2005 Stephen Rothwell, IBM Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the: | ||
19 | * Free Software Foundation, Inc., | ||
20 | * 59 Temple Place, Suite 330, | ||
21 | * Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | struct device_node; | ||
25 | struct iommu_table; | ||
26 | |||
27 | /* Creates table for an individual device node */ | ||
28 | extern void iommu_devnode_init_iSeries(struct device_node *dn); | ||
29 | |||
30 | /* Get table parameters from HV */ | ||
31 | extern void iommu_table_getparms_iSeries(unsigned long busno, | ||
32 | unsigned char slotno, unsigned char virtbus, | ||
33 | struct iommu_table *tbl); | ||
34 | |||
35 | #endif /* _PLATFORMS_ISERIES_IOMMU_H */ | ||
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 5a61c6fdb33a..428ffb5cf044 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -37,13 +37,13 @@ | |||
37 | 37 | ||
38 | #include <asm/iseries/hv_call_xm.h> | 38 | #include <asm/iseries/hv_call_xm.h> |
39 | #include <asm/iseries/mf.h> | 39 | #include <asm/iseries/mf.h> |
40 | #include <asm/iseries/iommu.h> | ||
40 | 41 | ||
41 | #include <asm/ppc-pci.h> | 42 | #include <asm/ppc-pci.h> |
42 | 43 | ||
43 | #include "irq.h" | 44 | #include "irq.h" |
44 | #include "pci.h" | 45 | #include "pci.h" |
45 | #include "call_pci.h" | 46 | #include "call_pci.h" |
46 | #include "iommu.h" | ||
47 | 47 | ||
48 | /* | 48 | /* |
49 | * Forward declares of prototypes. | 49 | * Forward declares of prototypes. |
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c deleted file mode 100644 index bdd2b7d97d15..000000000000 --- a/arch/powerpc/platforms/iseries/vio.c +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * IBM PowerPC iSeries Virtual I/O Infrastructure Support. | ||
3 | * | ||
4 | * Copyright (c) 2005 Stephen Rothwell, IBM Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/device.h> | ||
13 | #include <linux/init.h> | ||
14 | |||
15 | #include <asm/vio.h> | ||
16 | #include <asm/iommu.h> | ||
17 | #include <asm/tce.h> | ||
18 | #include <asm/abs_addr.h> | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/iseries/vio.h> | ||
21 | #include <asm/iseries/hv_types.h> | ||
22 | #include <asm/iseries/hv_lp_config.h> | ||
23 | #include <asm/iseries/hv_call_xm.h> | ||
24 | |||
25 | #include "iommu.h" | ||
26 | |||
27 | struct device *iSeries_vio_dev = &vio_bus_device.dev; | ||
28 | EXPORT_SYMBOL(iSeries_vio_dev); | ||
29 | |||
30 | static struct iommu_table veth_iommu_table; | ||
31 | static struct iommu_table vio_iommu_table; | ||
32 | |||
33 | static void __init iommu_vio_init(void) | ||
34 | { | ||
35 | iommu_table_getparms_iSeries(255, 0, 0xff, &veth_iommu_table); | ||
36 | veth_iommu_table.it_size /= 2; | ||
37 | vio_iommu_table = veth_iommu_table; | ||
38 | vio_iommu_table.it_offset += veth_iommu_table.it_size; | ||
39 | |||
40 | if (!iommu_init_table(&veth_iommu_table)) | ||
41 | printk("Virtual Bus VETH TCE table failed.\n"); | ||
42 | if (!iommu_init_table(&vio_iommu_table)) | ||
43 | printk("Virtual Bus VIO TCE table failed.\n"); | ||
44 | } | ||
45 | |||
46 | static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) | ||
47 | { | ||
48 | if (strcmp(dev->type, "vlan") == 0) | ||
49 | return &veth_iommu_table; | ||
50 | return &vio_iommu_table; | ||
51 | } | ||
52 | |||
53 | static struct vio_bus_ops vio_bus_ops_iseries = { | ||
54 | .build_iommu_table = vio_build_iommu_table, | ||
55 | }; | ||
56 | |||
57 | /** | ||
58 | * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus | ||
59 | */ | ||
60 | static int __init vio_bus_init_iseries(void) | ||
61 | { | ||
62 | iommu_vio_init(); | ||
63 | vio_bus_device.iommu_table = &vio_iommu_table; | ||
64 | iSeries_vio_dev = &vio_bus_device.dev; | ||
65 | return vio_bus_init(&vio_bus_ops_iseries); | ||
66 | } | ||
67 | __initcall(vio_bus_init_iseries); | ||