Roger Lu 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);
How does this path work? How do you guarantee that the SPM firmware is loaded again if it changed?
1. The if statement is for SPM DMA to load spmfw from dram to spm sram. 2. The else statement is for telling spm to use the spmfw in spm sram. 3. I checked below printk log to see if spmfw version and spm pc is what I expect. https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp...
https://review.coreboot.org/c/coreboot/+/46389/15/src/soc/mediatek/mt8192/sp... PS15, Line 951: /* kick IM to fetch (only toggle IM_KICK) */
The code below does not seem to match what this comment says.
Oh.. yeah. The comment is supposed to be removed. This code is to enable spm clk to make sure SPM DMA can work.