On Tue, Apr 16, 2019 at 05:48:06PM +0100, Jon Hunter wrote: > Commit 5f84bb1a4099 ("soc/tegra: pmc: Add sysfs entries for reset info") > added support for reading the Tegra reset source and level from sysfs. > However, there are a few issues with this commit which are ... > 1. The number of reset sources for Tegra210 is defined as 5 but it > should be 6. > 2. The number of reset sources for Tegra186 is defined as 13 but it > should be 15. > 3. The SoC data variables num_reset_sources and num_reset_levels are > defined but never used. > > Fix the above by ... > > 1. Removing the reset source 'AOTAG' from the tegra30_reset_sources > because this is only applicable for Tegra210. > 2. Adding a new tegra210_reset_sources structure for Tegra210 reset > sources. > 3. Correct the number of reset sources for Tegra210 and Tegra186 by > using the ARRAY_SIZE macro. > 4. Updating the functions reset_reason_show() and reset_level_show() > to check whether the value read is valid. While we are at it > clean-up these functions to remove an unnecessary u32 variable. > > Fixes: 5f84bb1a4099 ("soc/tegra: pmc: Add sysfs entries for reset info") > Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx> > --- > Changes since V1: > - Reverted removal of num_reset_sources/levels > - Used ARRAY_SIZE macro to populate num_reset_sources/levels > - Added test to ensure that reset source/level is valid > > drivers/soc/tegra/pmc.c | 44 +++++++++++++++++++++++++++++--------------- > 1 file changed, 29 insertions(+), 15 deletions(-) Applied to for-5.2/soc, thanks. Thierry
Attachment:
signature.asc
Description: PGP signature