diff options
Diffstat (limited to 'drivers/iommu/omap-iommu2.c')
-rw-r--r-- | drivers/iommu/omap-iommu2.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/iommu/omap-iommu2.c b/drivers/iommu/omap-iommu2.c index c02020292377..4a3a1c7a38c1 100644 --- a/drivers/iommu/omap-iommu2.c +++ b/drivers/iommu/omap-iommu2.c | |||
@@ -35,12 +35,8 @@ | |||
35 | #define MMU_SYS_IDLE_SMART (2 << MMU_SYS_IDLE_SHIFT) | 35 | #define MMU_SYS_IDLE_SMART (2 << MMU_SYS_IDLE_SHIFT) |
36 | #define MMU_SYS_IDLE_MASK (3 << MMU_SYS_IDLE_SHIFT) | 36 | #define MMU_SYS_IDLE_MASK (3 << MMU_SYS_IDLE_SHIFT) |
37 | 37 | ||
38 | #define MMU_SYS_SOFTRESET (1 << 1) | ||
39 | #define MMU_SYS_AUTOIDLE 1 | 38 | #define MMU_SYS_AUTOIDLE 1 |
40 | 39 | ||
41 | /* SYSSTATUS */ | ||
42 | #define MMU_SYS_RESETDONE 1 | ||
43 | |||
44 | /* IRQSTATUS & IRQENABLE */ | 40 | /* IRQSTATUS & IRQENABLE */ |
45 | #define MMU_IRQ_MULTIHITFAULT (1 << 4) | 41 | #define MMU_IRQ_MULTIHITFAULT (1 << 4) |
46 | #define MMU_IRQ_TABLEWALKFAULT (1 << 3) | 42 | #define MMU_IRQ_TABLEWALKFAULT (1 << 3) |
@@ -97,7 +93,6 @@ static void __iommu_set_twl(struct omap_iommu *obj, bool on) | |||
97 | static int omap2_iommu_enable(struct omap_iommu *obj) | 93 | static int omap2_iommu_enable(struct omap_iommu *obj) |
98 | { | 94 | { |
99 | u32 l, pa; | 95 | u32 l, pa; |
100 | unsigned long timeout; | ||
101 | 96 | ||
102 | if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) | 97 | if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) |
103 | return -EINVAL; | 98 | return -EINVAL; |
@@ -106,20 +101,6 @@ static int omap2_iommu_enable(struct omap_iommu *obj) | |||
106 | if (!IS_ALIGNED(pa, SZ_16K)) | 101 | if (!IS_ALIGNED(pa, SZ_16K)) |
107 | return -EINVAL; | 102 | return -EINVAL; |
108 | 103 | ||
109 | iommu_write_reg(obj, MMU_SYS_SOFTRESET, MMU_SYSCONFIG); | ||
110 | |||
111 | timeout = jiffies + msecs_to_jiffies(20); | ||
112 | do { | ||
113 | l = iommu_read_reg(obj, MMU_SYSSTATUS); | ||
114 | if (l & MMU_SYS_RESETDONE) | ||
115 | break; | ||
116 | } while (!time_after(jiffies, timeout)); | ||
117 | |||
118 | if (!(l & MMU_SYS_RESETDONE)) { | ||
119 | dev_err(obj->dev, "can't take mmu out of reset\n"); | ||
120 | return -ENODEV; | ||
121 | } | ||
122 | |||
123 | l = iommu_read_reg(obj, MMU_REVISION); | 104 | l = iommu_read_reg(obj, MMU_REVISION); |
124 | dev_info(obj->dev, "%s: version %d.%d\n", obj->name, | 105 | dev_info(obj->dev, "%s: version %d.%d\n", obj->name, |
125 | (l >> 4) & 0xf, l & 0xf); | 106 | (l >> 4) & 0xf, l & 0xf); |