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. Chapter 6.2 describes the "Partition Management" and that includes these settings (Chapter 6.2.4): GP_SIZE_MULT_GP0 - GP_SIZE_MULT_GP3 [154:143] PARTITIONS_ATTRIBUTE [156] EXT_PARTITIONS_ATTRIBUTE [53:52] ENH_START_ADDR [139:136] ENH_SIZE_MULT [159:157] Most particularly this chapter does *NOT* mention WR_REL_SET [167] at all! And neither does the chapter about 'reliable write' (7.4.78) refer to the partition setup. What I am looking for is a definite answer to whether my interpretation of the standard is correct or not. If it is correct, then the 'mmc write_reliability set' implementation is wrong. Additionally this: > /usr/bin/mmc write_reliability set -n 0 /dev/mmcblk1 should not do anything because of the -n (dry run-)option, but the write reliability bit is still being set. FYI: Our intention is to keep the User Data Area in one piece, i.e. no eMMC-partitioning at all, and enable 'reliable write', but no other enhancements, for the entire User Data Area. > > If I then type: > > > >> /usr/bin/mmc extcsd read /dev/mmcblk1 > > > > that reliable write bit is shown as set: > > > >> Write reliability setting register [WR_REL_SET]: 0x01 > > The bit gets set, but is it still on after a reboot? Yes, it is. Best regards 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�����٥