summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plat/marvell/a8k/a70x0_cust/board/dram_port.c10
-rw-r--r--plat/marvell/a8k/a80x0/board/dram_port.c8
-rw-r--r--plat/marvell/a8k/a80x0_mcbin/board/dram_port.c8
3 files changed, 7 insertions, 19 deletions
diff --git a/plat/marvell/a8k/a70x0_cust/board/dram_port.c b/plat/marvell/a8k/a70x0_cust/board/dram_port.c
index e235d9a5..513e26ac 100644
--- a/plat/marvell/a8k/a70x0_cust/board/dram_port.c
+++ b/plat/marvell/a8k/a70x0_cust/board/dram_port.c
@@ -114,13 +114,9 @@ int update_dram_info(struct dram_config *cfg)
mpp_config();
/* initialize ap i2c */
i2c_init((void *)MVEBU_CP0_I2C_BASE);
- /*
- * Dummy read to the SPD chip memory page selector.
- * It is needed for for selecting the SPD memory page 0
- * prior to accessing the DRAM configuration data
- */
- i2c_read(CP0_I2C_SPD_P0_ADDR, 0x0, 2,
- tm->spd_data.all_bytes, 1);
+ /* select SPD memory page 0 to access DRAM configuration */
+ i2c_write(CP0_I2C_SPD_P0_ADDR, 0x0, 2,
+ tm->spd_data.all_bytes, 1);
/* read data from spd */
i2c_read(CP0_I2C_SPD_ADDR, 0x0, 2, tm->spd_data.all_bytes,
sizeof(tm->spd_data.all_bytes));
diff --git a/plat/marvell/a8k/a80x0/board/dram_port.c b/plat/marvell/a8k/a80x0/board/dram_port.c
index acbaec0a..7689102c 100644
--- a/plat/marvell/a8k/a80x0/board/dram_port.c
+++ b/plat/marvell/a8k/a80x0/board/dram_port.c
@@ -167,12 +167,8 @@ int update_dram_info(struct dram_config *cfg)
else
/* initialize ap i2c */
i2c_init((void *)MVEBU_CP0_I2C_BASE);
- /*
- * Dummy read to the SPD chip memory page selector.
- * It is needed for for selecting the SPD memory page 0
- * prior to accessing the DRAM configuration data
- */
- i2c_read(I2C_SPD_P0_ADDR, 0x0, 1, tm->spd_data.all_bytes, 1);
+ /* select SPD memory page 0 to access DRAM configuration */
+ i2c_write(I2C_SPD_P0_ADDR, 0x0, 1, tm->spd_data.all_bytes, 1);
/* read data from spd */
i2c_read(I2C_SPD_ADDR, 0x0, 1, tm->spd_data.all_bytes,
sizeof(tm->spd_data.all_bytes));
diff --git a/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c b/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
index 01cfdc92..68e8a870 100644
--- a/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
+++ b/plat/marvell/a8k/a80x0_mcbin/board/dram_port.c
@@ -127,12 +127,8 @@ int update_dram_info(struct dram_config *cfg)
mpp_config();
/* initialize the i2c */
i2c_init((void *)MVEBU_CP0_I2C_BASE);
- /*
- * Dummy read to the SPD chip memory page selector.
- * It is needed for for selecting the SPD memory page 0
- * prior to accessing the DRAM configuration data
- */
- i2c_read(I2C_SPD_P0_ADDR, 0x0, 1, tm->spd_data.all_bytes, 1);
+ /* select SPD memory page 0 to access DRAM configuration */
+ i2c_write(I2C_SPD_P0_ADDR, 0x0, 1, tm->spd_data.all_bytes, 1);
/* read data from spd */
i2c_read(I2C_SPD_ADDR, 0x0, 1, tm->spd_data.all_bytes,
sizeof(tm->spd_data.all_bytes));