sdrc.c (88b6f7eb9b4a06fbfe27f2d98e249577f4cfdaef) | sdrc.c (8bd229492209c0c7d050e2f9a600c12f035d72f7) |
---|---|
1/* 2 * SMS/SDRC (SDRAM controller) common code for OMAP2/3 3 * 4 * Copyright (C) 2005, 2008 Texas Instruments Inc. 5 * Copyright (C) 2005, 2008 Nokia Corporation 6 * 7 * Tony Lindgren <tony@atomide.com> 8 * Paul Walmsley --- 46 unchanged lines hidden (view full) --- 55 * descending. Also assumes that both chip-selects use the same 56 * timing parameters. Returns a struct omap_sdrc_params * upon 57 * success, or NULL upon failure. 58 */ 59struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r) 60{ 61 struct omap_sdrc_params *sp; 62 | 1/* 2 * SMS/SDRC (SDRAM controller) common code for OMAP2/3 3 * 4 * Copyright (C) 2005, 2008 Texas Instruments Inc. 5 * Copyright (C) 2005, 2008 Nokia Corporation 6 * 7 * Tony Lindgren <tony@atomide.com> 8 * Paul Walmsley --- 46 unchanged lines hidden (view full) --- 55 * descending. Also assumes that both chip-selects use the same 56 * timing parameters. Returns a struct omap_sdrc_params * upon 57 * success, or NULL upon failure. 58 */ 59struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r) 60{ 61 struct omap_sdrc_params *sp; 62 |
63 if (!sdrc_init_params) 64 return NULL; 65 |
|
63 sp = sdrc_init_params; 64 | 66 sp = sdrc_init_params; 67 |
65 while (sp->rate != r) | 68 while (sp->rate && sp->rate != r) |
66 sp++; 67 68 if (!sp->rate) 69 return NULL; 70 71 return sp; 72} 73 --- 37 unchanged lines hidden --- | 69 sp++; 70 71 if (!sp->rate) 72 return NULL; 73 74 return sp; 75} 76 --- 37 unchanged lines hidden --- |