Commit 2ad93fa3 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'omap-for-v4.14/fixes-not-urgent-v2-signed' of...

Merge tag 'omap-for-v4.14/fixes-not-urgent-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

Pull "non-urgent fixes for omaps for v4.14" from Tony Lindgren:

Non-urgent fixes for omaps for v4.14 merge window. These all
can wait for the merge window as we have not seemed to hit
any of these so far:

- Fix error handling in omap_ocp2scp_probe affecting runtime
  PM error path

- Drop broken RPM status update for omap_device

- Two fixes for of_irq_get() usage that can return 0

* tag 'omap-for-v4.14/fixes-not-urgent-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: PRM: fix of_irq_get() result checks
  ARM: OMAP3+: PRM: fix of_irq_get() result check
  ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq
  bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
parents db86ab06 879dce79
...@@ -672,7 +672,6 @@ static int _od_suspend_noirq(struct device *dev) ...@@ -672,7 +672,6 @@ static int _od_suspend_noirq(struct device *dev)
if (!ret && !pm_runtime_status_suspended(dev)) { if (!ret && !pm_runtime_status_suspended(dev)) {
if (pm_generic_runtime_suspend(dev) == 0) { if (pm_generic_runtime_suspend(dev) == 0) {
pm_runtime_set_suspended(dev);
omap_device_idle(pdev); omap_device_idle(pdev);
od->flags |= OMAP_DEVICE_SUSPENDED; od->flags |= OMAP_DEVICE_SUSPENDED;
} }
...@@ -689,15 +688,6 @@ static int _od_resume_noirq(struct device *dev) ...@@ -689,15 +688,6 @@ static int _od_resume_noirq(struct device *dev)
if (od->flags & OMAP_DEVICE_SUSPENDED) { if (od->flags & OMAP_DEVICE_SUSPENDED) {
od->flags &= ~OMAP_DEVICE_SUSPENDED; od->flags &= ~OMAP_DEVICE_SUSPENDED;
omap_device_enable(pdev); omap_device_enable(pdev);
/*
* XXX: we run before core runtime pm has resumed itself. At
* this point in time, we just restore the runtime pm state and
* considering symmetric operations in resume, we donot expect
* to fail. If we failed, something changed in core runtime_pm
* framework OR some device driver messed things up, hence, WARN
*/
WARN(pm_runtime_set_active(dev),
"Could not set %s runtime state active\n", dev_name(dev));
pm_generic_runtime_resume(dev); pm_generic_runtime_resume(dev);
} }
......
...@@ -706,7 +706,7 @@ static int omap3xxx_prm_late_init(void) ...@@ -706,7 +706,7 @@ static int omap3xxx_prm_late_init(void)
np = of_find_matching_node(NULL, omap3_prm_dt_match_table); np = of_find_matching_node(NULL, omap3_prm_dt_match_table);
if (np) { if (np) {
irq_num = of_irq_get(np, 0); irq_num = of_irq_get(np, 0);
if (irq_num >= 0) if (irq_num > 0)
omap3_prcm_irq_setup.irq = irq_num; omap3_prcm_irq_setup.irq = irq_num;
} }
......
...@@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void) ...@@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void)
* Already have OMAP4 IRQ num. For all other platforms, we need * Already have OMAP4 IRQ num. For all other platforms, we need
* IRQ numbers from DT * IRQ numbers from DT
*/ */
if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) { if (irq_num <= 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
if (irq_num == -EPROBE_DEFER) if (irq_num == -EPROBE_DEFER)
return irq_num; return irq_num;
...@@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void) ...@@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void)
} }
/* Once OMAP4 DT is filled as well */ /* Once OMAP4 DT is filled as well */
if (irq_num >= 0) { if (irq_num > 0) {
omap4_prcm_irq_setup.irq = irq_num; omap4_prcm_irq_setup.irq = irq_num;
omap4_prcm_irq_setup.xlate_irq = NULL; omap4_prcm_irq_setup.xlate_irq = NULL;
} }
......
...@@ -70,8 +70,10 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) ...@@ -70,8 +70,10 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) { if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
regs = devm_ioremap_resource(&pdev->dev, res); regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(regs)) if (IS_ERR(regs)) {
goto err0; ret = PTR_ERR(regs);
goto err1;
}
pm_runtime_get_sync(&pdev->dev); pm_runtime_get_sync(&pdev->dev);
reg = readl_relaxed(regs + OCP2SCP_TIMING); reg = readl_relaxed(regs + OCP2SCP_TIMING);
...@@ -83,6 +85,9 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) ...@@ -83,6 +85,9 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
return 0; return 0;
err1:
pm_runtime_disable(&pdev->dev);
err0: err0:
device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment