RE: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of jean.pi...@newoldbits.com Sent: Friday, December 17, 2010 3:38 PM To: linux-omap@vger.kernel.org Cc: khil...@deeprootsystems.com; linux-arm-ker...@lists.infradead.org; Jean Pihet Subject: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses From: Jean Pihet j-pi...@ti.com The SRAM PA addresses are locally defined and used at different places, i.e. SRAM management code and idle sleep code. The macros are now defined at a centralized place, for easier maintenance. Tested on N900 and Beagleboard with full RET and OFF modes, using cpuidle and suspend. Signed-off-by: Jean Pihet j-pi...@ti.com Acked-by: Santosh Shilimkar santosh.shilim...@ti.com --- arch/arm/mach-omap2/sdrc.h |1 - arch/arm/mach-omap2/sleep34xx.S|1 + arch/arm/plat-omap/include/plat/sram.h | 11 +++ arch/arm/plat-omap/sram.c |7 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 68f57bb..b3f8379 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -74,5 +74,4 @@ static inline u32 sms_read_reg(u16 reg) */ #define SDRC_MPURATE_LOOPS 96 - #endif diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach- omap2/sleep34xx.S index 2191576..406cd2a 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S @@ -26,6 +26,7 @@ */ #include linux/linkage.h #include asm/assembler.h +#include plat/sram.h #include mach/io.h #include cm.h diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat- omap/include/plat/sram.h index 5905100..9967d5e 100644 --- a/arch/arm/plat-omap/include/plat/sram.h +++ b/arch/arm/plat-omap/include/plat/sram.h @@ -11,6 +11,7 @@ #ifndef __ARCH_ARM_OMAP_SRAM_H #define __ARCH_ARM_OMAP_SRAM_H +#ifndef __ASSEMBLY__ extern void * omap_sram_push(void * start, unsigned long size); extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); @@ -74,4 +75,14 @@ extern void omap_push_sram_idle(void); static inline void omap_push_sram_idle(void) {} #endif /* CONFIG_PM */ +#endif /* __ASSEMBLY__ */ + +/* + * OMAP2+: define the SRAM PA addresses. + * Used by the SRAM management code and the idle sleep code. + */ +#define OMAP2_SRAM_PA0x4020 +#define OMAP3_SRAM_PA 0x4020 +#define OMAP4_SRAM_PA0x4030 + #endif diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 819ea0c..1a686c8 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -41,15 +41,12 @@ #define OMAP1_SRAM_PA0x2000 #define OMAP1_SRAM_VAVMALLOC_END -#define OMAP2_SRAM_PA0x4020 -#define OMAP2_SRAM_PUB_PA0x4020f800 +#define OMAP2_SRAM_PUB_PA(OMAP2_SRAM_PA + 0xf800) #define OMAP2_SRAM_VA0xfe40 #define OMAP2_SRAM_PUB_VA(OMAP2_SRAM_VA + 0x800) -#define OMAP3_SRAM_PA 0x4020 #define OMAP3_SRAM_VA 0xfe40 -#define OMAP3_SRAM_PUB_PA 0x40208000 +#define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) -#define OMAP4_SRAM_PA0x4030 #define OMAP4_SRAM_VA0xfe40 #define OMAP4_SRAM_PUB_PA(OMAP4_SRAM_PA + 0x4000) #define OMAP4_SRAM_PUB_VA(OMAP4_SRAM_VA + 0x4000) -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses
jean.pi...@newoldbits.com had written, on 12/17/2010 04:08 AM, the following: From: Jean Pihet j-pi...@ti.com The SRAM PA addresses are locally defined and used at different places, i.e. SRAM management code and idle sleep code. The macros are now defined at a centralized place, for easier maintenance. Tested on N900 and Beagleboard with full RET and OFF modes, using cpuidle and suspend. Signed-off-by: Jean Pihet j-pi...@ti.com --- arch/arm/mach-omap2/sdrc.h |1 - arch/arm/mach-omap2/sleep34xx.S|1 + arch/arm/plat-omap/include/plat/sram.h | 11 +++ arch/arm/plat-omap/sram.c |7 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 68f57bb..b3f8379 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -74,5 +74,4 @@ static inline u32 sms_read_reg(u16 reg) */ #define SDRC_MPURATE_LOOPS 96 - spurious change. [...] diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 819ea0c..1a686c8 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -41,15 +41,12 @@ #define OMAP1_SRAM_PA 0x2000 #define OMAP1_SRAM_VA VMALLOC_END -#define OMAP2_SRAM_PA 0x4020 -#define OMAP2_SRAM_PUB_PA 0x4020f800 +#define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) #define OMAP2_SRAM_VA 0xfe40 #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) -#define OMAP3_SRAM_PA 0x4020 #define OMAP3_SRAM_VA 0xfe40 -#define OMAP3_SRAM_PUB_PA 0x40208000 +#define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) Though not directly related to the patch, information sake: the PUB physical address on a GP device != public SRAM address on a HS/EMU device - in theory PPA can reconfigure how much is available for a HS/EMU device here. #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) -#define OMAP4_SRAM_PA 0x4030 #define OMAP4_SRAM_VA 0xfe40 #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) #define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) Tested-by: Nishanth Menonn...@ti.com Tested on: SDP3630 SDP3430 Test script: http://pastebin.mozilla.org/889933 -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses
Hi Nishant, On Fri, Dec 17, 2010 at 2:34 PM, Nishanth Menon n...@ti.com wrote: jean.pi...@newoldbits.com had written, on 12/17/2010 04:08 AM, the following: From: Jean Pihet j-pi...@ti.com The SRAM PA addresses are locally defined and used at different places, i.e. SRAM management code and idle sleep code. The macros are now defined at a centralized place, for easier maintenance. Tested on N900 and Beagleboard with full RET and OFF modes, using cpuidle and suspend. Signed-off-by: Jean Pihet j-pi...@ti.com --- arch/arm/mach-omap2/sdrc.h | 1 - arch/arm/mach-omap2/sleep34xx.S | 1 + arch/arm/plat-omap/include/plat/sram.h | 11 +++ arch/arm/plat-omap/sram.c | 7 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 68f57bb..b3f8379 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -74,5 +74,4 @@ static inline u32 sms_read_reg(u16 reg) */ #define SDRC_MPURATE_LOOPS 96 - spurious change. Cosmetic change! [...] diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 819ea0c..1a686c8 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -41,15 +41,12 @@ #define OMAP1_SRAM_PA 0x2000 #define OMAP1_SRAM_VA VMALLOC_END -#define OMAP2_SRAM_PA 0x4020 -#define OMAP2_SRAM_PUB_PA 0x4020f800 +#define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) #define OMAP2_SRAM_VA 0xfe40 #define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800) -#define OMAP3_SRAM_PA 0x4020 #define OMAP3_SRAM_VA 0xfe40 -#define OMAP3_SRAM_PUB_PA 0x40208000 +#define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) Though not directly related to the patch, information sake: the PUB physical address on a GP device != public SRAM address on a HS/EMU device - in theory PPA can reconfigure how much is available for a HS/EMU device here. Ok good to know. #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) -#define OMAP4_SRAM_PA 0x4030 #define OMAP4_SRAM_VA 0xfe40 #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) #define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) Tested-by: Nishanth Menonn...@ti.com Tested on: SDP3630 SDP3430 Test script: http://pastebin.mozilla.org/889933 Nice test script btw -- Regards, Nishanth Menon Thanks! Jean -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses
Jean Pihet had written, on 12/17/2010 08:59 AM, the following: diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 68f57bb..b3f8379 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -74,5 +74,4 @@ static inline u32 sms_read_reg(u16 reg) */ #define SDRC_MPURATE_LOOPS 96 - spurious change. Cosmetic change! yep, does not belong to this patch :) http://pastebin.mozilla.org/889933 Nice test script btw you are welcome, hope it is useful. -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of jean.pi...@newoldbits.com Sent: Thursday, December 16, 2010 11:21 PM To: linux-omap@vger.kernel.org Cc: khil...@deeprootsystems.com; linux-arm-ker...@lists.infradead.org; Jean Pihet Subject: [PATCH 2/7] OMAP2+: use global values for the SRAM PA addresses From: Jean Pihet j-pi...@ti.com The SRAM PA addresses are locally defined and used in both the SRAM management code and the idle sleep code. A global macro defines the values at a centralized place, for easier maintenance. Tested on N900 and Beagleboard with full RET and OFF modes, using cpuidle and suspend. Signed-off-by: Jean Pihet j-pi...@ti.com --- arch/arm/mach-omap2/sdrc.h |7 +++ arch/arm/plat-omap/sram.c |7 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index 68f57bb..ada596b 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -74,5 +74,12 @@ static inline u32 sms_read_reg(u16 reg) */ #define SDRC_MPURATE_LOOPS 96 +/* + * OMAP2+: define the SRAM PA addresses. + * Used by the SRAM management code and the idle sleep code. + */ +#define OMAP2_SRAM_PA0x4020 +#define OMAP3_SRAM_PA 0x4020 +#define OMAP4_SRAM_PA0x4030 Header choice is wrong. Certainly SDRC is not the place. Right place should be #include plat/sram.h OMAP4 doesn't even have SDRC IP #endif diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 819ea0c..1a686c8 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -41,15 +41,12 @@ #define OMAP1_SRAM_PA0x2000 #define OMAP1_SRAM_VAVMALLOC_END -#define OMAP2_SRAM_PA0x4020 -#define OMAP2_SRAM_PUB_PA0x4020f800 +#define OMAP2_SRAM_PUB_PA(OMAP2_SRAM_PA + 0xf800) #define OMAP2_SRAM_VA0xfe40 #define OMAP2_SRAM_PUB_VA(OMAP2_SRAM_VA + 0x800) -#define OMAP3_SRAM_PA 0x4020 #define OMAP3_SRAM_VA 0xfe40 -#define OMAP3_SRAM_PUB_PA 0x40208000 +#define OMAP3_SRAM_PUB_PA (OMAP3_SRAM_PA + 0x8000) #define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) -#define OMAP4_SRAM_PA0x4030 #define OMAP4_SRAM_VA0xfe40 #define OMAP4_SRAM_PUB_PA(OMAP4_SRAM_PA + 0x4000) #define OMAP4_SRAM_PUB_VA(OMAP4_SRAM_VA + 0x4000) -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html