Message ID | 20230818093028.7807-7-kkartik@nvidia.com |
---|---|
State | Superseded |
Headers | show |
Series | soc/tegra: fuse: Add ACPI support | expand |
On Fri, Aug 18, 2023 at 03:00:28PM +0530, Kartik wrote: > Add support for Tegra241 which use ACPI boot. ... > case TEGRA234: > fuse->soc = &tegra234_fuse_soc; > break; > +#endif > +#if defined(CONFIG_ARCH_TEGRA_241_SOC) > + case TEGRA241: > + fuse->soc = &tegra241_fuse_soc; > + break; > #endif Have you tried --patience when formatting patches? Does it help them to look better? ... > +const struct tegra_fuse_soc tegra241_fuse_soc = { > + .init = tegra30_fuse_init, > + .info = &tegra241_fuse_info, > + .lookups = NULL, > + .num_lookups = 0, > + .cells = NULL, > + .num_cells = 0, Isn't it the default? > + .keepouts = tegra241_fuse_keepouts, > + .num_keepouts = ARRAY_SIZE(tegra241_fuse_keepouts), > + .soc_attr_group = &tegra194_soc_attr_group, > + .clk_suspend_on = false, Ditto. > +};
On Fri, 2023-08-18 at 18:10 +0300, Andy Shevchenko wrote: >On Fri, Aug 18, 2023 at 03:00:28PM +0530, Kartik wrote: >> Add support for Tegra241 which use ACPI boot. > >... > >> case TEGRA234: >> fuse->soc = &tegra234_fuse_soc; >> break; >> +#endif >> +#if defined(CONFIG_ARCH_TEGRA_241_SOC) >> + case TEGRA241: >> + fuse->soc = &tegra241_fuse_soc; >> + break; >> #endif > >Have you tried --patience when formatting patches? >Does it help them to look better? > No, I did not use --patience flag while formatting the patches. Shall I post the next patch set using it? >... > >> +const struct tegra_fuse_soc tegra241_fuse_soc = { >> + .init = tegra30_fuse_init, >> + .info = &tegra241_fuse_info, > >> + .lookups = NULL, >> + .num_lookups = 0, >> + .cells = NULL, >> + .num_cells = 0, > >Isn't it the default? > >> + .keepouts = tegra241_fuse_keepouts, >> + .num_keepouts = ARRAY_SIZE(tegra241_fuse_keepouts), >> + .soc_attr_group = &tegra194_soc_attr_group, > >> + .clk_suspend_on = false, > >Ditto. > Yes, I will trim this list in the next patch. >> +}; Regards, Kartik
On Mon, Aug 21, 2023 at 05:10:33PM +0530, Kartik wrote: > On Fri, 2023-08-18 at 18:10 +0300, Andy Shevchenko wrote: > >On Fri, Aug 18, 2023 at 03:00:28PM +0530, Kartik wrote: ... > >> case TEGRA234: > >> fuse->soc = &tegra234_fuse_soc; > >> break; > >> +#endif > >> +#if defined(CONFIG_ARCH_TEGRA_241_SOC) > >> + case TEGRA241: > >> + fuse->soc = &tegra241_fuse_soc; > >> + break; > >> #endif > > > >Have you tried --patience when formatting patches? > >Does it help them to look better? > > No, I did not use --patience flag while formatting the patches. > Shall I post the next patch set using it? Do you see the difference in the output? If yes, definitely use it. Otherwise it's recommended to use anyway.
diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig index 6f3098822969..5f5d9d663fef 100644 --- a/drivers/soc/tegra/Kconfig +++ b/drivers/soc/tegra/Kconfig @@ -133,6 +133,11 @@ config ARCH_TEGRA_234_SOC help Enable support for the NVIDIA Tegra234 SoC. +config ARCH_TEGRA_241_SOC + bool "NVIDIA Tegra241 SoC" + help + Enable support for the NVIDIA Tegra241 SoC. + endif endif diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index 9c5596d968a2..8750450438c3 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -203,6 +203,11 @@ static int tegra_fuse_acpi_probe(struct platform_device *pdev) case TEGRA234: fuse->soc = &tegra234_fuse_soc; break; +#endif +#if defined(CONFIG_ARCH_TEGRA_241_SOC) + case TEGRA241: + fuse->soc = &tegra241_fuse_soc; + break; #endif default: dev_err(&pdev->dev, "Unsupported SoC: %02x\n", chip); diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c index e94d46372a63..757bcf5ee82e 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra30.c +++ b/drivers/soc/tegra/fuse/fuse-tegra30.c @@ -678,3 +678,28 @@ const struct tegra_fuse_soc tegra234_fuse_soc = { .clk_suspend_on = false, }; #endif + +#if defined(CONFIG_ARCH_TEGRA_241_SOC) +static const struct tegra_fuse_info tegra241_fuse_info = { + .read = tegra30_fuse_read, + .size = 0x16008, + .spare = 0xcf0, +}; + +static const struct nvmem_keepout tegra241_fuse_keepouts[] = { + { .start = 0xc, .end = 0x1600c } +}; + +const struct tegra_fuse_soc tegra241_fuse_soc = { + .init = tegra30_fuse_init, + .info = &tegra241_fuse_info, + .lookups = NULL, + .num_lookups = 0, + .cells = NULL, + .num_cells = 0, + .keepouts = tegra241_fuse_keepouts, + .num_keepouts = ARRAY_SIZE(tegra241_fuse_keepouts), + .soc_attr_group = &tegra194_soc_attr_group, + .clk_suspend_on = false, +}; +#endif diff --git a/drivers/soc/tegra/fuse/fuse.h b/drivers/soc/tegra/fuse/fuse.h index a41e9f85281a..f3b705327c20 100644 --- a/drivers/soc/tegra/fuse/fuse.h +++ b/drivers/soc/tegra/fuse/fuse.h @@ -136,4 +136,8 @@ extern const struct tegra_fuse_soc tegra194_fuse_soc; extern const struct tegra_fuse_soc tegra234_fuse_soc; #endif +#ifdef CONFIG_ARCH_TEGRA_241_SOC +extern const struct tegra_fuse_soc tegra241_fuse_soc; +#endif + #endif diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c index 79db12076d56..f830aaf3d92d 100644 --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c @@ -63,6 +63,7 @@ bool tegra_is_silicon(void) switch (tegra_get_chip_id()) { case TEGRA194: case TEGRA234: + case TEGRA241: case TEGRA264: if (tegra_get_platform() == 0) return true; diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h index 3a513be50243..8f421b9f7585 100644 --- a/include/soc/tegra/fuse.h +++ b/include/soc/tegra/fuse.h @@ -17,6 +17,7 @@ #define TEGRA186 0x18 #define TEGRA194 0x19 #define TEGRA234 0x23 +#define TEGRA241 0x24 #define TEGRA264 0x26 #define TEGRA_FUSE_SKU_CALIB_0 0xf0
Add support for Tegra241 which use ACPI boot. Signed-off-by: Kartik <kkartik@nvidia.com> --- drivers/soc/tegra/Kconfig | 5 +++++ drivers/soc/tegra/fuse/fuse-tegra.c | 5 +++++ drivers/soc/tegra/fuse/fuse-tegra30.c | 25 +++++++++++++++++++++++++ drivers/soc/tegra/fuse/fuse.h | 4 ++++ drivers/soc/tegra/fuse/tegra-apbmisc.c | 1 + include/soc/tegra/fuse.h | 1 + 6 files changed, 41 insertions(+)