diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 632f2629181..b9fa36b9528 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -18,7 +18,7 @@ choice prompt "ARM SoC Selection" - default SOC_FSL_FRDM_K64F + default SOC_SERIES_KINETIS_K6X depends on ARM source "arch/arm/soc/*/Kconfig.soc" diff --git a/arch/arm/soc/fsl_frdm_k64f/Kconfig.soc b/arch/arm/soc/fsl_frdm_k64f/Kconfig.soc deleted file mode 100644 index aadc1af3ec6..00000000000 --- a/arch/arm/soc/fsl_frdm_k64f/Kconfig.soc +++ /dev/null @@ -1,6 +0,0 @@ - -config SOC_FSL_FRDM_K64F - bool "Freescale FRDM-K64F" - select CPU_CORTEX_M - select CPU_CORTEX_M4 - select SYS_POWER_LOW_POWER_STATE_SUPPORTED \ No newline at end of file diff --git a/arch/arm/soc/nxp_kinetis/Kconfig b/arch/arm/soc/nxp_kinetis/Kconfig new file mode 100644 index 00000000000..c8453115d75 --- /dev/null +++ b/arch/arm/soc/nxp_kinetis/Kconfig @@ -0,0 +1,28 @@ +# +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +config SOC_FAMILY_KINETIS + bool + # omit prompt to signify a "hidden" option + default n + +if SOC_FAMILY_KINETIS +config SOC_FAMILY + string + default "nxp_kinetis" +endif + +source "arch/arm/soc/nxp_kinetis/*/Kconfig.soc" diff --git a/arch/arm/soc/nxp_kinetis/Kconfig.defconfig b/arch/arm/soc/nxp_kinetis/Kconfig.defconfig new file mode 100644 index 00000000000..7ceb7a560b6 --- /dev/null +++ b/arch/arm/soc/nxp_kinetis/Kconfig.defconfig @@ -0,0 +1 @@ +source "arch/arm/soc/nxp_kinetis/*/Kconfig.defconfig.series" diff --git a/arch/arm/soc/nxp_kinetis/Kconfig.soc b/arch/arm/soc/nxp_kinetis/Kconfig.soc new file mode 100644 index 00000000000..fc01277ca99 --- /dev/null +++ b/arch/arm/soc/nxp_kinetis/Kconfig.soc @@ -0,0 +1,17 @@ +# +# Copyright (c) 2016 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source "arch/arm/soc/nxp_kinetis/*/Kconfig.series" diff --git a/arch/arm/soc/fsl_frdm_k64f/Kbuild b/arch/arm/soc/nxp_kinetis/k6x/Kbuild similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/Kbuild rename to arch/arm/soc/nxp_kinetis/k6x/Kbuild diff --git a/arch/arm/soc/fsl_frdm_k64f/Kconfig.defconfig b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12 similarity index 87% rename from arch/arm/soc/fsl_frdm_k64f/Kconfig.defconfig rename to arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12 index c18b1bca055..b96622def3c 100644 --- a/arch/arm/soc/fsl_frdm_k64f/Kconfig.defconfig +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12 @@ -16,29 +16,11 @@ # limitations under the License. # -if SOC_FSL_FRDM_K64F +if SOC_MK64F12 config SOC - default fsl_frdm_k64f - -config SRAM_BASE_ADDRESS - default 0x20000000 - -config FLASH_BASE_ADDRESS - default 0x00000000 - -config NUM_IRQ_PRIO_BITS - int - default 4 - -config NUM_IRQS - int - # must be >= the highest interrupt number used - default 86 - -config SYS_CLOCK_HW_CYCLES_PER_SEC - int - default 120000000 + string + default mk64f12 if UART_K20 @@ -185,4 +167,4 @@ endif # SPI_K64 endif # SPI -endif # SOC_FSL_FRDM_K64F +endif # SOC_MK64F12 diff --git a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.series b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.series new file mode 100644 index 00000000000..17fbd0e8e5b --- /dev/null +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.series @@ -0,0 +1,41 @@ +# Kconfig - Kinetis K6x series configuration options + +# +# Copyright (c) 2014-2016 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if SOC_SERIES_KINETIS_K6X + +config SOC_SERIES + default k6x + +config SRAM_BASE_ADDRESS + default 0x20000000 + +config FLASH_BASE_ADDRESS + default 0x00000000 + +config NUM_IRQ_PRIO_BITS + int + default 4 + +config NUM_IRQS + int + # must be >= the highest interrupt number used + default 86 + +source "arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk*" + +endif # SOC_SERIES_KINETIS_K6X diff --git a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.series b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.series new file mode 100644 index 00000000000..1f6256a97d8 --- /dev/null +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.series @@ -0,0 +1,25 @@ +# Kconfig - Kinetis K6X MCU line +# +# Copyright (c) 2016 Open-RnD Sp. z o.o. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +config SOC_SERIES_KINETIS_K6X + bool "Kinetis K6x Series MCU" + select CPU_CORTEX_M + select CPU_CORTEX_M4 + select SOC_FAMILY_KINETIS + select SYS_POWER_LOW_POWER_STATE_SUPPORTED + help + Enable support for Kinetis K6x MCU series diff --git a/arch/arm/soc/fsl_frdm_k64f/Kconfig b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc similarity index 86% rename from arch/arm/soc/fsl_frdm_k64f/Kconfig rename to arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc index 2196e9ef85c..5ec6726b7dd 100644 --- a/arch/arm/soc/fsl_frdm_k64f/Kconfig +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc @@ -1,7 +1,6 @@ -# Kconfig - FSL FRDM K64F platform configuration options - +# Kconfig - Kinetis K6X MCU line # -# Copyright (c) 2014-2016 Wind River Systems, Inc. +# Copyright (c) 2016 Open-RnD Sp. z o.o. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +15,16 @@ # limitations under the License. # -if SOC_FSL_FRDM_K64F +choice +prompt "Kinetis K6x MCU Selection" +depends on SOC_SERIES_KINETIS_K6X + +config SOC_MK64F12 + bool "SOC_MK64F12" + +endchoice + +if SOC_SERIES_KINETIS_K6X config K64_CORE_CLOCK_DIVIDER int @@ -59,7 +67,7 @@ config WDOG_INIT during reset handling. config PRESERVE_JTAG_IO_PINS - bool "Freescale FRDM-K64F JTAG pin usage" + bool "Kinetis K6x JTAG pin usage" depends on PINMUX default y help @@ -68,4 +76,4 @@ config PRESERVE_JTAG_IO_PINS the Arduino header as D8, D3 and D5, respectively. Enable this option to preserve these pins for the debug interface. -endif # SOC_FSL_FRDM_K64F +endif # SOC_SERIES_KINETIS_K6X diff --git a/arch/arm/soc/fsl_frdm_k64f/Makefile b/arch/arm/soc/nxp_kinetis/k6x/Makefile similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/Makefile rename to arch/arm/soc/nxp_kinetis/k6x/Makefile diff --git a/arch/arm/soc/fsl_frdm_k64f/README.txt b/arch/arm/soc/nxp_kinetis/k6x/README.txt similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/README.txt rename to arch/arm/soc/nxp_kinetis/k6x/README.txt diff --git a/arch/arm/soc/fsl_frdm_k64f/linker.cmd b/arch/arm/soc/nxp_kinetis/k6x/linker.cmd similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/linker.cmd rename to arch/arm/soc/nxp_kinetis/k6x/linker.cmd diff --git a/arch/arm/soc/fsl_frdm_k64f/soc.c b/arch/arm/soc/nxp_kinetis/k6x/soc.c similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/soc.c rename to arch/arm/soc/nxp_kinetis/k6x/soc.c diff --git a/arch/arm/soc/fsl_frdm_k64f/soc.h b/arch/arm/soc/nxp_kinetis/k6x/soc.h similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/soc.h rename to arch/arm/soc/nxp_kinetis/k6x/soc.h diff --git a/arch/arm/soc/fsl_frdm_k64f/soc_config.c b/arch/arm/soc/nxp_kinetis/k6x/soc_config.c similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/soc_config.c rename to arch/arm/soc/nxp_kinetis/k6x/soc_config.c diff --git a/arch/arm/soc/fsl_frdm_k64f/wdog.S b/arch/arm/soc/nxp_kinetis/k6x/wdog.S similarity index 100% rename from arch/arm/soc/fsl_frdm_k64f/wdog.S rename to arch/arm/soc/nxp_kinetis/k6x/wdog.S diff --git a/boards/frdm_k64f/Kconfig.board b/boards/frdm_k64f/Kconfig.board index dd48e8f81dc..36c20bbf2e9 100644 --- a/boards/frdm_k64f/Kconfig.board +++ b/boards/frdm_k64f/Kconfig.board @@ -1,4 +1,4 @@ config BOARD_FRDM_K64F bool "Freescale FRDM-K64F" - depends on SOC_FSL_FRDM_K64F + depends on SOC_SERIES_KINETIS_K6X diff --git a/boards/frdm_k64f/Kconfig.defconfig b/boards/frdm_k64f/Kconfig.defconfig index d5ea660c816..dbb1f294c80 100644 --- a/boards/frdm_k64f/Kconfig.defconfig +++ b/boards/frdm_k64f/Kconfig.defconfig @@ -10,4 +10,4 @@ config FLASH_SIZE config SRAM_SIZE default 192 -endif # BOARD_FSL_FRDM_K64F +endif # BOARD_FRDM_K64F diff --git a/boards/frdm_k64f/frdm_k64f_defconfig b/boards/frdm_k64f/frdm_k64f_defconfig index 2c0038bb9a3..ba239248ace 100644 --- a/boards/frdm_k64f/frdm_k64f_defconfig +++ b/boards/frdm_k64f/frdm_k64f_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y -CONFIG_SOC_FSL_FRDM_K64F=y +CONFIG_SOC_MK64F12=y +CONFIG_SOC_SERIES_KINETIS_K6X=y CONFIG_BOARD_FRDM_K64F=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -7,3 +8,4 @@ CONFIG_SERIAL=y CONFIG_CORTEX_M_SYSTICK=y CONFIG_UART_K20=y CONFIG_GPIO=y +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000 diff --git a/drivers/gpio/Kconfig.k64 b/drivers/gpio/Kconfig.k64 index 8854f735a54..681e0ae91d5 100644 --- a/drivers/gpio/Kconfig.k64 +++ b/drivers/gpio/Kconfig.k64 @@ -19,7 +19,7 @@ menuconfig GPIO_K64 bool "Freescale K64-based GPIO driver" - depends on GPIO && SOC_FSL_FRDM_K64F + depends on GPIO && SOC_MK64F12 default n help Enable driver for Freescale K64-based GPIOs. diff --git a/drivers/pinmux/Kconfig.k64 b/drivers/pinmux/Kconfig.k64 index ea8b4f42b00..e6da5be4746 100644 --- a/drivers/pinmux/Kconfig.k64 +++ b/drivers/pinmux/Kconfig.k64 @@ -19,7 +19,7 @@ menuconfig PINMUX_K64 bool "Freescale K64-based Pin multiplexer driver" - depends on PINMUX && SOC_FSL_FRDM_K64F + depends on PINMUX && SOC_MK64F12 default n help Enable driver for Freescale K64-based Pin multiplexer. diff --git a/drivers/pinmux/dev/Kconfig b/drivers/pinmux/dev/Kconfig index cbfefbd0c7b..14187c284b2 100644 --- a/drivers/pinmux/dev/Kconfig +++ b/drivers/pinmux/dev/Kconfig @@ -42,7 +42,7 @@ config PINMUX_DEV_ATMEL_SAM3X config PINMUX_DEV_FRDM_K64F bool "Enable the pinmux dev driver for Freescale FRDM K64F" - depends on PINMUX_DEV && SOC_FSL_FRDM_K64F + depends on PINMUX_DEV && SOC_MK64F12 help Enables the pinmux dev driver for Freescale FRDM K64F. default n diff --git a/drivers/pwm/Kconfig.k64 b/drivers/pwm/Kconfig.k64 index 817922b56dd..6ea949d7d38 100644 --- a/drivers/pwm/Kconfig.k64 +++ b/drivers/pwm/Kconfig.k64 @@ -23,7 +23,7 @@ menuconfig PWM_K64_FTM bool "PWM with Freescale K64 Flex Timer Module (FTM)" - depends on PWM && SOC_FSL_FRDM_K64F + depends on PWM && SOC_MK64F12 default n help Enable Pulse Width Modulation driver for Freescale diff --git a/drivers/spi/Kconfig.k64 b/drivers/spi/Kconfig.k64 index 00c052ddb32..d4bcdec2e0d 100644 --- a/drivers/spi/Kconfig.k64 +++ b/drivers/spi/Kconfig.k64 @@ -20,7 +20,7 @@ menuconfig SPI_K64 bool prompt "Freescale K64-based SPI controller driver" - depends on SPI && SOC_FSL_FRDM_K64F + depends on SPI && SOC_MK64F12 default n help Enable support for Freescale K64-based SPI controllers. diff --git a/tests/kernel/test_tickless/microkernel/src/timestamps.c b/tests/kernel/test_tickless/microkernel/src/timestamps.c index 7d3ccf1f3ba..db5e486f363 100644 --- a/tests/kernel/test_tickless/microkernel/src/timestamps.c +++ b/tests/kernel/test_tickless/microkernel/src/timestamps.c @@ -138,7 +138,7 @@ void _TimestampClose(void) _CLKGATECTRL &= ~_CLKGATECTRL_TIMESTAMP_EN; } -#elif defined(CONFIG_SOC_FSL_FRDM_K64F) +#elif defined(CONFIG_SOC_MK64F12) /* Freescale FRDM-K64F target - use RTC (prescale value) */ #define _COUNTDOWN_TIMER false