t1040d4rdb: assign muxed pins to qe-tdm when set hwconfig qe-tdm
qe-tdm is muxed with diu, if hwconfig setted as qe-tdm,
assign muxed pins to qe-tdm, then delete diu node from
device tree.
Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index d982dfc..3227652 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -6,12 +6,14 @@
#include <common.h>
#include <command.h>
+#include <hwconfig.h>
#include <netdev.h>
#include <linux/compiler.h>
#include <asm/mmu.h>
#include <asm/processor.h>
#include <asm/cache.h>
#include <asm/immap_85xx.h>
+#include <asm/fsl_fdt.h>
#include <asm/fsl_law.h>
#include <asm/fsl_serdes.h>
#include <asm/fsl_portals.h>
@@ -110,6 +112,12 @@
MISC_CTL_SG_SEL | MISC_CTL_AURORA_SEL);
#if defined(CONFIG_T1040D4RDB)
+ if (hwconfig("qe-tdm")) {
+ CPLD_WRITE(sfp_ctl_status, CPLD_READ(sfp_ctl_status) |
+ MISC_MUX_QE_TDM);
+ printf("QECSR : 0x%02x, mux to qe-tdm\n",
+ CPLD_READ(sfp_ctl_status));
+ }
/* Mask all CPLD interrupt sources, except QSGMII interrupts */
if (CPLD_READ(sw_ver) < 0x03) {
debug("CPLD SW version 0x%02x doesn't support int_mask\n",
@@ -149,5 +157,7 @@
fdt_fixup_fman_ethernet(blob);
#endif
+ if (hwconfig("qe-tdm"))
+ fdt_del_diu(blob);
return 0;
}