Skip to content

Commit c28b947

Browse files
committed
Merge tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring: - Fix irq msi-map calculation for nonzero rid-base. - Binding doc updates for GICv3, fsl-imx-uart, and S3C RTC. * tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: rtc: s3c: Document required clocks in the DT binding serial: fsl-imx-uart: Fix typo in fsl,dte-mode description dt-bindings: arm, gic-v3: require that reserved cells are always 0 of/irq: Fix msi-map calculation for nonzero rid-base
2 parents 35683dd + 43f3408 commit c28b947

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ Main node required properties:
2424
1 = edge triggered
2525
4 = level triggered
2626

27-
Cells 4 and beyond are reserved for future use. When the 1st cell
28-
has a value of 0 or 1, cells 4 and beyond act as padding, and may be
29-
ignored. It is recommended that padding cells have a value of 0.
27+
Cells 4 and beyond are reserved for future use and must have a value
28+
of 0 if present.
3029

3130
- reg : Specifies base physical address(s) and size of the GIC
3231
registers, in the following order:

Documentation/devicetree/bindings/rtc/s3c-rtc.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ Required properties:
1414
interrupt number is the rtc alarm interrupt and second interrupt number
1515
is the rtc tick interrupt. The number of cells representing a interrupt
1616
depends on the parent interrupt controller.
17+
- clocks: Must contain a list of phandle and clock specifier for the rtc
18+
and source clocks.
19+
- clock-names: Must contain "rtc" and "rtc_src" entries sorted in the
20+
same order as the clocks property.
1721

1822
Example:
1923

2024
rtc@10070000 {
2125
compatible = "samsung,s3c6410-rtc";
2226
reg = <0x10070000 0x100>;
2327
interrupts = <44 0 45 0>;
28+
clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
29+
clock-names = "rtc", "rtc_src";
2430
};

Documentation/devicetree/bindings/serial/fsl-imx-uart.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Optional properties:
99
- fsl,uart-has-rtscts : Indicate the uart has rts and cts
1010
- fsl,irda-mode : Indicate the uart supports irda mode
1111
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
12-
is DCE mode by default.
12+
in DCE mode by default.
1313

1414
Note: Each uart controller should have an alias correctly numbered
1515
in "aliases" node.

drivers/of/irq.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ static u32 __of_msi_map_rid(struct device *dev, struct device_node **np,
635635
msi_base = be32_to_cpup(msi_map + 2);
636636
rid_len = be32_to_cpup(msi_map + 3);
637637

638+
if (rid_base & ~map_mask) {
639+
dev_err(parent_dev,
640+
"Invalid msi-map translation - msi-map-mask (0x%x) ignores rid-base (0x%x)\n",
641+
map_mask, rid_base);
642+
return rid_out;
643+
}
644+
638645
msi_controller_node = of_find_node_by_phandle(phandle);
639646

640647
matched = (masked_rid >= rid_base &&
@@ -654,7 +661,7 @@ static u32 __of_msi_map_rid(struct device *dev, struct device_node **np,
654661
if (!matched)
655662
return rid_out;
656663

657-
rid_out = masked_rid + msi_base;
664+
rid_out = masked_rid - rid_base + msi_base;
658665
dev_dbg(dev,
659666
"msi-map at: %s, using mask %08x, rid-base: %08x, msi-base: %08x, length: %08x, rid: %08x -> %08x\n",
660667
dev_name(parent_dev), map_mask, rid_base, msi_base,

0 commit comments

Comments
 (0)