mpc8308 sdhc not working with linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mpc8308 sdhc not working with linux

1,367 Views
dirkeibach
Contributor II

I am doing a BSP for our custom mpc8308 based board. u-boot is loaded from 1MB NOR, kernel and rootfs are on SD-Card.

Evaluation is done on mpc8308rdb.

I realised that sdhci is not supported in mpc8308rdb devicetree.

I added it myself, finding that it does not work in DMA mode but does work in PIO mode (which is way too slow for productive usage).

Is there something wrong with sdhci and DMA on mpc8308? I did not find any errata on that topic.

Tags (3)
4 Replies

941 Views
dirkeibach
Contributor II

In order to get SDHC running with mainline kernel, only one thing is missing: enable cache snooping for the eSDHC controller in sdhccr register. This is done in Freescale u-boot, but not in mainline.

/* Enable cache snooping in eSDHC controller in system configuration registers */

out_be32(&sysconf->sdhccr, 0x02000000);

This fixes all issues for me.

941 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please download the latest Linux BSP with Linux 2.6.29.6 from MPC8308-RDB Reference Platform.

The node "sdhci" is supported in the device tree, please refer to the following.

sdhci@2e000 {

                             compatible = "fsl,esdhc", "fsl,mpc8308-esdhc";

                             reg = <0x2e000 0x1000>;

                             interrupts = <42 0x8>;

                             interrupt-parent = <&ipic>;

                             /* Filled in by U-Boot */

                            clock-frequency = <0>;

                      };

0 Kudos
Reply

941 Views
dirkeibach
Contributor II

I am using mainline, where this stuff is not integrated yet.

Unfortunately this patch is against an acient kernel. Finding what is missing to get it running in mainline is a bit hairy, but I am trying it.

Maybe Freescale already has solution somewhere :smileyhappy:

0 Kudos
Reply

941 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the attached patches and mmc driver from the released ISO.

0 Kudos
Reply