I've tested it on loongson 3aserver mainboard, but
I don't have a x86 mainboard, is there anyone test
the patch for me on a x86 mainboard, thanks.
>From 2d4b290e9137365d5c35e3b91f68a38ca7dbb059 Mon Sep 17 00:00:00 2001
From: Yi Jun <[email protected]>
Date: Tue, 18 Jun 2013 16:31:13 +0800
Subject: [PATCH] Fixed the bug about rs780e gfx port

It is not neccessary to disable gfx port A when there
isn't a device, the trainng bit should holded and all
lanes should be closed if there isn't a device.

Signed-off-by: Yi Jun <[email protected]>
---
 src/southbridge/amd/rs780/gfx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/southbridge/amd/rs780/gfx.c b/src/southbridge/amd/rs780/gfx.c
index 2825925..3a2b466 100644
--- a/src/southbridge/amd/rs780/gfx.c
+++ b/src/southbridge/amd/rs780/gfx.c
@@ -1123,10 +1123,14 @@ static void dual_port_configuration(device_t nb_dev, device_t dev)
 	/* Link Training was NOT successful */
 	if (!result) {
 		/* Powers down all lanes for port A */
-		/* nbpcie_ind_write_index(nb_dev, 0x65, 0x0f0f); */
+		nbpcie_ind_write_index(nb_dev, 0x65, 0x0f0f);
+		/* prevent from training. */
+		set_nbmisc_enable_bits(nb_dev, 0x8,
+				       0x1 << (dev_ind + 2),
+				       0x1 << (dev_ind + 2));
 		/* Note: I have to disable the slot where there isnt a device,
 		 * otherwise the system will hang. I dont know why. */
-		set_nbmisc_enable_bits(nb_dev, 0x0c, 1 << dev_ind, 1 << dev_ind);
+		/* set_nbmisc_enable_bits(nb_dev, 0x0c, 1 << dev_ind, 1 << dev_ind); */
 
 	} else {		/* step 16.b Link Training was successful */
 		AtiPcieCfg.PortDetect |= 1 << dev_ind;
-- 
1.8.1.5

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to