kinetis: reorganise soc directory using soc family
Add Kinetis SoC family and rename fsl_frdm_k64f to mk64f12. This will allow adding new SoCs of the same family and the reuse of code among SoCs of the family and series. Change-Id: Iea1a663aef7ce0487f147bdd36f668bebe80deb5 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
4b411b34a1
commit
65c06afa58
26 changed files with 142 additions and 44 deletions
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "ARM SoC Selection"
|
prompt "ARM SoC Selection"
|
||||||
default SOC_FSL_FRDM_K64F
|
default SOC_SERIES_KINETIS_K6X
|
||||||
depends on ARM
|
depends on ARM
|
||||||
|
|
||||||
source "arch/arm/soc/*/Kconfig.soc"
|
source "arch/arm/soc/*/Kconfig.soc"
|
||||||
|
|
|
@ -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
|
|
28
arch/arm/soc/nxp_kinetis/Kconfig
Normal file
28
arch/arm/soc/nxp_kinetis/Kconfig
Normal file
|
@ -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"
|
1
arch/arm/soc/nxp_kinetis/Kconfig.defconfig
Normal file
1
arch/arm/soc/nxp_kinetis/Kconfig.defconfig
Normal file
|
@ -0,0 +1 @@
|
||||||
|
source "arch/arm/soc/nxp_kinetis/*/Kconfig.defconfig.series"
|
17
arch/arm/soc/nxp_kinetis/Kconfig.soc
Normal file
17
arch/arm/soc/nxp_kinetis/Kconfig.soc
Normal file
|
@ -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"
|
|
@ -16,29 +16,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
if SOC_FSL_FRDM_K64F
|
if SOC_MK64F12
|
||||||
|
|
||||||
config SOC
|
config SOC
|
||||||
default fsl_frdm_k64f
|
string
|
||||||
|
default mk64f12
|
||||||
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
|
|
||||||
|
|
||||||
if UART_K20
|
if UART_K20
|
||||||
|
|
||||||
|
@ -185,4 +167,4 @@ endif # SPI_K64
|
||||||
|
|
||||||
endif # SPI
|
endif # SPI
|
||||||
|
|
||||||
endif # SOC_FSL_FRDM_K64F
|
endif # SOC_MK64F12
|
41
arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.series
Normal file
41
arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.series
Normal file
|
@ -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
|
25
arch/arm/soc/nxp_kinetis/k6x/Kconfig.series
Normal file
25
arch/arm/soc/nxp_kinetis/k6x/Kconfig.series
Normal file
|
@ -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
|
|
@ -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");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -16,7 +15,16 @@
|
||||||
# limitations under the License.
|
# 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
|
config K64_CORE_CLOCK_DIVIDER
|
||||||
int
|
int
|
||||||
|
@ -59,7 +67,7 @@ config WDOG_INIT
|
||||||
during reset handling.
|
during reset handling.
|
||||||
|
|
||||||
config PRESERVE_JTAG_IO_PINS
|
config PRESERVE_JTAG_IO_PINS
|
||||||
bool "Freescale FRDM-K64F JTAG pin usage"
|
bool "Kinetis K6x JTAG pin usage"
|
||||||
depends on PINMUX
|
depends on PINMUX
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
|
@ -68,4 +76,4 @@ config PRESERVE_JTAG_IO_PINS
|
||||||
the Arduino header as D8, D3 and D5, respectively.
|
the Arduino header as D8, D3 and D5, respectively.
|
||||||
Enable this option to preserve these pins for the debug interface.
|
Enable this option to preserve these pins for the debug interface.
|
||||||
|
|
||||||
endif # SOC_FSL_FRDM_K64F
|
endif # SOC_SERIES_KINETIS_K6X
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
config BOARD_FRDM_K64F
|
config BOARD_FRDM_K64F
|
||||||
bool "Freescale FRDM-K64F"
|
bool "Freescale FRDM-K64F"
|
||||||
depends on SOC_FSL_FRDM_K64F
|
depends on SOC_SERIES_KINETIS_K6X
|
||||||
|
|
|
@ -10,4 +10,4 @@ config FLASH_SIZE
|
||||||
config SRAM_SIZE
|
config SRAM_SIZE
|
||||||
default 192
|
default 192
|
||||||
|
|
||||||
endif # BOARD_FSL_FRDM_K64F
|
endif # BOARD_FRDM_K64F
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
CONFIG_ARM=y
|
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_BOARD_FRDM_K64F=y
|
||||||
CONFIG_CONSOLE=y
|
CONFIG_CONSOLE=y
|
||||||
CONFIG_UART_CONSOLE=y
|
CONFIG_UART_CONSOLE=y
|
||||||
|
@ -7,3 +8,4 @@ CONFIG_SERIAL=y
|
||||||
CONFIG_CORTEX_M_SYSTICK=y
|
CONFIG_CORTEX_M_SYSTICK=y
|
||||||
CONFIG_UART_K20=y
|
CONFIG_UART_K20=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
menuconfig GPIO_K64
|
menuconfig GPIO_K64
|
||||||
bool "Freescale K64-based GPIO driver"
|
bool "Freescale K64-based GPIO driver"
|
||||||
depends on GPIO && SOC_FSL_FRDM_K64F
|
depends on GPIO && SOC_MK64F12
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable driver for Freescale K64-based GPIOs.
|
Enable driver for Freescale K64-based GPIOs.
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
menuconfig PINMUX_K64
|
menuconfig PINMUX_K64
|
||||||
bool "Freescale K64-based Pin multiplexer driver"
|
bool "Freescale K64-based Pin multiplexer driver"
|
||||||
depends on PINMUX && SOC_FSL_FRDM_K64F
|
depends on PINMUX && SOC_MK64F12
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable driver for Freescale K64-based Pin multiplexer.
|
Enable driver for Freescale K64-based Pin multiplexer.
|
||||||
|
|
|
@ -42,7 +42,7 @@ config PINMUX_DEV_ATMEL_SAM3X
|
||||||
|
|
||||||
config PINMUX_DEV_FRDM_K64F
|
config PINMUX_DEV_FRDM_K64F
|
||||||
bool "Enable the pinmux dev driver for Freescale 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
|
help
|
||||||
Enables the pinmux dev driver for Freescale FRDM K64F.
|
Enables the pinmux dev driver for Freescale FRDM K64F.
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
menuconfig PWM_K64_FTM
|
menuconfig PWM_K64_FTM
|
||||||
bool "PWM with Freescale K64 Flex Timer Module (FTM)"
|
bool "PWM with Freescale K64 Flex Timer Module (FTM)"
|
||||||
depends on PWM && SOC_FSL_FRDM_K64F
|
depends on PWM && SOC_MK64F12
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable Pulse Width Modulation driver for Freescale
|
Enable Pulse Width Modulation driver for Freescale
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
menuconfig SPI_K64
|
menuconfig SPI_K64
|
||||||
bool
|
bool
|
||||||
prompt "Freescale K64-based SPI controller driver"
|
prompt "Freescale K64-based SPI controller driver"
|
||||||
depends on SPI && SOC_FSL_FRDM_K64F
|
depends on SPI && SOC_MK64F12
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable support for Freescale K64-based SPI controllers.
|
Enable support for Freescale K64-based SPI controllers.
|
||||||
|
|
|
@ -138,7 +138,7 @@ void _TimestampClose(void)
|
||||||
_CLKGATECTRL &= ~_CLKGATECTRL_TIMESTAMP_EN;
|
_CLKGATECTRL &= ~_CLKGATECTRL_TIMESTAMP_EN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(CONFIG_SOC_FSL_FRDM_K64F)
|
#elif defined(CONFIG_SOC_MK64F12)
|
||||||
/* Freescale FRDM-K64F target - use RTC (prescale value) */
|
/* Freescale FRDM-K64F target - use RTC (prescale value) */
|
||||||
|
|
||||||
#define _COUNTDOWN_TIMER false
|
#define _COUNTDOWN_TIMER false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue