mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-08 06:04:34 +00:00
0a668f6d38
This patch adds support for all OcteonTX2 96xx/95xx boards from Marvell. For 96xx boards, use octeontx_96xx_defconfig and for 95xx boards, use octeontx_95xx_defconfig. Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
58 lines
972 B
C
58 lines
972 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (C) 2018 Marvell International Ltd.
|
|
*
|
|
* https://spdx.org/licenses
|
|
*/
|
|
|
|
#include <asm/global_data.h>
|
|
#include <asm/io.h>
|
|
#include <asm/psci.h>
|
|
#include <asm/ptrace.h>
|
|
#include <asm/system.h>
|
|
#include <asm/arch/smc.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
ssize_t smc_dram_size(unsigned int node)
|
|
{
|
|
struct pt_regs regs;
|
|
|
|
regs.regs[0] = OCTEONTX2_DRAM_SIZE;
|
|
regs.regs[1] = node;
|
|
smc_call(®s);
|
|
|
|
return regs.regs[0];
|
|
}
|
|
|
|
ssize_t smc_disable_rvu_lfs(unsigned int node)
|
|
{
|
|
struct pt_regs regs;
|
|
|
|
regs.regs[0] = OCTEONTX2_DISABLE_RVU_LFS;
|
|
regs.regs[1] = node;
|
|
smc_call(®s);
|
|
|
|
return regs.regs[0];
|
|
}
|
|
|
|
ssize_t smc_configure_ooo(unsigned int val)
|
|
{
|
|
struct pt_regs regs;
|
|
|
|
regs.regs[0] = OCTEONTX2_CONFIG_OOO;
|
|
regs.regs[1] = val;
|
|
smc_call(®s);
|
|
|
|
return regs.regs[0];
|
|
}
|
|
|
|
ssize_t smc_flsf_fw_booted(void)
|
|
{
|
|
struct pt_regs regs;
|
|
|
|
regs.regs[0] = OCTEONTX2_FSAFE_PR_BOOT_SUCCESS;
|
|
smc_call(®s);
|
|
|
|
return regs.regs[0];
|
|
}
|