diff --git a/drivers/flash/soc_flash_nrf5.c b/drivers/flash/soc_flash_nrf5.c index 168950cbcf..c27b368cd0 100644 --- a/drivers/flash/soc_flash_nrf5.c +++ b/drivers/flash/soc_flash_nrf5.c @@ -232,7 +232,7 @@ static int nrf5_flash_init(struct device *dev) return 0; } -DEVICE_INIT(nrf5_flash, CONFIG_SOC_FLASH_NRF5_DEV_NAME, nrf5_flash_init, +DEVICE_INIT(nrf5_flash, FLASH_DEV_NAME, nrf5_flash_init, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); #if defined(CONFIG_SOC_FLASH_NRF5_RADIO_SYNC) diff --git a/samples/bluetooth/mesh_demo/src/microbit.c b/samples/bluetooth/mesh_demo/src/microbit.c index 7d8e28406e..d25b071baa 100644 --- a/samples/bluetooth/mesh_demo/src/microbit.c +++ b/samples/bluetooth/mesh_demo/src/microbit.c @@ -329,7 +329,7 @@ void board_init(u16_t *addr, u32_t *seq) printk("SEQ_PAGE 0x%08x\n", SEQ_PAGE); - nvm = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + nvm = device_get_binding(FLASH_DEV_NAME); pwm = device_get_binding(CONFIG_PWM_NRF5_SW_0_DEV_NAME); *addr = NRF_UICR->CUSTOMER[0]; diff --git a/samples/drivers/soc_flash_nrf5/src/main.c b/samples/drivers/soc_flash_nrf5/src/main.c index 1244569e0c..ebc4a11700 100644 --- a/samples/drivers/soc_flash_nrf5/src/main.c +++ b/samples/drivers/soc_flash_nrf5/src/main.c @@ -38,7 +38,7 @@ void main(void) printf("\nNordic nRF5 Flash Testing\n"); printf("=========================\n"); - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); if (!flash_dev) { printf("Nordic nRF5 flash driver was not found!\n"); diff --git a/subsys/bluetooth/shell/flash.c b/subsys/bluetooth/shell/flash.c index 0f9bb50e82..e964f2803b 100644 --- a/subsys/bluetooth/shell/flash.c +++ b/subsys/bluetooth/shell/flash.c @@ -31,7 +31,7 @@ static int cmd_erase(int argc, char *argv[]) int result; u32_t size; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); if (!flash_dev) { printk("Nordic nRF5 flash driver was not found!\n"); return -ENODEV; @@ -71,7 +71,7 @@ static int cmd_flash(int argc, char *argv[]) u32_t w_addr; int j = 0; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); if (!flash_dev) { printk("Nordic nRF5 flash driver was not found!\n"); return -ENODEV; @@ -123,7 +123,7 @@ static int cmd_read(int argc, char *argv[]) u32_t addr; int cnt; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); if (!flash_dev) { printk("Nordic nRF5 flash driver was not found!\n"); return -ENODEV; @@ -163,7 +163,7 @@ static int cmd_test(int argc, char *argv[]) u32_t addr; u32_t size; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); if (!flash_dev) { printk("Nordic nRF5 flash driver was not found!\n"); return -ENODEV; diff --git a/tests/subsys/dfu/img_util/src/main.c b/tests/subsys/dfu/img_util/src/main.c index 254e258595..a30d3be8c9 100644 --- a/tests/subsys/dfu/img_util/src/main.c +++ b/tests/subsys/dfu/img_util/src/main.c @@ -15,7 +15,7 @@ void test_collecting(void) u32_t i, j; u8_t data[5], temp, k; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); flash_write_protection_set(flash_dev, false); flash_erase(flash_dev, FLASH_AREA_IMAGE_1_OFFSET, diff --git a/tests/subsys/dfu/mcuboot/src/main.c b/tests/subsys/dfu/mcuboot/src/main.c index befebfe0cb..dd6e9e2bbe 100644 --- a/tests/subsys/dfu/mcuboot/src/main.c +++ b/tests/subsys/dfu/mcuboot/src/main.c @@ -23,7 +23,7 @@ void test_bank_erase(void) off_t offs; int ret; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); for (offs = FLASH_AREA_IMAGE_1_OFFSET; offs <= FLASH_AREA_IMAGE_1_OFFSET + FLASH_AREA_IMAGE_1_SIZE; @@ -74,7 +74,7 @@ void test_request_upgrade(void) u32_t readout[ARRAY_SIZE(expectation)]; int ret; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); zassert(boot_request_upgrade(false) == 0, "pass", "fail"); @@ -108,7 +108,7 @@ void test_write_confirm(void) struct device *flash_dev; int ret; - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); ret = flash_read(flash_dev, FLASH_AREA_IMAGE_0_OFFSET + FLASH_AREA_IMAGE_0_SIZE - sizeof(img_magic), &readout, diff --git a/tests/subsys/fs/nffs_fs_api/nrf5x.conf b/tests/subsys/fs/nffs_fs_api/nrf5x.conf index 04ff899db3..6c4ae6385d 100644 --- a/tests/subsys/fs/nffs_fs_api/nrf5x.conf +++ b/tests/subsys/fs/nffs_fs_api/nrf5x.conf @@ -2,7 +2,6 @@ CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_SOC_FLASH_NRF5=y -CONFIG_SOC_FLASH_NRF5_DEV_NAME="NRF52_FLASH" CONFIG_SOC_FLASH_NRF5_RADIO_SYNC=y CONFIG_ZTEST=y CONFIG_ZTEST_STACKSIZE=2048 diff --git a/tests/subsys/storage/flash_mpa/src/main.c b/tests/subsys/storage/flash_mpa/src/main.c index fdad78273f..397a4e05db 100644 --- a/tests/subsys/storage/flash_mpa/src/main.c +++ b/tests/subsys/storage/flash_mpa/src/main.c @@ -37,7 +37,7 @@ void flash_map_test_case_2(void) zassert_true(rc == 0, "flash_area_open() fail"); /* First erase the area so it's ready for use. */ - flash_dev = device_get_binding(CONFIG_SOC_FLASH_NRF5_DEV_NAME); + flash_dev = device_get_binding(FLASH_DEV_NAME); rc = flash_erase(flash_dev, fa->fa_off, fa->fa_size); zassert_true(rc == 0, "flash area erase fail");