common/board_f.c: modify the macro to use get_clocks() more common
[oweals/u-boot.git] / board / freescale / t4rdb / t4240rdb.c
index afef7e93d03b6efe06d2b2c913fdff50a2d61211..fac442bfc8c8e9ab68eda0a9be8ad5fb74914a28 100644 (file)
 #include <fm_eth.h>
 
 #include "t4rdb.h"
+#include "cpld.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int checkboard(void)
 {
        struct cpu_type *cpu = gd->arch.cpu;
+       u8 sw;
 
        printf("Board: %sRDB, ", cpu->name);
+       printf("Board rev: 0x%02x CPLD ver: 0x%02x%02x, ",
+              CPLD_READ(hw_ver), CPLD_READ(sw_maj_ver), CPLD_READ(sw_min_ver));
+
+       sw = CPLD_READ(vbank);
+       sw = sw & CPLD_BANK_SEL_MASK;
+
+       if (sw <= 7)
+               printf("vBank: %d\n", sw);
+       else
+               printf("Unsupported Bank=%x\n", sw);
 
        puts("SERDES Reference Clocks:\n");
        printf("       SERDES1=100MHz SERDES2=156.25MHz\n"
@@ -76,7 +88,7 @@ int misc_init_r(void)
        return 0;
 }
 
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
 {
        phys_addr_t base;
        phys_size_t size;
@@ -99,6 +111,8 @@ void ft_board_setup(void *blob, bd_t *bd)
        fdt_fixup_fman_ethernet(blob);
        fdt_fixup_board_enet(blob);
 #endif
+
+       return 0;
 }
 
 /*