[U-Boot] [PATCH 1/2] driver/ddr/fsl: Add more debug registers
Shengzhou Liu
Shengzhou.Liu at nxp.com
Mon Aug 29 11:04:12 CEST 2016
From: York Sun <york.sun at nxp.com>
32 more debug registers are added for newer DDR controllers.
Signed-off-by: York Sun <york.sun at nxp.com>
Signed-off-by: Shengzhou Liu <Shengzhou.Liu at nxp.com>
---
drivers/ddr/fsl/fsl_ddr_gen4.c | 2 +-
drivers/ddr/fsl/interactive.c | 4 ++--
include/fsl_ddr_sdram.h | 2 +-
include/fsl_immap.h | 3 +--
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index d37e247..c2f8a8b 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -218,7 +218,7 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
ddr_out32(&ddr->err_disable, regs->err_disable);
#endif
ddr_out32(&ddr->err_int_en, regs->err_int_en);
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < 64; i++) {
if (regs->debug[i]) {
debug("Write to debug_%d as %08x\n",
i+1, regs->debug[i]);
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index d23e6e5..49352b3 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -670,7 +670,7 @@ static void print_fsl_memctl_config_regs(const fsl_ddr_cfg_regs_t *ddr)
print_option_table(options, n_opts, ddr);
- for (i = 0; i < 32; i++)
+ for (i = 0; i < 64; i++)
printf("debug_%02d = 0x%08X\n", i+1, ddr->debug[i]);
}
@@ -771,7 +771,7 @@ static void fsl_ddr_regs_edit(fsl_ddr_info_t *pinfo,
if (handle_option_table(options, n_opts, ddr, regname, value_str))
return;
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < 64; i++) {
unsigned int value = simple_strtoul(value_str, NULL, 0);
sprintf(buf, "debug_%u", i + 1);
if (strcmp(buf, regname) == 0) {
diff --git a/include/fsl_ddr_sdram.h b/include/fsl_ddr_sdram.h
index 486e47e..36bd9d7 100644
--- a/include/fsl_ddr_sdram.h
+++ b/include/fsl_ddr_sdram.h
@@ -299,7 +299,7 @@ typedef struct fsl_ddr_cfg_regs_s {
unsigned int ddr_cdr2;
unsigned int err_disable;
unsigned int err_int_en;
- unsigned int debug[32];
+ unsigned int debug[64];
} fsl_ddr_cfg_regs_t;
typedef struct memctl_options_partial_s {
diff --git a/include/fsl_immap.h b/include/fsl_immap.h
index e4addad..b1c4fe7 100644
--- a/include/fsl_immap.h
+++ b/include/fsl_immap.h
@@ -131,7 +131,6 @@ struct ccsr_ddr {
u32 capture_ext_address; /* Error Extended Addr Capture */
u32 err_sbe; /* Single-Bit ECC Error Management */
u8 res_e5c[164];
- u32 debug[32]; /* debug_1 to debug_32 */
- u8 res_f80[128];
+ u32 debug[64]; /* debug_1 to debug_64 */
};
#endif /* __FSL_IMMAP_H */
--
2.1.0.27.g96db324
More information about the U-Boot
mailing list