power: reset: msm: Define reg-names for the qcom,pshold device

Since the qcom,pshold device now supports up to two
distinct register definitions, add the 'reg-names' property
to assign names to the memory resources, rather than
relying on resource numbering.

Change-Id: Ie0bc5eae0119901239efae05357ae107a112b87a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
Stepan Moskovchenko 2015-01-22 19:29:52 -08:00 committed by David Keitel
parent 0a8080c060
commit e731442230
2 changed files with 10 additions and 3 deletions

View file

@ -8,13 +8,19 @@ settings.
Required Properties: Required Properties:
-compatible: "qcom,pshold" -compatible: "qcom,pshold"
-reg: Specifies the physical address of the ps-hold register -reg: Specifies the physical address of the ps-hold register
This value must correspond to "pshold-base" as defined in reg-names
-reg-names: must contain "pshold-base"
may also contain "tcsr-boot-misc-detect"
Optional Properties: Optional Properties:
-reg: A secondary reg address/size pair may be provided, to specify the address -reg: A secondary reg address/size pair may be provided, to specify the address
of the TCSR_BOOT_MISC_DETECT register. This address is typically used to of the TCSR_BOOT_MISC_DETECT register. This address is typically used to
configure the type of reset desired. Omitting this address implies that configure the type of reset desired. Omitting this address implies that
the reset type shall be configured by means of a call to the secure the reset type shall be configured by means of a call to the secure
environment. environment. This value must correspond to "tcsr-boot-misc-detect" as
defined in reg-names
-reg-names: must contain "tcsr-boot-misc-detect" if the secondary address/size
pair described above is defined.
Example: Example:

View file

@ -402,12 +402,13 @@ static int msm_restart_probe(struct platform_device *pdev)
} }
} }
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pshold-base");
msm_ps_hold = devm_ioremap_resource(dev, mem); msm_ps_hold = devm_ioremap_resource(dev, mem);
if (IS_ERR(msm_ps_hold)) if (IS_ERR(msm_ps_hold))
return PTR_ERR(msm_ps_hold); return PTR_ERR(msm_ps_hold);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"tcsr-boot-misc-detect");
if (mem) if (mem)
tcsr_boot_misc_detect = mem->start; tcsr_boot_misc_detect = mem->start;