diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 12:41:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 12:41:49 -0700 |
commit | 4d88e3d24905eafa98cef0fc29365649ad8977b5 (patch) | |
tree | c32759600e903194e252ac47925f83745225791d /drivers/of | |
parent | c6ed444fd6fffaaf2e3857d926ed18bf3df81e8e (diff) | |
parent | f11b9abc9318d5506f08156b4950c24e3cba73e5 (diff) | |
download | linux-4d88e3d24905eafa98cef0fc29365649ad8977b5.tar.bz2 |
Merge tag 'devicetree-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull Devicetree updates from Rob Herring:
- Remove an obsolete hack for PPC32 longtrail systems
- Make of_io_request_and_map() "name" arg optional
- Add vendor prefixes for bitmain, Asus, and Y Soft
- Remove 'interrupt-parent' from bindings as it is implicit
- New properties for wm8994 audio codec
- Add 'clocks' property support to SRAM binding
- Add binding for ASPEED coprocessor interrupt controller
- Various binding spelling and link fixes
* tag 'devicetree-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
Documentation: remove dynamic-resolution-notes reference to non-existent file
dt-bindings: Add Y Soft Corporation vendor prefix
of/fdt: Remove PPC32 longtrail hack in memory scan
dt-bindings: remove 'interrupt-parent' from bindings
pinctrl: tegra: fix spelling in devicetree binding document
usb: dwc3: rockchip: Fix PHY documentation links.
dt-bindings: sound: wm8994: document wlf,csnaddr-pd property
dt-bindings: sound: wm8994: document wlf,spkmode-pu property
dt-bindings: sram: Add 'clocks' as an optional property
dt-bindings: Add vendor prefix for AsusTek Computer Inc.
dt-bindings: misc: ASPEED coprocessor interrupt controller
dt-bindings: gpio: pca953x: Document interrupts, update example
drivers/of: Make of_io_request_and_map() "name" argument optional
dt-bindings: Add bitmain vendor prefix
Documentation: devicetree: tilcdc: fix spelling mistake "suppors" -> "supports"
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/address.c | 6 | ||||
-rw-r--r-- | drivers/of/fdt.c | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index 53349912ac75..7ddbf0a1ab86 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -846,7 +846,7 @@ EXPORT_SYMBOL(of_iomap); * for a given device_node * @device: the device whose io range will be mapped * @index: index of the io range - * @name: name of the resource + * @name: name "override" for the memory region request or NULL * * Returns a pointer to the requested and mapped memory or an ERR_PTR() encoded * error code on failure. Usage example: @@ -856,7 +856,7 @@ EXPORT_SYMBOL(of_iomap); * return PTR_ERR(base); */ void __iomem *of_io_request_and_map(struct device_node *np, int index, - const char *name) + const char *name) { struct resource res; void __iomem *mem; @@ -864,6 +864,8 @@ void __iomem *of_io_request_and_map(struct device_node *np, int index, if (of_address_to_resource(np, index, &res)) return IOMEM_ERR_PTR(-EINVAL); + if (!name) + name = res.name; if (!request_mem_region(res.start, resource_size(&res), name)) return IOMEM_ERR_PTR(-EBUSY); diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 6da20b9688f7..800ad252cf9c 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1034,14 +1034,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, bool hotpluggable; /* We are scanning "memory" nodes only */ - if (type == NULL) { - /* - * The longtrail doesn't have a device_type on the - * /memory node, so look for the node called /memory@0. - */ - if (!IS_ENABLED(CONFIG_PPC32) || depth != 1 || strcmp(uname, "memory@0") != 0) - return 0; - } else if (strcmp(type, "memory") != 0) + if (type == NULL || strcmp(type, "memory") != 0) return 0; reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); |