Skip to contentSkip to conversation

fsl_esdhc.c: eMMC 4.4 support?

U-Boot Dirk Behme 3 participants 4 messages Feb 23, 2012 – Feb 24, 2012

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

With the two commits

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=1bc5e5f2cee211a74ee79e0eb5f7f37a3db387f4

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=82102d3fdeae0dcd79d9b3ab7daa96bebd5ad290

the old Freescale U-Boot has eMMC 4.4 support.

Our mainline drivers/mmc/fsl_esdhc.c doesn't seem to support this.

Does anybody work on porting this to the mainline fsl_esdhc.c? Or any other pointers which might help?

Unfortunately, Freescale doesn't use the fsl_esdhc.c. They put their own
imx_esdhc.c in parallel. This does make porting even harder :(

Many thanks and best regards

Dirk

#1 lore raw

Yes, that's very annoying. Of course, Freescale *does* use fsl_esdhc, but for Power Architecture. I know that changes were submitted to support i.MX on fsl_esdhc, too, so I don't know why they've opted to use their own file in that tree. Hopefully they can be convinced to add support to mainline.

Quoted 20 lines · Dirk Behme

With the two commits

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=1bc5e5f2cee211a74ee79e0eb5f7f37a3db387f4

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=82102d3fdeae0dcd79d9b3ab7daa96bebd5ad290

the old Freescale U-Boot has eMMC 4.4 support.

Our mainline drivers/mmc/fsl_esdhc.c doesn't seem to support this.

Does anybody work on porting this to the mainline fsl_esdhc.c? Or any other pointers which might help?

Unfortunately, Freescale doesn't use the fsl_esdhc.c. They put their own ?imx_esdhc.c in parallel. This does make porting even harder :(

Many thanks and best regards

Dirk

author
#2 lore raw
Quoted 5 lines · Andy Fleming

Yes, that's very annoying. Of course, Freescale *does* use fsl_esdhc, but for Power Architecture. I know that changes were submitted to support i.MX on fsl_esdhc, too, so I don't know why they've opted to use their own file in that tree. Hopefully they can be convinced to add support to mainline.

I'm not sure if they can be convinced :(

Anyway, what would be the preferred way to improve the xxx_esdhc in mainline U-Boot?

Both, the Freescale U-Boot [1] and Barebox [2] have a imx-esdhc.c. With this, the options I see for mainline U-Boot are

a) to port the Freescale/Barebox imx-esdhc.c changes/improvements into U-Boot's fsl_esdhc.c

or

b) create a new imx-esdhc.c in U-Boot, too.

?

Best regards

Dirk

[1]
http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/drivers/mmc?h=imx_v2009.08&id=1bc5e5f2cee211a74ee79e0eb5f7f37a3db387f4

[2]
http://git.pengutronix.de/?p=barebox.git;a=tree;f=drivers/mci;h=5fc0778b7fafc6f45fa727eaae21ff3908c18730;hb=HEAD

Quoted 18 lines · Dirk Behme
Quoted 17 lines

With the two commits

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=1bc5e5f2cee211a74ee79e0eb5f7f37a3db387f4

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2009.08&id=82102d3fdeae0dcd79d9b3ab7daa96bebd5ad290

the old Freescale U-Boot has eMMC 4.4 support.

Our mainline drivers/mmc/fsl_esdhc.c doesn't seem to support this.

Does anybody work on porting this to the mainline fsl_esdhc.c? Or any other pointers which might help?

Unfortunately, Freescale doesn't use the fsl_esdhc.c. They put their own
imx_esdhc.c in parallel. This does make porting even harder :(

Many thanks and best regards

#3 lore raw

Am 24/02/2012 08:20, schrieb Dirk Behme:

Quoted 11 lines · Andy Fleming
Quoted 5 lines

Yes, that's very annoying. Of course, Freescale *does* use fsl_esdhc, but for Power Architecture. I know that changes were submitted to support i.MX on fsl_esdhc, too, so I don't know why they've opted to use their own file in that tree. Hopefully they can be convinced to add support to mainline.

I'm not sure if they can be convinced :(

Anyway, what would be the preferred way to improve the xxx_esdhc in mainline U-Boot?

Sorry, but support for SDHC *is* already in u-boot. The fsl_esdhc.c supports *both* architectures.

Quoted 3 lines

Both, the Freescale U-Boot [1] and Barebox [2] have a imx-esdhc.c. With this, the options I see for mainline U-Boot are

There are a lot of other drivers that are duplicated in the sources delivered by Freescale [1]. This is not a good reason to do the same in mainline. And Freescale's sources do not use the MMC framework we currently use, as fas as I remember.

Quoted 3 lines

a) to port the Freescale/Barebox imx-esdhc.c changes/improvements into U-Boot's fsl_esdhc.c

Yes. We have already profit in the past from changes done for PowerPC, that fixed the same issues for i.MX. Are you really sure that the missing feature (8 bit support) cannot be used on PowerPc, too ?

I am for maintaining one single driver and avoid as much as possible to duplicate code when it is not strictly needed.

Quoted 4 lines

or

b) create a new imx-esdhc.c in U-Boot, too.

No, don't do it. fsl_esdhc.c driver was modified in the past to add support for i.MX *after* Freescale published imx-esdh.c. And also at that time, the decision was to modify the driver for i.MX instead of adding a new one.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================