Hello @XD ,
We can take a look at this piece of code:
https://github.com/nxp-archive/autoivnsw_sja1110_linux/blob/master/sja1110_init.c#L533-L549
It first calls the function sja1110_uc_read_status(sja1110, &uc_status); for reading the status of the SJA1110 uC.
For some reason, it is returning a non-zero value, that indicates an error.
The reason why you are seeing so many status errors is due to the number of retries:
retry = 10;
It will try to read the status for 10 times, and if it does not work, it eventually gives up.
Then, to answer your other question, why the switch seems to work even if the firmware uploads failed, I think it is related to this part of the code (lines 704-709):
out_release:
release_firmware(fw);
out_return:
mutex_unlock(&sja1110->lock);
return ret;
}
It only uses the new firmware when it was successfully uploaded and verified (release_firmware).
If there is an error, I believe it will still load the default firmware from the NOR-flash memory.
Please take a look at the @Celeste_Liu reply on my previous question:
It seems your output now is the same as she shows before the successful upload.
I would recommend verify that the J189 pins are indeed short and to verify that the problem is not your firmware use the one from NXP GoldVIP binaries.
Best regards,
Guilherme