2 * SMS/SDRC (SDRAM controller) common code for OMAP2/3
4 * Copyright (C) 2005, 2008 Texas Instruments Inc.
5 * Copyright (C) 2005, 2008 Nokia Corporation
7 * Tony Lindgren <tony@atomide.com>
9 * Richard Woodruff <r-woodruff2@ti.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/device.h>
19 #include <linux/list.h>
20 #include <linux/errno.h>
21 #include <linux/delay.h>
22 #include <linux/clk.h>
25 #include <mach/common.h>
26 #include <mach/clock.h>
27 #include <mach/sram.h>
31 #include <mach/sdrc.h>
34 void __iomem *omap2_sdrc_base;
35 void __iomem *omap2_sms_base;
37 void __init omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
39 omap2_sdrc_base = omap2_globals->sdrc;
40 omap2_sms_base = omap2_globals->sms;
43 /* turn on smart idle modes for SDRAM scheduler and controller */
44 void __init omap2_sdrc_init(void)
48 l = sms_read_reg(SMS_SYSCONFIG);
51 sms_write_reg(l, SMS_SYSCONFIG);
53 l = sdrc_read_reg(SDRC_SYSCONFIG);
56 sdrc_write_reg(l, SDRC_SYSCONFIG);