| 23fd602f | 30-Apr-2024 |
Krzysztof Kozlowski <[email protected]> |
nvmem: layouts: sl28vpd: drop driver owner initialization
Core in nvmem_layout_driver_register() already sets the .owner, so driver does not need to.
Signed-off-by: Krzysztof Kozlowski <krzysztof.k
nvmem: layouts: sl28vpd: drop driver owner initialization
Core in nvmem_layout_driver_register() already sets the .owner, so driver does not need to.
Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Michael Walle <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| fc29fd82 | 15-Dec-2023 |
Miquel Raynal <[email protected]> |
nvmem: core: Rework layouts to become regular devices
Current layout support was initially written without modules support in mind. When the requirement for module support rose, the existing base wa
nvmem: core: Rework layouts to become regular devices
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 <[email protected]> Tested-by: Rafał Miłecki <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| a8642cd1 | 04-Apr-2023 |
Tom Rix <[email protected]> |
nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to static
smatch reports drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol 'sl28vpd_layout' was not declared. Sh
nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to static
smatch reports drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol 'sl28vpd_layout' was not declared. Should it be static?
This variable is only used in one file so it should be static.
Signed-off-by: Tom Rix <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| d3c0d12f | 04-Apr-2023 |
Miquel Raynal <[email protected]> |
nvmem: layouts: onie-tlv: Add new layout driver
This layout applies on top of any non volatile storage device containing an ONIE table factory flashed. This table follows the tlv (type-length-value)
nvmem: layouts: onie-tlv: Add new layout driver
This layout applies on top of any non volatile storage device containing an ONIE table factory flashed. This table follows the tlv (type-length-value) organization described in the link below. We cannot afford using regular parsers because the content of these tables is manufacturer specific and must be dynamically discovered.
Link: https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| d9fae023 | 04-Apr-2023 |
Michael Walle <[email protected]> |
nvmem: layouts: sl28vpd: Add new layout driver
This layout applies to the VPD of the Kontron sl28 boards. The VPD only contains a base MAC address. Therefore, we have to add an individual offset to
nvmem: layouts: sl28vpd: Add new layout driver
This layout applies to the VPD of the Kontron sl28 boards. The VPD only contains a base MAC address. Therefore, we have to add an individual offset to it. This is done by taking the second argument of the nvmem phandle into account. Also this let us checking the VPD version and the checksum.
Signed-off-by: Michael Walle <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|