summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/fsl_pamu.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge branches 'x86/vt-d', 'x86/amd', 'arm/omap', 'ppc/pamu', 'arm/smmu', ↵Joerg Roedel2014-07-311-5/+5
|\ \ | | | | | | | | | 'arm/exynos' and 'core' into next
| | * iommu/fsl: Fix PAMU window size check.Varun Sethi2014-07-071-4/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | is_power_of_2 requires an unsigned long parameter which would lead to truncation of 64 bit values on 32 bit architectures. __ffs also expects an unsigned long parameter thus won't work for 64 bit values on 32 bit architectures. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Tested-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
| * iommu/fsl: Add void declarations in zero-arg functions.Chi Pham2014-07-041-1/+1
|/ | | | | | | | | | | | | | | Added explicit void declarations to zero-argument function headers. The following coccinelle script was used: @addvoid@ identifier f; @@ f( + void ) { ... } Signed-off-by: Chi Pham <fempsci@gmail.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
* iommu: fsl_pamu.c: Fix for possible null pointer dereferenceRickard Strandqvist2014-05-261-2/+1Star
| | | | | | | | | | | There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Bharat Bhushan <bharat.bhushan@freescale.com> Acked-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
* iommu/fsl: Remove unnecessary 'fsl-pamu' prefixesJoerg Roedel2013-08-141-5/+5
| | | | | | | The file defines a pr_fmt macro, so there is no need to add this prefix to individual messages. Signed-off-by: Joerg Roedel <joro@8bytes.org>
* iommu/fsl: Freescale PAMU driver and iommu implementation.Varun Sethi2013-08-141-0/+1309
Following is a brief description of the PAMU hardware: PAMU determines what action to take and whether to authorize the action on the basis of the memory address, a Logical IO Device Number (LIODN), and PAACT table (logically) indexed by LIODN and address. Hardware devices which need to access memory must provide an LIODN in addition to the memory address. Peripheral Access Authorization and Control Tables (PAACTs) are the primary data structures used by PAMU. A PAACT is a table of peripheral access authorization and control entries (PAACE).Each PAACE defines the range of I/O bus address space that is accessible by the LIOD and the associated access capabilities. There are two types of PAACTs: primary PAACT (PPAACT) and secondary PAACT (SPAACT).A given physical I/O device may be able to act as one or more independent logical I/O devices (LIODs). Each such logical I/O device is assigned an identifier called logical I/O device number (LIODN). A LIODN is allocated a contiguous portion of the I/O bus address space called the DSA window for performing DSA operations. The DSA window may optionally be divided into multiple sub-windows, each of which may be used to map to a region in system storage space. The first sub-window is referred to as the primary sub-window and the remaining are called secondary sub-windows. This patch provides the PAMU driver (fsl_pamu.c) and the corresponding IOMMU API implementation (fsl_pamu_domain.c). The PAMU hardware driver (fsl_pamu.c) has been derived from the work done by Ashish Kalra and Timur Tabi. [For iommu group support] Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Timur Tabi <timur@tabi.org> Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>