Lines Matching full:cluster
70 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in scp_wdt_handler()
175 val = readl(scp->cluster->reg_base + MT8183_SW_RSTN); in mt8183_scp_reset_assert()
177 writel(val, scp->cluster->reg_base + MT8183_SW_RSTN); in mt8183_scp_reset_assert()
184 val = readl(scp->cluster->reg_base + MT8183_SW_RSTN); in mt8183_scp_reset_deassert()
186 writel(val, scp->cluster->reg_base + MT8183_SW_RSTN); in mt8183_scp_reset_deassert()
191 writel(1, scp->cluster->reg_base + MT8192_CORE0_SW_RSTN_SET); in mt8192_scp_reset_assert()
196 writel(1, scp->cluster->reg_base + MT8192_CORE0_SW_RSTN_CLR); in mt8192_scp_reset_deassert()
201 writel(1, scp->cluster->reg_base + MT8195_CORE1_SW_RSTN_SET); in mt8195_scp_c1_reset_assert()
206 writel(1, scp->cluster->reg_base + MT8195_CORE1_SW_RSTN_CLR); in mt8195_scp_c1_reset_deassert()
213 scp_to_host = readl(scp->cluster->reg_base + MT8183_SCP_TO_HOST); in mt8183_scp_irq_handler()
221 scp->cluster->reg_base + MT8183_SCP_TO_HOST); in mt8183_scp_irq_handler()
228 scp_to_host = readl(scp->cluster->reg_base + MT8192_SCP2APMCU_IPC_SET); in mt8192_scp_irq_handler()
238 scp->cluster->reg_base + MT8192_SCP2APMCU_IPC_CLR); in mt8192_scp_irq_handler()
241 writel(1, scp->cluster->reg_base + MT8192_CORE0_WDT_IRQ); in mt8192_scp_irq_handler()
249 scp_to_host = readl(scp->cluster->reg_base + MT8192_SCP2APMCU_IPC_SET); in mt8195_scp_irq_handler()
254 u32 reason = readl(scp->cluster->reg_base + MT8195_SYS_STATUS); in mt8195_scp_irq_handler()
257 writel(1, scp->cluster->reg_base + MT8192_CORE0_WDT_IRQ); in mt8195_scp_irq_handler()
260 writel(1, scp->cluster->reg_base + MT8195_CORE1_WDT_IRQ); in mt8195_scp_irq_handler()
265 writel(scp_to_host, scp->cluster->reg_base + MT8192_SCP2APMCU_IPC_CLR); in mt8195_scp_irq_handler()
272 scp_to_host = readl(scp->cluster->reg_base + MT8195_SSHUB2APMCU_IPC_SET); in mt8195_scp_c1_irq_handler()
277 writel(scp_to_host, scp->cluster->reg_base + MT8195_SSHUB2APMCU_IPC_CLR); in mt8195_scp_c1_irq_handler()
409 writel(MT8183_SCP_IPC_INT_BIT, scp->cluster->reg_base + MT8183_SCP_TO_HOST); in mt8183_scp_before_load()
412 writel(0x0, scp->cluster->reg_base + MT8183_SCP_CLK_SW_SEL); in mt8183_scp_before_load()
413 writel(0x0, scp->cluster->reg_base + MT8183_SCP_CLK_DIV_SEL); in mt8183_scp_before_load()
416 writel(0x0, scp->cluster->reg_base + MT8183_SCP_L1_SRAM_PD); in mt8183_scp_before_load()
417 writel(0x0, scp->cluster->reg_base + MT8183_SCP_TCM_TAIL_SRAM_PD); in mt8183_scp_before_load()
420 writel(0x0, scp->cluster->reg_base + MT8183_SCP_SRAM_PDN); in mt8183_scp_before_load()
427 scp->cluster->reg_base + MT8183_SCP_CACHE_CON); in mt8183_scp_before_load()
428 writel(MT8183_SCP_CACHESIZE_8KB, scp->cluster->reg_base + MT8183_SCP_DCACHE_CON); in mt8183_scp_before_load()
454 writel(MT8183_SCP_IPC_INT_BIT, scp->cluster->reg_base + MT8183_SCP_TO_HOST); in mt8186_scp_before_load()
457 writel(0x0, scp->cluster->reg_base + MT8183_SCP_CLK_SW_SEL); in mt8186_scp_before_load()
458 writel(0x0, scp->cluster->reg_base + MT8183_SCP_CLK_DIV_SEL); in mt8186_scp_before_load()
461 scp_sram_power_on(scp->cluster->reg_base + MT8183_SCP_SRAM_PDN, 0); in mt8186_scp_before_load()
464 writel(0x0, scp->cluster->reg_base + MT8183_SCP_L1_SRAM_PD); in mt8186_scp_before_load()
465 writel(0x0, scp->cluster->reg_base + MT8183_SCP_TCM_TAIL_SRAM_PD); in mt8186_scp_before_load()
466 writel(0x0, scp->cluster->reg_base + MT8186_SCP_L1_SRAM_PD_P1); in mt8186_scp_before_load()
467 writel(0x0, scp->cluster->reg_base + MT8186_SCP_L1_SRAM_PD_p2); in mt8186_scp_before_load()
474 scp->cluster->reg_base + MT8183_SCP_CACHE_CON); in mt8186_scp_before_load()
475 writel(MT8183_SCP_CACHESIZE_8KB, scp->cluster->reg_base + MT8183_SCP_DCACHE_CON); in mt8186_scp_before_load()
482 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_l2tcm_on()
488 writel(0xff, scp->cluster->reg_base + MT8192_SCP2SPM_IPC_CLR); in mt8188_scp_l2tcm_on()
491 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8188_scp_l2tcm_on()
492 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8188_scp_l2tcm_on()
493 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8188_scp_l2tcm_on()
494 scp_sram_power_on(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, 0); in mt8188_scp_l2tcm_on()
506 writel(1, scp->cluster->reg_base + MT8192_CORE0_SW_RSTN_SET); in mt8188_scp_before_load()
510 scp_sram_power_on(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8188_scp_before_load()
513 writel(0xff, scp->cluster->reg_base + MT8192_CORE0_MEM_ATT_PREDEF); in mt8188_scp_before_load()
522 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_c1_before_load()
528 scp_sram_power_on(scp->cluster->reg_base + MT8195_CPU1_SRAM_PD, 0); in mt8188_scp_c1_before_load()
531 writel(0xff, scp->cluster->reg_base + MT8195_CORE1_MEM_ATT_PREDEF); in mt8188_scp_c1_before_load()
546 writel(0, scp->cluster->reg_base + MT8195_L2TCM_OFFSET_RANGE_0_LOW); in mt8188_scp_c1_before_load()
547 writel(scp->sram_size, scp->cluster->reg_base + MT8195_L2TCM_OFFSET_RANGE_0_HIGH); in mt8188_scp_c1_before_load()
550 writel(scp->sram_phys - scp_c0->sram_phys, scp->cluster->reg_base + MT8195_L2TCM_OFFSET); in mt8188_scp_c1_before_load()
553 sec_ctrl = readl(scp->cluster->reg_base + MT8195_SEC_CTRL); in mt8188_scp_c1_before_load()
555 writel(sec_ctrl, scp->cluster->reg_base + MT8195_SEC_CTRL); in mt8188_scp_c1_before_load()
563 writel(0xff, scp->cluster->reg_base + MT8192_SCP2SPM_IPC_CLR); in mt8192_scp_before_load()
565 writel(1, scp->cluster->reg_base + MT8192_CORE0_SW_RSTN_SET); in mt8192_scp_before_load()
568 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8192_scp_before_load()
569 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8192_scp_before_load()
570 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8192_scp_before_load()
571 scp_sram_power_on(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, 0); in mt8192_scp_before_load()
572 scp_sram_power_on(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8192_scp_before_load()
575 writel(0xff, scp->cluster->reg_base + MT8192_CORE0_MEM_ATT_PREDEF); in mt8192_scp_before_load()
582 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_l2tcm_on()
588 writel(0xff, scp->cluster->reg_base + MT8192_SCP2SPM_IPC_CLR); in mt8195_scp_l2tcm_on()
591 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8195_scp_l2tcm_on()
592 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8195_scp_l2tcm_on()
593 scp_sram_power_on(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8195_scp_l2tcm_on()
594 scp_sram_power_on(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, in mt8195_scp_l2tcm_on()
607 writel(1, scp->cluster->reg_base + MT8192_CORE0_SW_RSTN_SET); in mt8195_scp_before_load()
611 scp_sram_power_on(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8195_scp_before_load()
614 writel(0xff, scp->cluster->reg_base + MT8192_CORE0_MEM_ATT_PREDEF); in mt8195_scp_before_load()
623 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_c1_before_load()
629 scp_sram_power_on(scp->cluster->reg_base + MT8195_CPU1_SRAM_PD, 0); in mt8195_scp_c1_before_load()
632 writel(0xff, scp->cluster->reg_base + MT8195_CORE1_MEM_ATT_PREDEF); in mt8195_scp_c1_before_load()
647 writel(0, scp->cluster->reg_base + MT8195_L2TCM_OFFSET_RANGE_0_LOW); in mt8195_scp_c1_before_load()
648 writel(scp->sram_size, scp->cluster->reg_base + MT8195_L2TCM_OFFSET_RANGE_0_HIGH); in mt8195_scp_c1_before_load()
651 writel(scp->sram_phys - scp_c0->sram_phys, scp->cluster->reg_base + MT8195_L2TCM_OFFSET); in mt8195_scp_c1_before_load()
654 sec_ctrl = readl(scp->cluster->reg_base + MT8195_SEC_CTRL); in mt8195_scp_c1_before_load()
656 writel(sec_ctrl, scp->cluster->reg_base + MT8195_SEC_CTRL); in mt8195_scp_c1_before_load()
779 if (scp->cluster->l1tcm_size && in mt8192_scp_da_to_va()
780 da >= scp->cluster->l1tcm_phys && in mt8192_scp_da_to_va()
781 (da + len) <= scp->cluster->l1tcm_phys + scp->cluster->l1tcm_size) { in mt8192_scp_da_to_va()
782 offset = da - scp->cluster->l1tcm_phys; in mt8192_scp_da_to_va()
783 return (void __force *)scp->cluster->l1tcm_base + offset; in mt8192_scp_da_to_va()
807 writel(0, scp->cluster->reg_base + MT8183_WDT_CFG); in mt8183_scp_stop()
812 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8188_scp_l2tcm_off()
821 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8188_scp_l2tcm_off()
822 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8188_scp_l2tcm_off()
823 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8188_scp_l2tcm_off()
824 scp_sram_power_off(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, 0); in mt8188_scp_l2tcm_off()
834 scp_sram_power_off(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8188_scp_stop()
837 writel(0, scp->cluster->reg_base + MT8192_CORE0_WDT_CFG); in mt8188_scp_stop()
845 scp_sram_power_off(scp->cluster->reg_base + MT8195_CPU1_SRAM_PD, 0); in mt8188_scp_c1_stop()
848 writel(0, scp->cluster->reg_base + MT8195_CORE1_WDT_CFG); in mt8188_scp_c1_stop()
854 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8192_scp_stop()
855 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8192_scp_stop()
856 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8192_scp_stop()
857 scp_sram_power_off(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, 0); in mt8192_scp_stop()
858 scp_sram_power_off(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8192_scp_stop()
861 writel(0, scp->cluster->reg_base + MT8192_CORE0_WDT_CFG); in mt8192_scp_stop()
866 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in mt8195_scp_l2tcm_off()
875 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_0, 0); in mt8195_scp_l2tcm_off()
876 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_1, 0); in mt8195_scp_l2tcm_off()
877 scp_sram_power_off(scp->cluster->reg_base + MT8192_L2TCM_SRAM_PD_2, 0); in mt8195_scp_l2tcm_off()
878 scp_sram_power_off(scp->cluster->reg_base + MT8192_L1TCM_SRAM_PDN, in mt8195_scp_l2tcm_off()
889 scp_sram_power_off(scp->cluster->reg_base + MT8192_CPU0_SRAM_PD, 0); in mt8195_scp_stop()
892 writel(0, scp->cluster->reg_base + MT8192_CORE0_WDT_CFG); in mt8195_scp_stop()
900 scp_sram_power_off(scp->cluster->reg_base + MT8195_CPU1_SRAM_PD, 0); in mt8195_scp_c1_stop()
903 writel(0, scp->cluster->reg_base + MT8195_CORE1_WDT_CFG); in mt8195_scp_c1_stop()
1123 scp->cluster = scp_cluster; in scp_rproc_init()
1287 * the cluster list in scp_remove(). in scp_add_multi_core()
1374 struct mtk_scp_of_cluster *scp_cluster = scp->cluster; in scp_remove()