Skip to contentSkip to conversation

of/platform: teardown DMA mappings on device destruction

PATCH New Will Deacon 2 participants 2 messages Jan 16, 2015 – Jan 21, 2015 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of/platform: teardown DMA mappings on device destruction

Now that we can create and attach to IOMMU domains via of_dma_configure, make sure we give the architecture a chance to tear them down when a platform or amba device is destroyed.

---

Arnd, could you queue this along with the other of_dma_* bits that you have please?

 drivers/of/platform.c | 1 +
 1 file changed, 1 insertion(+)
drivers/of/platform.c +1 -0
index 5b33c6a21807..3f61d668ded7 100644
@@ -526,6 +526,7 @@ static int of_platform_device_destroy(struct device *dev, void *data)
 		amba_device_unregister(to_amba_device(dev));
 #endif
 
+	of_dma_deconfigure(dev);
 	of_node_clear_flag(dev->of_node, OF_POPULATED);
 	of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
 	return 0;
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 of/platform: teardown DMA mappings on device destruction

Quoted 11 lines · Will Deacon

Now that we can create and attach to IOMMU domains via of_dma_configure, make sure we give the architecture a chance to tear them down when a platform or amba device is destroyed.

---

Arnd, could you queue this along with the other of_dma_* bits that you have please?

I'm not sure what those pieces are, but I've queued this in next/drivers.

-Olof