]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: spi-nor-core: Rework spansion_read/write_any_reg() to use addr_mode_nbytes
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Thu, 1 Sep 2022 06:05:32 +0000 (15:05 +0900)
committerJagan Teki <jagan@edgeble.ai>
Sun, 23 Oct 2022 05:20:26 +0000 (10:50 +0530)
commitf58e7b24faae2f01f59182405fb0a11ff2707cb7
tree4abce005d683970bd3a58b33a202232766290019
parent4d60001fdf0c13ab1ccf720bb3cd6e5d385386bb
mtd: spi-nor-core: Rework spansion_read/write_any_reg() to use addr_mode_nbytes

Read/Write Any Register commands take 3- or 4- byte address depending on
flash's internal address mode. The nor->addr_width tracks number of
address bytes used in read/program/erase ops that can be 4
(with 4B opcodes) regardless of flash's internal address mode. The
nor->addr_mode_nbytes tracks flash's internal address mode so replace
nor->addr_width by that.

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