Re: h1940 - kernel 2.6.20-rc1 can't read my SD card

From: Tom Talpey <tmtalpey_at_rcn.com>
Date: Tue, 23 Jan 2007 17:17:33 -0500

At 11:59 AM 1/23/2007, Carlo Palma wrote:
>I the next days I'll continue to study the s3c2410mci.c .. and I'll search
>to understand what's changed from 2.6.17 to 2.6.20 about the mmc support
>and to try to solve this problem.
>Maybe forcing the block size to 512... could be a king of solution.

I am having the same problem, but I have managed to fix at least one of
my cards by adding a clock limit to the h1940_mmc_cfg structure in
mach-h1940.c. I have another card which it does not fix though (133x).
These cards all worked fine in the previous kernels.

There were a LOT of changes in the core MMC layer (drivers/mmc) in 2.6.20
which enable the setting of higher clocks and full device widths. I routinely
see speeds of 25MHz up to 130MHZ offered on the MMC slot, all of which
break badly. The limit I have observed for my h1940 to work is 3MHz (three).

I even had one 128MB SD card become a 64MB card after booting one
bad kernel, so be careful! I am afraid it had a bit of a lobotomy - I can't
get it back to 128. Ideas welcome on that...

Patch for the high clocks below - beware whitespace. I have had other
issues with my own kernel builds in 2.6.20-rc[1-5], but they're largely
stable now. I will send my other stuff in another message.

Tom.

Index: kernel/arch/arm/mach-s3c2410/mach-h1940.c
===================================================================
--- kernel.orig/arch/arm/mach-s3c2410/mach-h1940.c
+++ kernel/arch/arm/mach-s3c2410/mach-h1940.c
@@ -153,6 +153,7 @@ static struct s3c24xx_mmc_platdata h1940
        .gpio_detect = S3C2410_GPF5,
        .set_power = NULL,
        .ocr_avail = MMC_VDD_32_33,
+ .f_max = 3000000,
 };
 
 
Received on Tue Jan 23 2007 - 17:18:05 EST

This archive was generated by hypermail 2.2.0 : Tue Jan 23 2007 - 17:18:20 EST