diff options
| author | Varun Sethi <Varun.Sethi@freescale.com> | 2013-03-28 15:54:00 -0400 |
|---|---|---|
| committer | Joerg Roedel <joro@8bytes.org> | 2013-04-02 12:20:53 -0400 |
| commit | 80f97f0f73b82444f714651ea053838d27779dca (patch) | |
| tree | deb4213285b1014b2800e5828db564cb3820f535 /include/linux | |
| parent | bb5547acfcd842950b8a22aa83f84af93388b9f2 (diff) | |
iommu/fsl: Add the window permission flag as a parameter to iommu_window_enable API.
Each iommu window can have access permissions associated with it. Extended the
window_enable API to incorporate window access permissions.
In case of PAMU each window can have its specific set of permissions.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index bb0a0fc26729..272781073110 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -104,7 +104,7 @@ struct iommu_ops { | |||
| 104 | 104 | ||
| 105 | /* Window handling functions */ | 105 | /* Window handling functions */ |
| 106 | int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr, | 106 | int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr, |
| 107 | phys_addr_t paddr, u64 size); | 107 | phys_addr_t paddr, u64 size, int prot); |
| 108 | void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr); | 108 | void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr); |
| 109 | /* Set the numer of window per domain */ | 109 | /* Set the numer of window per domain */ |
| 110 | int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count); | 110 | int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count); |
| @@ -169,7 +169,8 @@ extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr, | |||
| 169 | 169 | ||
| 170 | /* Window handling function prototypes */ | 170 | /* Window handling function prototypes */ |
| 171 | extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr, | 171 | extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr, |
| 172 | phys_addr_t offset, u64 size); | 172 | phys_addr_t offset, u64 size, |
| 173 | int prot); | ||
| 173 | extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr); | 174 | extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr); |
| 174 | /** | 175 | /** |
| 175 | * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework | 176 | * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework |
| @@ -255,7 +256,7 @@ static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
| 255 | 256 | ||
| 256 | static inline int iommu_domain_window_enable(struct iommu_domain *domain, | 257 | static inline int iommu_domain_window_enable(struct iommu_domain *domain, |
| 257 | u32 wnd_nr, phys_addr_t paddr, | 258 | u32 wnd_nr, phys_addr_t paddr, |
| 258 | u64 size) | 259 | u64 size, int prot) |
| 259 | { | 260 | { |
| 260 | return -ENODEV; | 261 | return -ENODEV; |
| 261 | } | 262 | } |
