Re: SD/MMC for i.MX51

2010-10-19 Thread Nicolas Pitre
On Mon, 18 Oct 2010, John Rigby wrote:

> Nicolas,
> 
> Thanks for the info.  I'll wait to see more patches/testing from Shawn
> before pulling.

You should be OK to pull now.


Nicolas

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Nicolas Pitre
On Tue, 19 Oct 2010, Shawn Guo wrote:

> I just sent out the patch (to linaro-dev) which is working on Linaro
> kernel tree per my test.

Thanks.  I merged them and pushed out the result.


Nicolas

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Wolfram Sang
On Mon, Oct 18, 2010 at 06:47:19PM -0700, john stultz wrote:

> I've tried using this tree, (as well as the pengutronix.de tree and
> linus' upstream) with an older 9.04 disk image, but none of the booting
> kernels could find the sd card (no mmcblk devices located in the boot
> log)

I didn't follow this thread very closely (actually I'm on holiday :)), but have
you disabled CONFIG_SYSFS_DEPRECATED? This causes issues with newer udevs if
activated. One of them is that mmcblk devices are not created when initally
booting.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Eric Bénard

Hi,

Le 19/10/2010 03:47, john stultz a écrit :

On Mon, 2010-10-18 at 18:58 +0800, Shawn Guo wrote:

Here you go.  I'm using Linaro tree below.

git://git.linaro.org/kernel/linux-linaro-2.6.35.git


I've tried using this tree, (as well as the pengutronix.de tree and
linus' upstream) with an older 9.04 disk image, but none of the booting
kernels could find the sd card (no mmcblk devices located in the boot
log)

So sort of to echo what Nicolas said, it seems pretty difficult to
follow which set of patches (as well as what .config settings) are
needed to get upstream booting.


on babbage you should need on top of Linaro's tree :
Shawn's patch
http://lists.linaro.org/pipermail/linaro-dev/2010-October/001307.html
and this fix :
http://lists.linaro.org/pipermail/linaro-dev/2010-October/001316.html

To remove the anoying sdhci probe log, add :
http://git.kernel.org/?p=linux/kernel/git/cjb/mmc.git;a=commit;h=0ca6d53ec81a13263f6643372b2a5abf7818e8fa

Eric

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Loïc Minier
On Tue, Oct 19, 2010, Shawn Guo wrote:
> I like the merge request way, but I'm behind a firewall. I was told
> that it's tough to get bzr push through firewall. Any suggestion to
> break the firewall through?

 You don't have outbound SSH access?  That's problematic indeed; is this
 something you could get fixed?

 Another way to send bzr changes is via a bzr bundle, which you can
 attach to an email, but it's a bit more cumbersome IMHO

-- 
Loïc Minier

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Shawn Guo
Hi Loic,

I like the merge request way, but I'm behind a firewall. I was told
that it's tough to get bzr push through firewall. Any suggestion to
break the firewall through?


On Tue, Oct 19, 2010 at 6:05 PM, Loïc Minier  wrote:
> On Tue, Oct 19, 2010, Shawn Guo wrote:
>> https://bugs.launchpad.net/linux-linaro/+bug/656962
>
>  I merged this; would be awesome if you could send further code changes
>  as bzr merge request (push your topic branch to launchpad and bzr
>  lp-propose-merge)!
>
>   Thanks
> --
> Loďc Minier
>



-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Loïc Minier
On Tue, Oct 19, 2010, Shawn Guo wrote:
> https://bugs.launchpad.net/linux-linaro/+bug/656962

 I merged this; would be awesome if you could send further code changes
 as bzr merge request (push your topic branch to launchpad and bzr
 lp-propose-merge)!

   Thanks
-- 
Loïc Minier

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-19 Thread Shawn Guo
Hi John,

On Tue, Oct 19, 2010 at 9:47 AM, john stultz  wrote:
> So sort of to echo what Nicolas said, it seems pretty difficult to
> follow which set of patches (as well as what .config settings) are
> needed to get upstream booting.
>
I just sent out the patch (to linaro-dev) which is working on Linaro
kernel tree per my test.

> Also, after trying to create a imx51 sd image with the lastest
> linaro-media-create tools & nightly images, the board didn't seem to be
> able to find uboot on the resulting sd card (wouldn't stay on when i
> pushed the power button). Are there still issues with the uboot
> integration? Or am I just doing something wrong?
>
There is a bug which can be fixed by
https://bugs.launchpad.net/linux-linaro/+bug/656962/comments/2.

Loic, Alexander,

Could the fix be merged soon?  This is really a show-stopper bug.

-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread john stultz
On Tue, 2010-10-19 at 03:59 +0200, Wolfram Sang wrote:
> On Mon, Oct 18, 2010 at 06:47:19PM -0700, john stultz wrote:
> 
> > I've tried using this tree, (as well as the pengutronix.de tree and
> > linus' upstream) with an older 9.04 disk image, but none of the booting
> > kernels could find the sd card (no mmcblk devices located in the boot
> > log)
> 
> I didn't follow this thread very closely (actually I'm on holiday :)), but 
> have
> you disabled CONFIG_SYSFS_DEPRECATED? This causes issues with newer udevs if
> activated. One of them is that mmcblk devices are not created when initally
> booting.

Hrm. Unfortunately that's already off in my .config, so it must be
something else. But thanks so much for the suggestion! 

Now get back to enjoying your holiday! :)
-john



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread john stultz
On Mon, 2010-10-18 at 18:58 +0800, Shawn Guo wrote:
> Here you go.  I'm using Linaro tree below.
> 
> git://git.linaro.org/kernel/linux-linaro-2.6.35.git

I've tried using this tree, (as well as the pengutronix.de tree and
linus' upstream) with an older 9.04 disk image, but none of the booting
kernels could find the sd card (no mmcblk devices located in the boot
log)

So sort of to echo what Nicolas said, it seems pretty difficult to
follow which set of patches (as well as what .config settings) are
needed to get upstream booting.

Also, after trying to create a imx51 sd image with the lastest
linaro-media-create tools & nightly images, the board didn't seem to be
able to find uboot on the resulting sd card (wouldn't stay on when i
pushed the power button). Are there still issues with the uboot
integration? Or am I just doing something wrong?

thanks
-john



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread John Rigby
Nicolas,

Thanks for the info.  I'll wait to see more patches/testing from Shawn
before pulling.

John

On Mon, Oct 18, 2010 at 8:50 AM, Nicolas Pitre  wrote:
> On Mon, 18 Oct 2010, John Rigby wrote:
>
>> Shawn,
>>
>> So does git://git.linaro.org/kernel/linux-linaro-2.6.35.git have
>> everything you want in the linaro packaged kernel?
>
> I don't think so.  Seems that the device registration for Babbage is
> missing, as well as a quirk for the timeout problem.  However I'd prefer
> if someone has a set of only those missing and _tested_ patches
> somewhere that I could apply instead of me second guessing what's needed
> without being able to test the result myself.
>
>
> Nicolas
>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Nicolas Pitre
On Mon, 18 Oct 2010, John Rigby wrote:

> Shawn,
> 
> So does git://git.linaro.org/kernel/linux-linaro-2.6.35.git have
> everything you want in the linaro packaged kernel?

I don't think so.  Seems that the device registration for Babbage is 
missing, as well as a quirk for the timeout problem.  However I'd prefer 
if someone has a set of only those missing and _tested_ patches 
somewhere that I could apply instead of me second guessing what's needed 
without being able to test the result myself.


Nicolas

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread John Rigby
Shawn,

So does git://git.linaro.org/kernel/linux-linaro-2.6.35.git have
everything you want in the linaro packaged kernel?  Can you tell me
what CONFIGs need to be turned on?

Thanks,
John

On Mon, Oct 18, 2010 at 4:58 AM, Shawn Guo  wrote:
> Here you go.  I'm using Linaro tree below.
>
> git://git.linaro.org/kernel/linux-linaro-2.6.35.git
>
> Also make sure you have the change below for /bin/auto-serial-console.
>
> line #15 of auto-serial-console: tty[A-Z]* )    -->  tty[a-zA-Z]* )
>
>
>
> On Mon, Oct 18, 2010 at 6:42 PM, Eric Bénard  wrote:
>> Hi Shawn,
>>
>> Le 18/10/2010 11:46, Shawn Guo a écrit :
>>>
>>> Yes, it's working.  And I can get into Linaro console now.  So we need
>>> the following bits to get it work.
>>>
>>> - Wolfram's esdhc driver (merged)
>>> - SDHCI_QUIRK_BROKEN_TIMEOUT_VAL patch
>>> - Babbage registration patch (based on Eric's bits)
>>> - Related kernel configurations
>>>
>> may you please send me your .config and the link to the git tree your are
>> using for your kernel ?
>> I don't manage to boot the Linaro headless rootfs on my board (ureadahead
>> crash then nothing more on the console) and now I've started to play with
>> that I so want to get the login :-D and I think I may be missing a kernel
>> option but which one ?
>>
>> Kernel : 2.6.37-rc7 + i.MX patches
>> Command line : console=ttymxc0,115200 root=/dev/mmcblk0p3 rootfstype=ext3
>> ip=off rootwait rw
>>
>> Thanks,
>> Eric
>>
>
>
>
> --
> Regards,
> Shawn
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Eric Bénard

Le 18/10/2010 12:58, Shawn Guo a écrit :

Here you go.  I'm using Linaro tree below.

git://git.linaro.org/kernel/linux-linaro-2.6.35.git

Also make sure you have the change below for /bin/auto-serial-console.

line #15 of auto-serial-console: tty[A-Z]* )-->   tty[a-zA-Z]* )


Thanks. Now it's booting fine on my board (using 2.6.36-rc7 + mmc & imx 
patches).
The error was that I wasn't using the uInitrd which seems to be absolutely 
necessary to prepare the rootfs to boot.


Eric

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Shawn Guo
Here you go.  I'm using Linaro tree below.

git://git.linaro.org/kernel/linux-linaro-2.6.35.git

Also make sure you have the change below for /bin/auto-serial-console.

line #15 of auto-serial-console: tty[A-Z]* )-->  tty[a-zA-Z]* )



On Mon, Oct 18, 2010 at 6:42 PM, Eric Bénard  wrote:
> Hi Shawn,
>
> Le 18/10/2010 11:46, Shawn Guo a écrit :
>>
>> Yes, it's working.  And I can get into Linaro console now.  So we need
>> the following bits to get it work.
>>
>> - Wolfram's esdhc driver (merged)
>> - SDHCI_QUIRK_BROKEN_TIMEOUT_VAL patch
>> - Babbage registration patch (based on Eric's bits)
>> - Related kernel configurations
>>
> may you please send me your .config and the link to the git tree your are
> using for your kernel ?
> I don't manage to boot the Linaro headless rootfs on my board (ureadahead
> crash then nothing more on the console) and now I've started to play with
> that I so want to get the login :-D and I think I may be missing a kernel
> option but which one ?
>
> Kernel : 2.6.37-rc7 + i.MX patches
> Command line : console=ttymxc0,115200 root=/dev/mmcblk0p3 rootfstype=ext3
> ip=off rootwait rw
>
> Thanks,
> Eric
>



-- 
Regards,
Shawn


.config
Description: Binary data
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Eric Bénard

Hi Shawn,

Le 18/10/2010 11:46, Shawn Guo a écrit :

Yes, it's working.  And I can get into Linaro console now.  So we need
the following bits to get it work.

- Wolfram's esdhc driver (merged)
- SDHCI_QUIRK_BROKEN_TIMEOUT_VAL patch
- Babbage registration patch (based on Eric's bits)
- Related kernel configurations

may you please send me your .config and the link to the git tree your are 
using for your kernel ?
I don't manage to boot the Linaro headless rootfs on my board (ureadahead 
crash then nothing more on the console) and now I've started to play with that 
I so want to get the login :-D and I think I may be missing a kernel option 
but which one ?


Kernel : 2.6.37-rc7 + i.MX patches
Command line : console=ttymxc0,115200 root=/dev/mmcblk0p3 rootfstype=ext3 
ip=off rootwait rw


Thanks,
Eric

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Shawn Guo
On Mon, Oct 18, 2010 at 5:34 PM, Eric Bénard  wrote:
> I just tested a linaro rootfs on SDCard (we have a nand flash so until now
> we had our rootfs on it) and got the same errors as you.
> As suggested by Richard, SDHCI_QUIRK_BROKEN_TIMEOUT_VAL seems to fix the
> problem, so can you try the following patch ?
>
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 2e9cca1..e8f7048 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -134,7 +134,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
>
>  struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
>        .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
> -                       | SDHCI_QUIRK_BROKEN_ADMA,
> +                       | SDHCI_QUIRK_BROKEN_ADMA
> +                       | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
>        /* ADMA has issues. Might be fixable */
>        /* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
>        .ops = &sdhci_esdhc_ops,
>
Yes, it's working.  And I can get into Linaro console now.  So we need
the following bits to get it work.

- Wolfram's esdhc driver (merged)
- SDHCI_QUIRK_BROKEN_TIMEOUT_VAL patch
- Babbage registration patch (based on Eric's bits)
- Related kernel configurations


-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Eric Bénard

Hi Shawn,

Le 18/10/2010 10:10, Shawn Guo a écrit :

But when I try to login console, it gives a bunch of error messages like below.

mmcblk0: error -110 transferring data, sector 1737392, nr 2, card status 0xe00
end_request: I/O error, dev mmcblk0, sector 1737392
mmcblk0: error -84 transferring data, sector 1737394, nr 8, card status 0x900
end_request: I/O error, dev mmcblk0, sector 1737394
mmcblk0: error -84 transferring data, sector 1737402, nr 8, card status 0x900
end_request: I/O error, dev mmcblk0, sector 1737402
..

As you have tested Wolfram's bits on i.MX51 (eukrea?), probably my
babbage registration bit is causing problem.  Could you please help
have a review to see if anything incorrect?

I just tested a linaro rootfs on SDCard (we have a nand flash so until now we 
had our rootfs on it) and got the same errors as you.
As suggested by Richard, SDHCI_QUIRK_BROKEN_TIMEOUT_VAL seems to fix the 
problem, so can you try the following patch ?


BTW, concerning Linaro's rootfs, I didn't managed to get a login prompt on the 
serial port because of udev problems certainly because I'm missing options in 
the kernel configuration, but at least I don't have anymore mmc error messages.


Eric

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c 
b/drivers/mmc/host/sdhci-esdhc-imx.c

index 2e9cca1..e8f7048 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -134,7 +134,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {

 struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
-   | SDHCI_QUIRK_BROKEN_ADMA,
+   | SDHCI_QUIRK_BROKEN_ADMA
+   | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
/* ADMA has issues. Might be fixable */
/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
.ops = &sdhci_esdhc_ops,



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Shawn Guo
On Tue, Oct 12, 2010 at 11:59 AM, Shawn Guo  wrote:
> I applied the patches on linux-linaro-2.6.35, and can mount the rootfs on mmc.
>

I'm sorry.  This is a mis-communication.  To clarify it, I tested Zhu
Richard's bits other than Wolfram's at that time.  As you have seen,
I'm running into some problem with Wolfram's mmc driver plus my
registration bits.



> On Tue, Oct 12, 2010 at 11:48 AM, Nicolas Pitre
>  wrote:
>>
>> Looks like discussion is still happening on the mmc mailing list wrt
>> those patches.  How pressing is it to have them merged?  I'd like to
>> pick up the final patch versions if possible.
>>
>> Also I'd much prefer if someone could test those patches when applied to
>> the linaro stable tree before actually merging them officially.  Did
>> someone test them already?
>>
>> On Mon, 11 Oct 2010, John Rigby wrote:
>>
>>> This sounds ok to me.
>>>
>>> Nico, let me know when this is in your stable tree.
>>>
>>> Thanks,
>>> John
>>>
>>> On Mon, Oct 11, 2010 at 8:37 AM, Amit Kucheria  
>>> wrote:
>>> > Can we merge the SD/MMC patches for i.MX MMC support into the linaro 
>>> > kernel?
>>> > They have been reviewed extensively and look very likely to go into the 
>>> > next
>>> > merge window.
>>> >
>>> > Merging them and enabling SD support for i.MX51 will allow us to make a 
>>> > more
>>> > functional hwpack for the babbage boards.
>>> >
>>> > Please search for "SD/MMC driver for MX25/35/51" from Wolfram Sang on 
>>> > lakml
>>> > for the patchset.
>>> >
>>> > Regards,
>>> > Amit
>>> >




-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-18 Thread Shawn Guo
Correct Richard address ...

On Mon, Oct 18, 2010 at 4:10 PM, Shawn Guo  wrote:
> Hi Eric,
>
> Thanks for the links.  I was following the patches to add the babbage
> registration specific bits (see patch below).  I can see following mmc
> related boot log showing the card is initialized and recognized.
>
> sdhci: Copyright(c) Pierre Ossman
> mmc0: SDHCI controller on platform [sdhci-esdhc-imx.0] using DMA
> mmc1: SDHCI controller on platform [sdhci-esdhc-imx.1] using DMA
> ..
> Waiting for root device /dev/mmcblk0p3...
> mmc0: new high speed SD card at address fb74
> blk_queue_max_hw_sectors: set to minimum 8
> mmcblk0: mmc0:fb74 SD02G 1.83 GiB
>  mmcblk0: p1 p2 p3
> ..
>
> But when I try to login console, it gives a bunch of error messages like 
> below.
>
> mmcblk0: error -110 transferring data, sector 1737392, nr 2, card status 0xe00
> end_request: I/O error, dev mmcblk0, sector 1737392
> mmcblk0: error -84 transferring data, sector 1737394, nr 8, card status 0x900
> end_request: I/O error, dev mmcblk0, sector 1737394
> mmcblk0: error -84 transferring data, sector 1737402, nr 8, card status 0x900
> end_request: I/O error, dev mmcblk0, sector 1737402
> ..
>
> As you have tested Wolfram's bits on i.MX51 (eukrea?), probably my
> babbage registration bit is causing problem.  Could you please help
> have a review to see if anything incorrect?
>
>
> On Mon, Oct 18, 2010 at 1:04 AM, Eric Bénard  wrote:
>> Hi Shawn,
>>
>> Le 17/10/2010 17:27, Shawn Guo a écrit :
>>>
>>> Thanks for the merging.  But the bits for babbage mmc resources and
>>> driver registration are missing.  I'm trying to add them for getting a
>>> bootable mmc linaro image, but running into some problem right now.
>>> Will continue digging tomorrow.
>>>
>> you can find a working example here :
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028846.html
>>
>> before, you will need this patch serie :
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028826.html
>> and this patch :
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028855.html
>>
>> Eric
>>
>
>
> From 511b5ec7aaeb8c15b6613b9ff68e967998e6c37a Mon Sep 17 00:00:00 2001
> From: Shawn Guo 
> Date: Sun, 17 Oct 2010 22:31:34 +0800
> Subject: [PATCH] Add resource and registeration for wsa mmc driver
>
> Signed-off-by: Shawn Guo 
> ---
>  arch/arm/mach-mx5/Kconfig                       |    1 +
>  arch/arm/mach-mx5/board-mx51_babbage.c          |   20 ++
>  arch/arm/mach-mx5/clock-mx51.c                  |  268 
> +++
>  arch/arm/mach-mx5/devices-imx51.h               |   17 ++
>  arch/arm/plat-mxc/devices/Kconfig               |    3 +
>  arch/arm/plat-mxc/devices/Makefile              |    1 +
>  arch/arm/plat-mxc/devices/platform-esdhc.c      |   71 ++
>  arch/arm/plat-mxc/include/mach/devices-common.h |   10 +
>  arch/arm/plat-mxc/include/mach/esdhc.h          |   16 ++
>  arch/arm/plat-mxc/include/mach/iomux-mx51.h     |   39 +++-
>  arch/arm/plat-mxc/include/mach/mx51.h           |   16 +-
>  11 files changed, 351 insertions(+), 111 deletions(-)
>  create mode 100644 arch/arm/mach-mx5/devices-imx51.h
>  create mode 100644 arch/arm/plat-mxc/devices/platform-esdhc.c
>  create mode 100644 arch/arm/plat-mxc/include/mach/esdhc.h
>
> diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
> index 0848db5..a263666 100644
> --- a/arch/arm/mach-mx5/Kconfig
> +++ b/arch/arm/mach-mx5/Kconfig
> @@ -10,6 +10,7 @@ comment "MX5 platforms:"
>
>  config MACH_MX51_BABBAGE
>        bool "Support MX51 BABBAGE platforms"
> +       select IMX_HAVE_PLATFORM_ESDHC
>        help
>          Include support for MX51 Babbage platform, also known as MX51EVK in
>          u-boot. This includes specific configurations for the board and its
> diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c
> b/arch/arm/mach-mx5/board-mx51_babbage.c
> index 6e384d9..476bfe4 100644
> --- a/arch/arm/mach-mx5/board-mx51_babbage.c
> +++ b/arch/arm/mach-mx5/board-mx51_babbage.c
> @@ -31,6 +31,7 @@
>  #include 
>  #include 
>
> +#include "devices-imx51.h"
>  #include "devices.h"
>
>  #define BABBAGE_USB_HUB_RESET  (0*32 + 7)      /* GPIO_1_7 */
> @@ -93,6 +94,22 @@ static struct pad_desc mx51babbage_pads[] = {
>
>        /* USB HUB reset line*/
>        MX51_PAD_GPIO_1_7__GPIO_1_7,
> +
> +       /* SD 1 */
> +       MX51_PAD_SD1_CMD__SD1_CMD,
> +       MX51_PAD_SD1_CLK__SD1_CLK,
> +       MX51_PAD_SD1_DATA0__SD1_DATA0,
> +       MX51_PAD_SD1_DATA1__SD1_DATA1,
> +       MX51_PAD_SD1_DATA2__SD1_DATA2,
> +       MX51_PAD_SD1_DATA3__SD1_DATA3,
> +
> +       /* SD 2 */
> +       MX51_PAD_SD2_CMD__SD2_CMD,
> +       MX51_PAD_SD2_CLK__SD2_CLK,
> +       MX51_PAD_SD2_DATA0__SD2_DATA0,
> +       MX51_PAD_SD2_DATA1__SD2_DATA1,
> +       MX51_PAD_SD2_DATA2__SD2_DATA2,
> +       MX51_PAD_SD2_DATA3__SD2_DATA3,
>  };
>
>  /* Serial ports */
> @@ -268,6 +285,9 @@ static void __init mxc_board_init(void)
>        /* setback USBH1_STP to be func

Re: SD/MMC for i.MX51

2010-10-18 Thread Shawn Guo
Hi Eric,

Thanks for the links.  I was following the patches to add the babbage
registration specific bits (see patch below).  I can see following mmc
related boot log showing the card is initialized and recognized.

sdhci: Copyright(c) Pierre Ossman
mmc0: SDHCI controller on platform [sdhci-esdhc-imx.0] using DMA
mmc1: SDHCI controller on platform [sdhci-esdhc-imx.1] using DMA
..
Waiting for root device /dev/mmcblk0p3...
mmc0: new high speed SD card at address fb74
blk_queue_max_hw_sectors: set to minimum 8
mmcblk0: mmc0:fb74 SD02G 1.83 GiB
 mmcblk0: p1 p2 p3
..

But when I try to login console, it gives a bunch of error messages like below.

mmcblk0: error -110 transferring data, sector 1737392, nr 2, card status 0xe00
end_request: I/O error, dev mmcblk0, sector 1737392
mmcblk0: error -84 transferring data, sector 1737394, nr 8, card status 0x900
end_request: I/O error, dev mmcblk0, sector 1737394
mmcblk0: error -84 transferring data, sector 1737402, nr 8, card status 0x900
end_request: I/O error, dev mmcblk0, sector 1737402
..

As you have tested Wolfram's bits on i.MX51 (eukrea?), probably my
babbage registration bit is causing problem.  Could you please help
have a review to see if anything incorrect?


On Mon, Oct 18, 2010 at 1:04 AM, Eric Bénard  wrote:
> Hi Shawn,
>
> Le 17/10/2010 17:27, Shawn Guo a écrit :
>>
>> Thanks for the merging.  But the bits for babbage mmc resources and
>> driver registration are missing.  I'm trying to add them for getting a
>> bootable mmc linaro image, but running into some problem right now.
>> Will continue digging tomorrow.
>>
> you can find a working example here :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028846.html
>
> before, you will need this patch serie :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028826.html
> and this patch :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028855.html
>
> Eric
>


>From 511b5ec7aaeb8c15b6613b9ff68e967998e6c37a Mon Sep 17 00:00:00 2001
From: Shawn Guo 
Date: Sun, 17 Oct 2010 22:31:34 +0800
Subject: [PATCH] Add resource and registeration for wsa mmc driver

Signed-off-by: Shawn Guo 
---
 arch/arm/mach-mx5/Kconfig   |1 +
 arch/arm/mach-mx5/board-mx51_babbage.c  |   20 ++
 arch/arm/mach-mx5/clock-mx51.c  |  268 +++
 arch/arm/mach-mx5/devices-imx51.h   |   17 ++
 arch/arm/plat-mxc/devices/Kconfig   |3 +
 arch/arm/plat-mxc/devices/Makefile  |1 +
 arch/arm/plat-mxc/devices/platform-esdhc.c  |   71 ++
 arch/arm/plat-mxc/include/mach/devices-common.h |   10 +
 arch/arm/plat-mxc/include/mach/esdhc.h  |   16 ++
 arch/arm/plat-mxc/include/mach/iomux-mx51.h |   39 +++-
 arch/arm/plat-mxc/include/mach/mx51.h   |   16 +-
 11 files changed, 351 insertions(+), 111 deletions(-)
 create mode 100644 arch/arm/mach-mx5/devices-imx51.h
 create mode 100644 arch/arm/plat-mxc/devices/platform-esdhc.c
 create mode 100644 arch/arm/plat-mxc/include/mach/esdhc.h

diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 0848db5..a263666 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -10,6 +10,7 @@ comment "MX5 platforms:"

 config MACH_MX51_BABBAGE
bool "Support MX51 BABBAGE platforms"
+   select IMX_HAVE_PLATFORM_ESDHC
help
  Include support for MX51 Babbage platform, also known as MX51EVK in
  u-boot. This includes specific configurations for the board and its
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c
b/arch/arm/mach-mx5/board-mx51_babbage.c
index 6e384d9..476bfe4 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -31,6 +31,7 @@
 #include 
 #include 

+#include "devices-imx51.h"
 #include "devices.h"

 #define BABBAGE_USB_HUB_RESET  (0*32 + 7)  /* GPIO_1_7 */
@@ -93,6 +94,22 @@ static struct pad_desc mx51babbage_pads[] = {

/* USB HUB reset line*/
MX51_PAD_GPIO_1_7__GPIO_1_7,
+
+   /* SD 1 */
+   MX51_PAD_SD1_CMD__SD1_CMD,
+   MX51_PAD_SD1_CLK__SD1_CLK,
+   MX51_PAD_SD1_DATA0__SD1_DATA0,
+   MX51_PAD_SD1_DATA1__SD1_DATA1,
+   MX51_PAD_SD1_DATA2__SD1_DATA2,
+   MX51_PAD_SD1_DATA3__SD1_DATA3,
+
+   /* SD 2 */
+   MX51_PAD_SD2_CMD__SD2_CMD,
+   MX51_PAD_SD2_CLK__SD2_CLK,
+   MX51_PAD_SD2_DATA0__SD2_DATA0,
+   MX51_PAD_SD2_DATA1__SD2_DATA1,
+   MX51_PAD_SD2_DATA2__SD2_DATA2,
+   MX51_PAD_SD2_DATA3__SD2_DATA3,
 };

 /* Serial ports */
@@ -268,6 +285,9 @@ static void __init mxc_board_init(void)
/* setback USBH1_STP to be function */
mxc_iomux_v3_setup_pad(&usbh1stp);
babbage_usbhub_reset();
+
+   imx51_add_esdhc(0, NULL);
+   imx51_add_esdhc(1, NULL);
 }

 static void __init mx51_babbage_timer_init(void)
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c
index 57c10a9

Re: SD/MMC for i.MX51

2010-10-17 Thread Eric Bénard

Hi Shawn,

Le 17/10/2010 17:27, Shawn Guo a écrit :

Thanks for the merging.  But the bits for babbage mmc resources and
driver registration are missing.  I'm trying to add them for getting a
bootable mmc linaro image, but running into some problem right now.
Will continue digging tomorrow.


you can find a working example here :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028846.html

before, you will need this patch serie :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028826.html
and this patch :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/028855.html

Eric

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-17 Thread Nicolas Pitre
On Sun, 17 Oct 2010, Shawn Guo wrote:

> Hi Nicolas,
> 
> Thanks for the merging.  But the bits for babbage mmc resources and
> driver registration are missing.  I'm trying to add them for getting a
> bootable mmc linaro image, but running into some problem right now.
> Will continue digging tomorrow.

OK thanks.  I'm definitely interested in your progress.


Nicolas

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-17 Thread Shawn Guo
Hi Nicolas,

Thanks for the merging.  But the bits for babbage mmc resources and
driver registration are missing.  I'm trying to add them for getting a
bootable mmc linaro image, but running into some problem right now.
Will continue digging tomorrow.

On Sat, Oct 16, 2010 at 10:35 AM, Nicolas Pitre
 wrote:
> On Tue, 12 Oct 2010, Amit Kucheria wrote:
>
>> Nico,
>>
>> Yes it has been reviewed several times now. So I'm hopeful it'll go in
>> for the next merge window.
>
> It will.  They're merged in cjb's tree now.  And I've picked them up,
> plus a few others.
>
> Compile tested only as I don't have the hardware.
>
>
> Nicolas
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>


-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-15 Thread Nicolas Pitre
On Tue, 12 Oct 2010, Amit Kucheria wrote:

> Nico,
> 
> Yes it has been reviewed several times now. So I'm hopeful it'll go in
> for the next merge window.

It will.  They're merged in cjb's tree now.  And I've picked them up, 
plus a few others.

Compile tested only as I don't have the hardware.


Nicolas

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-12 Thread Amit Kucheria
Nico,

Yes it has been reviewed several times now. So I'm hopeful it'll go in
for the next merge window.

Without it, linaro-media-create can't work since we don't support
anything except SD boot for now.

/Amit

On Tue, Oct 12, 2010 at 6:48 AM, Nicolas Pitre  wrote:
>
> Looks like discussion is still happening on the mmc mailing list wrt
> those patches.  How pressing is it to have them merged?  I'd like to
> pick up the final patch versions if possible.
>
> Also I'd much prefer if someone could test those patches when applied to
> the linaro stable tree before actually merging them officially.  Did
> someone test them already?
>
> On Mon, 11 Oct 2010, John Rigby wrote:
>
>> This sounds ok to me.
>>
>> Nico, let me know when this is in your stable tree.
>>
>> Thanks,
>> John

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-11 Thread Shawn Guo
I applied the patches on linux-linaro-2.6.35, and can mount the rootfs on mmc.

On Tue, Oct 12, 2010 at 11:48 AM, Nicolas Pitre
 wrote:
>
> Looks like discussion is still happening on the mmc mailing list wrt
> those patches.  How pressing is it to have them merged?  I'd like to
> pick up the final patch versions if possible.
>
> Also I'd much prefer if someone could test those patches when applied to
> the linaro stable tree before actually merging them officially.  Did
> someone test them already?
>
> On Mon, 11 Oct 2010, John Rigby wrote:
>
>> This sounds ok to me.
>>
>> Nico, let me know when this is in your stable tree.
>>
>> Thanks,
>> John
>>
>> On Mon, Oct 11, 2010 at 8:37 AM, Amit Kucheria  
>> wrote:
>> > Can we merge the SD/MMC patches for i.MX MMC support into the linaro 
>> > kernel?
>> > They have been reviewed extensively and look very likely to go into the 
>> > next
>> > merge window.
>> >
>> > Merging them and enabling SD support for i.MX51 will allow us to make a 
>> > more
>> > functional hwpack for the babbage boards.
>> >
>> > Please search for "SD/MMC driver for MX25/35/51" from Wolfram Sang on lakml
>> > for the patchset.
>> >
>> > Regards,
>> > Amit
>> >
>> >
>> > ___
>> > linaro-dev mailing list
>> > linaro-dev@lists.linaro.org
>> > http://lists.linaro.org/mailman/listinfo/linaro-dev
>> >
>>
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>



-- 
Regards,
Shawn

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-11 Thread Nicolas Pitre

Looks like discussion is still happening on the mmc mailing list wrt 
those patches.  How pressing is it to have them merged?  I'd like to 
pick up the final patch versions if possible.

Also I'd much prefer if someone could test those patches when applied to 
the linaro stable tree before actually merging them officially.  Did 
someone test them already?

On Mon, 11 Oct 2010, John Rigby wrote:

> This sounds ok to me.
> 
> Nico, let me know when this is in your stable tree.
> 
> Thanks,
> John
> 
> On Mon, Oct 11, 2010 at 8:37 AM, Amit Kucheria  
> wrote:
> > Can we merge the SD/MMC patches for i.MX MMC support into the linaro kernel?
> > They have been reviewed extensively and look very likely to go into the next
> > merge window.
> >
> > Merging them and enabling SD support for i.MX51 will allow us to make a more
> > functional hwpack for the babbage boards.
> >
> > Please search for "SD/MMC driver for MX25/35/51" from Wolfram Sang on lakml
> > for the patchset.
> >
> > Regards,
> > Amit
> >
> >
> > ___
> > linaro-dev mailing list
> > linaro-dev@lists.linaro.org
> > http://lists.linaro.org/mailman/listinfo/linaro-dev
> >
> 

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: SD/MMC for i.MX51

2010-10-11 Thread John Rigby
This sounds ok to me.

Nico, let me know when this is in your stable tree.

Thanks,
John

On Mon, Oct 11, 2010 at 8:37 AM, Amit Kucheria  wrote:
> Can we merge the SD/MMC patches for i.MX MMC support into the linaro kernel?
> They have been reviewed extensively and look very likely to go into the next
> merge window.
>
> Merging them and enabling SD support for i.MX51 will allow us to make a more
> functional hwpack for the babbage boards.
>
> Please search for "SD/MMC driver for MX25/35/51" from Wolfram Sang on lakml
> for the patchset.
>
> Regards,
> Amit
>
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev