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

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

Pull devicetree fixes from Rob Herring:

- Sync dtc to upstream to pick up fixes for I2C bus checks and quiet
warnings

- Various fixes for DT binding check warnings

- A couple of build fixes/improvements for binding checks

- ReST formatting improvements for writing-schema.rst

- Document reference fixes

* tag 'devicetree-fixes-for-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
dt-bindings: clock: imx: Fix e-mail address
dt-bindings: thermal: k3: Fix the reg property
dt-bindings: thermal: Remove soc unit address
dt-bindings: display: arm: versatile: Pass the sysreg unit name
dt-bindings: usb: aspeed: Remove the leading zeroes
dt-bindings: copy process-schema-examples.yaml to process-schema.yaml
dt-bindings: do not build processed-schema.yaml for 'make dt_binding_check'
dt-bindings: fix error in 'make clean' after 'make dt_binding_check'
dt-bindings: mailbox: zynqmp_ipi: fix unit address
dt-bindings: bus: uniphier-system-bus: fix warning in example
scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c
doc: devicetree: bindings: fix spelling mistake
docs: dt: minor adjustments at writing-schema.rst
dt: fix reference to olpc,xo1.75-ec.txt
dt: Fix broken references to renamed docs
dt: fix broken links due to txt->yaml renames
dt: update a reference for reneases pcar file renamed to yaml

+159 -61
+28 -10
Documentation/devicetree/bindings/Makefile
··· 2 2 DT_DOC_CHECKER ?= dt-doc-validate 3 3 DT_EXTRACT_EX ?= dt-extract-example 4 4 DT_MK_SCHEMA ?= dt-mk-schema 5 - DT_MK_SCHEMA_USERONLY_FLAG := $(if $(DT_SCHEMA_FILES), -u) 6 5 7 6 DT_SCHEMA_MIN_VERSION = 2020.5 8 7 ··· 34 35 35 36 DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||') 36 37 37 - DT_SCHEMA_FILES ?= $(DT_DOCS) 38 - 39 - extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES)) 40 - extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES)) 41 - extra-$(CHECK_DT_BINDING) += processed-schema-examples.yaml 42 - 43 38 override DTC_FLAGS := \ 44 39 -Wno-avoid_unnecessary_addr_size \ 45 - -Wno-graph_child_address 40 + -Wno-graph_child_address \ 41 + -Wno-interrupt_provider 46 42 47 43 $(obj)/processed-schema-examples.yaml: $(DT_DOCS) check_dtschema_version FORCE 48 44 $(call if_changed,mk_schema) 49 45 50 - $(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := $(DT_MK_SCHEMA_USERONLY_FLAG) 46 + ifeq ($(DT_SCHEMA_FILES),) 47 + 48 + # Unless DT_SCHEMA_FILES is specified, use the full schema for dtbs_check too. 49 + # Just copy processed-schema-examples.yaml 50 + 51 + $(obj)/processed-schema.yaml: $(obj)/processed-schema-examples.yaml FORCE 52 + $(call if_changed,copy) 53 + 54 + DT_SCHEMA_FILES = $(DT_DOCS) 55 + 56 + else 57 + 58 + # If DT_SCHEMA_FILES is specified, use it for processed-schema.yaml 59 + 60 + $(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := -u 51 61 $(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) check_dtschema_version FORCE 52 62 $(call if_changed,mk_schema) 53 63 54 - extra-y += processed-schema.yaml 64 + endif 65 + 66 + extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES)) 67 + extra-$(CHECK_DT_BINDING) += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES)) 68 + extra-$(CHECK_DT_BINDING) += processed-schema-examples.yaml 69 + extra-$(CHECK_DTBS) += processed-schema.yaml 70 + 71 + # Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of 72 + # build artifacts here before they are processed by scripts/Makefile.clean 73 + clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \ 74 + -name '*.example.dt.yaml' \) -delete 2>/dev/null)
+1 -1
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
··· 47 47 &lsio_mu1 1 2 48 48 &lsio_mu1 1 3 49 49 &lsio_mu1 3 3>; 50 - See Documentation/devicetree/bindings/mailbox/fsl,mu.txt 50 + See Documentation/devicetree/bindings/mailbox/fsl,mu.yaml 51 51 for detailed mailbox binding. 52 52 53 53 Note: Each mu which supports general interrupt should have an alias correctly
+2 -2
Documentation/devicetree/bindings/bus/socionext,uniphier-system-bus.yaml
··· 80 80 ranges = <1 0x00000000 0x42000000 0x02000000>, 81 81 <5 0x00000000 0x46000000 0x01000000>; 82 82 83 - ethernet@1,01f00000 { 83 + ethernet@1,1f00000 { 84 84 compatible = "smsc,lan9115"; 85 85 reg = <1 0x01f00000 0x1000>; 86 86 interrupts = <0 48 4>; 87 87 phy-mode = "mii"; 88 88 }; 89 89 90 - uart@5,00200000 { 90 + serial@5,200000 { 91 91 compatible = "ns16550a"; 92 92 reg = <5 0x00200000 0x20>; 93 93 interrupts = <0 49 4>;
+1 -1
Documentation/devicetree/bindings/clock/imx27-clock.yaml
··· 7 7 title: Clock bindings for Freescale i.MX27 8 8 9 9 maintainers: 10 - - Fabio Estevam <fabio.estevam@freescale.com> 10 + - Fabio Estevam <fabio.estevam@nxp.com> 11 11 12 12 description: | 13 13 The clock consumer should specify the desired clock by having the clock
+1 -1
Documentation/devicetree/bindings/clock/imx31-clock.yaml
··· 7 7 title: Clock bindings for Freescale i.MX31 8 8 9 9 maintainers: 10 - - Fabio Estevam <fabio.estevam@freescale.com> 10 + - Fabio Estevam <fabio.estevam@nxp.com> 11 11 12 12 description: | 13 13 The clock consumer should specify the desired clock by having the clock
+1 -1
Documentation/devicetree/bindings/clock/imx5-clock.yaml
··· 7 7 title: Clock bindings for Freescale i.MX5 8 8 9 9 maintainers: 10 - - Fabio Estevam <fabio.estevam@freescale.com> 10 + - Fabio Estevam <fabio.estevam@nxp.com> 11 11 12 12 description: | 13 13 The clock consumer should specify the desired clock by having the clock
+1 -1
Documentation/devicetree/bindings/display/bridge/sii902x.txt
··· 37 37 simple-card or audio-graph-card binding. See their binding 38 38 documents on how to describe the way the sii902x device is 39 39 connected to the rest of the audio system: 40 - Documentation/devicetree/bindings/sound/simple-card.txt 40 + Documentation/devicetree/bindings/sound/simple-card.yaml 41 41 Documentation/devicetree/bindings/sound/audio-graph-card.txt 42 42 Note: In case of the audio-graph-card binding the used port 43 43 index should be 3.
+2 -2
Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt
··· 68 68 datasheet 69 69 - clocks : phandle to the PRE axi clock input, as described 70 70 in Documentation/devicetree/bindings/clock/clock-bindings.txt and 71 - Documentation/devicetree/bindings/clock/imx6q-clock.txt. 71 + Documentation/devicetree/bindings/clock/imx6q-clock.yaml. 72 72 - clock-names: should be "axi" 73 73 - interrupts: should contain the PRE interrupt 74 74 - fsl,iram: phandle pointing to the mmio-sram device node, that should be ··· 94 94 datasheet 95 95 - clocks : phandles to the PRG ipg and axi clock inputs, as described 96 96 in Documentation/devicetree/bindings/clock/clock-bindings.txt and 97 - Documentation/devicetree/bindings/clock/imx6q-clock.txt. 97 + Documentation/devicetree/bindings/clock/imx6q-clock.yaml. 98 98 - clock-names: should be "ipg" and "axi" 99 99 - fsl,pres: phandles to the PRE units attached to this PRG, with the fixed 100 100 PRE as the first entry and the muxable PREs following.
+2 -2
Documentation/devicetree/bindings/display/imx/ldb.txt
··· 30 30 "di2_sel" - IPU2 DI0 mux 31 31 "di3_sel" - IPU2 DI1 mux 32 32 The needed clock numbers for each are documented in 33 - Documentation/devicetree/bindings/clock/imx5-clock.txt, and in 34 - Documentation/devicetree/bindings/clock/imx6q-clock.txt. 33 + Documentation/devicetree/bindings/clock/imx5-clock.yaml, and in 34 + Documentation/devicetree/bindings/clock/imx6q-clock.yaml. 35 35 36 36 Optional properties: 37 37 - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
+1 -1
Documentation/devicetree/bindings/display/panel/arm,versatile-tft-panel.yaml
··· 33 33 34 34 examples: 35 35 - | 36 - sysreg { 36 + sysreg@0 { 37 37 compatible = "arm,versatile-sysreg", "syscon", "simple-mfd"; 38 38 reg = <0x00000 0x1000>; 39 39
+1 -1
Documentation/devicetree/bindings/display/rockchip/rockchip-drm.yaml
··· 24 24 description: | 25 25 Should contain a list of phandles pointing to display interface port 26 26 of vop devices. vop definitions as defined in 27 - Documentation/devicetree/bindings/display/rockchip/rockchip-vop.txt 27 + Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml 28 28 29 29 required: 30 30 - compatible
+1 -1
Documentation/devicetree/bindings/gpio/mediatek,mt7621-gpio.txt
··· 12 12 Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. 13 13 - #interrupt-cells : Specifies the number of cells needed to encode an 14 14 interrupt. Should be 2. The first cell defines the interrupt number, 15 - the second encodes the triger flags encoded as described in 15 + the second encodes the trigger flags encoded as described in 16 16 Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 17 17 - compatible: 18 18 - "mediatek,mt7621-gpio" for Mediatek controllers
+1 -1
Documentation/devicetree/bindings/interrupt-controller/csky,mpintc.txt
··· 10 10 16-31 : private irq, and we use 16 as the co-processor timer. 11 11 31-1024: common irq for soc ip. 12 12 13 - Interrupt triger mode: (Defined in dt-bindings/interrupt-controller/irq.h) 13 + Interrupt trigger mode: (Defined in dt-bindings/interrupt-controller/irq.h) 14 14 IRQ_TYPE_LEVEL_HIGH (default) 15 15 IRQ_TYPE_LEVEL_LOW 16 16 IRQ_TYPE_EDGE_RISING
+1 -1
Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.txt
··· 87 87 ranges; 88 88 89 89 /* APU<->RPU0 IPI mailbox controller */ 90 - ipi_mailbox_rpu0: mailbox@ff90400 { 90 + ipi_mailbox_rpu0: mailbox@ff990400 { 91 91 reg = <0xff990400 0x20>, 92 92 <0xff990420 0x20>, 93 93 <0xff990080 0x20>,
+1 -1
Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.txt
··· 8 8 to receive a transfer (that is, when TX FIFO contains the response data) by 9 9 strobing the ACK pin with the ready signal. See the "ready-gpios" property of the 10 10 SSP binding as documented in: 11 - <Documentation/devicetree/bindings/spi/spi-pxa2xx.txt>. 11 + <Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml>. 12 12 13 13 Example: 14 14 &ssp3 {
+1 -1
Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
··· 3 3 4 4 This device is a serial attached device to BTIF device and thus it must be a 5 5 child node of the serial node with BTIF. The dt-bindings details for BTIF 6 - device can be known via Documentation/devicetree/bindings/serial/8250.txt. 6 + device can be known via Documentation/devicetree/bindings/serial/8250.yaml. 7 7 8 8 Required properties: 9 9
+1 -1
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
··· 114 114 [flags]> 115 115 116 116 On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver. 117 - Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt 117 + Please refer to Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml 118 118 for documentation of the GPIO device tree bindings on those platforms. 119 119 120 120
+1 -1
Documentation/devicetree/bindings/sound/audio-graph-card.txt
··· 5 5 see ${LINUX}/Documentation/devicetree/bindings/graph.txt 6 6 7 7 Basically, Audio Graph Card property is same as Simple Card. 8 - see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt 8 + see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml 9 9 10 10 Below are same as Simple-Card. 11 11
+1 -1
Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
··· 5 5 6 6 sti sound drivers allows to expose sti SoC audio interface through the 7 7 generic ASoC simple card. For details about sound card declaration please refer to 8 - Documentation/devicetree/bindings/sound/simple-card.txt. 8 + Documentation/devicetree/bindings/sound/simple-card.yaml. 9 9 10 10 1) sti-uniperiph-dai: audio dai device. 11 11 ---------------------------------------
+1 -1
Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.txt
··· 19 19 20 20 SPI Controller nodes must be child of GENI based Qualcomm Universal 21 21 Peripharal. Please refer GENI based QUP wrapper controller node bindings 22 - described in Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt. 22 + described in Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml. 23 23 24 24 SPI slave nodes must be children of the SPI master node and conform to SPI bus 25 25 binding as described in Documentation/devicetree/bindings/spi/spi-bus.txt.
+1 -1
Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
··· 41 41 #include <dt-bindings/interrupt-controller/arm-gic.h> 42 42 43 43 // Example 1: SDM845 TSENS 44 - soc: soc@0 { 44 + soc: soc { 45 45 #address-cells = <2>; 46 46 #size-cells = <2>; 47 47
+1 -1
Documentation/devicetree/bindings/thermal/thermal-zones.yaml
··· 224 224 #include <dt-bindings/thermal/thermal.h> 225 225 226 226 // Example 1: SDM845 TSENS 227 - soc: soc@0 { 227 + soc { 228 228 #address-cells = <2>; 229 229 #size-cells = <2>; 230 230
+1 -1
Documentation/devicetree/bindings/thermal/ti,am654-thermal.yaml
··· 35 35 #include <dt-bindings/soc/ti,sci_pm_domain.h> 36 36 vtm: thermal@42050000 { 37 37 compatible = "ti,am654-vtm"; 38 - reg = <0x0 0x42050000 0x0 0x25c>; 38 + reg = <0x42050000 0x25c>; 39 39 power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>; 40 40 #thermal-sensor-cells = <1>; 41 41 };
+1 -1
Documentation/devicetree/bindings/timer/csky,mptimer.txt
··· 8 8 - PTIM_CTLR "cr<0, 14>" Control reg to start reset timer. 9 9 - PTIM_TSR "cr<1, 14>" Interrupt cleanup status reg. 10 10 - PTIM_CCVR "cr<3, 14>" Current counter value reg. 11 - - PTIM_LVR "cr<6, 14>" Window value reg to triger next event. 11 + - PTIM_LVR "cr<6, 14>" Window value reg to trigger next event. 12 12 13 13 ============================== 14 14 timer node bindings definition
+2 -2
Documentation/devicetree/bindings/usb/aspeed,usb-vhub.yaml
··· 127 127 #address-cells = <1>; 128 128 #size-cells = <0>; 129 129 130 - string@0409 { 131 - reg = <0x0409>; 130 + string@409 { 131 + reg = <0x409>; 132 132 manufacturer = "ASPEED"; 133 133 product = "USB Virtual Hub"; 134 134 serial-number = "0000";
+6 -3
Documentation/devicetree/writing-schema.rst
··· 1 - :orphan: 1 + .. SPDX-License-Identifier: GPL-2.0 2 2 3 3 Writing DeviceTree Bindings in json-schema 4 4 ========================================== ··· 124 124 libyaml and its headers be installed on the host system. For some distributions 125 125 that involves installing the development package, such as: 126 126 127 - Debian: 127 + Debian:: 128 + 128 129 apt-get install libyaml-dev 129 - Fedora: 130 + 131 + Fedora:: 132 + 130 133 dnf -y install libyaml-devel 131 134 132 135 Running checks
+1 -1
Documentation/mips/ingenic-tcu.rst
··· 68 68 drivers access their registers through the same regmap. 69 69 70 70 For more information regarding the devicetree bindings of the TCU drivers, 71 - have a look at Documentation/devicetree/bindings/timer/ingenic,tcu.txt. 71 + have a look at Documentation/devicetree/bindings/timer/ingenic,tcu.yaml.
+4 -4
MAINTAINERS
··· 3946 3946 S: Supported 3947 3947 F: drivers/char/hw_random/cctrng.c 3948 3948 F: drivers/char/hw_random/cctrng.h 3949 - F: Documentation/devicetree/bindings/rng/arm-cctrng.txt 3949 + F: Documentation/devicetree/bindings/rng/arm-cctrng.yaml 3950 3950 W: https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family 3951 3951 3952 3952 CEC FRAMEWORK ··· 5490 5490 DRM DRIVER FOR RAYDIUM RM67191 PANELS 5491 5491 M: Robert Chiras <robert.chiras@nxp.com> 5492 5492 S: Maintained 5493 - F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt 5493 + F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml 5494 5494 F: drivers/gpu/drm/panel/panel-raydium-rm67191.c 5495 5495 5496 5496 DRM DRIVER FOR ROCKTECH JH057N00900 PANELS ··· 14574 14574 M: Niklas Söderlund <niklas.soderlund@ragnatech.se> 14575 14575 L: linux-renesas-soc@vger.kernel.org 14576 14576 S: Supported 14577 - F: Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt 14578 - F: Documentation/devicetree/bindings/thermal/rcar-thermal.txt 14577 + F: Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml 14578 + F: Documentation/devicetree/bindings/thermal/rcar-thermal.yaml 14579 14579 F: drivers/thermal/rcar_gen3_thermal.c 14580 14580 F: drivers/thermal/rcar_thermal.c 14581 14581
+6 -1
scripts/Makefile.lib
··· 212 212 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) 213 213 endef 214 214 215 + quiet_cmd_copy = COPY $@ 216 + cmd_copy = cp $< $@ 217 + 215 218 # Shipped files 216 219 # =========================================================================== 217 220 ··· 262 259 # DTC 263 260 # --------------------------------------------------------------------------- 264 261 DTC ?= $(objtree)/scripts/dtc/dtc 262 + DTC_FLAGS += -Wno-interrupt_provider 265 263 266 264 # Disable noisy checks by default 267 265 ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) ··· 278 274 279 275 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) 280 276 DTC_FLAGS += -Wnode_name_chars_strict \ 281 - -Wproperty_name_chars_strict 277 + -Wproperty_name_chars_strict \ 278 + -Winterrupt_provider 282 279 endif 283 280 284 281 DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
+36 -3
scripts/dtc/checks.c
··· 1022 1022 } 1023 1023 WARNING(i2c_bus_bridge, check_i2c_bus_bridge, NULL, &addr_size_cells); 1024 1024 1025 + #define I2C_OWN_SLAVE_ADDRESS (1U << 30) 1026 + #define I2C_TEN_BIT_ADDRESS (1U << 31) 1027 + 1025 1028 static void check_i2c_bus_reg(struct check *c, struct dt_info *dti, struct node *node) 1026 1029 { 1027 1030 struct property *prop; ··· 1047 1044 } 1048 1045 1049 1046 reg = fdt32_to_cpu(*cells); 1047 + /* Ignore I2C_OWN_SLAVE_ADDRESS */ 1048 + reg &= ~I2C_OWN_SLAVE_ADDRESS; 1050 1049 snprintf(unit_addr, sizeof(unit_addr), "%x", reg); 1051 1050 if (!streq(unitname, unit_addr)) 1052 1051 FAIL(c, dti, node, "I2C bus unit address format error, expected \"%s\"", ··· 1056 1051 1057 1052 for (len = prop->val.len; len > 0; len -= 4) { 1058 1053 reg = fdt32_to_cpu(*(cells++)); 1059 - if (reg > 0x3ff) 1054 + /* Ignore I2C_OWN_SLAVE_ADDRESS */ 1055 + reg &= ~I2C_OWN_SLAVE_ADDRESS; 1056 + 1057 + if ((reg & I2C_TEN_BIT_ADDRESS) && ((reg & ~I2C_TEN_BIT_ADDRESS) > 0x3ff)) 1060 1058 FAIL_PROP(c, dti, node, prop, "I2C address must be less than 10-bits, got \"0x%x\"", 1061 1059 reg); 1062 - 1060 + else if (reg > 0x7f) 1061 + FAIL_PROP(c, dti, node, prop, "I2C address must be less than 7-bits, got \"0x%x\". Set I2C_TEN_BIT_ADDRESS for 10 bit addresses or fix the property", 1062 + reg); 1063 1063 } 1064 1064 } 1065 1065 WARNING(i2c_bus_reg, check_i2c_bus_reg, NULL, &reg_format, &i2c_bus_bridge); ··· 1557 1547 1558 1548 return false; 1559 1549 } 1550 + 1551 + static void check_interrupt_provider(struct check *c, 1552 + struct dt_info *dti, 1553 + struct node *node) 1554 + { 1555 + struct property *prop; 1556 + 1557 + if (!node_is_interrupt_provider(node)) 1558 + return; 1559 + 1560 + prop = get_property(node, "#interrupt-cells"); 1561 + if (!prop) 1562 + FAIL(c, dti, node, 1563 + "Missing #interrupt-cells in interrupt provider"); 1564 + 1565 + prop = get_property(node, "#address-cells"); 1566 + if (!prop) 1567 + FAIL(c, dti, node, 1568 + "Missing #address-cells in interrupt provider"); 1569 + } 1570 + WARNING(interrupt_provider, check_interrupt_provider, NULL); 1571 + 1560 1572 static void check_interrupts_property(struct check *c, 1561 1573 struct dt_info *dti, 1562 1574 struct node *node) ··· 1636 1604 1637 1605 prop = get_property(irq_node, "#interrupt-cells"); 1638 1606 if (!prop) { 1639 - FAIL(c, dti, irq_node, "Missing #interrupt-cells in interrupt-parent"); 1607 + /* We warn about that already in another test. */ 1640 1608 return; 1641 1609 } 1642 1610 ··· 1860 1828 &deprecated_gpio_property, 1861 1829 &gpios_property, 1862 1830 &interrupts_property, 1831 + &interrupt_provider, 1863 1832 1864 1833 &alias_paths, 1865 1834
+31
scripts/dtc/dtc.h
··· 51 51 52 52 typedef uint32_t cell_t; 53 53 54 + static inline uint16_t dtb_ld16(const void *p) 55 + { 56 + const uint8_t *bp = (const uint8_t *)p; 57 + 58 + return ((uint16_t)bp[0] << 8) 59 + | bp[1]; 60 + } 61 + 62 + static inline uint32_t dtb_ld32(const void *p) 63 + { 64 + const uint8_t *bp = (const uint8_t *)p; 65 + 66 + return ((uint32_t)bp[0] << 24) 67 + | ((uint32_t)bp[1] << 16) 68 + | ((uint32_t)bp[2] << 8) 69 + | bp[3]; 70 + } 71 + 72 + static inline uint64_t dtb_ld64(const void *p) 73 + { 74 + const uint8_t *bp = (const uint8_t *)p; 75 + 76 + return ((uint64_t)bp[0] << 56) 77 + | ((uint64_t)bp[1] << 48) 78 + | ((uint64_t)bp[2] << 40) 79 + | ((uint64_t)bp[3] << 32) 80 + | ((uint64_t)bp[4] << 24) 81 + | ((uint64_t)bp[5] << 16) 82 + | ((uint64_t)bp[6] << 8) 83 + | bp[7]; 84 + } 54 85 55 86 #define streq(a, b) (strcmp((a), (b)) == 0) 56 87 #define strstarts(s, prefix) (strncmp((s), (prefix), strlen(prefix)) == 0)
+1 -1
scripts/dtc/flattree.c
··· 156 156 emit_offset_label(f, m->ref, m->offset); 157 157 158 158 while ((d.len - off) >= sizeof(uint32_t)) { 159 - asm_emit_cell(e, fdt32_to_cpu(*((fdt32_t *)(d.val+off)))); 159 + asm_emit_cell(e, dtb_ld32(d.val + off)); 160 160 off += sizeof(uint32_t); 161 161 } 162 162
+1 -1
scripts/dtc/libfdt/fdt_rw.c
··· 436 436 return struct_size; 437 437 } 438 438 439 - if (can_assume(LIBFDT_ORDER) | 439 + if (can_assume(LIBFDT_ORDER) || 440 440 !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) { 441 441 /* no further work necessary */ 442 442 err = fdt_move(fdt, buf, bufsize);
+1 -1
scripts/dtc/libfdt/fdt_sw.c
··· 32 32 /* 'memrsv' state: Initial state after fdt_create() 33 33 * 34 34 * Allowed functions: 35 - * fdt_add_reservmap_entry() 35 + * fdt_add_reservemap_entry() 36 36 * fdt_finish_reservemap() [moves to 'struct' state] 37 37 */ 38 38 static int fdt_sw_probe_memrsv_(void *fdt)
+8
scripts/dtc/libfdt/libfdt.h
··· 9 9 #include "libfdt_env.h" 10 10 #include "fdt.h" 11 11 12 + #ifdef __cplusplus 13 + extern "C" { 14 + #endif 15 + 12 16 #define FDT_FIRST_SUPPORTED_VERSION 0x02 13 17 #define FDT_LAST_SUPPORTED_VERSION 0x11 14 18 ··· 2072 2068 /**********************************************************************/ 2073 2069 2074 2070 const char *fdt_strerror(int errval); 2071 + 2072 + #ifdef __cplusplus 2073 + } 2074 + #endif 2075 2075 2076 2076 #endif /* LIBFDT_H */
+4 -4
scripts/dtc/treesource.c
··· 110 110 fprintf(f, "%02"PRIx8, *(const uint8_t*)p); 111 111 break; 112 112 case 2: 113 - fprintf(f, "0x%02"PRIx16, fdt16_to_cpu(*(const fdt16_t*)p)); 113 + fprintf(f, "0x%02"PRIx16, dtb_ld16(p)); 114 114 break; 115 115 case 4: 116 - fprintf(f, "0x%02"PRIx32, fdt32_to_cpu(*(const fdt32_t*)p)); 116 + fprintf(f, "0x%02"PRIx32, dtb_ld32(p)); 117 117 break; 118 118 case 8: 119 - fprintf(f, "0x%02"PRIx64, fdt64_to_cpu(*(const fdt64_t*)p)); 119 + fprintf(f, "0x%02"PRIx64, dtb_ld64(p)); 120 120 break; 121 121 } 122 122 if (p + width < end) ··· 183 183 nnotcelllbl++; 184 184 } 185 185 186 - if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul)) 186 + if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul <= (len-nnul)) 187 187 && (nnotstringlbl == 0)) { 188 188 return TYPE_STRING; 189 189 } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) {
+1 -1
scripts/dtc/version_gen.h
··· 1 - #define DTC_VERSION "DTC 1.6.0-g87a656ae" 1 + #define DTC_VERSION "DTC 1.6.0-g9d7888cb"
+3 -3
scripts/dtc/yamltree.c
··· 59 59 sprintf(buf, "0x%"PRIx8, *(uint8_t*)(data + off)); 60 60 break; 61 61 case 2: 62 - sprintf(buf, "0x%"PRIx16, fdt16_to_cpu(*(fdt16_t*)(data + off))); 62 + sprintf(buf, "0x%"PRIx16, dtb_ld16(data + off)); 63 63 break; 64 64 case 4: 65 - sprintf(buf, "0x%"PRIx32, fdt32_to_cpu(*(fdt32_t*)(data + off))); 65 + sprintf(buf, "0x%"PRIx32, dtb_ld32(data + off)); 66 66 m = markers; 67 67 is_phandle = false; 68 68 for_each_marker_of_type(m, REF_PHANDLE) { ··· 73 73 } 74 74 break; 75 75 case 8: 76 - sprintf(buf, "0x%"PRIx64, fdt64_to_cpu(*(fdt64_t*)(data + off))); 76 + sprintf(buf, "0x%"PRIx64, dtb_ld64(data + off)); 77 77 break; 78 78 } 79 79