Loading arch/arm/mach-msm/include/mach/subsystem_notif.h +2 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ enum subsys_notif_type { SUBSYS_AFTER_POWERUP, SUBSYS_RAMDUMP_NOTIFICATION, SUBSYS_POWERUP_FAILURE, SUBSYS_PROXY_VOTE, SUBSYS_PROXY_UNVOTE, SUBSYS_NOTIF_TYPE_COUNT }; Loading arch/arm/mach-msm/include/mach/subsystem_restart.h +4 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ extern void subsys_unregister(struct subsys_device *dev); extern void subsys_default_online(struct subsys_device *dev); extern void subsys_set_crash_status(struct subsys_device *dev, bool crashed); extern bool subsys_get_crash_status(struct subsys_device *dev); void notify_proxy_vote(struct device *device); void notify_proxy_unvote(struct device *device); #else static inline int subsys_get_restart_level(struct subsys_device *dev) Loading Loading @@ -125,7 +126,8 @@ static inline bool subsys_get_crash_status(struct subsys_device *dev) { return false; } void notify_proxy_vote(struct device *device) { } void notify_proxy_unvote(struct device *device) { } #endif /* CONFIG_MSM_SUBSYSTEM_RESTART */ #endif arch/arm/mach-msm/peripheral-loader.c +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <mach/msm_iomap.h> #include <mach/ramdump.h> #include <mach/subsystem_restart.h> #include "peripheral-loader.h" Loading Loading @@ -195,6 +196,7 @@ static void __pil_proxy_unvote(struct pil_priv *priv) struct pil_desc *desc = priv->desc; desc->ops->proxy_unvote(desc); notify_proxy_unvote(desc->dev); wake_unlock(&priv->wlock); module_put(desc->owner); Loading @@ -221,6 +223,7 @@ static int pil_proxy_vote(struct pil_desc *desc) if (desc->proxy_unvote_irq) enable_irq(desc->proxy_unvote_irq); notify_proxy_vote(desc->dev); return ret; } Loading arch/arm/mach-msm/subsystem_restart.c +29 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,35 @@ bool subsys_get_crash_status(struct subsys_device *dev) { return dev->crashed; } static struct subsys_device *desc_to_subsys(struct device *d) { struct subsys_device *device, *subsys_dev = 0; mutex_lock(&subsys_list_lock); list_for_each_entry(device, &subsys_list, list) if (device->desc->dev == d) subsys_dev = device; mutex_unlock(&subsys_list_lock); return subsys_dev; } void notify_proxy_vote(struct device *device) { struct subsys_device *dev = desc_to_subsys(device); if (dev) notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_VOTE, NULL); } void notify_proxy_unvote(struct device *device) { struct subsys_device *dev = desc_to_subsys(device); if (dev) notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_UNVOTE, NULL); } #ifdef CONFIG_DEBUG_FS static ssize_t subsys_debugfs_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) Loading Loading
arch/arm/mach-msm/include/mach/subsystem_notif.h +2 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ enum subsys_notif_type { SUBSYS_AFTER_POWERUP, SUBSYS_RAMDUMP_NOTIFICATION, SUBSYS_POWERUP_FAILURE, SUBSYS_PROXY_VOTE, SUBSYS_PROXY_UNVOTE, SUBSYS_NOTIF_TYPE_COUNT }; Loading
arch/arm/mach-msm/include/mach/subsystem_restart.h +4 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ extern void subsys_unregister(struct subsys_device *dev); extern void subsys_default_online(struct subsys_device *dev); extern void subsys_set_crash_status(struct subsys_device *dev, bool crashed); extern bool subsys_get_crash_status(struct subsys_device *dev); void notify_proxy_vote(struct device *device); void notify_proxy_unvote(struct device *device); #else static inline int subsys_get_restart_level(struct subsys_device *dev) Loading Loading @@ -125,7 +126,8 @@ static inline bool subsys_get_crash_status(struct subsys_device *dev) { return false; } void notify_proxy_vote(struct device *device) { } void notify_proxy_unvote(struct device *device) { } #endif /* CONFIG_MSM_SUBSYSTEM_RESTART */ #endif
arch/arm/mach-msm/peripheral-loader.c +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <mach/msm_iomap.h> #include <mach/ramdump.h> #include <mach/subsystem_restart.h> #include "peripheral-loader.h" Loading Loading @@ -195,6 +196,7 @@ static void __pil_proxy_unvote(struct pil_priv *priv) struct pil_desc *desc = priv->desc; desc->ops->proxy_unvote(desc); notify_proxy_unvote(desc->dev); wake_unlock(&priv->wlock); module_put(desc->owner); Loading @@ -221,6 +223,7 @@ static int pil_proxy_vote(struct pil_desc *desc) if (desc->proxy_unvote_irq) enable_irq(desc->proxy_unvote_irq); notify_proxy_vote(desc->dev); return ret; } Loading
arch/arm/mach-msm/subsystem_restart.c +29 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,35 @@ bool subsys_get_crash_status(struct subsys_device *dev) { return dev->crashed; } static struct subsys_device *desc_to_subsys(struct device *d) { struct subsys_device *device, *subsys_dev = 0; mutex_lock(&subsys_list_lock); list_for_each_entry(device, &subsys_list, list) if (device->desc->dev == d) subsys_dev = device; mutex_unlock(&subsys_list_lock); return subsys_dev; } void notify_proxy_vote(struct device *device) { struct subsys_device *dev = desc_to_subsys(device); if (dev) notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_VOTE, NULL); } void notify_proxy_unvote(struct device *device) { struct subsys_device *dev = desc_to_subsys(device); if (dev) notify_each_subsys_device(&dev, 1, SUBSYS_PROXY_UNVOTE, NULL); } #ifdef CONFIG_DEBUG_FS static ssize_t subsys_debugfs_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) Loading