[U-Boot] [PATCH] Powerpc/QE: Add QE support for T1040

Timur Tabi timur at tabi.org
Sun Jan 26 15:31:43 CET 2014


qiang.zhao at freescale.com wrote:
> T1040QDS has microcode for Fman and another microcode for QE.
> The two microcodes is different.
>
> QE microcode is needed.

Then why do you have an #else statement:

+#ifdef CONFIG_PPC_T1040
+       qe_upload_firmware((const void *)CONFIG_SYS_QE_UCODE_FW_ADDR);
+#else
         qe_upload_firmware((const void *)CONFIG_SYS_QE_FMAN_FW_ADDR);
+#endif

On the T1040, you're uploading only the QE firmware.

I think you're going to have to do a lot of work to fix this.  "#ifdef 
CONFIG_PPC_T1040" is not acceptable.

1. Replace CONFIG_SYS_QE_FMAN_FW_ADDR with CONFIG_SYS_QE_FW_ADDR and 
CONFIG_SYS_FMAN_FW_ADDR.  Any board that uses CONFIG_SYS_QE_FMAN_FW_ADDR 
for QE firmware will use CONFIG_SYS_QE_FW_ADDR instead.  Any board that 
uses CONFIG_SYS_QE_FMAN_FW_ADDR for Fman firmware will use 
CONFIG_SYS_FMAN_FW_ADDR instead.

2. Modify the QE code to use CONFIG_SYS_QE_FW_ADDR to upload the QE 
firmware.  Modify the Fman code to use CONFIG_SYS_FMAN_FW_ADDR to upload 
the Fman firmwre.  Then you can do this:

#ifdef CONFIG_SYS_QE_FW_ADDR
        qe_upload_firmware((const void *)CONFIG_SYS_QE_FW_ADDR);
#endif
#ifdef CONFIG_SYS_FMAN_FW_ADDR
        qe_upload_firmware((const void *)CONFIG_SYS_FMAN_FW_ADDR);
+#endif

3. Update the README

This way, you can support all SoCs that have QE and/or Fman, without 
making the code work only on the T1040.  Don't forget to test other 
boards with QE and Fman before posting patches so that you know you 
didn't break any other boards.



More information about the U-Boot mailing list