CONFIG_SYS_QE_FMAN_FW_ADDR is used to both Fman and QE for microcode address.
Now using CONFIG_SYS_FMAN_FW_ADDR for Fman microcode address,
and CONFIG_SYS_QE_FW_ADDR for QE microcode address.
Signed-off-by: Zhao Qiang
---
Changes for v2:
- no
Changes for v3:
- no
Changes for v4:
- no
Changes for v5:
- modify CONFIG_SYS_QE_FW_ADDR to CONFIG_SYS_FMAN_FW_ADDR for kmp204x
Changes for v6:
- rebase
Changes for v7:
- no
README | 9 +++--
arch/powerpc/cpu/mpc85xx/cpu_init.c | 2 +-
drivers/net/fm/fm.c | 12 ++--
drivers/qe/qe.c | 2 +-
include/configs/B4860QDS.h | 10 +-
include/configs/MPC8569MDS.h| 2 +-
include/configs/P1023RDB.h | 2 +-
include/configs/P1023RDS.h | 4 ++--
include/configs/P2041RDB.h | 10 +-
include/configs/T1040QDS.h | 8
include/configs/T1040RDB.h | 8
include/configs/T1042RDB_PI.h | 8
include/configs/T208xQDS.h | 10 +-
include/configs/T208xRDB.h | 10 +-
include/configs/T4240EMU.h | 2 +-
include/configs/T4240QDS.h | 10 +-
include/configs/corenet_ds.h| 10 +-
include/configs/km/km8309-common.h | 2 +-
include/configs/km/kmp204x-common.h | 2 +-
include/configs/p1_p2_rdb_pc.h | 2 +-
include/configs/p1_twr.h| 2 +-
21 files changed, 66 insertions(+), 61 deletions(-)
diff --git a/README b/README
index 216f0c7..c49efee 100644
--- a/README
+++ b/README
@@ -4485,8 +4485,13 @@ This firmware often needs to be loaded during U-Boot
booting, so macros
are used to identify the storage device (NOR flash, SPI, etc) and the address
within that device.
-- CONFIG_SYS_QE_FMAN_FW_ADDR
- The address in the storage device where the firmware is located. The
+- CONFIG_SYS_FMAN_FW_ADDR
+ The address in the storage device where the FMAN microcode is located.
The
+ meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
+ is also specified.
+
+- CONFIG_SYS_QE_FW_ADDR
+ The address in the storage device where the QE microcode is located.
The
meaning of this address depends on which CONFIG_SYS_QE_FW_IN_xxx macro
is also specified.
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c
b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 81aeadd..e0fb3e5 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -805,7 +805,7 @@ void cpu_secondary_init_r(void)
/* load QE firmware from NAND flash to DDR first */
ret = nand_read(&nand_info[0], (loff_t)CONFIG_SYS_QE_FMAN_FW_IN_NAND,
- &fw_length, (u_char *)CONFIG_SYS_QE_FMAN_FW_ADDR);
+ &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",
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index bca20b3..400e9dd 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -350,16 +350,16 @@ int fm_init_common(int index, struct ccsr_fman *reg)
{
int rc;
#if defined(CONFIG_SYS_QE_FMAN_FW_IN_NOR)
- void *addr = (void *)CONFIG_SYS_QE_FMAN_FW_ADDR;
+ void *addr = (void *)CONFIG_SYS_FMAN_FW_ADDR;
#elif defined(CONFIG_SYS_QE_FMAN_FW_IN_NAND)
size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH;
void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
- rc = nand_read(&nand_info[0], (loff_t)CONFIG_SYS_QE_FMAN_FW_ADDR,
+ rc = nand_read(&nand_info[0], (loff_t)CONFIG_SYS_FMAN_FW_ADDR,
&fw_length, (u_char *)addr);
if (rc == -EUCLEAN) {
printf("NAND read of FMAN firmware at offset 0x%x failed %d\n",
- CONFIG_SYS_QE_FMAN_FW_ADDR, rc);
+ CONFIG_SYS_FMAN_FW_ADDR, rc);
}
#elif defined(CONFIG_SYS_QE_FW_IN_SPIFLASH)
struct spi_flash *ucode_flash;
@@ -371,7 +371,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
if (!ucode_flash)
printf("SF: probe for ucode failed\n");
else {
- ret = spi_flash_read(ucode_flash, CONFIG_SYS_QE_FMAN_FW_ADDR,
+ ret = spi_flash_read(ucode_flash, CONFIG_SYS_FMAN_FW_ADDR,
CONFIG_SYS_QE_FMAN_FW_LENGTH, addr);
if (ret)
printf("SF: read for ucode failed\n");
@@ -381,7 +381,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
int dev = CONFIG_SYS_MMC_ENV_DEV;
void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
u32 cnt = CONFIG_SYS_QE_FMAN_FW_LENGTH / 512;
- u32 blk = CONFIG_SYS_QE_FMAN_FW_ADDR / 512;
+ u32 blk = CONFIG_SYS_FMAN_FW_ADDR / 512;
struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
if (!mmc)
@@ -