Skip to contentSkip to conversation

ARM: AM437x: Add IO wake up support

PATCH Superseded Keerthy 3 participants 13 messages Jul 8, 2015 – Jul 16, 2015

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Keerthy

author
#0 lore raw

v2 cover ARM: AM437x: Add IO wake up support

The patch series adds IO wake up support for AM437x series making use of the existing OMAP4 support. Adds the AM437x specifics.

The series is boot tested on OMAP4 panda, DAR7 evm and AM437x evms.

Changes in v2:

Removed inefficient way of using arrays for irq ack and masks.

Keerthy (6):
ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register
ARM: AM43xx: Add the PRM IRQ register offsets
ARM: dts: AM4372: Add PRCM IRQ entry
ARM: OMAP: PRM: Remove hardcoding of IRQENABLE_MPU_2 and
IRQSTATUS_MPU_2 register offsets
ARM: OMAP4+: PRM: Add AM437x specific data
ARM: PRM: AM437x: Enable IO wakeup feature

 arch/arm/boot/dts/am4372.dtsi     |  1 +
 arch/arm/mach-omap2/prcm-common.h |  1 +
 arch/arm/mach-omap2/prcm43xx.h    |  5 ++++
 arch/arm/mach-omap2/prm44xx.c     | 58 +++++++++++++++++++++++----------------
 arch/arm/mach-omap2/prm_common.c  |  1 +
 5 files changed, 42 insertions(+), 24 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 1/6 ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register

PRM_IO_PMCTRL_OFFSET need not be same for all SOCs hence remove hardcoding and use the value provided by the omap_prcm_irq_setup structure.

---
 arch/arm/mach-omap2/prcm-common.h |  1 +
 arch/arm/mach-omap2/prm44xx.c     | 11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/prcm-common.h +1 -0
index 6ae0b3a..2e60406 100644
@@ -494,6 +494,7 @@ struct omap_prcm_irq {
 struct omap_prcm_irq_setup {
 	u16 ack;
 	u16 mask;
+	u16 pm_ctrl;
 	u8 nr_regs;
 	u8 nr_irqs;
 	const struct omap_prcm_irq *irqs;
arch/arm/mach-omap2/prm44xx.c +6 -5
index 4541700..8149e5a 100644
@@ -45,6 +45,7 @@ static const struct omap_prcm_irq omap4_prcm_irqs[] = {
 static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
 	.ack			= OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
 	.mask			= OMAP4_PRM_IRQENABLE_MPU_OFFSET,
+	.pm_ctrl		= OMAP4_PRM_IO_PMCTRL_OFFSET,
 	.nr_regs		= 2,
 	.irqs			= omap4_prcm_irqs,
 	.nr_irqs		= ARRAY_SIZE(omap4_prcm_irqs),
@@ -306,10 +307,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK,
 				    OMAP4430_WUCLK_CTRL_MASK,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 	omap_test_timeout(
 		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
 		   OMAP4430_WUCLK_STATUS_MASK) >>
 		  OMAP4430_WUCLK_STATUS_SHIFT) == 1),
 		MAX_IOPAD_LATCH_TIME, i);
@@ -319,10 +320,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
 	/* Trigger WUCLKIN disable */
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 	omap_test_timeout(
 		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
 		   OMAP4430_WUCLK_STATUS_MASK) >>
 		  OMAP4430_WUCLK_STATUS_SHIFT) == 0),
 		MAX_IOPAD_LATCH_TIME, i);
@@ -350,7 +351,7 @@ static void __init omap44xx_prm_enable_io_wakeup(void)
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
 				    OMAP4430_GLOBAL_WUEN_MASK,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 }
 
 /**
Signature · 1 line
1.9.1
author
#4 lore raw

PATCH v2 2/6 ARM: AM43xx: Add the PRM IRQ register offsets

In reply to Keerthy

Add the PRM IRQ register offsets.

---
 arch/arm/mach-omap2/prcm43xx.h | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-omap2/prcm43xx.h +5 -0
index 7eebc27..d716d2e 100644
@@ -25,6 +25,10 @@
 #define AM43XX_PRM_WKUP_INST				0x2000
 #define AM43XX_PRM_DEVICE_INST				0x4000
 
+/* PRM_IRQ offsets */
+#define AM43XX_PRM_IRQSTATUS_MPU_OFFSET			0x0004
+#define AM43XX_PRM_IRQENABLE_MPU_OFFSET			0x0008
+
 /* RM RSTCTRL offsets */
 #define AM43XX_RM_PER_RSTCTRL_OFFSET			0x0010
 #define AM43XX_RM_GFX_RSTCTRL_OFFSET			0x0010
@@ -146,6 +150,7 @@
 #define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET		0x04a0
 #define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET		0x0068
 #define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET		0x0070
+#define AM43XX_PRM_IO_PMCTRL_OFFSET			0x0024
 #define AM43XX_CM_PER_EMIF_CLKCTRL_OFFSET		0x0720
 
 #endif
Signature · 1 line
1.9.1
author
#8 lore raw

PATCH v2 3/6 ARM: dts: AM4372: Add PRCM IRQ entry

In reply to Keerthy

Add PRCM IRQ entry.

---
 arch/arm/boot/dts/am4372.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am4372.dtsi +1 -0
index c80a3e2..637133b 100644
@@ -86,6 +86,7 @@
 			prcm: prcm@1f0000 {
 				compatible = "ti,am4-prcm";
 				reg = <0x1f0000 0x11000>;
+				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
 
 				prcm_clocks: clocks {
 					#address-cells = <1>;
Signature · 1 line
1.9.1
author
#9 lore raw

PATCH v2 4/6 ARM: OMAP: PRM: Remove hardcoding of IRQENABLE_MPU_2 and IRQSTATUS_MPU_2 register offsets

In reply to Keerthy

The register offsets of IRQENABLE_MPU_2 and IRQSTATUS_MPU_2 are hardcoded. This makes it difficult to reuse the code for SoCs like AM437x that have a single instance of IRQENABLE_MPU and IRQSTATUS_MPU registers. Hence handling the case using offset of 4 to accommodate single set of IRQ* registers generically.

---
 arch/arm/mach-omap2/prm44xx.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
arch/arm/mach-omap2/prm44xx.c +18 -18
index 8149e5a..f82d89a 100644
@@ -217,11 +217,11 @@ static inline u32 _read_pending_irq_reg(u16 irqen_offs, u16 irqst_offs)
  */
 static void omap44xx_prm_read_pending_irqs(unsigned long *events)
 {
-	events[0] = _read_pending_irq_reg(OMAP4_PRM_IRQENABLE_MPU_OFFSET,
-					  OMAP4_PRM_IRQSTATUS_MPU_OFFSET);
+	int i;
 
-	events[1] = _read_pending_irq_reg(OMAP4_PRM_IRQENABLE_MPU_2_OFFSET,
-					  OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET);
+	for (i = 0; i < omap4_prcm_irq_setup.nr_regs; i++)
+		events[i] = _read_pending_irq_reg(omap4_prcm_irq_setup.mask +
+				i * 4, omap4_prcm_irq_setup.ack + i * 4);
 }
 
 /**
@@ -251,17 +251,15 @@ static void omap44xx_prm_ocp_barrier(void)
  */
 static void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
 {
-	saved_mask[0] =
-		omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
-					OMAP4_PRM_IRQENABLE_MPU_OFFSET);
-	saved_mask[1] =
-		omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
-					OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
+	int i;
 
-	omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
-				 OMAP4_PRM_IRQENABLE_MPU_OFFSET);
-	omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
-				 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
+	for (i = 0; i < omap4_prcm_irq_setup.nr_regs; i++) {
+		saved_mask[i] =
+			omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
+					omap4_prcm_irq_setup.mask + i * 4);
+		omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
+					 omap4_prcm_irq_setup.mask + i * 4);
+	}
 
 	/* OCP barrier */
 	omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
@@ -280,10 +278,12 @@ static void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
  */
 static void omap44xx_prm_restore_irqen(u32 *saved_mask)
 {
-	omap4_prm_write_inst_reg(saved_mask[0], OMAP4430_PRM_OCP_SOCKET_INST,
-				 OMAP4_PRM_IRQENABLE_MPU_OFFSET);
-	omap4_prm_write_inst_reg(saved_mask[1], OMAP4430_PRM_OCP_SOCKET_INST,
-				 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
+	int i;
+
+	for (i = 0; i < omap4_prcm_irq_setup.nr_regs; i++)
+		omap4_prm_write_inst_reg(saved_mask[i],
+				OMAP4430_PRM_OCP_SOCKET_INST,
+				omap4_prcm_irq_setup.mask + i * 4);
 }
 
 /**
Signature · 1 line
1.9.1
author
#11 lore raw

PATCH v2 5/6 ARM: OMAP4+: PRM: Add AM437x specific data

In reply to Keerthy

The register offsets for some of the PRM Registers are different hence populating the differing fields.

---
 arch/arm/mach-omap2/prm44xx.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/prm44xx.c +10 -1
index f82d89a..311d717 100644
@@ -18,13 +18,14 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/of_irq.h>
-
+#include <linux/of.h>
 
 #include "soc.h"
 #include "iomap.h"
 #include "common.h"
 #include "vp.h"
 #include "prm44xx.h"
+#include "prcm43xx.h"
 #include "prm-regbits-44xx.h"
 #include "prcm44xx.h"
 #include "prminst44xx.h"
@@ -720,6 +721,14 @@ int __init omap44xx_prm_init(const struct omap_prcm_init_data *data)
 
 	omap4_prminst_set_prm_dev_inst(data->device_inst_offset);
 
+	/* Add AM437X specific differences */
+	if (of_device_is_compatible(data->np, "ti,am4-prcm")) {
+		omap4_prcm_irq_setup.nr_irqs = 1;
+		omap4_prcm_irq_setup.pm_ctrl = AM43XX_PRM_IO_PMCTRL_OFFSET;
+		omap4_prcm_irq_setup.ack = AM43XX_PRM_IRQSTATUS_MPU_OFFSET;
+		omap4_prcm_irq_setup.mask = AM43XX_PRM_IRQENABLE_MPU_OFFSET;
+	}
+
 	return prm_register(&omap44xx_prm_ll_data);
 }
 
Signature · 1 line
1.9.1
author
#12 lore raw

PATCH v2 6/6 ARM: PRM: AM437x: Enable IO wakeup feature

In reply to Keerthy

Enable IO wakeup feature.

---
 arch/arm/mach-omap2/prm_common.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/prm_common.c +1 -0
index 7add799..1730fc4 100644
@@ -696,6 +696,7 @@ static struct omap_prcm_init_data am4_prm_data __initdata = {
 	.index = TI_CLKM_PRM,
 	.init = omap44xx_prm_init,
 	.device_inst_offset = AM43XX_PRM_DEVICE_INST,
+	.flags = PRM_HAS_IO_WAKEUP,
 };
 #endif
 
Signature · 1 line
1.9.1
maintainer
#2 lore raw

Re: [PATCH v2 1/6] ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register

In reply to Keerthy

Hi

a few minor comments

Quoted 3 lines · Keerthy

PRM_IO_PMCTRL_OFFSET need not be same for all SOCs hence remove hardcoding and use the value provided by the omap_prcm_irq_setup structure.

Please mention here that the reason why you're making this change is to support AM437x.

Quoted 12 lines
---
 arch/arm/mach-omap2/prcm-common.h |  1 +
 arch/arm/mach-omap2/prm44xx.c     | 11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/prcm-common.h +0 -0
index 6ae0b3a..2e60406 100644

arch/arm/mach-omap2/prcm-common.h struct omap_prcm_irq { · line 497

Quoted 4 lines
arch/arm/mach-omap2/prcm-common.h +1 -0
@@ -494,6 +494,7 @@ struct omap_prcm_irq {
 struct omap_prcm_irq_setup {
 	u16 ack;
 	u16 mask;
+	u16 pm_ctrl;

Please add a kerneldoc structure documentation line for this new field, to match the existing documentation here.

Quoted 53 lines
arch/arm/mach-omap2/prcm-common.h +0 -0
 	u8 nr_regs;
 	u8 nr_irqs;
 	const struct omap_prcm_irq *irqs;
arch/arm/mach-omap2/prm44xx.c +6 -5
index 4541700..8149e5a 100644
@@ -45,6 +45,7 @@ static const struct omap_prcm_irq omap4_prcm_irqs[] = {
 static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
 	.ack			= OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
 	.mask			= OMAP4_PRM_IRQENABLE_MPU_OFFSET,
+	.pm_ctrl		= OMAP4_PRM_IO_PMCTRL_OFFSET,
 	.nr_regs		= 2,
 	.irqs			= omap4_prcm_irqs,
 	.nr_irqs		= ARRAY_SIZE(omap4_prcm_irqs),
@@ -306,10 +307,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK,
 				    OMAP4430_WUCLK_CTRL_MASK,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 	omap_test_timeout(
 		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
 		   OMAP4430_WUCLK_STATUS_MASK) >>
 		  OMAP4430_WUCLK_STATUS_SHIFT) == 1),
 		MAX_IOPAD_LATCH_TIME, i);
@@ -319,10 +320,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
 	/* Trigger WUCLKIN disable */
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 	omap_test_timeout(
 		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
 		   OMAP4430_WUCLK_STATUS_MASK) >>
 		  OMAP4430_WUCLK_STATUS_SHIFT) == 0),
 		MAX_IOPAD_LATCH_TIME, i);
@@ -350,7 +351,7 @@ static void __init omap44xx_prm_enable_io_wakeup(void)
 	omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
 				    OMAP4430_GLOBAL_WUEN_MASK,
 				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
 }
 
 /**
Signature · 1 line
1.9.1

- Paul

maintainer
#5 lore raw

Re: [PATCH v2 2/6] ARM: AM43xx: Add the PRM IRQ register offsets

In reply to Keerthy
Quoted 3 lines · Keerthy

Add the PRM IRQ register offsets.

Please add more detail to your commit messages so they conform to Documentation/SubmittingPatches:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n109

For example, this commit message should read something like:

---

ARM: AM43xx: Add the PRM IRQ register offsets

Add the PRM IRQ register offsets. This is needed to support PRM I/O wakeup on AM43xx.

--

Basically, your patches need to provide context as to _why_ the change is needed.

I've fixed the message for this patch, and queued it for v4.3, but please take care with this issue in the future.

- Paul

maintainer
#6 lore raw

Re: [PATCH v2 2/6] ARM: AM43xx: Add the PRM IRQ register offsets

Quoted 20 lines · Paul Walmsley
Quoted 3 lines · Keerthy

Add the PRM IRQ register offsets.

Please add more detail to your commit messages so they conform to Documentation/SubmittingPatches:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n109

For example, this commit message should read something like:

---

ARM: AM43xx: Add the PRM IRQ register offsets

Add the PRM IRQ register offsets. This is needed to support PRM I/O wakeup on AM43xx.

Quoted 7 lines

--

Basically, your patches need to provide context as to _why_ the change is needed.

I've fixed the message for this patch, and queued it for v4.3, but please take care with this issue in the future.

Also I've moved the AM43XX_PRM_IO_PMCTRL_OFFSET macro out of the AM43XX CM section, since it doesn't belong there.

- Paul

maintainer
#10 lore raw

Re: [PATCH v2 4/6] ARM: OMAP: PRM: Remove hardcoding of IRQENABLE_MPU_2 and IRQSTATUS_MPU_2 register offsets

In reply to Keerthy
Quoted 7 lines · Keerthy

The register offsets of IRQENABLE_MPU_2 and IRQSTATUS_MPU_2 are hardcoded. This makes it difficult to reuse the code for SoCs like AM437x that have a single instance of IRQENABLE_MPU and IRQSTATUS_MPU registers. Hence handling the case using offset of 4 to accommodate single set of IRQ* registers generically.

Thanks, queued for v4.3.

- Paul

#3 lore raw

Re: [PATCH v2 1/6] ARM: OMAP4: PRM: Remove hardcoding of PRM_IO_PMCTRL_OFFSET register

In reply to Paul Walmsley

Paul,

Thanks for the review!

Quoted 4 lines · Paul Walmsley

Hi

a few minor comments

Quoted 8 lines
Quoted 3 lines · Keerthy

PRM_IO_PMCTRL_OFFSET need not be same for all SOCs hence remove hardcoding and use the value provided by the omap_prcm_irq_setup structure.

Please mention here that the reason why you're making this change is to support AM437x.

Sure. I will do that.

Quoted 8 lines
Quoted 8 lines
---
  arch/arm/mach-omap2/prcm-common.h |  1 +
  arch/arm/mach-omap2/prm44xx.c     | 11 ++++++-----
  2 files changed, 7 insertions(+), 5 deletions(-)
Quoted 12 lines

arch/arm/mach-omap2/prcm-common.h struct omap_prcm_irq { · line 497

Quoted 9 lines
arch/arm/mach-omap2/prcm-common.h +1 -0
index 6ae0b3a..2e60406 100644
@@ -494,6 +494,7 @@ struct omap_prcm_irq {
  struct omap_prcm_irq_setup {
  	u16 ack;
  	u16 mask;
+	u16 pm_ctrl;

Please add a kerneldoc structure documentation line for this new field, to match the existing documentation here.

Okay.

Quoted 58 lines
Quoted 52 lines
arch/arm/mach-omap2/prcm-common.h +0 -0
  	u8 nr_regs;
  	u8 nr_irqs;
  	const struct omap_prcm_irq *irqs;
arch/arm/mach-omap2/prm44xx.c +6 -6
index 4541700..8149e5a 100644
@@ -45,6 +45,7 @@ static const struct omap_prcm_irq omap4_prcm_irqs[] = {
  static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
  	.ack			= OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
  	.mask			= OMAP4_PRM_IRQENABLE_MPU_OFFSET,
+	.pm_ctrl		= OMAP4_PRM_IO_PMCTRL_OFFSET,
  	.nr_regs		= 2,
  	.irqs			= omap4_prcm_irqs,
  	.nr_irqs		= ARRAY_SIZE(omap4_prcm_irqs),
@@ -306,10 +307,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
  	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK,
  				    OMAP4430_WUCLK_CTRL_MASK,
  				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
  	omap_test_timeout(
  		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
  		   OMAP4430_WUCLK_STATUS_MASK) >>
  		  OMAP4430_WUCLK_STATUS_SHIFT) == 1),
  		MAX_IOPAD_LATCH_TIME, i);
@@ -319,10 +320,10 @@ static void omap44xx_prm_reconfigure_io_chain(void)
  	/* Trigger WUCLKIN disable */
  	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
  				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
  	omap_test_timeout(
  		(((omap4_prm_read_inst_reg(inst,
-					   OMAP4_PRM_IO_PMCTRL_OFFSET) &
+					   omap4_prcm_irq_setup.pm_ctrl) &
  		   OMAP4430_WUCLK_STATUS_MASK) >>
  		  OMAP4430_WUCLK_STATUS_SHIFT) == 0),
  		MAX_IOPAD_LATCH_TIME, i);
@@ -350,7 +351,7 @@ static void __init omap44xx_prm_enable_io_wakeup(void)
  	omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
  				    OMAP4430_GLOBAL_WUEN_MASK,
  				    inst,
-				    OMAP4_PRM_IO_PMCTRL_OFFSET);
+				    omap4_prcm_irq_setup.pm_ctrl);
  }
 
  /**
--
Quoted 2 lines

1.9.1

- Paul

#7 lore raw

Re: [PATCH v2 2/6] ARM: AM43xx: Add the PRM IRQ register offsets

In reply to Paul Walmsley
Quoted 24 lines · Paul Walmsley
Quoted 22 lines · Paul Walmsley
Quoted 3 lines · Keerthy

Add the PRM IRQ register offsets.

Please add more detail to your commit messages so they conform to Documentation/SubmittingPatches:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n109

For example, this commit message should read something like:

---

ARM: AM43xx: Add the PRM IRQ register offsets

Add the PRM IRQ register offsets. This is needed to support PRM I/O wakeup on AM43xx.

--

Quoted 8 lines
Quoted 5 lines

Basically, your patches need to provide context as to _why_ the change is needed.

I've fixed the message for this patch, and queued it for v4.3, but please take care with this issue in the future.

Also I've moved the AM43XX_PRM_IO_PMCTRL_OFFSET macro out of the AM43XX CM section, since it doesn't belong there.

Thanks Paul!

Quoted 4 lines

- Paul