18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef BCM63XX_NVRAM_H
38c2ecf20Sopenharmony_ci#define BCM63XX_NVRAM_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/types.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/**
88c2ecf20Sopenharmony_ci * bcm63xx_nvram_init() - initializes nvram
98c2ecf20Sopenharmony_ci * @nvram:	address of the nvram data
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * Initialized the local nvram copy from the target address and checks
128c2ecf20Sopenharmony_ci * its checksum.
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_civoid bcm63xx_nvram_init(void *nvram);
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/**
178c2ecf20Sopenharmony_ci * bcm63xx_nvram_get_name() - returns the board name according to nvram
188c2ecf20Sopenharmony_ci *
198c2ecf20Sopenharmony_ci * Returns the board name field from nvram. Note that it might not be
208c2ecf20Sopenharmony_ci * null terminated if it is exactly 16 bytes long.
218c2ecf20Sopenharmony_ci */
228c2ecf20Sopenharmony_ciu8 *bcm63xx_nvram_get_name(void);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/**
258c2ecf20Sopenharmony_ci * bcm63xx_nvram_get_mac_address() - register & return a new mac address
268c2ecf20Sopenharmony_ci * @mac:	pointer to array for allocated mac
278c2ecf20Sopenharmony_ci *
288c2ecf20Sopenharmony_ci * Registers and returns a mac address from the allocated macs from nvram.
298c2ecf20Sopenharmony_ci *
308c2ecf20Sopenharmony_ci * Returns 0 on success.
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ciint bcm63xx_nvram_get_mac_address(u8 *mac);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciint bcm63xx_nvram_get_psi_size(void);
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#endif /* BCM63XX_NVRAM_H */
37