[Skiboot] [PATCH skiboot] npu2: Fix clearing the FIR bits
Alexey Kardashevskiy
aik at ozlabs.ru
Tue May 21 12:56:13 AEST 2019
On 20/05/2019 15:07, Alistair Popple wrote:
> On Monday, 20 May 2019 2:22:01 PM AEST Alexey Kardashevskiy wrote:
>> FIR registers are SCOM-only so they cannot be accesses with the indirect
>> write, and yet we use SCOM-based addresses for these; fix this.
>
> Thanks for fixing, although I don't entirely follow the commit message - I
> think you mean "and yet we use indirect addresses for these". It might be
> worth mentioning what you mean by indirect too (ie. npu2_write()) .
Writing to SCOM using its "SCOM address" via xscom_base is direct.
Writing to SCOM using its "NPURING" alias via
NPU2_MISC_SCOM_IND_SCOM_ADDR is indirect.
What am I missing here and what are the well established terms then?
> However the fix itself is good.
>
> Reviewed-By: Alistair Popple <alistair at popple.id.au>
>
>> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>> ---
>> hw/npu2-hw-procedures.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/npu2-hw-procedures.c b/hw/npu2-hw-procedures.c
>> index b671b8ac00e3..e1f5e8d64c27 100644
>> --- a/hw/npu2-hw-procedures.c
>> +++ b/hw/npu2-hw-procedures.c
>> @@ -331,7 +331,7 @@ static uint32_t reset_ntl_release(struct npu2_dev *ndev)
>> npu2_fir = 0;
>>
>> for (i = 0; i < NPU2_TOTAL_FIR_REGISTERS; i++) {
>> - npu2_write(ndev->npu, npu2_fir_addr, npu2_fir);
>> + xscom_write(ndev->npu->chip_id, npu2_fir_addr, npu2_fir);
>> npu2_fir_addr += NPU2_FIR_OFFSET;
>>
>> }
>
>
--
Alexey
More information about the Skiboot
mailing list