From 53faef1e3fea9ab45981707eaebdacd1af0275d5 Mon Sep 17 00:00:00 2001 From: Tien Fong Chee Date: Tue, 5 Dec 2017 15:58:01 +0800 Subject: ARM: socfpga: Add DRAM bank size initialization function 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 Tested-by: Ley Foon Tan --- arch/arm/mach-socfpga/board.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm/mach-socfpga/board.c') diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index c23ac4ead3e..38e12a41a30 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -28,6 +28,13 @@ int board_init(void) return 0; } +int dram_init_banksize(void) +{ + fdtdec_setup_memory_banksize(); + + return 0; +} + #ifdef CONFIG_USB_GADGET struct dwc2_plat_otg_data socfpga_otg_data = { .usb_gusbcfg = 0x1417, -- cgit v1.2.3 From c960ef29cd1bffccb84366cc6ca9c290cb3c36a0 Mon Sep 17 00:00:00 2001 From: Tien Fong Chee Date: Tue, 5 Dec 2017 15:58:07 +0800 Subject: ARM: socfpga: Adding clock frequency info for U-Boot Clock frequency info is required in U-Boot because info would be erased when transition from SPL to U-Boot. Signed-off-by: Tien Fong Chee --- arch/arm/mach-socfpga/board.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm/mach-socfpga/board.c') diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 38e12a41a30..6e0b4b3c4e6 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -7,7 +7,9 @@ #include #include +#include #include +#include #include #include @@ -25,6 +27,11 @@ int board_init(void) /* Address of boot parameters for ATAG (if ATAG is used) */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; +#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) + /* configuring the clock based on handoff */ + cm_basic_init(gd->fdt_blob); +#endif + return 0; } -- cgit v1.2.3 From 011fa5f33dac4f5d7998cf7e9da904b5565691e5 Mon Sep 17 00:00:00 2001 From: Tien Fong Chee Date: Tue, 5 Dec 2017 15:58:08 +0800 Subject: ARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot SoC FPGA info is required in both SPL and U-Boot. Signed-off-by: Tien Fong Chee --- arch/arm/mach-socfpga/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-socfpga/board.c') diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 6e0b4b3c4e6..189e12a6683 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,9 @@ int board_init(void) #if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) /* configuring the clock based on handoff */ cm_basic_init(gd->fdt_blob); + + /* Add device descriptor to FPGA device table */ + socfpga_fpga_add(); #endif return 0; -- cgit v1.2.3