TI SoC driver updates for v6.10

Generic Cleanups/Fixes:
 - wkup_m3_ipc: Minor optimization to send NULL dummy message instead of empty pointer message
 - ti_sci: Register restart handler unconditionally
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmYyM8kACgkQ3bWEnRc2
 JJ2vJxAAiGOfi4ylAvwCovwV8x4o/xrvdnywn5qU7y4aNwauiS7TW7gJZe1h7TTr
 H2oArK3KWPP/NVvEyuciR7v1IfG1WMTrYRJ9xXoFLSPNesDpX9O3CkDra0/FgEQH
 nSsq2L2CsTftItJhh2a+X+TrPcyCLPXRkTG1AsuYyNRo1zx2Wx0EmpLDkVb7D9sA
 iUSfCHeZ2DyA9qBP4R73QOtSqAqhXem/DZ9nrblJW79IcWt/lLdyXfB0oDdebOEP
 T9xXi609L2S08yzLp8N6JPCf80sP2DEx68DI/TVsE2tGfm7qC+qV0FRebxWZvdQB
 95zeZDWy2V5droaDNWi5zOSL5JotQqYfRzxuvmZQ7XE0YVt5VETOzRMrKs3rGTwN
 JeoK92c5JW1HgrKO1tvtVCbxCSZqJOQ1EAszcRiUlApIsaDhGfgfrtUCIvnh4UE2
 XYSYoxz6G3q6S8bjKQDec6gG/2z3YoQBf6ChmM+M275rvbEbGCOVGCz8JvetT9XK
 geB89Ct87DuI+CDRGu7qyRxl7180zjMOgtpCt9g5qdLRmCMyMzb+D6Pv3cncFHXB
 H1kgsuKCchPFofe6IWyi+rXhkGyORAWOc2tzcn49KToaoybq+As4sGOHG4wNGtYb
 1+L9hV8EmhO5Yd//OOhBgrFd+m329gyCuyFf1WSLmkKdwndl5vk=
 =p2y6
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYzkSEACgkQYKtH/8kJ
 UicMGBAAgZe7R/djBTG9eFI+J/m2KHHsmAPbD67EJEt9DbAa4nxF02kBbiFnHigU
 V0dNyUIqCh47RnSzbFxpre+IBeAwutc8H2MU9TSx41t2cMW0BKT5JZOOF9kFOtGT
 u/4HBO8+Q/Sa/kA37ALmt1eDxRSO4KLwUqnc2LhNyBaFLxa3rwuU8tx6ZduxdO7N
 EJ35tgeSoGL9iMMlhkoYz8wmW1E8PLCfIAXqRDtffYe9/0Rx2yjvqbeSqEN0ot3h
 /4lQrkKmLdFjuYzLC98K1bnwa5w+GKHykcVC9XdWGVJnAlXJEhaj8J7ajmdj3/1B
 w2wdyhvVVSoxrlmzj4dQUFTJwZpneMn2/9jFZxBfg50InFKxNkcVkS6barWZwh/E
 8JQdD9MNIcwlhHR24bkeo5WCfkVXo7DL7NhgM1Hd0fYyFdtyUmpBM5dOIxlq1Bxl
 2HvLKDOmVFbYB1ze1cU4uy2F9lpuol9THwUiAbt3VxNHnuO4DDjowC9yFF2CrBty
 WfL5hzChgzi46SQyJFfEk5JeHoDmwAnu1mwfayi91qZWBk+O23CYfb4N+poxX0/N
 /rziN7x97gYPBAeyt6Goyuy15unGVqydvr8dLeM6cX42q1nNbY/E6jiRyAeYMW4b
 PWf9FK7yXxICGPfGTk6hmxMR8C1OGAImeWYY6ynsFntqNpLYhC4=
 =lMgA
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.10

Generic Cleanups/Fixes:
- wkup_m3_ipc: Minor optimization to send NULL dummy message instead of empty pointer message
- ti_sci: Register restart handler unconditionally

* tag 'ti-driver-soc-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message
  firmware: ti_sci: Unconditionally register reset handler
  firmware: ti_sci: Use devm_register_restart_handler()

Link: https://lore.kernel.org/r/20240501124300.i5jzeugdlrlnfg22@undrafted
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2024-05-02 15:12:01 +02:00
commit e067863132
2 changed files with 8 additions and 23 deletions

View File

@ -87,7 +87,6 @@ struct ti_sci_desc {
* struct ti_sci_info - Structure representing a TI SCI instance
* @dev: Device pointer
* @desc: SoC description for this instance
* @nb: Reboot Notifier block
* @d: Debugfs file entry
* @debug_region: Memory region where the debug message are available
* @debug_region_size: Debug region size
@ -103,7 +102,6 @@ struct ti_sci_desc {
*/
struct ti_sci_info {
struct device *dev;
struct notifier_block nb;
const struct ti_sci_desc *desc;
struct dentry *d;
void __iomem *debug_region;
@ -122,7 +120,6 @@ struct ti_sci_info {
#define cl_to_ti_sci_info(c) container_of(c, struct ti_sci_info, cl)
#define handle_to_ti_sci_info(h) container_of(h, struct ti_sci_info, handle)
#define reboot_to_ti_sci_info(n) container_of(n, struct ti_sci_info, nb)
#ifdef CONFIG_DEBUG_FS
@ -3254,10 +3251,9 @@ devm_ti_sci_get_resource(const struct ti_sci_handle *handle, struct device *dev,
}
EXPORT_SYMBOL_GPL(devm_ti_sci_get_resource);
static int tisci_reboot_handler(struct notifier_block *nb, unsigned long mode,
void *cmd)
static int tisci_reboot_handler(struct sys_off_data *data)
{
struct ti_sci_info *info = reboot_to_ti_sci_info(nb);
struct ti_sci_info *info = data->cb_data;
const struct ti_sci_handle *handle = &info->handle;
ti_sci_cmd_core_reboot(handle);
@ -3303,7 +3299,6 @@ static int ti_sci_probe(struct platform_device *pdev)
struct mbox_client *cl;
int ret = -EINVAL;
int i;
int reboot = 0;
u32 h_id;
desc = device_get_match_data(dev);
@ -3327,8 +3322,6 @@ static int ti_sci_probe(struct platform_device *pdev)
}
}
reboot = of_property_read_bool(dev->of_node,
"ti,system-reboot-controller");
INIT_LIST_HEAD(&info->node);
minfo = &info->minfo;
@ -3399,15 +3392,10 @@ static int ti_sci_probe(struct platform_device *pdev)
ti_sci_setup_ops(info);
if (reboot) {
info->nb.notifier_call = tisci_reboot_handler;
info->nb.priority = 128;
ret = register_restart_handler(&info->nb);
if (ret) {
dev_err(dev, "reboot registration fail(%d)\n", ret);
goto out;
}
ret = devm_register_restart_handler(dev, tisci_reboot_handler, info);
if (ret) {
dev_err(dev, "reboot registration fail(%d)\n", ret);
goto out;
}
dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n",

View File

@ -16,7 +16,6 @@
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/omap-mailbox.h>
#include <linux/platform_device.h>
#include <linux/remoteproc.h>
#include <linux/suspend.h>
@ -314,7 +313,6 @@ static irqreturn_t wkup_m3_txev_handler(int irq, void *ipc_data)
static int wkup_m3_ping(struct wkup_m3_ipc *m3_ipc)
{
struct device *dev = m3_ipc->dev;
mbox_msg_t dummy_msg = 0;
int ret;
if (!m3_ipc->mbox) {
@ -330,7 +328,7 @@ static int wkup_m3_ping(struct wkup_m3_ipc *m3_ipc)
* the RX callback to avoid multiple interrupts being received
* by the CM3.
*/
ret = mbox_send_message(m3_ipc->mbox, &dummy_msg);
ret = mbox_send_message(m3_ipc->mbox, NULL);
if (ret < 0) {
dev_err(dev, "%s: mbox_send_message() failed: %d\n",
__func__, ret);
@ -352,7 +350,6 @@ static int wkup_m3_ping(struct wkup_m3_ipc *m3_ipc)
static int wkup_m3_ping_noirq(struct wkup_m3_ipc *m3_ipc)
{
struct device *dev = m3_ipc->dev;
mbox_msg_t dummy_msg = 0;
int ret;
if (!m3_ipc->mbox) {
@ -361,7 +358,7 @@ static int wkup_m3_ping_noirq(struct wkup_m3_ipc *m3_ipc)
return -EIO;
}
ret = mbox_send_message(m3_ipc->mbox, &dummy_msg);
ret = mbox_send_message(m3_ipc->mbox, NULL);
if (ret < 0) {
dev_err(dev, "%s: mbox_send_message() failed: %d\n",
__func__, ret);