Re: [Patch v7 2/4] memory: tegra: Add MC error logging on tegra186 onward

From: Dmitry Osipenko
Date: Wed Apr 13 2022 - 17:17:50 EST


On 4/13/22 12:40, Ashish Mhetre wrote:
> +static inline u32 mc_ch_readl(const struct tegra_mc *mc, int ch,
> + unsigned long offset)
> +{

return 0 if mc->bcast_ch_regs==NULL

> + if (ch == MC_BROADCAST_CHANNEL)
> + return readl_relaxed(mc->bcast_ch_regs + offset);
> +
> + return readl_relaxed(mc->ch_regs[ch] + offset);
> +}
> +
> +static inline void mc_ch_writel(const struct tegra_mc *mc, int ch,
> + u32 value, unsigned long offset)
> +{

return if mc->bcast_ch_regs==NULL

> + if (ch == MC_BROADCAST_CHANNEL)
> + writel_relaxed(value, mc->bcast_ch_regs + offset);
> + else
> + writel_relaxed(value, mc->ch_regs[ch] + offset);
> +}