> -----Original Message----- > From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx] > Sent: Friday, November 21, 2014 3:16 PM > To: Alex Lemberg > Cc: linux-mmc; Chris Ball; Avi Shchislowski > Subject: Re: [PATCH 1/1] Production State Awareness support in host side > > On 19 November 2014 11:58, Alex Lemberg <Alex.Lemberg@xxxxxxxxxxx> > wrote: > > > > > >> -----Original Message----- > >> From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx] > >> Sent: Wednesday, November 19, 2014 11:59 AM > >> To: Alex Lemberg > >> Cc: linux-mmc; Chris Ball; Avi Shchislowski > >> Subject: Re: [PATCH 1/1] Production State Awareness support in host > >> side > >> > >> On 18 November 2014 19:41, Alex Lemberg <Alex.Lemberg@xxxxxxxxxxx> > >> wrote: > >> > Hi Ulf, > >> > > >> >> -----Original Message----- > >> >> From: Ulf Hansson [mailto:ulf.hansson@xxxxxxxxxx] > >> >> Sent: Monday, November 17, 2014 3:34 PM > >> >> To: Avi Shchislowski > >> >> Cc: linux-mmc; Chris Ball; Alex Lemberg > >> >> Subject: Re: [PATCH 1/1] Production State Awareness support in > >> >> host side > >> >> > >> >> On 17 November 2014 13:52, Avi Shchislowski > >> >> <avi.shchislowski@xxxxxxxxxxx> > >> >> wrote: > >> >> > Adding support for PSA (Production State Awareness) feature for > >> >> > all eMMC devices with revision >=5.0 In this patch the eMMC > >> >> > driver will check if device was completed its Production State > >> >> > mode, and will switch it to Normal (field) mode. > >> >> > Switching to normal mode signal the device to complete its work > >> >> > in production mode and start working in regular performance mode. > >> >> > >> >> Please add some detail to what this patch does. Additionally why it's > needed. > >> > > >> > In this patch driver should recognize if eMMC device (Rev >=5.0) > >> > was not switched to Normal (0x00) PSA mode by storage vendor or > >> > Programmer > >> house. > >> > For this, we are checking if device was leaved in > >> > PRE_SOLDERING_POST_WRITES (0x02) state - represents a state in > >> > which the device is in production and the host (usually programmer) > >> > completed to > >> load the content to the device. > >> > The host (usually programmer) sets the device to this state after > >> > content was loaded and just before soldering. > >> > After soldering the device to real host (not programmer), the > >> > device should be switched to Normal (0x00) mode. > >> > The Normal (0x00) mode of PSA register represents a state in which > >> > the device is running in the field and uses “regular” operations. > >> > Leaving device in PRE_SOLDERING_POST_WRITES (0x02) might not allow > >> > to host write content to the device. > >> > > >> > More details about PSA feature can be found in eMMC 5.0 spec (Jedec: > >> > JESD84-B50.pdf) > >> > http://www.jedec.org/standards-documents/technology-focus-areas/fla > >> > sh- > >> > memory-ssds-ufs-emmc/e-mmc > >> > > >> > Please let us know if more details required. > >> > >> Okay, that was far better. > >> > >> I am not so sure we should finalize the production phase while > >> initializing the eMMC card like this. > >> > >> Certainly we should check the PSA state, but I think we should return > >> an error if we think the device hasn’t completed production. It > >> should be the responsibility for the "programming tools" to finalize the > production, right!? > > > > According to eMMC spec, the switch to NORMAL should be done after device > soldering to final host (not programmer). > > Please refer to "Figure 32 — Recommended Soldering procedure" in > eMMC5.0 specification document. > > Also, since we are dealing with only "field" host here, we are not > touching/switching any other modes of PSA, but only Normal (field). > > This code should run only once - in the beginning of device life cycle. > > I get your point, but I am not so sure. > > To me, I wouldn't trust that the platform binaries has been successfully > programmed to the device, unless the programmer tool takes care of switching > the device to "normal". > Thanks Ulf! Also, please note - PSA PRE_SOLDERING_POST_WRITES mode intent to save device pre-loaded content during the soldering process. Flash data can be corrupted due to soldering procedure high temperature. So switching to Normal cannot be done by external programmer. BTW, I have resubmitted the patch again, now with correct subject prefix, and some additional fixes. > What does other people think? > > Kind regards > Uffe ��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥