Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308043
b: refs/heads/master
c: 4ce63fc
h: refs/heads/master
i:
  308041: 5e8a0ec
  308039: ea8ad31
v: v3
  • Loading branch information
Marek Szyprowski committed May 21, 2012
1 parent f9458b8 commit 714b991
Show file tree
Hide file tree
Showing 6 changed files with 748 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f99d60341238fe73fc514129cd9ae4e44e1b2c47
refs/heads/master: 4ce63fcd919c32d22528e54dcd89506962933719
8 changes: 8 additions & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ config ARM
config ARM_HAS_SG_CHAIN
bool

config NEED_SG_DMA_LENGTH
bool

config ARM_DMA_USE_IOMMU
select NEED_SG_DMA_LENGTH
select ARM_HAS_SG_CHAIN
bool

config HAVE_PWM
bool

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/include/asm/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ struct dev_archdata {
#ifdef CONFIG_IOMMU_API
void *iommu; /* private IOMMU data */
#endif
#ifdef CONFIG_ARM_DMA_USE_IOMMU
struct dma_iommu_mapping *mapping;
#endif
};

struct omap_device;
Expand Down
34 changes: 34 additions & 0 deletions trunk/arch/arm/include/asm/dma-iommu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef ASMARM_DMA_IOMMU_H
#define ASMARM_DMA_IOMMU_H

#ifdef __KERNEL__

#include <linux/mm_types.h>
#include <linux/scatterlist.h>
#include <linux/dma-debug.h>
#include <linux/kmemcheck.h>

struct dma_iommu_mapping {
/* iommu specific data */
struct iommu_domain *domain;

void *bitmap;
size_t bits;
unsigned int order;
dma_addr_t base;

spinlock_t lock;
struct kref kref;
};

struct dma_iommu_mapping *
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size,
int order);

void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping);

int arm_iommu_attach_device(struct device *dev,
struct dma_iommu_mapping *mapping);

#endif /* __KERNEL__ */
#endif
Loading

0 comments on commit 714b991

Please sign in to comment.