Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] Incorrect regmap configuration (.val_bits = 8) forces byte-wise 
accesses on a 32-bit register file, which may cause bus faults or ignored 
writes.
--

commit 83ac96938fc0f15d53cdae0501c6e430a17c1c1d
Author: Michal Wilczynski <[email protected]>
soc: starfive: Add jh7110-hdmi-subsystem driver

This commit introduces a parent driver for the monolithic StarFive JH7110
HDMI IP block. It maps the shared register block and creates child devices
for the PHY and controller using a shared regmap.

> diff --git a/drivers/soc/starfive/jh7110-hdmi-subsystem.c 
> b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> new file mode 100644
> index 0000000000000..e05b91825be4d
> --- /dev/null
> +++ b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
[ ... ]
> +static const struct regmap_config starfive_hdmi_regmap_config = {
> +     .reg_bits = 32,
> +     .val_bits = 8,

[Severity: High]
Will this regmap configuration cause byte-wise memory accesses on a 32-bit
register file? 

Setting .val_bits = 8 forces the regmap core to use 8-bit readb()/writeb()
accesses instead of 32-bit readl()/writel(). The underlying Innosilicon
HDMI IP has registers spaced by 4 bytes and natively expects 32-bit
accesses.

On RISC-V platforms like the JH7110, byte-wise access to 32-bit APB
peripherals typically triggers a Store/Load Access Fault or results in
silently ignored writes.

> +     .max_register = 0x3fff,
> +};

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=11

Reply via email to