From 281568718687bab84224272815844a9f14dda60c Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Thu, 2 Jun 2016 10:29:15 -0500 Subject: [PATCH] nxp_kinetis: Add Kconfig options to select the SoC part number The KSDK device header files require a preprocessor macro that defines the part number string (e.g., MK64FN1M0VMD12). Create a hidden Kconfig option to hold the part number string, and hidden Kconfig options that the board Kconfig will use to select the specific part number. Change-Id: I612e785026261e425b47b5b7fae0c65b4f94b30b Signed-off-by: Maureen Helm Signed-off-by: Kumar Gala --- arch/arm/soc/nxp_kinetis/Kconfig | 8 +++++ arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc | 43 ++++++++++++++++++++++++ boards/frdm_k64f/Kconfig.board | 1 + 3 files changed, 52 insertions(+) diff --git a/arch/arm/soc/nxp_kinetis/Kconfig b/arch/arm/soc/nxp_kinetis/Kconfig index c8453115d75..e024708ed86 100644 --- a/arch/arm/soc/nxp_kinetis/Kconfig +++ b/arch/arm/soc/nxp_kinetis/Kconfig @@ -26,3 +26,11 @@ config SOC_FAMILY endif source "arch/arm/soc/nxp_kinetis/*/Kconfig.soc" + +config SOC_PART_NUMBER + string + default SOC_PART_NUMBER_KINETIS_K6X if SOC_SERIES_KINETIS_K6X + help + This string holds the full part number of the SoC. It is a hidden option + that you should not set directly. The part number selection choice defines + the default value for this string. diff --git a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc index cdc5fe9fd49..f3e38864576 100644 --- a/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc +++ b/arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc @@ -26,6 +26,49 @@ endchoice if SOC_SERIES_KINETIS_K6X +config SOC_PART_NUMBER_MK64FN1M0CAJ12 + bool + +config SOC_PART_NUMBER_MK64FN1M0VDC12 + bool + +config SOC_PART_NUMBER_MK64FN1M0VLL12 + bool + +config SOC_PART_NUMBER_MK64FN1M0VLQ12 + bool + +config SOC_PART_NUMBER_MK64FN1M0VMD12 + bool + +config SOC_PART_NUMBER_MK64FX512VDC12 + bool + +config SOC_PART_NUMBER_MK64FX512VLL12 + bool + +config SOC_PART_NUMBER_MK64FX512VLQ12 + bool + +config SOC_PART_NUMBER_MK64FX512VMD12 + bool + +config SOC_PART_NUMBER_KINETIS_K6X + string + default "MK64FN1M0CAJ12" if SOC_PART_NUMBER_MK64FN1M0CAJ12 + default "MK64FN1M0VDC12" if SOC_PART_NUMBER_MK64FN1M0VDC12 + default "MK64FN1M0VLL12" if SOC_PART_NUMBER_MK64FN1M0VLL12 + default "MK64FN1M0VLQ12" if SOC_PART_NUMBER_MK64FN1M0VLQ12 + default "MK64FN1M0VMD12" if SOC_PART_NUMBER_MK64FN1M0VMD12 + default "MK64FX512VDC12" if SOC_PART_NUMBER_MK64FX512VDC12 + default "MK64FX512VLL12" if SOC_PART_NUMBER_MK64FX512VLL12 + default "MK64FX512VLQ12" if SOC_PART_NUMBER_MK64FX512VLQ12 + default "MK64FX512VMD12" if SOC_PART_NUMBER_MK64FX512VMD12 + help + This string holds the full part number of the SoC. It is a hidden option + that you should not set directly. The part number selection choice defines + the default value for this string. + config K64_CORE_CLOCK_DIVIDER int prompt "Freescale K64 core clock divider" diff --git a/boards/frdm_k64f/Kconfig.board b/boards/frdm_k64f/Kconfig.board index 9875606ac02..95fa34d14df 100644 --- a/boards/frdm_k64f/Kconfig.board +++ b/boards/frdm_k64f/Kconfig.board @@ -2,3 +2,4 @@ config BOARD_FRDM_K64F bool "Freescale FRDM-K64F" depends on SOC_SERIES_KINETIS_K6X + select SOC_PART_NUMBER_MK64FN1M0VLL12