bus: mhi: host: Add a new API for getting channel doorbell offset
authorQiang Yu <quic_qianyu@quicinc.com>
Wed, 24 Apr 2024 03:21:54 +0000 (11:21 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 25 Apr 2024 14:46:43 +0000 (20:16 +0530)
commit553f94fc7667259e47a9318e9e5702c9a814d637
tree6fa740a8658626f227a45de742ad6256ba43ac92
parent17553ba8e19dee8770b3dcc597d49dcc3418f3b0
bus: mhi: host: Add a new API for getting channel doorbell offset

Some controllers may want to access a specific doorbell register. Hence add
a new API that reads the CHDBOFF register and returns the offset of the
doorbell registers from MMIO base, so that the controller can calculate the
address of the specific doorbell register by adding the register offset
with doorbell offset and MMIO base address.

Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://lore.kernel.org/r/1713928915-18229-3-git-send-email-quic_qianyu@quicinc.com
[mani: reworded commit message and Kdoc]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/host/init.c
drivers/bus/mhi/host/main.c
include/linux/mhi.h