firmware: tegra: Changes for v4.20-rc1

This contains a fix for suspend/resume support for the BPMP found on
 Tegra186 and Tegra194.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlu/HeITHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoepqD/0T8hWZPlURebJO3cTDkaI2kpA+gmG+
 GK/K+9AmvtEPhJXN32QUDk8MjMnVXjeWCOMdN4Agm6KedVrQI3nKQ6RuuUwF4AbR
 yI5RxnU4NpTP/Xchr7rL8d/S0Yd7nWheOcU2KHMQBYmu2SEtYKJO6xpfHwZZDow3
 2gvjPAdu4PsxbJRh4FiXLkO7AFMztlrzCgWJ7IodwM98ys2lY5jp/5eLn3/WwIjA
 7TC2fCqr0WmHWJmfRxuffgMxFimFk0MZEF81Or40ZCFImGoRQFhdxvWKcuj2wPTJ
 LHKcpqf0ES6untGWTAO4WeOcpxgTzw2Rqtn6qvoM2vlJoFYdBV8h0bz8sfrEA06f
 IT5dbetaC1k7j4Y58+GDFSYXYvwHcJe2EEZnjPP4jILGTIw8JChAOjmTHlgz/oxg
 ct4eeWJ2wT18rOQNdkz+yd4l/VYR0lAyTo5DN1MBxAd3iq5UMMvrtDq5wUIYN9kY
 zs02Z+2MyYTmDFIIUwS2vS6HMkqOCWnZ1J6z4hGgOM+lbjzF43ducWgXI8VesK6m
 LAiQmHikvAKcVIlQzP1RuMCpI8+GSx0rawLUJy77wdctaBX2cXr6i4zxA11rqOnO
 DUYRFtHP9oFPolOhzEA8QWLFpoFvLfYBHNrBYl7e0tWdrP17IruQK2xIXXQtRyep
 vdFG7A1lJ+7bEg==
 =uZkB
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.20-firmware-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

firmware: tegra: Changes for v4.20-rc1

This contains a fix for suspend/resume support for the BPMP found on
Tegra186 and Tegra194.

* tag 'tegra-for-4.20-firmware-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: bpmp: Implement suspend/resume support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2018-10-11 15:25:42 +02:00
commit c1a92909db
1 changed files with 19 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/semaphore.h>
#include <linux/sched/clock.h>
@ -843,6 +844,23 @@ free_tx:
return err;
}
static int __maybe_unused tegra_bpmp_resume(struct device *dev)
{
struct tegra_bpmp *bpmp = dev_get_drvdata(dev);
unsigned int i;
/* reset message channels */
tegra_bpmp_channel_reset(bpmp->tx_channel);
tegra_bpmp_channel_reset(bpmp->rx_channel);
for (i = 0; i < bpmp->threaded.count; i++)
tegra_bpmp_channel_reset(&bpmp->threaded_channels[i]);
return 0;
}
static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume);
static const struct tegra_bpmp_soc tegra186_soc = {
.channels = {
.cpu_tx = {
@ -871,6 +889,7 @@ static struct platform_driver tegra_bpmp_driver = {
.driver = {
.name = "tegra-bpmp",
.of_match_table = tegra_bpmp_match,
.pm = &tegra_bpmp_pm_ops,
},
.probe = tegra_bpmp_probe,
};