cmd_nandbcb: Support secondary boot address of imx8mn
authorMichael Trimarchi <michael@amarulasolutions.com>
Fri, 7 Jan 2022 17:27:17 +0000 (18:27 +0100)
committerStefano Babic <sbabic@denx.de>
Sat, 5 Feb 2022 12:38:39 +0000 (13:38 +0100)
commit02737ac86d016deaa93bc308daa68bde13cee30c
treef7206dc748991b5f1255f0e3ad16de1c33888738
parent0be742d06d9a8d4ca8048422a55305a8c4ac571b
cmd_nandbcb: Support secondary boot address of imx8mn

Add support of secondary boot address for imx8mn. The secondary
boot address is hardcoded in the fuse. The value is calculated
from there according to the following description:

The fuse IMG_CNTN_SET1_OFFSET (0x490[22:19]) is defined as follows:
- Secondary boot is disabled if fuse value is bigger than 10, n = fuse
  value bigger than 10.
- n == 0: Offset = 4MB
- n == 2: Offset = 1MB
- Others & n <= 10 : Offset = 1MB*2^n
- For FlexSPI boot, the valid values are: 0, 1, 2, 3, 4, 5, 6, and 7.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
arch/arm/mach-imx/cmd_nandbcb.c