hi i need some help about FAT16 implement on sd

Pavel Pisa ppisa4lists at pikron.com
Wed Feb 9 19:55:20 UTC 2005


On Wednesday 09 February 2005 16:18, Victor V. Vengerov wrote:
> Khalil,
>
> You'll need to integrate the SD block device driver, similar to
> c/src/libchip/ide/ata.c, into RTEMS. This driver is not exists now. One
> of the problem about this is that Secure Digital specification is closed
> (you have to purchase it), and it is not clean enough how it can be used
> with open source projects. From other side, some SD card manufacturers
> provides detailed data sheets for their parts enough to implement driver
> which will work with this specific part and, may be, with some other parts.
>
> Regards,
> Victor
>
> Joel Sherrill <joel at OARcorp.com> wrote:
> > Subscribe to the users list and ask away. :)
> >
> > I cc'ed the user's list .
> >
> > khalil saedi wrote:
> >> hi
> >> dear joel
> >> i am khalil saedi from kish university in iran.we have some problem
> >> in implement Fat16 on
> >> SD .can you me about that
> >> tanks .
> >> (sorry for bad engelish type)

Hello all,

the next information is from my e-mail to the 
linux-arm-kernel at lists.arm.linux.org.uk.

Excuse me for cross-posting of this information there.

I have found more completely open and public documents,
which describe most of SD communication protocol
and command/responses format.

MC9328MX1RM/D Rev. 4.0, 11/2003 
MC9328MX1 i.MX Integrated Portable System Processor Reference Manual
http://www.freescale.com/files/32bit/doc/ref_manual/MC9328MX1RM.pdf
Chapter 20 Multimedia Card/Secure Digital Host Controller Module (MMC/SD)

This roughly describes wire protocol and completely describes
command/response formats for MMC and SD. It describes even
password locking and unlocking of SD. This document is free
to download more than two years already.

SanDisk Secure Digital Card Product Manual Version 1.9
Document No. 80-13-00169 December 2003
http://www.sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf

This document seems to offer most important parts of SecureDigital
specification.

There are some other pointers for SD card documentation

http://www.open-research.org.uk/ARMuC/index.cgi?action=browse&diff=1&id=SD_Card

I am in desperate need of SD support for MC9328MX1 board.
I would be extremely happy to see that code in vanilla kernel in future.
I need even more to have working MMC/SD code for MC9328MX1 ported
to the RTEMS system at this moment. I have looked into Hanhelds.org
CVS repository some time ago, but I did not realize, that their 
2.6.x MMC version contains SD support. I have looked at
  http://handhelds.org/cgi-bin/cvsweb.cgi/linux/kernel26/drivers/mmc/
Is it correct place for latest SD patches?
I have tested 2.6.8.1 with Pengutronix patches, it seems to recognize
SD cards on our board, but doesnot be able to read data from the card.
It reports some "bad: scheduling while atomic!\n". It sems to be able
to switch SD into 4-bit mode.
  http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-August/023846.html

I have tested 2.6.10 with Pengutronix patches to compile.
This kernel does not even recognize cards. It reports cards insert/removal,
but identification is not read. I have tested u-boor-1.1.1 with MX1 patches
and it seems to recognize 16MiB and 1GiB SD card and is able to read
raw data from it. It doesnot be able to map and read FAT filesystem
stored on the SD partition, but is is probably problem unrelated
to MMC/SD support. I have 256MiB card as well, it has been recognized
under 2.6.8.1 kernel, but not by u-boot-1.1.1.

I have received informal permission to use Pengutronix code 
as base of MMC/SD implementation for RTEMS.

Their Linux i.MX patches with SD code are there
  http://www.pengutronix.de/software/linux-i.MX/download/v2.6/
    linux-2.6.10-imx1

There exist even u-boot-1.1.1 port of the patches, which seems
to work for me
  http://www.pengutronix.de/software/u-boot/
    u-boot-1.1.1-imx1.diff

I have problem, that I have so much other disturbing requests
and problems to solve now, that I cannot fully concentrate
on this project, but I have to find time for that soon.
Any co-operation highly welcomed.

Best wishes

                Pavel Pisa
        e-mail: pisa at cmp.felk.cvut.cz
        www:    http://cmp.felk.cvut.cz/~pisa
        work:   http://www.pikron.com
                

==================================================
 PiKRON s.r.o.       Phone: +420 2 96781671
 Kankovskeho 1235    Phone/Fax:   +420 2 84684676
 182 00 Praha 8      WWW:   http://www.pikron.com/
 Czech Republic      e-mail:  ppisa4lists at pikron.com
==================================================



More information about the users mailing list