]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mtd: nand: denali: allow to override revision number
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 30 Mar 2017 06:45:57 +0000 (15:45 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:37 +0000 (14:18 +0200)
commite7beeeec854c40c28caa53bd84fdf26e9e459f06
tree3e473fee320968bee3d762306697cf16e6f3b4b8
parent3f5c35819fc37d5f35680a55327c940b6e8fad41
mtd: nand: denali: allow to override revision number

Commit 271707b1d817 ("mtd: nand: denali: max_banks calculation
changed in revision 5.1") added a revision check to support the
new max_banks encoding.  Its git-log states "The encoding of
max_banks changed in Denali revision 5.1".

There are exceptional cases, for example, the revision register on
some UniPhier SoCs says the IP is 5.0 but the max_banks is encoded
in the new format.

This IP updates the resister specification from time to time (often
breaking the backward compatibility), but the revision number is not
incremented correctly.

The max_banks is not only the case that needs revision checking.
Let's allow to override an incorrect revision number.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/denali.c
drivers/mtd/nand/denali.h
drivers/mtd/nand/denali_dt.c