Skip to contentSkip to conversation

ARM: OMAP2+: AM33XX: Misc fixes/updates

PATCH New Vaibhav Bedia 3 participants 17 messages Jan 18, 2013 – Jan 21, 2013

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover ARM: OMAP2+: AM33XX: Misc fixes/updates

Hi,

The following patches were earlier posted as part the AM33XX suspend-resume support series [1]. Based on the suggestion from Santosh Shilimkar <[email protected]> i have split out the changes which update the various data files related to AM33XX support.

These patches apply on top of v3.8-rc3

Regards,
Vaibhav

[1] http://marc.info/?l=linux-arm-kernel&m=135698501821074&w=2

Vaibhav Bedia (9):
ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions
ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset
status bit
ARM: OMAP2+: AM33XX: Update the hardreset API
ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
ARM: OMAP2+: AM33XX: control: Add some control module registers and
APIs

 arch/arm/boot/dts/am33xx.dtsi              |   11 ++++++
 arch/arm/mach-omap2/cm33xx.h               |    9 ++---
 arch/arm/mach-omap2/control.c              |   20 +++++++++++
 arch/arm/mach-omap2/control.h              |   41 +++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod.c           |    5 +--
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   50 ++++++++++++++++------------
 arch/arm/mach-omap2/prm33xx.c              |   11 ++++--
 arch/arm/mach-omap2/prm33xx.h              |    4 ++-
 8 files changed, 115 insertions(+), 36 deletions(-)
#1 lore raw

PATCH 1/9 ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions

Some of the included header files are not needed so remove them.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/cm33xx.h |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/cm33xx.h +1 -6
index 5fa0b62..8009e13 100644
@@ -17,16 +17,11 @@
 #ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
 #define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
 
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/err.h>
-#include <linux/io.h>
-
 #include "common.h"
 
 #include "cm.h"
 #include "cm-regbits-33xx.h"
-#include "cm33xx.h"
+#include "iomap.h"
 
 /* CM base address */
 #define AM33XX_CM_BASE		0x44e00000
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 1/9 ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions

Quoted 21 lines · Vaibhav Bedia

Some of the included header files are not needed so remove them.

---
Change from RFC version:
No change

  arch/arm/mach-omap2/cm33xx.h |    7 +------
  1 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/cm33xx.h +0 -1
index 5fa0b62..8009e13 100644
@@ -17,16 +17,11 @@
  #ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
  #define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
 
-#include <linux/delay.h>

arch/arm/mach-omap2/cm33xx.h line 24

Quoted 10 lines
arch/arm/mach-omap2/cm33xx.h +1 -5
-#include <linux/errno.h>
-#include <linux/err.h>
-#include <linux/io.h>
-
  #include "common.h"
 
  #include "cm.h"
  #include "cm-regbits-33xx.h"
-#include "cm33xx.h"
+#include "iomap.h"

You don't comment on this addition in the changelog...

WBR, Sergei

#3 lore raw

PATCH 1/9 ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions

Quoted 29 lines · Sergei Shtylyov
Quoted 27 lines · Vaibhav Bedia

Some of the included header files are not needed so remove them.

---
Change from RFC version:
No change

  arch/arm/mach-omap2/cm33xx.h |    7 +------
  1 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/cm33xx.h +0 -5
index 5fa0b62..8009e13 100644
@@ -17,16 +17,11 @@
  #ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
  #define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
 
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/err.h>
-#include <linux/io.h>
-
  #include "common.h"
 
Quoted 6 lines

arch/arm/mach-omap2/cm33xx.h line 24

Quoted 4 lines
arch/arm/mach-omap2/cm33xx.h +1 -1
  #include "cm.h"
  #include "cm-regbits-33xx.h"
-#include "cm33xx.h"
+#include "iomap.h"

You don't comment on this addition in the changelog...

Hmm... ok. Will clarify this in the changelog for v2.

Regards,
Vaibhav

#4 lore raw

PATCH 2/9 ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files

In reply to Vaibhav Bedia

This is necessary to ensure that macros declared here can be reused from assembly files.

---
Change from RFC version:
Get rid of extra lines

 arch/arm/mach-omap2/cm33xx.h  |    2 ++
 arch/arm/mach-omap2/prm33xx.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/cm33xx.h +2 -0
index 8009e13..64f4baf 100644
@@ -376,6 +376,7 @@
 #define AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL			AM33XX_CM_REGADDR(AM33XX_CM_CEFUSE_MOD, 0x0020)
 
 
+#ifndef __ASSEMBLER__
 extern bool am33xx_cm_is_clkdm_in_hwsup(s16 inst, u16 cdoffs);
 extern void am33xx_cm_clkdm_enable_hwsup(s16 inst, u16 cdoffs);
 extern void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs);
@@ -412,4 +413,5 @@ static inline int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs,
 }
 #endif
 
+#endif /* ASSEMBLER */
 #endif
arch/arm/mach-omap2/prm33xx.h +2 -0
index 3f25c56..1c40373 100644
@@ -117,6 +117,7 @@
 #define AM33XX_PM_CEFUSE_PWRSTST_OFFSET		0x0004
 #define AM33XX_PM_CEFUSE_PWRSTST		AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004)
 
+#ifndef __ASSEMBLER__
 extern u32 am33xx_prm_read_reg(s16 inst, u16 idx);
 extern void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx);
 extern u32 am33xx_prm_rmw_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
@@ -126,4 +127,5 @@ extern int am33xx_prm_is_hardreset_asserted(u8 shift, s16 inst,
 extern int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs);
 extern int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
 		u16 rstctrl_offs, u16 rstst_offs);
+#endif /* ASSEMBLER */
 #endif
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 3/9 ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod

In reply to Vaibhav Bedia

OCMC RAM lies in the PER power domain and this memory support retention.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   47 ++++++++++++++++------------
 1 files changed, 27 insertions(+), 20 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +27 -20
index 646c14d..8280f11 100644
@@ -414,7 +414,6 @@ static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  *    - cEFUSE (doesn't fall under any ocp_if)
  *    - clkdiv32k
  *    - debugss
- *    - ocmc ram
  *    - ocp watch point
  *    - aes0
  *    - sha0
@@ -481,25 +480,6 @@ static struct omap_hwmod am33xx_debugss_hwmod = {
 	},
 };
 
-/* ocmcram */
-static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
-	.name = "ocmcram",
-};
-
-static struct omap_hwmod am33xx_ocmcram_hwmod = {
-	.name		= "ocmcram",
-	.class		= &am33xx_ocmcram_hwmod_class,
-	.clkdm_name	= "l3_clkdm",
-	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
-	.main_clk	= "l3_gclk",
-	.prcm		= {
-		.omap4	= {
-			.clkctrl_offs	= AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
-			.modulemode	= MODULEMODE_SWCTRL,
-		},
-	},
-};
-
 /* ocpwp */
 static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
 	.name		= "ocpwp",
@@ -570,6 +550,25 @@ static struct omap_hwmod am33xx_sha0_hwmod = {
 
 #endif
 
+/* ocmcram */
+static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
+	.name = "ocmcram",
+};
+
+static struct omap_hwmod am33xx_ocmcram_hwmod = {
+	.name		= "ocmcram",
+	.class		= &am33xx_ocmcram_hwmod_class,
+	.clkdm_name	= "l3_clkdm",
+	.flags		= (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
+	.main_clk	= "l3_gclk",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs	= AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
+			.modulemode	= MODULEMODE_SWCTRL,
+		},
+	},
+};
+
 /* 'smartreflex' class */
 static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
 	.name		= "smartreflex",
@@ -3328,6 +3327,13 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
 	.flags		= OCPIF_SWSUP_IDLE,
 };
 
+/* l3 main -> ocmc */
+static struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
+	.master		= &am33xx_l3_main_hwmod,
+	.slave		= &am33xx_ocmcram_hwmod,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l4_fw__emif_fw,
 	&am33xx_l3_main__emif,
@@ -3398,6 +3404,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__tptc0,
 	&am33xx_l3_main__tptc1,
 	&am33xx_l3_main__tptc2,
+	&am33xx_l3_main__ocmc,
 	&am33xx_l3_s__usbss,
 	&am33xx_l4_hs__cpgmac0,
 	&am33xx_cpgmac0__mdio,
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 4/9 ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags

In reply to Vaibhav Bedia

Third Party Transfer Controller (TPTC0) needs to be idled and put to standby under SW control. Add the appropriate flags in the TPTC0 hwmod entry.

---
Change from RFC version:
Clarify TPTC in the changelog

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +1 -0
index 8280f11..f2f408c 100644
@@ -1823,6 +1823,7 @@ static struct omap_hwmod am33xx_tptc0_hwmod = {
 	.class		= &am33xx_tptc_hwmod_class,
 	.clkdm_name	= "l3_clkdm",
 	.mpu_irqs	= am33xx_tptc0_irqs,
+	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
 	.main_clk	= "l3_gclk",
 	.prcm		= {
 		.omap4	= {
Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 4/9 ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags

Hello.

Quoted 18 lines · Vaibhav Bedia

Third Party Transfer Controller (TPTC0) needs to be idled and put to standby under SW control. Add the appropriate flags in the TPTC0 hwmod entry.

---
Change from RFC version:
Clarify TPTC in the changelog

  arch/arm/mach-omap2/omap_hwmod_33xx_data.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -0
index 8280f11..f2f408c 100644

arch/arm/mach-omap2/omap_hwmod_33xx_data.c static struct omap_hwmod am33xx_tptc0_hwmod = { · line 1826

Quoted 4 lines
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +1 -0
@@ -1823,6 +1823,7 @@ static struct omap_hwmod am33xx_tptc0_hwmod = {
  	.class		= &am33xx_tptc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
  	.mpu_irqs	= am33xx_tptc0_irqs,
+	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),

Parens not needed here.

WBR, Sergei

#8 lore raw

PATCH 4/9 ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags

Quoted 17 lines · Sergei Shtylyov

Hello.

Quoted 12 lines · Vaibhav Bedia

Third Party Transfer Controller (TPTC0) needs to be idled and put to standby under SW control. Add the appropriate flags in the TPTC0 hwmod entry.

---
Change from RFC version:
Clarify TPTC in the changelog

  arch/arm/mach-omap2/omap_hwmod_33xx_data.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines

arch/arm/mach-omap2/omap_hwmod_33xx_data.c static struct omap_hwmod am33xx_tptc0_hwmod = { · line 1826

Quoted 9 lines
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +1 -0
index 8280f11..f2f408c 100644
@@ -1823,6 +1823,7 @@ static struct omap_hwmod am33xx_tptc0_hwmod = {
  	.class		= &am33xx_tptc_hwmod_class,
  	.clkdm_name	= "l3_clkdm",
  	.mpu_irqs	= am33xx_tptc0_irqs,
+	.flags		= (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),

Parens not needed here.

Will drop it in v2.

Regards,
Vaibhav

#9 lore raw

PATCH 5/9 ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry

In reply to Vaibhav Bedia

The current HWMOD code expects the memory region with the IP's SYSCONFIG register to be marked with ADDR_TYPE_RT flag.

CPGMAC0 hwmod entry specifies two memory regions and marks both with the flag ADDR_TYPE_RT although only the 2nd region has the SYSCONFIG register. This leads to the HWMOD code accessing the wrong memory address for idle and standby operations. Fix this by removing the ADDR_TYPE_RT flag from the 1st memory region in CPGMAC0 hwmod entry.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -1
index f2f408c..34a67e4 100644
@@ -2496,7 +2496,6 @@ static struct omap_hwmod_addr_space am33xx_cpgmac0_addr_space[] = {
 	{
 		.pa_start	= 0x4a100000,
 		.pa_end		= 0x4a100000 + SZ_2K - 1,
-		.flags		= ADDR_TYPE_RT,
 	},
 	/* cpsw wr */
 	{
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 6/9 ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit

In reply to Vaibhav Bedia

WKUP-M3 has a reset status bit (RM_WKUP_STST.WKUP_M3_LRST) Update the WKUP-M3 hwmod data to reflect the same.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +1 -0
index 34a67e4..78929a4 100644
@@ -269,6 +269,7 @@ static struct omap_hwmod am33xx_wkup_m3_hwmod = {
 		.omap4	= {
 			.clkctrl_offs	= AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
 			.rstctrl_offs	= AM33XX_RM_WKUP_RSTCTRL_OFFSET,
+			.rstst_offs	= AM33XX_RM_WKUP_RSTST_OFFSET,
 			.modulemode	= MODULEMODE_SWCTRL,
 		},
 	},
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 7/9 ARM: OMAP2+: AM33XX: Update the hardreset API

In reply to Vaibhav Bedia

WKUP-M3 has a reset status bit (RM_WKUP_STST.WKUP_M3_LRST) Update the hardreset API to ensure that the reset line properly deasserted.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/omap_hwmod.c |    5 +----
 arch/arm/mach-omap2/prm33xx.c    |   11 +++++++----
 arch/arm/mach-omap2/prm33xx.h    |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +1 -4
index 4653efb..6549439 100644
@@ -3041,11 +3041,8 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
 static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
 				     struct omap_hwmod_rst_info *ohri)
 {
-	if (ohri->st_shift)
-		pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
-		       oh->name, ohri->name);
-
 	return am33xx_prm_deassert_hardreset(ohri->rst_shift,
+				ohri->st_shift,
 				oh->clkdm->pwrdm.ptr->prcm_offs,
 				oh->prcm.omap4.rstctrl_offs,
 				oh->prcm.omap4.rstst_offs);
arch/arm/mach-omap2/prm33xx.c +7 -4
index 1ac7388..44c0d72 100644
@@ -110,11 +110,11 @@ int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs)
  * -EINVAL upon an argument error, -EEXIST if the submodule was already out
  * of reset, or -EBUSY if the submodule did not exit reset promptly.
  */
-int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
+int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, s16 inst,
 		u16 rstctrl_offs, u16 rstst_offs)
 {
 	int c;
-	u32 mask = 1 << shift;
+	u32 mask = 1 << st_shift;
 
 	/* Check the current status to avoid  de-asserting the line twice */
 	if (am33xx_prm_is_hardreset_asserted(shift, inst, rstctrl_offs) == 0)
@@ -122,11 +122,14 @@ int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
 
 	/* Clear the reset status by writing 1 to the status bit */
 	am33xx_prm_rmw_reg_bits(0xffffffff, mask, inst, rstst_offs);
+
 	/* de-assert the reset control line */
+	mask = 1 << shift;
+
 	am33xx_prm_rmw_reg_bits(mask, 0, inst, rstctrl_offs);
-	/* wait the status to be set */
 
-	omap_test_timeout(am33xx_prm_is_hardreset_asserted(shift, inst,
+	/* wait the status to be set */
+	omap_test_timeout(am33xx_prm_is_hardreset_asserted(st_shift, inst,
 							   rstst_offs),
 			  MAX_MODULE_HARDRESET_WAIT, c);
 
arch/arm/mach-omap2/prm33xx.h +1 -1
index 1c40373..9b9918d 100644
@@ -125,7 +125,7 @@ extern void am33xx_prm_global_warm_sw_reset(void);
 extern int am33xx_prm_is_hardreset_asserted(u8 shift, s16 inst,
 		u16 rstctrl_offs);
 extern int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs);
-extern int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
+extern int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, s16 inst,
 		u16 rstctrl_offs, u16 rstst_offs);
 #endif /* ASSEMBLER */
 #endif
Signature · 1 line
1.7.0.4
#12 lore raw

PATCH 8/9 ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3

In reply to Vaibhav Bedia

Since AM33XX supports only DT-boot, this is needed for the appropriate device nodes to be created.

Note: OCMC RAM is part of the PER power domain and supports retention. The assembly code for low power entry/exit will run from OCMC RAM. To ensure that the OMAP PM code does not attempt to disable the clock to OCMC RAM as part of the suspend process add the no_idle_on_suspend flag.

---
Change from RFC version:
No change

 arch/arm/boot/dts/am33xx.dtsi |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +11 -0
index c2f14e8..4731748 100644
@@ -385,5 +385,16 @@
 				mac-address = [ 00 00 00 00 00 00 ];
 			};
 		};
+
+		ocmcram: ocmcram at 40300000 {
+			compatible = "ti,ocmcram";
+			ti,hwmods = "ocmcram";
+			ti,no_idle_on_suspend;
+		};
+
+		wkup_m3: wkup_m3 at 44d00000 {
+			compatible = "ti,wkup_m3";
+			ti,hwmods = "wkup_m3";
+		};
 	};
 };
Signature · 1 line
1.7.0.4
#13 lore raw

PATCH 9/9 ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs

In reply to Vaibhav Bedia

Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX.

---
Change from RFC version:
No change

 arch/arm/mach-omap2/control.c |   20 ++++++++++++++++++++
 arch/arm/mach-omap2/control.h |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/control.c +20 -0
index 2adb268..c5d54ae 100644
@@ -604,3 +604,23 @@ int omap3_ctrl_save_padconf(void)
 }
 
 #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
+
+#if defined(CONFIG_SOC_AM33XX) && defined(CONFIG_PM)
+void am33xx_txev_eoi(void)
+{
+	omap_ctrl_writel(AM33XX_M3_TXEV_ACK, AM33XX_CONTROL_M3_TXEV_EOI);
+}
+
+void am33xx_txev_enable(void)
+{
+	omap_ctrl_writel(AM33XX_M3_TXEV_ENABLE, AM33XX_CONTROL_M3_TXEV_EOI);
+}
+
+void am33xx_wkup_m3_ipc_cmd(struct am33xx_ipc_data *data)
+{
+	omap_ctrl_writel(data->resume_addr, AM33XX_CONTROL_IPC_MSG_REG0);
+	omap_ctrl_writel(data->sleep_mode, AM33XX_CONTROL_IPC_MSG_REG1);
+	omap_ctrl_writel(data->param1, AM33XX_CONTROL_IPC_MSG_REG2);
+	omap_ctrl_writel(data->param2, AM33XX_CONTROL_IPC_MSG_REG3);
+}
+#endif /* CONFIG_SOC_AM33XX && CONFIG_PM */
arch/arm/mach-omap2/control.h +41 -0

53 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#14 lore raw

cover ARM: OMAP2+: AM33XX: Misc fixes/updates

In reply to Vaibhav Bedia

Hi Paul, Benoit,

Quoted 15 lines · Vaibhav

Hi,

The following patches were earlier posted as part the AM33XX suspend-resume support series [1]. Based on the suggestion from Santosh Shilimkar <[email protected]> i have split out the changes which update the various data files related to AM33XX support.

These patches apply on top of v3.8-rc3

Regards,
Vaibhav

[1] http://marc.info/?l=linux-arm-kernel&m=135698501821074&w=2

Quoted 13 lines

Vaibhav Bedia (9):
ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions
ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset
status bit
ARM: OMAP2+: AM33XX: Update the hardreset API
ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
ARM: OMAP2+: AM33XX: control: Add some control module registers and
APIs

Any comments on these before I resend addressing the comments from Sergei?

Regards,
Vaibhav

#15 lore raw

cover ARM: OMAP2+: AM33XX: Misc fixes/updates

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"V" == Bedia, Vaibhav <[email protected]> writes:

Hi,

Quoted 5 lines
Quoted 5 lines

Vaibhav Bedia (9):
ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions
ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags

Quoted 8 lines
Quoted 8 lines

ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
ARM: OMAP2+: AM33XX: Update the hardreset API
ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs

V> Any comments on these before I resend addressing the comments from Sergei?

Wouldn't the ocmram/wkup dt nodes need a reg property to define their size as I indirectly mentioned here:

http://thread.gmane.org/gmane.linux.ports.arm.omap/91405/focus=92061

Signature · 1 line
Bye, Peter Korsgaard
#16 lore raw

cover ARM: OMAP2+: AM33XX: Misc fixes/updates

Hi Peter,

Quoted 18 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"V" == Bedia, Vaibhav <[email protected]> writes:

Hi,

Quoted 5 lines
Quoted 5 lines

Vaibhav Bedia (9):
ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions
ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags

Quoted 8 lines
Quoted 8 lines

ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
ARM: OMAP2+: AM33XX: Update the hardreset API
ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs

Quoted 7 lines

V> Any comments on these before I resend addressing the comments from Sergei?

Wouldn't the ocmram/wkup dt nodes need a reg property to define their size as I indirectly mentioned here:

http://thread.gmane.org/gmane.linux.ports.arm.omap/91405/focus=92061

My apologies. I missed your comment on that patch and just responded to it. Will add the reg property for the DT nodes in the next version.

Regards,
Vaibhav