-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ARM] OMAP2 SDRC: separate common OMAP2/3 code from OMAP2xxx code
Separate SDRC code common to OMAP2/3 from mach-omap2/sdrc2xxx.c to mach-omap2/sdrc.c. Rename the OMAP2xxx-specific functions to use an 'omap2xxx' prefix rather than an 'omap2' prefix, and use "sdrc" in the function names rather than "memory." Mark several functions as static that should not be used outside the sdrc2xxx.c file. linux-omap source commit is bf1612b9d8d29379558500cd5de9ae0367c41fc4. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
Paul Walmsley
authored and
Russell King
committed
Feb 8, 2009
1 parent
96609ef
commit f2ab997
Showing
8 changed files
with
115 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* SMS/SDRC (SDRAM controller) common code for OMAP2/3 | ||
* | ||
* Copyright (C) 2005, 2008 Texas Instruments Inc. | ||
* Copyright (C) 2005, 2008 Nokia Corporation | ||
* | ||
* Tony Lindgren <tony@atomide.com> | ||
* Paul Walmsley | ||
* Richard Woodruff <r-woodruff2@ti.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/kernel.h> | ||
#include <linux/device.h> | ||
#include <linux/list.h> | ||
#include <linux/errno.h> | ||
#include <linux/delay.h> | ||
#include <linux/clk.h> | ||
#include <linux/io.h> | ||
|
||
#include <mach/common.h> | ||
#include <mach/clock.h> | ||
#include <mach/sram.h> | ||
|
||
#include "prm.h" | ||
|
||
#include <mach/sdrc.h> | ||
#include "sdrc.h" | ||
|
||
void __iomem *omap2_sdrc_base; | ||
void __iomem *omap2_sms_base; | ||
|
||
void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals) | ||
{ | ||
omap2_sdrc_base = omap2_globals->sdrc; | ||
omap2_sms_base = omap2_globals->sms; | ||
} | ||
|
||
/* turn on smart idle modes for SDRAM scheduler and controller */ | ||
void __init omap2_sdrc_init(void) | ||
{ | ||
u32 l; | ||
|
||
l = sms_read_reg(SMS_SYSCONFIG); | ||
l &= ~(0x3 << 3); | ||
l |= (0x2 << 3); | ||
sms_write_reg(l, SMS_SYSCONFIG); | ||
|
||
l = sdrc_read_reg(SDRC_SYSCONFIG); | ||
l &= ~(0x3 << 3); | ||
l |= (0x2 << 3); | ||
sdrc_write_reg(l, SDRC_SYSCONFIG); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters