最近我收购了一个R-Car M3开发委员会。按照elinux.org/../YOCTO-Gen3上的步骤,我成功地用YOCTO 3.9.0构建了一个嵌入式Linux映像
我还按照elinux.org/../M3SK上的步骤更新了主板的固件。
现在我试图从SD卡启动Linux映像,但当我打开主板时,出现错误“MMC init fail”。我知道我可以访问SD卡并加载保存在那里的图像。但当尝试从SD卡引导时,它会停止引导并显示以下消息
“mmc0:初始化存储卡时出现错误-110”
尝试引导时出现此错误似乎是因为主板无法初始化mmc。
有人面临同样的问题吗?有人能帮我解决吗?
启动日志

Welcome to minicom 2.7



OPTIONS: I18n

Compiled on Nov 15 2018, 20:18:47.

Port /dev/ttyUSB0, 22:57:14



Press CTRL-A Z for help on special keys



[ 0.000190] NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.21

[ 0.005752] NOTICE: BL2: PRR is R-Car M3 Ver.1.0

[ 0.010421] NOTICE: BL2: Board is Starter Kit Rev.1.0

[ 0.015533] NOTICE: BL2: Boot device is HyperFlash(80MHz)

[ 0.020959] NOTICE: BL2: LCM state is CM

[ 0.025001] NOTICE: BL2: AVS setting succeeded. DVFS_SetVID=0x53

[ 0.030988] NOTICE: BL2: DDR3200(rev.0.33)NOTICE: [COLD_BOOT]NOTICE: ..0

[ 0.086074] NOTICE: BL2: DRAM Split is 2ch

[ 0.089960] NOTICE: BL2: QoS is default setting(rev.0.19)

[ 0.095463] NOTICE: BL2: Lossy Decomp areas

[ 0.099636] NOTICE: Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570

[ 0.106721] NOTICE: Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0

[ 0.113633] NOTICE: Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0

[ 0.120548] NOTICE: BL2: v1.4(release):15dba6b

[ 0.125038] NOTICE: BL2: Built : 05:48:04, Feb 18 2019

[ 0.130225] NOTICE: BL2: Normal boot

[ 0.133871] NOTICE: BL2: dst=0xe6320d00 src=0x8180000 len=512(0x200)

[ 0.140254] NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)

[ 0.146875] NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)

[ 0.154105] NOTICE: BL2: dst=0x44100000 src=0x8200000 len=1048576(0x100000)

[ 0.168928] NOTICE: BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)





U-Boot 2015.04 (Feb 17 2019 - 23:28:11)



CPU: Renesas Electronics R8A7796 rev 1.0

Board: M3ULCB

I2C: ready

DRAM: 1.9 GiB

Bank #0: 0x048000000 - 0x07fffffff, 896 MiB

Bank #1: 0x600000000 - 0x63fffffff, 1 GiB



MMC: sh-sdhi: 0, sh-sdhi: 1

MMC init failed

Using default environment



In: serial

Out: serial

Err: serial

Net: Board Net Initialization Failed

No ethernet found.

Hit any key to stop autoboot: 0

=> mmc dev 0

switch to partitions #0, OK

mmc0 is current device

=> mmc info

Device: sh-sdhi

Manufacturer ID: 3

OEM: 5344

Name: SC64G

Tran Speed: 50000000

Rd Block Len: 512

SD version 3.0

High Capacity: Yes

Capacity: 59.5 GiB

Bus Width: 4-bit

Erase Group Size: 512 Bytes

=> ext2ls mmc 0:1 /boot

<DIR> 4096 .

<DIR> 4096 ..

<SYM> 28 Image

18522624 Image-4.14.35-yocto-standard

67069 Image-r8a7796-m3ulcb.dtb

67069 r8a7796-m3ulcb.dtb

67069 Image--4.14.35+git0+118adc53e8-r1-r8a7796-m3ulcb-2019021804481b

=> setenv bootargs 'rw root=/dev/mmcblk0p1 rootfstype=ext4 rootwait'

=> saveenv

Saving Environment to MMC...

MMC init failed
**END OF BOOTING LOG**

**DTB file Information**

sd@ee100000 {
            compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
            reg = <0x0 0xee100000 0x0 0x2000>;
            interrupts = <0x0 0xa5 0x4>;
            clocks = <0xa 0x1 0x13a>;
            max-frequency = <0xbebc200>;
            power-domains = <0x7 0x20>;
            resets = <0xa 0x13a>;
            status = "okay";
            pinctrl-0 = <0x61>;
            pinctrl-1 = <0x62>;
            pinctrl-names = "default", "state_uhs";
            vmmc-supply = <0x63>;
            vqmmc-supply = <0x64>;
            cd-gpios = <0x65 0xc 0x1>;
            bus-width = <0x4>;
            sd-uhs-sdr50;
            sd-uhs-sdr104;
        };

        sd@ee120000 {
            compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
            reg = <0x0 0xee120000 0x0 0x2000>;
            interrupts = <0x0 0xa6 0x4>;
            clocks = <0xa 0x1 0x139>;
            max-frequency = <0xbebc200>;
            power-domains = <0x7 0x20>;
            resets = <0xa 0x139>;
            status = "disabled";
        };

        sd@ee140000 {
            compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
            reg = <0x0 0xee140000 0x0 0x2000>;
            interrupts = <0x0 0xa7 0x4>;
            clocks = <0xa 0x1 0x138>;
            max-frequency = <0xbebc200>;
            power-domains = <0x7 0x20>;
            resets = <0xa 0x138>;
            status = "okay";
            pinctrl-0 = <0x66>;
            pinctrl-1 = <0x67>;
            pinctrl-names = "default", "state_uhs";
            vmmc-supply = <0x68>;
            vqmmc-supply = <0x69>;
            bus-width = <0x8>;
            mmc-hs200-1_8v;
            mmc-hs400-1_8v;
            non-removable;
        };

        sd@ee160000 {
            compatible = "renesas,sdhi-r8a7796", "renesas,rcar-gen3-sdhi";
            reg = <0x0 0xee160000 0x0 0x2000>;
            interrupts = <0x0 0xa8 0x4>;
            clocks = <0xa 0x1 0x137>;
            max-frequency = <0xbebc200>;
            power-domains = <0x7 0x20>;
            resets = <0xa 0x137>;
            status = "disabled";
        };

最佳答案

在Renesas Yocto 3.9.0版中,存在一些已知的问题
提出时间:
https://elinux.org/R-Car/Boards/M3SK
(向下滚动至底部)
您应该为内核应用MMC驱动程序上的解决方法。
对于M3SK上的mmc规范,

  + sdhi0: used for sdcard 4-bit bus width
  + sdhi2: used for on-board 8bit eMMC
  + sd-uhs-sdr50: SD UHS SDR50 speed is supported
  + sd-uhs-sdr104: SD UHS SDR104 speed is supported
  + mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported
  + mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported

还有一些修补程序可以解决您的问题:
https://patchwork.kernel.org/patch/9963437/
https://patchwork.kernel.org/patch/9998159/
顺便说一下,您使用的是arm tf v1.4,为了兼容性,它应该与u-boot v2018.09一起使用。

10-04 13:50