Lines Matching refs:scp_cluster
70 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in scp_wdt_handler() local
76 list_for_each_entry(scp_node, &scp_cluster->mtk_scp_list, elem) in scp_wdt_handler()
482 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_l2tcm_on() local
484 mutex_lock(&scp_cluster->cluster_lock); in mt8188_scp_l2tcm_on()
486 if (scp_cluster->l2tcm_refcnt == 0) { in mt8188_scp_l2tcm_on()
497 scp_cluster->l2tcm_refcnt += 1; in mt8188_scp_l2tcm_on()
499 mutex_unlock(&scp_cluster->cluster_lock); in mt8188_scp_l2tcm_on()
522 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_c1_before_load() local
549 scp_c0 = list_first_entry(&scp_cluster->mtk_scp_list, struct mtk_scp, elem); in mt8188_scp_c1_before_load()
582 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_l2tcm_on() local
584 mutex_lock(&scp_cluster->cluster_lock); in mt8195_scp_l2tcm_on()
586 if (scp_cluster->l2tcm_refcnt == 0) { in mt8195_scp_l2tcm_on()
598 scp_cluster->l2tcm_refcnt += 1; in mt8195_scp_l2tcm_on()
600 mutex_unlock(&scp_cluster->cluster_lock); in mt8195_scp_l2tcm_on()
623 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_c1_before_load() local
650 scp_c0 = list_first_entry(&scp_cluster->mtk_scp_list, struct mtk_scp, elem); in mt8195_scp_c1_before_load()
812 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_l2tcm_off() local
814 mutex_lock(&scp_cluster->cluster_lock); in mt8188_scp_l2tcm_off()
816 if (scp_cluster->l2tcm_refcnt > 0) in mt8188_scp_l2tcm_off()
817 scp_cluster->l2tcm_refcnt -= 1; in mt8188_scp_l2tcm_off()
819 if (scp_cluster->l2tcm_refcnt == 0) { in mt8188_scp_l2tcm_off()
827 mutex_unlock(&scp_cluster->cluster_lock); in mt8188_scp_l2tcm_off()
866 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_l2tcm_off() local
868 mutex_lock(&scp_cluster->cluster_lock); in mt8195_scp_l2tcm_off()
870 if (scp_cluster->l2tcm_refcnt > 0) in mt8195_scp_l2tcm_off()
871 scp_cluster->l2tcm_refcnt -= 1; in mt8195_scp_l2tcm_off()
873 if (scp_cluster->l2tcm_refcnt == 0) { in mt8195_scp_l2tcm_off()
882 mutex_unlock(&scp_cluster->cluster_lock); in mt8195_scp_l2tcm_off()
1097 struct mtk_scp_of_cluster *scp_cluster, in scp_rproc_init() argument
1123 scp->cluster = scp_cluster; in scp_rproc_init()
1208 struct mtk_scp_of_cluster *scp_cluster) in scp_add_single_core() argument
1211 struct list_head *scp_list = &scp_cluster->mtk_scp_list; in scp_add_single_core()
1215 scp = scp_rproc_init(pdev, scp_cluster, of_device_get_match_data(dev)); in scp_add_single_core()
1232 struct mtk_scp_of_cluster *scp_cluster) in scp_add_multi_core() argument
1238 struct list_head *scp_list = &scp_cluster->mtk_scp_list; in scp_add_multi_core()
1262 scp = scp_rproc_init(cpdev, scp_cluster, cluster_of_data[core_id]); in scp_add_multi_core()
1317 static int scp_cluster_init(struct platform_device *pdev, struct mtk_scp_of_cluster *scp_cluster) in scp_cluster_init() argument
1322 ret = scp_add_single_core(pdev, scp_cluster); in scp_cluster_init()
1324 ret = scp_add_multi_core(pdev, scp_cluster); in scp_cluster_init()
1337 struct mtk_scp_of_cluster *scp_cluster; in scp_probe() local
1341 scp_cluster = devm_kzalloc(dev, sizeof(*scp_cluster), GFP_KERNEL); in scp_probe()
1342 if (!scp_cluster) in scp_probe()
1345 scp_cluster->reg_base = devm_platform_ioremap_resource_byname(pdev, "cfg"); in scp_probe()
1346 if (IS_ERR(scp_cluster->reg_base)) in scp_probe()
1347 return dev_err_probe(dev, PTR_ERR(scp_cluster->reg_base), in scp_probe()
1353 scp_cluster->l1tcm_base = devm_ioremap_resource(dev, res); in scp_probe()
1354 if (IS_ERR(scp_cluster->l1tcm_base)) in scp_probe()
1355 return dev_err_probe(dev, PTR_ERR(scp_cluster->l1tcm_base), in scp_probe()
1358 scp_cluster->l1tcm_size = resource_size(res); in scp_probe()
1359 scp_cluster->l1tcm_phys = res->start; in scp_probe()
1362 INIT_LIST_HEAD(&scp_cluster->mtk_scp_list); in scp_probe()
1363 mutex_init(&scp_cluster->cluster_lock); in scp_probe()
1369 ret = scp_cluster_init(pdev, scp_cluster); in scp_probe()
1381 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in scp_remove() local
1384 list_for_each_entry_safe_reverse(scp, temp, &scp_cluster->mtk_scp_list, elem) { in scp_remove()
1390 mutex_destroy(&scp_cluster->cluster_lock); in scp_remove()