summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-17 14:30:44 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-23 14:54:59 +0100
commite4923c85c950f499259dd0efb0fe8b63ca1164b0 (patch)
tree8c7bf34419ef999ce339dd26aaf32947911ddf63 /linux
parent0f1d2f6174999b574b57a4fc268ce9a3c618d55f (diff)
downloadrtems-libbsd-e4923c85c950f499259dd0efb0fe8b63ca1164b0.tar.bz2
linux/of_address.h: of_address_to_resource()
Translate address in of_address_to_resource(). Update #3277.
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/net/ethernet/freescale/fman/fman.c28
-rw-r--r--linux/drivers/soc/fsl/qbman/qman_ccsr.c3
2 files changed, 8 insertions, 23 deletions
diff --git a/linux/drivers/net/ethernet/freescale/fman/fman.c b/linux/drivers/net/ethernet/freescale/fman/fman.c
index 0b7230a9..4c8d8535 100644
--- a/linux/drivers/net/ethernet/freescale/fman/fman.c
+++ b/linux/drivers/net/ethernet/freescale/fman/fman.c
@@ -2788,6 +2788,8 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
#else /* __rtems__ */
const char *fdt = bsp_fdt_get();
struct device_node *fm_node;
+ struct device_node muram_node_storage;
+ struct device_node *muram_node;
#endif /* __rtems__ */
u32 val, range[2];
int err, irq;
@@ -2891,6 +2893,12 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
__func__);
goto fman_node_put;
}
+#else /* __rtems__ */
+ memset(&muram_node_storage, 0, sizeof(muram_node_storage));
+ muram_node = &muram_node_storage;
+ muram_node->offset = fdt_node_offset_by_compatible(fdt,
+ fm_node->offset, "fsl,fman-muram");
+#endif /* __rtems__ */
err = of_address_to_resource(muram_node, 0,
&fman->dts_params.muram_res);
@@ -2900,27 +2908,7 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
__func__, err);
goto fman_node_put;
}
-#else /* __rtems__ */
- {
- int node = fdt_node_offset_by_compatible(fdt,
- fm_node->offset, "fsl,fman-muram");
- struct device_node muram_node = {
- .offset = node
- };
- struct resource res;
-
- err = of_address_to_resource(&muram_node, 0, &res);
- if (err != 0) {
- pr_err("could not find MURAM node\n");
- goto fman_node_put;
- }
- fman->dts_params.muram_res.start = phys_base_addr + res.start;
- fman->dts_params.muram_res.end = phys_base_addr + res.end - 1;
- }
-#endif /* __rtems__ */
-#ifndef __rtems__
of_node_put(muram_node);
-#endif /* __rtems__ */
err = devm_request_irq(&of_dev->dev, irq, fman_irq, 0, "fman", fman);
if (err < 0) {
diff --git a/linux/drivers/soc/fsl/qbman/qman_ccsr.c b/linux/drivers/soc/fsl/qbman/qman_ccsr.c
index b26bfdd6..817bb504 100644
--- a/linux/drivers/soc/fsl/qbman/qman_ccsr.c
+++ b/linux/drivers/soc/fsl/qbman/qman_ccsr.c
@@ -872,9 +872,6 @@ qman_sysinit(void)
memset(&dev, 0, sizeof(dev));
dev.pdev.dev.of_node = &dev.of_node;
-#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
- dev.pdev.dev.base = (uintptr_t)&qoriq;
-#endif
dev.of_node.offset = node;
dev.of_node.full_name = name;