Lines Matching +full:u +full:- +full:boot

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2022 - 2023 Rafał Miłecki <rafal@milecki.pl>
10 #include <linux/nvmem-consumer.h>
11 #include <linux/nvmem-provider.h>
15 #include "u-boot-env.h"
40 if (bytes != 3 * ETH_ALEN - 1) in u_boot_env_read_post_process_ethaddr()
41 return -EINVAL; in u_boot_env_read_post_process_ethaddr()
44 return -EINVAL; in u_boot_env_read_post_process_ethaddr()
73 return -ENOMEM; in u_boot_env_parse_cells()
74 info.offset = data_offset + value - data; in u_boot_env_parse_cells()
76 info.np = of_get_child_by_name(dev->of_node, info.name); in u_boot_env_parse_cells()
109 err = -ENOMEM; in u_boot_env_parse()
118 err = -EIO; in u_boot_env_parse()
141 dev_err(dev, "Device too small for u-boot-env\n"); in u_boot_env_parse()
142 err = -EIO; in u_boot_env_parse()
148 crc32_data_len = dev_size - crc32_data_offset; in u_boot_env_parse()
149 data_len = dev_size - data_offset; in u_boot_env_parse()
154 err = -EINVAL; in u_boot_env_parse()
158 buf[dev_size - 1] = '\0'; in u_boot_env_parse()
170 struct device *dev = &layout->dev; in u_boot_env_add_cells()
175 return u_boot_env_parse(dev, layout->nvmem, format); in u_boot_env_add_cells()
180 layout->add_cells = u_boot_env_add_cells; in u_boot_env_probe()
191 { .compatible = "u-boot,env", .data = (void *)U_BOOT_FORMAT_SINGLE, },
192 { .compatible = "u-boot,env-redundant-bool", .data = (void *)U_BOOT_FORMAT_REDUNDANT, },
193 { .compatible = "u-boot,env-redundant-count", .data = (void *)U_BOOT_FORMAT_REDUNDANT, },
200 .name = "u-boot-env-layout",
211 MODULE_DESCRIPTION("NVMEM layout driver for U-Boot environment variables");