From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2a] AT91: add SD/MMC support
Date: Fri, 13 Aug 2010 20:31:30 +0200 [thread overview]
Message-ID: <4C658F82.2060306@emk-elektronik.de> (raw)
In-Reply-To: <6118D856B07F02449C470CE4DA6B1BD3A4035E8005@ise-exchange.ise.de>
Dear Schleifer, Alexander,
> Thanks for your reply...
>
> The CID part is:
> mmc: response: 1a50514d 53202020 1018301a ec007b8b
> Manufacturer ID: 1A
> OEM/Application ID: 5051
> Product name: MS
> Product Revision: 1.0
> Product Serial Number: 405805804
> Manufacturing Date: 07/11
>
> The CSD part is:
> mmc: response: 005e0032 5f5983cf edb6ff87 9640003f
> raw CSD data: 005e0032 5f5983cf edb6ff87 9640003f
> Read block length: 512
> (Supports partial reads)
> Card capacity: 244 Mbytes
> Warning: Using maximum data timeout
> mmc: Using 983040 cycles data timeout (DTOR=0x7f)
I miss the clock messages here. Whats the MCK and which divider is calculated?
> mmc: bread failed, status = 0040c0e5, card status = 00000900
0040c0e5=
DTOE=1(data time out error)
TXBUFE=1
RXBUFF=1(rx buffer full)
and other bits
That seems to me like some timing problem, or a hardware problem,
where reading data with slow clock (used to get CID/CSD) works,
but reading at several MHz (depending on card) does not work.
Besides the clock calculation in this driver rounds the divider
down, so on a typical system a 25MHz card will receive a 48 MHz
clock instead of a 24 MHz. I figured this out while testing the
new driver...
If you really want to bother with this now old driver use this
excerpt from the new driver:
debug("mci: bus_hz is %u, setting clock %u Hz, block size %u\n",
bus_hz, hz, blklen);
if (hz > 0) {
/* find lowest clkdiv yielding a rate <= than requested */
for (clkdiv=0; clkdiv<255; clkdiv++) {
if ((bus_hz / (clkdiv+1) / 2) <= hz)
break;
}
}
printf("mci: setting clock %u Hz, block size %u\n",
(bus_hz / (clkdiv+1)) / 2, blklen);
If you have two days patience, wait for the new driver, I will be
most happy to have a tester ;)
Best Regards,
Reinhard
next prev parent reply other threads:[~2010-08-13 18:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-04 13:20 [U-Boot] [PATCH] AT91SAM9260/9XE: add support for MultiMedia Card Interface (MCI) Reinhard Meyer
2010-07-05 6:09 ` Eric Xu
2010-07-05 8:58 ` Reinhard Meyer
2010-07-05 9:59 ` Wolfgang Denk
2010-07-05 10:30 ` [U-Boot] 答复: " Xu, Hong
2010-07-05 12:46 ` Wolfgang Denk
2010-07-05 14:05 ` [U-Boot] " Xu, Hong
2010-08-09 15:40 ` [U-Boot] [PATCH v2] AT91: add SD/MMC support Reinhard Meyer
2010-08-09 15:45 ` [U-Boot] [PATCH v2a] " Reinhard Meyer
[not found] ` <0F5F73E36031FD46AD3F2E6948F0C0A0041798F7@frimb01.corp.atmel.com>
2010-08-10 3:24 ` Reinhard Meyer
[not found] ` <0F5F73E36031FD46AD3F2E6948F0C0A004179996@frimb01.corp.atmel.com>
2010-08-10 4:02 ` Reinhard Meyer
2010-08-10 12:53 ` Reinhard Meyer
2010-08-13 10:18 ` asc0
2010-08-13 11:17 ` Reinhard Meyer
2010-08-13 11:56 ` Schleifer, Alexander
2010-08-13 18:31 ` Reinhard Meyer [this message]
2010-08-14 9:43 ` Reinhard Meyer
2010-08-16 9:22 ` Schleifer, Alexander
2010-08-16 10:16 ` Reinhard Meyer
2010-08-16 10:43 ` Wolfgang Denk
2010-08-16 10:51 ` Reinhard Meyer
2010-08-16 12:32 ` Wolfgang Denk
2010-08-17 10:12 ` Schleifer, Alexander
2010-08-17 10:42 ` Reinhard Meyer
2010-08-17 14:04 ` [U-Boot] [PATCH v3] AT91: MCI: add SD/MMC driver using mmc framework Reinhard Meyer
2010-09-03 9:06 ` Reinhard Meyer
2010-08-16 2:04 ` [U-Boot] [PATCH v2a] AT91: add SD/MMC support Xu, Hong
2010-08-16 9:34 ` Schleifer, Alexander
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=4C658F82.2060306@emk-elektronik.de \
--to=u-boot@emk-elektronik.de \
--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