Skip to contentSkip to conversation

ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

PATCH New carolyn.j.smith at tektronix.com 3 participants 4 messages Jan 26, 2009 – Jan 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2 initialization code. The changes were discussed with Stefan Roese and Adam Graham and tested by Adam.

---

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +8 -5
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
         * Set the SDRAM Controller On Die Termination Register
         *-----------------------------------------------------------------*/
        mfsdram(SDRAM_CODT, codt);
-       codt |= (SDRAM_CODT_IO_NMODE
-                & (~SDRAM_CODT_DQS_SINGLE_END
-                   & ~SDRAM_CODT_CKSE_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+       codt |= SDRAM_CODT_IO_NMODE;
+
+       codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+                 SDRAM_CODT_CKSE_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+
 
        for (dimm_num = 0; dimm_num < num_dimm_banks; dimm_num++) {
                if (dimm_populated[dimm_num] != SDRAM_NONE) {
#1 lore raw

PATCH 1/1 ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Quoted 3 lines · carolyn.j.smith at tektronix.com

This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2 initialization code. The changes were discussed with Stefan Roese and Adam Graham and tested by Adam.

General comment: The line "The changes were discussed..." should be placed below the "---" since it doesn't really belong to the patch description.

Quoted 13 lines

---
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +0 -3
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
         * Set the SDRAM Controller On Die Termination Register
 
 *-----------------------------------------------------------------*/
 mfsdram(SDRAM_CODT, codt);
-       codt |= (SDRAM_CODT_IO_NMODE
-                & (~SDRAM_CODT_DQS_SINGLE_END
-                   & ~SDRAM_CODT_CKSE_SINGLE_END

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 static void program_codt(unsigned long * · line 1115

Quoted 10 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +8 -2
-                   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+       codt |= SDRAM_CODT_IO_NMODE;
+
+       codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+                 SDRAM_CODT_CKSE_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+

I don't think that this is correct. As I understood from Adam, those bits it questions are undefined/reserevd on all 4xx PPC's. So we should better remove

Quoted 5 lines · the code referencing those values. Here is what Adam

It is in fact the case for all the AMCC 4xx SoC chips that have the IBM SDRAM memory controller core IP, the SDRAM_CODT register, bits 29 and 30 are reserved bits. Thanks Carolyn for finding this issue. We will update the 44x_spd_ddr2.c file and send out a patch shortly for this SDRAM_CODT register bits 29-30 issue.

Adam, do you still plan to send a patch for this? Or did I misunderstand you and the patch above is ok?

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#2 lore raw

PATCH 1/1 ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Stefan, Carolyn,

Yes, I do intend on sending out an AMCC patch to remove the definition for SDRAM_CODT_FEEBBACK_RCV_SINGLE_END and SDRAM_CODT_FEEBBACK_DRV_SINGLE_END.

My apologies Carolyn as I should have notified you of this intent.

My AMCC patch to remove these SDRAM_CODT bit definitions may come after your patch Carolyn, so in your patch do not include the usage of these (SDRAM_CODT_FEEBBACK_RCV_SINGLE_END and SDRAM_CODT_FEEBBACK_DRV_SINGLE_END) bits.

According to our AMCC PPC4xx chip hardware designers, the SDRAM_CODT IP feedback signal is single ended (i.e. SDRAM_CODT bits 29 and 30).

The PPC4xx SDRAM_CODT bits 29 and 30 are reserved non-changeable bits as they are set in the IP to single-ended mode:

SDRAM_CODT bit 29 0 Sets feedback receiver to differential mode
1 Sets feedback receiver to single ended mode (mode
set for the AMCC 4xx SoC chips)
bit 30 0 Sets feedback driver to differential mode
1 Sets feedback driver to single ended mode (mode
set for the AMCC 4xx SoC chips)

Best,
Adam

Quoted 75 lines

-----Original Message-----
From: Stefan Roese [mailto:sr at denx.de]
Sent: Monday, January 26, 2009 9:47 PM
To: u-boot at lists.denx.de
Cc: carolyn.j.smith at tektronix.com; Adam Graham
Subject: Re: [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Quoted 1 line · carolyn.j.smith at tektronix.com

This fixes the initialization of the SDRAM_CODT register in

the ppc4xx

Quoted 1 line

DDR2 initialization code. The changes were discussed with

Stefan Roese

Quoted 1 line

and Adam Graham and tested by Adam.

General comment: The line "The changes were discussed..." should be placed below the "---" since it doesn't really belong to the patch description.

Quoted 3 lines

---
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c

new/cpu/ppc4xx/44x_spd_ddr2.c

Quoted 1 line

--- old/cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20

13:00:33.000000000 -0800

Quoted 1 line

+++ new/cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23

16:00:49.000000000 -0800

Quoted 8 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +0 -3
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
         * Set the SDRAM Controller On Die Termination Register
 
 *-----------------------------------------------------------------*/
 mfsdram(SDRAM_CODT, codt);
-       codt |= (SDRAM_CODT_IO_NMODE
-                & (~SDRAM_CODT_DQS_SINGLE_END
-                   & ~SDRAM_CODT_CKSE_SINGLE_END

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 static void program_codt(unsigned long * · line 1115

Quoted 10 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +8 -2
-                   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+       codt |= SDRAM_CODT_IO_NMODE;
+
+       codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+                 SDRAM_CODT_CKSE_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+

I don't think that this is correct. As I understood from Adam, those bits it questions are undefined/reserevd on all 4xx PPC's. So we should better remove the code referencing

Quoted 2 lines · those values. Here is what Adam

It is in fact the case for all the AMCC 4xx SoC chips that have the IBM SDRAM memory controller core IP, the SDRAM_CODT

register, bits 29

Quoted 1 line

and 30 are reserved bits. Thanks Carolyn for finding this

issue. We

Quoted 1 line

will update the 44x_spd_ddr2.c file and send out a patch

shortly for

Quoted 1 line

this SDRAM_CODT register bits 29-30 issue.

Adam, do you still plan to send a patch for this? Or did I misunderstand you and the patch above is ok?

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email:
office at denx.de
=====================================================================

#3 lore raw

PATCH 1/1 ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Okay, I will resubmit my patch.

Carolyn

Quoted 117 lines

-----Original Message-----
From: Adam Graham [mailto:agraham at amcc.com]
Sent: Tuesday, January 27, 2009 11:22 PM
To: Stefan Roese; u-boot at lists.denx.de
Cc: Smith, Carolyn J; Adam Graham; Victor Gallardo
Subject: RE: [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Stefan, Carolyn,

Yes, I do intend on sending out an AMCC patch to remove the definition for SDRAM_CODT_FEEBBACK_RCV_SINGLE_END and SDRAM_CODT_FEEBBACK_DRV_SINGLE_END.

My apologies Carolyn as I should have notified you of this intent.

My AMCC patch to remove these SDRAM_CODT bit definitions may come after your patch Carolyn, so in your patch do not include the usage of these (SDRAM_CODT_FEEBBACK_RCV_SINGLE_END and SDRAM_CODT_FEEBBACK_DRV_SINGLE_END) bits.

According to our AMCC PPC4xx chip hardware designers, the SDRAM_CODT IP feedback signal is single ended (i.e. SDRAM_CODT bits 29 and 30).

The PPC4xx SDRAM_CODT bits 29 and 30 are reserved
non-changeable bits as
they are set in the IP to single-ended mode:

SDRAM_CODT bit 29 0 Sets feedback receiver to differential mode
1 Sets feedback receiver to single ended mode (mode
set for the AMCC 4xx SoC chips)
bit 30 0 Sets feedback driver to differential mode
1 Sets feedback driver to single ended mode (mode
set for the AMCC 4xx SoC chips)

Best,
Adam

Quoted 23 lines

-----Original Message-----
From: Stefan Roese [mailto:sr at denx.de]
Sent: Monday, January 26, 2009 9:47 PM
To: u-boot at lists.denx.de
Cc: carolyn.j.smith at tektronix.com; Adam Graham
Subject: Re: [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

Quoted 1 line · carolyn.j.smith at tektronix.com

This fixes the initialization of the SDRAM_CODT register in

the ppc4xx

Quoted 1 line

DDR2 initialization code. The changes were discussed with

Stefan Roese

Quoted 1 line

and Adam Graham and tested by Adam.

General comment: The line "The changes were discussed..." should be placed below the "---" since it doesn't really belong to the patch description.

Quoted 3 lines

---
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c

new/cpu/ppc4xx/44x_spd_ddr2.c

Quoted 8 lines
Quoted 1 line

--- old/cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20

13:00:33.000000000 -0800

Quoted 1 line

+++ new/cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23

16:00:49.000000000 -0800

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 static void program_codt(unsigned long * · line 1106

Quoted 4 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +0 -0
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
         * Set the SDRAM Controller On Die Termination Register
 
 

*-----------------------------------------------------------------*/

Quoted 44 lines
Quoted 4 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +0 -3
 mfsdram(SDRAM_CODT, codt);
-       codt |= (SDRAM_CODT_IO_NMODE
-                & (~SDRAM_CODT_DQS_SINGLE_END
-                   & ~SDRAM_CODT_CKSE_SINGLE_END

cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 static void program_codt(unsigned long * · line 1114

Quoted 10 lines
cpu/ppc4xx/44x_spd_ddr2.c 2009-01-23 16:00:49.000000000 -0800 renamed from cpu/ppc4xx/44x_spd_ddr2.c 2009-01-20 13:00:33.000000000 -0800 +8 -2
-                   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+       codt |= SDRAM_CODT_IO_NMODE;
+
+       codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+                 SDRAM_CODT_CKSE_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+

I don't think that this is correct. As I understood from Adam, those bits it questions are undefined/reserevd on all 4xx PPC's. So we should better remove the code referencing

Quoted 2 lines · those values. Here is what Adam

It is in fact the case for all the AMCC 4xx SoC chips that have the IBM SDRAM memory controller core IP, the SDRAM_CODT

register, bits 29

Quoted 1 line

and 30 are reserved bits. Thanks Carolyn for finding this

issue. We

Quoted 1 line

will update the 44x_spd_ddr2.c file and send out a patch

shortly for

Quoted 1 line

this SDRAM_CODT register bits 29-30 issue.

Adam, do you still plan to send a patch for this? Or did I misunderstand you and the patch above is ok?

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email:
office at denx.de
=====================================================================