All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/8] orion5x: Fix wrong address in orion5x_sdram_bar
Date: Sat, 29 Jan 2011 08:24:26 +0100	[thread overview]
Message-ID: <4D43C0AA.6050007@free.fr> (raw)
In-Reply-To: <1296262841-8819-2-git-send-email-mspang@csclub.uwaterloo.ca>

Hi Michael,

Le 29/01/2011 02:00, Michael Spang a ?crit :
> This code intends to read the SDRAM controller base address registers
> but is instead reading the CPU window base address registers.

Side note: IIUC this change is not required since the CPU Window 
registers match the SDRAM controller registers on orion5x in U-boot; but 
it is fine if only for the sake of correctness, and assuming it works 
for other orion5x boards (testing underway for edminiv2).

> Signed-off-by: Michael Spang<mspang@csclub.uwaterloo.ca>
> ---
>   arch/arm/cpu/arm926ejs/orion5x/dram.c       |    2 +-
>   arch/arm/include/asm/arch-orion5x/orion5x.h |    1 +
>   2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/orion5x/dram.c b/arch/arm/cpu/arm926ejs/orion5x/dram.c
> index b749282..7f3a318 100644
> --- a/arch/arm/cpu/arm926ejs/orion5x/dram.c
> +++ b/arch/arm/cpu/arm926ejs/orion5x/dram.c
> @@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank)
>   {
>   	struct orion5x_ddr_addr_decode_registers *winregs =
>   		(struct orion5x_ddr_addr_decode_registers *)

Please remove the 'ddr_' part of the struct name while you're at it: 
this struct is not DDR specific, it also covers CPU window register.

> -		ORION5X_CPU_WIN_BASE;
> +		ORION5X_SDRAM_CTRL_BASE;
>
>   	u32 result = 0;
>   	u32 enable = 0x01&  winregs[bank].size;
> diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h
> index e3d3f76..f262ad1 100644
> --- a/arch/arm/include/asm/arch-orion5x/orion5x.h
> +++ b/arch/arm/include/asm/arch-orion5x/orion5x.h
> @@ -42,6 +42,7 @@
>   #define ORION5X_REGISTER(x)			(ORION5X_REGS_PHY_BASE + x)
>
>   /* Documented registers */
> +#define ORION5X_SDRAM_CTRL_BASE			(ORION5X_REGISTER(0x01500))
>   #define ORION5X_TWSI_BASE			(ORION5X_REGISTER(0x11000))
>   #define ORION5X_UART0_BASE			(ORION5X_REGISTER(0x12000))
>   #define ORION5X_UART1_BASE			(ORION5X_REGISTER(0x12100))

Amicalement,
-- 
Albert.

  reply	other threads:[~2011-01-29  7:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29  1:00 [U-Boot] [PATCH 1/8] arm926ej-s: Invalidate instruction cache in flush_cache Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 2/8] orion5x: Fix wrong address in orion5x_sdram_bar Michael Spang
2011-01-29  7:24   ` Albert ARIBAUD [this message]
2011-03-17 19:47     ` Michael Spang
2011-03-18  5:57     ` Rogan Dawes
2011-03-18  6:46       ` Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 3/8] orion5x: Increase maximum bank size to 128M Michael Spang
2011-01-29  7:26   ` Albert ARIBAUD
2011-01-29  1:00 ` [U-Boot] [PATCH 4/8] orion5x: Allow SDRAM initialization to be omitted Michael Spang
2011-01-29  7:36   ` Albert ARIBAUD
2011-03-17 19:52     ` Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 5/8] mvgbe: Support preserving the existing MAC address Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 6/8] Add board support for TS-7800 Michael Spang
2011-01-29  7:39   ` Albert ARIBAUD
2011-03-17 19:50     ` Michael Spang
2011-01-30 19:14   ` Wolfgang Denk
2011-01-29  1:00 ` [U-Boot] [PATCH 7/8] Add NAND " Michael Spang
2011-01-30 19:15   ` Wolfgang Denk
2011-01-29  1:00 ` [U-Boot] [PATCH 8/8] Add README " Michael Spang

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=4D43C0AA.6050007@free.fr \
    --to=albert.aribaud@free.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.