linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: spi-devel-general@lists.sourceforge.net
Cc: linuxppc-dev@ozlabs.org, a.paterniani@swapp-eng.it
Subject: SPI-Difference between MX1 and MX31
Date: Thu, 12 Feb 2009 14:00:26 +0100	[thread overview]
Message-ID: <20090212130026.GC3130@pengutronix.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]

Hello,

while working on a generic SPI-driver for the i.MX-platform I stumbled
over the following:

The MX1 can flush its FIFOs using the enable bit. Documentation says:

"SPI Module Enable - Enables/Disables the serial peripheral interface.
SPIEN must be asserted before an exchange is initiated. Writing 0 to
SPIEN flushes the receive and transmit FIFOs."

Furthermore it has a dedicated reset register:

"Start - Executes soft reset."

However, the MX31 does not have a reset register and the documentation
says this regarding the enable bit:

"SPI Module Enable Control - This bit enables the CSPI. This bit must be
asserted before writing to other registers or initiating an exchange.
Writing zero to this bit disables the module and resets the internal
logic with the exception of the CONREG. The module’s internal clocks are
gated off whenever the module is disabled."

So, as I read all this, disabling the enable bit on the MX31 is more
like a soft reset on MX1, right? And there does not seem to be a way to
flush the FIFOs. Can someone imagine what problems might arise if there
is no way to flush the FIFOs? At least, the check for XCH should have
ensured that the TXFIFO is empty...

Looking forward to feedback :)

Regards,

   Wolfram Sang

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2009-02-12 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 13:00 Wolfram Sang [this message]
2009-02-12 13:58 ` SPI-Difference between MX1 and MX31 Wolfram Sang

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=20090212130026.GC3130@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=a.paterniani@swapp-eng.it \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).