Runitme check for OMAP35x
Subsystems (2)
PATCH 2/3 Runitme check for OMAP35x
Added runtime check via omap2_set_globals_35xx()
--- arch/arm/plat-omap/common.c | 68 +++++++++++++++++++++++ arch/arm/plat-omap/include/mach/common.h | 1 + arch/arm/plat-omap/include/mach/cpu.h | 88 +++++++++++++++++++++++++++++- 3 files changed, 155 insertions(+), 2 deletions(-)
arch/arm/plat-omap/common.c +68 -0
@@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void) }#endif +#if defined(CONFIG_ARCH_OMAP35XX ) + +#if defined(CONFIG_ARCH_OMAP3503 ) +static struct omap_globals omap3503_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3503) */ + +#if defined(CONFIG_ARCH_OMAP3515 ) +static struct omap_globals omap3515_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3515) */ + +#if defined(CONFIG_ARCH_OMAP3525 ) +static struct omap_globals omap3525_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3525) */ + +#if defined(CONFIG_ARCH_OMAP3530 ) +static struct omap_globals omap3530_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3530) */ + +void __init omap2_set_globals_35xx (void ) +{ +#if defined(CONFIG_ARCH_OMAP3503 ) + omap2_globals = &omap3503_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3515 ) + omap2_globals = &omap3515_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3525 ) + omap2_globals = &omap3525_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3530 ) + omap2_globals = &omap3530_globals; +#endif + +__omap2_set_globals (); +} +#endif /* if defined(CONFIG_ARCH_OMAP35XX) */
arch/arm/plat-omap/include/mach/common.h +1 -0
@@ -60,6 +60,7 @@ struct omap_globals {void omap2_set_globals_242x (void );void omap2_set_globals_243x (void );void omap2_set_globals_343x (void ); +void omap2_set_globals_35xx (void );/* These get called from omap2_set_globals_xxxx(), do not call these */ void omap2_set_globals_tap (struct omap_globals *);
arch/arm/plat-omap/include/mach/cpu.h +86 -2
154 lines not on this page · raw message
Signature · 1 line
1.5.6
Quoted 14 lines · Sanjeev Premi
Added runtime check via
omap2_set_globals_35xx()Signed-off-by Sanjeev Premi <[email protected]>--- arch/arm/plat-omap/common.c | 68 +++++++++++++++++++++++ arch/arm/plat-omap/include/mach/common.h | 1 + arch/arm/plat-omap/include/mach/cpu.h | 88 +++++++++++++++++++++++++++++- 3 files changed, 155 insertions(+), 2 deletions(-)arch/arm/plat-omap/common.c +0
-0
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 338
Quoted 6 lines
arch/arm/plat-omap/common.c +3
-0@@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void) }#endif +#if defined(CONFIG_ARCH_OMAP35XX ) + +#if defined(CONFIG_ARCH_OMAP3503 )
use ifdef here
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 348
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+static struct omap_globals omap3503_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3503) */
traditionaly this would be:
#endif /* CONFIG_ARCH_OMAP3503 */
but that's a matter of taste...
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 350
Quoted 2 lines
arch/arm/plat-omap/common.c +2
-0+ +#if defined(CONFIG_ARCH_OMAP3515 )
and here
Quoted 39 lines
arch/arm/plat-omap/common.c +39
-0+static struct omap_globals omap3515_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3515) */ + +#if defined(CONFIG_ARCH_OMAP3525 ) +static struct omap_globals omap3525_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3525) */ + +#if defined(CONFIG_ARCH_OMAP3530 ) +static struct omap_globals omap3530_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3530) */ + +void __init omap2_set_globals_35xx (void ) +{ +#if defined(CONFIG_ARCH_OMAP3503 ) + omap2_globals = &omap3503_globals;
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 399
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+#endif +#if defined(CONFIG_ARCH_OMAP3515 ) + omap2_globals = &omap3515_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3525 ) + omap2_globals = &omap3525_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3530 ) + omap2_globals = &omap3530_globals; +#endif
hmmm... so it's impossible to have multi-omap with 35xx ?? too bad...
You should probably provide omap2_set_globals_350x(), omap2_set_globals_351x(), omap2_set_globals_352x() and omap2_set_globals_353x().
Tony, what do you think ??
Signature · 1 line
balbi
Quoted 72 lines · Felipe Balbi
Quoted 14 lines · Sanjeev Premi
Added runtime check via
omap2_set_globals_35xx()Signed-off-by Sanjeev Premi <[email protected]>--- arch/arm/plat-omap/common.c | 68 +++++++++++++++++++++++ arch/arm/plat-omap/include/mach/common.h | 1 + arch/arm/plat-omap/include/mach/cpu.h | 88 +++++++++++++++++++++++++++++- 3 files changed, 155 insertions(+), 2 deletions(-)arch/arm/plat-omap/common.c +0
-0arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 338
Quoted 6 lines
arch/arm/plat-omap/common.c +3
-0@@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void) }#endif +#if defined(CONFIG_ARCH_OMAP35XX ) + +#if defined(CONFIG_ARCH_OMAP3503 )use ifdef here
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 348
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+static struct omap_globals omap3503_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3503) */ traditionaly this would be:
#endif /*
CONFIG_ARCH_OMAP3503*/but that's a matter of taste...
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 350
Quoted 2 lines
arch/arm/plat-omap/common.c +2
-0+ +#if defined(CONFIG_ARCH_OMAP3515 )and here
Quoted 26 lines
arch/arm/plat-omap/common.c +26
-0+static struct omap_globals omap3515_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3515) */ + +#if defined(CONFIG_ARCH_OMAP3525 ) +static struct omap_globals omap3525_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3525) */ + +#if defined(CONFIG_ARCH_OMAP3530 ) +static struct omap_globals omap3530_globals = { + .class = OMAP35XX_CLASS,
Quoted 8 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 384
Quoted 8 lines
arch/arm/plat-omap/common.c +8
-0+ .tap = OMAP2_IO_ADDRESS(0x4830A000), + .sdrc = OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), + .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE), + .ctrl = OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE), + .prm = OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE), + .cm = OMAP2_IO_ADDRESS(OMAP3430_CM_BASE), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3530) */
What are the differences between these various omap35xx processors? Maybe add a comment to each struct.
Also do we really need a separate struct for each 35xx?
Quoted 10 lines
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+ +void __init omap2_set_globals_35xx (void ) +{ +#if defined(CONFIG_ARCH_OMAP3503 ) + omap2_globals = &omap3503_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3515 ) + omap2_globals = &omap3515_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3525 )
Quoted 8 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 399
Quoted 5 lines
arch/arm/plat-omap/common.c +5
-0+ omap2_globals = &omap3525_globals; +#endif +#if defined(CONFIG_ARCH_OMAP3530 ) + omap2_globals = &omap3530_globals; +#endif hmmm... so it's impossible to have multi-omap with 35xx ?? too bad...
This does not sounds right, the multi-omap should always work.
Quoted 5 lines
You should probably provide
omap2_set_globals_350x(),omap2_set_globals_351x(),omap2_set_globals_352x()andomap2_set_globals_353x().Tony, what do you think ??
Is there no way to detect them during runtime from the hardware?
If the answer is no, then yes we need a separate set_globals for each omap35xx flavor.
Regards,
Tony
Quoted 84 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Monday, January 12, 2009 5:57 PM
To: Felipe Balbi
Cc: Premi, Sanjeev; [email protected]
Subject: Re: [PATCH 2/3] Runitme check for OMAP35xQuoted 6 lines · Felipe Balbi
Quoted 5 lines · Sanjeev Premi
Added runtime check via
omap2_set_globals_35xx()Signed-off-by Sanjeev Premi <[email protected]>--- arch/arm/plat-omap/common.c | 68+++++++++++++++++++++++
Quoted 2 lines
Quoted 2 lines
arch/arm/plat-omap/include/mach/common.h | 1 + arch/arm/plat-omap/include/mach/cpu.h | 88+++++++++++++++++++++++++++++-
Quoted 66 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 337
Quoted 12 lines
3 files changed, 155 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/arch/arm/plat-omap/common.cindex 8c53125..7861a25 100644arch/arm/plat-omap/common.c +3
-0@@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void) }#endif +#if defined(CONFIG_ARCH_OMAP35XX ) + +#if defined(CONFIG_ARCH_OMAP3503 )use ifdef here
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 348
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+static struct omap_globals omap3503_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3503) */ traditionaly this would be:
#endif /*
CONFIG_ARCH_OMAP3503*/but that's a matter of taste...
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 349
Quoted 2 lines
arch/arm/plat-omap/common.c +2
-0+ +#if defined(CONFIG_ARCH_OMAP3515 )and here
Quoted 29 lines
arch/arm/plat-omap/common.c +29
-0+static struct omap_globals omap3515_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3515) */ + +#if defined(CONFIG_ARCH_OMAP3525 ) +static struct omap_globals omap3525_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3525) */ + +#if defined(CONFIG_ARCH_OMAP3530 ) +static struct omap_globals omap3530_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
Quoted 8 lines
Quoted 5 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 384
Quoted 5 lines
arch/arm/plat-omap/common.c +5
-0+ .ctrl = OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE), + .prm = OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE), + .cm = OMAP2_IO_ADDRESS(OMAP3430_CM_BASE), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3530) */ What are the differences between these various omap35xx processors? Maybe add a comment to each struct.
[sp] Sure will do. Thought that link in PATCH0 was sufficient.
Quoted 2 lines
Also do we really need a separate struct for each 35xx?
[sp] There was a comment to my initial patchset (AUG '08) that there should be a separate struct. Hence, I had made this change.
Quoted 15 lines
Quoted 14 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 393
Quoted 11 lines
arch/arm/plat-omap/common.c +10
-0+ +void __init omap2_set_globals_35xx (void ) {#if +defined(CONFIG_ARCH_OMAP3503 ) + omap2_globals = &omap3503_globals;#endif #if +defined(CONFIG_ARCH_OMAP3515 ) + omap2_globals = &omap3515_globals;#endif #if +defined(CONFIG_ARCH_OMAP3525 ) + omap2_globals = &omap3525_globals;#endif #if +defined(CONFIG_ARCH_OMAP3530 ) + omap2_globals = &omap3530_globals;#endif hmmm... so it's impossible to have multi-omap with 35xx ?? too bad...
Quoted 2 lines
This does not sounds right, the multi-omap should always work.
[sp] If there is only one struct this multi-omap will still be a problem. Right?
Each of the OMAPs will need its own struct. (I haven't worked with multi-omap; do correct me if my understanding is not right).
Quoted 7 lines
Quoted 5 lines
You should probably provide
omap2_set_globals_350x(),omap2_set_globals_351x(),omap2_set_globals_352x()andomap2_set_globals_353x().Tony, what do you think ??
Is there no way to detect them during runtime from the hardware?
[sp] The initial version of the TRM did not mention any specific means to do runtime detection. Had followed the same for this patchset. The new TRM does mention mechanism (also mentioned by Steve Sakoman in same mail thread). I am working to create a new patch set. I am trying to confirm if this will work on early versions of OMAP35x as well.
Quoted 2 lines
If the answer is no, then yes we need a separate
set_globalsfor each omap35xx flavor.
[sp] If check works for initial Si versions as well; I will submit patch with only one function omap2_set_globals_35xx (); Else, will go with multiple functions for each of 35x processors as suggest above.
Quoted 6 lines
Regards,
Tony
~sanjeev
Quoted 93 lines · Premi, Sanjeev
Quoted 84 lines
-----Original Message-----
From: Tony Lindgren [mailto:[email protected]]
Sent: Monday, January 12, 2009 5:57 PM
To: Felipe Balbi
Cc: Premi, Sanjeev; [email protected]
Subject: Re: [PATCH 2/3] Runitme check for OMAP35xQuoted 6 lines · Felipe Balbi
Quoted 5 lines · Sanjeev Premi
Added runtime check via
omap2_set_globals_35xx()Signed-off-by Sanjeev Premi <[email protected]>--- arch/arm/plat-omap/common.c | 68+++++++++++++++++++++++
Quoted 2 lines
Quoted 2 lines
arch/arm/plat-omap/include/mach/common.h | 1 + arch/arm/plat-omap/include/mach/cpu.h | 88+++++++++++++++++++++++++++++-
Quoted 66 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 337
Quoted 12 lines
3 files changed, 155 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/arch/arm/plat-omap/common.cindex 8c53125..7861a25 100644arch/arm/plat-omap/common.c +3
-0@@ -333,3 +333,71 @@ void __init omap2_set_globals_343x(void) }#endif +#if defined(CONFIG_ARCH_OMAP35XX ) + +#if defined(CONFIG_ARCH_OMAP3503 )use ifdef here
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 348
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+static struct omap_globals omap3503_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3503) */ traditionaly this would be:
#endif /*
CONFIG_ARCH_OMAP3503*/but that's a matter of taste...
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 349
Quoted 2 lines
arch/arm/plat-omap/common.c +2
-0+ +#if defined(CONFIG_ARCH_OMAP3515 )and here
Quoted 29 lines
arch/arm/plat-omap/common.c +29
-0+static struct omap_globals omap3515_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3515) */ + +#if defined(CONFIG_ARCH_OMAP3525 ) +static struct omap_globals omap3525_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms =OMAP2_IO_ADDRESS (OMAP343X_SMS_BASE ), + .ctrl =OMAP2_IO_ADDRESS (OMAP343X_CTRL_BASE ), + .prm =OMAP2_IO_ADDRESS (OMAP3430_PRM_BASE ), + .cm =OMAP2_IO_ADDRESS (OMAP3430_CM_BASE ), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3525) */ + +#if defined(CONFIG_ARCH_OMAP3530 ) +static struct omap_globals omap3530_globals = { + .class =OMAP35XX_CLASS , + .tap =OMAP2_IO_ADDRESS (0x4830A000 ), + .sdrc =OMAP2_IO_ADDRESS (OMAP343X_SDRC_BASE ), + .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),Quoted 8 lines
Quoted 5 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) · line 384
Quoted 5 lines
arch/arm/plat-omap/common.c +5
-0+ .ctrl = OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE), + .prm = OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE), + .cm = OMAP2_IO_ADDRESS(OMAP3430_CM_BASE), +}; +#endif /* if defined(CONFIG_ARCH_OMAP3530) */ What are the differences between these various omap35xx processors? Maybe add a comment to each struct.
Quoted 5 lines
[sp] Sure will do. Thought that link in PATCH0 was sufficient.
Quoted 2 lines
Also do we really need a separate struct for each 35xx?
[sp] There was a comment to my initial patchset (AUG '08) that there should be a separate struct. Hence, I had made this change.
But if the data struct is the same for each 35xx, you can use the same sturct, right?
If you need to add separate data there, just have separate set_globals functions for each flavor.
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
arch/arm/plat-omap/common.c void __init omap2_set_globals_343x(void) } · line 393
Quoted 10 lines
arch/arm/plat-omap/common.c +10
-0+ +void __init omap2_set_globals_35xx (void ) {#if +defined(CONFIG_ARCH_OMAP3503 ) + omap2_globals = &omap3503_globals;#endif #if +defined(CONFIG_ARCH_OMAP3515 ) + omap2_globals = &omap3515_globals;#endif #if +defined(CONFIG_ARCH_OMAP3525 ) + omap2_globals = &omap3525_globals;#endif #if +defined(CONFIG_ARCH_OMAP3530 ) + omap2_globals = &omap3530_globals;#endif hmmm... so it's impossible to have multi-omap with 35xx ?? too bad...
Quoted 6 lines
Quoted 2 lines
This does not sounds right, the multi-omap should always work.
[sp] If there is only one struct this multi-omap will still be a problem. Right?
Each of the OMAPs will need its own struct. (I haven't worked with multi-omap; do correct me if my understanding is not right).
No, multi-omap should not be a problem, you just use the right struct in set_globals function.
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
You should probably provide
omap2_set_globals_350x(),omap2_set_globals_351x(),omap2_set_globals_352x()andomap2_set_globals_353x().Tony, what do you think ??
Is there no way to detect them during runtime from the hardware?
[sp] The initial version of the TRM did not mention any specific means to do runtime detection. Had followed the same for this patchset. The new TRM does mention mechanism (also mentioned by Steve Sakoman in same mail thread). I am working to create a new patch set. I am trying to confirm if this will work on early versions of OMAP35x as well.
It might be worth confirming this.
Quoted 4 lines
Quoted 2 lines
If the answer is no, then yes we need a separate
set_globalsfor each omap35xx flavor.[sp] If check works for initial Si versions as well; I will submit patch with only one function
omap2_set_globals_35xx(); Else, will go with multiple functions for each of 35x processors as suggest above.
Thanks,
Tony