<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/soc/tegra/pmc.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-11-26T10:48:44Z</updated>
<entry>
<title>soc/tegra: pmc: Fix imbalanced clock disabling in error code path</title>
<updated>2021-11-26T10:48:44Z</updated>
<author>
<name>Dmitry Osipenko</name>
</author>
<published>2021-03-02T12:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=077cb856cc65fedaad43cb36a2bcb00aa1971a62'/>
<id>urn:sha1:077cb856cc65fedaad43cb36a2bcb00aa1971a62</id>
<content type='text'>
commit 19221e3083020bd9537624caa0ee0145ed92ba36 upstream.

The tegra_powergate_power_up() has a typo in the error code path where it
will try to disable clocks twice, fix it. In practice that error never
happens, so this is a minor correction.

Tested-by: Peter Geis &lt;pgwipeout@gmail.com&gt; # Ouya T30
Tested-by: Nicolas Chauvet &lt;kwizart@gmail.com&gt; # PAZ00 T20 and TK1 T124
Tested-by: Matt Merhar &lt;mattmerhar@protonmail.com&gt; # Ouya T30
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>soc/tegra: Fix an error handling path in tegra_powergate_power_up()</title>
<updated>2021-11-26T10:48:37Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2021-06-27T15:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f4ee9063b54f52379dd0b867e8dca0372428e2d'/>
<id>urn:sha1:2f4ee9063b54f52379dd0b867e8dca0372428e2d</id>
<content type='text'>
[ Upstream commit 986b5094708e508baa452a23ffe809870934a7df ]

If an error occurs after a successful tegra_powergate_enable_clocks()
call, it must be undone by a tegra_powergate_disable_clocks() call, as
already done in the below and above error handling paths of this function.

Update the 'goto' to branch at the correct place of the error handling
path.

Fixes: a38045121bf4 ("soc/tegra: pmc: Add generic PM domain support")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Drop locking from tegra_powergate_is_powered()</title>
<updated>2019-04-20T07:07:53Z</updated>
<author>
<name>Dmitry Osipenko</name>
</author>
<published>2018-10-21T18:36:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52796ff1a545a6fe5d4a5504ae14b871134d0f76'/>
<id>urn:sha1:52796ff1a545a6fe5d4a5504ae14b871134d0f76</id>
<content type='text'>
[ Upstream commit b6e1fd17a38bd1d97c11d69fd3207b3ef9bfa4b3 ]

This fixes splats like the one below if CONFIG_DEBUG_ATOMIC_SLEEP=y
and machine (Tegra30) booted with SMP=n or all secondary CPU's are put
offline. Locking isn't needed because it protects atomic operation.

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G         C        4.18.0-next-20180821-00180-gc3ebb6544e44-dirty #823
Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[&lt;c01134f4&gt;] (unwind_backtrace) from [&lt;c010db2c&gt;] (show_stack+0x20/0x24)
[&lt;c010db2c&gt;] (show_stack) from [&lt;c0bd0f3c&gt;] (dump_stack+0x94/0xa8)
[&lt;c0bd0f3c&gt;] (dump_stack) from [&lt;c0151df8&gt;] (___might_sleep+0x13c/0x174)
[&lt;c0151df8&gt;] (___might_sleep) from [&lt;c0151ea0&gt;] (__might_sleep+0x70/0xa8)
[&lt;c0151ea0&gt;] (__might_sleep) from [&lt;c0bec2b8&gt;] (mutex_lock+0x2c/0x70)
[&lt;c0bec2b8&gt;] (mutex_lock) from [&lt;c0589844&gt;] (tegra_powergate_is_powered+0x44/0xa8)
[&lt;c0589844&gt;] (tegra_powergate_is_powered) from [&lt;c0581a60&gt;] (tegra30_cpu_rail_off_ready+0x30/0x74)
[&lt;c0581a60&gt;] (tegra30_cpu_rail_off_ready) from [&lt;c0122244&gt;] (tegra30_idle_lp2+0xa0/0x108)
[&lt;c0122244&gt;] (tegra30_idle_lp2) from [&lt;c0853438&gt;] (cpuidle_enter_state+0x140/0x540)
[&lt;c0853438&gt;] (cpuidle_enter_state) from [&lt;c08538a4&gt;] (cpuidle_enter+0x40/0x4c)
[&lt;c08538a4&gt;] (cpuidle_enter) from [&lt;c01595e0&gt;] (call_cpuidle+0x30/0x48)
[&lt;c01595e0&gt;] (call_cpuidle) from [&lt;c01599f8&gt;] (do_idle+0x238/0x28c)
[&lt;c01599f8&gt;] (do_idle) from [&lt;c0159d28&gt;] (cpu_startup_entry+0x28/0x2c)
[&lt;c0159d28&gt;] (cpu_startup_entry) from [&lt;c0be76c8&gt;] (rest_init+0xd8/0xdc)
[&lt;c0be76c8&gt;] (rest_init) from [&lt;c1200f50&gt;] (start_kernel+0x41c/0x430)

Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Acked-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Fix child-node lookup</title>
<updated>2018-11-13T19:17:04Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2017-11-15T09:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22a4f7ea5e3cb1e5a8647d0d9f6a096b0398caf9'/>
<id>urn:sha1:22a4f7ea5e3cb1e5a8647d0d9f6a096b0398caf9</id>
<content type='text'>
commit 1dc6bd5e39a29453bdcc17348dd2a89f1aa4004e upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent pmc node could end up being prematurely
freed as of_find_node_by_name() drops a reference to its first argument.

Fixes: 3568df3d31d6 ("soc: tegra: Add thermal reset (thermtrip) support to PMC")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.0
Cc: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Reviewed-by: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>soc/tegra: pmc: Fix incorrect DPD request</title>
<updated>2016-08-16T10:30:52Z</updated>
<author>
<name>Vince Hsu</name>
</author>
<published>2016-08-11T01:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9ccc123a8e05365f7515dcd023b01100809a6fa'/>
<id>urn:sha1:a9ccc123a8e05365f7515dcd023b01100809a6fa</id>
<content type='text'>
Reading the DPD_REQ &amp; DPD2_REQ registers returns the previous requests.
If we sets the current request bit with the returned value, then other
pads will be turned on or off unexpectedly.

Signed-off-by: Vince Hsu &lt;vinceh@nvidia.com&gt;
Reviewed-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Enable XUSB partitions on boot</title>
<updated>2016-06-30T11:42:54Z</updated>
<author>
<name>Jon Hunter</name>
</author>
<published>2016-06-30T10:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8df127456f29c719eb2b458018298b1980f1218e'/>
<id>urn:sha1:8df127456f29c719eb2b458018298b1980f1218e</id>
<content type='text'>
The Tegra XHCI driver does not currently manage the Tegra XUSB power
partitions and so it these partitions have not been enabled by the
bootloader then the system will crash when probing the XHCI device.

While proper support for managing the power partitions is being
developed to the XHCI driver for Tegra, for now power on all the XUSB
partitions for USB host and super-speed on boot if the XHCI driver is
enabled.

Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Initialise power partitions early</title>
<updated>2016-06-30T11:41:46Z</updated>
<author>
<name>Jon Hunter</name>
</author>
<published>2016-06-30T10:56:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2d17960532d925a202682ce72379c6055068ca4'/>
<id>urn:sha1:e2d17960532d925a202682ce72379c6055068ca4</id>
<content type='text'>
If CONFIG_PM_GENERIC_DOMAINS is not enabled, then power partitions
associated with a device will not be enabled automatically by the PM
core when the device is in use. To avoid situations where a device in
a power partition is to be used but the partition is not enabled,
initialise the power partitions for Tegra early in the boot process and
if CONFIG_PM_GENERIC_DOMAINS is not enabled, then power on all
partitions defined in the device-tree blob.

Note that if CONFIG_PM_GENERIC_DOMAINS is not enabled, after the
partitions are turned on, the clocks and resets used as part of the
sequence for turning on the partition are released again as they are no
longer needed by the PMC driver. Another benefit of this is that this
avoids any issues of sharing resets between the PMC driver and other
device drivers that may wish to independently control a particular
reset.

Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Add specific error messages</title>
<updated>2016-06-30T11:30:40Z</updated>
<author>
<name>Jon Hunter</name>
</author>
<published>2016-06-30T10:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2710ac9f5a8dab4f9bb080713452fe6286ca83d'/>
<id>urn:sha1:c2710ac9f5a8dab4f9bb080713452fe6286ca83d</id>
<content type='text'>
When initialising a powergate, only a single error message is shown if
the initialisation fails. Add more error messages to give specific
details of what failed if the initialisation failed and remove the
generic failure message.

Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Use whitespace more consistently</title>
<updated>2016-06-30T10:23:31Z</updated>
<author>
<name>Thierry Reding</name>
</author>
<published>2016-06-30T10:12:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da8f4b458944dccc371dba240cfa18c27b7b9802'/>
<id>urn:sha1:da8f4b458944dccc371dba240cfa18c27b7b9802</id>
<content type='text'>
Use blank lines after blocks and before labels for consistency with the
existing code in the file.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Don't probe PMC if early initialisation fails</title>
<updated>2016-06-30T10:23:27Z</updated>
<author>
<name>Jon Hunter</name>
</author>
<published>2016-06-28T10:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a83f1fc3f33930d01e579b9d4de92a045297b402'/>
<id>urn:sha1:a83f1fc3f33930d01e579b9d4de92a045297b402</id>
<content type='text'>
Commit 0259f522e04f ('soc/tegra: pmc: Restore base address on probe
failure') fixes an issue where the PMC base address pointer is not
restored on probe failure. However, this fix creates another problem
where if early initialisation of the PMC driver fails and an initial
mapping for the PMC address space is not created, then when the PMC
device is probed, the PMC base address pointer will not be valid and
this will cause a crash when tegra_pmc_init() is called and attempts
to access a register.

Although the PMC address space is mapped a 2nd time during the probe
and so this could be fixed by populating the base address pointer
earlier during the probe, this adds more complexity to the code.
Moreover, the PMC probe also assumes the the soc data pointer is also
initialised when the device is probed and if not will also lead to a
crash when calling tegra_pmc_init_tsense_reset(). Given that if the
early initialisation does fail then something bad has happen, it seems
acceptable to allow the PMC device probe to fail as well. Therefore, if
the PMC base address pointer or soc data pointer are not valid when
probing the PMC device, WARN and return an error.

Fixes: 0259f522e04f ('soc/tegra: pmc: Restore base address on probe failure')
Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
</feed>
