mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-26 13:03:40 +00:00
def6f53d21
This separates the I2C specific code from the generic GE vital product data code, so that the generic parts can be used on hardware with VPD stored in SPI flash memory. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
37 lines
1.1 KiB
C
37 lines
1.1 KiB
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_i2c_vpd(struct vpd_cache *cache,
|
|
int (*process_block)(struct vpd_cache *, u8 id, u8 version,
|
|
u8 type, size_t size, u8 const *data));
|
|
|
|
/*
|
|
* Read VPD from given data, verify content, call callback for each vital
|
|
* product data block.
|
|
*
|
|
* size: size of the raw VPD data in bytes
|
|
* data: raw VPD data read from device
|
|
* 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 vpd_reader(size_t size, u8 *data, struct vpd_cache *cache,
|
|
int (*process_block)(struct vpd_cache *, u8 id, u8 version, u8 type,
|
|
size_t size, u8 const *data));
|