Skip to contentSkip to conversation

board: k2g: Enable ECC support

PATCH New Lokesh Vutla 2 participants 7 messages Aug 27, 2016 – Oct 3, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover board: k2g: Enable ECC support

This series enables ECC support on k2g-evm.

Lokesh Vutla (2):
board: ks2: Enable ECC using detected DDR size
board: k2g: Enable ECC byte lane

 arch/arm/mach-keystone/ddr3.c | 3 +--
 board/ti/ks2_evm/board.c      | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/2 board: ks2: Enable ECC using detected DDR size

EEC is being enabled based on the ddr size populated by SPD data. But not all keystone platforms have SPD data to detect ddr3 size. So, enable ECC using the detected DDR size.

---
 board/ti/ks2_evm/board.c | 3 +++
 1 file changed, 3 insertions(+)
board/ti/ks2_evm/board.c +3 -0
index 1de7df0..03254e1 100644
@@ -50,6 +50,9 @@ int dram_init(void)
 
 	if (ddr3_size)
 		ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size);
+	else
+		ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, gd->ram_size >> 30);
+
 	return 0;
 }
 
Signature · 1 line
2.9.3
#2 lore raw

PATCH 1/2 board: ks2: Enable ECC using detected DDR size

Quoted 5 lines · Lokesh Vutla

EEC is being enabled based on the ddr size populated by SPD data. But not all keystone platforms have SPD data to detect ddr3 size. So, enable ECC using the detected DDR size.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160830/6ec6d20a/attachment.sig>
#3 lore raw

PATCH 1/2 board: ks2: Enable ECC using detected DDR size

In reply to Lokesh Vutla
Quoted 6 lines · Lokesh Vutla

EEC is being enabled based on the ddr size populated by SPD data. But not all keystone platforms have SPD data to detect ddr3 size. So, enable ECC using the detected DDR size.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161003/debada40/attachment.sig>
#4 lore raw

PATCH 2/2 board: k2g: Enable ECC byte lane

In reply to Lokesh Vutla

Enable ECC byte lane for k2g-evm

---
 arch/arm/mach-keystone/ddr3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-keystone/ddr3.c +1 -2
index 34606f4..6b92530 100644
@@ -65,9 +65,8 @@ void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config *phy_cfg)
 	while ((__raw_readl(base + KS2_DDRPHY_PGSR0_OFFSET) & 0x1) != 0x1)
 		;
 
-	/* Disable ECC for K2G */
 	if (cpu_is_k2g()) {
-		clrbits_le32(base + KS2_DDRPHY_DATX8_4_OFFSET, 0x1);
+		setbits_le32(base + KS2_DDRPHY_DATX8_4_OFFSET, 0x1);
 		clrbits_le32(base + KS2_DDRPHY_DATX8_5_OFFSET, 0x1);
 		clrbits_le32(base + KS2_DDRPHY_DATX8_6_OFFSET, 0x1);
 		clrbits_le32(base + KS2_DDRPHY_DATX8_7_OFFSET, 0x1);
Signature · 1 line
2.9.3
#5 lore raw

PATCH 2/2 board: k2g: Enable ECC byte lane

Quoted 3 lines · Lokesh Vutla

Enable ECC byte lane for k2g-evm

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160830/5e0a83c5/attachment.sig>
#6 lore raw

PATCH 2/2 board: k2g: Enable ECC byte lane

In reply to Lokesh Vutla
Quoted 4 lines · Lokesh Vutla

Enable ECC byte lane for k2g-evm

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161003/db17f826/attachment.sig>