Skip to content

reset: socfpga: add legacy peripheral reset compatibility Kconfig - #1033

Open
lokchenh wants to merge 1 commit into
u-boot:mainfrom
lokchenh:master_260731_legacy_peripheral_reset
Open

lokchenh wants to merge 1 commit into
u-boot:mainfrom
lokchenh:master_260731_legacy_peripheral_reset

Conversation

@lokchenh

Copy link
Copy Markdown
Contributor

CI Pipeline Test

Introduce CONFIG_SOCFPGA_RESET_LEGACY_COMPAT to control whether all peripheral resets are deasserted before booting into the OS. This behaviour is only required for systems running Linux kernels that lack proper peripheral reset driver support.

Previously the decision was driven solely by the environment variable socfpga_legacy_reset_compat, which defaulted to 1 across all SoCFPGA targets. The new Kconfig option defaults to y for all ARCH_SOCFPGA targets to preserve existing behaviour, but allows individual platforms to opt out at compile time. When the option is disabled, the bulk deassertion is skipped unconditionally and the environment variable is ignored.

Since the Kconfig option is now the single source of truth, the hardcoded socfpga_legacy_reset_compat=1 default environment string is removed from SoCFPGA board configs and from the keymile secu1 board .env file. This is a no-op for boards that keep
CONFIG_SOCFPGA_RESET_LEGACY_COMPAT=y, since the driver falls back to true when the variable is absent, but removes a redundant source of truth and keeps the configuration consistent across platforms.

Runtime override via setenv remains functional for platforms with the option enabled.

Please do not submit a Pull Request via github. Our project makes use of
mailing lists for patch submission and review. For more details please
see https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html

The only exception to this is in order to trigger a CI loop on Azure prior
to posting of patches.

Introduce CONFIG_SOCFPGA_RESET_LEGACY_COMPAT to control whether all
peripheral resets are deasserted before booting into the OS. This
behaviour is only required for systems running Linux kernels that lack
proper peripheral reset driver support.

Previously the decision was driven solely by the environment variable
socfpga_legacy_reset_compat, which defaulted to 1 across all SoCFPGA
targets. The new Kconfig option defaults to y for all ARCH_SOCFPGA
targets to preserve existing behaviour, but allows individual platforms
to opt out at compile time. When the option is disabled, the bulk
deassertion is skipped unconditionally and the environment variable is
ignored.

Since the Kconfig option is now the single source of truth, the
hardcoded socfpga_legacy_reset_compat=1 default environment string is
removed from SoCFPGA board configs and from the keymile secu1 board
.env file. This is a no-op for boards that keep
CONFIG_SOCFPGA_RESET_LEGACY_COMPAT=y, since the driver falls back to
true when the variable is absent, but removes a redundant source of
truth and keeps the configuration consistent across platforms.

Runtime override via setenv remains functional for platforms with the
option enabled.

Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
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