Re: [PATCH v2 3/5] spi: bcmbca-hsspi: fix division by zero for devices without a max speed
From: William Zhang
Date: Fri Nov 13 2026 - 20:14:42 EST
On Fri, Nov 13, 2026 at 4:51 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Wed, Nov 11, 2026 at 05:36:37PM +0800, shao.mingyin@xxxxxxxxxx wrote:
>
> > > IMHO the upper layer should fail ... rather than having the controller
> > > driver to override with a risky 1Hz clock.
>
> > Agreed; the fix belongs upstream of the driver, not in ->set_clk().
> > Mark, which do you prefer: reject max_speed_hz == 0 in spi core, or
> > have these two drivers clamp FCW >= 1? I'll wait for your call and
> > won't spin a v3 meanwhile.
>
> Ideally the core should do this but that's quite hard to do due to knock
> on effects of handling 0 as a default everywhere, together with having a
> bunch of existing drivers that don't provide any information.
In that case, Mingyin, please update the patch to ensure FCW >=1
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature