• Ohad Ben-Cohen's avatar
    ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} · 993e4fbd
    Ohad Ben-Cohen authored
    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: default avatarOhad Ben-Cohen <ohad@wizery.com>
    Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    993e4fbd
omap_device.h 5.43 KB