ipq6018: Adding support for ipq6018-AP-CP01-C2

Change-Id: Ibf0771ad18d7d6cd52ddb92a5950053d25f3132d
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
Antony Arun T 2019-06-27 13:03:13 +05:30
parent 48cfa1e581
commit fedd981dfd
2 changed files with 36 additions and 0 deletions

View file

@ -1139,6 +1139,8 @@ extern unsigned int __machine_arch_type;
#define MACH_TYPE_IPQ40XX_DB_DK02_1_C1 0x1010003
#define MACH_TYPE_IPQ40XX_TB832 0x1010004
#define MACH_TYPE_IPQ40XX_AP_DK04_1_C6 0x8010501
#define MACH_TYPE_IPQ6018_AP_CP01_C1 0x8030000
#define MACH_TYPE_IPQ6018_AP_CP01_C2 0x8030001
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type

View file

@ -1231,3 +1231,37 @@ int bring_sec_core_up(unsigned int cpuid, unsigned int entry, unsigned int arg)
printf("Enabled CPU%d via psci successfully!\n", cpuid);
return 0;
}
unsigned int get_dts_machid(unsigned int machid)
{
switch (machid)
{
case MACH_TYPE_IPQ6018_AP_CP01_C2:
return MACH_TYPE_IPQ6018_AP_CP01_C1;
default:
return machid;
}
}
void ipq_uboot_fdt_fixup(void)
{
int ret, len;
const char *config = "config@cp01-c2";
len = fdt_totalsize(gd->fdt_blob) + strlen(config) + 1;
if (gd->bd->bi_arch_number == MACH_TYPE_IPQ6018_AP_CP01_C2)
{
/*
* Open in place with a new length.
*/
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob, len);
if (ret)
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
config, (strlen(config)+1));
if (ret)
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
}
return;
}