From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 25 Feb 2015 16:14:05 -0700 Subject: [U-Boot] [PATCH 06/20] tegra: spi: Drop the claim_bus() method to correct delays In-Reply-To: <1424212195-7501-7-git-send-email-sjg@chromium.org> References: <1424212195-7501-1-git-send-email-sjg@chromium.org> <1424212195-7501-7-git-send-email-sjg@chromium.org> Message-ID: <54EE573D.30701@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/17/2015 03:29 PM, Simon Glass wrote: > At present the driver does not properly honour the requested SPI CS > deactivation delay since the SPI bus is changed in the claim_bus() method. > > Everything the claim_bus() method does can be done when the device is probed > (setting the speed and mode) and at the start of a new transfer (where the > fifo_status is already cleared). So drop this method. > > Also, until the delay is complete, we should not touch the bus, so make sure > that spi_cs_activate() is called before other things are done in the xfer() > method. > diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c > - setbits_le32(®s->command1, SPI_CMD1_M_S | SPI_CMD1_CS_SW_HW | > - (priv->mode << SPI_CMD1_MODE_SHIFT)); ... > + setbits_le32(&priv->regs->command1, SPI_CMD1_M_S | SPI_CMD1_CS_SW_HW | > + (priv->mode << SPI_CMD1_MODE_SHIFT) | SPI_CMD1_CS_SW_VAL); Is that addition of SPI_CMD1_CS_SW_VAL there relative to the old code intended?