T1040QDS/U-QE: Add u-qe support to t1040qds
authorZhao Qiang <B45475@freescale.com>
Fri, 21 Mar 2014 08:21:46 +0000 (16:21 +0800)
committerYork Sun <yorksun@freescale.com>
Wed, 23 Apr 2014 00:58:49 +0000 (17:58 -0700)
Add u-qe support for t1040qds

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/t1040qds/t1040qds.c
include/configs/T1040QDS.h

index f1d7cdef6f942d828efca22b13787dfae21a5aa4..0e83d172dac53f582ac8f00f7b247893dfd95fb0 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/fsl_portals.h>
 #include <asm/fsl_liodn.h>
 #include <fm_eth.h>
+#include <hwconfig.h>
 #include <asm/mpc85xx_gpio.h>
 
 #include "../common/qixis.h"
@@ -90,6 +91,30 @@ int select_i2c_ch_pca9547(u8 ch)
        return 0;
 }
 
+static void qe_board_setup(void)
+{
+       u8 brdcfg15, brdcfg9;
+
+       if (hwconfig("qe") && hwconfig("tdm")) {
+               brdcfg15 = QIXIS_READ(brdcfg[15]);
+               /*
+                * TDMRiser uses QE-TDM
+                * Route QE_TDM signals to TDM Riser slot
+                */
+               QIXIS_WRITE(brdcfg[15], brdcfg15 | 7);
+       } else if (hwconfig("qe") && hwconfig("uart")) {
+               brdcfg15 = QIXIS_READ(brdcfg[15]);
+               brdcfg9 = QIXIS_READ(brdcfg[9]);
+               /*
+                * Route QE_TDM signals to UCC
+                * ProfiBus controlled by UCC3
+                */
+               brdcfg15 &= 0xfc;
+               QIXIS_WRITE(brdcfg[15], brdcfg15 | 2);
+               QIXIS_WRITE(brdcfg[9], brdcfg9 | 4);
+       }
+}
+
 int board_early_init_r(void)
 {
 #ifdef CONFIG_SYS_FLASH_BASE
@@ -197,6 +222,8 @@ int misc_init_r(void)
                }
        }
 
+       qe_board_setup();
+
        return 0;
 }
 
index 745a2f22f9e6c04776563395b45a7bf72172f8c5..6cc4e92ff28acdce9be598c176409f620dfe18f6 100644 (file)
@@ -601,6 +601,8 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_DPAA_FMAN
 #define CONFIG_SYS_DPAA_PME
 
+#define CONFIG_QE
+#define CONFIG_U_QE
 /* Default address of microcode for the Linux Fman driver */
 #if defined(CONFIG_SPIFLASH)
 /*
@@ -623,6 +625,7 @@ unsigned long get_board_ddr_clk(void);
 #else
 #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 #define CONFIG_SYS_FMAN_FW_ADDR                0xEFF00000
+#define CONFIG_SYS_QE_FW_ADDR          0xEFF10000
 #endif
 #define CONFIG_SYS_QE_FMAN_FW_LENGTH   0x10000
 #define CONFIG_SYS_FDT_PAD             (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)