On Sat, Aug 1, 2026 at 3:24 AM Kumar, Udit <[email protected]> wrote:
>
> On 7/31/2026 10:03 PM, Ralph Siemsen wrote:
> > Prevent random memory writes from corrupting flash memory.
>
> my suggestion will be check first, why stray write are happening

This is purely defensive, there are no known stray writes occurring.

> > +static void cadence_qspi_apb_write_protect_enable(void *reg_base)
> > +{
> > +     writel(CQSPI_REG_WRPROT_ENABLE,
> > +            reg_base + CQSPI_REG_WRITE_PROTECT_CTRL);
> > +}
> > +
>
> I expect compilation warning on platform, which does not define
> CONFIG_CADENCE_QSPI_WRITE_PROTECT

Originally I used #ifdef around this code, but checkpatch complained.
I can add it back in.

Curiously, I do not see a warning (about unused function) when
CONFIG_CADENCE_QSPI_WRITE_PROTECT is not defined.

Regards,
Ralph

Reply via email to