mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
DeviceTree updates for 4.11:
- Sync dtc to upstream commit 0931cea3ba20. This picks up overlay
support in dtc.
- Set dma_ops for reserved memory users.
- Make references to IOMMU consistent in DT bindings.
- Cleanup references to pm_power_off in bindings.
- Move some display bindings that snuck into the old bindings/video/
path.
- Fix some wrong documentation paths caused from binding restructuring.
- Vendor prefixes for Faraday and Fujitsu.
- Fix an of_node ref counting leak in of_find_node_opts_by_path
- Introduce new graph helper of_graph_get_remote_node() which will be
used by DRM drivers in 4.12.
-----BEGIN PGP SIGNATURE-----
iQItBAABCAAXBQJYrcjTEBxyb2JoQGtlcm5lbC5vcmcACgkQ+vtdtY28YcOPjg/8
CZgxb3humk7Kkt+I3IsZCxsXhgdk2+CPfCSHlK1bc5Jqg0TzepQvFt4ZkuRHkZy/
pQLUpRnUEUl64aaE8WxZY8ELYZggWazcTnWgCOzvoYpqSD4dAkAsqeti1Qh9PGKz
fNLnPWREftojFZ7wVQ8btxC1dINc9eC9eEHsIsS8S8UIgLgv/aN6PeG1Ll/UUa9d
u9orY3lxrz8JvdZslGtd1XLZqehIG0AAXqYRasyKl6Sc1NgjdwJTrqoeHEnCYaBM
0+JUOf8kjRa1QNYN4SpuQ1gpovS8tPUGuODrWF2FvaQIxYHTzF8MpLqTvjBzdsj6
b1owHzMXOLlPqqmmQ+jkHY5phisM4heJCIanNerzfM9+lHvb6kB3EuoTkAGvzsr/
HCJi/Wk8tVrw6MYdnav0NT6aLIgZmrVspeJKlS1IdIkpsxZ64DsgX/YS/qGn/fcx
qMrDXh8gMFwJBENRCKmKYFu1kzJkBoVEXtGlIbRQDZwOIuHPJl/ed6naMSfyUmcL
wEe1I3buyB38FVzUTM2y0K1LfFJSJqOFSWTy5WCcTyP4cbKUyEja8vzN1Cx8BDwf
wYtGWQQcg1Pyo074De6ojXWPiiW8f64GLLjqPALjA+J6JtZY5PwAnGXV+1ZYgX+V
hV+kXbS4UIjN1koxroJ7ahfouWdOignmpwdvomQPLG8=
=D/BO
-----END PGP SIGNATURE-----
Merge tag 'devicetree-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring:
"Pretty standard stuff with dtc upstream sync being the biggest piece.
- Sync dtc to upstream commit 0931cea3ba20. This picks up overlay
support in dtc.
- Set dma_ops for reserved memory users.
- Make references to IOMMU consistent in DT bindings.
- Cleanup references to pm_power_off in bindings.
- Move some display bindings that snuck into the old bindings/video/
path.
- Fix some wrong documentation paths caused from binding
restructuring.
- Vendor prefixes for Faraday and Fujitsu.
- Fix an of_node ref counting leak in of_find_node_opts_by_path
- Introduce new graph helper of_graph_get_remote_node() which will be
used by DRM drivers in 4.12"
* tag 'devicetree-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (27 commits)
DT: add Faraday Tec. as vendor
of: introduce of_graph_get_remote_node
of: Add missing space at end of pr_fmt().
of: make of_device_make_bus_id() static
of: fix of_node leak caused in of_find_node_opts_by_path
dt-bindings: net: remove reference to fixed link support
dt-bindings: power: reset: qnap-poweroff: Drop reference to pm_power_off
dt-bindings: power: reset: gpio-poweroff: Drop reference to pm_power_off
dt-bindings: mfd: as3722: Drop reference to pm_power_off
dt-bindings: display: move ANX7814 and SiI8620 bridge bindings
of/unittest: Swap arguments of of_unittest_apply_overlay()
Documentation: usb: fix wrong documentation paths
serial: fsl-imx-uart.txt: Remove generic property
devicetree: Add Fujitsu Ltd. vendor prefix
Documentation: display: fix wrong documentation paths
of: remove redundant memset in overlay
bus:qcom : Fix typo in qcom,ebi2.txt
dt-bindings: qman: Remove pool channel node
Documentation: panel-dpi: fix path to display-timing.txt
devicetree: bindings: clk: mvebu: fix description for sata1 on Armada XP
...
This commit is contained in:
commit
be5165a51d
66 changed files with 1781 additions and 1100 deletions
|
|
@ -843,8 +843,11 @@ struct device_node *of_find_node_opts_by_path(const char *path, const char **opt
|
|||
if (!np)
|
||||
np = of_node_get(of_root);
|
||||
while (np && *path == '/') {
|
||||
struct device_node *tmp = np;
|
||||
|
||||
path++; /* Increment past '/' delimiter */
|
||||
np = __of_find_node_by_path(np, path);
|
||||
of_node_put(tmp);
|
||||
path = strchrnul(path, '/');
|
||||
if (separator && separator < path)
|
||||
break;
|
||||
|
|
@ -2495,3 +2498,40 @@ struct device_node *of_graph_get_remote_port(const struct device_node *node)
|
|||
return of_get_next_parent(np);
|
||||
}
|
||||
EXPORT_SYMBOL(of_graph_get_remote_port);
|
||||
|
||||
/**
|
||||
* of_graph_get_remote_node() - get remote parent device_node for given port/endpoint
|
||||
* @node: pointer to parent device_node containing graph port/endpoint
|
||||
* @port: identifier (value of reg property) of the parent port node
|
||||
* @endpoint: identifier (value of reg property) of the endpoint node
|
||||
*
|
||||
* Return: Remote device node associated with remote endpoint node linked
|
||||
* to @node. Use of_node_put() on it when done.
|
||||
*/
|
||||
struct device_node *of_graph_get_remote_node(const struct device_node *node,
|
||||
u32 port, u32 endpoint)
|
||||
{
|
||||
struct device_node *endpoint_node, *remote;
|
||||
|
||||
endpoint_node = of_graph_get_endpoint_by_regs(node, port, endpoint);
|
||||
if (!endpoint_node) {
|
||||
pr_debug("no valid endpoint (%d, %d) for node %s\n",
|
||||
port, endpoint, node->full_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
remote = of_graph_get_remote_port_parent(endpoint_node);
|
||||
of_node_put(endpoint_node);
|
||||
if (!remote) {
|
||||
pr_debug("no valid remote node\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!of_device_is_available(remote)) {
|
||||
pr_debug("not available for remote node\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return remote;
|
||||
}
|
||||
EXPORT_SYMBOL(of_graph_get_remote_node);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* version 2 as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: fdt:" fmt
|
||||
#define pr_fmt(fmt) "OF: fdt: " fmt
|
||||
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/kernel.h>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
|
|||
const __be32 *match_array = initial_match_array;
|
||||
const __be32 *tmp, *imap, *imask, dummy_imask[] = { [0 ... MAX_PHANDLE_ARGS] = ~0 };
|
||||
u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0;
|
||||
int imaplen, match, i;
|
||||
int imaplen, match, i, rc = -EINVAL;
|
||||
|
||||
#ifdef DEBUG
|
||||
of_print_phandle_args("of_irq_parse_raw: ", out_irq);
|
||||
|
|
@ -134,7 +134,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
|
|||
pr_debug("of_irq_parse_raw: ipar=%s, size=%d\n", of_node_full_name(ipar), intsize);
|
||||
|
||||
if (out_irq->args_count != intsize)
|
||||
return -EINVAL;
|
||||
goto fail;
|
||||
|
||||
/* Look for this #address-cells. We have to implement the old linux
|
||||
* trick of looking for the parent here as some device-trees rely on it
|
||||
|
|
@ -153,8 +153,10 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
|
|||
pr_debug(" -> addrsize=%d\n", addrsize);
|
||||
|
||||
/* Range check so that the temporary buffer doesn't overflow */
|
||||
if (WARN_ON(addrsize + intsize > MAX_PHANDLE_ARGS))
|
||||
if (WARN_ON(addrsize + intsize > MAX_PHANDLE_ARGS)) {
|
||||
rc = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Precalculate the match array - this simplifies match loop */
|
||||
for (i = 0; i < addrsize; i++)
|
||||
|
|
@ -240,10 +242,11 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
|
|||
newintsize, newaddrsize);
|
||||
|
||||
/* Check for malformed properties */
|
||||
if (WARN_ON(newaddrsize + newintsize > MAX_PHANDLE_ARGS))
|
||||
goto fail;
|
||||
if (imaplen < (newaddrsize + newintsize))
|
||||
if (WARN_ON(newaddrsize + newintsize > MAX_PHANDLE_ARGS)
|
||||
|| (imaplen < (newaddrsize + newintsize))) {
|
||||
rc = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
imap += newaddrsize + newintsize;
|
||||
imaplen -= newaddrsize + newintsize;
|
||||
|
|
@ -271,11 +274,13 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
|
|||
ipar = newpar;
|
||||
newpar = NULL;
|
||||
}
|
||||
rc = -ENOENT; /* No interrupt-map found */
|
||||
|
||||
fail:
|
||||
of_node_put(ipar);
|
||||
of_node_put(newpar);
|
||||
|
||||
return -EINVAL;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_irq_parse_raw);
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,15 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
|
|||
goto err;
|
||||
return 0;
|
||||
err:
|
||||
dev_err(&pdev->dev, "of_irq_parse_pci() failed with rc=%d\n", rc);
|
||||
if (rc == -ENOENT) {
|
||||
dev_warn(&pdev->dev,
|
||||
"%s: no interrupt-map found, INTx interrupts not available\n",
|
||||
__func__);
|
||||
pr_warn_once("%s: possibly some PCI slots don't have level triggered interrupts capability\n",
|
||||
__func__);
|
||||
} else {
|
||||
dev_err(&pdev->dev, "%s: failed with rc=%d\n", __func__, rc);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_irq_parse_pci);
|
||||
|
|
|
|||
|
|
@ -354,6 +354,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
|
|||
mutex_lock(&of_rmem_assigned_device_mutex);
|
||||
list_add(&rd->list, &of_rmem_assigned_device_list);
|
||||
mutex_unlock(&of_rmem_assigned_device_mutex);
|
||||
/* ensure that dma_ops is set for virtual devices
|
||||
* using reserved memory
|
||||
*/
|
||||
of_dma_configure(dev, np);
|
||||
|
||||
dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/idr.h>
|
||||
|
|
@ -314,7 +313,6 @@ static int of_build_overlay_info(struct of_overlay *ov,
|
|||
|
||||
cnt = 0;
|
||||
for_each_child_of_node(tree, node) {
|
||||
memset(&ovinfo[cnt], 0, sizeof(*ovinfo));
|
||||
err = of_fill_overlay_info(ov, node, &ovinfo[cnt]);
|
||||
if (err == 0)
|
||||
cnt++;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
|
|||
* derive a unique name. If it cannot, then it will prepend names from
|
||||
* parent nodes until a unique name can be derived.
|
||||
*/
|
||||
void of_device_make_bus_id(struct device *dev)
|
||||
static void of_device_make_bus_id(struct device *dev)
|
||||
{
|
||||
struct device_node *node = dev->of_node;
|
||||
const __be32 *reg;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
/* illegal phandle value (set when unresolved) */
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-mux.h>
|
||||
|
|
@ -1181,7 +1180,7 @@ static void of_unittest_destroy_tracked_overlays(void)
|
|||
} while (defers > 0);
|
||||
}
|
||||
|
||||
static int of_unittest_apply_overlay(int unittest_nr, int overlay_nr,
|
||||
static int of_unittest_apply_overlay(int overlay_nr, int unittest_nr,
|
||||
int *overlay_id)
|
||||
{
|
||||
struct device_node *np = NULL;
|
||||
|
|
@ -1840,7 +1839,7 @@ static void of_unittest_overlay_i2c_15(void)
|
|||
int ret;
|
||||
|
||||
/* device should enable */
|
||||
ret = of_unittest_apply_overlay_check(16, 15, 0, 1, I2C_OVERLAY);
|
||||
ret = of_unittest_apply_overlay_check(15, 15, 0, 1, I2C_OVERLAY);
|
||||
if (ret != 0)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue