From: Vladimir Gurevich <vag@paulidav.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] SPI support in U-boot
Date: Sun, 22 Jan 2006 18:50:42 -0800 [thread overview]
Message-ID: <43D44482.7030300@paulidav.org> (raw)
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
next reply other threads:[~2006-01-23 2:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-23 2:50 Vladimir Gurevich [this message]
2006-01-23 10:44 ` [U-Boot-Users] SPI support in U-boot Wolfgang Denk
2006-01-25 8:15 ` Vladimir Gurevich
2006-01-25 11:16 ` Wolfgang Denk
2006-01-26 6:56 ` Vladimir Gurevich
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=43D44482.7030300@paulidav.org \
--to=vag@paulidav.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