[PATCH 07/11] soc/tegra: pmc: Add Tegra264 support

Jon Hunter jonathanh at nvidia.com
Wed May 7 04:03:39 PDT 2025


On 06/05/2025 14:31, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
> 
> The PMC block on Tegra264 has undergone a few small changes since it's
> Tegra234 predecessor. Match on the new compatible string to select the
> updated SoC-specific data.
> 
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>   drivers/soc/tegra/pmc.c | 132 +++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 129 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> index 51b9d852bb6a..6f1ea5b6b9db 100644
> --- a/drivers/soc/tegra/pmc.c
> +++ b/drivers/soc/tegra/pmc.c
> @@ -2892,9 +2892,14 @@ static int tegra_pmc_probe(struct platform_device *pdev)
>   		if (IS_ERR(pmc->wake))
>   			return PTR_ERR(pmc->wake);
>   
> -		pmc->aotag = devm_platform_ioremap_resource_byname(pdev, "aotag");
> -		if (IS_ERR(pmc->aotag))
> -			return PTR_ERR(pmc->aotag);
> +		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aotag");
> +		if (res) {
> +			pmc->aotag = devm_ioremap_resource(&pdev->dev, res);
> +			if (IS_ERR(pmc->aotag))
> +				return PTR_ERR(pmc->aotag);
> +		} else {
> +			pmc->aotag = NULL;
> +		}

This part make aotag optional, if I understand this correctly. This is 
not mentioned above and probably should be. Also, I believe that 
currently dt-binding has this as required and so we should update the 
dt-binding doc to make this optional too.

Jon

-- 
nvpublic




More information about the linux-arm-kernel mailing list