From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Sun, 26 Jan 2014 08:31:43 -0600 Subject: [U-Boot] [PATCH] Powerpc/QE: Add QE support for T1040 In-Reply-To: References: <1390554349-41470-1-git-send-email-B45475@freescale.com> <4e0170e7c9784df18c5570613134db6d@BY2PR03MB348.namprd03.prod.outlook.com> <52E47F76.8050108@tabi.org> <11eab713873343cf872ced3c94f023fb@BY2PR03MB348.namprd03.prod.outlook.com> <52E490CE.1010309@tabi.org> Message-ID: <52E51C4F.8060501@tabi.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.