From 2dd0111adc8a5a03388f557d1ca91295276fbb54 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 30 Jan 2019 07:53:31 +0100 Subject: test: provide unit test for memory functions Memory functions may have architecture specific implementations. These should be tested. Provide unit tests for memset(), memcpy(), memmove(). Provide a 'ut lib' sub-command to execute the tests. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/test/lib.h | 14 ++++++++++++++ include/test/suites.h | 1 + 2 files changed, 15 insertions(+) create mode 100644 include/test/lib.h (limited to 'include') diff --git a/include/test/lib.h b/include/test/lib.h new file mode 100644 index 00000000000..04b6241e54a --- /dev/null +++ b/include/test/lib.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 Heinrich Schuchardt + */ + +#ifndef __TEST_LIB_H__ +#define __TEST_LIB_H__ + +#include + +/* Declare a new library function test */ +#define LIB_TEST(_name, _flags) UNIT_TEST(_name, _flags, lib_test) + +#endif /* __TEST_LIB_H__ */ diff --git a/include/test/suites.h b/include/test/suites.h index 77d863b4a6a..01bee09346c 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -27,6 +27,7 @@ int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); -- cgit v1.2.3 From 36fddec14b1447055d91b13a0ba3997e66ecec35 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 30 Jan 2019 20:19:28 +1300 Subject: omap3_cairo: remove empty #ifdef/#endif block The content between these guards was removed in commit 9baa2bce2890 ("Removed unused references to CONFIG_SERIALx"). Remove the now empty #ifdef/#endif block and the accompanying comment. Signed-off-by: Chris Packham --- include/configs/omap3_cairo.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include') diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h index 04bce2f8b46..ef69b24dd09 100644 --- a/include/configs/omap3_cairo.h +++ b/include/configs/omap3_cairo.h @@ -190,16 +190,6 @@ /* env defaults */ #define CONFIG_BOOTFILE "uImage" -/* Override OMAP3 common serial console configuration from UART3 - * to UART2. - * - * Attention: for UART2, special MUX settings (MUX_DEFAULT(), MCBSP3) - * are needed and peripheral clocks for UART2 must be enabled in - * function per_clocks_enable(). - */ -#ifdef CONFIG_SPL_BUILD -#endif - /* Provide the MACH_TYPE value the vendor kernel requires */ #define CONFIG_MACH_TYPE 3063 -- cgit v1.2.3 From e74b74c52876d776dda7a7ee5e2a8d555eaa5c4f Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 30 Jan 2019 13:07:05 +0100 Subject: dts: stm32mp1: clock tree update - Add st,digbypass on clk_hse node (needed for board rev.C) - MLAHB/AHB max frequency increased from 200 to 209MHz, with: - PLL3P set to 208.8MHz for MCU sub-system - PLL3Q set to 24.57MHz for 48kHz SAI/SPI2S - PLL3R set to 11.29MHz for 44.1kHz SAI/SPI2S - PLL4P set to 99MHz for SDMMC and SPDIFRX - PLL4Q set to 74.25MHz for EVAL board Signed-off-by: Patrick Delaunay --- include/dt-bindings/clock/stm32mp1-clks.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h index 90ec780bfc6..4cdaf135829 100644 --- a/include/dt-bindings/clock/stm32mp1-clks.h +++ b/include/dt-bindings/clock/stm32mp1-clks.h @@ -248,7 +248,4 @@ #define STM32MP1_LAST_CLK 232 -#define LTDC_K LTDC_PX -#define ETHMAC_K ETHCK_K - #endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */ -- cgit v1.2.3 From 47870afab92fca6e672c03d0dea802a55e200675 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 31 Jan 2019 16:06:23 +0100 Subject: initcall: Move to inline function The board_r init function was complaining that we are looping through an array, calling all our tiny init stubs sequentially via indirect function calls (which can't be speculated, so they are slow). The solution to that is pretty easy though. All we need to do is inline the function that loops through the functions and the compiler will automatically convert almost all indirect calls into direct inlined code. With this patch, the overall code size drops (by 40 bytes on riscv64) and boot time should become measurably faster for every target. Signed-off-by: Alexander Graf --- include/initcall.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/initcall.h b/include/initcall.h index 01f3f2833f1..3ac01aa2cd2 100644 --- a/include/initcall.h +++ b/include/initcall.h @@ -8,6 +8,39 @@ typedef int (*init_fnc_t)(void); -int initcall_run_list(const init_fnc_t init_sequence[]); +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static inline int initcall_run_list(const init_fnc_t init_sequence[]) +{ + const init_fnc_t *init_fnc_ptr; + + for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { + unsigned long reloc_ofs = 0; + int ret; + + if (gd->flags & GD_FLG_RELOC) + reloc_ofs = gd->reloc_off; +#ifdef CONFIG_EFI_APP + reloc_ofs = (unsigned long)image_base; +#endif + debug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs); + if (gd->flags & GD_FLG_RELOC) + debug(" (relocated to %p)\n", (char *)*init_fnc_ptr); + else + debug("\n"); + ret = (*init_fnc_ptr)(); + if (ret) { + printf("initcall sequence %p failed at call %p (err=%d)\n", + init_sequence, + (char *)*init_fnc_ptr - reloc_ofs, ret); + return -1; + } + } + return 0; +} #endif -- cgit v1.2.3 From be2fc084d92fcb8092f6e925604072ca949f192f Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Thu, 31 Jan 2019 18:57:36 +0100 Subject: bcm963158: add initial support This add the initial support of the broadcom reference board bcm963158 with a bcm63158 SoC. This board has 1 GB of ram, 512 MB of flash (nand), 2 usb port, 1 uart, 4 ethernet ports (LAN), 1 ethernet port (WAN). Signed-off-by: Philippe Reynes --- include/configs/broadcom_bcm963158.h | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 include/configs/broadcom_bcm963158.h (limited to 'include') diff --git a/include/configs/broadcom_bcm963158.h b/include/configs/broadcom_bcm963158.h new file mode 100644 index 00000000000..5834e1e2a2d --- /dev/null +++ b/include/configs/broadcom_bcm963158.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Philippe Reynes + */ + +#include + +/* + * common + */ + +/* UART */ +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \ + 230400, 500000, 1500000 } +/* Memory usage */ +#define CONFIG_SYS_MAXARGS 24 +#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) +#define CONFIG_SYS_BOOTM_LEN (16 * 1024 * 1024) + +/* + * 63158 + */ + +/* RAM */ +#define CONFIG_SYS_SDRAM_BASE 0x00000000 + +/* U-Boot */ +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_16M) +#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE + +#define CONFIG_SKIP_LOWLEVEL_INIT + +/* + * bcm963158 + */ + +#define CONFIG_ENV_SIZE (8 * 1024) -- cgit v1.2.3 From 64176a8f5c24037b3b5b1a997f19304dff65bc97 Mon Sep 17 00:00:00 2001 From: "Andrew F. Davis" Date: Fri, 1 Feb 2019 15:04:57 -0600 Subject: am65x_evm: Allow bootm to load larger kernels Bootm will fail to load kernels over 8MB, this is not enough for our 64bit kernel images. Increase this to 64MB. Signed-off-by: Andrew F. Davis Reviewed-by: Tom Rini Reviewed-by: Lokesh Vutla --- include/configs/am65x_evm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h index 31749c6d06f..9ce5b6e8241 100644 --- a/include/configs/am65x_evm.h +++ b/include/configs/am65x_evm.h @@ -37,6 +37,8 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \ CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE - 4) +#define CONFIG_SYS_BOOTM_LEN SZ_64M + /* U-Boot general configuration */ #define EXTRA_ENV_AM65X_BOARD_SETTINGS \ "findfdt=" \ -- cgit v1.2.3