Hello Niklas On Tue, Mar 01, 2022 at 11:17:20AM +0000, Niklas Cassel wrote: > From: Niklas Cassel <niklas.cassel@xxxxxxx> > > Simply deasserting reset just ensures that the hardware is taken out of > reset, if it was booted with the hardware reset asserted. > > In order actually reset the SPI controller, we need to assert reset before > deasserting. > > By doing this, we ensure that the hardware is not in some bad state, and we > ensure that the hardware registers get set to their reset default, clearing > any setting set by e.g. a bootloader. > > Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx> > --- > drivers/spi/spi-dw-mmio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c > index 5101c4c6017b..eb1dacb45ca2 100644 > --- a/drivers/spi/spi-dw-mmio.c > +++ b/drivers/spi/spi-dw-mmio.c > @@ -289,6 +289,8 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) > ret = PTR_ERR(dwsmmio->rstc); > goto out_clk; > } > + reset_control_assert(dwsmmio->rstc); > + udelay(2); Do we really need this? dw_spi_add_host() is doing a sort of soft reset anyway by calling the dw_spi_hw_init() method. Do you have a real platform, which requires to do a full hard-reset? What about the self-reset based controllers? -Sergey > reset_control_deassert(dwsmmio->rstc); > > dws->bus_num = pdev->id; > -- > 2.35.1