* Returns a string with memory type preceded by a space sign
*/
const char* print_mem_type(void){
+/*
+ * WR720N v3 (CH version) has wrong bootstrap configuration,
+ * so the memory type cannot be recognized automatically
+ */
+#if defined(CONFIG_FOR_TPLINK_WR720N_V3)
+ return " DDR 16-bit";
+#else
unsigned int reg_val;
reg_val = (ar7240_reg_rd(HORNET_BOOTSTRAP_STATUS) & HORNET_BOOTSTRAP_MEM_TYPE_MASK) >> HORNET_BOOTSTRAP_MEM_TYPE_SHIFT;
return "";
break;
}
+#endif /* defined(CONFIG_FOR_TPLINK_WR720N_V3) */
}
li t8, CFG_DDR_CONFIG2_VAL;
set_mem(0xB8000004, t8);
+/*
+ * WR720N v3 (CH version) has wrong bootstrap configuration,
+ * so the memory type cannot be recognized automatically
+ */
+#if !defined(CONFIG_FOR_TPLINK_WR720N_V3)
mem_type:
// TODO: what about SDRAM?
// 0x180600AC (BOOT_STRAP, p. 81)
nop
jr ra
+#endif /* !defined(CONFIG_FOR_TPLINK_WR720N_V3) */
ddr1_config:
// Precharge All