public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7] eSPI: add eSPI controller support
Date: Thu, 27 Aug 2009 01:53:41 -0400	[thread overview]
Message-ID: <200908270153.42926.vapier@gentoo.org> (raw)
In-Reply-To: <73839B4A0818E747864426270AC332C304437FDA@zmy16exm20.fsl.freescale.net>

On Wednesday 26 August 2009 23:01:52 Hu Mingkai-B21284 wrote:
> From: Mike Frysinger [mailto:vapier at gentoo.org]
> > On Monday 16 March 2009 04:56:22 Hu Mingkai-B21284 wrote:
> > > But the eSPI controller integrate the chip select into the controller 
> > > itself, it use the transfer length to control the duration of the chip
> > > select signal.
> >
> > so you must tell the controller ahead of time how many bytes
> > are going to be transferred ?  this sounds like a retarded
> > hardware implementation to me.  how exactly do you support
> > arbitrary transfer lengths ?
>
> IIRC every transaction byte length control every transaction.

but what if you dont know the length of the transaction ahead of time ?  if 
you look at the spi flash framework, it'll write a few bytes (like the opcode 
to read the status register) and then it'll just keep reading 1 byte at a time 
(polling the status register).  there is no way of knowing the length ahead of 
time.  most of the SPI code in u-boot operates this way.

> > > The spi_flash_cmd_* function split the transfer into two steps: first
> > > the command transfer and then the data transfer. At the first step,
> > > the transfer length is set to the command length, and when transferred
> > > the command, the chip select will be negated, so the eSPI controller
> > > thinks the transfer is cancelled and doesn't transfer the data again.
> >
> > the transfer state is passed in via the flags parameter.
> > this way the SPI controller knows when a transfer starts
> > (SPI_XFER_BEGIN) and when it ends (SPI_XFER_END).
>
> As above, we can't use the start/end flags parameter.

then your controller wont be able to work with most (any?) of the code in u-
boot.  you need to reject every transfer that isnt done with both BEGIN and 
END flags set.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090827/cbfe3ffe/attachment.pgp 

  reply	other threads:[~2009-08-27  5:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16  2:52 [U-Boot] [PATCH 1/7] eSPI: add the eSPI register support Mingkai Hu
2009-03-16  2:52 ` [U-Boot] [PATCH 2/7] mtd: SPI Flash: Support the Spansion Flash Mingkai Hu
2009-03-16  2:52   ` [U-Boot] [PATCH 3/7] eSPI: add eSPI controller support Mingkai Hu
2009-03-16  2:52     ` [U-Boot] [PATCH 4/7] eSPI: make the chip selsec enable Mingkai Hu
2009-03-16  2:52       ` [U-Boot] [PATCH 5/7] Make a special uboot used for booting from SDcard or SPI flash Mingkai Hu
2009-03-16  2:52         ` [U-Boot] [PATCH 6/7] Add support for save the env to SDcard Mingkai Hu
2009-03-16  2:52           ` [U-Boot] [PATCH 7/7] Save the env variables to SDcard and SPI flash for MPC8536DS Mingkai Hu
2009-03-16  8:56             ` Wolfgang Denk
2009-03-16  7:25           ` [U-Boot] [PATCH 6/7] Add support for save the env to SDcard Mike Frysinger
2009-03-16  8:55         ` [U-Boot] [PATCH 5/7] Make a special uboot used for booting from SDcard or SPI flash Wolfgang Denk
2009-03-17 12:16           ` Hu Mingkai-B21284
2009-03-17 12:30             ` Wolfgang Denk
2009-03-18 17:15               ` Scott Wood
2009-03-18 19:29                 ` Wolfgang Denk
2009-03-18 19:57                   ` Scott Wood
2009-03-18 20:13                     ` Wolfgang Denk
2009-03-18 20:15                       ` Scott Wood
2009-03-18 21:11                         ` Wolfgang Denk
2009-08-27  2:43               ` Hu Mingkai-B21284
2009-03-16  6:15     ` [U-Boot] [PATCH 3/7] eSPI: add eSPI controller support Jean-Christophe PLAGNIOL-VILLARD
2009-03-16  7:28       ` Mike Frysinger
2009-03-16  8:56         ` Hu Mingkai-B21284
2009-03-16 10:05           ` Mike Frysinger
2009-08-27  3:01             ` Hu Mingkai-B21284
2009-08-27  5:53               ` Mike Frysinger [this message]
2009-08-27  6:27                 ` Hu Mingkai-B21284
2009-08-27  6:43                   ` Mike Frysinger
2009-08-27  6:59                     ` Hu Mingkai-B21284
2009-08-27  7:22                       ` Mike Frysinger
2009-08-27  7:47                         ` Hu Mingkai-B21284
2009-03-16 11:58     ` Scott McNutt
2009-03-16  4:38   ` [U-Boot] [PATCH 2/7] mtd: SPI Flash: Support the Spansion Flash Mike Frysinger
2009-03-16  6:23     ` Hu Mingkai-B21284
2009-03-29 19:34       ` Mike Frysinger
2009-03-31  1:12   ` Mike Frysinger
2009-03-31  5:51     ` Hu Mingkai-B21284

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=200908270153.42926.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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