]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mailbox: pcc: Refactor and simplify check_and_ack()
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 13 Mar 2025 15:28:54 +0000 (15:28 +0000)
committerJassi Brar <jassisinghbrar@gmail.com>
Thu, 27 Mar 2025 01:58:26 +0000 (20:58 -0500)
commit2475b36401eda70f60e5d18d67ccafb81cedd0f7
tree434fc91ad5a7eea915ebf7c92f5bdc40b432fc52
parentfa362ffafa51b08cf8e2fcca38e056332f6b9b05
mailbox: pcc: Refactor and simplify check_and_ack()

The existing check_and_ack() function had unnecessary complexity. The
logic could be streamlined to improve code readability and maintainability.

The command update register needs to be updated in order to acknowledge
the platform notification through type 4 channel. So it can be done
unconditionally. Currently it is complicated just to make use of
pcc_send_data() which also executes the same updation.

In order to simplify, let us just ring the doorbell directly from
check_and_ack() instead of calling into pcc_send_data(). While at it,
rename it into pcc_chan_check_and_ack() to maintain consistency in the
driver.

Acked-by: Huisong Li <lihuisong@huawei.com>
Tested-by: Adam Young <admiyo@os.amperecomputing.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/pcc.c