#include "sdram.h"
Include dependency graph for mt48lc2m32b2tg.h:
Go to the source code of this file.
Defines | |
| #define | mt481c2m32b2tg_banks 2 |
| #define | mt481c2m32b2tg_cas 3 |
| #define | mt481c2m32b2tg_cols 8 |
| #define | mt481c2m32b2tg_rows 11 |
| #define | mt481c2m32b2tg_tr (156 * (cpu_hz / 1000) ) / 10000 |
| #define | mt481c2m32b2tg_tras 5 |
| #define | mt481c2m32b2tg_trc 7 |
| #define | mt481c2m32b2tg_trcd 2 |
| #define | mt481c2m32b2tg_trp 2 |
| #define | mt481c2m32b2tg_twr 2 |
| #define | mt481c2m32b2tg_txsr 5 |
Functions | |
| void | mt481c2m32b2tg_init (const sdram_info *info) |
| #define mt481c2m32b2tg_banks 2 |
Definition at line 20 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_cas 3 |
Definition at line 32 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_cols 8 |
Definition at line 14 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_rows 11 |
Definition at line 17 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_tr (156 * (cpu_hz / 1000) ) / 10000 |
Definition at line 27 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_tras 5 |
Definition at line 47 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_trc 7 |
Definition at line 38 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_trcd 2 |
Definition at line 44 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_trp 2 |
Definition at line 41 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_twr 2 |
Definition at line 35 of file mt48lc2m32b2tg.h.
| #define mt481c2m32b2tg_txsr 5 |
Definition at line 50 of file mt48lc2m32b2tg.h.
| void mt481c2m32b2tg_init | ( | const sdram_info * | info | ) |
This function will initialize the mt481c2m32b2tg sdram.
| *info | The mt481c2m32b2tg hardware specific info |
Definition at line 39 of file mt481c2m32b2tg.c.
References MODE_AUTOREFRESH, MODE_LOAD_MR, MODE_NORMAL, MODE_PRECHARGE, mt481c2m32b2tg_tr, and sdram_info::physical_address.
Referenced by main().
00040 { 00041 volatile unsigned long *sdram = (unsigned long *) info->physical_address; 00042 unsigned long dummy_read; 00043 unsigned int i; 00044 00045 volatile avr32_sdramc_t *sdramc = &AVR32_SDRAMC; 00046 00047 // Precharge All command is issued to the SDRAM 00048 sdramc->mr = MODE_PRECHARGE; 00049 dummy_read = sdramc->mr; 00050 sdram[0] = 0; 00051 00052 // Provide eight auto-refresh (CBR) cycles 00053 sdramc->mr = MODE_AUTOREFRESH; 00054 dummy_read = sdramc->mr; 00055 for (i = 0; i < 8; i++) 00056 { 00057 sdram[0] = 0; 00058 } 00059 00060 // A mode register set (MRS) cycle is issued to program 00061 // SDRAM parameters, in particular CAS latency and burst 00062 // length. 00063 00064 // CAS from info struct, burst length 1, serial burst type 00065 sdramc->mr = MODE_LOAD_MR; 00066 dummy_read = sdramc->mr; 00067 sdram[0x020] = 0; 00068 00069 // A Normal Mode command is provided, 3 clocks after tMRD is met. 00070 dummy_read = sdramc->mr; 00071 sdramc->mr = MODE_NORMAL; 00072 dummy_read = sdramc->mr; 00073 sdram[0] = 0; 00074 00075 // Write refresh rate into SDRAMC refresh timer count register 00076 sdramc->tr = mt481c2m32b2tg_tr; 00077 }
1.5.1