u-boot-2016/board/qca/arm/common/cmd_exectzt.c
Gokul Sriram Palanisamy 0564bbf6f9 tzt: Enabled exectzt for ipq40xx with dcache off
Change-Id: I9eec6dc9dc659808757aa1197ae09d708ffbf1c2
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-07-10 02:34:16 -07:00

46 lines
1.2 KiB
C

/*
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <common.h>
#include <command.h>
#include <asm/arch-qca-common/scm.h>
__weak void run_tzt(void *address)
{
char runcmd[128];
dcache_disable();
snprintf(runcmd, sizeof(runcmd), "go 0x%08lX", (ulong)address);
run_command(runcmd, 0);
}
int do_exectzt(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
uint32_t address;
if (argc != 2) {
printf("No Arguments provided\n");
printf("Command format: exectzt <address>\n");
return 1;
}
address = simple_strtoul(argv[1], NULL, 16);
run_tzt((void *)address);
return 0;
}
U_BOOT_CMD(exectzt, 2, 0, do_exectzt,
"execute TZT\n",
"exectzt [address] - Execute TZT\n");