mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
media: rk-isp10: add check of iommu status
Change-Id: I31057963bff7d51ef0c208b5cc24797f4384e59f Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
This commit is contained in:
@@ -817,6 +817,7 @@ int cif_isp10_pltfrm_dev_init(
|
||||
struct device_node *np;
|
||||
struct device_node *of_node = pdev->dev.of_node;
|
||||
const char *compatible;
|
||||
const char *iommu_status;
|
||||
int err = 0;
|
||||
#endif
|
||||
|
||||
@@ -905,6 +906,19 @@ int cif_isp10_pltfrm_dev_init(
|
||||
pdata->irq_handlers[i].mis = -EINVAL;
|
||||
|
||||
#ifdef CIF_ISP10_MODE_DMA_SG
|
||||
np = of_parse_phandle(of_node, "iommus", 0);
|
||||
WARN_ON(!np);
|
||||
if (np) {
|
||||
of_property_read_string(np, "status", &iommu_status);
|
||||
if (strcmp(iommu_status, "okay") != 0) {
|
||||
dev_warn(dev, "Please check isp_mmu node is okay! CIF_ISP10_MODE_DMA_SG is turn on in cif isp10 driver.\n");
|
||||
WARN_ON(1);
|
||||
of_node_put(np);
|
||||
goto err;
|
||||
}
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
of_property_read_string(of_node, "compatible", &compatible);
|
||||
if ((strcmp(compatible, "rockchip,rk3399-cif-isp") == 0) &&
|
||||
(res->start == 0xFF920000)) {
|
||||
|
||||
Reference in New Issue
Block a user