diff options
author | Tony Lindgren <tony@atomide.com> | 2009-05-26 17:41:35 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-05-26 17:41:35 -0400 |
commit | 88b6f7eb9b4a06fbfe27f2d98e249577f4cfdaef (patch) | |
tree | 9ef0d7ecd3e0551ca4d13ac0134aeb3ecd8558c7 /arch/arm/mach-omap2/sdrc.c | |
parent | 8f9ccfeeb2cecb54dd093119291ab271ab0fd94a (diff) | |
parent | 7971687094ef48695aa56a0c03416b609bd4d1fd (diff) |
Merge branch 'omap-clock-upstream' of git://git.pwsan.com/linux-2.6 into for-next
Diffstat (limited to 'arch/arm/mach-omap2/sdrc.c')
-rw-r--r-- | arch/arm/mach-omap2/sdrc.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c index 2a30060cb4b7..d62e4e10d4b0 100644 --- a/arch/arm/mach-omap2/sdrc.c +++ b/arch/arm/mach-omap2/sdrc.c | |||
@@ -37,6 +37,10 @@ static struct omap_sdrc_params *sdrc_init_params; | |||
37 | void __iomem *omap2_sdrc_base; | 37 | void __iomem *omap2_sdrc_base; |
38 | void __iomem *omap2_sms_base; | 38 | void __iomem *omap2_sms_base; |
39 | 39 | ||
40 | /* SDRC_POWER register bits */ | ||
41 | #define SDRC_POWER_EXTCLKDIS_SHIFT 3 | ||
42 | #define SDRC_POWER_PWDENA_SHIFT 2 | ||
43 | #define SDRC_POWER_PAGEPOLICY_SHIFT 0 | ||
40 | 44 | ||
41 | /** | 45 | /** |
42 | * omap2_sdrc_get_params - return SDRC register values for a given clock rate | 46 | * omap2_sdrc_get_params - return SDRC register values for a given clock rate |
@@ -74,7 +78,14 @@ void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals) | |||
74 | omap2_sms_base = omap2_globals->sms; | 78 | omap2_sms_base = omap2_globals->sms; |
75 | } | 79 | } |
76 | 80 | ||
77 | /* turn on smart idle modes for SDRAM scheduler and controller */ | 81 | /** |
82 | * omap2_sdrc_init - initialize SMS, SDRC devices on boot | ||
83 | * @sp: pointer to a null-terminated list of struct omap_sdrc_params | ||
84 | * | ||
85 | * Turn on smart idle modes for SDRAM scheduler and controller. | ||
86 | * Program a known-good configuration for the SDRC to deal with buggy | ||
87 | * bootloaders. | ||
88 | */ | ||
78 | void __init omap2_sdrc_init(struct omap_sdrc_params *sp) | 89 | void __init omap2_sdrc_init(struct omap_sdrc_params *sp) |
79 | { | 90 | { |
80 | u32 l; | 91 | u32 l; |
@@ -90,4 +101,10 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sp) | |||
90 | sdrc_write_reg(l, SDRC_SYSCONFIG); | 101 | sdrc_write_reg(l, SDRC_SYSCONFIG); |
91 | 102 | ||
92 | sdrc_init_params = sp; | 103 | sdrc_init_params = sp; |
104 | |||
105 | /* XXX Enable SRFRONIDLEREQ here also? */ | ||
106 | l = (1 << SDRC_POWER_EXTCLKDIS_SHIFT) | | ||
107 | (1 << SDRC_POWER_PWDENA_SHIFT) | | ||
108 | (1 << SDRC_POWER_PAGEPOLICY_SHIFT); | ||
109 | sdrc_write_reg(l, SDRC_POWER); | ||
93 | } | 110 | } |