Skip to content

Allow for immutable debug settings in ddr3_debug #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

elkablo
Copy link
Contributor

@elkablo elkablo commented Apr 15, 2024

The first 3 commits cleanup the code a little.

The 4th commit creates a new compile-time option, CONFIG_DDR_IMMUTABLE_DEBUG_SETTINGS, which, when enabled, makes it impossible to select the debug level dynamically, and instead all debug levels are set to the default DEBUG_LEVEL_ERROR. Also register dumps are always disabled.

Because the code is mainly used in U-Boot and in U-Boot the DDR3 training debug level can only be changed by editing the sources and compiling, enabling this option has no functional change for the default settings.

This reduces the size of the binary by around 10 KiB, which is a lot in U-Boot SPL.

elkablo added 4 commits April 15, 2024 17:45
Return from ddr3_tip_print_log() early if we won't print anything
anyway.

This way the compiler can optimize away the VALIDATE_IF_ACTIVE() calls
in the for-loop, so if the SILENT_LIB macro is defined, no code is
generated for the rest of the function, which saves some space.

Signed-off-by: Marek Behún <[email protected]>
The variables is_default_centralization, is_tune_result and
is_bist_reset_bit are never used.

Signed-off-by: Marek Behún <[email protected]>
… static

The variables is_validate_window_per_if, is_validate_window_per_pup,
sweep_cnt and is_run_leveling_sweep_tests are only used if
DDR_VIEWER_TOOL macro is defined, so define them only in that case.

Make them static since they are only used in ddr3_debug.c.

Signed-off-by: Marek Behún <[email protected]>
… size

Allow compiling with immutable debug settings:
- DEBUG_LEVEL is always set to DEBUG_LEVEL_ERROR
- register dumps are disabled

This can save around 10 KiB of space in the resulting binary, which is a
lot in U-Boot SPL.

Signed-off-by: Marek Behún <[email protected]>
@elkablo elkablo force-pushed the a38x-allow-immutable-debug-settings branch from f1fb686 to 776afb5 Compare April 15, 2024 15:45
admin-turris pushed a commit to turris-cz/u-boot that referenced this pull request Jul 2, 2024
Backport the option to compile with immutable debug settings also to
the old implementation of the DDR3 training code.

The original PR for mv-ddr-marvell can be seen at
  MarvellEmbeddedProcessors/mv-ddr-marvell#45

Signed-off-by: Marek Behún <[email protected]>
trini pushed a commit to trini/u-boot that referenced this pull request Jul 8, 2024
Backport the option to compile with immutable debug settings also to
the old implementation of the DDR3 training code.

The original PR for mv-ddr-marvell can be seen at
  MarvellEmbeddedProcessors/mv-ddr-marvell#45

Signed-off-by: Marek Behún <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant