From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 4 Sep 2017 11:40:20 +0200 Subject: [U-Boot] [PATCH 07/19] arm: socfpga: Add DRAM bank size initialization function In-Reply-To: <1504509063.7727.76.camel@intel.com> References: <1504003561-6290-1-git-send-email-tien.fong.chee@intel.com> <1504003561-6290-8-git-send-email-tien.fong.chee@intel.com> <1504082164.7727.55.camel@intel.com> <1504509063.7727.76.camel@intel.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/04/2017 09:11 AM, Chee, Tien Fong wrote: > On Rab, 2017-08-30 at 10:56 +0200, Marek Vasut wrote: >> On 08/30/2017 10:36 AM, Chee, Tien Fong wrote: >>> >>> On Sel, 2017-08-29 at 13:59 +0200, Marek Vasut wrote: >>>> >>>> On 08/29/2017 12:45 PM, tien.fong.chee at intel.com wrote: >>>>> >>>>> >>>>> From: Tien Fong Chee >>>>> >>>>> Add function for both multiple DRAM bank and single DRAM bank >>>>> size >>>>> initialization. This common functionality could be used by >>>>> every >>>>> single >>>>> SOCFPGA board. >>>>> >>>>> Signed-off-by: Tien Fong Chee >>>>> --- >>>>> arch/arm/mach-socfpga/board.c | 12 ++++++++++++ >>>>> include/configs/socfpga_common.h | 1 + >>>>> 2 files changed, 13 insertions(+), 0 deletions(-) >>>>> >>>>> diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach- >>>>> socfpga/board.c >>>>> index a41d089..3f2e30a 100644 >>>>> --- a/arch/arm/mach-socfpga/board.c >>>>> +++ b/arch/arm/mach-socfpga/board.c >>>>> @@ -29,6 +29,18 @@ int board_init(void) >>>>> return 0; >>>>> } >>>>> >>>>> +int dram_init_banksize(void) >>>>> +{ >>>>> +#if !defined(CONFIG_SYS_SDRAM_BASE) && >>>>> !defined(CONFIG_SYS_SDRAM_SIZE) >>>>> + fdtdec_setup_memory_banksize(); >>>> This should work on al boards, so why do you need this macro ? >>>> Also, this should go into arch/arm/ , not board/ >>>> >>> In case these macros are not defined, then we need to get the info >>> from >>> DTS. This is in arch/arm/mach-socpfga/board.c . I found some in >>> arch/arm, and other in board/ . >> Every socfpga platform in u-boot has a dts, so you can always extract >> the memory config from it and it's the preferred method. >> > This implementation supports both method, from header or DTS. We want to support only the DT method, so drop the other one. -- Best regards, Marek Vasut