/* * SMS/SDRC (SDRAM controller) common code for OMAP2/3 * * Copyright (C) 2005, 2008 Texas Instruments Inc. * Copyright (C) 2005, 2008 Nokia Corporation * * Tony Lindgren * Paul Walmsley * Richard Woodruff * * 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 #include #include #include #include #include #include #include #include #include #include #include "prm.h" #include #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); }