[Skiboot] [PATCH skiboot] npu2: Fix clearing the FIR bits
Andrew Donnellan
ajd at linux.ibm.com
Mon May 20 15:32:48 AEST 2019
On 20/5/19 3:32 pm, Andrew Donnellan wrote:
> On 20/5/19 2:22 pm, 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.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
>
> Oh yes that current code looks VERY wrong.
>
> Reviewed-by: Andrew Donnellan <ajd at linux.ibm.com>
(does this need to go to stable?)
>
>> ---
>> 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;
>> }
>>
>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd at linux.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list