bcm47xx_nvram.h 1.2 KB
Newer Older
1 2 3 4 5 6 7
/*
 *  This program is free software; you can redistribute  it and/or modify it
 *  under  the terms of  the GNU General  Public License as published by the
 *  Free Software Foundation;  either version 2 of the  License, or (at your
 *  option) any later version.
 */

8 9
#ifndef __BCM47XX_NVRAM_H
#define __BCM47XX_NVRAM_H
10 11

#include <linux/types.h>
12
#include <linux/kernel.h>
13
#include <linux/vmalloc.h>
14

15
#ifdef CONFIG_BCM47XX_NVRAM
16
int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
17
int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
18
int bcm47xx_nvram_gpio_pin(const char *name);
19 20 21 22 23
char *bcm47xx_nvram_get_contents(size_t *val_len);
static inline void bcm47xx_nvram_release_contents(char *nvram)
{
	vfree(nvram);
};
24 25 26 27 28 29 30 31 32 33 34 35 36 37
#else
static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
{
	return -ENOTSUPP;
};
static inline int bcm47xx_nvram_getenv(const char *name, char *val,
				       size_t val_len)
{
	return -ENOTSUPP;
};
static inline int bcm47xx_nvram_gpio_pin(const char *name)
{
	return -ENOTSUPP;
};
38 39 40 41 42 43 44 45 46

static inline char *bcm47xx_nvram_get_contents(size_t *val_len)
{
	return NULL;
};

static inline void bcm47xx_nvram_release_contents(char *nvram)
{
};
47
#endif
48

49
#endif /* __BCM47XX_NVRAM_H */
反馈
建议
客服 返回
顶部