[PATCH v3 2/2] spi: atmel-quadspi: Add support for sama7g5 QSPI
Csókás Bence
csokas.bence at prolan.hu
Tue Jan 14 09:13:58 PST 2025
Hi,
On 2025. 01. 10. 11:40, Alexander Dahl wrote:
>> This function atmel_qspi_sama7g5_transfer() seems to be called from
>> atmel_qspi_exec_op() through ops->transfer() only. I think the two
>> lines in the error handling of atmel_qspi_reg_sync() lead to
>> unbalanced calls of pm_runtime_xxx. Compare with
>> atmel_qspi_transfer() which has no calls to pm_runtime, everything is
>> covered by atmel_qspi_exec_op() in this case where the pm_runtime
>> calls surround ->set_cfg() and ->transfer(). Right?
>
> This problem has been addressed in downstream kernel (linux4sam) by
> Claudiu Beznea back in 2023 already:
>
> https://github.com/linux4sam/linux-at91/commit/e59f646f516088fdab6d8213d8acda0c1063ec21
>
You are correct. I have picked it and will submit it on the ML shortly.
>> The whole call tree from atmel_qspi_sama7g5_setup() downwards is not
>> covered by pm_runtime get and put calls, although heavily doing i/o.
>> Further down in atmel_qspi_setup() there's a write to QSPI_SCR which
>> seems to be handled correctly.
>
> Same for this:
>
> https://github.com/linux4sam/linux-at91/commit/5ff0e74c1d548599fe85113e2f1817cb8a052b15
>
> Some hunks of that seem to have made it to upstream, not sure?
Yes, it seems to be an amalgam of patches from mainline, and original work.
> Maybe Microchip should upstream those fixes, now that SAMA7G5 support
> was ported to mainline?
I would prefer that as well.
> Greets
> Alex
>
More information about the linux-arm-kernel
mailing list