diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/aiodev.h | 59 | ||||
-rw-r--r-- | include/boot.h | 3 | ||||
-rw-r--r-- | include/dt-bindings/clock/ar933x-clk.h | 22 | ||||
-rw-r--r-- | include/globalvar.h | 16 | ||||
-rw-r--r-- | include/image.h | 2 | ||||
-rw-r--r-- | include/mfd/syscon.h | 4 |
6 files changed, 80 insertions, 26 deletions
diff --git a/include/aiodev.h b/include/aiodev.h new file mode 100644 index 0000000000..0d4f7a2940 --- /dev/null +++ b/include/aiodev.h @@ -0,0 +1,59 @@ +/* + * core.c - Code implementing core functionality of AIODEV susbsystem + * + * Copyright (c) 2015 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix + * Copyright (c) 2015 Zodiac Inflight Innovation + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __AIODEVICE_H +#define __AIODEVICE_H + +struct aiodevice; +struct aiochannel { + int index; + char *unit; + struct aiodevice *aiodev; + + int value; + char *name; +}; + +struct aiodevice { + const char *name; + int (*read)(struct aiochannel *, int *val); + struct device_d dev; + struct device_d *hwdev; + struct aiochannel **channels; + int num_channels; + struct list_head list; +}; + +int aiodevice_register(struct aiodevice *aiodev); + +struct aiochannel *aiochannel_get(struct device_d *dev, int index); +struct aiochannel *aiochannel_get_by_name(const char *name); + +int aiochannel_get_value(struct aiochannel *aiochan, int *value); +int aiochannel_get_index(struct aiochannel *aiochan); + +static inline const char *aiochannel_get_unit(struct aiochannel *aiochan) +{ + return aiochan->unit; +} + +extern struct list_head aiodevices; +#define for_each_aiodevice(aiodevice) list_for_each_entry(aiodevice, &aiodevices, list) + +#endif diff --git a/include/boot.h b/include/boot.h index 8fcbb7f012..8e7a9f11d4 100644 --- a/include/boot.h +++ b/include/boot.h @@ -11,6 +11,7 @@ enum bootm_verify { BOOTM_VERIFY_NONE, BOOTM_VERIFY_HASH, BOOTM_VERIFY_SIGNATURE, + BOOTM_VERIFY_AVAILABLE, }; struct bootm_data { @@ -97,7 +98,7 @@ struct image_handler { int register_image_handler(struct image_handler *handle); -#ifdef CONFIG_CMD_BOOTM_VERBOSE +#ifdef CONFIG_BOOTM_VERBOSE static inline int bootm_verbose(struct image_data *data) { return data->verbose; diff --git a/include/dt-bindings/clock/ar933x-clk.h b/include/dt-bindings/clock/ar933x-clk.h deleted file mode 100644 index f048930726..0000000000 --- a/include/dt-bindings/clock/ar933x-clk.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#ifndef __DT_BINDINGS_AR933X_CLK_H -#define __DT_BINDINGS_AR933X_CLK_H - -#define AR933X_CLK_REF 0 -#define AR933X_CLK_UART 1 -#define AR933X_CLK_CPU 2 -#define AR933X_CLK_DDR 3 -#define AR933X_CLK_AHB 4 -#define AR933X_CLK_WDT 5 - -#define AR933X_CLK_END 6 - -#endif /* __DT_BINDINGS_AR933X_CLK_H */ diff --git a/include/globalvar.h b/include/globalvar.h index d0c79c07a8..5dfa371409 100644 --- a/include/globalvar.h +++ b/include/globalvar.h @@ -137,6 +137,10 @@ static inline int globalvar_add(const char *name, return 0; } +static inline void globalvar_remove(const char *name) {} + +static inline void globalvar_print(void) {} + static inline char *globalvar_get_match(const char *match, const char *separator) { return NULL; @@ -149,6 +153,18 @@ static inline int nvvar_load(void) return 0; } +static inline void nvvar_print(void) {} + +static inline int nvvar_add(const char *name, const char *value) +{ + return 0; +} + +static inline int nvvar_remove(const char *name) +{ + return 0; +} + #endif #endif /* __GLOBALVAR_H */ diff --git a/include/image.h b/include/image.h index 730e3d75b8..07ab0f14d5 100644 --- a/include/image.h +++ b/include/image.h @@ -189,7 +189,7 @@ typedef struct image_header { uint8_t ih_name[IH_NMLEN]; /* Image Name */ } image_header_t; -#if defined(CONFIG_CMD_BOOTM_SHOW_TYPE) || !defined(__BAREBOX__) +#if defined(CONFIG_BOOTM_SHOW_TYPE) || !defined(__BAREBOX__) const char *image_get_os_name(uint8_t os); const char *image_get_arch_name(uint8_t arch); const char *image_get_type_name(uint8_t type); diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h index 20445202b2..651d4c267c 100644 --- a/include/mfd/syscon.h +++ b/include/mfd/syscon.h @@ -21,13 +21,13 @@ void __iomem *syscon_base_lookup_by_phandle #else static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s) { - return NULL; + return ERR_PTR(-ENOSYS); } static inline void __iomem *syscon_base_lookup_by_phandle (struct device_node *np, const char *property) { - return NULL; + return ERR_PTR(-ENOSYS); } #endif |