Commit 0983f6bf authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - Fix handling of multiple OF framebuffer devices

 - Fix booting on Socionext Synquacer with bad 'dma-ranges' entries

 - Add DT binding .yamllint to .gitignore

* tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: interrupt-controller: arm,gic-v3: Fix typo in description of msi-controller property
  dt-bindings: Fix .gitignore
  of/address: Return an error when no valid dma-ranges are found
  of: Make OF framebuffer device names unique
parents 513c1a3d 707344c8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2,3 +2,8 @@
*.example.dts
/processed-schema*.yaml
/processed-schema*.json

#
# We don't want to ignore the following even if they are dot-files
#
!.yamllint
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ properties:

  msi-controller:
    description:
      Only present if the Message Based Interrupt functionnality is
      Only present if the Message Based Interrupt functionality is
      being exposed by the HW, and the mbi-ranges property present.

  mbi-ranges:
+15 −6
Original line number Diff line number Diff line
@@ -965,8 +965,19 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map)
	}

	of_dma_range_parser_init(&parser, node);
	for_each_of_range(&parser, &range)
	for_each_of_range(&parser, &range) {
		if (range.cpu_addr == OF_BAD_ADDR) {
			pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n",
			       range.bus_addr, node);
			continue;
		}
		num_ranges++;
	}

	if (!num_ranges) {
		ret = -EINVAL;
		goto out;
	}

	r = kcalloc(num_ranges + 1, sizeof(*r), GFP_KERNEL);
	if (!r) {
@@ -975,18 +986,16 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map)
	}

	/*
	 * Record all info in the generic DMA ranges array for struct device.
	 * Record all info in the generic DMA ranges array for struct device,
	 * returning an error if we don't find any parsable ranges.
	 */
	*map = r;
	of_dma_range_parser_init(&parser, node);
	for_each_of_range(&parser, &range) {
		pr_debug("dma_addr(%llx) cpu_addr(%llx) size(%llx)\n",
			 range.bus_addr, range.cpu_addr, range.size);
		if (range.cpu_addr == OF_BAD_ADDR) {
			pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n",
			       range.bus_addr, node);
		if (range.cpu_addr == OF_BAD_ADDR)
			continue;
		}
		r->cpu_start = range.cpu_addr;
		r->dma_start = range.bus_addr;
		r->size = range.size;
+10 −2
Original line number Diff line number Diff line
@@ -525,6 +525,7 @@ static int __init of_platform_default_populate_init(void)
	if (IS_ENABLED(CONFIG_PPC)) {
		struct device_node *boot_display = NULL;
		struct platform_device *dev;
		int display_number = 0;
		int ret;

		/* Check if we have a MacOS display without a node spec */
@@ -555,16 +556,23 @@ static int __init of_platform_default_populate_init(void)
			if (!of_get_property(node, "linux,opened", NULL) ||
			    !of_get_property(node, "linux,boot-display", NULL))
				continue;
			dev = of_platform_device_create(node, "of-display", NULL);
			dev = of_platform_device_create(node, "of-display.0", NULL);
			of_node_put(node);
			if (WARN_ON(!dev))
				return -ENOMEM;
			boot_display = node;
			display_number++;
			break;
		}
		for_each_node_by_type(node, "display") {
			char buf[14];
			const char *of_display_format = "of-display.%d";

			if (!of_get_property(node, "linux,opened", NULL) || node == boot_display)
				continue;
			of_platform_device_create(node, "of-display", NULL);
			ret = snprintf(buf, sizeof(buf), of_display_format, display_number++);
			if (ret < sizeof(buf))
				of_platform_device_create(node, buf, NULL);
		}

	} else {