lkml.org 
[lkml]   [2022]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch v5 2/4] memory: tegra: Add MC error logging on tegra186 onward
From


On 3/20/2022 6:23 PM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 16.03.2022 12:25, Ashish Mhetre пишет:
>> +static int tegra186_mc_get_channel(const struct tegra_mc *mc, int *mc_channel)
>> +{
>> + u32 status;
>> +
>> + status = mc_ch_readl(mc, MC_BROADCAST_CHANNEL, MC_GLOBAL_INTSTATUS);
>> +
>> + switch (status & mc->soc->int_channel_mask) {
>> + case BIT(0):
>> + *mc_channel = 0;
>> + break;
>> +
>> + case BIT(1):
>> + *mc_channel = 1;
>> + break;
>> +
>> + case BIT(2):
>> + *mc_channel = 2;
>> + break;
>> +
>> + case BIT(3):
>> + *mc_channel = 3;
>> + break;
>
> This won't work if multiple bits are set at once.

I talked with our HW team and they said that it's technically possible
that interrupts can come at multiple channels at same time. SW can take
care of this by logging interrupts at first channel and then clearing
bit of that. Then take care of interrupts from next channel and so on.
I'll update the patches accordingly in next version.

\
 
 \ /
  Last update: 2022-03-23 09:38    [W:1.719 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site