Patchwork add missing code for rs780 lane reversal

login
register
about
Submitter Bao, Zheng
Date 2010-12-03 05:21:42
Message ID <DD1CC71B621B004FA76856E5129D6B1704551E5D@sbjgexmb1.amd.com>
Download mbox | patch
Permalink /patch/2386/
State Accepted
Commit r6142
Headers show

Comments

Bao, Zheng - 2010-12-03 05:21:42
Before lane reversal,
De-asserts STRAP_BIF_all_valid for PCIE-GFX core.
After lane reversal,
Asserts STRAP_BIF_all_valid for PCIE-GFX core.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>

+				set_nbmisc_enable_bits(nb_dev, 0x36, 1
<< 31, 0 << 31);
 			}
 			printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
 			/* step 1.1, dual-slot gfx configuration (only
need if CMOS option is enabled) */
@@ -1317,10 +1319,11 @@
 
 		}else{
 			if (cfg->gfx_lane_reversal) {
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1
<< 31, 1 << 31);
 				set_nbmisc_enable_bits(nb_dev, 0x33, 1
<< 2, 1 << 2);
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1
<< 31, 0 << 31);
 			}
 			printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
-			printk(BIOS_DEBUG, "rs780_gfx_init step2.\n");
 
 			if((dev->path.pci.devfn >> 3) == 2)
 				single_port_configuration(nb_dev, dev);
Before lane reversal,
De-asserts STRAP_BIF_all_valid for
PCIE-GFX core.
After lane reversal,
Asserts STRAP_BIF_all_valid for
PCIE-GFX core.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Jason Wang - 2010-12-03 06:54:07
Acked-by: QingPei Wang<wangqingpei@gmail.com>

Best wishes
Wang Qing Pei
Phone: 86+18930528086


On Fri, Dec 3, 2010 at 1:21 PM, Bao, Zheng <Zheng.Bao@amd.com> wrote:

> Before lane reversal,
> De-asserts STRAP_BIF_all_valid for PCIE-GFX core.
> After lane reversal,
> Asserts STRAP_BIF_all_valid for PCIE-GFX core.
>
> Signed-off-by: Zheng Bao <zheng.bao@amd.com>
>
> Index: src/southbridge/amd/rs780/rs780_gfx.c
> ===================================================================
> --- src/southbridge/amd/rs780/rs780_gfx.c       (revision 6137)
> +++ src/southbridge/amd/rs780/rs780_gfx.c       (working copy)
> @@ -1302,8 +1302,10 @@
>                if(is_dev3_present()){
>                        /* step 1, lane reversal (only need if CMOS
> option is enabled) */
>                        if (cfg->gfx_lane_reversal) {
> +                               set_nbmisc_enable_bits(nb_dev, 0x36, 1
> << 31, 1 << 31);
>                                set_nbmisc_enable_bits(nb_dev, 0x33, 1
> << 2, 1 << 2);
>                                set_nbmisc_enable_bits(nb_dev, 0x33, 1
> << 3, 1 << 3);
> +                               set_nbmisc_enable_bits(nb_dev, 0x36, 1
> << 31, 0 << 31);
>                        }
>                        printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
>                        /* step 1.1, dual-slot gfx configuration (only
> need if CMOS option is enabled) */
> @@ -1317,10 +1319,11 @@
>
>                }else{
>                        if (cfg->gfx_lane_reversal) {
> +                               set_nbmisc_enable_bits(nb_dev, 0x36, 1
> << 31, 1 << 31);
>                                set_nbmisc_enable_bits(nb_dev, 0x33, 1
> << 2, 1 << 2);
> +                               set_nbmisc_enable_bits(nb_dev, 0x36, 1
> << 31, 0 << 31);
>                        }
>                        printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
> -                       printk(BIOS_DEBUG, "rs780_gfx_init step2.\n");
>
>                        if((dev->path.pci.devfn >> 3) == 2)
>                                single_port_configuration(nb_dev, dev);
>
> --
> coreboot mailing list: coreboot@coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>

Patch

Index: src/southbridge/amd/rs780/rs780_gfx.c
===================================================================
--- src/southbridge/amd/rs780/rs780_gfx.c	(revision 6137)
+++ src/southbridge/amd/rs780/rs780_gfx.c	(working copy)
@@ -1302,8 +1302,10 @@ 
 		if(is_dev3_present()){
 			/* step 1, lane reversal (only need if CMOS option is enabled) */
 			if (cfg->gfx_lane_reversal) {
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1 << 31, 1 << 31);
 				set_nbmisc_enable_bits(nb_dev, 0x33, 1 << 2, 1 << 2);
 				set_nbmisc_enable_bits(nb_dev, 0x33, 1 << 3, 1 << 3);
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1 << 31, 0 << 31);
 			}
 			printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
 			/* step 1.1, dual-slot gfx configuration (only need if CMOS option is enabled) */
@@ -1317,10 +1319,11 @@ 
 
 		}else{
 			if (cfg->gfx_lane_reversal) {
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1 << 31, 1 << 31);
 				set_nbmisc_enable_bits(nb_dev, 0x33, 1 << 2, 1 << 2);
+				set_nbmisc_enable_bits(nb_dev, 0x36, 1 << 31, 0 << 31);
 			}
 			printk(BIOS_DEBUG, "rs780_gfx_init step1.\n");
-			printk(BIOS_DEBUG, "rs780_gfx_init step2.\n");
 
 			if((dev->path.pci.devfn >> 3) == 2)
 				single_port_configuration(nb_dev, dev);