This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2E: U-Boot emmc hwpartiton problem

Part Number: TDA2E
Other Parts Discussed in Thread: CSD

I am trying to use emmc as pSLC mode.

=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device

=> mmc info
Device: OMAP SD/MMC
Manufacturer ID: fe
OEM: 14e
Name: MMC08
Tran Speed: 200000000
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 8 MiB ENH
RPMB Capacity: 128 KiB ENH

=> mmc hwpartition user enh 0 7602176 wrrel on set
Partition configuration:
User Enhanced Start: 0 Bytes
User Enhanced Size: 3.6 GiB
User partition write reliability: on
No GP1 partition
No GP2 partition
No GP3 partition
No GP4 partition
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
Failed!

Please tell me why the error log occurs.

The test board is J6ECO / TDA2E EVM CPU BOARD.
Our custom board is also the same.

Best Regards,
Yousik Kim.

  • Hi Yousik Kim,

    We have not tested setting enhanced mode in our SDK.
    Could you share the SDK version you are using? 

    Regards,
    Vishal

  • Could you try the same operations from Linux kernel using mmc-utils?
    https://manpages.debian.org/unstable/mmc-utils/mmc.1.en.html

    Regards,
    Vishal

  • We are using PROCESSOR_SDK_VISION_03_07_00_00.

    And I tested with mmc-utils in our custom board.

    # mmc enh_area set -n 0 15261696 /dev/mmcblk0
    Enhanced User Data Area Size [ENH_SIZE_MULT]: 0x000747
    i.e. 15261696 KiB
    Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 0x000747
    i.e. 15261696 KiB
    Done setting ENH_USR area on /dev/mmcblk0
    NOT setting PARTITION_SETTING_COMPLETED
    These changes will not take effect neither now nor after a power cycle

    # mmc enh_area set -y 0 15261696 /dev/mmcblk0
    Enhanced User Data Area Size [ENH_SIZE_MULT]: 0x000747
    i.e. 15261696 KiB
    Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 0x000747
    i.e. 15261696 KiB
    Done setting ENH_USR area on /dev/mmcblk0
    setting OTP PARTITION_SETTING_COMPLETED!
    Setting OTP PARTITION_SETTING_COMPLETED on /dev/mmcblk0 SUCCESS
    Device power cycle needed for settings to take effect.
    Confirm that PARTITION_SETTING_COMPLETED bit is set using 'extcsd read' after power cycle

    => mmc dev 1
    ** First descriptor is NOT a primary desc on 1:1 **
    switch to partitions #0, OK
    mmc1(part 0) is current device

    => mmc info
    Device: OMAP SD/MMC
    Manufacturer ID: 15
    OEM: 100
    Name: BJTD4
    Tran Speed: 200000000
    Rd Block Len: 512
    MMC version 4.0
    High Capacity: Yes
    Capacity: 14.6 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB

    I think it works well.

    But I want to set mmc in U-Boot.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    Thanks for trying using the mmc-utils in Linux Kernel.
    As mentioned earlier we have not tested this feature.

    I can check if there are any changes in latest u-boot. Could you provide the u-boot version and commit information of this SDK? 
    You can see this printed in the u-boot boot log.

    Regards,
    Vishal

  • Hi, Vishal.

    The u-boot version is U-Boot 2016.05-00010-g9551b3d-dirty (Feb 11 2020 - 16:19:19 +0900).
    And I applied only earlyboot-kernel-patches in SDK.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    The earlyboot-kernel patches is only for Kernel right? not for u-boot.

    Could you try below debug steps?

    -1-
    Could you enable CONFIG_MMC_TRACE in include/configs/dra7xx_evm.h to print out all the commands. Most probably the timing requirement of a command is not being met.

    -2-
    mmc_hwpart_config() API wold need to be debugged to see which CMD6 is failing and check if we need to wait for a longer time somewhere.


    Regards,
    Vishal

  • Hi, Vishal.

    I tested as you requested.

    => mmc hwpartition user enh 0 30523392 wrrel on set
    Partition configuration:
    User Enhanced Start: 0 Bytes
    User Enhanced Size: 14.6 GiB
    User partition write reliability: on
    No GP1 partition
    No GP2 partition
    No GP3 partition
    No GP4 partition
    CMD_SEND:8
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:6
    ARG 0x03AF0100
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x80000000
    Status Error: 0x80000000
    Failed!

    => mmc hwpartition user enh 0 30523392 wrrel on set
    Partition configuration:
    User Enhanced Start: 0 Bytes
    User Enhanced Size: 14.6 GiB
    User partition write reliability: on
    No GP1 partition
    No GP2 partition
    No GP3 partition
    No GP4 partition
    CMD_SEND:8
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    CMD_SEND:6
    ARG 0x03880000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:6
    ARG 0x03890000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:6
    ARG 0x038A0000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:6
    ARG 0x038B0000
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x00000900
    CURR STATE:4
    CMD_SEND:6
    ARG 0x038C4700
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    CMD_SEND:13
    ARG 0x00010000
    omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    RET -19
    Failed!

    The problem seems to be after CMD6.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    You attached 2 iterations. What is the difference between the two?

    Regards,
    Vishal

  • Hi, Vishal.

    Both are the same command, just the first and second run.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    Are you trying the u-boot experiment on same board where you had successfully configured SLC via mmc-utils in kernel?

    JEDEC spec states if the host tries to change enhanced user data area features set by CMD6 after power-up following the partition configuration procedure, SWITCH_EERROR will be set.


    Regards,
    Vishal

  • It would also help to check the ext_csd register value at the time of failure.

  • Hi, Vishal.

    This was tested with a new board not set up with SLC.
    If the board is already set, it is not possible to set it in u-boot.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    Could you add prints to mmc_send_ext_csd() function to check ext_csd register values?

    Regards,
    Vishal

  • Hi, Vishal.

    I've added ext_csd register check log as you requested

    => mmc hwpartition user enh 0 30523392 wrrel on set
    Partition configuration:
    User Enhanced Start: 0 Bytes
    User Enhanced Size: 14.6 GiB
    User partition write reliability: on
    No GP1 partition
    No GP2 partition
    No GP3 partition
    No GP4 partition
    CMD_SEND:8
    ARG 0x00000000
    MMC_RSP_R1,5,6,7 0x00000900
    ext_csd[0] = 0x00
    ext_csd[1] = 0x00
    ext_csd[2] = 0x00
    ext_csd[3] = 0x00
    ext_csd[4] = 0x00
    ext_csd[5] = 0x00
    ext_csd[6] = 0x00
    ext_csd[7] = 0x00
    ext_csd[8] = 0x00
    ext_csd[9] = 0x00
    ext_csd[10] = 0x00
    ext_csd[11] = 0x00
    ext_csd[12] = 0x00
    ext_csd[13] = 0x00
    ext_csd[14] = 0x00
    ext_csd[15] = 0x00
    ext_csd[16] = 0x39
    ext_csd[17] = 0x00
    ext_csd[18] = 0x00
    ext_csd[19] = 0x00
    ext_csd[20] = 0x00
    ext_csd[21] = 0x00
    ext_csd[22] = 0x00
    ext_csd[23] = 0x00
    ext_csd[24] = 0x00
    ext_csd[25] = 0x00
    ext_csd[26] = 0x00
    ext_csd[27] = 0x00
    ext_csd[28] = 0x00
    ext_csd[29] = 0x00
    ext_csd[30] = 0x00
    ext_csd[31] = 0x00
    ext_csd[32] = 0x00
    ext_csd[33] = 0x00
    ext_csd[34] = 0x00
    ext_csd[35] = 0x00
    ext_csd[36] = 0x00
    ext_csd[37] = 0x00
    ext_csd[38] = 0x00
    ext_csd[39] = 0x00
    ext_csd[40] = 0x00
    ext_csd[41] = 0x00
    ext_csd[42] = 0x00
    ext_csd[43] = 0x00
    ext_csd[44] = 0x00
    ext_csd[45] = 0x00
    ext_csd[46] = 0x00
    ext_csd[47] = 0x00
    ext_csd[48] = 0x00
    ext_csd[49] = 0x00
    ext_csd[50] = 0x00
    ext_csd[51] = 0x00
    ext_csd[52] = 0x00
    ext_csd[53] = 0x00
    ext_csd[54] = 0x00
    ext_csd[55] = 0x00
    ext_csd[56] = 0x00
    ext_csd[57] = 0x00
    ext_csd[58] = 0x00
    ext_csd[59] = 0x00
    ext_csd[60] = 0x00
    ext_csd[61] = 0x00
    ext_csd[62] = 0x00
    ext_csd[63] = 0x00
    ext_csd[64] = 0x0F
    ext_csd[65] = 0x00
    ext_csd[66] = 0x00
    ext_csd[67] = 0xC8
    ext_csd[68] = 0xC8
    ext_csd[69] = 0x00
    ext_csd[70] = 0x00
    ext_csd[71] = 0x00
    ext_csd[72] = 0x00
    ext_csd[73] = 0x00
    ext_csd[74] = 0x00
    ext_csd[75] = 0x00
    ext_csd[76] = 0x00
    ext_csd[77] = 0x00
    ext_csd[78] = 0x00
    ext_csd[79] = 0x00
    ext_csd[80] = 0x00
    ext_csd[81] = 0x00
    ext_csd[82] = 0x00
    ext_csd[83] = 0x00
    ext_csd[84] = 0x00
    ext_csd[85] = 0x01
    ext_csd[86] = 0x00
    ext_csd[87] = 0x00
    ext_csd[88] = 0x00
    ext_csd[89] = 0x00
    ext_csd[90] = 0x00
    ext_csd[91] = 0x00
    ext_csd[92] = 0x00
    ext_csd[93] = 0x00
    ext_csd[94] = 0x00
    ext_csd[95] = 0x00
    ext_csd[96] = 0x00
    ext_csd[97] = 0x00
    ext_csd[98] = 0x00
    ext_csd[99] = 0x00
    ext_csd[100] = 0x00
    ext_csd[101] = 0x05
    ext_csd[102] = 0x00
    ext_csd[103] = 0x00
    ext_csd[104] = 0x00
    ext_csd[105] = 0x00
    ext_csd[106] = 0x00
    ext_csd[107] = 0x00
    ext_csd[108] = 0x00
    ext_csd[109] = 0x00
    ext_csd[110] = 0x00
    ext_csd[111] = 0x00
    ext_csd[112] = 0x00
    ext_csd[113] = 0x00
    ext_csd[114] = 0x00
    ext_csd[115] = 0x00
    ext_csd[116] = 0x00
    ext_csd[117] = 0x00
    ext_csd[118] = 0x00
    ext_csd[119] = 0x00
    ext_csd[120] = 0x00
    ext_csd[121] = 0x00
    ext_csd[122] = 0x00
    ext_csd[123] = 0x00
    ext_csd[124] = 0x00
    ext_csd[125] = 0x00
    ext_csd[126] = 0x00
    ext_csd[127] = 0x00
    ext_csd[128] = 0x00
    ext_csd[129] = 0x00
    ext_csd[130] = 0x01
    ext_csd[131] = 0x00
    ext_csd[132] = 0x00
    ext_csd[133] = 0x00
    ext_csd[134] = 0x00
    ext_csd[135] = 0x00
    ext_csd[136] = 0x00
    ext_csd[137] = 0x00
    ext_csd[138] = 0x00
    ext_csd[139] = 0x00
    ext_csd[140] = 0x00
    ext_csd[141] = 0x00
    ext_csd[142] = 0x00
    ext_csd[143] = 0x00
    ext_csd[144] = 0x00
    ext_csd[145] = 0x00
    ext_csd[146] = 0x00
    ext_csd[147] = 0x00
    ext_csd[148] = 0x00
    ext_csd[149] = 0x00
    ext_csd[150] = 0x00
    ext_csd[151] = 0x00
    ext_csd[152] = 0x00
    ext_csd[153] = 0x00
    ext_csd[154] = 0x00
    ext_csd[155] = 0x00
    ext_csd[156] = 0x00
    ext_csd[157] = 0x47
    ext_csd[158] = 0x07
    ext_csd[159] = 0x00
    ext_csd[160] = 0x07
    ext_csd[161] = 0x00
    ext_csd[162] = 0x00
    ext_csd[163] = 0x00
    ext_csd[164] = 0x00
    ext_csd[165] = 0x00
    ext_csd[166] = 0x14
    ext_csd[167] = 0x1F
    ext_csd[168] = 0x20
    ext_csd[169] = 0x00
    ext_csd[170] = 0x00
    ext_csd[171] = 0x00
    ext_csd[172] = 0x00
    ext_csd[173] = 0x00
    ext_csd[174] = 0x00
    ext_csd[175] = 0x00
    ext_csd[176] = 0x00
    ext_csd[177] = 0x00
    ext_csd[178] = 0x00
    ext_csd[179] = 0x00
    ext_csd[180] = 0x00
    ext_csd[181] = 0x00
    ext_csd[182] = 0x00
    ext_csd[183] = 0x00
    ext_csd[184] = 0x01
    ext_csd[185] = 0x02
    ext_csd[186] = 0x00
    ext_csd[187] = 0x00
    ext_csd[188] = 0x00
    ext_csd[189] = 0x00
    ext_csd[190] = 0x00
    ext_csd[191] = 0x00
    ext_csd[192] = 0x08
    ext_csd[193] = 0x00
    ext_csd[194] = 0x02
    ext_csd[195] = 0x00
    ext_csd[196] = 0x57
    ext_csd[197] = 0x1F
    ext_csd[198] = 0x0A
    ext_csd[199] = 0x02
    ext_csd[200] = 0x00
    ext_csd[201] = 0x00
    ext_csd[202] = 0x00
    ext_csd[203] = 0x00
    ext_csd[204] = 0x00
    ext_csd[205] = 0x00
    ext_csd[206] = 0x00
    ext_csd[207] = 0x00
    ext_csd[208] = 0x00
    ext_csd[209] = 0x00
    ext_csd[210] = 0x00
    ext_csd[211] = 0x01
    ext_csd[212] = 0x00
    ext_csd[213] = 0xE0
    ext_csd[214] = 0xA3
    ext_csd[215] = 0x03
    ext_csd[216] = 0x07
    ext_csd[217] = 0x11
    ext_csd[218] = 0x00
    ext_csd[219] = 0x07
    ext_csd[220] = 0x07
    ext_csd[221] = 0x10
    ext_csd[222] = 0x01
    ext_csd[223] = 0x01
    ext_csd[224] = 0x01
    ext_csd[225] = 0x07
    ext_csd[226] = 0x20
    ext_csd[227] = 0x00
    ext_csd[228] = 0x07
    ext_csd[229] = 0x11
    ext_csd[230] = 0x1B
    ext_csd[231] = 0x55
    ext_csd[232] = 0x02
    ext_csd[233] = 0x00
    ext_csd[234] = 0x00
    ext_csd[235] = 0x00
    ext_csd[236] = 0x00
    ext_csd[237] = 0x00
    ext_csd[238] = 0x00
    ext_csd[239] = 0x00
    ext_csd[240] = 0x00
    ext_csd[241] = 0x1E
    ext_csd[242] = 0x00
    ext_csd[243] = 0x00
    ext_csd[244] = 0x00
    ext_csd[245] = 0x00
    ext_csd[246] = 0x00
    ext_csd[247] = 0x3C
    ext_csd[248] = 0x0A
    ext_csd[249] = 0x00
    ext_csd[250] = 0x00
    ext_csd[251] = 0x01
    ext_csd[252] = 0x00
    ext_csd[253] = 0x00
    ext_csd[254] = 0x03
    ext_csd[255] = 0x00
    ext_csd[256] = 0x00
    ext_csd[257] = 0x00
    ext_csd[258] = 0x00
    ext_csd[259] = 0x00
    ext_csd[260] = 0x00
    ext_csd[261] = 0x00
    ext_csd[262] = 0x00
    ext_csd[263] = 0x00
    ext_csd[264] = 0x01
    ext_csd[265] = 0x10
    ext_csd[266] = 0x00
    ext_csd[267] = 0x01
    ext_csd[268] = 0x01
    ext_csd[269] = 0x01
    ext_csd[270] = 0x00
    ext_csd[271] = 0x00
    ext_csd[272] = 0x00
    ext_csd[273] = 0x00
    ext_csd[274] = 0x00
    ext_csd[275] = 0x00
    ext_csd[276] = 0x00
    ext_csd[277] = 0x00
    ext_csd[278] = 0x00
    ext_csd[279] = 0x00
    ext_csd[280] = 0x00
    ext_csd[281] = 0x00
    ext_csd[282] = 0x00
    ext_csd[283] = 0x00
    ext_csd[284] = 0x00
    ext_csd[285] = 0x00
    ext_csd[286] = 0x00
    ext_csd[287] = 0x00
    ext_csd[288] = 0x00
    ext_csd[289] = 0x00
    ext_csd[290] = 0x00
    ext_csd[291] = 0x00
    ext_csd[292] = 0x00
    ext_csd[293] = 0x00
    ext_csd[294] = 0x00
    ext_csd[295] = 0x00
    ext_csd[296] = 0x00
    ext_csd[297] = 0x00
    ext_csd[298] = 0x00
    ext_csd[299] = 0x00
    ext_csd[300] = 0x00
    ext_csd[301] = 0x00
    ext_csd[302] = 0x00
    ext_csd[303] = 0x00
    ext_csd[304] = 0x00
    ext_csd[305] = 0x00
    ext_csd[306] = 0x00
    ext_csd[307] = 0x0F
    ext_csd[308] = 0x01
    ext_csd[309] = 0x00
    ext_csd[310] = 0x00
    ext_csd[311] = 0x00
    ext_csd[312] = 0x00
    ext_csd[313] = 0x00
    ext_csd[314] = 0x00
    ext_csd[315] = 0x00
    ext_csd[316] = 0x00
    ext_csd[317] = 0x00
    ext_csd[318] = 0x00
    ext_csd[319] = 0x00
    ext_csd[320] = 0x00
    ext_csd[321] = 0x00
    ext_csd[322] = 0x00
    ext_csd[323] = 0x00
    ext_csd[324] = 0x00
    ext_csd[325] = 0x00
    ext_csd[326] = 0x00
    ext_csd[327] = 0x00
    ext_csd[328] = 0x00
    ext_csd[329] = 0x00
    ext_csd[330] = 0x00
    ext_csd[331] = 0x00
    ext_csd[332] = 0x00
    ext_csd[333] = 0x00
    ext_csd[334] = 0x00
    ext_csd[335] = 0x00
    ext_csd[336] = 0x00
    ext_csd[337] = 0x00
    ext_csd[338] = 0x00
    ext_csd[339] = 0x00
    ext_csd[340] = 0x00
    ext_csd[341] = 0x00
    ext_csd[342] = 0x00
    ext_csd[343] = 0x00
    ext_csd[344] = 0x00
    ext_csd[345] = 0x00
    ext_csd[346] = 0x00
    ext_csd[347] = 0x00
    ext_csd[348] = 0x00
    ext_csd[349] = 0x00
    ext_csd[350] = 0x00
    ext_csd[351] = 0x00
    ext_csd[352] = 0x00
    ext_csd[353] = 0x00
    ext_csd[354] = 0x00
    ext_csd[355] = 0x00
    ext_csd[356] = 0x00
    ext_csd[357] = 0x00
    ext_csd[358] = 0x00
    ext_csd[359] = 0x00
    ext_csd[360] = 0x00
    ext_csd[361] = 0x00
    ext_csd[362] = 0x00
    ext_csd[363] = 0x00
    ext_csd[364] = 0x00
    ext_csd[365] = 0x00
    ext_csd[366] = 0x00
    ext_csd[367] = 0x00
    ext_csd[368] = 0x00
    ext_csd[369] = 0x00
    ext_csd[370] = 0x00
    ext_csd[371] = 0x00
    ext_csd[372] = 0x00
    ext_csd[373] = 0x00
    ext_csd[374] = 0x00
    ext_csd[375] = 0x00
    ext_csd[376] = 0x00
    ext_csd[377] = 0x00
    ext_csd[378] = 0x00
    ext_csd[379] = 0x00
    ext_csd[380] = 0x00
    ext_csd[381] = 0x00
    ext_csd[382] = 0x00
    ext_csd[383] = 0x00
    ext_csd[384] = 0x00
    ext_csd[385] = 0x00
    ext_csd[386] = 0x00
    ext_csd[387] = 0x00
    ext_csd[388] = 0x00
    ext_csd[389] = 0x00
    ext_csd[390] = 0x00
    ext_csd[391] = 0x00
    ext_csd[392] = 0x00
    ext_csd[393] = 0x00
    ext_csd[394] = 0x00
    ext_csd[395] = 0x00
    ext_csd[396] = 0x00
    ext_csd[397] = 0x00
    ext_csd[398] = 0x00
    ext_csd[399] = 0x00
    ext_csd[400] = 0x00
    ext_csd[401] = 0x00
    ext_csd[402] = 0x00
    ext_csd[403] = 0x00
    ext_csd[404] = 0x00
    ext_csd[405] = 0x00
    ext_csd[406] = 0x00
    ext_csd[407] = 0x00
    ext_csd[408] = 0x00
    ext_csd[409] = 0x00
    ext_csd[410] = 0x00
    ext_csd[411] = 0x00
    ext_csd[412] = 0x00
    ext_csd[413] = 0x00
    ext_csd[414] = 0x00
    ext_csd[415] = 0x00
    ext_csd[416] = 0x00
    ext_csd[417] = 0x00
    ext_csd[418] = 0x00
    ext_csd[419] = 0x00
    ext_csd[420] = 0x00
    ext_csd[421] = 0x00
    ext_csd[422] = 0x00
    ext_csd[423] = 0x00
    ext_csd[424] = 0x00
    ext_csd[425] = 0x00
    ext_csd[426] = 0x00
    ext_csd[427] = 0x00
    ext_csd[428] = 0x00
    ext_csd[429] = 0x00
    ext_csd[430] = 0x00
    ext_csd[431] = 0x00
    ext_csd[432] = 0x00
    ext_csd[433] = 0x00
    ext_csd[434] = 0x00
    ext_csd[435] = 0x00
    ext_csd[436] = 0x00
    ext_csd[437] = 0x00
    ext_csd[438] = 0x00
    ext_csd[439] = 0x00
    ext_csd[440] = 0x00
    ext_csd[441] = 0x00
    ext_csd[442] = 0x00
    ext_csd[443] = 0x00
    ext_csd[444] = 0x00
    ext_csd[445] = 0x00
    ext_csd[446] = 0x00
    ext_csd[447] = 0x00
    ext_csd[448] = 0x00
    ext_csd[449] = 0x00
    ext_csd[450] = 0x00
    ext_csd[451] = 0x00
    ext_csd[452] = 0x00
    ext_csd[453] = 0x00
    ext_csd[454] = 0x00
    ext_csd[455] = 0x00
    ext_csd[456] = 0x00
    ext_csd[457] = 0x00
    ext_csd[458] = 0x00
    ext_csd[459] = 0x00
    ext_csd[460] = 0x00
    ext_csd[461] = 0x00
    ext_csd[462] = 0x00
    ext_csd[463] = 0x00
    ext_csd[464] = 0x00
    ext_csd[465] = 0x00
    ext_csd[466] = 0x00
    ext_csd[467] = 0x00
    ext_csd[468] = 0x00
    ext_csd[469] = 0x00
    ext_csd[470] = 0x00
    ext_csd[471] = 0x00
    ext_csd[472] = 0x00
    ext_csd[473] = 0x00
    ext_csd[474] = 0x00
    ext_csd[475] = 0x00
    ext_csd[476] = 0x00
    ext_csd[477] = 0x00
    ext_csd[478] = 0x00
    ext_csd[479] = 0x00
    ext_csd[480] = 0x00
    ext_csd[481] = 0x00
    ext_csd[482] = 0x00
    ext_csd[483] = 0x00
    ext_csd[484] = 0x00
    ext_csd[485] = 0x00
    ext_csd[486] = 0x00
    ext_csd[487] = 0x00
    ext_csd[488] = 0x00
    ext_csd[489] = 0x81
    ext_csd[490] = 0xC7
    ext_csd[491] = 0x00
    ext_csd[492] = 0x00
    ext_csd[493] = 0x03
    ext_csd[494] = 0x03
    ext_csd[495] = 0x07
    ext_csd[496] = 0x05
    ext_csd[497] = 0x00
    ext_csd[498] = 0x02
    ext_csd[499] = 0x01
    ext_csd[500] = 0x3F
    ext_csd[501] = 0x3F
    ext_csd[502] = 0x01
    ext_csd[503] = 0x01
    ext_csd[504] = 0x01
    ext_csd[505] = 0x00
    ext_csd[506] = 0x00
    ext_csd[507] = 0x00
    ext_csd[508] = 0x00
    ext_csd[509] = 0x00
    ext_csd[510] = 0x00
    ext_csd[511] = 0x00
    CMD_SEND:6
    ARG 0x03AF0100
    MMC_RSP_R1b 0x00000900
    CMD_SEND:13
    ARG 0x00010000
    MMC_RSP_R1,5,6,7 0x80000000
    Status Error: 0x80000000
    Failed!

    Best Regards,
    Yousik Kim.

  • Hi, Vishal.

    In my tests, I found this to be a tuning value problem for u-boot when in hs200 mode.
    This seems to be related to the errata i929 issue, but there seems to be no patch available for u-boot of PROCESSOR_SDK.

    Can you please give me a patch to apply for this issue?
    In u-boot of PROCESSOR_SDK, there is no driver to get the cpu temperature, so other existing patches cannot be applied.

    Best Regards,
    Yousik Kim.

  • Hi, Vishal.

    Please forget about the above.
    I did the test wrong.
    I tested it three times and thought it worked out, but after trying it again, I get an error.

    Best Regards,
    Yousik Kim.

  • Hi, Vishal.

    If I change the function omap_hsmmc_init_setup in the file omap_hsmmc.c as follows, the problem does not occur.

    -#ifdef SUPPORTS_ADMA
    +#if 0//def SUPPORTS_ADMA
    reg_val = readl(&mmc_base->hl_hwinfo);
    if (reg_val & MADMA_EN)
    priv->controller_flags |= OMAP_HSMMC_USE_ADMA;
    #endif

    Can you tell me why?
    And please consider whether this modification is acceptable.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    The change you mentioned disables ADMA for MMC.
    So, with this change you have hwpartition command always working?

    Disabling ADMA is OK, but it will have some MMC throughput reduction.

    Can you disable ADMA properly with change below and test?

    diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
    index 0162be44ad..ecc609212a 100644
    --- a/drivers/mmc/omap_hsmmc.c
    +++ b/drivers/mmc/omap_hsmmc.c
    @@ -59,9 +59,9 @@ DECLARE_GLOBAL_DATA_PTR;
     #define SYSCTL_SRC     (1 << 25)
     #define SYSCTL_SRD     (1 << 26)
    
    -#ifndef CONFIG_OMAP34XX
    -#define SUPPORTS_ADMA
    -#endif
    +//#ifndef CONFIG_OMAP34XX
    +//#define SUPPORTS_ADMA
    +//#endif
    
     struct omap_hsmmc_data {
            struct hsmmc *base_addr;
    

    Regards,
    Vishal

  • Hi, Vishal.

    Yes, after modification hwpartition always works fine.
    And the same problem occurred when doing mmc erase but that solved it too.

    I also fixed as you said, but I got a compile error.
    However, by further modifying the controller_flags value to be available, I confirmed that it compiles well and works fine.

    But if possible, I would like to have ADMA available too.

    Best Regards,
    Yousik Kim.

  • Hi, Vishal.

    It's the log after applying patch.

    ATP > mmc hwpartition user enh 2097152 28426240 wrrel on gp1 524288 enh wrrel on gp2 524288 enh wrrel on gp3 262144 enh wrrel on gp4 786432 enh wrrel on set
    Partition configuration:
    User Enhanced Start: 1 GiB
    User Enhanced Size: 13.6 GiB
    User partition write reliability: on
    GP1 Capacity: 256 MiB ENH
    GP1 write reliability: on
    GP2 Capacity: 256 MiB ENH
    GP2 write reliability: on
    GP3 Capacity: 128 MiB ENH
    GP3 write reliability: on
    GP4 Capacity: 384 MiB ENH
    GP4 write reliability: on
    ATP > mmc hwpartition user enh 2097152 28426240 wrrel on gp1 524288 enh wrrel on gp2 524288 enh wrrel on gp3 262144 enh wrrel on gp4 786432 enh wrrel on set
    Partition configuration:
    User Enhanced Start: 1 GiB
    User Enhanced Size: 13.6 GiB
    User partition write reliability: on
    GP1 Capacity: 256 MiB ENH
    GP1 write reliability: on
    GP2 Capacity: 256 MiB ENH
    GP2 write reliability: on
    GP3 Capacity: 128 MiB ENH
    GP3 write reliability: on
    GP4 Capacity: 384 MiB ENH
    GP4 write reliability: on
    ATP > mmc hwpartition user enh 2097152 28426240 wrrel on gp1 524288 enh wrrel on gp2 524288 enh wrrel on gp3 262144 enh wrrel on gp4 786432 enh wrrel on set
    Partition configuration:
    User Enhanced Start: 1 GiB
    User Enhanced Size: 13.6 GiB
    User partition write reliability: on
    GP1 Capacity: 256 MiB ENH
    GP1 write reliability: on
    GP2 Capacity: 256 MiB ENH
    GP2 write reliability: on
    GP3 Capacity: 128 MiB ENH
    GP3 write reliability: on
    GP4 Capacity: 384 MiB ENH
    GP4 write reliability: on
    Status Error: 0xAEED6840
    enh start addr 0 error!
    Failed!

    Although the success rate has become high, there is still an error about once in three times.
    If ADMA is not used, it will work normally.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    Is this from same board or three different boards?
    How about erase operation?

    Since hwpartition is permanent we don't test this feature. I found this patch based on erase testing from latest u-boot.

    Regards,
    Vishal

  • Hi, Vishal.

    This was the same board, tested three times in a row.

    And the erase command worked fine.
    However, the hwpartition command does not work properly.

    Best Regards,
    Yousik Kim.

  • Hi Yousik Kim,

    We made a comment about running on same board.
    https://e2e.ti.com/support/processors/f/791/p/878469/3259105#3259105

    Regards,
    Vishal

  • Hi Yousik Kim,

    Do you have any more questions on this one?

    Regards,
    Vishal

  • Hi, Vishal.

    I have decided not to use ADMA.
    Otherwise, I cannot run the hwpartition command normally in u-boot.

    Best Regards,
    Yousik Kim.