Commit 913d4c4a authored by Alexander Potashev's avatar Alexander Potashev
Browse files

RT77788. k70-som: Add build-time parameters CONFIG_KINETIS_{K61,K70} to define MCU family

These strings will follow the selection of CONFIG_KINETIS_K61 or
CONFIG_KINETIS_K70:
 1. Hostname;
 2. U-Boot prompt;
 3. `platform_kinetis=[...]` in kernel parameters line;
 4. Board name.
parent 3558f6d4
......@@ -449,12 +449,18 @@ int board_init(void)
return 0;
}
#if defined(CONFIG_KINETIS_K70)
#define CONFIG_SYS_BOARD_NAME "K70-SOM"
#elif defined(CONFIG_KINETIS_K61)
#define CONFIG_SYS_BOARD_NAME "K61-SOM"
#endif
/*
* Dump pertinent info to the console.
*/
int checkboard(void)
{
printf("Board: K70-SOM Rev %s, www.emcraft.com\n",
printf("Board: " CONFIG_SYS_BOARD_NAME " Rev %s, www.emcraft.com\n",
CONFIG_SYS_BOARD_REV_STR);
return 0;
......
......@@ -42,6 +42,11 @@
*/
#define CONFIG_SYS_KINETIS
/*
* Choose Kinetis MCU family
*/
#define CONFIG_KINETIS_K70
/*
* Enable GPIO driver
*/
......@@ -69,9 +74,21 @@
#endif
/*
* Monitor prompt
* Monitor prompt and hostname
*/
#if defined(CONFIG_KINETIS_K70)
/* Kinetis K70 */
#define CONFIG_SYS_PROMPT "K70-SOM> "
#define CONFIG_HOSTNAME k70-som
#define CONFIG_KINETIS_PLATFORM "k70-som"
#elif defined(CONFIG_KINETIS_K61)
/* Kinetis K61 */
#define CONFIG_SYS_PROMPT "K61-SOM> "
#define CONFIG_HOSTNAME k61-som
#define CONFIG_KINETIS_PLATFORM "k61-som"
#else
#error No Kinetis MCU family specified
#endif
/*
* We want to call the CPU specific initialization
......@@ -350,8 +367,8 @@
*/
#define CONFIG_BOOTDELAY 3
#define CONFIG_ZERO_BOOTDELAY_CHECK
#define CONFIG_HOSTNAME k70-som
#define CONFIG_BOOTARGS "kinetis_platform=k70-som "\
#define CONFIG_BOOTARGS "kinetis_platform=" \
CONFIG_KINETIS_PLATFORM " " \
"console=ttyS2,115200 panic=10"
#define CONFIG_BOOTCOMMAND "run flashboot"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment