Hi Tomas, On Wed, 2017-03-22 at 13:25 +0200, Tomas Melin wrote: > On 03/22/2017 12:41 PM, Brinkmann, Harald wrote: > > On Wed, 2017-03-22 at 11:13 +0200, Tomas Melin wrote: > >> On 03/20/2017 05:40 PM, Brinkmann, Harald wrote: > >>> > >>> I am having problems with the 'mmc' userspace command in mmc-utils. > >>> This call: > >>> > >>>> /usr/bin/mmc write_reliability set -y 0 /dev/mmcblk1 > >>> > >>> results in: > >>> > >>>> setting OTP PARTITION_SETTING_COMPLETED! > >>>> Setting OTP PARTITION_SETTING_COMPLETED failed on /dev/mmcblk1 > >>> > >>> Which is not too surprising, since I only want to set the write > >>> reliability bit and did not touch any (mmc-)partition information, so > >>> that it probably still is invalid. > >> > >> My experience is that you need to first do the partitioning before the write > >> reliability flag can be set. This is because the partition for which the write > >> reliability gets set, first needs to be configured for enhanced mode (enh_area set). > > > > Yes, that is what the mmc utility makes you do, but I think is not > > supported by the standard. I am looking at "Embedded Multi-Media Card > > (e.MMC) Electrical Standard (5.1)" JESD84-B51. > > From Section 6.6.8 Data Write in the same standard: > > "...This write must happen as part > of the partitioning process and must occur before the > PARTITION_SETTING_COMPLETED bit is set. > The changes made to the WR_REL_SET register will not have an impact until the > partitioning process is > complete (i.e., after the power cycle has occurred and the partitioning has > completed successfully). Data > reliability settings for partitions that do not exist in the device have no > impact on the device." Yes! That's the sentence I have been looking for. Thank you! > So the setting of WR_REL_SET is connected to the partitioning of the device. And > as long as the partitioning is not set, iirc the PARTITION_SETTING_COMPLETED bit > will not be accepted to be set by the device. I will play with that and see what happens. But on a slightly different matter in the same chapter it also says: "The host has the option of changing the reliability of the writes in one or more partitions on the device. The entire register is considered to be write once so the host has one opportunity to write all of the bits in the register. (Separate writes to change individual bits are not permitted)" However, 'mmc write_reliability set' will only set one bit at a time. Thanks again, Tomas. Regards, Harald -- i.A. Harald Brinkmann BST eltromat International GmbH Werk Leopoldshöhe Herforder Straße 249-251 D-33818 Leopoldshöhe T: +49 (5208) 987-513 E: harald.brinkmann@xxxxxxxxxxxxxxxxxxxxx W: http://www.bst-eltromat.com _______________________________________________________ Amtsgericht Bielefeld, HRB Nr. 30830 Geschäftsführer Kristian Jünke, Dr. Johann-Carsten Kipp, Dr. Gunter Tautorus Sitz der Gesellschaft: Bielefeld Vertrauliche E-Mail von BST eltromat International GmbH ��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥