diff options
author | Kuldeep Singh <kuldeep.singh@nxp.com> | 2021-08-10 11:20:11 +0530 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2021-08-18 15:55:15 +0530 |
commit | 3bd5ea566eeec9373c7413d383f02096f5f9aaa4 (patch) | |
tree | a5b6d350893cdf98e0adb59a6ab47f5317b33b3c /board | |
parent | 8ae83cc5af56abe3334dbe48e03407f7ff641c24 (diff) | |
download | u-boot-3bd5ea566eeec9373c7413d383f02096f5f9aaa4.zip u-boot-3bd5ea566eeec9373c7413d383f02096f5f9aaa4.tar.gz u-boot-3bd5ea566eeec9373c7413d383f02096f5f9aaa4.tar.bz2 |
board: T4240rdb: Extend cs4340_get_fw_addr() functionality
T4240RDB supports booting from 2 nor banks(default and altbank). The
corresponding defconfig can only have one entry defined and therefore,
extend cs4340_get_fw_addr() function to overwrite firmware address which
will be later used in cortina firmware.
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/t4rdb/t4240rdb.c | 19 | ||||
-rw-r--r-- | board/freescale/t4rdb/t4rdb.h | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 6ab35ca..20ce752 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -151,3 +151,22 @@ void board_detail(void) break; } } + +ulong *cs4340_get_fw_addr(void) +{ + ulong cortina_fw_addr = CONFIG_CORTINA_FW_ADDR; + +#ifdef CONFIG_SYS_CORTINA_FW_IN_NOR + u8 sw; + + sw = CPLD_READ(vbank); + sw = sw & CPLD_BANK_SEL_MASK; + + if (sw == 0) + cortina_fw_addr = CORTINA_FW_ADDR_IFCNOR; + else if (sw == 4) + cortina_fw_addr = CORTINA_FW_ADDR_IFCNOR_ALTBANK; +#endif + + return (ulong *)cortina_fw_addr; +} diff --git a/board/freescale/t4rdb/t4rdb.h b/board/freescale/t4rdb/t4rdb.h index 3f1fa7b..06779f5 100644 --- a/board/freescale/t4rdb/t4rdb.h +++ b/board/freescale/t4rdb/t4rdb.h @@ -11,6 +11,9 @@ #define CONFIG_SYS_NUM_FM1_DTSEC 4 #define CONFIG_SYS_NUM_FM2_DTSEC 4 +#define CORTINA_FW_ADDR_IFCNOR 0xefe00000 +#define CORTINA_FW_ADDR_IFCNOR_ALTBANK 0xebf00000 + void fdt_fixup_board_enet(void *blob); void pci_of_setup(void *blob, struct bd_info *bd); |