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:
parent
2c31ccee0e
commit
c734c2972f
10 changed files with 7 additions and 40 deletions
|
@ -28,9 +28,4 @@
|
|||
#define FLASH_PAGE_ERASE_MAX_TIME_US 22300UL
|
||||
#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_ */
|
||||
|
|
|
@ -24,9 +24,4 @@
|
|||
#define FLASH_PAGE_ERASE_MAX_TIME_US 89700UL
|
||||
#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_ */
|
||||
|
|
|
@ -52,11 +52,6 @@ extern "C" {
|
|||
#include <misc/util.h>
|
||||
#include <random/rand32.h>
|
||||
|
||||
/* For IMG_MANAGER */
|
||||
#if defined(CONFIG_SOC_FLASH_MCUX)
|
||||
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
|
||||
#endif
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -27,10 +27,6 @@ extern "C" {
|
|||
#include <misc/util.h>
|
||||
#include <random/rand32.h>
|
||||
|
||||
#if defined(CONFIG_SOC_FLASH_MCUX)
|
||||
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
|
||||
#endif
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -50,10 +50,6 @@ extern "C" {
|
|||
#include <misc/util.h>
|
||||
#include <random/rand32.h>
|
||||
|
||||
#if defined(CONFIG_SOC_FLASH_MCUX)
|
||||
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
|
||||
#endif
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -56,11 +56,6 @@
|
|||
#include <stm32f4xx_ll_iwdg.h>
|
||||
#endif
|
||||
|
||||
/* For IMG_MANAGER */
|
||||
#if defined(CONFIG_SOC_FLASH_STM32)
|
||||
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
|
||||
#endif
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#endif /* _STM32F4_SOC_H_ */
|
||||
|
|
|
@ -55,11 +55,6 @@
|
|||
#include <stm32l4xx_ll_rng.h>
|
||||
#endif
|
||||
|
||||
/* For IMG_MANAGER */
|
||||
#if defined(CONFIG_SOC_FLASH_STM32)
|
||||
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
|
||||
#endif
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#endif /* _STM32L4X_SOC_H_ */
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
#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.
|
||||
*/
|
||||
#ifndef FLASH_DRIVER_NAME
|
||||
#define FLASH_DRIVER_NAME ""
|
||||
#ifndef FLASH_DEV_NAME
|
||||
#define FLASH_DEV_NAME ""
|
||||
#endif
|
||||
|
||||
/* Command usage info. */
|
||||
|
@ -578,9 +578,9 @@ static struct shell_cmd commands[] = {
|
|||
|
||||
void main(void)
|
||||
{
|
||||
flash_device = device_get_binding(FLASH_DRIVER_NAME);
|
||||
flash_device = device_get_binding(FLASH_DEV_NAME);
|
||||
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");
|
||||
} else {
|
||||
printk("**No flash device found!**\n");
|
||||
|
|
|
@ -318,7 +318,7 @@ int boot_erase_img_bank(u32_t bank_offset)
|
|||
static int boot_init(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
flash_dev = device_get_binding(FLASH_DRIVER_NAME);
|
||||
flash_dev = device_get_binding(FLASH_DEV_NAME);
|
||||
if (!flash_dev) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ struct driver_map_entry {
|
|||
|
||||
static const struct driver_map_entry flash_drivers_map[] = {
|
||||
#ifdef FLASH_DRIVER_NAME /* SoC embedded flash driver */
|
||||
{SOC_FLASH_0_ID, FLASH_DRIVER_NAME},
|
||||
{SOC_FLASH_0_ID, FLASH_DEV_NAME},
|
||||
#endif
|
||||
#ifdef CONFIG_SPI_FLASH_W25QXXDV
|
||||
{SPI_FLASH_0_ID, CONFIG_SPI_FLASH_W25QXXDV_DRV_NAME},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue