larb 122 drivers/iommu/mtk_iommu_v1.c int larb = mt2701_m4u_to_larb(id); larb 124 drivers/iommu/mtk_iommu_v1.c return id - mt2701_m4u_in_larb[larb]; larb 898 drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c ret = mtk_smi_larb_get(jpeg->larb); larb 909 drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c mtk_smi_larb_put(jpeg->larb); larb 1067 drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c jpeg->larb = &pdev->dev; larb 64 drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h struct device *larb; larb 145 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 151 drivers/memory/mtk-smi.c larb->larbid = i; larb 152 drivers/memory/mtk-smi.c larb->mmu = &larb_mmu[i].mmu; larb 161 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 165 drivers/memory/mtk-smi.c if (BIT(larb->larbid) & larb->larb_gen->larb_direct_to_common_mask) larb 168 drivers/memory/mtk-smi.c for_each_set_bit(i, (unsigned long *)larb->mmu, 32) { larb 169 drivers/memory/mtk-smi.c reg = readl_relaxed(larb->base + SMI_LARB_NONSEC_CON(i)); larb 171 drivers/memory/mtk-smi.c writel(reg, larb->base + SMI_LARB_NONSEC_CON(i)); larb 177 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 179 drivers/memory/mtk-smi.c writel(*larb->mmu, larb->base + SMI_LARB_MMU_EN); larb 184 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 185 drivers/memory/mtk-smi.c const struct mtk_smi_larb_gen *larb_gen = larb->larb_gen; larb 186 drivers/memory/mtk-smi.c struct mtk_smi *common = dev_get_drvdata(larb->smi_common_dev); larb 190 drivers/memory/mtk-smi.c m4u_port_id = larb_gen->port_in_larb[larb->larbid]; larb 191 drivers/memory/mtk-smi.c larb_port_num = larb_gen->port_in_larb[larb->larbid + 1] larb 192 drivers/memory/mtk-smi.c - larb_gen->port_in_larb[larb->larbid]; larb 195 drivers/memory/mtk-smi.c if (*larb->mmu & BIT(i)) { larb 271 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb; larb 277 drivers/memory/mtk-smi.c larb = devm_kzalloc(dev, sizeof(*larb), GFP_KERNEL); larb 278 drivers/memory/mtk-smi.c if (!larb) larb 281 drivers/memory/mtk-smi.c larb->larb_gen = of_device_get_match_data(dev); larb 283 drivers/memory/mtk-smi.c larb->base = devm_ioremap_resource(dev, res); larb 284 drivers/memory/mtk-smi.c if (IS_ERR(larb->base)) larb 285 drivers/memory/mtk-smi.c return PTR_ERR(larb->base); larb 287 drivers/memory/mtk-smi.c larb->smi.clk_apb = devm_clk_get(dev, "apb"); larb 288 drivers/memory/mtk-smi.c if (IS_ERR(larb->smi.clk_apb)) larb 289 drivers/memory/mtk-smi.c return PTR_ERR(larb->smi.clk_apb); larb 291 drivers/memory/mtk-smi.c larb->smi.clk_smi = devm_clk_get(dev, "smi"); larb 292 drivers/memory/mtk-smi.c if (IS_ERR(larb->smi.clk_smi)) larb 293 drivers/memory/mtk-smi.c return PTR_ERR(larb->smi.clk_smi); larb 295 drivers/memory/mtk-smi.c if (larb->larb_gen->has_gals) { larb 297 drivers/memory/mtk-smi.c larb->smi.clk_gals0 = devm_clk_get(dev, "gals"); larb 298 drivers/memory/mtk-smi.c if (PTR_ERR(larb->smi.clk_gals0) == -ENOENT) larb 299 drivers/memory/mtk-smi.c larb->smi.clk_gals0 = NULL; larb 300 drivers/memory/mtk-smi.c else if (IS_ERR(larb->smi.clk_gals0)) larb 301 drivers/memory/mtk-smi.c return PTR_ERR(larb->smi.clk_gals0); larb 303 drivers/memory/mtk-smi.c larb->smi.dev = dev; larb 314 drivers/memory/mtk-smi.c larb->smi_common_dev = &smi_pdev->dev; larb 321 drivers/memory/mtk-smi.c platform_set_drvdata(pdev, larb); larb 334 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 335 drivers/memory/mtk-smi.c const struct mtk_smi_larb_gen *larb_gen = larb->larb_gen; larb 339 drivers/memory/mtk-smi.c ret = pm_runtime_get_sync(larb->smi_common_dev); larb 345 drivers/memory/mtk-smi.c ret = mtk_smi_clk_enable(&larb->smi); larb 348 drivers/memory/mtk-smi.c pm_runtime_put_sync(larb->smi_common_dev); larb 360 drivers/memory/mtk-smi.c struct mtk_smi_larb *larb = dev_get_drvdata(dev); larb 362 drivers/memory/mtk-smi.c mtk_smi_clk_disable(&larb->smi); larb 363 drivers/memory/mtk-smi.c pm_runtime_put_sync(larb->smi_common_dev); larb 9 include/dt-bindings/memory/mt2712-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) larb 9 include/dt-bindings/memory/mt8173-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) larb 9 include/dt-bindings/memory/mt8183-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) larb 9 scripts/dtc/include-prefixes/dt-bindings/memory/mt2712-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) larb 9 scripts/dtc/include-prefixes/dt-bindings/memory/mt8173-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) larb 9 scripts/dtc/include-prefixes/dt-bindings/memory/mt8183-larb-port.h #define MTK_M4U_ID(larb, port) (((larb) << 5) | (port))