flash: remove obsolete FLASH_DRIVER_NAME

Replace seldom occurrences of FLASH_DRIVER_NAME by equivalent
and commonly used FLASH_DEV_NAME.

Fixes #5919.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2018-02-06 14:28:12 +01:00 committed by Kumar Gala
commit c734c2972f
10 changed files with 7 additions and 40 deletions

View file

@ -28,9 +28,4 @@
#define FLASH_PAGE_ERASE_MAX_TIME_US 22300UL #define FLASH_PAGE_ERASE_MAX_TIME_US 22300UL
#define FLASH_PAGE_MAX_CNT 256UL #define FLASH_PAGE_MAX_CNT 256UL
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_NRF5)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* _NORDICSEMI_NRF51_SOC_H_ */ #endif /* _NORDICSEMI_NRF51_SOC_H_ */

View file

@ -24,9 +24,4 @@
#define FLASH_PAGE_ERASE_MAX_TIME_US 89700UL #define FLASH_PAGE_ERASE_MAX_TIME_US 89700UL
#define FLASH_PAGE_MAX_CNT 256UL #define FLASH_PAGE_MAX_CNT 256UL
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_NRF5)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* _NORDICSEMI_NRF52_SOC_H_ */ #endif /* _NORDICSEMI_NRF52_SOC_H_ */

View file

@ -52,11 +52,6 @@ extern "C" {
#include <misc/util.h> #include <misc/util.h>
#include <random/rand32.h> #include <random/rand32.h>
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_MCUX)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* !_ASMLANGUAGE */ #endif /* !_ASMLANGUAGE */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -27,10 +27,6 @@ extern "C" {
#include <misc/util.h> #include <misc/util.h>
#include <random/rand32.h> #include <random/rand32.h>
#if defined(CONFIG_SOC_FLASH_MCUX)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* !_ASMLANGUAGE */ #endif /* !_ASMLANGUAGE */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -50,10 +50,6 @@ extern "C" {
#include <misc/util.h> #include <misc/util.h>
#include <random/rand32.h> #include <random/rand32.h>
#if defined(CONFIG_SOC_FLASH_MCUX)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* !_ASMLANGUAGE */ #endif /* !_ASMLANGUAGE */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -56,11 +56,6 @@
#include <stm32f4xx_ll_iwdg.h> #include <stm32f4xx_ll_iwdg.h>
#endif #endif
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_STM32)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* !_ASMLANGUAGE */ #endif /* !_ASMLANGUAGE */
#endif /* _STM32F4_SOC_H_ */ #endif /* _STM32F4_SOC_H_ */

View file

@ -55,11 +55,6 @@
#include <stm32l4xx_ll_rng.h> #include <stm32l4xx_ll_rng.h>
#endif #endif
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_STM32)
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* !_ASMLANGUAGE */ #endif /* !_ASMLANGUAGE */
#endif /* _STM32L4X_SOC_H_ */ #endif /* _STM32L4X_SOC_H_ */

View file

@ -17,11 +17,11 @@
#define THIS_MODULE_NAME "flash" #define THIS_MODULE_NAME "flash"
/* /*
* When soc.h provides a FLASH_DRIVER_NAME, we use it here. Otherwise, * When FLASH_DEV_NAME is available, we use it here. Otherwise,
* the device can be set at runtime with the set_device command. * the device can be set at runtime with the set_device command.
*/ */
#ifndef FLASH_DRIVER_NAME #ifndef FLASH_DEV_NAME
#define FLASH_DRIVER_NAME "" #define FLASH_DEV_NAME ""
#endif #endif
/* Command usage info. */ /* Command usage info. */
@ -578,9 +578,9 @@ static struct shell_cmd commands[] = {
void main(void) void main(void)
{ {
flash_device = device_get_binding(FLASH_DRIVER_NAME); flash_device = device_get_binding(FLASH_DEV_NAME);
if (flash_device) { if (flash_device) {
printk("Found flash device %s.\n", FLASH_DRIVER_NAME); printk("Found flash device %s.\n", FLASH_DEV_NAME);
printk("Flash I/O commands can be run.\n"); printk("Flash I/O commands can be run.\n");
} else { } else {
printk("**No flash device found!**\n"); printk("**No flash device found!**\n");

View file

@ -318,7 +318,7 @@ int boot_erase_img_bank(u32_t bank_offset)
static int boot_init(struct device *dev) static int boot_init(struct device *dev)
{ {
ARG_UNUSED(dev); ARG_UNUSED(dev);
flash_dev = device_get_binding(FLASH_DRIVER_NAME); flash_dev = device_get_binding(FLASH_DEV_NAME);
if (!flash_dev) { if (!flash_dev) {
return -ENODEV; return -ENODEV;
} }

View file

@ -33,7 +33,7 @@ struct driver_map_entry {
static const struct driver_map_entry flash_drivers_map[] = { static const struct driver_map_entry flash_drivers_map[] = {
#ifdef FLASH_DRIVER_NAME /* SoC embedded flash driver */ #ifdef FLASH_DRIVER_NAME /* SoC embedded flash driver */
{SOC_FLASH_0_ID, FLASH_DRIVER_NAME}, {SOC_FLASH_0_ID, FLASH_DEV_NAME},
#endif #endif
#ifdef CONFIG_SPI_FLASH_W25QXXDV #ifdef CONFIG_SPI_FLASH_W25QXXDV
{SPI_FLASH_0_ID, CONFIG_SPI_FLASH_W25QXXDV_DRV_NAME}, {SPI_FLASH_0_ID, CONFIG_SPI_FLASH_W25QXXDV_DRV_NAME},