diff mbox series

[v1,2/3] soc/tegra: fuse: Warn if straps and not ready

Message ID 20191103131023.17342-3-digetx@gmail.com
State Superseded
Headers show
Series Minor cleanup of tegra-apbmisc.c | expand

Commit Message

Dmitry Osipenko Nov. 3, 2019, 1:10 p.m. UTC
Now both Chip ID and HW straps are becoming available at the same time,
thus we could simply check the availability of the ID in order to check
the availability of the straps. We couldn't check straps for 0x0 because
it could be a correct value.

This change didn't uncover any problems, but anyways it is nicer to have
straps verified for consistency with the Chip ID verification.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/soc/tegra/fuse/tegra-apbmisc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Dmitry Osipenko Nov. 6, 2019, 7:03 p.m. UTC | #1
03.11.2019 16:10, Dmitry Osipenko пишет:
> Now both Chip ID and HW straps are becoming available at the same time,
> thus we could simply check the availability of the ID in order to check
> the availability of the straps. We couldn't check straps for 0x0 because
> it could be a correct value.
> 
> This change didn't uncover any problems, but anyways it is nicer to have
> straps verified for consistency with the Chip ID verification.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/soc/tegra/fuse/tegra-apbmisc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> index 54aeea1b4500..f580b3116bea 100644
> --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
> +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> @@ -27,7 +27,7 @@ static u32 chipid;
>  
>  u32 tegra_read_chipid(void)
>  {
> -	WARN(!chipid, "Tegra Chip ID not yet available\n");
> +	WARN(!chipid, "Tegra ABP MISC not yet available\n");
>  
>  	return chipid;
>  }
> @@ -39,6 +39,8 @@ u8 tegra_get_chip_id(void)
>  
>  u32 tegra_read_straps(void)
>  {
> +	WARN(!chipid, "Tegra ABP MISC not yet available\n");
> +
>  	return strapping;
>  }
>  
> 

Darn autocorrection. I'll fix the commit's title in v2.
diff mbox series

Patch

diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
index 54aeea1b4500..f580b3116bea 100644
--- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
+++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
@@ -27,7 +27,7 @@  static u32 chipid;
 
 u32 tegra_read_chipid(void)
 {
-	WARN(!chipid, "Tegra Chip ID not yet available\n");
+	WARN(!chipid, "Tegra ABP MISC not yet available\n");
 
 	return chipid;
 }
@@ -39,6 +39,8 @@  u8 tegra_get_chip_id(void)
 
 u32 tegra_read_straps(void)
 {
+	WARN(!chipid, "Tegra ABP MISC not yet available\n");
+
 	return strapping;
 }