| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 1 | /* | 
|  | 2 | * linux/arch/arm/mach-omap2/memory.h | 
|  | 3 | * | 
|  | 4 | * Interface for memory timing related functions for OMAP24XX | 
|  | 5 | * | 
|  | 6 | * Copyright (C) 2005 Texas Instruments Inc. | 
|  | 7 | * Richard Woodruff <r-woodruff2@ti.com> | 
|  | 8 | * | 
|  | 9 | * Copyright (C) 2005 Nokia Corporation | 
|  | 10 | * Tony Lindgren <tony@atomide.com> | 
|  | 11 | * | 
|  | 12 | * This program is free software; you can redistribute it and/or modify | 
|  | 13 | * it under the terms of the GNU General Public License version 2 as | 
|  | 14 | * published by the Free Software Foundation. | 
|  | 15 | */ | 
|  | 16 |  | 
| Tony Lindgren | 646e3ed | 2008-10-06 15:49:36 +0300 | [diff] [blame] | 17 | #ifndef ARCH_ARM_MACH_OMAP2_MEMORY_H | 
|  | 18 | #define ARCH_ARM_MACH_OMAP2_MEMORY_H | 
|  | 19 |  | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 20 | /* Memory timings */ | 
|  | 21 | #define M_DDR		1 | 
|  | 22 | #define M_LOCK_CTRL	(1 << 2) | 
|  | 23 | #define M_UNLOCK	0 | 
|  | 24 | #define M_LOCK		1 | 
|  | 25 |  | 
|  | 26 | struct memory_timings { | 
|  | 27 | u32 m_type;		/* ddr = 1, sdr = 0 */ | 
|  | 28 | u32 dll_mode;		/* use lock mode = 1, unlock mode = 0 */ | 
|  | 29 | u32 slow_dll_ctrl;	/* unlock mode, dll value for slow speed */ | 
|  | 30 | u32 fast_dll_ctrl;	/* unlock mode, dll value for fast speed */ | 
|  | 31 | u32 base_cs;		/* base chip select to use for calculations */ | 
|  | 32 | }; | 
|  | 33 |  | 
|  | 34 | extern void omap2_init_memory_params(u32 force_lock_to_unlock_mode); | 
|  | 35 | extern u32 omap2_memory_get_slow_dll_ctrl(void); | 
|  | 36 | extern u32 omap2_memory_get_fast_dll_ctrl(void); | 
|  | 37 | extern u32 omap2_memory_get_type(void); | 
| Paul Walmsley | 6b8858a | 2008-03-18 10:35:15 +0200 | [diff] [blame] | 38 | u32 omap2_dll_force_needed(void); | 
|  | 39 | u32 omap2_reprogram_sdrc(u32 level, u32 force); | 
| Tony Lindgren | 646e3ed | 2008-10-06 15:49:36 +0300 | [diff] [blame] | 40 | void __init omap2_init_memory(void); | 
|  | 41 | void __init gpmc_init(void); | 
|  | 42 |  | 
|  | 43 | #endif |