mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
fc29fd821d
Current layout support was initially written without modules support in mind. When the requirement for module support rose, the existing base was improved to adopt modularization support, but kind of a design flaw was introduced. With the existing implementation, when a storage device registers into NVMEM, the core tries to hook a layout (if any) and populates its cells immediately. This means, if the hardware description expects a layout to be hooked up, but no driver was provided for that, the storage medium will fail to probe and try later from scratch. Even if we consider that the hardware description shall be correct, we could still probe the storage device (especially if it contains the rootfs). One way to overcome this situation is to consider the layouts as devices, and leverage the native notifier mechanism. When a new NVMEM device is registered, we can populate its nvmem-layout child, if any, and wait for the matching to be done in order to get the cells (the waiting can be easily done with the NVMEM notifiers). If the layout driver is compiled as a module, it should automatically be loaded. This way, there is no strong order to enforce, any NVMEM device creation or NVMEM layout driver insertion will be observed as a new event which may lead to the creation of additional cells, without disturbing the probes with costly (and sometimes endless) deferrals. In order to achieve that goal we create a new bus for the nvmem-layouts with minimal logic to match nvmem-layout devices with nvmem-layout drivers. All this infrastructure code is created in the layouts.c file. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20231215111536.316972-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
86 lines
3.7 KiB
Makefile
86 lines
3.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for nvmem drivers.
|
|
#
|
|
|
|
obj-$(CONFIG_NVMEM) += nvmem_core.o
|
|
nvmem_core-y := core.o
|
|
obj-$(CONFIG_NVMEM_LAYOUTS) += nvmem_layouts.o
|
|
nvmem_layouts-y := layouts.o
|
|
obj-y += layouts/
|
|
|
|
# Devices
|
|
obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o
|
|
nvmem-apple-efuses-y := apple-efuses.o
|
|
obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o
|
|
nvmem-bcm-ocotp-y := bcm-ocotp.o
|
|
obj-$(CONFIG_NVMEM_BRCM_NVRAM) += nvmem_brcm_nvram.o
|
|
nvmem_brcm_nvram-y := brcm_nvram.o
|
|
obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o
|
|
nvmem-imx-iim-y := imx-iim.o
|
|
obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o
|
|
nvmem-imx-ocotp-y := imx-ocotp.o
|
|
obj-$(CONFIG_NVMEM_IMX_OCOTP_ELE) += nvmem-imx-ocotp-ele.o
|
|
nvmem-imx-ocotp-ele-y := imx-ocotp-ele.o
|
|
obj-$(CONFIG_NVMEM_IMX_OCOTP_SCU) += nvmem-imx-ocotp-scu.o
|
|
nvmem-imx-ocotp-scu-y := imx-ocotp-scu.o
|
|
obj-$(CONFIG_NVMEM_JZ4780_EFUSE) += nvmem_jz4780_efuse.o
|
|
nvmem_jz4780_efuse-y := jz4780-efuse.o
|
|
obj-$(CONFIG_NVMEM_LAN9662_OTPC) += nvmem-lan9662-otpc.o
|
|
nvmem-lan9662-otpc-y := lan9662-otpc.o
|
|
obj-$(CONFIG_NVMEM_LAYERSCAPE_SFP) += nvmem-layerscape-sfp.o
|
|
nvmem-layerscape-sfp-y := layerscape-sfp.o
|
|
obj-$(CONFIG_NVMEM_LPC18XX_EEPROM) += nvmem_lpc18xx_eeprom.o
|
|
nvmem_lpc18xx_eeprom-y := lpc18xx_eeprom.o
|
|
obj-$(CONFIG_NVMEM_LPC18XX_OTP) += nvmem_lpc18xx_otp.o
|
|
nvmem_lpc18xx_otp-y := lpc18xx_otp.o
|
|
obj-$(CONFIG_NVMEM_MESON_EFUSE) += nvmem_meson_efuse.o
|
|
nvmem_meson_efuse-y := meson-efuse.o
|
|
obj-$(CONFIG_NVMEM_MESON_MX_EFUSE) += nvmem_meson_mx_efuse.o
|
|
nvmem_meson_mx_efuse-y := meson-mx-efuse.o
|
|
obj-$(CONFIG_NVMEM_MICROCHIP_OTPC) += nvmem-microchip-otpc.o
|
|
nvmem-microchip-otpc-y := microchip-otpc.o
|
|
obj-$(CONFIG_NVMEM_MTK_EFUSE) += nvmem_mtk-efuse.o
|
|
nvmem_mtk-efuse-y := mtk-efuse.o
|
|
obj-$(CONFIG_NVMEM_MXS_OCOTP) += nvmem-mxs-ocotp.o
|
|
nvmem-mxs-ocotp-y := mxs-ocotp.o
|
|
obj-$(CONFIG_NVMEM_NINTENDO_OTP) += nvmem-nintendo-otp.o
|
|
nvmem-nintendo-otp-y := nintendo-otp.o
|
|
obj-$(CONFIG_NVMEM_QCOM_QFPROM) += nvmem_qfprom.o
|
|
nvmem_qfprom-y := qfprom.o
|
|
obj-$(CONFIG_NVMEM_QCOM_SEC_QFPROM) += nvmem_sec_qfprom.o
|
|
nvmem_sec_qfprom-y := sec-qfprom.o
|
|
obj-$(CONFIG_NVMEM_RAVE_SP_EEPROM) += nvmem-rave-sp-eeprom.o
|
|
nvmem-rave-sp-eeprom-y := rave-sp-eeprom.o
|
|
obj-$(CONFIG_NVMEM_RMEM) += nvmem-rmem.o
|
|
nvmem-rmem-y := rmem.o
|
|
obj-$(CONFIG_NVMEM_ROCKCHIP_EFUSE) += nvmem_rockchip_efuse.o
|
|
nvmem_rockchip_efuse-y := rockchip-efuse.o
|
|
obj-$(CONFIG_NVMEM_ROCKCHIP_OTP) += nvmem-rockchip-otp.o
|
|
nvmem-rockchip-otp-y := rockchip-otp.o
|
|
obj-$(CONFIG_NVMEM_SC27XX_EFUSE) += nvmem-sc27xx-efuse.o
|
|
nvmem-sc27xx-efuse-y := sc27xx-efuse.o
|
|
obj-$(CONFIG_NVMEM_SNVS_LPGPR) += nvmem_snvs_lpgpr.o
|
|
nvmem_snvs_lpgpr-y := snvs_lpgpr.o
|
|
obj-$(CONFIG_NVMEM_SPMI_SDAM) += nvmem_qcom-spmi-sdam.o
|
|
nvmem_qcom-spmi-sdam-y += qcom-spmi-sdam.o
|
|
obj-$(CONFIG_NVMEM_SPRD_EFUSE) += nvmem_sprd_efuse.o
|
|
nvmem_sprd_efuse-y := sprd-efuse.o
|
|
obj-$(CONFIG_NVMEM_STM32_ROMEM) += nvmem_stm32_romem.o
|
|
nvmem_stm32_romem-y := stm32-romem.o
|
|
nvmem_stm32_romem-$(CONFIG_NVMEM_STM32_BSEC_OPTEE_TA) += stm32-bsec-optee-ta.o
|
|
obj-$(CONFIG_NVMEM_SUNPLUS_OCOTP) += nvmem_sunplus_ocotp.o
|
|
nvmem_sunplus_ocotp-y := sunplus-ocotp.o
|
|
obj-$(CONFIG_NVMEM_SUNXI_SID) += nvmem_sunxi_sid.o
|
|
nvmem_sunxi_sid-y := sunxi_sid.o
|
|
obj-$(CONFIG_NVMEM_U_BOOT_ENV) += nvmem_u-boot-env.o
|
|
nvmem_u-boot-env-y := u-boot-env.o
|
|
obj-$(CONFIG_NVMEM_UNIPHIER_EFUSE) += nvmem-uniphier-efuse.o
|
|
nvmem-uniphier-efuse-y := uniphier-efuse.o
|
|
obj-$(CONFIG_NVMEM_VF610_OCOTP) += nvmem-vf610-ocotp.o
|
|
nvmem-vf610-ocotp-y := vf610-ocotp.o
|
|
obj-$(CONFIG_NVMEM_ZYNQMP) += nvmem_zynqmp_nvmem.o
|
|
nvmem_zynqmp_nvmem-y := zynqmp_nvmem.o
|
|
obj-$(CONFIG_NVMEM_QORIQ_EFUSE) += nvmem-qoriq-efuse.o
|
|
nvmem-qoriq-efuse-y := qoriq-efuse.o
|