Commit Graph

2 Commits

Author SHA1 Message Date
Dan Carpenter
ae85dabcef firmware: thead,th1520-aon: Fix use after free in th1520_aon_init()
Record the error code before freeing "aon_chan" to avoid a
use after free.

Fixes: e4b3cbd840 ("firmware: thead: Add AON firmware protocol driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/f19be994-d355-48a6-ab45-d0f7e5955daf@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-18 13:09:00 +01:00
Michal Wilczynski
e4b3cbd840 firmware: thead: Add AON firmware protocol driver
The T-Head TH1520 SoC uses an E902 co-processor running Always-On (AON)
firmware to manage power, clock, and other system resources [1]. This
patch introduces a driver implementing the AON firmware protocol,
allowing the Linux kernel to communicate with the firmware via mailbox
channels.  Through an RPC-based interface, the kernel can initiate power
state transitions, update resource configurations, and perform other
AON-related tasks.

[1]
Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Acked-by: Drew Fustini <drew@pdp7.com>
Link: https://lore.kernel.org/r/20250311171900.1549916-3-m.wilczynski@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-13 14:41:32 +01:00