From: Ohad Ben-Cohen Date: Mon, 20 Feb 2012 17:43:29 +0000 (-0800) Subject: ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} X-Git-Tag: v3.4-rc1~91^2~3^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=993e4fbd7822cdf874fcf9f1b054a323d67ccf97;p=pandora-kernel.git ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} Expose omap_device_{alloc, delete, register} so we can use them outside of omap_device.c. This approach allows users, which need to manipulate an archdata member of a device before it is registered, to do so. This is also useful for users who have their devices created very early so they can be used at ->reserve() time to reserve CMA memory. The immediate use case for this is to set the private iommu archdata member, which binds a device to its associated iommu controller. This way, generic code will be able to attach omap devices to their iommus, without calling any omap-specific API. With this in hand, we can further clean the existing mainline OMAP iommu driver and its mainline users, and focus on generic IOMMU approaches for future users (rpmsg/remoteproc and the upcoming generic DMA API). This patch is still considered an interim solution until DT fully materializes for omap; at that point, this functionality will be removed as DT will take care of creating the devices and configuring them correctly. Tested on OMAP4 with a generic rpmsg/remoteproc that doesn't use any omap-specific IOMMU API anymore. Signed-off-by: Ohad Ben-Cohen Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- Reading git-diff-tree failed