]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
remoteproc/mediatek: support L1TCM
authorTzung-Bi Shih <tzungbi@google.com>
Wed, 27 Jan 2021 08:31:36 +0000 (16:31 +0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 9 Feb 2021 15:08:47 +0000 (09:08 -0600)
commitca23ecfdbd44bac02cb6964a3793c565a389af96
tree3d4d91a69aa1e950b89943a8b5c6957698d8fa51
parent503c64cc42f15799ba0fdc654b6640911aaf7c34
remoteproc/mediatek: support L1TCM

L1TCM is a high performance memory region in MT8192 SCP.

Reads L1TCM memory region from DTS to determine if the machine supports.
Loads L1TCM memory region to SCP sys if the firmware provides.

Starts from MT8192 SCP, the firmware contains physical addresses for
each memory region, for instance:

Program Headers:
  Type   Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD   0xXXXXXX 0xXXXXXXXX 0x10500000 0xXXXXX 0xXXXXX XXX 0xXXXX
  LOAD   0xXXXXXX 0xXXXXXXXX 0x10700000 0xXXXXX 0xXXXXX XXX 0xXXXX
  LOAD   0xXXXXXX 0xXXXXXXXX 0x50000000 0xXXXXX 0xXXXXX XXX 0xXXXX

Kernel driver can use the "PhysAddr" (i.e. da in the da_to_va callbacks)
to know the ELF segment belongs to which region.

To backward compatible to MT8183 SCP, separates the da_to_va callbacks
for new and legacy version.

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210127083136.3745652-5-tzungbi@google.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/mtk_common.h
drivers/remoteproc/mtk_scp.c