summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/include/plat/iommu.h
AgeCommit message (Collapse)Author
2012-09-23ARM: OMAP3: hwmod data: add mmu data for iva and ispPaul Walmsley
Add mmu hwmod data for iva and isp. Due to compatibility an ifdef CONFIG_OMAP_IOMMU_IVA2 needs to be propagated (previously on iommu resource info) to hwmod data in OMAP3, so users of iommu and tidspbridge can avoid issues of two modules managing mmu data/irqs/resets; this until tidspbridge can be migrated to iommu framework. Cc: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> [paul@pwsan.com: fixed some kerneldoc and whitespace; ISP MMUs not present on AM35xx so restricted these hwmods to 34xx/36xx] Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-23ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selectedOmar Ramirez Luna
If included without IOMMU_API being selected it will break compilation: arch/arm/plat-omap/include/plat/iommu.h: In function 'dev_to_omap_iommu': arch/arm/plat-omap/include/plat/iommu.h:148: error: 'struct dev_archdata' has no member named 'iommu' This will be seen when hwmod includes iommu.h to get the structure for attributes. Also needed for tidspbridge incremental migration to use iommu code. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-12-05iommu/omap: eliminate the public omap_find_iommu_device() methodOhad Ben-Cohen
Eliminate the public omap_find_iommu_device() method, and don't expect clients to provide the omap_iommu handle anymore. Instead, OMAP's iommu driver now utilizes dev_archdata's private iommu extension to be able to access the required iommu information. This way OMAP IOMMU users are now able to use the generic IOMMU API without having to call any omap-specific binding method. Update omap3isp appropriately. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Hiroshi Doyu <hdoyu@nvidia.com>
2011-12-05ARM: OMAP: iommu: declare a private iommu binding structOhad Ben-Cohen
Declare an omap iommu private struct, which binds an iommu user to its iommu device. This struct should be placed at the iommu user's dev_archdata so generic IOMMU API can be used without having to utilize omap-specific plumbing anymore. While at it, provide an accessor method to ease the retrieval of the omap_iommu handle from a user device. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Hiroshi Doyu <hdoyu@nvidia.com>
2011-09-14iommu/omap: Migrate to the generic fault report mechanismOhad Ben-Cohen
Start using the generic fault report mechanism, as provided by the IOMMU core, and remove its now-redundant omap_iommu_set_isr API. Currently we're only interested in letting upper layers know about the fault, so in case the faulting device is a remote processor, they could restart it. Dynamic PTE/TLB loading is not supported. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: omapify 'struct iommu' and exposed APIOhad Ben-Cohen
Prepend 'omap_' to OMAP's 'struct iommu' and exposed API, to prevent namespace pollution and generally to improve readability of the code that still uses the driver directly. Update the users as needed as well. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: remove unused exported APIOhad Ben-Cohen
Remove unused public APIs from OMAP's iommu driver. IOMMU functionality should be exposed only via the generic IOMMU API; this way drivers stay generic, and different IOMMU drivers don't need to duplicate similar functionalities. The rest of the API still exposed by OMAP's iommu will be evaluated and eventually either added to the generic IOMMU API (if relevant), or completely removed. The intention is that OMAP's iommu driver will eventually not expose any public API. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: stop exporting local functionsOhad Ben-Cohen
Stop exporting functions that are used only within the iommu driver itself. Eventually OMAP's iommu driver should only expose API via the generic IOMMU framework. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: migrate to the generic IOMMU APIOhad Ben-Cohen
Migrate OMAP's iommu driver to the generic IOMMU API, so users can stay generic, and any generic IOMMU functionality can be developed once in the generic framework. Migrate omap's iovmm (virtual memory manager) to the generic IOMMU API, and adapt omap3isp as needed, so the latter won't break. The plan is to eventually remove iovmm completely by replacing it with the (upcoming) IOMMU-based DMA-API. Tested on OMAP3 (with omap3isp) and OMAP4 (with rpmsg/remoteproc). Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-02-24omap: IOMMU: add support to callback during fault handlingDavid Cohen
Add support to register an isr for IOMMU fault situations and adapt it to allow such (*isr)() to be used as fault callback. Drivers using IOMMU module might want to be informed when errors happen in order to debug it or react. Signed-off-by: David Cohen <dacohen@gmail.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-17omap: IOMMU: add missing function declarationDavid Cohen
Declaration of exported function 'iopgtable_lookup_entry' is missing from header file. Currently we have a sparse warning as it's not being used externally. Adding its declaration to avoid such warning and allow its usage in future. Signed-off-by: David Cohen <dacohen@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-12-15OMAP: iommu: create new api to set valid da rangeGuzman Lugo, Fernando
Some IOMMUs cannot use the whole 0x0 - 0xFFFFFFFF range. With this new API the valid range can be set. Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
2010-06-29omap iommu: add functionality to get TLB miss interruptKanigeri, Hari
In order to enable TLB miss interrupt, the TWL should be disabled. This patch provides the functionality to get the MMU fault interrupt for a TLB miss in the cases where the users are working with the locked TLB entries and with TWL disabled. New interface is added to select twl and to enable TLB miss interrupt. Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com> Signed-off-by: Ramesh Gupta <grgupta@ti.com> Signed-off-by: Hiroshi Doyu <Hiroshi.DOYU@nokia.com>
2009-10-20omap: headers: Move remaining headers from include/mach to include/platTony Lindgren
Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>