Nicolas Boichat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46389 )
Change subject: mediatek/mt8192: add spmfw loader ......................................................................
Patch Set 16:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... File src/soc/mediatek/mt8192/spm.c:
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 947: write32(&mtk_spm->pcm_con1, read32(&mtk_spm->pcm_con1) | : SPM_REGWR_CFG_KEY | RG_IM_SLAVE_LSB);
Replied by SPM Designer: […]
Ack
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 951: /* kick IM to fetch (only toggle IM_KICK) */
Oh.. yeah. The comment is supposed to be removed. […]
Wait, as part of my experiments, I did print mtk_spm->md32pcm_dma0_rlct _before_ this, and the DMA is already copying content, before the clock is enabled here.
{ u32 rlct[32]; int i; for (i = 0; i < ARRAY_SIZE(rlct); i++) { rlct[i] = read32(&mtk_spm->md32pcm_dma0_rlct); /* Waiting for SPM init done */ udelay(1); }
printk(BIOS_INFO, "spm md32pcm_dma0_rlct @%08lx\n", (long)&mtk_spm->md32pcm_dma0_rlct); for (i = 0; i < ARRAY_SIZE(rlct); i++) printk(BIOS_INFO, "spm rlct[%d] = 0x%x\n", i, rlct[i]); }