remoteproc/davinci: Switch to platform_get_resource_byname()
authorSuman Anna <s-anna@ti.com>
Tue, 1 Aug 2017 15:48:41 +0000 (10:48 -0500)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 24 Aug 2017 18:59:53 +0000 (11:59 -0700)
The davinci remoteproc driver currently uses the platform_get_resource()
API for retrieving the IOMEM resources. Switch this function to use the
platform_get_resource_byname() API instead in preparation for adding the
DT support so that the binding can be agnostic of the IOMEM resource
order.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/da8xx_remoteproc.c

index 99539cec1329a442e595e5e9f592d5746976f60b..280b66d4f6222eeee4756f415e3e396e158f4492 100644 (file)
@@ -184,12 +184,14 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       bootreg_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       bootreg_res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+                                                  "host1cfg");
        bootreg = devm_ioremap_resource(dev, bootreg_res);
        if (IS_ERR(bootreg))
                return PTR_ERR(bootreg);
 
-       chipsig_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+       chipsig_res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+                                                  "chipsig");
        chipsig = devm_ioremap_resource(dev, chipsig_res);
        if (IS_ERR(chipsig))
                return PTR_ERR(chipsig);