]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mtd: rawnand: meson: read/write access for boot ROM pages
authorArseniy Krasnov <avkrasnov@salutedevices.com>
Tue, 7 May 2024 23:09:03 +0000 (02:09 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 27 May 2024 11:52:11 +0000 (13:52 +0200)
commit04a81b4f9ba1a473af7715168306c23ca4e15a25
treea6d6f177085199727989232219f826f71f1d53aa
parent2234585f5c12f2a633fff715cca32ce0b40cfa29
mtd: rawnand: meson: read/write access for boot ROM pages

Boot ROM on Meson needs some pages to be read/written in a special mode:
384 byte ECC mode (so called "short" by Amlogic) and with scrambling
enabled. Such pages are located on the chip in the following way (for
example):

[ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ]
  ^           ^           ^           ^

pX is page number "X". "^" means "special" page used by boot ROM - e.g.
every 2nd page in the range of [0, 7]. Step (2 here) and last page in
range is read from the device tree.

Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-4-avkrasnov@salutedevices.com
drivers/mtd/nand/raw/meson_nand.c