public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] spi: mxc_spi: Fix spi mode communication where clock is inverted
Date: Wed, 20 Jun 2018 22:51:19 +0200	[thread overview]
Message-ID: <1529527879-26495-3-git-send-email-michael@amarulasolutions.com> (raw)
In-Reply-To: <1529527879-26495-1-git-send-email-michael@amarulasolutions.com>

During spi initialization logic creates a glitch on the clock and
if this is followed by the chip select this can be interpretated
as clock. Add a delay let the glitch out of chip select

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 drivers/spi/mxc_spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 0dccc38..d450f16 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -387,6 +387,7 @@ static int mxc_spi_claim_bus_internal(struct mxc_spi_slave *mxcs, int cs)
 	}
 	reg_write(&regs->period, MXC_CSPIPERIOD_32KHZ);
 	reg_write(&regs->intr, 0);
+	udelay(50);
 
 	return 0;
 }
-- 
2.7.4

  parent reply	other threads:[~2018-06-20 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 20:51 [U-Boot] [PATCH 1/3] spi: mxc: Fix compilation problem of DM_SPI class driver Michael Trimarchi
2018-06-20 20:51 ` [U-Boot] [PATCH 2/3] spi: mxc_spi: Fix chipselect on DM_SPI driver uclass Michael Trimarchi
2018-06-24 11:40   ` Peng Fan
2018-06-25  9:54   ` Jagan Teki
2018-06-20 20:51 ` Michael Trimarchi [this message]
2018-06-24 11:44   ` [U-Boot] [PATCH 3/3] spi: mxc_spi: Fix spi mode communication where clock is inverted Peng Fan
2018-06-30 10:35     ` Michael Nazzareno Trimarchi
2018-06-20 20:52 ` [U-Boot] [PATCH 1/3] spi: mxc: Fix compilation problem of DM_SPI class driver Fabio Estevam
2018-06-24 11:41 ` Peng Fan
2018-06-25  8:54 ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1529527879-26495-3-git-send-email-michael@amarulasolutions.com \
    --to=michael@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox