Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
Hi Philippe, On Sun, Jan 17, 2021 at 12:12 AM Philippe Mathieu-Daudé wrote: > > On 1/16/21 4:59 PM, Bin Meng wrote: > > Hi Philippe, > > > > On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi Bin, > >> > >> On 1/16/21 2:57 PM, Bin Meng wrote: > >>> On Fri, Jan 15,

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Philippe Mathieu-Daudé
On 1/16/21 4:59 PM, Bin Meng wrote: > Hi Philippe, > > On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé > wrote: >> >> Hi Bin, >> >> On 1/16/21 2:57 PM, Bin Meng wrote: >>> On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé >>> wrote: When the block is disabled, only the

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
Hi Philippe, On Sat, Jan 16, 2021 at 11:21 PM Philippe Mathieu-Daudé wrote: > > Hi Bin, > > On 1/16/21 2:57 PM, Bin Meng wrote: > > On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé > > wrote: > >> > >> When the block is disabled, only the ECSPI_CONREG register can > >> be modified.

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Philippe Mathieu-Daudé
Hi Bin, On 1/16/21 2:57 PM, Bin Meng wrote: > On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé > wrote: >> >> When the block is disabled, only the ECSPI_CONREG register can >> be modified. Setting the EN bit enabled the device, clearing it > > I don't know how this conclusion came out.

Re: [PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-16 Thread Bin Meng
On Fri, Jan 15, 2021 at 11:37 PM Philippe Mathieu-Daudé wrote: > > When the block is disabled, only the ECSPI_CONREG register can > be modified. Setting the EN bit enabled the device, clearing it I don't know how this conclusion came out. The manual only says the following 2 registers ignore the

[PATCH v7 5/9] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled

2021-01-15 Thread Philippe Mathieu-Daudé
When the block is disabled, only the ECSPI_CONREG register can be modified. Setting the EN bit enabled the device, clearing it "disables the block and resets the internal logic with the exception of the ECSPI_CONREG" register. Move the imx_spi_is_enabled() check earlier. Ref: i.MX 6DQ