* [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core
@ 2017-12-26 2:36 Jeffy Chen
2017-12-26 2:36 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
2017-12-27 0:44 ` [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
0 siblings, 2 replies; 6+ messages in thread
From: Jeffy Chen @ 2017-12-26 2:36 UTC (permalink / raw)
To: linux-arm-kernel
Currently we are handling wake irq in mrvl wifi driver. Move it into
pci core.
Tested on my chromebook bob(with cros 4.4 kernel and mrvl wifi).
Changes in v13:
Fix compiler error reported by kbuild test robot <fengguang.wu@intel.com>
Changes in v12:
Only add irq definitions for PCI devices and rewrite the commit message.
Enable the wake irq in noirq stage to avoid possible irq storm.
Changes in v11:
Address Brian's comments.
Only support 1-per-device PCIe WAKE# pin as suggested.
Move to pcie port as Brian suggested.
Changes in v10:
Use device_set_wakeup_capable() instead of device_set_wakeup_enable(),
since dedicated wakeirq will be lost in device_set_wakeup_enable(false).
Changes in v9:
Add section for PCI devices and rewrite the commit message.
Fix check error in .cleanup().
Move dedicated wakeirq setup to setup() callback and use
device_set_wakeup_enable() to enable/disable.
Rewrite the commit message.
Changes in v8:
Add optional "pci", and rewrite commit message.
Add pci-of.c and use platform_pm_ops to handle the PCIe WAKE# signal.
Rewrite the commit message.
Changes in v7:
Move PCIE_WAKE handling into pci core.
Changes in v6:
Fix device_init_wake error handling, and add some comments.
Changes in v5:
Move to pci.txt
Rebase.
Use "wakeup" instead of "wake"
Changes in v3:
Fix error handling.
Changes in v2:
Use dev_pm_set_dedicated_wake_irq.
Jeffy Chen (5):
dt-bindings: PCI: Add definition of PCIe WAKE# irq and PCI irq
of/irq: Adjust of_pci_irq parsing for multiple interrupts
mwifiex: Disable wakeup irq handling for pcie
PCI / PM: Add support for the PCIe WAKE# signal for OF
arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
Documentation/devicetree/bindings/pci/pci.txt | 10 ++++
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 11 ++--
drivers/net/wireless/marvell/mwifiex/main.c | 4 ++
drivers/of/of_pci_irq.c | 71 +++++++++++++++++++++++--
drivers/pci/Makefile | 1 +
drivers/pci/pci-driver.c | 10 ++++
drivers/pci/pci-of.c | 75 +++++++++++++++++++++++++++
include/linux/of_pci.h | 9 ++++
8 files changed, 183 insertions(+), 8 deletions(-)
create mode 100644 drivers/pci/pci-of.c
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
2017-12-26 2:36 [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
@ 2017-12-26 2:36 ` Jeffy Chen
2017-12-29 17:55 ` Tony Lindgren
2017-12-27 0:44 ` [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
1 sibling, 1 reply; 6+ messages in thread
From: Jeffy Chen @ 2017-12-26 2:36 UTC (permalink / raw)
To: linux-arm-kernel
Currently we are handling PCIe WAKE# irq in mrvl wifi driver.
Move it to rockchip pcie port since we are going to handle it in the
pci core.
Also avoid this irq been considered as the PCI interrupt pin in the
of_irq_parse_pci().
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v13: None
Changes in v12: None
Changes in v11:
Move to pcie port as Brian suggested.
Changes in v10: None
Changes in v9:
Rewrite the commit message.
Changes in v8:
Rewrite the commit message.
Changes in v7: None
Changes in v6: None
Changes in v5:
Use "wakeup" instead of "wake"
Changes in v3: None
Changes in v2: None
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index 03f195025390..be41d363efd8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -719,15 +719,16 @@ ap_i2c_audio: &i2c8 {
#size-cells = <2>;
ranges;
+ interrupts-extended = <&pcie0 1>, <&gpio0 8 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "pci", "wakeup";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlan_host_wake_l>;
+ wakeup-source;
+
mvl_wifi: wifi at 0,0 {
compatible = "pci1b4b,2b42";
reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
0x83010000 0x0 0x00100000 0x0 0x00100000>;
- interrupt-parent = <&gpio0>;
- interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&wlan_host_wake_l>;
- wakeup-source;
};
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
2017-12-26 2:36 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
@ 2017-12-29 17:55 ` Tony Lindgren
2017-12-30 0:10 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2017-12-29 17:55 UTC (permalink / raw)
To: linux-arm-kernel
* Jeffy Chen <jeffy.chen@rock-chips.com> [171226 02:41]:
> Currently we are handling PCIe WAKE# irq in mrvl wifi driver.
>
> Move it to rockchip pcie port since we are going to handle it in the
> pci core.
Yes in the PCIe case, the pcie port node is the right place for
the wakeirq instead of the child the mvl_wifi node. So one
question further down below to verify this..
> Also avoid this irq been considered as the PCI interrupt pin in the
> of_irq_parse_pci().
The above paragraph needs a bit more clarification to be
readable :)
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> @@ -719,15 +719,16 @@ ap_i2c_audio: &i2c8 {
> #size-cells = <2>;
> ranges;
>
> + interrupts-extended = <&pcie0 1>, <&gpio0 8 IRQ_TYPE_LEVEL_LOW>;
> + interrupt-names = "pci", "wakeup";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wlan_host_wake_l>;
> + wakeup-source;
> +
> mvl_wifi: wifi at 0,0 {
> compatible = "pci1b4b,2b42";
> reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
> 0x83010000 0x0 0x00100000 0x0 0x00100000>;
> - interrupt-parent = <&gpio0>;
> - interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
> - pinctrl-names = "default";
> - pinctrl-0 = <&wlan_host_wake_l>;
> - wakeup-source;
> };
> };
> };
So the above modifies pcie at 0,0 node. And that node describes
the particular PCIe port that the WLAN is connected to instead
of describing the whole PCIe controller device, right?
If so, then yeah it's totally where the wakeirq should be
defined for a PCIe device in the dts file :)
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread* [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
2017-12-29 17:55 ` Tony Lindgren
@ 2017-12-30 0:10 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-12-30 0:10 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Dec 29, 2017 at 6:55 PM, Tony Lindgren <tony@atomide.com> wrote:
> * Jeffy Chen <jeffy.chen@rock-chips.com> [171226 02:41]:
>> Currently we are handling PCIe WAKE# irq in mrvl wifi driver.
>>
>> Move it to rockchip pcie port since we are going to handle it in the
>> pci core.
>
> Yes in the PCIe case, the pcie port node is the right place for
> the wakeirq instead of the child the mvl_wifi node. So one
> question further down below to verify this..
You seem to be using a convention by which the port represents the
whole "slot" or "PCI device" (as an entity consisting of up to 8
functions) connected to it.
That is fair enough as long as the port is not the top of a more
complex branch of the PCIe hierarchy, so maybe that case needs to be
made special somehow?
Also, I would document the convention by mentioning that the wakeup
signaled via that interrupt doesn't apply to the port itself, but to
the functions (endpoints) below it.
>> Also avoid this irq been considered as the PCI interrupt pin in the
>> of_irq_parse_pci().
>
> The above paragraph needs a bit more clarification to be
> readable :)
>
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
>> @@ -719,15 +719,16 @@ ap_i2c_audio: &i2c8 {
>> #size-cells = <2>;
>> ranges;
>>
>> + interrupts-extended = <&pcie0 1>, <&gpio0 8 IRQ_TYPE_LEVEL_LOW>;
>> + interrupt-names = "pci", "wakeup";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&wlan_host_wake_l>;
>> + wakeup-source;
>> +
>> mvl_wifi: wifi at 0,0 {
>> compatible = "pci1b4b,2b42";
>> reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
>> 0x83010000 0x0 0x00100000 0x0 0x00100000>;
>> - interrupt-parent = <&gpio0>;
>> - interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
>> - pinctrl-names = "default";
>> - pinctrl-0 = <&wlan_host_wake_l>;
>> - wakeup-source;
>> };
>> };
>> };
>
> So the above modifies pcie at 0,0 node. And that node describes
> the particular PCIe port that the WLAN is connected to instead
> of describing the whole PCIe controller device, right?
>
> If so, then yeah it's totally where the wakeirq should be
> defined for a PCIe device in the dts file :)
As long as the convention used here is clear to everybody, that is.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core
2017-12-26 2:36 [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
2017-12-26 2:36 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
@ 2017-12-27 0:44 ` Rafael J. Wysocki
1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-12-27 0:44 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday, December 26, 2017 3:36:41 AM CET Jeffy Chen wrote:
>
> Currently we are handling wake irq in mrvl wifi driver. Move it into
> pci core.
>
> Tested on my chromebook bob(with cros 4.4 kernel and mrvl wifi).
>
>
> Changes in v13:
> Fix compiler error reported by kbuild test robot <fengguang.wu@intel.com>
>
> Changes in v12:
> Only add irq definitions for PCI devices and rewrite the commit message.
> Enable the wake irq in noirq stage to avoid possible irq storm.
>
> Changes in v11:
> Address Brian's comments.
> Only support 1-per-device PCIe WAKE# pin as suggested.
> Move to pcie port as Brian suggested.
>
> Changes in v10:
> Use device_set_wakeup_capable() instead of device_set_wakeup_enable(),
> since dedicated wakeirq will be lost in device_set_wakeup_enable(false).
>
> Changes in v9:
> Add section for PCI devices and rewrite the commit message.
> Fix check error in .cleanup().
> Move dedicated wakeirq setup to setup() callback and use
> device_set_wakeup_enable() to enable/disable.
> Rewrite the commit message.
>
> Changes in v8:
> Add optional "pci", and rewrite commit message.
> Add pci-of.c and use platform_pm_ops to handle the PCIe WAKE# signal.
> Rewrite the commit message.
>
> Changes in v7:
> Move PCIE_WAKE handling into pci core.
>
> Changes in v6:
> Fix device_init_wake error handling, and add some comments.
>
> Changes in v5:
> Move to pci.txt
> Rebase.
> Use "wakeup" instead of "wake"
>
> Changes in v3:
> Fix error handling.
>
> Changes in v2:
> Use dev_pm_set_dedicated_wake_irq.
>
> Jeffy Chen (5):
> dt-bindings: PCI: Add definition of PCIe WAKE# irq and PCI irq
> of/irq: Adjust of_pci_irq parsing for multiple interrupts
> mwifiex: Disable wakeup irq handling for pcie
> PCI / PM: Add support for the PCIe WAKE# signal for OF
> arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
>
> Documentation/devicetree/bindings/pci/pci.txt | 10 ++++
> arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 11 ++--
> drivers/net/wireless/marvell/mwifiex/main.c | 4 ++
> drivers/of/of_pci_irq.c | 71 +++++++++++++++++++++++--
> drivers/pci/Makefile | 1 +
> drivers/pci/pci-driver.c | 10 ++++
> drivers/pci/pci-of.c | 75 +++++++++++++++++++++++++++
> include/linux/of_pci.h | 9 ++++
> 8 files changed, 183 insertions(+), 8 deletions(-)
> create mode 100644 drivers/pci/pci-of.c
I'm going to ignore this version till the discussion on the previous one is
over.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core
@ 2017-12-26 2:08 Jeffy Chen
2017-12-26 2:08 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
0 siblings, 1 reply; 6+ messages in thread
From: Jeffy Chen @ 2017-12-26 2:08 UTC (permalink / raw)
To: linux-arm-kernel
Currently we are handling wake irq in mrvl wifi driver. Move it into
pci core.
Tested on my chromebook bob(with cros 4.4 kernel and mrvl wifi).
Changes in v12:
Enable the wake irq in noirq stage to avoid possible irq storm.
Changes in v11:
Only add irq definitions for PCI devices and rewrite the commit message.
Address Brian's comments.
Only support 1-per-device PCIe WAKE# pin as suggested.
Move to pcie port as Brian suggested.
Changes in v10:
Use device_set_wakeup_capable() instead of device_set_wakeup_enable(),
since dedicated wakeirq will be lost in device_set_wakeup_enable(false).
Changes in v9:
Add section for PCI devices and rewrite the commit message.
Fix check error in .cleanup().
Move dedicated wakeirq setup to setup() callback and use
device_set_wakeup_enable() to enable/disable.
Rewrite the commit message.
Changes in v8:
Add optional "pci", and rewrite commit message.
Add pci-of.c and use platform_pm_ops to handle the PCIe WAKE# signal.
Rewrite the commit message.
Changes in v7:
Move PCIE_WAKE handling into pci core.
Changes in v6:
Fix device_init_wake error handling, and add some comments.
Changes in v5:
Move to pci.txt
Rebase.
Use "wakeup" instead of "wake"
Changes in v3:
Fix error handling.
Changes in v2:
Use dev_pm_set_dedicated_wake_irq.
Jeffy Chen (5):
dt-bindings: PCI: Add definition of PCIe WAKE# irq and PCI irq
of/irq: Adjust of_pci_irq parsing for multiple interrupts
mwifiex: Disable wakeup irq handling for pcie
PCI / PM: Add support for the PCIe WAKE# signal for OF
arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
Documentation/devicetree/bindings/pci/pci.txt | 10 ++++
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 11 ++--
drivers/net/wireless/marvell/mwifiex/main.c | 4 ++
drivers/of/of_pci_irq.c | 74 ++++++++++++++++++++++++--
drivers/pci/Makefile | 1 +
drivers/pci/pci-driver.c | 10 ++++
drivers/pci/pci-of.c | 75 +++++++++++++++++++++++++++
include/linux/of_pci.h | 9 ++++
8 files changed, 186 insertions(+), 8 deletions(-)
create mode 100644 drivers/pci/pci-of.c
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru
2017-12-26 2:08 Jeffy Chen
@ 2017-12-26 2:08 ` Jeffy Chen
0 siblings, 0 replies; 6+ messages in thread
From: Jeffy Chen @ 2017-12-26 2:08 UTC (permalink / raw)
To: linux-arm-kernel
Currently we are handling PCIe WAKE# irq in mrvl wifi driver.
Move it to rockchip pcie port since we are going to handle it in the
pci core.
Also avoid this irq been considered as the PCI interrupt pin in the
of_irq_parse_pci().
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v12: None
Changes in v11:
Move to pcie port as Brian suggested.
Changes in v10: None
Changes in v9:
Rewrite the commit message.
Changes in v8:
Rewrite the commit message.
Changes in v7: None
Changes in v6: None
Changes in v5:
Use "wakeup" instead of "wake"
Changes in v3: None
Changes in v2: None
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index 03f195025390..be41d363efd8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -719,15 +719,16 @@ ap_i2c_audio: &i2c8 {
#size-cells = <2>;
ranges;
+ interrupts-extended = <&pcie0 1>, <&gpio0 8 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "pci", "wakeup";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlan_host_wake_l>;
+ wakeup-source;
+
mvl_wifi: wifi at 0,0 {
compatible = "pci1b4b,2b42";
reg = <0x83010000 0x0 0x00000000 0x0 0x00100000
0x83010000 0x0 0x00100000 0x0 0x00100000>;
- interrupt-parent = <&gpio0>;
- interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&wlan_host_wake_l>;
- wakeup-source;
};
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-30 0:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 2:36 [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
2017-12-26 2:36 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
2017-12-29 17:55 ` Tony Lindgren
2017-12-30 0:10 ` Rafael J. Wysocki
2017-12-27 0:44 ` [RFC PATCH v12 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2017-12-26 2:08 Jeffy Chen
2017-12-26 2:08 ` [RFC PATCH v12 5/5] arm64: dts: rockchip: Move PCIe WAKE# irq to pcie port for Gru Jeffy Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox