Ignore:
Timestamp:
Jan 17, 2018, 1:30:44 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, master
Children:
cfc149b
Parents:
0f1d2f6
git-author:
Sebastian Huber <sebastian.huber@…> (01/17/18 13:30:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/23/18 13:54:59)
Message:

linux/of_address.h: of_address_to_resource()

Translate address in of_address_to_resource().

Update #3277.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linux/drivers/net/ethernet/freescale/fman/fman.c

    r0f1d2f6 re4923c8  
    27892789        const char *fdt = bsp_fdt_get();
    27902790        struct device_node *fm_node;
     2791        struct device_node muram_node_storage;
     2792        struct device_node *muram_node;
    27912793#endif /* __rtems__ */
    27922794        u32 val, range[2];
     
    28922894                goto fman_node_put;
    28932895        }
     2896#else /* __rtems__ */
     2897        memset(&muram_node_storage, 0, sizeof(muram_node_storage));
     2898        muram_node = &muram_node_storage;
     2899        muram_node->offset = fdt_node_offset_by_compatible(fdt,
     2900            fm_node->offset, "fsl,fman-muram");
     2901#endif /* __rtems__ */
    28942902
    28952903        err = of_address_to_resource(muram_node, 0,
     
    29012909                goto fman_node_put;
    29022910        }
    2903 #else /* __rtems__ */
    2904         {
    2905                 int node = fdt_node_offset_by_compatible(fdt,
    2906                     fm_node->offset, "fsl,fman-muram");
    2907                 struct device_node muram_node = {
    2908                         .offset = node
    2909                 };
    2910                 struct resource res;
    2911 
    2912                 err = of_address_to_resource(&muram_node, 0, &res);
    2913                 if (err != 0) {
    2914                         pr_err("could not find MURAM node\n");
    2915                         goto fman_node_put;
    2916                 }
    2917                 fman->dts_params.muram_res.start = phys_base_addr + res.start;
    2918                 fman->dts_params.muram_res.end = phys_base_addr + res.end - 1;
    2919         }
    2920 #endif /* __rtems__ */
    2921 #ifndef __rtems__
    29222911        of_node_put(muram_node);
    2923 #endif /* __rtems__ */
    29242912
    29252913        err = devm_request_irq(&of_dev->dev, irq, fman_irq, 0, "fman", fman);
Note: See TracChangeset for help on using the changeset viewer.