- 16 1月, 2021 40 次提交
-
-
由 Andy Shevchenko 提交于
When at some point environment shrinks we need to stop dropped devices. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
Obviously the following has unnecessary indentation level in 'else' branch. if (foo) { ... return; } else { ... } Drop indentation level by removing redundant 'else'. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
Refactor iomux_doenv() a bit in order to increase readability. There is no change in code generation on x86. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
It's realloc() 101 to avoid `foo = realloc(foo, ...);` call due to getting a memory leak. Actually it's not clear why realloc() has been used here. If we shrink the array, the memcpy() overwrites it anyway with the contents of a new array. If it becomes bigger, same story. Drop useless realloc() for good and thus preserve console list in case of failed allocation. Fixes: 16a28ef2 ("IOMUX: Add console multiplexing support.") Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
Provide a documentation for console_search_dev(). Suggested-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
-
由 Andy Shevchenko 提交于
Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
search_device() is defined in console.c. Move its declaration to an appropriate header file. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
There is no need to call ->start() for already started device. All the same, there is no need to call ->stop() for devices still in use. For now enforce this only for IOMUX case. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Andy Shevchenko 提交于
In the future we would like to stop unused consoles and also add a reference counting to avoid imbalanced calls to ->start() and ->stop() in some cases. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Add the helper function console_has_tstc() and replace the test #if CONFIG_IS_ENABLED(CONSOLE_MUX) to a simple 'if' test to respect the U-Boot coding rule. No functional change. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Add helper functions to access to gd->console_out and gd->console_in with membuff API and replace the #ifdef CONFIG_CONSOLE_RECORD test by if (IS_ENABLED(CONFIG_CONSOLE_RECORD)) to respect the U-Boot coding rule. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Add a new function to access to console_devices only defined if CONFIG_IS_ENABLED(CONSOLE_MUX). This path allows to remove #if CONFIG_IS_ENABLED(CONSOLE_MUX) in console_getc function. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NPatrick Delaunay <patrick.delaunay@foss.st.com>
-
由 Patrick Delaunay 提交于
Remove #ifdef or #ifndef for CONFIG when it is possible to simplify the console.c code and respect the U-Boot coding rules. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
spl_handoff should only be enabled when CONFIG_HANDOFF is set. Drop the nested ifdefs and check for CONFIG_HANDOFF instead. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
CONFIG_HANDOFF is used in u-boot proper to locate handoff info from SPL during pre-relocation init (in setup_spl_handoff). Add explicit dependency on CONFIG_SPL, to fix the following build error when CONFIG_HANDOFF && !CONFIG_SPL: common/board_f.c: In function ‘setup_spl_handoff’: common/board_f.c:283:4: error: ‘gd_t {aka struct global_data}’ has no member named ‘spl_handoff’ gd->spl_handoff = bloblist_find(BLOBLISTT_SPL_HANDOFF, ^~ Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
In order to remove the arch-specific ifdefs around initr_trap, introduce arch_initr_trap weak initcall. Implementations for ppc/m68k/mips have been moved to arch/<arch>/lib/traps.c Default implementation is a nop stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
-
由 Ovidiu Panait 提交于
Add a return value to bb_miiphy_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to api_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to jumptable_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to xen_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to noncached_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to pci_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to pci_ep_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to post_output_backlog and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Add a return value to cpu_secondary_init_r and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Drop initr_console_record wrapper and call console_record_init directly. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Use IS_ENABLED(CONFIG_OF_EMBED) in instead of #ifdefs in reserve_fdt, reloc_fdt functions. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
setup_bdinfo is used to populate various bdinfo fields, so move setup_machine code there, as all it does is setting gd->bd->bi_arch_number. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Use IS_ENABLED(CONFIG_TIMER_EARLY) instead of #ifdef in initf_dm. Also, move timer code to the main ifdef, so that ret is defined. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Drop initf_console_record wrapper and call console_record_init directly. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Ovidiu Panait 提交于
Currently, the following #ifdef construct is used to check whether to run console_record_init() during pre-relocation init: defined(CONFIG_CONSOLE_RECORD) && CONFIG_VAL(SYS_MALLOC_F_LEN) Introduce CONFIG_CONSOLE_RECORD_INIT_F Kconfig option to get rid of the complex ifdef check. Also, use IS_ENABLED() instead of #ifdef. Signed-off-by: NOvidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Reduce the log overhead when the traces are filtered, by moving the vsnprintf call from _log() to log_dispatch(). This patch avoids the printf treatment when LOG features is activated, but trace is filtered, for example when MAX_LOG_LEVEL=8 and LOG_DEFAULT_LEVEL=6. Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
由 Patrick Delaunay 提交于
Add a new test to check the content of the dropped messages sent to console puts function. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Allow to record the console output before before U-Boot has a console ready. This patch allows to test the console output in sandbox test based on console record. It is possible because GD_FLG_RECORD and GD_FLG_SERIAL_READY are 2 independent flags. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Reorder test on gd value and remove the duplicated test (!gd) in putc and puts function. This patch is a preliminary step for rework of this function. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSean Anderson <seanga2@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Add test for dropped trace before log_init, displayed by debug uart. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Use the console puts functions to output the traces before the log initialization (when CONFIG_LOG is not activated). This patch allows to display the first U-Boot traces (with macro debug) when CONFIG_DEBUG_UART is activated and not only drop them. For example for traces in board_f.c requested by the macro debug, when LOG_DEBUG is defined and CONFIG_LOG is activated. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
由 Patrick Delaunay 提交于
Add a new test to check the dropped messages when LOG is not ready with log_drop_count and the result of _log(). Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Update _log function to drop any traces when log is yet initialized: vsnprintf is no more executed in this case. This patch allows to reduce the cost for the dropped early debug trace. Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
由 Patrick Delaunay 提交于
Add a check of the _log function with LOGL_FORCE_DEBUG flags, used to force the trace display. The trace should be displayed for all the level when flags have LOGL_FORCE_DEBUG bit is set, for any filter. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSean Anderson <seanga2@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-