OSDN Git Service

bus: mhi: pci_generic: No-Op for device_wake operations
authorLoic Poulain <loic.poulain@linaro.org>
Fri, 5 Mar 2021 19:16:46 +0000 (20:16 +0100)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 10 Mar 2021 14:41:22 +0000 (20:11 +0530)
commite3e5e6508fc1c0e98a5a264853713dd30a60e5e5
tree4829ca367f815010909bcfdb04da2954666caf34
parent59d05b71729b96d809b89e70640b9332d559b20f
bus: mhi: pci_generic: No-Op for device_wake operations

The wake_db register presence is highly speculative and can fuze MHI
devices. Indeed, currently the wake_db register address is defined at
entry 127 of the 'Channel doorbell array', thus writing to this address
is equivalent to ringing the doorbell for channel 127, causing trouble
with some devics (e.g. SDX24 based modems) that get an unexpected
channel 127 doorbell interrupt.

This change fixes that issue by setting wake get/put as no-op for
pci_generic devices. The wake device sideband mechanism seems really
specific to each device, and is AFAIK not defined by the MHI spec.

It also removes zeroing initialization of wake_db register during MMIO
initialization, the register being set via wake_get/put accessors few
cycles later during M0 transition.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1614971808-22156-4-git-send-email-loic.poulain@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/core/init.c
drivers/bus/mhi/pci_generic.c