Re: [PATCH 7/7] soc: mediatek: mtk-mmsys: Add resets for mt8167
[email protected] Fri, 17 Jul 2026 15:30:52 +0000
| Newsgroups | org.kernel.vger.linux-watchdog,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Missing array mapping for MT8167_MMSYS_SW0_RST_B_MIPI_TX_CONFIG (ID 24) causes it to default to 0, unintentionally aliasing to and resetting the SMI_COMMON block. -- --- Patch [7]: [PATCH 7/7] soc: mediatek: mtk-mmsys: Add resets for mt8167 --- commit c0225a0e854c0cfee4ad1db37b9fac3a7690abdd Author: Luca Leonardo Scorcia <[email protected]> soc: mediatek: mtk-mmsys: Add resets for mt8167 This commit adds 64 MMSYS resets for the MT8167 SoC, spanning two contiguous 32-bit registers (SW0 and SW1). > diff --git a/drivers/soc/mediatek/mt8167-mmsys.h b/drivers/soc/mediatek/mt8167-mmsys.h > index eef14083c47b5..b8f38ff8cf443 100644 > --- a/drivers/soc/mediatek/mt8167-mmsys.h > +++ b/drivers/soc/mediatek/mt8167-mmsys.h [ ... ] > +/* MMSYS resets */ > +static const u8 mmsys_mt8167_rst_tb[] = { > + [MT8167_MMSYS_SW0_RST_B_SMI_COMMON] = MMSYS_RST_NR(0, 0), > + [MT8167_MMSYS_SW0_RST_B_SMI_LARB0] = MMSYS_RST_NR(0, 1), [ ... ] > + [MT8167_MMSYS_SW0_RST_B_DSI0] = MMSYS_RST_NR(0, 22), > + [MT8167_MMSYS_SW0_RST_B_DPI0] = MMSYS_RST_NR(0, 23), > + /* bit 24 is SMI_COMMON again according to data sheet */ > + /* bit 25 is SMI_LARB0 again according to data sheet */ > + /* all other bits are not described in data sheet */ > + [MT8167_MMSYS_SW1_RST_B_LVDS_ENCODER] = MMSYS_RST_NR(1, 2), > + [MT8167_MMSYS_SW1_RST_B_DPI1] = MMSYS_RST_NR(1, 3), > + [MT8167_MMSYS_SW1_RST_B_HDMI] = MMSYS_RST_NR(1, 4), > +}; [Severity: High] Does this array omit the mapping for MT8167_MMSYS_SW0_RST_B_MIPI_TX_CONFIG (ID 24)? Because index 24 is unmapped in this array, it will default to 0. When a driver requests a reset for the MIPI TX config ID, mtk_mmsys_reset_update() will look up index 24 and retrieve 0, which directly maps to MMSYS_RST_NR(0, 0) (the SMI_COMMON block). Can this omission cause the SMI_COMMON block to be unintentionally reset instead, potentially disrupting the multimedia subsystem's memory transactions? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=7