lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6718c48-e953-4e30-bd22-8e06f4fb157d@nvidia.com>
Date: Fri, 23 Jan 2026 12:21:34 +0530
From: Kartik Rajput <kkartik@...dia.com>
To: Jon Hunter <jonathanh@...dia.com>, thierry.reding@...il.com,
 jirislaby@...nel.org, pshete@...dia.com, chleroy@...nel.org,
 linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc/tegra: pmc: Add PMC support for Tegra410

Hi Jon,

On 22/01/26 17:40, Jon Hunter wrote:
> 
> On 22/01/2026 11:08, Kartik Rajput wrote:
>> Tegra410 uses PMC driver only to retrieve system reset reason using PMC
>> sysfs. Tegra410 uses ACPI to probe PMC, unlike device-tree boot it does
>> not use the early initialisation sequence.
>>
>> Add PMC support for Tegra410.
> 
> Maybe ...
> 
> "Add PMC support for Tegra410 which uses the PMC driver ..."
> 
> 

Ack.

...

>> +static int tegra_pmc_acpi_probe(struct platform_device *pdev)
>> +{
>> +    pmc->soc = device_get_match_data(&pdev->dev);
>> +    pmc->dev = &pdev->dev;
>> +
>> +    pmc->base = devm_platform_ioremap_resource(pdev, 0);
>> +    if (IS_ERR(pmc->base))
>> +        return PTR_ERR(pmc->base);
>> +
>> +    tegra_pmc_reset_sysfs_init(pmc);
>> +    platform_set_drvdata(pdev, pmc);
>> +
>> +    return 0;
>> +}
> 
> Should we just define a tegra_pmc_probe_common() that is used for both DT and ACPI? The above is not specific to ACPI.
> 
  Do you mean something like?

	tegra_pmc_probe() {
		void __iomem *base;

		tegra_pmc_probe_common(dev, &base);

		if (is_acpi_node()) {
			pmc->base = base;
			return 0;
		}

		...

		// Continue DT specific initialisation.

		...

		// Clean-up early pmc->base mapping once the probe is successful.
	
		unmap(pmc->base)
		pmc->base = base;
	}

We can do this, but this will introduce some churn in the probe.
Having a separate tegra_pmc_acpi_probe() avoids this and keeps things neat.

Thanks,
Kartik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ