dt-bindings: tegra: pmc: Update aotag as an optional aperture
Subsystems (2)
Jon Hunter
maintainerPATCH v2 1/2 dt-bindings: tegra: pmc: Update aotag as an optional aperture
Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.
---
Changes since V1:
- Simplified reg-names handling of optional aotag range by upon Krzysztof's feedback.
- Dropped removal of reg modifications for tegra186 and tegra194.
- Updated reg minItems for tegra186.
.../bindings/arm/tegra/nvidia,tegra186-pmc.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml +7 -4
@@ -19,15 +19,15 @@ properties: - nvidia,tegra264-pmc reg: - minItems: 4 + minItems: 3 maxItems: 5 reg-names: - minItems: 4 + minItems: 3 items: - const: pmc - const: wake - - const: aotag + - enum: [ aotag, scratch, misc ] - enum: [ scratch, misc ] - const: misc
@@ -51,6 +51,7 @@ allOf: then: properties: reg: + minItems: 4 maxItems: 4 reg-names: maxItems: 4
@@ -73,7 +74,9 @@ allOf: properties: compatible: contains: - const: nvidia,tegra234-pmc + enum: + - nvidia,tegra234-pmc + - nvidia,tegra264-pmc then: properties: reg-names:
Signature · 1 line
2.43.0
Jon Hunter
maintainerPATCH v2 2/2 soc/tegra: pmc: don't fail if "aotag" is not present
From: Prathamesh Shete <[email protected]>
The "aotog" is an optional aperture, so if that aperture is not defined for a given device, then initialise the 'aotag' pointer to NULL instead of returning an error. Note that the PMC driver will not use 'aotag' pointer if initialised to NULL.
---
Changes since V2:
- None
drivers/soc/tegra/pmc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/soc/tegra/pmc.c +10 -3
@@ -2897,9 +2897,16 @@ 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); +/* "aotag" is an optional aperture */ + 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 ; + }/* "scratch" is an optional aperture */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
Signature · 1 line
2.43.0
Re: [PATCH V2 2/2] soc/tegra: pmc: don't fail if "aotag" is not present
Hi Jon,
Quoted 11 lines · Jon Hunter
From: Prathamesh Shete <[email protected]>
The "aotog" is an optional aperture, so if that aperture is not defined for a given device, then initialise the 'aotag' pointer to NULL instead of returning an error. Note that the PMC driver will not use 'aotag' pointer if initialised to NULL.
Co-developed-by Shardar Mohammed <[email protected]>Signed-off-by Shardar Mohammed <[email protected]>Signed-off-by Prathamesh Shete <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Quoted 6 lines
---
Changes since V2:
- Nonedrivers/soc/tegra/pmc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
~Stan
Quoted 8 lines · Jon Hunter
Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.
Co-developed-by Prathamesh Shete <[email protected]>Signed-off-by Prathamesh Shete <[email protected]>Signed-off-by Jon Hunter <[email protected]>---
Best regards,
Krzysztof
Thierry Reding
AppliedRe: (subset) [PATCH V2 1/2] dt-bindings: tegra: pmc: Update aotag as an optional aperture
In reply to Jon HunterFrom: Thierry Reding <[email protected]>
Quoted 5 lines · Jon Hunter
Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.
Applied, thanks!
[1/2] dt-bindings: tegra: pmc: Update aotag as an optional aperture
(no commit info)
Best regards,
Signature · 1 line
Thierry Reding <[email protected]>