Commit a394693d authored by Kumar Gala's avatar Kumar Gala Committed by Maureen Helm
Browse files

drivers: flash: NXP k6x/kw2xd: Convert to use device tree



Convert NXP k6x and kw2xd flash driver to use device tree to get the
flash controller name from device tree.  We introduce yaml bindings for
the "nxp,kinetis-ftfe" and "nxp,kinetis-ftfl" devices.

Fixes: #5788

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 68d826ce
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
/* SoC level DTS fixup file */

#define FLASH_DEV_BASE_ADDRESS		NXP_KINETIS_FTFE_40020000_BASE_ADDRESS_0
#define FLASH_DEV_NAME			NXP_KINETIS_FTFE_40020000_LABEL

/* End of SoC Level DTS fixup file */
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ extern "C" {

/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_MCUX)
#define FLASH_DRIVER_NAME	CONFIG_SOC_FLASH_MCUX_DEV_NAME
#define FLASH_DRIVER_NAME	FLASH_DEV_NAME
#endif

#endif /* !_ASMLANGUAGE */
+8 −0
Original line number Diff line number Diff line
/* SoC level DTS fixup file */

#if defined(CONFIG_SOC_MKW22D5) || defined(CONFIG_SOC_MKW24D5)
#define FLASH_DEV_BASE_ADDRESS		NXP_KINETIS_FTFL_40020000_BASE_ADDRESS_0
#define FLASH_DEV_NAME			NXP_KINETIS_FTFL_40020000_LABEL
#endif /* CONFIG_SOC_MKW22D5 || CONFIG_SOC_MKW24D5 */

/* End of SoC Level DTS fixup file */
+0 −7
Original line number Diff line number Diff line
@@ -149,13 +149,6 @@ config SOC_FLASH_MCUX
	  have an impact on the overall system performance - whether
	  this is acceptable or not will depend on the use case.

config SOC_FLASH_MCUX_DEV_NAME
	string "MCUX flash device name"
	depends on SOC_FLASH_MCUX
	default "MCUX_FLASH"
	help
	  Specify the device name for the flash driver.

source "drivers/flash/Kconfig.stm32"

source "drivers/flash/Kconfig.sam0"
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ static int flash_mcux_init(struct device *dev)
	return (rc == kStatus_Success) ? 0 : -EIO;
}

DEVICE_AND_API_INIT(flash_mcux, CONFIG_SOC_FLASH_MCUX_DEV_NAME,
DEVICE_AND_API_INIT(flash_mcux, FLASH_DEV_NAME,
			flash_mcux_init, &flash_data, NULL, POST_KERNEL,
			CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &flash_mcux_api);
Loading