lkml.org 
[lkml]   [2022]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v13 1/2] drivers/coresight: Add UltraSoc System Memory Buffer driver
From
On 22/11/2022 13:23, hejunhao wrote:
>
> On 2022/11/21 18:47, Suzuki Kuruppassery Poulose wrote:
>> On 18/11/2022 12:45, hejunhao wrote:
>>> Hi Suzuki ,
>>>
>>>
>>> On 2022/11/15 19:06, Suzuki K Poulose wrote:
>>>> On 14/11/2022 09:03, Junhao He wrote:
>>>>> From: Qi Liu <liuqi115@huawei.com>
>>>>>
>>
>>>>> +static void smb_init_hw(struct smb_drv_data *drvdata)
>>>>> +{
>>>>> +    /* First disable SMB and clear the status of SMB buffer */
>>>>> +    smb_reset_buffer_status(drvdata);
>>>>> +    smb_disable_hw(drvdata);
>>>>> +    smb_purge_data(drvdata);
>>>>> +
>>>>> +    writel(SMB_LB_CFG_LO_DEFAULT, drvdata->base + SMB_LB_CFG_LO_REG);
>>>>> +    writel(SMB_LB_CFG_HI_DEFAULT, drvdata->base + SMB_LB_CFG_HI_REG);
>>>>> +    writel(SMB_GLB_CFG_DEFAULT, drvdata->base + SMB_GLB_CFG_REG);
>>>>> +    writel(SMB_GLB_INT_CFG, drvdata->base + SMB_GLB_INT_REG);
>>>>> +    writel(SMB_LB_INT_CTRL_CFG, drvdata->base + SMB_LB_INT_CTRL_REG);
>>>>
>>>> Does this come with interrupt on overflow ? Do we not use this ?
>>>>
>>> When the buffer overflow, no interrupt will come.
>>> Interrupt will upgrade SMB_LB_INT_STS_REG register status if start
>>> trace.
>>> Thanks.
>>>> Rest looks fine to me.
>>
>> What is the purpose of the "Interrupt" on the SMB ? It is not clear to
>> me.
> The SMB_LB_INT_CTRL_REG register control the validity of both real-time
> events and interrupts. When logical buffer status changes causes to
> issue an
> interrupt at the same time as it issues a real-time event.
> Real-time events are used in SMB driver, which needs to get the buffer
> status.
> Interrupts are used in debugger mode and cannot be registered in kernel.
>  ..._BUF_NOTE_MASK control which events flags or interrupts are valid.

Please add this to a comment in the code above the register write.

Thanks
Suzuki

>
> Thanks.
>
> Best regards,
> Junhao.
>
>> Suzuki
>>
>> _______________________________________________
>> CoreSight mailing list -- coresight@lists.linaro.org
>> To unsubscribe send an email to coresight-leave@lists.linaro.org
>

\
 
 \ /
  Last update: 2022-11-22 15:09    [W:0.038 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site