From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3 v8] mmc: add generic mmc spi driver
Date: Mon, 5 Jul 2010 16:11:52 -0400 [thread overview]
Message-ID: <201007051611.55037.vapier@gentoo.org> (raw)
In-Reply-To: <4C31EAB5.5080108@wytron.com.tw>
On Monday, July 05, 2010 10:22:45 Thomas Chou wrote:
> On 07/05/2010 03:40 PM, Mike Frysinger wrote:
> > On Wednesday, May 19, 2010 00:37:47 Thomas Chou wrote:
> >> --- /dev/null
> >> +++ b/drivers/mmc/mmc_spi.c
> >> +struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode)
> >> +{
> >> + struct mmc *mmc;
> >> + mmc->b_max = MMC_SPI_MAX_BLOCKS;
> >
> > do you have some local modification ? i dont see b_max anywhere in
> > include/mmc.h ...
>
> Please apply the multi-blocks patches (1,2,3/4) from Alagu on 05/12, as
> Andy said he had applied them.
those arent required for basic probing functionality, right ?
> > unfortunately though, i tried this on my system and it doesnt seem to
> > work. using a simple SPI<->MMC card, the old mmc_spi driver works on my
> > board, but booting the new u-boot and running the same things shows:
> >
> >
> > mmc_spi_request:cmd1 1 40300000 0
> > mmc_spi_sendcmd:cmd1 resp4 1
> > <these last 2 lines repeat for a while>
> > Card did not respond to voltage select!
>
> It seems the mmc card was not initialized and timed out. Please try
> remove the OCR_HCS in mmc_send_op_cond() of mmc.c temporarily.
>
> cmd.cmdarg = OCR_HCS | mmc->voltages;
> ---------------------^^^^^^^^^
that does fix the timeout/warning, but the card doesnt probe yet:
bfin> mmcinfo
mmc_spi_init_p: clock 0
mmc_spi_set_ios: clock 0
mmc_spi_set_ios: clock 400000
mmc_spi_request:cmd0 0 0 0
mmc_spi_sendcmd:cmd0 resp8 ff
Device: MMC_SPI
Manufacturer ID: 0
OEM: 0
Name: Tran Speed: 0
Rd Block Len: 0
MMC version 0.0
High Capacity: No
Capacity: 0
Bus Width: 1-bit
if i boot up the old u-boot and probe the card there, then load up the new u-
boot and try again, things get further:
bfin> mmcinfo
mmc_spi_init_p: clock 0
mmc_spi_set_ios: clock 0
mmc_spi_set_ios: clock 400000
mmc_spi_request:cmd0 0 0 0
mmc_spi_sendcmd:cmd0 resp6 1
mmc_spi_request:cmd8 15 1aa 0
mmc_spi_sendcmd:cmd8 resp8 ff
mmc_spi_request:cmd55 15 0 0
mmc_spi_sendcmd:cmd55 resp6 5
mmc_spi_request:cmd0 0 0 0
mmc_spi_sendcmd:cmd0 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 1
mmc_spi_request:cmd1 1 300000 0
mmc_spi_sendcmd:cmd1 resp6 0
mmc_spi_request:cmd58 1 0 0
mmc_spi_sendcmd:cmd58 resp6 0
r32 ffffffff
mmc_spi_request:cmd10 7 0 0
mmc_spi_sendcmd:cmd10 resp6 0
mmc_spi_readdata:tok0 80
r128 0 ff7a0000 fdff 3831f903
mmc_spi_request:cmd9 7 0 0
mmc_spi_sendcmd:cmd9 resp6 0
mmc_spi_readdata:tok1 fe
r128 ff4900 263 61726420 1659810
mmc_spi_set_ios: clock 20000000
mmc_spi_request:cmd16 15 1 0
mmc_spi_sendcmd:cmd16 resp6 0
mmc_spi_request:cmd17 15 0 0
mmc_spi_sendcmd:cmd17 resp8 ff
block read failed: -16
Device: MMC_SPI
Manufacturer ID: 0
OEM: 0
Name: Tran Speed: 0
Rd Block Len: 1
MMC version 1.2
High Capacity: Yes
Capacity: 2374355968
Bus Width: 1-bit
however, in poking the code, i see your mmc_spi_init_p() function calls
spi_claim_bus(), but nowhere do i see spi_release_bus().
-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/20100705/5bf8f0e8/attachment.pgp
prev parent reply other threads:[~2010-07-05 20:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 2:53 [U-Boot] [PATCH] mmc: add generic mmc spi driver Thomas Chou
2010-04-23 3:35 ` Mike Frysinger
2010-04-23 4:04 ` Thomas Chou
2010-04-23 5:55 ` Thomas Chou
2010-04-25 6:56 ` Mike Frysinger
2010-04-26 14:37 ` Thomas Chou
2010-04-26 15:59 ` Mike Frysinger
2010-04-25 6:51 ` Mike Frysinger
2010-04-27 1:51 ` [U-Boot] [PATCH v2] " Thomas Chou
2010-04-27 3:27 ` [U-Boot] [PATCH v3] " Thomas Chou
2010-04-27 16:49 ` Mike Frysinger
2010-04-28 3:14 ` Thomas Chou
2010-04-28 2:50 ` [U-Boot] [PATCH v4] " Thomas Chou
2010-04-28 6:00 ` [U-Boot] [PATCH v5] " Thomas Chou
2010-04-28 15:21 ` Andy Fleming
2010-04-29 5:52 ` Thomas Chou
2010-04-29 14:51 ` Thomas Chou
2010-04-29 19:07 ` Mike Frysinger
2010-04-30 0:16 ` Thomas Chou
2010-05-03 0:54 ` [U-Boot] [PATCH 0/3] mmc: add mmc_spi driver Thomas Chou
2010-05-03 0:54 ` [U-Boot] [PATCH 1/3] lib: add crc7 from Linux Thomas Chou
2010-05-03 0:54 ` [U-Boot] [PATCH 2/3] mmc: add find_mmc_device_quiet that doesnt print not found message Thomas Chou
2010-05-06 22:14 ` Wolfgang Denk
2010-05-07 0:19 ` Thomas Chou
2010-05-07 0:51 ` [U-Boot] [PATCH 2/3 v2] mmc: control message print in find_mmc_device Thomas Chou
2010-05-19 4:31 ` Thomas Chou
2010-05-07 0:51 ` [U-Boot] [PATCH 3/3 v7] mmc: add generic mmc spi driver Thomas Chou
2010-05-03 0:54 ` [U-Boot] [PATCH 3/3 v6] " Thomas Chou
2010-05-19 4:37 ` [U-Boot] [PATCH 3/3 v8] " Thomas Chou
2010-05-28 22:44 ` Thomas Chou
2010-07-05 7:40 ` Mike Frysinger
2010-07-05 14:22 ` Thomas Chou
2010-07-05 20:11 ` Mike Frysinger [this message]
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=201007051611.55037.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