public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] SPI support in U-boot
@ 2006-01-23  2:50 Vladimir Gurevich
  2006-01-23 10:44 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Gurevich @ 2006-01-23  2:50 UTC (permalink / raw)
  To: u-boot

Hello,

It looks like the basic SPI I/O function, spi_xfer() has two different 
prototypes in U-boot.

   1. in common/soft_spi.c, include/spi.h and cpu/nio/spi.c  it is
      declared as

       int spi_xfer(spi_chipsel_type chipsel, int bitlen, uchar *dout,
      uchar *din)

   2. in SPI drivers for MPC CPUs (cpu/mpc{8xx, 8260, 5xxx}/spi.c) it is
      declared as

       ssize_t spi_xfer (size_t count)

The code for "sspi" command (do_spi()) definitely uses the first 
prototype. Subsequently it doesn't work on the above mentioned CPUs 
(unless you use software SPI implementation).

On the other hand, the code for the "eeprom" command, which is another 
way to access an SPI EEPROM uses functions spi_read() and spi_write, 
which are implemented only in cpu/mpc{8xx, 8260, 5xxx}/spi.c. However, 
these functions are very basic. Fore example they do not allow you to 
control SPI chip select.

Can someone tell me what is going on. Is it that MPC drivers became 
outdated and should be modified? How do other people use them then? Or I 
am simply missing something?

Thanks,
Vladimir

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-26  6:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-23  2:50 [U-Boot-Users] SPI support in U-boot Vladimir Gurevich
2006-01-23 10:44 ` Wolfgang Denk
2006-01-25  8:15   ` Vladimir Gurevich
2006-01-25 11:16     ` Wolfgang Denk
2006-01-26  6:56       ` Vladimir Gurevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox