ext: mcux: Reorganize imported drivers into soc family subfolders
We have been combining imported mcux drivers into a flattened directory structure to maximize driver reuse, but the introduction of additional nxp soc families (lpc and imx) to zephyr has introduced driver naming conflicts. This caused us to rename and modify imported files, such as fsl_gpio.c/h, to make them unique across all three nxp soc families. This makes updating the the mcux drivers complicated, especially for the lpc family. Reoganize the mcux drivers into soc family subfolders, so we can just copy all the drivers from an mcux distribution (which is done on an soc-basis) into the appropriate soc family folder. Undo all of the naming changes that occurred when lpc and imx drivers were originally imported. Undo the accidental squashing of the kinetis watchdog and dcdc drivers that occurred when the imx drivers were introduced. The drawback to this approach is that we have duplicate files when the same hw ip modules exist in multiple soc families, however there are only few cases where this occurs, such as fsl_lpuart and fsl_trng. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
9791597ef9
commit
57e80e5345
291 changed files with 23425 additions and 140 deletions
|
@ -21,7 +21,7 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
#include <clock_config.h>
|
||||
#include <fsl_lpc_power.h>
|
||||
#include <fsl_power.h>
|
||||
#include <fsl_clock.h>
|
||||
#include <fsl_common.h>
|
||||
#include <fsl_device_registers.h>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <init.h>
|
||||
#include <pinmux.h>
|
||||
#include <fsl_common.h>
|
||||
#include <fsl_lpc_iocon.h>
|
||||
#include <fsl_iocon.h>
|
||||
|
||||
#define IOCON_PIO_DIGITAL_EN 0x80u
|
||||
#define IOCON_PIO_FUNC0 0x00u
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <gpio.h>
|
||||
#include <soc.h>
|
||||
#include <fsl_common.h>
|
||||
#include <fsl_igpio.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
#include "gpio_utils.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <soc.h>
|
||||
#include <fsl_common.h>
|
||||
#include "gpio_utils.h"
|
||||
#include <fsl_lpc_gpio.h>
|
||||
#include <fsl_gpio.h>
|
||||
#include <fsl_device_registers.h>
|
||||
|
||||
#define PORT0_IDX 0u
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <pinmux.h>
|
||||
#include <fsl_common.h>
|
||||
#include <fsl_clock.h>
|
||||
#include <fsl_lpc_iocon.h>
|
||||
#include <fsl_iocon.h>
|
||||
#include <fsl_device_registers.h>
|
||||
|
||||
#define PORT0_IDX 0u
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <errno.h>
|
||||
#include <device.h>
|
||||
#include <uart.h>
|
||||
#include <fsl_lpc_usart.h>
|
||||
#include <fsl_usart.h>
|
||||
#include <fsl_clock.h>
|
||||
#include <soc.h>
|
||||
#include <fsl_device_registers.h>
|
||||
|
|
|
@ -52,7 +52,7 @@ processor_version: 1.1.0
|
|||
board: LPCXpresso54114
|
||||
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE CLOCKS TOOL **/
|
||||
|
||||
#include "fsl_lpc_power.h"
|
||||
#include "fsl_power.h"
|
||||
#include "fsl_clock.h"
|
||||
#include "clock_config.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "fsl_common.h"
|
||||
#include "fsl_clock.h"
|
||||
#include "fsl_lpc_power.h"
|
||||
#include "fsl_power.h"
|
||||
/*******************************************************************************
|
||||
* Definitions
|
||||
******************************************************************************/
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
zephyr_include_directories(.)
|
||||
#
|
||||
# Copyright (c) 2018, NXP
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_ADC_MCUX_ADC16 fsl_adc16.c)
|
||||
zephyr_sources_ifdef(CONFIG_ETH_MCUX fsl_enet.c)
|
||||
zephyr_sources_ifdef(CONFIG_GPIO_MCUX_IGPIO fsl_igpio.c)
|
||||
zephyr_sources_ifdef(CONFIG_I2C_MCUX fsl_i2c.c)
|
||||
zephyr_sources_ifdef(CONFIG_PWM_MCUX_FTM fsl_ftm.c)
|
||||
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_RNGA fsl_rnga.c)
|
||||
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_TRNG fsl_trng.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_FLASH_MCUX fsl_flash.c)
|
||||
zephyr_sources_ifdef(CONFIG_SPI_MCUX_DSPI fsl_dspi.c)
|
||||
zephyr_sources_ifdef(CONFIG_UART_MCUX fsl_uart.c)
|
||||
zephyr_sources_ifdef(CONFIG_UART_MCUX_LPSCI fsl_lpsci.c)
|
||||
zephyr_sources_ifdef(CONFIG_UART_MCUX_LPUART fsl_lpuart.c)
|
||||
zephyr_sources_ifdef(CONFIG_USART_MCUX_LPC fsl_lpc_usart.c fsl_lpc_flexcomm.c)
|
||||
if("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_imx")
|
||||
add_subdirectory(imx)
|
||||
elseif("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_kinetis")
|
||||
add_subdirectory(kinetis)
|
||||
elseif("${CONFIG_SOC_FAMILY}" STREQUAL "nxp_lpc")
|
||||
add_subdirectory(lpc)
|
||||
endif()
|
||||
|
|
10
ext/hal/nxp/mcux/drivers/imx/CMakeLists.txt
Normal file
10
ext/hal/nxp/mcux/drivers/imx/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# Copyright (c) 2018, NXP
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
zephyr_include_directories(.)
|
||||
|
||||
zephyr_sources_ifdef(CONFIG_GPIO_MCUX_IGPIO fsl_gpio.c)
|
||||
zephyr_sources_ifdef(CONFIG_UART_MCUX_LPUART fsl_lpuart.c)
|
|
@ -172,7 +172,7 @@ typedef int32_t status_t;
|
|||
*/
|
||||
#if ((defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0)) || \
|
||||
(defined(FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT) && (FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT > 0)))
|
||||
#include "fsl_lpc_reset.h"
|
||||
#include "fsl_reset.h"
|
||||
#endif
|
||||
|
||||
/*! @name Min/max macros */
|
|
@ -28,7 +28,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "fsl_igpio.h"
|
||||
#include "fsl_gpio.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* Variables
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue