linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@marvell.com>
To: Mark Brown <broonie@kernel.org>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] spi: dw: support setting tmode dynamically
Date: Wed, 23 Dec 2015 20:29:52 +0800	[thread overview]
Message-ID: <20151223202952.28be5bab@xhacker> (raw)
In-Reply-To: <20151223121512.GV16023@sirena.org.uk>

Dear Mark,

On Wed, 23 Dec 2015 12:15:12 +0000 Mark Brown wrote:

> On Wed, Dec 23, 2015 at 07:23:38PM +0800, Jisheng Zhang wrote:
> 
> > Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is NULL, but we
> > need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution is to add and
> > export one functions to set the tmode, then the nor flash driver call it
> > before reading and set back to SPI_TMOD_TR after done.  
> 
> What does this mean - what is TMOD and why do we need to set it to read
> NOR flash?  I've no information on this controller...

TMOD is one field of DW_SPI_CTRL0. Its available value could be:

0: Transmit and Receive

1: Transmit only

2: Receive only

3: EEPROM Read

If the one spi nor flash is connected to the SPI host, so far I can only succeed
to read the nor flash content after setting the TMOD field as 3.

Thanks,
Jisheng

  reply	other threads:[~2015-12-23 12:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 11:23 [RFC] spi: dw: support setting tmode dynamically Jisheng Zhang
2015-12-23 12:15 ` Mark Brown
2015-12-23 12:29   ` Jisheng Zhang [this message]
2016-01-05 16:12     ` Mark Brown
     [not found]       ` <CAFLsZf0LvrQ60GdLzp_5nPLVxSxVaPadgzT_7aL4SQzgvswQbA@mail.gmail.com>
     [not found]         ` <CAFLsZf0LvrQ60GdLzp_5nPLVxSxVaPadgzT_7aL4SQzgvswQbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06  2:03           ` Khoa Dang Pham
2016-01-06  6:23           ` Jisheng Zhang
2016-01-06  7:04             ` Khoa Dang Pham
     [not found]               ` <CAFLsZf31bt+-uwTo3zBWkho3UxquRCeTmK3hNMrGLXkjwHanwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06  7:22                 ` Jisheng Zhang
2016-01-06  7:36                   ` Khoa Dang Pham
     [not found]                     ` <CAFLsZf3pdk6EdTRoax7Mp5GGZoGKm4PuwMdG2nC-hr+StYwYQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-06  7:45                       ` Jisheng Zhang
2016-01-06 12:13         ` Mark Brown

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=20151223202952.28be5bab@xhacker \
    --to=jszhang@marvell.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /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).