Messages in this thread | | | Date | Wed, 7 Mar 2012 15:22:33 +0900 | Subject | Re: [PATCH v10 3/3] iommu/exynos: Add iommu driver for Exynos Platforms | From | KyongHo Cho <> |
| |
On Wed, Mar 7, 2012 at 2:28 PM, InKi Dae <daeinki@gmail.com> wrote: >> +static irqreturn_t exynos_sysmmu_irq(int irq, void *dev_id) >> +{ >> + /* SYSMMU is in blocked when interrupt occurred. */ >> + struct sysmmu_drvdata *data = dev_id; >> + struct resource *irqres; >> + struct platform_device *pdev; >> + enum EXYNOS_SYSMMU_INTERRUPT_TYPE itype; > > how about to change EXYNOS_SYSMMU_INTERRUPT_TYPE to small letter? just > for code clean. > I will. please refer to the my reply to Kyungmin Park.
>> + unsigned long addr = -1; >> + >> + int i, ret = -ENOSYS; >> + >> + read_lock(&data->lock); >> + >> + WARN_ON(!is_sysmmu_active(data)); >> + >> + pdev = to_platform_device(data->sysmmu); >> + for (i = 0; i < pdev->num_resources; i++) { >> + irqres = platform_get_resource(pdev, IORESOURCE_IRQ, i); >> + if (irqres && ((int)irqres->start == irq)) >> + break; >> + } > > is there any reason that it should get irq resources in interrupt > handler? if not so then how about to move it into probe()? > The platform device of ISP has a lot of IRQ sources. The above for clause determines which IRQ source (System MMU) generated the interrupt.
>> + >> + if (i == pdev->num_resources) { >> + itype = SYSMMU_FAULT_UNKNOWN; >> + } else { >> + i /= 2; >> + >> + itype = (enum EXYNOS_SYSMMU_INTERRUPT_TYPE) > > ditto. >
Thank you.
Cho KyongHo. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |