All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ley Foon Tan <ley.foon.tan@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/10] ddr: altera: s10: Add multiple memory banks support
Date: Wed, 13 Mar 2019 15:28:44 +0800	[thread overview]
Message-ID: <1552462124.5582.14.camel@intel.com> (raw)
In-Reply-To: <437779d22b42a3b18ba47de619b61cfaa93f9008.camel@intel.com>

On Tue, 2019-03-12 at 14:05 +0000, Westergreen, Dalon wrote:
> On Tue, 2019-03-12 at 11:44 +0100, Marek Vasut wrote:
> > 
> > On 3/12/19 9:31 AM, Ley Foon Tan wrote:
> > > 
> > > Setup bank start address and size based on total SDRAM
> > > memory size calculated from hardware. Update sdram_size_check()
> > > to support multiple banks.
> > > 
> > > Stratix10 supports up to 2 memory banks.
> > > 
> > > Bank 0: Address 0, size 2GB
> > > Bank 1: Address 0x100000000, size 124GB
> > > 
> > > Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
> > > Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
> > Shouldn't Quartus generate some sort of DT which gives you all the
> > DRAM
> > layout information ? Then you won't need any of this
> > CONFIG_NR_DRAM_BANKS stuff, but you would be able to extract such
> > info
> > from DT and apply the sanity check only on DRAM you know exists.
> > 
> Yes, I think this can be much cleaner and the dts should provide the
> bank
> information rather than creating the banks from the determined dram
> size.
> 
> The determined dram size can just be a check to validate the bank
> configuration
> in the dts.

Okay.Then user needs update memory node in dts for different SDRAM
size.

Regards
Ley Foon
> 
> so
> 
> diff --git a/arch/arm/dts/socfpga_stratix10_socdk.dts
> b/arch/arm/dts/socfpga_stratix10_socdk.dts
> index 6e8ddcd9f4..94c71bb0ed 100644
> --- a/arch/arm/dts/socfpga_stratix10_socdk.dts
> +++ b/arch/arm/dts/socfpga_stratix10_socdk.dts
> @@ -36,7 +36,9 @@
> 
>         memory {
>                 device_type = "memory";
> -               reg = <0 0 0 0x80000000>; /* 2GB */
> +               /* 4GB */
> +               reg = < 0 0x00000000 0 0x80000000
> +                       1 0x80000000 0 0x80000000>;
>                 u-boot,dm-pre-reloc;
>         };
>  };
> 
> --dalon
> 
> 
> 

  reply	other threads:[~2019-03-13  7:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  8:31 [U-Boot] [PATCH 00/10] Update Stratix 10 SDRAM driver Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 01/10] ddr: altera: stratix10: Move SDRAM size check to " Ley Foon Tan
2019-03-12 10:41   ` Marek Vasut
2019-03-19  3:26     ` Ley Foon Tan
2019-03-19  8:55       ` Marek Vasut
2019-03-19  9:46         ` Ley Foon Tan
2019-03-19  9:47           ` Marek Vasut
2019-03-20  1:30             ` Ley Foon Tan
2019-03-20  9:41               ` Marek Vasut
2019-03-21  5:59                 ` Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 02/10] arm: socfpga: Add sdram_s10.h to sdram.h Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 03/10] ddr: altera: s10: Add multiple memory banks support Ley Foon Tan
2019-03-12 10:44   ` Marek Vasut
2019-03-12 14:05     ` Westergreen, Dalon
2019-03-13  7:28       ` Ley Foon Tan [this message]
2019-03-13  9:14         ` Marek Vasut
2019-03-12  8:31 ` [U-Boot] [PATCH 04/10] arm: socfpga: Update dram_init_banksize() for Stratix10 Ley Foon Tan
2019-03-12 10:45   ` Marek Vasut
2019-03-12 14:25     ` Westergreen, Dalon
2019-03-12  8:31 ` [U-Boot] [PATCH 05/10] board: altera: Stratix10: Add board_get_usable_ram_top() Ley Foon Tan
2019-03-12 10:46   ` Marek Vasut
2019-03-12 14:33     ` Westergreen, Dalon
2019-03-12 14:40       ` Marek Vasut
2019-03-19  3:27         ` Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 06/10] board: altera: Stratix10: Add ft_board_setup() Ley Foon Tan
2019-03-12 10:47   ` Marek Vasut
2019-03-19  3:28     ` Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 07/10] arm: socfpga: Enable OF_BOARD_SETUP for Stratix 10 Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 08/10] configs: stratix10: Change CONFIG_NR_DRAM_BANKS to 2 Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 09/10] arm: socfpga: stratix10: Add cpu_has_been_warmreset() Ley Foon Tan
2019-03-12  8:31 ` [U-Boot] [PATCH 10/10] ddr: altera: Stratix10: Add ECC memory scrubbing Ley Foon Tan
2019-03-12 10:49   ` Marek Vasut
2019-03-19  3:14     ` Ley Foon Tan
2019-03-19  8:57       ` Marek Vasut
2019-03-19  9:49         ` Ley Foon Tan
2019-03-19 12:20           ` Marek Vasut
2019-03-12 11:08 ` [U-Boot] [PATCH 00/10] Update Stratix 10 SDRAM driver Simon Goldschmidt
2019-03-13 18:17   ` Ley Foon Tan
2019-03-14  8:23     ` Simon Goldschmidt

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=1552462124.5582.14.camel@intel.com \
    --to=ley.foon.tan@intel.com \
    --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.