backend.h (affbf2ed5fe993d5519912267cd6e938d7861755) | backend.h (68a24c9ea5ce11c87fab22a3f4648c7d88c98fee) |
---|---|
1/* SPDX-License-Identifier: Apache-2.0 */ 2/* Copyright (C) 2018 IBM Corp. */ 3/* Copyright (C) 2018 Evan Lojewski. */ 4 5#ifndef BACKEND_H 6#define BACKEND_H 7 8#include <assert.h> 9#include <errno.h> 10#include <stdbool.h> | 1/* SPDX-License-Identifier: Apache-2.0 */ 2/* Copyright (C) 2018 IBM Corp. */ 3/* Copyright (C) 2018 Evan Lojewski. */ 4 5#ifndef BACKEND_H 6#define BACKEND_H 7 8#include <assert.h> 9#include <errno.h> 10#include <stdbool.h> |
11#include <stddef.h> |
|
11#include <stdint.h> 12#include <mtd/mtd-abi.h> 13 14#define FLASH_DIRTY 0x00 15#define FLASH_ERASED 0x01 16 17/* Estimate as to how long (milliseconds) it takes to access a MB from flash */ 18#define FLASH_ACCESS_MS_PER_MB 8000 --- 245 unchanged lines hidden (view full) --- 264#ifdef VIRTUAL_PNOR_ENABLED 265struct backend backend_get_vpnor(void); 266 267int backend_probe_vpnor(struct backend *master, 268 const struct vpnor_partition_paths *paths); 269#else 270static inline struct backend backend_get_vpnor(void) 271{ | 12#include <stdint.h> 13#include <mtd/mtd-abi.h> 14 15#define FLASH_DIRTY 0x00 16#define FLASH_ERASED 0x01 17 18/* Estimate as to how long (milliseconds) it takes to access a MB from flash */ 19#define FLASH_ACCESS_MS_PER_MB 8000 --- 245 unchanged lines hidden (view full) --- 265#ifdef VIRTUAL_PNOR_ENABLED 266struct backend backend_get_vpnor(void); 267 268int backend_probe_vpnor(struct backend *master, 269 const struct vpnor_partition_paths *paths); 270#else 271static inline struct backend backend_get_vpnor(void) 272{ |
272 struct backend be = { 0 }; | 273 struct backend be = { NULL, NULL, 0, 0, 0 }; |
273 274 return be; 275} 276 | 274 275 return be; 276} 277 |
277static inline int backend_probe_vpnor(struct backend *master, 278 const struct vpnor_partition_paths *paths) | 278static inline int backend_probe_vpnor(struct backend *master __attribute__((unused)), 279 const struct vpnor_partition_paths *paths __attribute__((unused))) |
279{ 280 return -ENOTSUP; 281} 282#endif 283 284#endif /* BACKEND_H */ | 280{ 281 return -ENOTSUP; 282} 283#endif 284 285#endif /* BACKEND_H */ |