tee/optee driver pm question

From: Peng Fan
Date: Tue Dec 18 2018 - 21:13:06 EST


Hi Jens, Ulf

We met an issue is OP-TEE is actively doing some DMA operations, such as CAAM DMA, while Linux is doing some ddr freq change and will let ddr into self-refresh state, this will cause issues.

On ARMv8 i.MX, we have code request_bus_freq/release_bus_freq to ask ATF to make ddr into/out self refresh state. On ARMv7, we use similar code, but the request/release will runs into OP-TEE to make ddr into/out self refresh state.

We have a RPC design, that is OP-TEE issue a RPC call to Linux, to ask Linux to not issue release bus freq, but this will introduce complexity and not aligned with other drivers in Linux Kernel. We are thinking to add pm call back to optee/tee drivers, but did not find a good method. Do you have any suggestions?

Thanks,
Peng.