mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-27 20:38:52 +09:00
![Denis Zalevskiy](/assets/img/avatar_default.png)
Merge functionality duplicated in bx50v3 and mx53ppd: the logic is the same except that process_vpd is called at different phases. Also read_vpd could end up in error, so there is no VPD data in this case - it shouldn't be processed. Signed-off-by: Denis Zalevskiy <denis.zalevskiy@ge.com> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
23 lines
584 B
C
23 lines
584 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright 2016 General Electric Company
|
|
*/
|
|
|
|
#include "common.h"
|
|
|
|
struct vpd_cache;
|
|
|
|
/*
|
|
* Read VPD from given data, verify content, call callback for each vital
|
|
* product data block.
|
|
*
|
|
* cache: structure used by process block to store VPD information
|
|
* process_block: callback called for each VPD data block
|
|
*
|
|
* Returns Non-zero on error. Negative numbers encode errno.
|
|
*/
|
|
int read_vpd(struct vpd_cache *cache,
|
|
int (*process_block)(struct vpd_cache *,
|
|
u8 id, u8 version, u8 type,
|
|
size_t size, u8 const *data));
|