[PATCH v2 4/6] mtd: spi-nor: Replace default_init() hook with late_init()
Tudor Ambarus
tudor.ambarus at linaro.org
Thu Apr 25 08:13:34 CEST 2024
On 4/25/24 05:52, tkuw584924 at gmail.com wrote:
> From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
>
> default_init() is wrong, it contributes to the maze of initializing
> flash parameters. We'd like to get rid of it because the flash
> parameters that it initializes are not really used at SFDP parsing time,
> thus they can be initialized later.
>
> Ideally we want SFDP to initialize all the flash parameters. If (when)
> SFDP tables are wrong, we fix them with the post_sfdp/bfpt hooks, to
> emphasize that SFDP is indeed wrong. When there are parameters that are
> not covered by SFDP, we initialize them in late_init() - these
> parameters have nothing to do with SFDP and they are not needed earlier.
> With this we'll have a clearer view of who initializes what.
>
> There are six default_init() hooks implemented just for initializing
> octal_dtr_enable() and/or setup() hooks that called later on.
> Just moving those to late_init() does not change functionality.
>
> Suggested-by: Tudor Ambarus <tudor.ambarus at linaro.org>
> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
Acked-by: Tudor Ambarus <tudor.ambarus at linaro.org>
More information about the U-Boot
mailing list