pm_runtime_get_sync can also return 1 on success, change
to use pm_runtime_resume_and_get which return 0 only on
success.
This bug has been discovered by Dan Carpenter by using Smatch
static checker.
Fixes: 285892a74f ("remoteproc: Add Renesas rcar driver")
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[Fixed blank line between tags]
Link: https://lore.kernel.org/r/20211216160653.203768-1-julien.massot@iot.bzh
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Renesas Gen3 platform includes a Cortex-r7 processor.
Both: the application cores (A5x) and the realtime core (CR7)
share access to the RAM and devices with the same address map,
so device addresses are equal to the Linux physical addresses.
In order to initialize this remote processor we need to:
- power on the realtime core
- put the firmware in a RAM area
- set the boot address for this firmware (reset vector)
- Deassert the reset
This initial driver allows to start and stop the Cortex R7
processor.
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Link: https://lore.kernel.org/r/20211207165829.195537-3-julien.massot@iot.bzh
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>