Skip to contentSkip to conversation

ARM: OMAP4: PM: Fix the PRM and CM base addresses

PATCH Paul Walmsley 3 participants 13 messages Aug 11, 2009 – Aug 12, 2009 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Rajendra

Most of this patch looks fine to me but I have one question:

Quoted 65 lines · Rajendra Nayak

This patch fixes the PRM and CM base addresses and adds a new CM2 base address for OMAP4

---
 arch/arm/mach-omap2/prcm.c                 |    2 ++
 arch/arm/plat-omap/common.c                |    2 ++
 arch/arm/plat-omap/include/mach/common.h   |    1 +
 arch/arm/plat-omap/include/mach/omap44xx.h |    6 ++++--
 4 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/prcm.c +2 -0
index f945156..de307fa 100644
@@ -27,6 +27,7 @@
 
 static void __iomem *prm_base;
 static void __iomem *cm_base;
+static void __iomem *cm2_base;
 
 u32 omap_prcm_get_reset_sources(void)
 {
@@ -124,4 +125,5 @@ void __init omap2_set_globals_prcm(struct omap_globals *omap2_globals)
 {
 	prm_base = omap2_globals->prm;
 	cm_base = omap2_globals->cm;
+	cm2_base = omap2_globals->cm2;
 }
arch/arm/plat-omap/common.c +2 -0
index ebcf006..e848a12 100644
@@ -372,12 +372,14 @@ static struct omap_globals omap4_globals = {
 	.ctrl	= OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
 	.prm	= OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
 	.cm	= OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
+	.cm2	= OMAP2_IO_ADDRESS(OMAP4430_CM2_BASE),
 };
 
 void __init omap2_set_globals_443x(void)
 {
 	omap2_set_globals_tap(&omap4_globals);
 	omap2_set_globals_control(&omap4_globals);
+	omap2_set_globals_prcm(&omap4_globals);
 }
 #endif
 
arch/arm/plat-omap/include/mach/common.h +1 -0
index fdeab42..878c4f9 100644
@@ -55,6 +55,7 @@ struct omap_globals {
 	void __iomem	*ctrl;		/* System Control Module */
 	void __iomem	*prm;		/* Power and Reset Management */
 	void __iomem	*cm;		/* Clock Management */
+	void __iomem	*cm2;
 };
 
 void omap2_set_globals_242x(void);
arch/arm/plat-omap/include/mach/omap44xx.h +0 -0
index 15dec7f..be29d77 100644

arch/arm/plat-omap/include/mach/omap44xx.h line 26

Quoted 6 lines
arch/arm/plat-omap/include/mach/omap44xx.h +1 -2
@@ -23,8 +23,10 @@
 #define L4_EMU_44XX_BASE		0x54000000
 #define L3_44XX_BASE			0x44000000
 #define OMAP4430_32KSYNCT_BASE		0x4a304000
-#define OMAP4430_CM_BASE		0x4a004000
-#define OMAP4430_PRM_BASE		0x48306000
+#define OMAP4430_CM1_BASE		0x4A30A000

The data from Benoit shows CM1 at the previous address - did this move recently?

arch/arm/plat-omap/include/mach/omap44xx.h line 32

Quoted 6 lines
arch/arm/plat-omap/include/mach/omap44xx.h +3 -0
+#define OMAP4430_CM_BASE		OMAP4430_CM1_BASE
+#define OMAP4430_CM2_BASE		0x4A008000
+#define OMAP4430_PRM_BASE		0x4A306000
 #define OMAP44XX_GPMC_BASE		0x50000000
 #define OMAP443X_SCM_BASE		0x4a002000
 #define OMAP443X_CTRL_BASE		OMAP443X_SCM_BASE

- Paul

#2 lore raw

Hi Paul,

Quoted 80 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Tuesday, August 11, 2009 6:02 PM
To: Nayak, Rajendra
Cc: [email protected]; [email protected]; Cousson, Benoit
Subject: Re: [PATCH 1/6] ARM: OMAP4: PM: Fix the PRM and CM base addresses

Hello Rajendra

Most of this patch looks fine to me but I have one question:

arch/arm/mach-omap2/prcm.c void __init

Quoted 24 lines · Rajendra Nayak

This patch fixes the PRM and CM base addresses and adds a new CM2 base address for OMAP4

---
 arch/arm/mach-omap2/prcm.c                 |    2 ++
 arch/arm/plat-omap/common.c                |    2 ++
 arch/arm/plat-omap/include/mach/common.h   |    1 +
 arch/arm/plat-omap/include/mach/omap44xx.h |    6 ++++--
 4 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/prcm.c +1 -0
index f945156..de307fa 100644
@@ -27,6 +27,7 @@
 
 static void __iomem *prm_base;
 static void __iomem *cm_base;
+static void __iomem *cm2_base;
 
 u32 omap_prcm_get_reset_sources(void)
 {
@@ -124,4 +125,5 @@ void __init 

omap2_set_globals_prcm(struct omap_globals *omap2_globals)

Review

Quoted 6 lines
arch/arm/mach-omap2/prcm.c +1 -0
 {
 	prm_base = omap2_globals->prm;
 	cm_base = omap2_globals->cm;
+	cm2_base = omap2_globals->cm2;
 }
(quoted diff) +0 -0

b/arch/arm/plat-omap/common.c

Review

Quoted 19 lines

index ebcf006..e848a12 100644

arch/arm/plat-omap/common.c +2 -0
@@ -372,12 +372,14 @@ static struct omap_globals omap4_globals = {
 	.ctrl	= OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
 	.prm	= OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
 	.cm	= OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
+	.cm2	= OMAP2_IO_ADDRESS(OMAP4430_CM2_BASE),
 };
 
 void __init omap2_set_globals_443x(void)
 {
 	omap2_set_globals_tap(&omap4_globals);
 	omap2_set_globals_control(&omap4_globals);
+	omap2_set_globals_prcm(&omap4_globals);
 }
 #endif
 
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/mach/common.h

Review

Quoted 12 lines

index fdeab42..878c4f9 100644

arch/arm/plat-omap/include/mach/common.h +1 -0
@@ -55,6 +55,7 @@ struct omap_globals {
 	void __iomem	*ctrl;		/* System Control Module */
 	void __iomem	*prm;		/* Power and Reset Management */
 	void __iomem	*cm;		/* Clock Management */
+	void __iomem	*cm2;
 };
 
 void omap2_set_globals_242x(void);
(quoted diff) +0 -0

b/arch/arm/plat-omap/include/mach/omap44xx.h

Quoted 13 lines

arch/arm/plat-omap/include/mach/omap44xx.h line 26

Quoted 10 lines

index 15dec7f..be29d77 100644

arch/arm/plat-omap/include/mach/omap44xx.h +1 -2
@@ -23,8 +23,10 @@
 #define L4_EMU_44XX_BASE		0x54000000
 #define L3_44XX_BASE			0x44000000
 #define OMAP4430_32KSYNCT_BASE		0x4a304000
-#define OMAP4430_CM_BASE		0x4a004000
-#define OMAP4430_PRM_BASE		0x48306000
+#define OMAP4430_CM1_BASE		0x4A30A000

The data from Benoit shows CM1 at the previous address - did this move recently?

These are based on the latest TRM that I have access to. Having said that it's quite likely that the TRM is'nt up to date since its still early days for OMAP4. Thanks for pointing it out, I will doublecheck this and update the patch.

Quoted 12 lines

arch/arm/plat-omap/include/mach/omap44xx.h line 32

Quoted 7 lines
arch/arm/plat-omap/include/mach/omap44xx.h +3 -0
+#define OMAP4430_CM_BASE		OMAP4430_CM1_BASE
+#define OMAP4430_CM2_BASE		0x4A008000
+#define OMAP4430_PRM_BASE		0x4A306000
 #define OMAP44XX_GPMC_BASE		0x50000000
 #define OMAP443X_SCM_BASE		0x4a002000
 #define OMAP443X_CTRL_BASE		OMAP443X_SCM_BASE

- Paul

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hello Rajendra,

Some comments.

Quoted 28 lines · Rajendra Nayak

This patch adds the offsets for new modules in PRM and CM for OMAP4

---
 arch/arm/mach-omap2/prcm-common.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/prcm-common.h +12 -0
index cb1ae84..ab0dd8e 100644
@@ -49,6 +49,28 @@
 #define OMAP3430_NEON_MOD				0xb00
 #define OMAP3430ES2_USBHOST_MOD				0xc00
 
+/* OMAP44XX specific module offsets */
+#define OMAP4430_OCP_SOCKET_MOD				0x0000
+#define OMAP4430_CKGEN_MOD				0x0100
+#define OMAP4430_MPU_MOD				0x0300
+#define OMAP4430_DSP_MOD				0x0400
+#define OMAP4430_ABE_MOD				0x0500
+#define OMAP4430_ALWAYS_ON_MOD				0x0600
+#define OMAP4430_CORE_MOD				0x0700
+#define OMAP4430_IVAHD_MOD				0x0F00
+#define OMAP4430_CAM_MOD				0x1000
+#define OMAP4430_DSS_MOD				0x1100
+#define OMAP4430_GFX_MOD				0x1200

arch/arm/mach-omap2/prcm-common.h line 73

Quoted 10 lines
arch/arm/mach-omap2/prcm-common.h +10 -0
+#define OMAP4430_L3INIT_MOD				0x1300
+#define OMAP4430_L4PER_MOD				0x1400
+#define OMAP4430_CEFUSE_MOD				0x1600
+#define OMAP4430_WKUP_MOD				0x1700
+#define OMAP4430_WKUP_CM_MOD				0x1800
+#define OMAP4430_EMU_MOD				0x1900
+#define OMAP4430_EMU_CM_MOD				0x1A00
+#define OMAP4430_DEVICE_MOD				0x1B00
+#define OMAP4430_RESTORE_MOD				0x1E00
+#define OMAP4430_INSTR_MOD				0x1F00

1. In the data above, some PRCM submodules, e.g., CM1.INSTR_CM1 and CM2.RESTORE_CM2, are either at the wrong address or are not listed, depending on one's perspective.

2. It would be better to infix the module name in these, e.g., OMAP4430_CM2_INSTR_MOD (and add PRM, CM1 variants) rather than just OMAP4430_INSTR_MOD. This will increase the number of defines but will decrease

3. The autoprcm repo has a script, gen_prcm44xx.py, that auto-generates almost all of these, without the errors described above, from Benoit's data. Is there some reason why we can't use the output from that script? It seems far superior to using manually-entered data. The source data comes directly from the hardware database, so the possibility of manual error seems lessened, and the same script should work with future OMAP4 revision.

- Paul

#5 lore raw

Re: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Quoted 4 lines · Paul Walmsley

2. It would be better to infix the module name in these, e.g., OMAP4430_CM2_INSTR_MOD (and add PRM, CM1 variants) rather than just OMAP4430_INSTR_MOD. This will increase the number of defines but will decrease

... confusion :-)

- Paul

#6 lore raw

Re: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

In reply to Paul Walmsley
Quoted 6 lines · Paul Walmsley
Quoted 4 lines · Rajendra Nayak
arch/arm/mach-omap2/prcm-common.h +0 -0
index cb1ae84..ab0dd8e 100644

...

Quoted 4 lines
Quoted 4 lines
arch/arm/mach-omap2/prcm-common.h +4 -0
+#define OMAP4430_WKUP_MOD				0x1700
+#define OMAP4430_WKUP_CM_MOD				0x1800
+#define OMAP4430_EMU_MOD				0x1900
+#define OMAP4430_EMU_CM_MOD				0x1A00

...

Quoted 3 lines

2. It would be better to infix the module name in these, e.g., OMAP4430_CM2_INSTR_MOD (and add PRM, CM1 variants) rather than just OMAP4430_INSTR_MOD.

One other comment on macros like the above: it would also be best to use the full PRM/CM submodule name. So, for instance, use OMAP4430_PRM_EMU_PRM_MOD and OMAP4430_PRM_EMU_CM_MOD.

This is to avoid any potential confusion caused by having to remember a rule like "when the PRCM submodule name ends in _PRM, drop the _PRM". One can just use the name from the TRM, always prefixed with the module name, and suffixed with _MOD (or whatever).

The gen_prcm44xx.py script will generate these in this format.

- Paul

#7 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

In reply to Paul Walmsley
Quoted 53 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Tuesday, August 11, 2009 6:32 PM
To: Nayak, Rajendra
Cc: [email protected]; [email protected]; Cousson, Benoit; [email protected]
Subject: Re: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hello Rajendra,

Some comments.

Review

Quoted 9 lines · Rajendra Nayak

This patch adds the offsets for new modules in PRM and CM for OMAP4

---
 arch/arm/mach-omap2/prcm-common.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/prcm-common.h

Quoted 26 lines

index cb1ae84..ab0dd8e 100644

arch/arm/mach-omap2/prcm-common.h +19 -0
@@ -49,6 +49,28 @@
 #define OMAP3430_NEON_MOD				0xb00
 #define OMAP3430ES2_USBHOST_MOD				0xc00
 
+/* OMAP44XX specific module offsets */
+#define OMAP4430_OCP_SOCKET_MOD				0x0000
+#define OMAP4430_CKGEN_MOD				0x0100
+#define OMAP4430_MPU_MOD				0x0300
+#define OMAP4430_DSP_MOD				0x0400
+#define OMAP4430_ABE_MOD				0x0500
+#define OMAP4430_ALWAYS_ON_MOD				0x0600
+#define OMAP4430_CORE_MOD				0x0700
+#define OMAP4430_IVAHD_MOD				0x0F00
+#define OMAP4430_CAM_MOD				0x1000
+#define OMAP4430_DSS_MOD				0x1100
+#define OMAP4430_GFX_MOD				0x1200
+#define OMAP4430_L3INIT_MOD				0x1300
+#define OMAP4430_L4PER_MOD				0x1400
+#define OMAP4430_CEFUSE_MOD				0x1600
+#define OMAP4430_WKUP_MOD				0x1700
+#define OMAP4430_WKUP_CM_MOD				0x1800
+#define OMAP4430_EMU_MOD				0x1900
+#define OMAP4430_EMU_CM_MOD				0x1A00
Quoted 8 lines

arch/arm/mach-omap2/prcm-common.h line 73

Quoted 3 lines
arch/arm/mach-omap2/prcm-common.h +3 -0
+#define OMAP4430_DEVICE_MOD				0x1B00
+#define OMAP4430_RESTORE_MOD				0x1E00
+#define OMAP4430_INSTR_MOD				0x1F00

1. In the data above, some PRCM submodules, e.g., CM1.INSTR_CM1 and CM2.RESTORE_CM2, are either at the wrong address or are not listed, depending on one's perspective.

I still see these are correct based on the TRM I have. Can you clarify more on what you see wrong here?

Quoted 6 lines

2. It would be better to infix the module name in these, e.g., OMAP4430_CM2_INSTR_MOD (and add PRM, CM1 variants) rather than just OMAP4430_INSTR_MOD. This will increase the number of
defines but
will decrease

Does it really make sense in case all those are the same? Instead of having one define something like
#define OMAP4430_RESTORE_MOD 0x1E00
There would be 3 defines
#define OMAP4430_PRM_RESTORE_MOD 0x1E00
#define OMAP4430_CM1_RESTORE_MOD 0x1E00
#define OMAP4430_CM2_RESTORE_MOD 0x1E00

Quoted 7 lines

3. The autoprcm repo has a script, gen_prcm44xx.py, that auto-generates
almost all of these, without the errors described above,
from Benoit's
data. Is there some reason why we can't use the output from that script?

I am not quite sure of Benoit's data but it most likely points to a superset of all OMAP4 architectures and not just whats supported/present on OMAP4430. These patches are to support just 4430 and hence mostly data from whats mentioned in the TRM.

It seems far superior to using manually-entered data. The

Quoted 9 lines

source data comes directly from the hardware database, so the possibility of manual error seems lessened, and the same
script should
work with future OMAP4 revision.

- Paul

#8 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hi Rajendra,

Quoted 47 lines · Rajendra
Quoted 38 lines · Rajendra Nayak

Review

Quoted 10 lines

This patch adds the offsets for new modules in PRM and CM for OMAP4

---
 arch/arm/mach-omap2/prcm-common.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/prcm-common.h

Quoted 26 lines

index cb1ae84..ab0dd8e 100644

arch/arm/mach-omap2/prcm-common.h +19 -0
@@ -49,6 +49,28 @@
 #define OMAP3430_NEON_MOD				0xb00
 #define OMAP3430ES2_USBHOST_MOD				0xc00
 
+/* OMAP44XX specific module offsets */
+#define OMAP4430_OCP_SOCKET_MOD				0x0000
+#define OMAP4430_CKGEN_MOD				0x0100
+#define OMAP4430_MPU_MOD				0x0300
+#define OMAP4430_DSP_MOD				0x0400
+#define OMAP4430_ABE_MOD				0x0500
+#define OMAP4430_ALWAYS_ON_MOD				0x0600
+#define OMAP4430_CORE_MOD				0x0700
+#define OMAP4430_IVAHD_MOD				0x0F00
+#define OMAP4430_CAM_MOD				0x1000
+#define OMAP4430_DSS_MOD				0x1100
+#define OMAP4430_GFX_MOD				0x1200
+#define OMAP4430_L3INIT_MOD				0x1300
+#define OMAP4430_L4PER_MOD				0x1400
+#define OMAP4430_CEFUSE_MOD				0x1600
+#define OMAP4430_WKUP_MOD				0x1700
+#define OMAP4430_WKUP_CM_MOD				0x1800
+#define OMAP4430_EMU_MOD				0x1900
+#define OMAP4430_EMU_CM_MOD				0x1A00
Quoted 8 lines

arch/arm/mach-omap2/prcm-common.h line 73

Quoted 3 lines
arch/arm/mach-omap2/prcm-common.h +3 -0
+#define OMAP4430_DEVICE_MOD				0x1B00
+#define OMAP4430_RESTORE_MOD				0x1E00
+#define OMAP4430_INSTR_MOD				0x1F00

1. In the data above, some PRCM submodules, e.g., CM1.INSTR_CM1 and CM2.RESTORE_CM2, are either at the wrong address or are not listed, depending on one's perspective.

Quoted 2 lines

I still see these are correct based on the TRM I have. Can you clarify more on what you see wrong here?

If you run gen_prcm44xx_h.py, you'll see that CM1.INSTR_CM1 is at a different offset than CM2.INSTR_CM2 and PRM.INSTR_PRM.

Quoted 6 lines
Quoted 5 lines

2. It would be better to infix the module name in these, e.g., OMAP4430_CM2_INSTR_MOD (and add PRM, CM1 variants) rather than just OMAP4430_INSTR_MOD. This will increase the number of
defines but
will decrease

Quoted 7 lines

Does it really make sense in case all those are the same? Instead of having one define something like
#define OMAP4430_RESTORE_MOD 0x1E00
There would be 3 defines
#define OMAP4430_PRM_RESTORE_MOD 0x1E00
#define OMAP4430_CM1_RESTORE_MOD 0x1E00
#define OMAP4430_CM2_RESTORE_MOD 0x1E00

The problem is that for some of them, like RESTORE_* and INSTR_*, the offsets aren't the same, and the exceptions are hard to remember. So I would prefer a separate set of macros for PRM, CM1, and CM2 submodule offsets. That way we don't have to remember the exceptions :-)

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

It might seem redundant, but this notation will handle those oddball PRM WKUP* and EMU* cases nicely. It will be clear to whomever is reading the code that WKUP_CM is actually in the PRM, for example.

Quoted 11 lines
Quoted 6 lines

3. The autoprcm repo has a script, gen_prcm44xx.py, that auto-generates
almost all of these, without the errors described above,
from Benoit's
data. Is there some reason why we can't use the output from that script?

I am not quite sure of Benoit's data but it most likely points to a superset of all OMAP4 architectures and not just whats supported/present on OMAP4430. These patches are to support just 4430 and hence mostly data from whats mentioned in the TRM.

In this specific case, if you look at the output from the gen_prcm44xx.py tool, you'll see that it doesn't appear to be a problem here. It is not a problem to change the script to generate "4430" rather than "44XX" also.

If there is a superset issue with the data, we should ping Benoit on that and maybe he can help.

Quoted 5 lines

It seems far superior to using manually-entered data. The

Quoted 4 lines

source data comes directly from the hardware database, so the possibility of manual error seems lessened, and the same
script should
work with future OMAP4 revision.

- Paul

#9 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Paul,

Quoted 7 lines

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

Not sure what you mean by __full__ name here. You are adding a redundant CM2 in the name here.

Regards,
Santosh

#10 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hello Santosh,

Quoted 9 lines · Santosh
Quoted 7 lines

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

Not sure what you mean by __full__ name here. You are adding a redundant CM2 in the name here.

Yes, for the above example, it looks pretty redundant, doesn't it. But what about:

OMAP4430_PRM_WKUP_CM_MOD

As my original message mentioned.

Do you still feel that is redundant?

- Paul

#11 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Paul,

Quoted 21 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Wednesday, August 12, 2009 10:17 AM
To: Shilimkar, Santosh
Cc: Nayak, Rajendra; [email protected]; [email protected]; Cousson, Benoit; [email protected]
Subject: RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hello Santosh,

Quoted 8 lines · Santosh
Quoted 7 lines

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

Quoted 8 lines
Quoted 1 line

Not sure what you mean by __full__ name here. You are adding

a redundant CM2 in the name here.

Yes, for the above example, it looks pretty redundant, doesn't it. But
what about:

OMAP4430_PRM_WKUP_CM_MOD

There are only 2 such instances of these where in WKUP_CM and EMU_CM and part of PRM module. There are no such instances in CM1 or CM2. To take care of 2 of these we would have 60 odd which would look redundant and module names as along as this OMAP4430_PRM_ALWAYS_ON_PRM_MOD.

If its really confusing and hard to remember that these belong to PRM we can always have exceptions in naming, and we have had exceptions in
3430 as well. There are modules common to 2430/3430 which are named differently as well as modules only in ES2 which are named differently.

Quoted 9 lines

As my original message mentioned.

Do you still feel that is redundant?

- Paul

#12 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Quoted 42 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nayak, Rajendra
Sent: Wednesday, August 12, 2009 10:39 AM
To: Paul Walmsley; Shilimkar, Santosh
Cc: [email protected]; [email protected]; Cousson, Benoit; [email protected]
Subject: RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Paul,

Quoted 28 lines

-----Original Message-----
From: Paul Walmsley [mailto:[email protected]]
Sent: Wednesday, August 12, 2009 10:17 AM
To: Shilimkar, Santosh
Cc: Nayak, Rajendra; [email protected]; [email protected]; Cousson, Benoit; [email protected]
Subject: RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hello Santosh,

Quoted 9 lines · Santosh
Quoted 7 lines

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

Not sure what you mean by __full__ name here. You are adding

a redundant CM2 in the name here.

Yes, for the above example, it looks pretty redundant, doesn't it. But
what about:

Quoted 8 lines
Quoted 1 line

OMAP4430_PRM_WKUP_CM_MOD

There are only 2 such instances of these where in WKUP_CM and EMU_CM and
part of PRM module. There are no such instances in CM1 or CM2. To take care of 2 of these we would have 60 odd which would look redundant
and module names as along as this OMAP4430_PRM_ALWAYS_ON_PRM_MOD.

Just to be clear what I mean..

this is what it would look like with 2 exceptions
#define OMAP4430_PRM_OCP_SOCKET_MOD 0x0000
#define OMAP4430_PRM_CKGEN_MOD 0x0100
#define OMAP4430_PRM_MPU_MOD 0x0300
#define OMAP4430_PRM_DSP_MOD 0x0400
#define OMAP4430_PRM_ABE_MOD 0x0500
#define OMAP4430_PRM_ALWAYS_ON_MOD 0x0600
#define OMAP4430_PRM_CORE_MOD 0x0700
#define OMAP4430_PRM_IVAHD_MOD 0x0F00
#define OMAP4430_PRM_CAM_MOD 0x1000
#define OMAP4430_PRM_DSS_MOD 0x1100
#define OMAP4430_PRM_GFX_MOD 0x1200
#define OMAP4430_PRM_L3INIT_MOD 0x1300
#define OMAP4430_PRM_L4PER_MOD 0x1400
#define OMAP4430_PRM_CEFUSE_MOD 0x1600
#define OMAP4430_PRM_WKUP_MOD 0x1700
#define OMAP4430_PRM_WKUP_CM_MOD 0x1800 /* exception */
#define OMAP4430_PRM_EMU_MOD 0x1900
#define OMAP4430_PRM_EMU_CM_MOD 0x1A00 /* exception */
#define OMAP4430_PRM_DEVICE_MOD 0x1B00
#define OMAP4430_PRM_RESTORE_MOD 0x1E00
#define OMAP4430_PRM_INSTR_MOD 0x1F00

And this with your way of naming..
#define OMAP4430_PRM_OCP_SOCKET_PRM_MOD 0x0000 /* redundant */
#define OMAP4430_PRM_CKGEN_PRM_MOD 0x0100 /* redundant */
#define OMAP4430_PRM_MPU_PRM_MOD 0x0300 /* redundant */
#define OMAP4430_PRM_DSP_PRM_MOD 0x0400 /* redundant */
#define OMAP4430_PRM_ABE_PRM_MOD 0x0500 /* redundant */
#define OMAP4430_PRM_ALWAYS_ON_PRM_MOD 0x0600 /* redundant */
#define OMAP4430_PRM_CORE_PRM_MOD 0x0700 /* redundant */
#define OMAP4430_PRM_IVAHD_PRM_MOD 0x0F00 /* redundant */
#define OMAP4430_PRM_CAM_PRM_MOD 0x1000 /* redundant */
#define OMAP4430_PRM_DSS_PRM_MOD 0x1100 /* redundant */
#define OMAP4430_PRM_GFX_PRM_MOD 0x1200 /* redundant */
#define OMAP4430_PRM_L3INIT_PRM_MOD 0x1300 /* redundant */
#define OMAP4430_PRM_L4PER_PRM_MOD 0x1400 /* redundant */
#define OMAP4430_PRM_CEFUSE_PRM_MOD 0x1600 /* redundant */
#define OMAP4430_PRM_WKUP_PRM_MOD 0x1700 /* redundant */
#define OMAP4430_PRM_WKUP_CM_MOD 0x1800
#define OMAP4430_PRM_EMU_PRM_MOD 0x1900 /* redundant */
#define OMAP4430_PRM_EMU_CM_MOD 0x1A00
#define OMAP4430_PRM_DEVICE_PRM_MOD 0x1B00 /* redundant */
#define OMAP4430_PRM_RESTORE_PRM_MOD 0x1E00 /* redundant */
#define OMAP4430_PRM_INSTR_PRM_MOD 0x1F00 /* redundant */

And this is just for the PRM modules, there would be all modules in CM1 and CM2 with redundunt additional CM1/CM2 even though there are no exceptions there.

Quoted 23 lines

If its really confusing and hard to remember that these belong to PRM we can always
have exceptions in naming, and we have had exceptions in 3430 as well. There are modules common to 2430/3430 which are named differently
as well as modules only in ES2 which are named differently.

Quoted 9 lines

As my original message mentioned.

Do you still feel that is redundant?

- Paul

--

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

Hi Rajendra,

Quoted 10 lines · Rajendra
Quoted 6 lines

There are only 2 such instances of these where in WKUP_CM and EMU_CM and
part of PRM module. There are no such instances in CM1 or CM2. To take care of 2 of these we would have 60 odd which would look redundant
and module names as along as this OMAP4430_PRM_ALWAYS_ON_PRM_MOD.

Just to be clear what I mean..

this is what it would look like with 2 exceptions

...

Quoted 1 line

And this with your way of naming..

...

Quoted 3 lines

And this is just for the PRM modules, there would be all modules in CM1 and CM2 with redundunt additional CM1/CM2 even though there are no exceptions there.

Yes, sure, I get your point.

Whatever we do, it should be as consistent as possible, and it should be behavior that can be rationally programmed into the autogeneration scripts.

- Paul

#14 lore raw

RE: [PATCH 2/6] ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

In reply to Nayak, Rajendra

Hi guys

Quoted 21 lines · Rajendra
Quoted 12 lines

From: Paul Walmsley [mailto:[email protected]]

Quoted 8 lines · Santosh
Quoted 7 lines

I'd also like to see the full names of the PRCM submodules, e.g.,

OMAP4430_CM2_RESTORE_CM2_MOD

rather than just

OMAP4430_CM2_RESTORE_MOD

Quoted 8 lines
Quoted 1 line

Not sure what you mean by __full__ name here. You are adding

a redundant CM2 in the name here.

Yes, for the above example, it looks pretty redundant, doesn't it. But
what about:

OMAP4430_PRM_WKUP_CM_MOD

Quoted 7 lines

There are only 2 such instances of these where in WKUP_CM and EMU_CM and part of PRM module. There are no such instances in CM1 or CM2. To take care of 2 of these we would have 60 odd which would look redundant and module names as along as this OMAP4430_PRM_ALWAYS_ON_PRM_MOD.

If its really confusing and hard to remember that these belong to PRM we can always have exceptions in naming

So, you propose that we have a rule here to drop the _{PRM,CM1,CM2} from the end of the PRCM subdomain name, if it is in the same "type" of PRCM module, e.g., drop the _PRM if it is in the PRM, _CM* if in a CM?

So the first example, for CM2.RESTORE_CM2 would be:

OMAP4430_CM2_RESTORE_MOD

and the second example, for PRM.WKUP_CM would be:

OMAP4430_PRM_WKUP_CM_MOD

That particular rule seems basically okay to me. The redundancy does suck. It can be encoded in the autogeneration scripts easily.

Any other comments/preferences on this from others in OMAP PM-land?

Quoted 3 lines

and we have had exceptions in 3430 as well. There are modules common to 2430/3430 which are named differently as well as modules only in ES2 which are named differently.

Are you referring to the platform prefixes, e.g., OMAP3430ES2_USBHOST_MOD, or something else here? The platform prefixes strike me as a very different situation. For example, if you see accesses to an ES2 module in a 3430-wide code path, you know there is a problem, it sticks out like a sore thumb.

Of course, even on OMAP2/3, looking back on it, we should have added some sort of PRCM notation in those defines, like OMAP3430ES2_PRCM_USBHOST_MOD, to mark that they are PRCM-specific defines ...

- Paul