[U-Boot] [PATCH] powerpc: Add cpu_late_init_r to allow for initialization post env setup

Haiying Wang Haiying.Wang at freescale.com
Wed Feb 2 18:53:21 CET 2011


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.:)

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





More information about the U-Boot mailing list