Commit 7a1a94f1 authored by Thomas Schäfer's avatar Thomas Schäfer
Browse files

Revert "pitx-imx8m: add 'core_variant' environment variable"

- There are other automatic environment variable available:
  arch=arm
  soc=imx8m
  soc_type=imx8mq
  cpu=armv8
  So, no additional 'core_variant' variable is necessary.

This reverts commit 480e495505ef9a03af3f2b509d9bf845470bac43.
parent 6a416b9f
......@@ -31,7 +31,6 @@
#include <i2c.h>
#include <search.h>
#include <environment.h>
#include <linux/ctype.h>
#include "pitx-imx8m.h"
#include "../common/emb_eep.h"
......@@ -531,32 +530,9 @@ static enum boot_source pitx_imx8m_boot_source(void)
};
}
static void get_core_variant(char *variant, int maxlen)
{
u32 cpu_rev = get_cpu_rev();
char *p_var = variant;
const char *p_cpuvar = get_imx_type((cpu_rev&0x1FF000) >> 12);
int len = strlen(p_cpuvar);
memset(variant, 0, maxlen);
if (len > maxlen)
len = maxlen;
/* convert variant string to lowercase */
for (; len > 0 ; len--, p_cpuvar++) {
if (*p_cpuvar != ' ')
*p_var++ = tolower(*p_cpuvar);
}
}
int board_late_init(void)
{
char core_variant[32];
get_core_variant(core_variant, 32);
env_set("core_variant", core_variant);
env_set_ulong("bootsource", pitx_imx8m_boot_source());
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
env_set("board_name", "PITX-iMX8M");
env_set("board_rev", "iMX8MQ");
......
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