soc/tegra: Add Tegra132 support
PATCH 1/3 soc/tegra: Add Tegra132 support
From: Thierry Reding <[email protected]>
Add the chip ID for the NVIDIA Tegra132 SoC family.
--- include/soc/tegra/fuse.h | 1 + 1 file changed, 1 insertion(+)
include/soc/tegra/fuse.h +1 -0
@@ -21,6 +21,7 @@#define TEGRA30 0x30#define TEGRA114 0x35#define TEGRA124 0x40 +#define TEGRA132 0x13#define TEGRA_FUSE_SKU_CALIB_0 0xf0#define TEGRA30_FUSE_SATA_CALIB 0x124
Signature · 1 line
2.1.3
PATCH 2/3 soc/tegra: fuse: Constify tegra_fuse_info structures
From: Thierry Reding <[email protected]>
These structures contain read-only data and are never modified, so they can be const.
--- drivers/soc/tegra/fuse/fuse-tegra30.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/soc/tegra/fuse/fuse-tegra30.c +4 -4
@@ -56,7 +56,7 @@ struct tegra_fuse_info {static void __iomem *fuse_base;static struct clk *fuse_clk; -static struct tegra_fuse_info *fuse_info; +static const struct tegra_fuse_info *fuse_info;u32 tegra30_fuse_readl (const unsigned int offset) {
@@ -78,18 +78,18 @@ u32 tegra30_fuse_readl(const unsigned int offset)return val; } -static struct tegra_fuse_info tegra30_info = { +static const struct tegra_fuse_info tegra30_info = { .size =0x2a4 , .spare_bit =0x144 , .speedo_idx =SPEEDO_TEGRA30 , }; -static struct tegra_fuse_info tegra114_info = { +static const struct tegra_fuse_info tegra114_info = { .size =0x2a0 , .speedo_idx =SPEEDO_TEGRA114 , }; -static struct tegra_fuse_info tegra124_info = { +static const struct tegra_fuse_info tegra124_info = { .size =0x300 , .speedo_idx =SPEEDO_TEGRA124 , };
Signature · 1 line
2.1.3
PATCH 3/3 soc/tegra: fuse: Add Tegra132 support
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
--- drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/soc/tegra/fuse/fuse-tegra.c +1 -0
@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };
drivers/soc/tegra/fuse/fuse-tegra30.c +2 -0
@@ -184,6 +184,8 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info;default :return ; }
Signature · 1 line
2.1.3
PATCH 3/3 soc/tegra: fuse: Add Tegra132 support
Quoted 28 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
Signed-off-by Thierry Reding <[email protected]>--- drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 2 ++ 2 files changed, 3 insertions(+)drivers/soc/tegra/fuse/fuse-tegra.c +1
-0@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };drivers/soc/tegra/fuse/fuse-tegra30.c +0
-0
drivers/soc/tegra/fuse/fuse-tegra30.c static void __init legacy_fuse_init(void) · line 188
Quoted 5 lines
drivers/soc/tegra/fuse/fuse-tegra30.c +2
-0@@ -184,6 +184,8 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info;
Fall through intentionally?
Quoted 3 lines
drivers/soc/tegra/fuse/fuse-tegra30.c +0
-0default :return ; }
PATCH 3/3 soc/tegra: fuse: Add Tegra132 support
Quoted 27 lines · Vince Hsu
Quoted 25 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
Signed-off-by Thierry Reding <[email protected]>--- drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 2 ++ 2 files changed, 3 insertions(+)drivers/soc/tegra/fuse/fuse-tegra.c +1
-0@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };drivers/soc/tegra/fuse/fuse-tegra30.c +0
-1--- a/drivers/soc/tegra/fuse/fuse-tegra30.c
Quoted 8 lines
drivers/soc/tegra/fuse/fuse-tegra30.c static void __init legacy_fuse_init(void) · line 188
Quoted 7 lines
+++
b/drivers/soc/tegra/fuse/fuse-tegra30.cdrivers/soc/tegra/fuse/fuse-tegra30.c +2
-0@@ -184,6 +184,8 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info;Fall through intentionally?
Nope, good catch.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150108/fb1c0a7e/attachment.sig>
PATCH v2 3/3 soc/tegra: fuse: Add Tegra132 support
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
---
Changes in v2:
- add missing break in Tegra132 case for legacy fuse init (Vince Hsu)
drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 3 +++ 2 files changed, 4 insertions(+)
drivers/soc/tegra/fuse/fuse-tegra.c +1 -0
@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };
drivers/soc/tegra/fuse/fuse-tegra30.c +3 -0
@@ -184,6 +184,9 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info; +break ;default :return ; }
Signature · 1 line
2.1.3
PATCH v2 3/3 soc/tegra: fuse: Add Tegra132 support
Quoted 31 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
Signed-off-by Thierry Reding <[email protected]>---
Changes in v2:
- add missing break in Tegra132 case for legacy fuse init (Vince Hsu)drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 3 +++ 2 files changed, 4 insertions(+)drivers/soc/tegra/fuse/fuse-tegra.c +1
-0@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };drivers/soc/tegra/fuse/fuse-tegra30.c +0
-0
drivers/soc/tegra/fuse/fuse-tegra30.c static void __init legacy_fuse_init(void) · line 189
Quoted 6 lines
drivers/soc/tegra/fuse/fuse-tegra30.c +3
-0@@ -184,6 +184,9 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info; +break ;
Nit, but why not
case TEGRA124:
+ case TEGRA132:
fuse_info = &tegra124_info;
break;?
PATCH v2 3/3 soc/tegra: fuse: Add Tegra132 support
Quoted 41 lines · Alexandre Courbot
Quoted 31 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
Signed-off-by Thierry Reding <[email protected]>---
Changes in v2:
- add missing break in Tegra132 case for legacy fuse init (Vince Hsu)drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 3 +++ 2 files changed, 4 insertions(+)drivers/soc/tegra/fuse/fuse-tegra.c +1
-0@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };drivers/soc/tegra/fuse/fuse-tegra30.c +0
-0drivers/soc/tegra/fuse/fuse-tegra30.c static void __init legacy_fuse_init(void) · line 189
Quoted 6 lines
drivers/soc/tegra/fuse/fuse-tegra30.c +3
-0@@ -184,6 +184,9 @@ static void __init legacy_fuse_init(void)case TEGRA124 : fuse_info = &tegra124_info;break ; +case TEGRA132 : + fuse_info = &tegra124_info; +break ;Nit, but why not
Quoted 4 lines
case TEGRA124:
+ case TEGRA132:
fuse_info = &tegra124_info;
break;Yes, that's even better.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150109/a8f08b0d/attachment.sig>
PATCH v3 3/3 soc/tegra: fuse: Add Tegra132 support
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Tegra132 is very similar to Tegra124 from a peripheral point of view and uses the same fuse controller.
---
Changes in v3:
- collapse TEGRA124 and TEGRA132 cases into a single one (Alex Courbot)
Changes in v2:
- add missing break in Tegra132 case for legacy fuse init (Vince Hsu)
--- drivers/soc/tegra/fuse/fuse-tegra.c | 1 + drivers/soc/tegra/fuse/fuse-tegra30.c | 1 + 2 files changed, 2 insertions(+)
drivers/soc/tegra/fuse/fuse-tegra.c +1 -0
@@ -81,6 +81,7 @@ static const struct of_device_id car_match[] __initconst = { { .compatible = "nvidia,tegra30-car", }, { .compatible = "nvidia,tegra114-car", }, { .compatible = "nvidia,tegra124-car", }, + { .compatible = "nvidia,tegra132-car", }, {}, };
drivers/soc/tegra/fuse/fuse-tegra30.c +1 -0
@@ -182,6 +182,7 @@ static void __init legacy_fuse_init(void) fuse_info = &tegra114_info;break ;case TEGRA124 : +case TEGRA132 : fuse_info = &tegra124_info;break ;default :
Signature · 1 line
2.1.3