2.4.27 SD/MMC/DataFlash access?

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

awm129
Location: Herndon, VA
Posts: 6
Joined: Tue Aug 09, 2005 3:06 pm

2.4.27 SD/MMC/DataFlash access?

Tue Aug 09, 2005 3:17 pm

Does the 2.4.27 release already include the MMC driver that was released for 2.4.26?

I'm having problems accessing these cards with the 2.4.27 kernel as released by Atmel. On boot, linux seems to detect a card and its dev entry is spi0. I also see card-like entries under /dev/mtd and /dev/mtdblock. However I can't mount any of these; the entries under /dev/spi0 and /dev/mtd are character devices and I get 'permission denied' when I try to mount anything under /dev/mtdblock. Any ideas what I am doing wrong? I'm using DataFlash cards at the moment but I intend to go to SD.

Also, cards are only ever detected at boot time in the J200 slot, why can't we use the J17 slot on the at91rm9200-ek?

Thanks in advance

/andy
User avatar
Fredo_Boyer
Contact:
Location: ATMEL Rousset FRANCE
Posts: 142
Joined: Mon Mar 22, 2004 12:29 pm

Wed Aug 10, 2005 11:33 am

Dataflash driver is a char based driver so it is normal that you can't mount it as a block device

Block device concerns MMC and SDCard but it is not the same driver !
MMC and SDCard are accessed through the MCI and not the SPI driver
awm129
Location: Herndon, VA
Posts: 6
Joined: Tue Aug 09, 2005 3:06 pm

Wed Aug 10, 2005 4:35 pm

ah, so i need a MCI driver?

The SD Specification states that SD uses the SPI bus so I was assuming I could use the SPI driver.

I'm assuming Atmel does not include the MCI driver in its "stock" release of 2.4.27. All posts I've seen describe how to get SD working with 2.4.26, is the proceedure the same for 2.4.27 (download and apply patches, hack some mci files, etc..)? Or is SD functionallity already built in someplace and I'm just not seeing it (MCI doesn't seem to exist in the "stock" kernel config menus). Thanks!
/andy
User avatar
Fredo_Boyer
Contact:
Location: ATMEL Rousset FRANCE
Posts: 142
Joined: Mon Mar 22, 2004 12:29 pm

Wed Aug 10, 2005 4:46 pm

The MCI does not support SPI protocol, it only supports MMC/SD protocol
So the SPI driver does not fit for a SDCard use.

A MCI driver is available in the patch you refer indeed. It is not included in the "stock" release of 2.4.27

Bye
awm129
Location: Herndon, VA
Posts: 6
Joined: Tue Aug 09, 2005 3:06 pm

Wed Aug 10, 2005 9:44 pm

still trying to get SD/MMC access...

I patched the stock kernel with http://maxim.org.za/AT91RM9200/mmc.patch.gz.
Do I need to apply more patches? If so, which ones? (I'm new to this embedded linux stuff...)

The kernel compiles and runs. The MMC driver run at boot but fails to recognize any SD cards. I've tried booting with an SD card in the J200 and J17 slots. Any other ideas? Thanks.
/andy
User avatar
Fredo_Boyer
Contact:
Location: ATMEL Rousset FRANCE
Posts: 142
Joined: Mon Mar 22, 2004 12:29 pm

Thu Aug 11, 2005 8:50 am

This patch concerns just MMC cards and is not stable enough. It does not support SDCard.

I think the best way is to use kernel linux 2.6 which has a real MCI driver for MMC and I think there is some stuff actually for SDCard.
SDCard support is not more difficult to implement when MMC is working (just a different inittialization)

Hope this help
User avatar
Fredo_Boyer
Contact:
Location: ATMEL Rousset FRANCE
Posts: 142
Joined: Mon Mar 22, 2004 12:29 pm

Thu Aug 11, 2005 10:33 am

A SDCard patch exists for Linux 2.6.12, I have found it on the linux arm mailing list: it was made by eric benard: ebenard@free.fr if you are interested

Bye

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests