mailbox: pcc: Add support for platform notification handling
authorHuisong Li <lihuisong@huawei.com>
Tue, 1 Aug 2023 06:38:26 +0000 (14:38 +0800)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 11 Sep 2023 09:31:17 +0000 (10:31 +0100)
commit60c40b06fa68694dd08a1a0038ea8b9de3f3b1ca
treeadc080b25859ab65545b5c8a047a724bd475590b
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
mailbox: pcc: Add support for platform notification handling

Currently, PCC driver doesn't support the processing of platform
notification for type 4 PCC subspaces.

According to ACPI specification, if platform sends a notification
to OSPM, it must clear the command complete bit and trigger platform
interrupt. OSPM needs to check whether the command complete bit is
cleared, clear platform interrupt, process command, and then set the
command complete and ring doorbell to the Platform.

Let us stash the value of the pcc type and use the same while processing
the interrupt of the channel. We also need to set the command complete
bit and ring doorbell in the interrupt handler for the type 4 channel to
complete the communication flow after processing the notification from
the Platform.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20230801063827.25336-2-lihuisong@huawei.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/mailbox/pcc.c