mmc: Avoid HS400 mode when accessing boot partitions
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +2 -2
@@ -905,14 +905,14 @@ static int mmc_set_capacity(struct mmc *mmc, int part_num)return 0 ; } -#if CONFIG_IS_ENABLED (MMC_HS200_SUPPORT ) +#if CONFIG_IS_ENABLED (MMC_HS200_SUPPORT ) ||CONFIG_IS_ENABLED (MMC_HS400_SUPPORT )static int mmc_boot_part_access_chk (struct mmc *mmc,unsigned int part_num) {int forbidden =0 ;bool change = false;if (part_num &PART_ACCESS_MASK ) - forbidden =MMC_CAP (MMC_HS_200 ); + forbidden =MMC_CAP (MMC_HS_200 ) |MMC_CAP (MMC_HS_400 );if (MMC_CAP (mmc->selected_mode) & forbidden) { pr_debug("selected mode (%s) is forbidden for part %d\n",
Signature · 1 line
2.20.1
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 29 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
Signed-off-by Marek Vasut <[email protected]>Cc Jean-Jacques Hiblot <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Peng Fan <[email protected]>--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0
-0
456c1b4cc9..71b52c6cf2100644drivers/mmc/mmc.c +2
-1@@ -905,14 +905,14 @@ static int mmc_set_capacity(struct mmc *mmc, int part_num)return 0 ; } -#if CONFIG_IS_ENABLED (MMC_HS200_SUPPORT ) +#if CONFIG_IS_ENABLED (MMC_HS200_SUPPORT ) || +CONFIG_IS_ENABLED (MMC_HS400_SUPPORT ) static int mmc_boot_part_access_chk(struct mmc *mmc, unsigned int
drivers/mmc/mmc.c static int mmc_set_capacity(struct mmc *mmc, int · line 918
Quoted 10 lines
drivers/mmc/mmc.c +1
-1part_num) {int forbidden =0 ;bool change = false;if (part_num &PART_ACCESS_MASK ) - forbidden =MMC_CAP (MMC_HS_200 ); + forbidden =MMC_CAP (MMC_HS_200 ) |MMC_CAP (MMC_HS_400 );if (MMC_CAP (mmc->selected_mode) & forbidden) { pr_debug("selected mode (%s) is forbidden for part %d\n",
Quoted 2 lines
--
2.20.1
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 7 lines · Peng Fan
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 1 line · Faiz Abbas
Hi Marek, Peng,
Hi,
Quoted 22 lines · Peng Fan
Quoted 7 lines
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Did you practically verify this ? In my case, the boot partition access fails in HS200/HS400 mode (samsung and sandisk emmc, but I'd have to check the exact part number).
commit 01298da31d92ecc46cf9130d8cff68bc51698197
mmc: Change mode when switching to a boot partition
seems to confirm that too.
If nothing else, this patch should go in for the sake of consistency.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek,
Quoted 32 lines · Marek Vasut
Quoted 1 line · Faiz Abbas
Hi Marek, Peng,
Hi,
Quoted 22 lines · Peng Fan
Quoted 7 lines
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Quoted 8 lines
Did you practically verify this ? In my case, the boot partition access fails in HS200/HS400 mode (samsung and sandisk emmc, but I'd have to check the exact part number).
commit
01298da31d92ecc46cf9130d8cff68bc51698197
mmc: Change mode when switching to a boot partition
seems to confirm that too.
I had tried to raise these concerns for that patch as well
(https://www.spinics.net/lists/linux-mmc/msg50432.html) but it was missed at that time.
I did verify that kernel is not switching speeds on a dra7xx board. JJ and I have seen failures similar to yours in u-boot (which led to this patch) but not in kernel which makes me think that the fix was wrong. Have you verified with your setup in kernel?
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 44 lines · Faiz Abbas
Hi Marek,
Quoted 32 lines · Marek Vasut
Quoted 1 line · Faiz Abbas
Hi Marek, Peng,
Hi,
Quoted 22 lines · Peng Fan
Quoted 7 lines
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Quoted 8 lines
Did you practically verify this ? In my case, the boot partition access fails in HS200/HS400 mode (samsung and sandisk emmc, but I'd have to check the exact part number).
commit
01298da31d92ecc46cf9130d8cff68bc51698197
mmc: Change mode when switching to a boot partition
seems to confirm that too.
Quoted 8 lines
I had tried to raise these concerns for that patch as well
(https://www.spinics.net/lists/linux-mmc/msg50432.html) but it was missed at that time.I did verify that kernel is not switching speeds on a dra7xx board. JJ and I have seen failures similar to yours in u-boot (which led to this patch) but not in kernel which makes me think that the fix was wrong. Have you verified with your setup in kernel?
No, but I'll add it to the list of things to look into.
In the meantime, this should go in anyway, to make the code consistent.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Hi,
+ Kernel MMC maintainer
Quoted 49 lines · Marek Vasut
Quoted 48 lines · Faiz Abbas
Hi Marek,
Quoted 32 lines · Marek Vasut
Quoted 1 line · Faiz Abbas
Hi Marek, Peng,
Hi,
Quoted 22 lines · Peng Fan
Quoted 7 lines
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Quoted 8 lines
Did you practically verify this ? In my case, the boot partition access fails in HS200/HS400 mode (samsung and sandisk emmc, but I'd have to check the exact part number).
commit
01298da31d92ecc46cf9130d8cff68bc51698197
mmc: Change mode when switching to a boot partition
seems to confirm that too.I had tried to raise these concerns for that patch as well
(https://www.spinics.net/lists/linux-mmc/msg50432.html) but it was missed at that time.
Quoted 9 lines
Quoted 4 lines
I did verify that kernel is not switching speeds on a dra7xx board. JJ and I have seen failures similar to yours in u-boot (which led to this patch) but not in kernel which makes me think that the fix was wrong. Have you verified with your setup in kernel?
No, but I'll add it to the list of things to look into.
In the meantime, this should go in anyway, to make the code consistent.
If we keep covering up the issue then it will never be solved. We need to get more data points and more expert opinions on this and take the pains to fix it.
@Ulf we are seeing some failures when trying to access eMMC boot partitions at HS200/HS400 speed modes.
Do you know if there are limitations on accessing eMMC boot partitions at HS200/HS400 speed modes in kernel? Do you agree with my reading of the spec above?
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 59 lines · Faiz Abbas
Hi,
+ Kernel MMC maintainer
Quoted 54 lines · Marek Vasut
Quoted 52 lines · Faiz Abbas
Hi Marek,
Quoted 32 lines · Marek Vasut
Quoted 1 line · Faiz Abbas
Hi Marek, Peng,
Hi,
Quoted 22 lines · Peng Fan
Quoted 7 lines
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to HS400 mode as well.
The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Quoted 8 lines
Did you practically verify this ? In my case, the boot partition access fails in HS200/HS400 mode (samsung and sandisk emmc, but I'd have to check the exact part number).
commit
01298da31d92ecc46cf9130d8cff68bc51698197
mmc: Change mode when switching to a boot partition
seems to confirm that too.I had tried to raise these concerns for that patch as well
(https://www.spinics.net/lists/linux-mmc/msg50432.html) but it was missed at that time.I did verify that kernel is not switching speeds on a dra7xx board. JJ and I have seen failures similar to yours in u-boot (which led to this patch) but not in kernel which makes me think that the fix was wrong. Have you verified with your setup in kernel?
Quoted 8 lines
Quoted 4 lines
No, but I'll add it to the list of things to look into.
In the meantime, this should go in anyway, to make the code consistent.
If we keep covering up the issue then it will never be solved. We need to get more data points and more expert opinions on this and take the pains to fix it.
The release is weeks away, this fix is trivial. If we want to do more intrusive changes, that's for next release anyway.
Quoted 10 lines
@Ulf we are seeing some failures when trying to access eMMC boot partitions at HS200/HS400 speed modes.
Do you know if there are limitations on accessing eMMC boot partitions at HS200/HS400 speed modes in kernel? Do you agree with my reading of the spec above?
Thanks,
Faiz
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Faiz AbbasQuoted 21 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 8 lines · Peng Fan
Quoted 8 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
There might be bug in U-Boot code.
Regards,
Peng.
Quoted 4 lines
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 31 lines · Peng Fan
Quoted 21 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 8 lines · Peng Fan
Quoted 8 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I would also like to hear from Jean why he originally introduced this for HS200 mode.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 40 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 7 lines
instead.
Quoted 2 lines
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Regards,
Peng.
Quoted 7 lines
I would also like to hear from Jean why he originally introduced this for HS200 mode.
--
Best regards,
Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 42 lines · Peng Fan
Quoted 42 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
instead.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Right.
But I would still like to know whether we can access the HW partitions in HS modes or not. And I would also like to know why we originally prevented it.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Peng FanPeng, Marek,
Quoted 42 lines · Peng Fan
Quoted 42 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
instead.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 51 lines · Faiz Abbas
Peng, Marek,
Quoted 48 lines · Peng Fan
Quoted 47 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
instead.
Quoted 2 lines
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
Quoted 6 lines
Quoted 2 lines
I'll pick up your patch in this release.
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
Quoted 4 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek,
Quoted 55 lines · Marek Vasut
Quoted 54 lines · Faiz Abbas
Peng, Marek,
Quoted 50 lines · Peng Fan
Quoted 40 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 7 lines
instead.
Quoted 2 lines
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 8 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 4 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.
Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 11 lines
Quoted 5 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Marek, Faiz,
Quoted 99 lines · Faiz Abbas
Hi Marek,
Quoted 48 lines · Marek Vasut
Quoted 47 lines · Faiz Abbas
Peng, Marek,
Quoted 44 lines · Peng Fan
Quoted 37 lines
partitions
Quoted 21 lines · Peng Fan
Quoted 21 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 8 lines · Peng Fan
Quoted 8 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 7 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 5 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 4 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 3 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.
Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 4 lines
Quoted 4 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.
Quoted 8 lines
Quoted 5 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv test_boot_part 'random 0x81000000 0x800000; mmc write 81000000 0 0x4000; mmc read 82000000 0 0x4000; cmp.b 81000000 82000000 0x800000' ; while run test_boot_part ; do echo -------------; done
I'll post the patch for the 'random' command.
If we could get this tested OK on most of the platforms that support HS200, I suggest that we remove this limitation.
JJ
Quoted 6 lines
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 137 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 108 lines · Faiz Abbas
Hi Marek,
Quoted 55 lines · Marek Vasut
Quoted 54 lines · Faiz Abbas
Peng, Marek,
Quoted 51 lines · Peng Fan
Quoted 42 lines
partitions
Quoted 23 lines · Peng Fan
Quoted 23 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode,
extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking
about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.Quoted 7 lines
Quoted 7 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it
needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 andHS400 not being supported here.
Quoted 8 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 7 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it
gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
release, but we should at least fix this in current release.I'll pick up your patch in this release.
Quoted 8 lines
Quoted 4 lines
The issue that Marek is facing is not a regression, is it? Are we really
going to merge something that we know to be wrong just so we are consistently wrong?First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 4 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 3 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.
Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 5 lines
Quoted 5 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Quoted 8 lines
Quoted 5 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
Quoted 7 lines
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneI'll post the patch for the 'random' command.
Do you think you can add a test.py test for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.
Quoted 2 lines
If we could get this tested OK on most of the platforms that support HS200, I suggest that we remove this limitation.
Yes, but not this close to the release. It might work on TI board(s), but it could very well break on other boards which we cannot test. I had stability issues with those HS200/HS400 modes, so I am seriously concerned about removing this limitation this close to the release.
I would much rather see a release where the eMMCs work stable, albeit slower, possibly with a downstream patch in some BSP , then a release where the eMMCs randomly fail when loading data from them .
I am happy to reword the commit message if that helps ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 148 lines · Marek Vasut
Quoted 136 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 108 lines · Faiz Abbas
Hi Marek,
Quoted 55 lines · Marek Vasut
Quoted 54 lines · Faiz Abbas
Peng, Marek,
Quoted 51 lines · Peng Fan
Quoted 42 lines
partitions
Quoted 23 lines · Peng Fan
Quoted 23 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode,
extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking
about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.Quoted 7 lines
Quoted 7 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it
needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 andHS400 not being supported here.
Quoted 8 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 7 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it
gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
release, but we should at least fix this in current release.I'll pick up your patch in this release.
Quoted 8 lines
Quoted 4 lines
The issue that Marek is facing is not a regression, is it? Are we really
going to merge something that we know to be wrong just so we are consistently wrong?First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 4 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 3 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.
Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 5 lines
Quoted 5 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Quoted 8 lines
Quoted 5 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
Quoted 7 lines
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneI'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.
Quoted 6 lines
Quoted 2 lines
If we could get this tested OK on most of the platforms that support HS200, I suggest that we remove this limitation.
Yes, but not this close to the release. It might work on TI board(s), but it could very well break on other boards which we cannot test. I had stability issues with those HS200/HS400 modes, so I am seriously concerned about removing this limitation this close to the release.
I agree. I would rather keep the limitation in place for this release as well
When all tests are in place, we will be able to confidently remove then during the next cycle.
Quoted 7 lines
I would much rather see a release where the eMMCs work stable, albeit slower, possibly with a downstream patch in some BSP , then a release where the eMMCs randomly fail when loading data from them .
I am happy to reword the commit message if that helps ?
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 180 lines · Jean-Jacques Hiblot
Quoted 171 lines · Marek Vasut
Quoted 158 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 135 lines · Faiz Abbas
Hi Marek,
Quoted 70 lines · Marek Vasut
Quoted 63 lines · Faiz Abbas
Peng, Marek,
Quoted 60 lines · Peng Fan
Quoted 60 lines
partitions
Quoted 29 lines · Peng Fan
Quoted 29 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsHi Marek, Peng,
Quoted 10 lines · Peng Fan
Quoted 10 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation ,
HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode,
extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking
about "boot operation" which is a way of getting data from the the
eMMC without going through the Device identification mode (Section
6.4.4) i.e. without sending any commands. All the host has to do is
hold the command line low in Pre-Idle mode to automatically receive
data at the preconfigured frequency and bus width.Quoted 9 lines
Quoted 9 lines
When U-boot is accessing the partition, it has already gone through
the Device identification mode and is in data transfer mode (i.e. it
needs to send commands for read/write to happen). In this case, we
need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 andHS400 not being supported here.
Quoted 11 lines
Yes, the spec does not mention this. It only mentions HS200/400 not
supported during boot operation.Quoted 7 lines
Also, I don't see linux kernel switching down speed when trying to
access a boot partition (unless its being very sneaky about it). So
if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is workinginstead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it
gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
release, but we should at least fix this in current release.Quoted 6 lines
Quoted 2 lines
I'll pick up your patch in this release.
The issue that Marek is facing is not a regression, is it? Are we really
going to merge something that we know to be wrong just so we are consistently wrong?Quoted 5 lines
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like
to hear from Jean the real reason why he added this filtering in the first place.I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 7 lines
That said, we're in rc4 , the release is just around the corner. I would
like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next,
please post it, I am happy to test it on the hardware I have available.I am not saying we try to fix it before this release. All I am saying is
that we don't mask real errors (none of which are regressions) with this
"fix" that we are not even sure of.Quoted 4 lines
Also note that this patch does not have any impact on general use case,
the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.Exceedingly, the general usecase is to put boot images in boot partition
and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If
my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 5 lines
Quoted 5 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Quoted 7 lines
Wrong, I want to debug this, I just don't want to do big changes in the
upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
Quoted 7 lines
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneI'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.Quoted 6 lines
Quoted 2 lines
If we could get this tested OK on most of the platforms that support HS200, I suggest that we remove this limitation.
Yes, but not this close to the release. It might work on TI board(s), but it could very well break on other boards which we cannot test. I had stability issues with those HS200/HS400 modes, so I am seriously concerned about removing this limitation this close to the release.
Quoted 5 lines
I agree. I would rather keep the limitation in place for this release as well
When all tests are in place, we will be able to confidently remove then during the next cycle.
All right, so how shall we proceed ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 166 lines · Marek Vasut
Quoted 165 lines · Jean-Jacques Hiblot
Quoted 164 lines · Marek Vasut
Quoted 163 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 135 lines · Faiz Abbas
Hi Marek,
Quoted 70 lines · Marek Vasut
Quoted 63 lines · Faiz Abbas
Peng, Marek,
Quoted 60 lines · Peng Fan
Quoted 60 lines
partitions
Quoted 29 lines · Peng Fan
Quoted 29 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsHi Marek, Peng,
Quoted 10 lines · Peng Fan
Quoted 10 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot
partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during boot operation. The
U-Boot code currently only applies this restriction to HS200
mode,
extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking
about "boot operation" which is a way of getting data from the the
eMMC without going through the Device identification mode (Section
6.4.4) i.e. without sending any commands. All the host has to do is
hold the command line low in Pre-Idle mode to automatically receive
data at the preconfigured frequency and bus width.Quoted 9 lines
Quoted 9 lines
When U-boot is accessing the partition, it has already gone through
the Device identification mode and is in data transfer mode (i.e. it
needs to send commands for read/write to happen). In this case, we
need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 andHS400 not being supported here.
Quoted 11 lines
Yes, the spec does not mention this. It only mentions HS200/400 not
supported during boot operation.Quoted 7 lines
Also, I don't see linux kernel switching down speed when trying to
access a boot partition (unless its being very sneaky about it). So
if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is workinginstead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it
gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
release, but we should at least fix this in current release.Quoted 6 lines
Quoted 2 lines
I'll pick up your patch in this release.
The issue that Marek is facing is not a regression, is it? Are we really
going to merge something that we know to be wrong just so we are consistently wrong?Quoted 5 lines
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like
to hear from Jean the real reason why he added this filtering in the first place.I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 7 lines
That said, we're in rc4 , the release is just around the corner. I would
like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next,
please post it, I am happy to test it on the hardware I have available.I am not saying we try to fix it before this release. All I am saying is
that we don't mask real errors (none of which are regressions) with this
"fix" that we are not even sure of.Quoted 4 lines
Also note that this patch does not have any impact on general use case,
the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.Exceedingly, the general usecase is to put boot images in boot partition
and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If
my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 5 lines
Quoted 5 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Quoted 7 lines
Wrong, I want to debug this, I just don't want to do big changes in the
upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; done
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
So IMO we should keep the limitation in place and add the limitation for HS400 and the python test in this release.
Then we can start working on a real fix.
JJ
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
If we could get this tested OK on most of the platforms that support HS200, I suggest that we remove this limitation.
Yes, but not this close to the release. It might work on TI board(s), but it could very well break on other boards which we cannot test. I had stability issues with those HS200/HS400 modes, so I am seriously concerned about removing this limitation this close to the release.
Quoted 5 lines
I agree. I would rather keep the limitation in place for this release as well
When all tests are in place, we will be able to confidently remove then during the next cycle.
All right, so how shall we proceed ?
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 190 lines · Jean-Jacques Hiblot
Quoted 182 lines · Marek Vasut
Quoted 181 lines · Jean-Jacques Hiblot
Quoted 180 lines · Marek Vasut
Quoted 179 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 146 lines · Faiz Abbas
Hi Marek,
Quoted 72 lines · Marek Vasut
Quoted 65 lines · Faiz Abbas
Peng, Marek,
Quoted 62 lines · Peng Fan
Quoted 62 lines
partitions
Quoted 30 lines · Peng Fan
Quoted 30 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsHi Marek, Peng,
Quoted 11 lines · Peng Fan
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot
partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during boot operation.
The
U-Boot code currently only applies this restriction to HS200
mode,
extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking
about "boot operation" which is a way of getting data from the the
eMMC without going through the Device identification mode (Section
6.4.4) i.e. without sending any commands. All the host has to do is
hold the command line low in Pre-Idle mode to automatically receive
data at the preconfigured frequency and bus width.Quoted 9 lines
Quoted 9 lines
When U-boot is accessing the partition, it has already gone through
the Device identification mode and is in data transfer mode (i.e. it
needs to send commands for read/write to happen). In this case, we
need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 andHS400 not being supported here.
Quoted 11 lines
Yes, the spec does not mention this. It only mentions HS200/400 not
supported during boot operation.Quoted 7 lines
Also, I don't see linux kernel switching down speed when trying to
access a boot partition (unless its being very sneaky about it). So
if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is workinginstead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or
what's it
gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
release, but we should at least fix this in current release.Quoted 6 lines
Quoted 2 lines
I'll pick up your patch in this release.
The issue that Marek is facing is not a regression, is it? Are we really
going to merge something that we know to be wrong just so we are consistently wrong?Quoted 6 lines
First of all, you established this is "wrong" without any real backing
except for your interpretation of the specification. I would still like
to hear from Jean the real reason why he added this filtering in the first place.I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Quoted 8 lines
That said, we're in rc4 , the release is just around the corner. I would
like to avoid big changes in the MMC subsystem , or any subsystem for
that matter. That's for next release , and if you have a patch for next,
please post it, I am happy to test it on the hardware I have available.I am not saying we try to fix it before this release. All I am saying is
that we don't mask real errors (none of which are regressions) with this
"fix" that we are not even sure of.Quoted 5 lines
Also note that this patch does not have any impact on general use case,
the regular bulk of the eMMC can be accessed at HS200/HS400, it's just
the boot partitions which are accessed in HS52 or lower.Exceedingly, the general usecase is to put boot images in boot partition
and root filesystem in the user data area. In that case, the boot area
is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If
my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.Having said that, if the maintainer still wants to pull this fix as is,
I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.Quoted 8 lines
Quoted 8 lines
Marek, I understand you do not want to debug this right now but this
patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 8 lines
Wrong, I want to debug this, I just don't want to do big changes in the
upcoming release this late in the release cycle. But if you propose a
patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 5 lines
Agreed on the no big changes this release. Hopefully we can also agree
on not having *this* change in the release either. I do not have a fix
yet but plan to look into this next week.Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also
at 192 MHztest context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ;
while runtest_boot_part; do echo -------------; doneQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.
Quoted 4 lines
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 4 lines
So IMO we should keep the limitation in place and add the limitation for HS400 and the python test in this release.
Then we can start working on a real fix.
Sounds good, thanks!
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 175 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Quoted 23 lines · Jean-Jacques Hiblot
Quoted 21 lines · Marek Vasut
Quoted 20 lines · Jean-Jacques Hiblot
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 15 lines · Faiz Abbas
Hi Marek,
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Faiz Abbas
Peng, Marek,
Quoted 8 lines · Peng Fan
Quoted 8 lines
partitions
Quoted 5 lines · Peng Fan
Quoted 5 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when
accessing boot partitionsHi Marek, Peng,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Peng Fan
Subject: [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during bootoperation.
Quoted 133 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 101 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 30 lines
Quoted 13 lines
Quoted 13 lines
The
U-Boot code currently only applies this restriction to
HS200 mode, extend this to
HS400 mode as well.
The spec in section 6.3.3 (according to my understanding)
is talking about "boot operation" which is a way of getting
data from the the eMMC without going through the Device
identification mode (Section
6.4.4) i.e. without sending any commands. All the host has
to do is hold the command line low in Pre-Idle mode to
automatically receive data at the preconfigured frequency
and bus width.Quoted 7 lines
Quoted 7 lines
When U-boot is accessing the partition, it has already gone
through the Device identification mode and is in data
transfer mode (i.e. it needs to send commands for
read/write to happen). In this case, we need to switch the
partition in Extended CSD to access the boot partition
(Section 6.2.5). The spec doesn't say anything about
HS200 andHS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 6 lines
Also, I don't see linux kernel switching down speed when
trying to access a boot partition (unless its being very
sneaky about it). So if you are seeing issues with
accessing boot partitions at
HS200/HS400 then you should probably look at how linux code
is workingQuoted 6 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting
platform) in kernel for additional data points.Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 4 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if
CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and
HS400 modes, and I would very much like to have it consistent in the upcoming release.I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 8 lines
Quoted 8 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch
descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 6 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.Quoted 4 lines
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 7 lines
Quoted 5 lines
So IMO we should keep the limitation in place and add the limitation for
HS400 and the python test in this release.Then we can start working on a real fix.
Sounds good, thanks!
So we all agree to take this patch first, right?
Thanks,
Peng.
Quoted 4 lines
--
Best regards,
Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Hi Peng, Marek,
Quoted 179 lines · Peng Fan
Quoted 179 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Quoted 23 lines · Jean-Jacques Hiblot
Quoted 21 lines · Marek Vasut
Quoted 20 lines · Jean-Jacques Hiblot
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 15 lines · Faiz Abbas
Hi Marek,
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Faiz Abbas
Peng, Marek,
Quoted 8 lines · Peng Fan
Quoted 8 lines
partitions
Quoted 5 lines · Peng Fan
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when
accessing boot partitionsHi Marek, Peng,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 03/06/19 12:04 PM, Peng Fan wrote:
Subject: [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during bootoperation.
Quoted 133 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 101 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 30 lines
Quoted 20 lines
The
U-Boot code currently only applies this restriction to
HS200 mode, extend this to
HS400 mode as well.
The spec in section 6.3.3 (according to my understanding)
is talking about "boot operation" which is a way of getting
data from the the eMMC without going through the Device
identification mode (Section
6.4.4) i.e. without sending any commands. All the host has
to do is hold the command line low in Pre-Idle mode to
automatically receive data at the preconfigured frequency
and bus width.When U-boot is accessing the partition, it has already gone
through the Device identification mode and is in data
transfer mode (i.e. it needs to send commands for
read/write to happen). In this case, we need to switch the
partition in Extended CSD to access the boot partition
(Section 6.2.5). The spec doesn't say anything about
HS200 andHS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions
HS200/400 not supported during boot operation.Also, I don't see linux kernel switching down speed when
trying to access a boot partition (unless its being very
sneaky about it). So if you are seeing issues with
accessing boot partitions at
HS200/HS400 then you should probably look at how linux code
is workingQuoted 6 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting
platform) in kernel for additional data points.Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 4 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if
CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and
HS400 modes, and I would very much like to have it consistent in the upcoming release.I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 8 lines
Quoted 8 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch
descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 6 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.Quoted 4 lines
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 4 lines
So IMO we should keep the limitation in place and add the limitation for
HS400 and the python test in this release.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Then we can start working on a real fix.
Sounds good, thanks!
So we all agree to take this patch first, right?
I agree with the condition that the patch description should record the history of why HS200 was disabled and be clear that HS400 is being disabled for consistency and not because the spec says it.
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
gauri.org>; Marek Vasut
Quoted 194 lines
<[email protected]>
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitionsHi Peng, Marek,
Quoted 15 lines · Peng Fan
Quoted 15 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Quoted 11 lines · Jean-Jacques Hiblot
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Jean-Jacques Hiblot
Quoted 7 lines · Marek Vasut
Quoted 6 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 3 lines · Faiz Abbas
Hi Marek,
On 11/06/19 3:34 PM, Marek Vasut wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines · Faiz Abbas
Quoted 7 lines
Peng, Marek,
Quoted 4 lines · Peng Fan
Quoted 4 lines
partitions
On 6/10/19 7:59 AM, Peng Fan wrote:
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 modewhen
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
accessing boot partitions
Hi Marek, Peng,
On 03/06/19 12:04 PM, Peng Fan wrote:
Subject: [PATCH] mmc: Avoid HS400 mode whenaccessing
Quoted 91 lines
Quoted 91 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during bootoperation.
Quoted 85 lines
Quoted 85 lines
Quoted 85 lines
Quoted 85 lines
Quoted 85 lines
Quoted 85 lines
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Quoted 37 lines
The
U-Boot code currently only applies this restriction to
HS200 mode, extend this to
HS400 mode as well.
The spec in section 6.3.3 (according to my understanding)
is talking about "boot operation" which is a way of
getting data from the the eMMC without going through the
Device identification mode (Section
6.4.4) i.e. without sending any commands. All the host
has to do is hold the command line low in Pre-Idle mode
to automatically receive data at the preconfigured
frequency and bus width.When U-boot is accessing the partition, it has already
gone through the Device identification mode and is in
data transfer mode (i.e. it needs to send commands for
read/write to happen). In this case, we need to switch
the partition in Extended CSD to access the boot
partition (Section 6.2.5). The spec doesn't say anything
about
HS200 and
HS400 not being supported here.
Yes, the spec does not mention this. It only mentions
HS200/400 not supported during boot operation.Also, I don't see linux kernel switching down speed when
trying to access a boot partition (unless its being very
sneaky about it). So if you are seeing issues with
accessing boot partitions at
HS200/HS400 then you should probably look at how linux
code is working
instead.
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current
release or what's it gonna be ? Like I said, we're in rc3,
it's fine to do bigger changes in next release, but we
should at least fix this in current release.I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting
platform) in kernel for additional data points.Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 5 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in
HS52 or lower.Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if
CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and
HS400 modes, and I would very much like to have it consistent in the upcoming release.I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this
patch.
Quoted 61 lines
Quoted 61 lines
Quoted 48 lines
Quoted 42 lines
Quoted 42 lines
Quoted 42 lines
Quoted 42 lines
Quoted 15 lines
Quoted 9 lines
Quoted 9 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch
descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 6 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.Quoted 4 lines
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 5 lines
So IMO we should keep the limitation in place and add the limitation for
HS400 and the python test in this release.Then we can start working on a real fix.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Sounds good, thanks!
So we all agree to take this patch first, right?
I agree with the condition that the patch description should record the history of why HS200 was disabled and be clear that HS400 is being disabled for consistency and not because the spec says it.
Since gitlab not ready, applied to https://github.com/MrVan/u-boot/releases/tag/mmc-6-19
With commit log modified as below:
"
U-Boot code currently only applies this restriction to HS200 mode,
extend this to HS400 mode as well.
Currently U-Boot code not support accessing boot partition in HS200/400 mode. This needs more check.
"
Regards,
Peng.
Quoted 3 lines
Thanks,
Faiz
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Peng FanQuoted 179 lines · Peng Fan
Quoted 179 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Quoted 23 lines · Jean-Jacques Hiblot
Quoted 21 lines · Marek Vasut
Quoted 20 lines · Jean-Jacques Hiblot
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 15 lines · Faiz Abbas
Hi Marek,
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Faiz Abbas
Peng, Marek,
Quoted 8 lines · Peng Fan
Quoted 8 lines
partitions
Quoted 5 lines · Peng Fan
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when
accessing boot partitionsHi Marek, Peng,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 03/06/19 12:04 PM, Peng Fan wrote:
Subject: [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during bootoperation.
Quoted 133 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 127 lines
Quoted 101 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 30 lines
Quoted 20 lines
The
U-Boot code currently only applies this restriction to
HS200 mode, extend this to
HS400 mode as well.
The spec in section 6.3.3 (according to my understanding)
is talking about "boot operation" which is a way of getting
data from the the eMMC without going through the Device
identification mode (Section
6.4.4) i.e. without sending any commands. All the host has
to do is hold the command line low in Pre-Idle mode to
automatically receive data at the preconfigured frequency
and bus width.When U-boot is accessing the partition, it has already gone
through the Device identification mode and is in data
transfer mode (i.e. it needs to send commands for
read/write to happen). In this case, we need to switch the
partition in Extended CSD to access the boot partition
(Section 6.2.5). The spec doesn't say anything about
HS200 andHS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions
HS200/400 not supported during boot operation.Also, I don't see linux kernel switching down speed when
trying to access a boot partition (unless its being very
sneaky about it). So if you are seeing issues with
accessing boot partitions at
HS200/HS400 then you should probably look at how linux code
is workingQuoted 6 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting
platform) in kernel for additional data points.Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 4 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if
CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and
HS400 modes, and I would very much like to have it consistent in the upcoming release.I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 8 lines
Quoted 8 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch
descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 6 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
I'll post the patch for the 'random' command.
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.Quoted 4 lines
I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 4 lines
So IMO we should keep the limitation in place and add the limitation for
HS400 and the python test in this release.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Then we can start working on a real fix.
Sounds good, thanks!
So we all agree to take this patch first, right?
I think so.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Peng FanQuoted 172 lines · Peng Fan
Quoted 172 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Quoted 22 lines · Jean-Jacques Hiblot
Quoted 21 lines · Marek Vasut
Quoted 20 lines · Jean-Jacques Hiblot
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Jean-Jacques Hiblot
Marek, Faiz,
Quoted 15 lines · Faiz Abbas
Hi Marek,
Quoted 12 lines · Marek Vasut
Quoted 11 lines · Faiz Abbas
Peng, Marek,
Quoted 8 lines · Peng Fan
Quoted 8 lines
partitions
Quoted 5 lines · Peng Fan
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when
accessing boot partitionsHi Marek, Peng,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 03/06/19 12:04 PM, Peng Fan wrote:
Subject: [PATCH] mmc: Avoid HS400 mode when accessing
boot partitionsAccording to JEDEC JESD84-B51.pdf section 6.3.3 Boot
operation ,
HS200 & HS400 mode is not supported during bootoperation.
Quoted 128 lines
Quoted 128 lines
Quoted 128 lines
Quoted 128 lines
Quoted 128 lines
Quoted 101 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 30 lines
Quoted 20 lines
The
U-Boot code currently only applies this restriction to
HS200 mode, extend this to
HS400 mode as well.
The spec in section 6.3.3 (according to my understanding)
is talking about "boot operation" which is a way of getting
data from the the eMMC without going through the Device
identification mode (Section
6.4.4) i.e. without sending any commands. All the host has
to do is hold the command line low in Pre-Idle mode to
automatically receive data at the preconfigured frequency
and bus width.When U-boot is accessing the partition, it has already gone
through the Device identification mode and is in data
transfer mode (i.e. it needs to send commands for
read/write to happen). In this case, we need to switch the
partition in Extended CSD to access the boot partition
(Section 6.2.5). The spec doesn't say anything about
HS200 andHS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions
HS200/400 not supported during boot operation.Also, I don't see linux kernel switching down speed when
trying to access a boot partition (unless its being very
sneaky about it). So if you are seeing issues with
accessing boot partitions at
HS200/HS400 then you should probably look at how linux code
is workingQuoted 6 lines
instead.
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 7 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting
platform) in kernel for additional data points.Quoted 5 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
Quoted 4 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if
CONFIG_SPL_MMC_HS200/HS400 is enabled.Quoted 4 lines
However, right now, the behavior is not consistent between HS200 and
HS400 modes, and I would very much like to have it consistent in the upcoming release.I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
Quoted 8 lines
Quoted 8 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch
descriptions)
and
2) Mask issues for people who could take the time to help debug this.Quoted 6 lines
Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available.
Can you send such a patch ?Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Have you tried to use the boot partitions with HS200 lately ?
I'm running a test on a DRA76 and haven't seen any issue. I wonder why it didn't work properly when I tested it back then.
I also rand the same test with Linux and checked that the clock was also at 192 MHz
test context:
The boot partition (8MB) is accessed in HS200 mode (real freq is measured at 192 MHz with a scope)
The data is fresh random data
The test command is:
setenv
test_boot_part'random0x810000000x800000; mmc write 81000000 00x4000; mmc read 82000000 00x4000; cmp.b 81000000 820000000x800000' ; while runtest_boot_part; do echo -------------; doneI'll post the patch for the 'random' command.
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Do you think you can add a
test.pytest for this ? Then I can continuously run this test on the boards I have available. It should also propagate onto nvidia and xilinx boards, which I think do HS modes too.I've worked on the python test for mmc writes today. I'll post it soon.
It looks like HS200 for boot part is not working well yet, at least on our DRA7 platforms.
That's what I was afraid of.
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
So IMO we should keep the limitation in place and add the limitation for
HS400 and the python test in this release.Then we can start working on a real fix.
Sounds good, thanks!
So we all agree to take this patch first, right?
right.
JJ
Quoted 7 lines
Thanks,
Peng.Quoted 3 lines
--
Best regards,
Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Faiz AbbasQuoted 67 lines · Faiz Abbas
Hi Marek,
Quoted 55 lines · Marek Vasut
Quoted 54 lines · Faiz Abbas
Peng, Marek,
Quoted 50 lines · Peng Fan
Quoted 40 lines
partitions
Quoted 22 lines · Peng Fan
Quoted 22 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 9 lines · Peng Fan
Quoted 9 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and
HS400 not being supported here.
Quoted 9 lines
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 5 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working
Quoted 7 lines
instead.
Quoted 2 lines
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I'll pick up your patch in this release.
Quoted 8 lines
Quoted 3 lines
The issue that Marek is facing is not a regression, is it? Are we really going to merge something that we know to be wrong just so we are consistently wrong?
First of all, you established this is "wrong" without any real backing except for your interpretation of the specification. I would still like to hear from Jean the real reason why he added this filtering in the first place.
Quoted 6 lines
I think Peng agrees with my interpretation. The backing for it being "right" is also JJ's and your interpretation of spec. The additional justification that I am trying to give is that there is no code to fallback in kernel and I have observed it working in kernel with no issues. I needed your observations (with any HS200/HS400 supporting platform) in kernel for additional data points.
Currently, I am not banking either way. If it's done one way or the other in some other project, that does not imply it's correct.
I would suggest you send a patch, we queue it for next release and test it on all available hardware. Then we'll see whether something breaks or not. This would give us ~3-4 months of time to test this extensively. Can you do that ?
Quoted 8 lines
Quoted 4 lines
That said, we're in rc4 , the release is just around the corner. I would like to avoid big changes in the MMC subsystem , or any subsystem for that matter. That's for next release , and if you have a patch for next, please post it, I am happy to test it on the hardware I have available.
I am not saying we try to fix it before this release. All I am saying is that we don't mask real errors (none of which are regressions) with this "fix" that we are not even sure of.
We are not sure whether this is a real error or not ... yet.
Quoted 8 lines
Quoted 3 lines
Also note that this patch does not have any impact on general use case, the regular bulk of the eMMC can be accessed at HS200/HS400, it's just the boot partitions which are accessed in HS52 or lower.
Exceedingly, the general usecase is to put boot images in boot partition and root filesystem in the user data area. In that case, the boot area is all that will be accessed in SPL at HS52 even if CONFIG_SPL_MMC_HS200/HS400 is enabled.
And that is better than non-working boot altogether.
Quoted 11 lines
Quoted 3 lines
However, right now, the behavior is not consistent between HS200 and HS400 modes, and I would very much like to have it consistent in the upcoming release.
I don't think consistency is a big enough reason to make this change. If my interpretation is correct, you would be masking real issues for everyone with this change and any platforms which enable HS400/HS200 will be blissfully unaware that they are not accessing data at the required speed. If things are failing for others, we can get their datapoints in kernel as well.
Quoted 3 lines
Having said that, if the maintainer still wants to pull this fix as is, I would at least change the commit message to reflect our uncertainty here so people are not mislead by this patch.
I can reword the commit message, got any suggestions ?
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines
Marek, I understand you do not want to debug this right now but this patch will 1) Mislead people into thinking that we know what we are doing (two patches went in with pretty confident patch descriptions) and
2) Mask issues for people who could take the time to help debug this.Wrong, I want to debug this, I just don't want to do big changes in the upcoming release this late in the release cycle. But if you propose a patch for next, I am happy to test it on the hardware I have available. Can you send such a patch ?
Quoted 3 lines
Agreed on the no big changes this release. Hopefully we can also agree on not having *this* change in the release either. I do not have a fix yet but plan to look into this next week.
Sorry, I cannot agree on this. Right now, we block boot partition access in one HS mode and not the other (HS200 and not HS400). That's clearly an omission when the HS400 mode was added and has to be fixed. I am more concerned about stability this close to the end of release cycle, than I am concerned about performance.
Please send a patch for next to remove this limitation and then I can test it on the boards I have available. Then we can collect data points and decide whether to leave that patch in next or not.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
In reply to Marek Vasut+ Jaehoon
Hi Marek,
Quoted 33 lines · Marek Vasut
Quoted 32 lines · Peng Fan
Quoted 20 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 7 lines · Peng Fan
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about "boot operation" which is a way of getting data from the the eMMC without going through the Device identification mode (Section 6.4.4) i.e. without sending any commands. All the host has to do is hold the command line low in Pre-Idle mode to automatically receive data at the preconfigured frequency and bus width.
Quoted 5 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The spec doesn't say anything about HS200 and HS400 not being supported here.
Yes, the spec does not mention this. It only mentions HS200/400 not supported during boot operation.
Quoted 4 lines
Also, I don't see linux kernel switching down speed when trying to access a boot partition (unless its being very sneaky about it). So if you are seeing issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.
Quoted 7 lines
Quoted 1 line
There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
I would also like to hear from Jean why he originally introduced this for HS200 mode.
Well I didn't look into the specs when working on this part.
I introduced it because of Jaehoon's remark on this thread:
https://lists.denx.de/pipermail/u-boot/2017-January/278672.html
Maybe Jaehoon can help us here understand why it is needed.
JJ
Quoted 1 line
PATCH 1/1 mmc: Avoid HS400 mode when accessing boot partitions
Quoted 56 lines · Jean-Jacques Hiblot
+ Jaehoon
Hi Marek,
Quoted 50 lines · Marek Vasut
Quoted 37 lines · Peng Fan
Quoted 25 lines
Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
Hi Marek, Peng,
Quoted 7 lines · Peng Fan
Quoted 7 lines
Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions
According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation , HS200 & HS400 mode is not supported during boot operation. The U-Boot code currently only applies this restriction to HS200 mode, extend this to
HS400 mode as well.The spec in section 6.3.3 (according to my understanding) is talking about
"boot operation" which is a way of getting data from the the eMMC without
going through the Device identification mode (Section 6.4.4) i.e. without
sending any commands. All the host has to do is hold the command line low in
Pre-Idle mode to automatically receive data at the preconfigured frequency
and bus width.Quoted 8 lines
When U-boot is accessing the partition, it has already gone through the Device identification mode and is in data transfer mode (i.e. it needs to send
commands for read/write to happen). In this case, we need to switch the partition in Extended CSD to access the boot partition (Section 6.2.5). The
spec doesn't say anything about HS200 and HS400 not being supported here.Yes, the spec does not mention this. It only mentions HS200/400 not supported
during boot operation.Quoted 7 lines
Quoted 6 lines
Also, I don't see linux kernel switching down speed when trying to access a
boot partition (unless its being very sneaky about it). So if you are seeing
issues with accessing boot partitions at HS200/HS400 then you should probably look at how linux code is working instead.There might be bug in U-Boot code.
So are we gonna leave this inconsistency in for current release or what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next release, but we should at least fix this in current release.
Quoted 7 lines
Quoted 2 lines
I would also like to hear from Jean why he originally introduced this for HS200 mode.
Well I didn't look into the specs when working on this part.
I introduced it because of Jaehoon's remark on this thread:
https://lists.denx.de/pipermail/u-boot/2017-January/278672.html
Aha
Quoted 1 line
Maybe Jaehoon can help us here understand why it is needed.
I'm afraid Jaehoon was MIA for a while :(
Signature · 2 lines
Best regards, Marek Vasut