Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359625 > unrolled thread
| Started by | MaJun <majun258@huawei.com> |
|---|---|
| First post | 2016-03-17 09:40 +0100 |
| Last post | 2016-03-21 11:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 1/2] irqchip/mbigen:Change the mbigen node definition in dt binding file MaJun <majun258@huawei.com> - 2016-03-17 09:40 +0100
[tip:irq/urgent] irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module tip-bot for MaJun <tipbot@zytor.com> - 2016-03-21 11:40 +0100
| From | MaJun <majun258@huawei.com> |
|---|---|
| Date | 2016-03-17 09:40 +0100 |
| Subject | [PATCH v3 1/2] irqchip/mbigen:Change the mbigen node definition in dt binding file |
| Message-ID | <rdBDj-4U1-9@gated-at.bofh.it> |
From: Ma Jun <majun258@huawei.com>
For mbigen module, there is a special case that more than one mbigen
device nodes use the same reg definition in DTS when these devices
exist in the same mbigen hardware module.
In current mbigen driver, these mbigen devices definition as below:
mbigen_dev1:intc_dev1 {
...
reg = <0x0 0xc0080000 0x0 0x10000>;
...
};
mbigen_dev2:intc_dev2 {
...
reg = <0x0 0xc0080000 0x0 0x10000>;
...
};
On this case, devm_ioremap_resource() returns fail with info
"can't request region for resource" because of memory region check.
To fix this problem, the mbigen node definition and
structure are changed as Mark Rutland suggested in v1 patch[1].
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/403691.html
Signed-off-by: Ma Jun <majun258@huawei.com>
---
.../interrupt-controller/hisilicon,mbigen-v2.txt | 22 +++++++++++++++----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt b/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
index 720f7c9..3b2f4c4 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
@@ -21,6 +21,8 @@ Mbigen main node required properties:
- reg: Specifies the base physical address and size of the Mbigen
registers.
+Mbigen sub node required properties:
+------------------------------------------
- interrupt controller: Identifies the node as an interrupt controller
- msi-parent: Specifies the MSI controller this mbigen use.
@@ -45,13 +47,23 @@ Mbigen main node required properties:
Examples:
- mbigen_device_gmac:intc {
+ mbigen_chip_dsa {
compatible = "hisilicon,mbigen-v2";
reg = <0x0 0xc0080000 0x0 0x10000>;
- interrupt-controller;
- msi-parent = <&its_dsa 0x40b1c>;
- num-pins = <9>;
- #interrupt-cells = <2>;
+
+ mbigen_gmac:intc_gmac {
+ interrupt-controller;
+ msi-parent = <&its_dsa 0x40b1c>;
+ num-pins = <9>;
+ #interrupt-cells = <2>;
+ };
+
+ mbigen_i2c:intc_i2c {
+ interrupt-controller;
+ msi-parent = <&its_dsa 0x40b0e>;
+ num-pins = <2>;
+ #interrupt-cells = <2>;
+ };
};
Devices connect to mbigen required properties:
--
1.7.1
[toc] | [next] | [standalone]
| From | tip-bot for MaJun <tipbot@zytor.com> |
|---|---|
| Date | 2016-03-21 11:40 +0100 |
| Subject | [tip:irq/urgent] irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module |
| Message-ID | <rf5pE-4hd-37@gated-at.bofh.it> |
| In reply to | #1359625 |
Commit-ID: d0e286415dc1f4fea2971d6186b0775c7062575b
Gitweb: http://git.kernel.org/tip/d0e286415dc1f4fea2971d6186b0775c7062575b
Author: MaJun <majun258@huawei.com>
AuthorDate: Thu, 17 Mar 2016 16:34:00 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 21 Mar 2016 11:24:10 +0100
irqchip/mbigen: Adjust DT bindings to handle multiple devices in a module
A mbigen hardware module can contain more than one device node. These device
nodes contain the same register definition.
mbigen_dev1:intc_dev1 {
...
reg = <0x0 0xc0080000 0x0 0x10000>;
...
};
mbigen_dev2:intc_dev2 {
...
reg = <0x0 0xc0080000 0x0 0x10000>;
...
};
In this case both devices try to request the same resource resulting in a
resource conflict.
To address this problem the devices need to be subnodes of the mbigen hardware
module, which then contains the unique register space.
[ tglx: Massaged changelog ]
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ma Jun <majun258@huawei.com>
Cc: jason@lakedaemon.net
Cc: marc.zyngier@arm.com
Cc: Catalin.Marinas@arm.com
Cc: guohanjun@huawei.com
Cc: Will.Deacon@arm.com
Cc: huxinwei@huawei.com
Cc: lizefan@huawei.com
Cc: dingtianhong@huawei.com
Cc: zhaojunhua@hisilicon.com
Cc: liguozhu@hisilicon.com
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20160203111602.GA1234@leverpostej
Link: http://lkml.kernel.org/r/1458203641-17172-2-git-send-email-majun258@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
.../interrupt-controller/hisilicon,mbigen-v2.txt | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt b/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
index 720f7c9..3b2f4c4 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
@@ -21,6 +21,8 @@ Mbigen main node required properties:
- reg: Specifies the base physical address and size of the Mbigen
registers.
+Mbigen sub node required properties:
+------------------------------------------
- interrupt controller: Identifies the node as an interrupt controller
- msi-parent: Specifies the MSI controller this mbigen use.
@@ -45,13 +47,23 @@ Mbigen main node required properties:
Examples:
- mbigen_device_gmac:intc {
+ mbigen_chip_dsa {
compatible = "hisilicon,mbigen-v2";
reg = <0x0 0xc0080000 0x0 0x10000>;
- interrupt-controller;
- msi-parent = <&its_dsa 0x40b1c>;
- num-pins = <9>;
- #interrupt-cells = <2>;
+
+ mbigen_gmac:intc_gmac {
+ interrupt-controller;
+ msi-parent = <&its_dsa 0x40b1c>;
+ num-pins = <9>;
+ #interrupt-cells = <2>;
+ };
+
+ mbigen_i2c:intc_i2c {
+ interrupt-controller;
+ msi-parent = <&its_dsa 0x40b0e>;
+ num-pins = <2>;
+ #interrupt-cells = <2>;
+ };
};
Devices connect to mbigen required properties:
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web