usb: host: ohci-at91: add support to enter suspend using SMC
authorClément Léger <clement.leger@bootlin.com>
Tue, 7 Jun 2022 13:34:54 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 09:22:18 +0000 (11:22 +0200)
commit1e073e3ed9ff9ec14e7e360ed89a81256d895588
tree8208151e1b652883053a44b9801225f2f64439d1
parent302970b4cad3ebfda2c05ce06c322ccdc447d17e
usb: host: ohci-at91: add support to enter suspend using SMC

When Linux is running under OP-TEE, the SFR is set as secured and thus
the AT91_OHCIICR_USB_SUSPEND register isn't accessible. Add a SMC to
do the appropriate call to suspend the controller.
The SMC id is fetched from the device-tree property
"microchip,suspend-smc-id". if present, then the syscon regmap is not
used to enter suspend and a SMC is issued.

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20220607133454.727063-1-clement.leger@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c