* [PATCH v3 1/9] ARM: OMAP2+: AM33XX: CM: Get rid of unnecessary header inclusions
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 2/9] ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files Vaibhav Bedia
` (9 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
cm33xx.h unnecessarily includes a lot of header files.
Get rid of these and directly include "iomap.h" which
is needed to keep things compiling.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: Reword the changelog
arch/arm/mach-omap2/cm33xx.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 5fa0b62..8009e13 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -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
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 2/9] ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 1/9] ARM: OMAP2+: AM33XX: CM: Get rid of unnecessary header inclusions Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 3/9] ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod Vaibhav Bedia
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
This is necessary to ensure that macros declared here can
be reused from assembly files.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change
arch/arm/mach-omap2/cm33xx.h | 2 ++
arch/arm/mach-omap2/prm33xx.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 8009e13..64f4baf 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -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
diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
index 3f25c56..1c40373 100644
--- a/arch/arm/mach-omap2/prm33xx.h
+++ b/arch/arm/mach-omap2/prm33xx.h
@@ -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
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 3/9] ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 1/9] ARM: OMAP2+: AM33XX: CM: Get rid of unnecessary header inclusions Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 2/9] ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 4/9] ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags Vaibhav Bedia
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
OCMC RAM lies in the PER power domain and this memory
support retention.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 47 +++++++++++++++++-------------
1 file changed, 27 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 646c14d..8280f11 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -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,
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 4/9] ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (2 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 3/9] ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 5/9] ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry Vaibhav Bedia
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: Drop unnecessary parens
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 8280f11..94254e8 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -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 = {
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 5/9] ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (3 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 4/9] ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 6/9] ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit Vaibhav Bedia
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 94254e8..40bfde3 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -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 */
{
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 6/9] ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (4 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 5/9] ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 7/9] ARM: OMAP2+: AM33XX: Update the hardreset API Vaibhav Bedia
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
WKUP-M3 has a reset status bit (RM_WKUP_STST.WKUP_M3_LRST)
Update the WKUP-M3 hwmod data to reflect the same.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 40bfde3..9e34d4c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -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,
},
},
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 7/9] ARM: OMAP2+: AM33XX: Update the hardreset API
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (5 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 6/9] ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 8/9] ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3 Vaibhav Bedia
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: 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(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4653efb..6549439 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -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);
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index 1ac7388..44c0d72 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -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);
diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
index 1c40373..9b9918d 100644
--- a/arch/arm/mach-omap2/prm33xx.h
+++ b/arch/arm/mach-omap2/prm33xx.h
@@ -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
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 8/9] ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (6 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 7/9] ARM: OMAP2+: AM33XX: Update the hardreset API Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-01-29 11:15 ` [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs Vaibhav Bedia
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Update the compatible field as mentioned by Peter and his Acked-by
v2: Add reg property
arch/arm/boot/dts/am33xx.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index c2f14e8..0957645 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -385,5 +385,19 @@
mac-address = [ 00 00 00 00 00 00 ];
};
};
+
+ ocmcram: ocmcram at 40300000 {
+ compatible = "ti,am3352-ocmcram";
+ reg = <0x40300000 0x10000>;
+ ti,hwmods = "ocmcram";
+ ti,no_idle_on_suspend;
+ };
+
+ wkup_m3: wkup_m3 at 44d00000 {
+ compatible = "ti,am3353-wkup-m3";
+ reg = <0x44d00000 0x4000 /* M3 UMEM */
+ 0x44d80000 0x2000>; /* M3 DMEM */
+ ti,hwmods = "wkup_m3";
+ };
};
};
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (7 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 8/9] ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3 Vaibhav Bedia
@ 2013-01-29 11:15 ` Vaibhav Bedia
2013-02-08 14:17 ` Paul Walmsley
2013-01-29 11:27 ` [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Santosh Shilimkar
2013-02-08 14:28 ` Paul Walmsley
10 siblings, 1 reply; 15+ messages in thread
From: Vaibhav Bedia @ 2013-01-29 11:15 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change
arch/arm/mach-omap2/control.c | 20 ++++++++++++++++++++
arch/arm/mach-omap2/control.h | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+)
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 2adb268..c5d54ae 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -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 */
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index e6c3281..cb85f0a 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -358,6 +358,37 @@
#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2
#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22)
+#define AM33XX_DDR_IO_CTRL 0x0E04
+#define AM33XX_VTP0_CTRL_REG 0x0E0C
+
+/* AM33XX VTP0_CTRL_REG bits */
+#define AM33XX_VTP_CTRL_START_EN (1 << 0)
+#define AM33XX_VTP_CTRL_LOCK_EN (1 << 4)
+#define AM33XX_VTP_CTRL_READY (1 << 5)
+#define AM33XX_VTP_CTRL_ENABLE (1 << 6)
+
+/* AM33XX M3_TXEV_EOI register */
+#define AM33XX_CONTROL_M3_TXEV_EOI 0x1324
+
+#define AM33XX_M3_TXEV_ACK (0x1 << 0)
+#define AM33XX_M3_TXEV_ENABLE (0x0 << 0)
+
+/* AM33XX IPC message registers */
+#define AM33XX_CONTROL_IPC_MSG_REG0 0x1328
+#define AM33XX_CONTROL_IPC_MSG_REG1 0x132C
+#define AM33XX_CONTROL_IPC_MSG_REG2 0x1330
+#define AM33XX_CONTROL_IPC_MSG_REG3 0x1334
+#define AM33XX_CONTROL_IPC_MSG_REG4 0x1338
+#define AM33XX_CONTROL_IPC_MSG_REG5 0x133C
+#define AM33XX_CONTROL_IPC_MSG_REG6 0x1340
+#define AM33XX_CONTROL_IPC_MSG_REG7 0x1344
+
+#define AM33XX_DDR_CMD0_IOCTRL 0x1404
+#define AM33XX_DDR_CMD1_IOCTRL 0x1408
+#define AM33XX_DDR_CMD2_IOCTRL 0x140C
+#define AM33XX_DDR_DATA0_IOCTRL 0x1440
+#define AM33XX_DDR_DATA1_IOCTRL 0x1444
+
/* CONTROL OMAP STATUS register to identify OMAP3 features */
#define OMAP3_CONTROL_OMAP_STATUS 0x044c
@@ -417,6 +448,16 @@ extern void omap3630_ctrl_disable_rta(void);
extern int omap3_ctrl_save_padconf(void);
extern void omap2_set_globals_control(void __iomem *ctrl,
void __iomem *ctrl_pad);
+struct am33xx_ipc_data {
+ u32 resume_addr;
+ u32 param1;
+ u32 param2;
+ u32 sleep_mode;
+};
+extern void am33xx_wkup_m3_ipc_cmd(struct am33xx_ipc_data *data);
+extern void am33xx_txev_eoi(void);
+extern void am33xx_txev_enable(void);
+
#else
#define omap_ctrl_base_get() 0
#define omap_ctrl_readb(x) 0
--
1.8.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
2013-01-29 11:15 ` [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs Vaibhav Bedia
@ 2013-02-08 14:17 ` Paul Walmsley
2013-02-11 5:10 ` Bedia, Vaibhav
0 siblings, 1 reply; 15+ messages in thread
From: Paul Walmsley @ 2013-02-08 14:17 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vaibhav,
a comment on this one:
On Tue, 29 Jan 2013, Vaibhav Bedia wrote:
> 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.
>
> Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
> ---
> v3: Add Peter's Acked-by
> v2: No change
>
> arch/arm/mach-omap2/control.c | 20 ++++++++++++++++++++
> arch/arm/mach-omap2/control.h | 41 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 61 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
> index 2adb268..c5d54ae 100644
> --- a/arch/arm/mach-omap2/control.c
> +++ b/arch/arm/mach-omap2/control.c
> @@ -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);
> +}
Could you please add some kerneldoc-style comments to these functions so
others can understand what they're intended to do, any side-effects they
have, any prerequisites, etc.?
- Paul
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
2013-02-08 14:17 ` Paul Walmsley
@ 2013-02-11 5:10 ` Bedia, Vaibhav
0 siblings, 0 replies; 15+ messages in thread
From: Bedia, Vaibhav @ 2013-02-11 5:10 UTC (permalink / raw)
To: linux-arm-kernel
Hi Paul,
On Fri, Feb 08, 2013 at 19:47:04, Paul Walmsley wrote:
> Hi Vaibhav,
>
> a comment on this one:
>
> On Tue, 29 Jan 2013, Vaibhav Bedia wrote:
>
> > 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.
> >
> > Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
> > Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
> > ---
> > v3: Add Peter's Acked-by
> > v2: No change
> >
> > arch/arm/mach-omap2/control.c | 20 ++++++++++++++++++++
> > arch/arm/mach-omap2/control.h | 41 +++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 61 insertions(+)
> >
> > diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
> > index 2adb268..c5d54ae 100644
> > --- a/arch/arm/mach-omap2/control.c
> > +++ b/arch/arm/mach-omap2/control.c
> > @@ -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);
> > +}
>
> Could you please add some kerneldoc-style comments to these functions so
> others can understand what they're intended to do, any side-effects they
> have, any prerequisites, etc.?
>
Sure. Will do that in the next version and post it separately.
Thanks,
Vaibhav
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (8 preceding siblings ...)
2013-01-29 11:15 ` [PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs Vaibhav Bedia
@ 2013-01-29 11:27 ` Santosh Shilimkar
2013-01-29 11:32 ` Bedia, Vaibhav
2013-02-08 14:28 ` Paul Walmsley
10 siblings, 1 reply; 15+ messages in thread
From: Santosh Shilimkar @ 2013-01-29 11:27 UTC (permalink / raw)
To: linux-arm-kernel
Vaibhav,
On Tuesday 29 January 2013 04:44 PM, Vaibhav Bedia wrote:
> Hi,
>
> The following patches were earlier posted as part the AM33XX
> suspend-resume support series [1]. Based on the suggestion
> from Santosh Shilimkar <santosh.shilimkar@ti.com> i have split
> out the changes which update the various data files related
> to AM33XX support.
>
> These patches apply on top of v3.8-rc5
>
> v1->v2: Address the comments received from Sergei Shtylyov
> and Peter Korsgaard.
>
> v2->v3: Address an additional comment from Peter Korgaard
> and add his Acked-by to the patches
>
Just a suggestion here...
I saw v2 of $subject series just today morning and in just
few hours, I see v3 as well. You should at least let v2 settle
down for a while :-)
Collecting tags and minor update can always be done once you
gather sufficient comments to warrant a re-spin.
Regards,
Santosh
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates
2013-01-29 11:27 ` [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Santosh Shilimkar
@ 2013-01-29 11:32 ` Bedia, Vaibhav
0 siblings, 0 replies; 15+ messages in thread
From: Bedia, Vaibhav @ 2013-01-29 11:32 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 29, 2013 at 16:57:04, Shilimkar, Santosh wrote:
> Vaibhav,
>
> On Tuesday 29 January 2013 04:44 PM, Vaibhav Bedia wrote:
> > Hi,
> >
> > The following patches were earlier posted as part the AM33XX
> > suspend-resume support series [1]. Based on the suggestion
> > from Santosh Shilimkar <santosh.shilimkar@ti.com> i have split
> > out the changes which update the various data files related
> > to AM33XX support.
> >
> > These patches apply on top of v3.8-rc5
> >
> > v1->v2: Address the comments received from Sergei Shtylyov
> > and Peter Korsgaard.
> >
> > v2->v3: Address an additional comment from Peter Korgaard
> > and add his Acked-by to the patches
> >
> Just a suggestion here...
>
> I saw v2 of $subject series just today morning and in just
> few hours, I see v3 as well. You should at least let v2 settle
> down for a while :-)
> Collecting tags and minor update can always be done once you
> gather sufficient comments to warrant a re-spin.
>
OK. v1 has been in the wild for more than 10 days without any
more comments so I went aggressive on v3 :)
Regards,
Vaibhav
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates
2013-01-29 11:14 [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Vaibhav Bedia
` (9 preceding siblings ...)
2013-01-29 11:27 ` [PATCH v3 0/9] ARM: OMAP2+: AM33XX: Misc fixes/updates Santosh Shilimkar
@ 2013-02-08 14:28 ` Paul Walmsley
10 siblings, 0 replies; 15+ messages in thread
From: Paul Walmsley @ 2013-02-08 14:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, 29 Jan 2013, Vaibhav Bedia wrote:
> The following patches were earlier posted as part the AM33XX
> suspend-resume support series [1]. Based on the suggestion
> from Santosh Shilimkar <santosh.shilimkar@ti.com> i have split
> out the changes which update the various data files related
> to AM33XX support.
Thanks, queued patches 1-8. 9 looks reasonable to me once documentation
is added. One caveat is that I'm unable to test these patches at the
moment due to the appended DTB issue here, but they seem pretty
straightforward.
- Paul
^ permalink raw reply [flat|nested] 15+ messages in thread