#include <linux/cpumask.h>
#include <linux/kernel.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <soc/tegra/common.h>
#include <soc/tegra/flowctrl.h>
#include <soc/tegra/fuse.h>
static u8 flowctrl_offset_halt_cpu[] = {
FLOW_CTRL_HALT_CPU0_EVENTS,
FLOW_CTRL_HALT_CPU1_EVENTS,
FLOW_CTRL_HALT_CPU1_EVENTS + 8,
FLOW_CTRL_HALT_CPU1_EVENTS + 16,
static u8 flowctrl_offset_cpu_csr[] = {
static void __iomem *tegra_flowctrl_base;
static void flowctrl_update(u8 offset, u32 value)
if (WARN_ONCE(IS_ERR_OR_NULL(tegra_flowctrl_base),
"Tegra flowctrl not initialised!\n"))
writel(value, tegra_flowctrl_base + offset);
readl_relaxed(tegra_flowctrl_base + offset);
u32 flowctrl_read_cpu_csr(unsigned int cpuid)
u8 offset = flowctrl_offset_cpu_csr[cpuid];
if (WARN_ONCE(IS_ERR_OR_NULL(tegra_flowctrl_base),
"Tegra flowctrl not initialised!\n"))
return readl(tegra_flowctrl_base + offset);
void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value)