U-Boot Doesn't Appear to Set eMMC mmc.hc_wp_grp_size

Discussions about all user software around SAM Series.

Moderator: nferre

PeterT
Posts: 14
Joined: Tue Jun 21, 2016 12:03 am

U-Boot Doesn't Appear to Set eMMC mmc.hc_wp_grp_size

Wed Jul 26, 2017 8:03 pm

I'm attempting to set the user partition of an eMMC chip on a custom board to enhanced mode, but am unable to because the hc_wp_grp_size field of the mmc struct appears to never get set but is checked in drivers/mmc/mmc.c:675 in order to change the HW partitions.
blue_z
Location: USA
Posts: 1505
Joined: Thu Apr 19, 2007 10:15 pm

Re: U-Boot Doesn't Appear to Set eMMC mmc.hc_wp_grp_size

Thu Jul 27, 2017 9:04 pm

PeterT wrote:I'm attempting to set the user partition of an eMMC chip on a custom board to enhanced mode, but am unable to because the hc_wp_grp_size field of the mmc struct appears to never get set but is checked in drivers/mmc/mmc.c:675 in order to change the HW partitions.
Your run-on sentence omits salient information such as the U-Boot version, specifics of the eMMC in use, and the proven functionality of this "custom board".

Your title is an assertion that is not supported by anything that you have written.
Apparently you're seeing a message, and located the code that generates it.
Have you investigated any further than that?

Just because the hc_wp_grp_size member (it's not a "field") is zero is not a basis for assuming that "it never get(s) set".
In fact there is an assignment in mmc_startup():

Code: Select all

			        mmc->hc_wp_grp_size = 1024
			                * ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
			                * ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
In the event that either multiplier for high-capacity group sizes is zero, then the product would be zero.
But have you verified these eMMC attributes?

However this assignment has a conditional:

Code: Select all

			if (!IS_SD(mmc) && (mmc->version >= MMC_VERSION_4)) {
If your eMMC did not respond as a version 4 or later device (preferably >= 4.41), then U-Boot may be performing as expected.

Regards

Return to “Software”

Who is online

Users browsing this forum: No registered users and 1 guest