
2 Feb
2011
2 Feb
'11
7:13 p.m.
On Feb 2, 2011, at 11:53 AM, Haiying Wang wrote:
On Wed, 2011-02-02 at 11:27 -0600, Kumar Gala wrote:
+void cpu_late_init_r(void) +{ +#ifdef CONFIG_QE
- uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
- qe_init(qe_base);
- qe_reset();
+#endif +}
You did not move qe_reset() inside qe_init() as you recommended.:)
Yeah, forgot about that. Part of this was to see what response the patch got (ie is this even acceptable).
For NAND boot case, the microcode needs to be read from nand flash via nand_read first, so you might add some more code like: +void cpu_late_init_r(void) +{ +#ifdef CONFIG_QE +#ifdef CONFIG_SYS_QE_FW_IN_NAND
int ret;
size_t fw_length = CONFIG_SYS_QE_FW_LENGTH;
/* load QE firmware from NAND flash to DDR first */
ret = nand_read(&nand_info[0],(loff_t)CONFIG_SYS_QE_FW_IN_NAND,
&fw_length, (u_char *)CONFIG_SYS_QE_FW_ADDR);
if (ret && ret == -EUCLEAN) {
printf ("NAND read for QE firmware at offset %x failed %
d\n",
CONFIG_SYS_QE_FW_IN_NAND, ret);
}
+#endif
- uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
- qe_init(qe_base);
- qe_reset();
+#endif +}
Haiying
I leave that to you when we add a board (like P1021 MDS) that needs boot from NAND.
- k