Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+31 -9
+5
Documentation/devicetree/bindings/.gitignore
··· 2 2 *.example.dts 3 3 /processed-schema*.yaml 4 4 /processed-schema*.json 5 + 6 + # 7 + # We don't want to ignore the following even if they are dot-files 8 + # 9 + !.yamllint
+1 -1
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
··· 108 108 109 109 msi-controller: 110 110 description: 111 - Only present if the Message Based Interrupt functionnality is 111 + Only present if the Message Based Interrupt functionality is 112 112 being exposed by the HW, and the mbi-ranges property present. 113 113 114 114 mbi-ranges:
+15 -6
drivers/of/address.c
··· 965 965 } 966 966 967 967 of_dma_range_parser_init(&parser, node); 968 - for_each_of_range(&parser, &range) 968 + for_each_of_range(&parser, &range) { 969 + if (range.cpu_addr == OF_BAD_ADDR) { 970 + pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n", 971 + range.bus_addr, node); 972 + continue; 973 + } 969 974 num_ranges++; 975 + } 976 + 977 + if (!num_ranges) { 978 + ret = -EINVAL; 979 + goto out; 980 + } 970 981 971 982 r = kcalloc(num_ranges + 1, sizeof(*r), GFP_KERNEL); 972 983 if (!r) { ··· 986 975 } 987 976 988 977 /* 989 - * Record all info in the generic DMA ranges array for struct device. 978 + * Record all info in the generic DMA ranges array for struct device, 979 + * returning an error if we don't find any parsable ranges. 990 980 */ 991 981 *map = r; 992 982 of_dma_range_parser_init(&parser, node); 993 983 for_each_of_range(&parser, &range) { 994 984 pr_debug("dma_addr(%llx) cpu_addr(%llx) size(%llx)\n", 995 985 range.bus_addr, range.cpu_addr, range.size); 996 - if (range.cpu_addr == OF_BAD_ADDR) { 997 - pr_err("translation of DMA address(%llx) to CPU address failed node(%pOF)\n", 998 - range.bus_addr, node); 986 + if (range.cpu_addr == OF_BAD_ADDR) 999 987 continue; 1000 - } 1001 988 r->cpu_start = range.cpu_addr; 1002 989 r->dma_start = range.bus_addr; 1003 990 r->size = range.size;
+10 -2
drivers/of/platform.c
··· 525 525 if (IS_ENABLED(CONFIG_PPC)) { 526 526 struct device_node *boot_display = NULL; 527 527 struct platform_device *dev; 528 + int display_number = 0; 528 529 int ret; 529 530 530 531 /* Check if we have a MacOS display without a node spec */ ··· 556 555 if (!of_get_property(node, "linux,opened", NULL) || 557 556 !of_get_property(node, "linux,boot-display", NULL)) 558 557 continue; 559 - dev = of_platform_device_create(node, "of-display", NULL); 558 + dev = of_platform_device_create(node, "of-display.0", NULL); 559 + of_node_put(node); 560 560 if (WARN_ON(!dev)) 561 561 return -ENOMEM; 562 562 boot_display = node; 563 + display_number++; 563 564 break; 564 565 } 565 566 for_each_node_by_type(node, "display") { 567 + char buf[14]; 568 + const char *of_display_format = "of-display.%d"; 569 + 566 570 if (!of_get_property(node, "linux,opened", NULL) || node == boot_display) 567 571 continue; 568 - of_platform_device_create(node, "of-display", NULL); 572 + ret = snprintf(buf, sizeof(buf), of_display_format, display_number++); 573 + if (ret < sizeof(buf)) 574 + of_platform_device_create(node, buf, NULL); 569 575 } 570 576 571 577 } else {