For now there are three boards supported: Early -PB board used schematic RevC(x) and it's PCBA rev4.0. Now -PB board used schematic RevD(x) and it's PCBA rev5.0. Now -PC board used schematic RevD(x) and it's PCBA rev5.0.
All RevD(x) boards have same clock setting on bank1 and bank2, RevC(x) board has different clock setting on two banks, PCBA can be used to distinguish the boards, PCBA could be increased on RevD(x) board in future, but RevC(x) board will never has PCBA > 4. Signed-off-by: Shaohui Xie <shaohui....@freescale.com> --- board/freescale/p2041rdb/p2041rdb.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index a706a6d..8549639 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -84,7 +84,10 @@ int checkboard(void) }; unsigned int clock = (sw >> (2 * i)) & 3; - printf("Bank%u=%sMhz ", i+1, freq[i][clock]); + if ((i == 1) && (CPLD_READ(pcba_ver) >= 5)) + printf("Bank%u=%sMhz ", i+1, freq[i-1][clock]); + else + printf("Bank%u=%sMhz ", i+1, freq[i][clock]); } puts("\n"); @@ -227,6 +230,16 @@ int misc_init_r(void) "'00' is unsupported\n"); else actual[i] = freq[i][clock]; + + /* + * RevD(x) board has a different clock setting with RevC(x) + * board, CPLD on RevD(x) board has pcba_ver >= 5. RevC(x) + * board has pcba_ver = 4, it can be used to distinguish + * the two boards. + */ + if ((i == 1) && (CPLD_READ(pcba_ver) >= 5)) + /* RevD(x) board bank2 frequency */ + actual[i] = freq[i-1][clock]; } for (i = 0; i < NUM_SRDS_BANKS; i++) { -- 1.8.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot