[MinnowBoard] EFI SPI PROTOCOL Issue

vijaikumar k vijaikumar.k at mistralsolutions.com
Fri Jun 6 15:15:51 UTC 2014


Hopefully I found the issue which was causing the problem. We should pass
the index of the opcode to be used to that API, here they have passed the
opcode itself, Hope the developers will fix this minor bug in their next
release.
The code should be as follows: Pass *SPI_DEVICE_WRITE_STATUS_CMD_INDEX as
3rd argument instead of  **SPI_FLASH_PART_OPCODE_WRITE_STATUS*

Status = mSpiProtocol->Execute (
      mSpiProtocol,
      SPI_DEVICE_READ_STATUS_CMD_INDEX,
      *SPI_DEVICE_WRITE_STATUS_CMD_INDEX*,
      SPI_DEVICE_PREFIX_OP_WRITE_S_EN_INDEX,
      TRUE,
      TRUE,
      TRUE,
      0,
      sizeof (Data),
      &Data,
      EnumSpiRegionAll
      );

Regards
Vijai Kumar K


On Wed, Jun 4, 2014 at 7:15 PM, vijaikumar k <
vijaikumar.k at mistralsolutions.com> wrote:

> Hi All,
>           In Minnowboard EFI we have got EFI_SPI_PROTOCOL, Inside
> IntelE6xxRuPkg/SpiDeviceDxe folder we have SpiDeviceDxe.c file. It has a
> function called InitSpiDevice which has the following line of code which
> claims to remove write protection in SPI flash chip.
> *Status = mSpiProtocol->Execute (*
> *      mSpiProtocol,*
> *      SPI_DEVICE_READ_STATUS_CMD_INDEX,*
> *  SPI_FLASH_PART_OPCODE_WRITE_STATUS,*
> *      SPI_DEVICE_PREFIX_OP_WRITE_S_EN_INDEX,*
> *      TRUE,*
> *      TRUE,*
> *      TRUE,*
> *      0,*
> *      sizeof (Data),*
> *      &Data,*
> *      EnumSpiRegionAll*
> *      );*
> By default WinBond is Not write protected on powerup (i.e BP0 BP1 BP2 are
> zero). I tried writing some value (0x55) into the Status Register using the
> above API, when i read back I should get 54. But I get "02". Is the API
> actually working?? I tried wiring up a different flash "Micron" and I get
> the same 02 after writing 55. Has the API been validated?
>  .
> Regards
> Vijai Kumar K
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.elinux.org/pipermail/elinux-minnowboard/attachments/20140606/884dfe45/attachment.html>


More information about the elinux-MinnowBoard mailing list