]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/t104xrdb/t104xrdb.c
Merge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master'
[karo-tx-uboot.git] / board / freescale / t104xrdb / t104xrdb.c
index 6e29d6410775511b263ccb09da6bf5fd6ed17abe..a5e5fffac4c8fc48da640d8a89b59d389acf234b 100644 (file)
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
 #include <fm_eth.h>
+#include <asm/mpc85xx_gpio.h>
 
 #include "t104xrdb.h"
+#include "cpld.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int checkboard(void)
 {
        struct cpu_type *cpu = gd->arch.cpu;
+       u8 sw;
 
        printf("Board: %sRDB\n", cpu->name);
+       printf("Board rev: 0x%02x CPLD ver: 0x%02x, ",
+              CPLD_READ(hw_ver), CPLD_READ(sw_ver));
+
+       sw = CPLD_READ(flash_ctl_status);
+       sw = ((sw & CPLD_LBMAP_MASK) >> CPLD_LBMAP_SHIFT);
+
+       if (sw <= 7)
+               printf("vBank: %d\n", sw);
+       else
+               printf("Unsupported Bank=%x\n", sw);
+
        return 0;
 }
 
@@ -91,3 +105,14 @@ void ft_board_setup(void *blob, bd_t *bd)
        fdt_fixup_fman_ethernet(blob);
 #endif
 }
+
+#ifdef CONFIG_DEEP_SLEEP
+void board_mem_sleep_setup(void)
+{
+       /* does not provide HW signals for power management */
+       CPLD_WRITE(misc_ctl_status, (CPLD_READ(misc_ctl_status) & ~0x40));
+       /* Disable MCKE isolation */
+       gpio_set_value(2, 0);
+       udelay(1);
+}
+#endif