[ECOS] Re: SDHC support. [Was Re: AW: [ECOS] Fwd: New features required on Cortex-M platform]

Ilija Kocho ilijak@siva.com.mk
Mon Jun 16 06:23:00 GMT 2014


Jerzy

Thank you for  your analysis.
I guess, that Mike follows the list, but anyway I'm adding him as an
initiator of this SDHC port.


On 15.06.2014 00:47, Jerzy Dyrda wrote:
> Hello Ilija,
>
> 2014-06-13 20:54 GMT+02:00 Ilija Kocho <ilijak@siva.com.mk>:
>> 3) SD bus support. I know that I can use SD card in SPI mode but on some
>>>> board like STM32F4DISCOVERY SD card i only available on SD bus.
>>>> It's high time to add this miss part of system.
>>> - SD card interface. Unfortunately this is very processor specific. Each
>>> Microcontroller has its own IP for accessing SD card.
>>> But only low level SD bus driver. Upper layer for MMC/SD card is common.
>> This is MMC/SD disk driver for Freescale Kinetis and iMX.
>> https://sourceforge.net/projects/ecosfreescale/files/devs/SDHC/
>> Upper layer (based on SPI MMC driver) and HW dependent (Freescale) parts
>> are placed in separate packages.
>>
>> Jerzy, can you see if STM support can be added?
> After first look I seems that yes.
> IMHO it's required some code re-factoring i.e. :
> 1) CYGPKG_DEVS_DISK_MMC_SDHC should be pushed into CYGPKG_DEVS_DISK_MMC
> package as a component similar to CYGPKG_DEVS_DISK_MMC_SPI component.
> 2) Using Freescale middle layer (sdhc.c) from platform specific
> package and pushing it to generic
> part. The aim of this layer is support for SDHC transaction what is generic.

It seems pretty generic indeed, only it has some references to
usdhc_host.c. We could/should make some abstraction either simple
(MACROS) or callback table (may require middle-level io driver).

Can anybody comment on this?


> 3) And we should provide low level platform specific driver for SD bus
> not as Freescale in
> /devs/disk/mmc/sdhc/ but create new place /devs/sd/cortexm/stm similar
> to /devs/spi/cortexm/stm

Once 2) is defined, this should be straight-forward.

> with simliar functionality i.e. xfer function supporting poling and DMA mode.
> 4) Regarding license most of code in platform specific part is a Freescale code.
> Can we use it?

IANAL, but IMO yes as long as we regard licence terms. The Freescale
code is published under BSD licence that is one of eligible licences for
third party products regarding eCos (Ref:
http://ecos.sourceware.org/contrib.html).

Any additional comments?

Ilija

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list