]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: spi-nor-core: Rework s25hx_t_post_bfpt_fixup() for flash's internal address...
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Thu, 1 Sep 2022 06:05:33 +0000 (15:05 +0900)
committerJagan Teki <jagan@edgeble.ai>
Sun, 23 Oct 2022 05:20:38 +0000 (10:50 +0530)
commit50e780b6dae2e43498461247a81bebb732cdac37
tree6eb1eb49ec43e5e09915b242ae2ff4e7b7571d1a
parentbf73beda89678fd7f52d7695d48ea42cf74f4612
mtd: spi-nor-core: Rework s25hx_t_post_bfpt_fixup() for flash's internal address mode

The flash's internal address mode is tracked by nor->add_mode_nbytes and
it is set to 3 in BFPT parse. SEMPER multi-die package parts (>1Gb) are
3- or 4-byte address mode by default, depending on model number. We need
to make sure that 4-byte address mode is used for multi-die package parts.

For single-die package parts (<=1Gb), registers can be accessed by 3-byte
address. Read, program, and erase use the 4B opcodes that always take
4-byte address regardless of flash's internal address mode.

Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-core.c