mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
![Rafał Miłecki](/assets/img/avatar_default.png)
There are two reasons for having this header in the common place: 1) Simplifying drivers that read NVRAM entries. We will be able to safely call bcm47xx_nvram_* functions without #ifdef-s. 2) Getting NVRAM driver out of MIPS arch code. This is needed to support BCM5301X arch which also requires this NVRAM driver. Patch for that will follow once we get is reviewed. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Arnd Bergmann <arnd@arndb.de> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-soc@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8619/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
34 lines
902 B
C
34 lines
902 B
C
/*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef __BCM47XX_NVRAM_H
|
|
#define __BCM47XX_NVRAM_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
|
|
#ifdef CONFIG_BCM47XX
|
|
int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
|
|
int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
|
|
int bcm47xx_nvram_gpio_pin(const char *name);
|
|
#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;
|
|
};
|
|
#endif
|
|
|
|
#endif /* __BCM47XX_NVRAM_H */
|