Skip to content

Commit ec76c2e

Browse files
akemnadetmlind
authored andcommitted
ARM: OMAP2+: omap_device: fix idling of devices during probe
On the GTA04A5 od->_driver_status was not set to BUS_NOTIFY_BIND_DRIVER during probe of the second mmc used for wifi. Therefore omap_device_late_idle idled the device during probing causing oopses when accessing the registers. It was not set because od->_state was set to OMAP_DEVICE_STATE_IDLE in the notifier callback. Therefore set od->_driver_status also in that case. This came apparent after commit 21b2cec ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4") causing this oops: omap_hsmmc 480b4000.mmc: omap_device_late_idle: enabled but no driver. Idling 8<--- cut here --- Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0b402c ... (omap_hsmmc_set_bus_width) from [<c07996bc>] (omap_hsmmc_set_ios+0x11c/0x258) (omap_hsmmc_set_ios) from [<c077b2b0>] (mmc_power_up.part.8+0x3c/0xd0) (mmc_power_up.part.8) from [<c077c14c>] (mmc_start_host+0x88/0x9c) (mmc_start_host) from [<c077d284>] (mmc_add_host+0x58/0x84) (mmc_add_host) from [<c0799190>] (omap_hsmmc_probe+0x5fc/0x8c0) (omap_hsmmc_probe) from [<c0666728>] (platform_drv_probe+0x48/0x98) (platform_drv_probe) from [<c066457c>] (really_probe+0x1dc/0x3b4) Fixes: 04abaf0 ("ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer") Fixes: 21b2cec ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4") Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Andreas Kemnade <andreas@kemnade.info> [tony@atomide.com: left out extra parens, trimmed description stack trace] Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent f1dc15c commit ec76c2e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arch/arm/mach-omap2/omap_device.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,12 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
230230
break;
231231
case BUS_NOTIFY_BIND_DRIVER:
232232
od = to_omap_device(pdev);
233-
if (od && (od->_state == OMAP_DEVICE_STATE_ENABLED) &&
234-
pm_runtime_status_suspended(dev)) {
233+
if (od) {
235234
od->_driver_status = BUS_NOTIFY_BIND_DRIVER;
236-
pm_runtime_set_active(dev);
235+
if (od->_state == OMAP_DEVICE_STATE_ENABLED &&
236+
pm_runtime_status_suspended(dev)) {
237+
pm_runtime_set_active(dev);
238+
}
237239
}
238240
break;
239241
case BUS_NOTIFY_ADD_DEVICE:

0 commit comments

Comments
 (0)