-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
soc: atmel: sam: samx7x: fold atmel_samx7x_config() into early init hook #84142
base: main
Are you sure you want to change the base?
soc: atmel: sam: samx7x: fold atmel_samx7x_config() into early init hook #84142
Conversation
Fold atmel_samx7x_config() into soc_early_init_hook(), which is the only caller of this function. Signed-off-by: Henrik Brix Andersen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @henrikbrixandersen ,
This is not part of existential part of boot process to be mixed inside soc.c.
Why do you want to do this? What we gain doing this?
Not sure what you mean here? The code currently in
Simplification. Reduced overhead, both compile-unit-wise and function-call wise. |
The function configure some pins but it should be part of pinctrl, not part of soc init. If you want remove the soc_config.c unit then move as a static function. Let the compiler do the job : ) |
This is a refactoring of existing code, simply moving the function body of one function ( |
The refactor into pinctrl is not so easy. For me keeping the function is better. As far I know, the compiler will suppress the call when the function is defined as static inline. |
Fold atmel_samx7x_config() into soc_early_init_hook(), which is the only caller of this function.