diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-11-11 01:25:02 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:38:40 -0500 |
commit | 12d04eef927bf61328af2c7cbe756c96f98ac3bf (patch) | |
tree | 18865369100e9059c7e883dec93ea67f7b52a287 /arch/powerpc/kernel/of_platform.c | |
parent | 7c719871ff4d5f15b71f0138d08b758281b58631 (diff) |
[POWERPC] Refactor 64 bits DMA operations
This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
is untouched for now.
We use the new dev_archdata structure to add the dma operations pointer
and associated data to struct device. While at it, we also add the OF node
pointer and numa node. In the future, we might want to look into merging
that with pci_dn as well.
The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
by a set of generic iommu and direct DMA ops (non PCI specific) that can be
used by bus types. The toplevel implementation is now inline.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 25850ade8e68..7a0e77af7c9f 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/dcr.h> | 22 | #include <asm/dcr.h> |
23 | #include <asm/of_device.h> | 23 | #include <asm/of_device.h> |
24 | #include <asm/of_platform.h> | 24 | #include <asm/of_platform.h> |
25 | 25 | #include <asm/topology.h> | |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * The list of OF IDs below is used for matching bus types in the | 28 | * The list of OF IDs below is used for matching bus types in the |
@@ -221,6 +221,13 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
221 | dev->dev.parent = parent; | 221 | dev->dev.parent = parent; |
222 | dev->dev.bus = &of_platform_bus_type; | 222 | dev->dev.bus = &of_platform_bus_type; |
223 | dev->dev.release = of_release_dev; | 223 | dev->dev.release = of_release_dev; |
224 | dev->dev.archdata.of_node = np; | ||
225 | dev->dev.archdata.numa_node = of_node_to_nid(np); | ||
226 | |||
227 | /* We do not fill the DMA ops for platform devices by default. | ||
228 | * This is currently the responsibility of the platform code | ||
229 | * to do such, possibly using a device notifier | ||
230 | */ | ||
224 | 231 | ||
225 | if (bus_id) | 232 | if (bus_id) |
226 | strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); | 233 | strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); |