#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <soc/tegra/mc.h>
#include "tegra210-emc.h"
#include "tegra210-mc.h"
#define INFO …
#define STEPS …
#define SUB_STEPS …
#define PRELOCK …
#define PRELOCK_STEPS …
#define ACTIVE_EN …
#define PRAMP_UP …
#define PRAMP_DN …
#define EMA_WRITES …
#define EMA_UPDATES …
#define PER_TRAIN …
#define CC_PRINT …
#define CCFIFO …
#define REGS …
#define REG_LISTS …
#define emc_dbg(emc, flags, ...) …
#define DVFS_CLOCK_CHANGE_VERSION …
#define EMC_PRELOCK_VERSION …
enum { … };
#define PTFV_DQSOSC_MOVAVG_C0D0U0_INDEX …
#define PTFV_DQSOSC_MOVAVG_C0D0U1_INDEX …
#define PTFV_DQSOSC_MOVAVG_C0D1U0_INDEX …
#define PTFV_DQSOSC_MOVAVG_C0D1U1_INDEX …
#define PTFV_DQSOSC_MOVAVG_C1D0U0_INDEX …
#define PTFV_DQSOSC_MOVAVG_C1D0U1_INDEX …
#define PTFV_DQSOSC_MOVAVG_C1D1U0_INDEX …
#define PTFV_DQSOSC_MOVAVG_C1D1U1_INDEX …
#define PTFV_DVFS_SAMPLES_INDEX …
#define PTFV_MOVAVG_WEIGHT_INDEX …
#define PTFV_CONFIG_CTRL_INDEX …
#define PTFV_CONFIG_CTRL_USE_PREVIOUS_EMA …
#define MOVAVG_PRECISION_FACTOR …
#define __AVERAGE_PTFV(dev) …
#define __INCREMENT_PTFV(dev, val) …
#define __MOVAVG_AC(timing, dev) …
#define __WEIGHTED_UPDATE_PTFV(dev, nval) …
#define __MOVAVG(timing, dev) …
static bool tegra210_emc_compare_update_delay(struct tegra210_emc_timing *timing,
u32 measured, u32 idx)
{ … }
static void tegra210_emc_get_clktree_delay(struct tegra210_emc *emc,
u32 delay[DRAM_CLKTREE_NUM])
{ … }
static bool periodic_compensation_handler(struct tegra210_emc *emc, u32 type,
struct tegra210_emc_timing *last,
struct tegra210_emc_timing *next)
{ … }
static u32 tegra210_emc_r21021_periodic_compensation(struct tegra210_emc *emc)
{ … }
static void tegra210_emc_r21021_set_clock(struct tegra210_emc *emc, u32 clksrc)
{ … }
const struct tegra210_emc_sequence tegra210_emc_r21021 = …;