Blame view
include/linux/bcm47xx_nvram.h
1.22 KB
121915c4e MIPS: BCM47xx: Ad... |
1 |
/* |
121915c4e MIPS: BCM47xx: Ad... |
2 3 4 5 6 |
* 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. */ |
111bd981e MIPS: BCM47XX: ad... |
7 8 |
#ifndef __BCM47XX_NVRAM_H #define __BCM47XX_NVRAM_H |
121915c4e MIPS: BCM47xx: Ad... |
9 |
|
0cb5133ab bcm47xx: Fix buil... |
10 |
#include <linux/errno.h> |
121915c4e MIPS: BCM47xx: Ad... |
11 |
#include <linux/types.h> |
59833fcf4 MIPS: BCM47xx: Us... |
12 |
#include <linux/kernel.h> |
55cab93bc mips: bcm47xx: al... |
13 |
#include <linux/vmalloc.h> |
121915c4e MIPS: BCM47xx: Ad... |
14 |
|
f6e734a8c MIPS: BCM47xx: Mo... |
15 |
#ifdef CONFIG_BCM47XX_NVRAM |
21400f252 MIPS: BCM47XX: Ma... |
16 |
int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); |
341097f17 MIPS: BCM47XX: Cl... |
17 |
int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); |
62cf3bc0b MIPS: BCM47XX: Ge... |
18 |
int bcm47xx_nvram_gpio_pin(const char *name); |
55cab93bc mips: bcm47xx: al... |
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); }; |
138173d4e MIPS: BCM47xx: Mo... |
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; }; |
55cab93bc mips: bcm47xx: al... |
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) { }; |
138173d4e MIPS: BCM47xx: Mo... |
47 |
#endif |
62cf3bc0b MIPS: BCM47XX: Ge... |
48 |
|
111bd981e MIPS: BCM47XX: ad... |
49 |
#endif /* __BCM47XX_NVRAM_H */ |