flash: Rename ksdk to mcux
Renames the ksdk soc flash driver to mcux. Change-Id: I835e36f25d8bc3e3aa6286718452528174378907 Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
aa995f8d2f
commit
e17adf377b
5 changed files with 26 additions and 26 deletions
|
@ -79,7 +79,7 @@ endif # RANDOM_GENERATOR
|
||||||
|
|
||||||
if FLASH
|
if FLASH
|
||||||
|
|
||||||
config SOC_FLASH_KSDK
|
config SOC_FLASH_MCUX
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
endif # FLASH
|
endif # FLASH
|
||||||
|
|
|
@ -132,21 +132,21 @@ config SOC_FLASH_NRF5_DEV_NAME
|
||||||
help
|
help
|
||||||
Specify the device name for the flash driver.
|
Specify the device name for the flash driver.
|
||||||
|
|
||||||
config SOC_FLASH_KSDK
|
config SOC_FLASH_MCUX
|
||||||
bool "KSDK flash shim driver"
|
bool "MCUX flash shim driver"
|
||||||
depends on FLASH && HAS_KSDK
|
depends on FLASH && HAS_MCUX
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enables the KSDK flash shim driver.
|
Enables the MCUX flash shim driver.
|
||||||
WARNING: This driver will disable the system interrupts for
|
WARNING: This driver will disable the system interrupts for
|
||||||
the duration of the flash erase/write operations. This will
|
the duration of the flash erase/write operations. This will
|
||||||
have an impact on the overall system performance - whether
|
have an impact on the overall system performance - whether
|
||||||
this is acceptable or not will depend on the use case.
|
this is acceptable or not will depend on the use case.
|
||||||
|
|
||||||
config SOC_FLASH_KSDK_DEV_NAME
|
config SOC_FLASH_MCUX_DEV_NAME
|
||||||
string "KSDK flash device name"
|
string "MCUX flash device name"
|
||||||
depends on SOC_FLASH_KSDK
|
depends on SOC_FLASH_MCUX
|
||||||
default "KSDK_FLASH"
|
default "MCUX_FLASH"
|
||||||
help
|
help
|
||||||
Specify the device name for the flash driver.
|
Specify the device name for the flash driver.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
obj-$(CONFIG_SPI_FLASH_W25QXXDV) += spi_flash_w25qxxdv.o
|
obj-$(CONFIG_SPI_FLASH_W25QXXDV) += spi_flash_w25qxxdv.o
|
||||||
obj-$(CONFIG_SOC_FLASH_QMSI) += soc_flash_qmsi.o
|
obj-$(CONFIG_SOC_FLASH_QMSI) += soc_flash_qmsi.o
|
||||||
obj-$(CONFIG_SOC_FLASH_NRF5) += soc_flash_nrf5.o
|
obj-$(CONFIG_SOC_FLASH_NRF5) += soc_flash_nrf5.o
|
||||||
obj-$(CONFIG_SOC_FLASH_KSDK) += soc_flash_ksdk.o
|
obj-$(CONFIG_SOC_FLASH_MCUX) += soc_flash_mcux.o
|
||||||
|
|
|
@ -32,14 +32,14 @@ struct flash_priv {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interrupt vectors could be executed from flash hence the need for locking.
|
* Interrupt vectors could be executed from flash hence the need for locking.
|
||||||
* The underlying KDSK driver takes care of copying the functions to SRAM.
|
* The underlying MCUX driver takes care of copying the functions to SRAM.
|
||||||
*
|
*
|
||||||
* For more information, see the application note below on Read-While-Write
|
* For more information, see the application note below on Read-While-Write
|
||||||
* http://cache.freescale.com/files/32bit/doc/app_note/AN4695.pdf
|
* http://cache.freescale.com/files/32bit/doc/app_note/AN4695.pdf
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int flash_ksdk_erase(struct device *dev, off_t offset, size_t len)
|
static int flash_mcux_erase(struct device *dev, off_t offset, size_t len)
|
||||||
{
|
{
|
||||||
struct flash_priv *priv = dev->driver_data;
|
struct flash_priv *priv = dev->driver_data;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
|
@ -55,14 +55,14 @@ static int flash_ksdk_erase(struct device *dev, off_t offset, size_t len)
|
||||||
return (rc == kStatus_Success) ? 0 : -EINVAL;
|
return (rc == kStatus_Success) ? 0 : -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int flash_ksdk_read(struct device *dev, off_t offset,
|
static int flash_mcux_read(struct device *dev, off_t offset,
|
||||||
void *data, size_t len)
|
void *data, size_t len)
|
||||||
{
|
{
|
||||||
struct flash_priv *priv = dev->driver_data;
|
struct flash_priv *priv = dev->driver_data;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The KSDK supports different flash chips whose valid ranges are
|
* The MCUX supports different flash chips whose valid ranges are
|
||||||
* hidden below the API: until the API export these ranges, we can not
|
* hidden below the API: until the API export these ranges, we can not
|
||||||
* do any generic validation
|
* do any generic validation
|
||||||
*/
|
*/
|
||||||
|
@ -73,7 +73,7 @@ static int flash_ksdk_read(struct device *dev, off_t offset,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int flash_ksdk_write(struct device *dev, off_t offset,
|
static int flash_mcux_write(struct device *dev, off_t offset,
|
||||||
const void *data, size_t len)
|
const void *data, size_t len)
|
||||||
{
|
{
|
||||||
struct flash_priv *priv = dev->driver_data;
|
struct flash_priv *priv = dev->driver_data;
|
||||||
|
@ -90,21 +90,21 @@ static int flash_ksdk_write(struct device *dev, off_t offset,
|
||||||
return (rc == kStatus_Success) ? 0 : -EINVAL;
|
return (rc == kStatus_Success) ? 0 : -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int flash_ksdk_write_protection(struct device *dev, bool enable)
|
static int flash_mcux_write_protection(struct device *dev, bool enable)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct flash_priv flash_data;
|
static struct flash_priv flash_data;
|
||||||
|
|
||||||
static const struct flash_driver_api flash_ksdk_api = {
|
static const struct flash_driver_api flash_mcux_api = {
|
||||||
.write_protection = flash_ksdk_write_protection,
|
.write_protection = flash_mcux_write_protection,
|
||||||
.erase = flash_ksdk_erase,
|
.erase = flash_mcux_erase,
|
||||||
.write = flash_ksdk_write,
|
.write = flash_mcux_write,
|
||||||
.read = flash_ksdk_read,
|
.read = flash_mcux_read,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int flash_ksdk_init(struct device *dev)
|
static int flash_mcux_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct flash_priv *priv = dev->driver_data;
|
struct flash_priv *priv = dev->driver_data;
|
||||||
status_t rc;
|
status_t rc;
|
||||||
|
@ -114,7 +114,7 @@ static int flash_ksdk_init(struct device *dev)
|
||||||
return (rc == kStatus_Success) ? 0 : -EIO;
|
return (rc == kStatus_Success) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(flash_ksdk, CONFIG_SOC_FLASH_KSDK_DEV_NAME,
|
DEVICE_AND_API_INIT(flash_mcux, CONFIG_SOC_FLASH_MCUX_DEV_NAME,
|
||||||
flash_ksdk_init, &flash_data, NULL, POST_KERNEL,
|
flash_mcux_init, &flash_data, NULL, POST_KERNEL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &flash_ksdk_api);
|
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &flash_mcux_api);
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
obj-$(CONFIG_ETH_MCUX) += fsl_enet.o
|
obj-$(CONFIG_ETH_MCUX) += fsl_enet.o
|
||||||
obj-$(CONFIG_I2C_MCUX) += fsl_i2c.o
|
obj-$(CONFIG_I2C_MCUX) += fsl_i2c.o
|
||||||
obj-$(CONFIG_RANDOM_MCUX) += fsl_rnga.o
|
obj-$(CONFIG_RANDOM_MCUX) += fsl_rnga.o
|
||||||
obj-$(CONFIG_SOC_FLASH_KSDK) += fsl_flash.o
|
obj-$(CONFIG_SOC_FLASH_MCUX) += fsl_flash.o
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue