fsi: master-ast-cf: Use of_reserved_mem_region_to_resource for "memory-region"
Use the newly added of_reserved_mem_region_to_resource() function to handle "memory-region" properties. Signed-off-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20250703183439.2073555-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>pull/1309/head
parent
966c5cd72b
commit
b8e3603a57
|
|
@ -13,13 +13,13 @@
|
||||||
#include <linux/irqflags.h>
|
#include <linux/irqflags.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_reserved_mem.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/firmware.h>
|
#include <linux/firmware.h>
|
||||||
#include <linux/gpio/aspeed.h>
|
#include <linux/gpio/aspeed.h>
|
||||||
#include <linux/mfd/syscon.h>
|
#include <linux/mfd/syscon.h>
|
||||||
#include <linux/of_address.h>
|
|
||||||
#include <linux/genalloc.h>
|
#include <linux/genalloc.h>
|
||||||
|
|
||||||
#include "fsi-master.h"
|
#include "fsi-master.h"
|
||||||
|
|
@ -1285,14 +1285,7 @@ static int fsi_master_acf_probe(struct platform_device *pdev)
|
||||||
master->gpio_mux = gpio;
|
master->gpio_mux = gpio;
|
||||||
|
|
||||||
/* Grab the reserved memory region (use DMA API instead ?) */
|
/* Grab the reserved memory region (use DMA API instead ?) */
|
||||||
np = of_parse_phandle(mnode, "memory-region", 0);
|
rc = of_reserved_mem_region_to_resource(mnode, 0, &res);
|
||||||
if (!np) {
|
|
||||||
dev_err(&pdev->dev, "Didn't find reserved memory\n");
|
|
||||||
rc = -EINVAL;
|
|
||||||
goto err_free;
|
|
||||||
}
|
|
||||||
rc = of_address_to_resource(np, 0, &res);
|
|
||||||
of_node_put(np);
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_err(&pdev->dev, "Couldn't address to resource for reserved memory\n");
|
dev_err(&pdev->dev, "Couldn't address to resource for reserved memory\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue