]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: freescale: p1_p2_rdb_pc: Detect both P2020 SD switch configurations
authorPali Rohár <pali@kernel.org>
Thu, 7 Apr 2022 10:16:15 +0000 (12:16 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 26 Apr 2022 11:48:39 +0000 (17:18 +0530)
As written in comment, P2020 has two possible SD switch configurations.
Extend code to detect both of them.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
include/configs/p1_p2_rdb_pc.h

index 1e6dfe87d8b0722b04b04b8011c04696ef241a3c..dde0c1dcd2dfbaa6f35b97a84389d29d4ee5df8d 100644 (file)
@@ -216,6 +216,10 @@ int checkboard(void)
        puts("rom_loc: ");
        if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD) {
                puts("sd");
+#ifdef __SW_BOOT_SD2
+       } else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SD2) {
+               puts("sd");
+#endif
 #ifdef __SW_BOOT_SPI
        } else if ((val & (~__SW_BOOT_MASK)) == __SW_BOOT_SPI) {
                puts("spi");
index 81dc0177c0ceb812b6a42e801abdc5748f4a1275..cc703309e3e27499456bae93dda52075c8f3e92b 100644 (file)
@@ -57,7 +57,8 @@
 #define __SW_BOOT_MASK         0x03
 #define __SW_BOOT_NOR          0xc8
 #define __SW_BOOT_SPI          0x28
-#define __SW_BOOT_SD           0x68 /* or 0x18 */
+#define __SW_BOOT_SD           0x68
+#define __SW_BOOT_SD2          0x18
 #define __SW_BOOT_NAND         0xe8
 #define __SW_BOOT_PCIE         0xa8
 #define CONFIG_SYS_L2_SIZE     (512 << 10)