Aw: Re: Re: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found. is25lp256d

Frank Smith smith-f at gmx.de
Mon Mar 19 10:48:43 PDT 2018


After some debugging, I figured out is25lp256d is not jedec jesd16b conform.

nor->addr_width = 3 is the result from the spi_nor_parse_bfpt and this is wrong. It should be 4.

	err = spi_nor_read_sfdp_dma_unsafe(nor,  addr, len, &bfpt);
	if (err < 0)
		return err;

	/* Fix endianness of the BFPT DWORDs. */
	for (i = 0; i < BFPT_DWORD_MAX; i++)
		bfpt.dwords[i] = le32_to_cpu(bfpt.dwords[i]);

        /* Number of address bytes. */
	switch (bfpt.dwords[BFPT_DWORD(1)] & BFPT_DWORD1_ADDRESS_BYTES_MASK) {
	case BFPT_DWORD1_ADDRESS_BYTES_3_ONLY:  <-- this is not right should be 3 or 4
		nor->addr_width = 3;
		break;

	case BFPT_DWORD1_ADDRESS_BYTES_4_ONLY:
		nor->addr_width = 4;
		break;

	default:
		break;
	}


I got it working with the following hack:

sei-nor.h
#define SNOR_MFR_ISSI	0x9d 

spi-nor.c:
{ "is25lp256d", INFO(0x9d6019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_4B_OPCODES) },

spi_nor_init_params(){
..
if(JEDEC_MFR(info)== SNOR_MFR_ISSI)
   nor->addr_width = 0;
}



More information about the linux-mtd mailing list