linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* atmel-mci / at91_mci
@ 2010-02-04  8:57 Manuel Stahl
  2010-02-08 13:13 ` Fabian Godehardt
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Stahl @ 2010-02-04  8:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

I have a question regarding the atmel-mci/at91_mci driver merge. 
Actually I have an at91rm9200 device which get's an CRC error while 
inializing an SD-card. I guess it's because of an at91rm9200 errata:

- Data Endianess inversion from the MCI to MMC or SD Card

The at91_mci driver did some byte swapping in 'at91_mci_sg_to_dma' function.
Where would I implement this in the atmel-mci driver?

Attached is the kernel log when I insert a card.

Regards,
-- 

Dipl.-Inf. Manuel Stahl
Fraunhofer-Institut f?r Integrierte Schaltungen IIS
- Leistungsoptimierte Systeme -
Nordostpark 93                Telefon  +49 (0)911/58061-6419
90411 N?rnberg                Fax      +49 (0)911/58061-6398
http://www.iis.fraunhofer.de  manuel.stahl at iis.fraunhofer.de


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: atmel-mci.log
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100204/7dd51cd3/attachment-0001.el>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6148 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100204/7dd51cd3/attachment-0001.p7s>

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

* atmel-mci / at91_mci
  2010-02-04  8:57 atmel-mci / at91_mci Manuel Stahl
@ 2010-02-08 13:13 ` Fabian Godehardt
  2010-02-09 15:49   ` Manuel Stahl
  0 siblings, 1 reply; 5+ messages in thread
From: Fabian Godehardt @ 2010-02-08 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Am Donnerstag 04 Februar 2010 09:57:51 schrieb Manuel Stahl:
> Hi all,
> 
> I have a question regarding the atmel-mci/at91_mci driver merge.
> Actually I have an at91rm9200 device which get's an CRC error while
> inializing an SD-card. I guess it's because of an at91rm9200 errata:
> 
> - Data Endianess inversion from the MCI to MMC or SD Card
> 
> The at91_mci driver did some byte swapping in 'at91_mci_sg_to_dma'
>  function. Where would I implement this in the atmel-mci driver?
> 
> Attached is the kernel log when I insert a card.

Some time ago i had a 9200 with 2.6.20 where i had similar problems (AFAIR).

My workaround was to reduce the frequency on card initialization (somewhere on 
probe() ):

	mmc->f_min = 325000;

and deactivating 4WIRE mode.

Maybe this also helps in your case.


Mit freundlichen Gr??en/With kind regards

Fabian Godehardt

-- 
Besuchen Sie uns auf der Embedded World 2010 in N?rnberg!
-> Halle 11, Stand 222

Dipl.-Ing. (FH) Fabian Godehardt, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 G?ttingen, Germany
Sitz der Gesellschaft: G?ttingen, Amtsgericht G?ttingen HR B 3160
Gesch?ftsf?hrer: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner

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

* atmel-mci / at91_mci
  2010-02-08 13:13 ` Fabian Godehardt
@ 2010-02-09 15:49   ` Manuel Stahl
  2010-02-15 16:16     ` Sebastian Heutling
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Stahl @ 2010-02-09 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

Am 08.02.2010 14:13, schrieb Fabian Godehardt:
> Hi,
>
> Am Donnerstag 04 Februar 2010 09:57:51 schrieb Manuel Stahl:
>> Hi all,
>>
>> I have a question regarding the atmel-mci/at91_mci driver merge.
>> Actually I have an at91rm9200 device which get's an CRC error while
>> inializing an SD-card. I guess it's because of an at91rm9200 errata:
>>
>> - Data Endianess inversion from the MCI to MMC or SD Card
>>
>> The at91_mci driver did some byte swapping in 'at91_mci_sg_to_dma'
>>   function. Where would I implement this in the atmel-mci driver?
>>
>> Attached is the kernel log when I insert a card.
>
> Some time ago i had a 9200 with 2.6.20 where i had similar problems (AFAIR).
>
> My workaround was to reduce the frequency on card initialization (somewhere on
> probe() ):
>
> 	mmc->f_min = 325000;
>
> and deactivating 4WIRE mode.
>
> Maybe this also helps in your case.

Unfortunately this is not the problem. The SD-card works fine with the 
old at91_mci driver, but not with the newer atmel-mci. The problem is 
that I need both slots at the same time, so at91_mci is no option for me.

In the second slot there is a WLAN card which gets timeouts after 
successful firmware load with at91_mci but does not work with atmel-mci.

I have exactly the same setup with an AVR32 processor, there both 
devices work. With the atmel-mci driver obiously.

Regards,
-- 
Dipl.-Inf. Manuel Stahl
Fraunhofer-Institut f?r Integrierte Schaltungen IIS
- Leistungsoptimierte Systeme -
Nordostpark 93                Telefon  +49 (0)911/58061-6419
90411 N?rnberg                Fax      +49 (0)911/58061-6398
http://www.iis.fraunhofer.de  manuel.stahl at iis.fraunhofer.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6148 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100209/389bfd88/attachment-0001.p7s>

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

* atmel-mci / at91_mci
  2010-02-09 15:49   ` Manuel Stahl
@ 2010-02-15 16:16     ` Sebastian Heutling
  2010-02-22  9:56       ` Manuel Stahl
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Heutling @ 2010-02-15 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/09/10 16:49, Manuel Stahl wrote:
> Unfortunately this is not the problem. The SD-card works fine with the
> old at91_mci driver, but not with the newer atmel-mci. The problem is
> that I need both slots at the same time, so at91_mci is no option for me.
>
> In the second slot there is a WLAN card which gets timeouts after
> successful firmware load with at91_mci but does not work with atmel-mci.
>
> I have exactly the same setup with an AVR32 processor, there both
> devices work. With the atmel-mci driver obiously.
>    

Could that be related to the "SLOT_B" bit in the SDCR?
I had to set it in U-Boot to get the second slot working properly.
My guess is that on AT91 (we use SAM9G20) every access needs to set or 
clear that bit depending on which slot is addressed.

Sebastian Heutling

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

* atmel-mci / at91_mci
  2010-02-15 16:16     ` Sebastian Heutling
@ 2010-02-22  9:56       ` Manuel Stahl
  0 siblings, 0 replies; 5+ messages in thread
From: Manuel Stahl @ 2010-02-22  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

Am 15.02.2010 17:16, schrieb Sebastian Heutling:
> On 02/09/10 16:49, Manuel Stahl wrote:
>> Unfortunately this is not the problem. The SD-card works fine with the
>> old at91_mci driver, but not with the newer atmel-mci. The problem is
>> that I need both slots at the same time, so at91_mci is no option for me.
>>
>> In the second slot there is a WLAN card which gets timeouts after
>> successful firmware load with at91_mci but does not work with atmel-mci.
>>
>> I have exactly the same setup with an AVR32 processor, there both
>> devices work. With the atmel-mci driver obiously.
>
> Could that be related to the "SLOT_B" bit in the SDCR?
> I had to set it in U-Boot to get the second slot working properly.
> My guess is that on AT91 (we use SAM9G20) every access needs to set or
> clear that bit depending on which slot is addressed.

No there was a bug in the atmel_mci driver for 2.6.27 related to SDCR. 
With at91_mci you can only use one slot at a time, which is configured 
in the board setup code. The at91_mci driver communicates with the right 
slot, it can even download the firmware. Until then all SDIO traffic is 
OK, after the download there are timeouts. Maybe the restart of the 
device with the new firmware is not working properly.

Regards,
-- 
Dipl.-Inf. Manuel Stahl
Fraunhofer-Institut f?r Integrierte Schaltungen IIS
- Leistungsoptimierte Systeme -
Nordostpark 93                Telefon  +49 (0)911/58061-6419
90411 N?rnberg                Fax      +49 (0)911/58061-6398
http://www.iis.fraunhofer.de  manuel.stahl at iis.fraunhofer.de


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6148 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100222/1a8980b6/attachment.p7s>

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

end of thread, other threads:[~2010-02-22  9:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04  8:57 atmel-mci / at91_mci Manuel Stahl
2010-02-08 13:13 ` Fabian Godehardt
2010-02-09 15:49   ` Manuel Stahl
2010-02-15 16:16     ` Sebastian Heutling
2010-02-22  9:56       ` Manuel Stahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).