public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c
Date: Tue, 27 Jan 2009 06:46:40 +0100	[thread overview]
Message-ID: <200901270646.40765.sr@denx.de> (raw)
In-Reply-To: <2BA6BDB4C941C94BBD8375D55E05CCF9124BE509C5@us-bv-m12.global.tektronix.net>

On Monday 26 January 2009, carolyn.j.smith at tektronix.com wrote:
> 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.

> Signed-off-by: Carolyn Smith <carolyn.smith@tektronix.com>
> ---
> diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c
> --- old/cpu/ppc4xx/44x_spd_ddr2.c       2009-01-20 13:00:33.000000000 -0800
> +++ new/cpu/ppc4xx/44x_spd_ddr2.c       2009-01-23 16:00:49.000000000 -0800
> @@ -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);
> +

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 those values. Here is what Adam wrote:

> 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
=====================================================================

  reply	other threads:[~2009-01-27  5:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 16:59 [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c carolyn.j.smith at tektronix.com
2009-01-27  5:46 ` Stefan Roese [this message]
2009-01-28  7:22   ` Adam Graham
2009-01-28 16:24     ` carolyn.j.smith at tektronix.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901270646.40765.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox