Re: [PATCH 03/17] spi: cadence_qspi: Use APB write protection
Ralph Siemsen <[email protected]> Sat, 1 Aug 2026 09:07:59 -0400
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CANp-EDa+2Hdzg2nn9mcOupkLNPvAohnu_1UZ9AaysG_gvK==AA@mail.gmail.com> |
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