Message ID | 1458632319-24866-48-git-send-email-jteki@openedev.com |
---|---|
State | Deferred |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
diff --git a/drivers/mtd/spi-nor/sandbox.c b/drivers/mtd/spi-nor/sandbox.c index cc7b2a4..8bd06f4 100644 --- a/drivers/mtd/spi-nor/sandbox.c +++ b/drivers/mtd/spi-nor/sandbox.c @@ -362,7 +362,8 @@ static int sandbox_sf_xfer(struct udevice *dev, unsigned int bitlen, debug(" id: off:%u tx:", sbsf->off); if (sbsf->off < IDCODE_LEN) { /* Extract correct byte from ID 0x00aabbcc */ - id = sbsf->data->jedec >> + id = ((JEDEC_MFR(sbsf->data) << 16) | + JEDEC_ID(sbsf->data)) >> (8 * (IDCODE_LEN - 1 - sbsf->off)); } else { id = 0;
This patch fix the id exctract from spi_nor_info ids. Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Jagan Teki <jteki@openedev.com> --- drivers/mtd/spi-nor/sandbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)