static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) { int i; u32 stat, da; const char *err_msg[] = { "tlb miss", "translation fault", "emulation miss", "table walk fault", "multi hit fault", }; stat = iommu_read_reg(obj, MMU_IRQSTATUS); stat &= MMU_IRQ_MASK; if (!stat) return 0; da = iommu_read_reg(obj, MMU_FAULT_AD); *ra = da; dev_err(obj->dev, "%s:\tda:%08x ", __func__, da); for (i = 0; i < ARRAY_SIZE(err_msg); i++) { if (stat & (1 << i)) printk("%s ", err_msg[i]); } printk("\n"); iommu_write_reg(obj, stat, MMU_IRQSTATUS); omap2_iommu_disable(obj); return stat; }
static void iommu_disable(struct omap_iommu *obj) { struct platform_device *pdev = to_platform_device(obj->dev); struct iommu_platform_data *pdata = dev_get_platdata(&pdev->dev); omap2_iommu_disable(obj); pm_runtime_put_sync(obj->dev); if (pdata && pdata->assert_reset) pdata->assert_reset(pdev, pdata->reset_name); }