Lines Matching +full:mclk +full:- +full:calibrate
14 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
74 struct pci_dev *pdev = to_pci_dev(dev->dev); in ast_set_def_ext_reg()
82 if (ast->chip == AST2300 || ast->chip == AST2400 || in ast_set_def_ext_reg()
83 ast->chip == AST2500) { in ast_set_def_ext_reg()
84 if (pdev->revision >= 0x20) in ast_set_def_ext_reg()
99 /* ast_set_index_reg-mask(ast, AST_IO_CRTC_PORT, 0xa1, 0xff, 0x3); */ in ast_set_def_ext_reg()
107 if (ast->chip == AST2300 || ast->chip == AST2400 || in ast_set_def_ext_reg()
108 ast->chip == AST2500) in ast_set_def_ext_reg()
140 #define CBR_SIZE_AST2150 ((16 << 10) - 1)
194 #if 0 /* unused in DDX driver - here for completeness */
265 if (dll_max[0] == 0 || (dll_max[0]-dll_min[0]) < CBR_THRESHOLD_AST2150) in cbrdlli_ast2150()
268 dlli = dll_min[0] + (((dll_max[0] - dll_min[0]) * 7) >> 4); in cbrdlli_ast2150()
284 if (ast->chip == AST2000) { in ast_init_dram_reg()
294 if (ast->chip == AST2100 || ast->chip == 2200) in ast_init_dram_reg()
312 while (dram_reg_info->index != 0xffff) { in ast_init_dram_reg()
313 if (dram_reg_info->index == 0xff00) {/* delay fn */ in ast_init_dram_reg()
315 udelay(dram_reg_info->data); in ast_init_dram_reg()
316 } else if (dram_reg_info->index == 0x4 && ast->chip != AST2000) { in ast_init_dram_reg()
317 data = dram_reg_info->data; in ast_init_dram_reg()
318 if (ast->dram_type == AST_DRAM_1Gx16) in ast_init_dram_reg()
320 else if (ast->dram_type == AST_DRAM_1Gx32) in ast_init_dram_reg()
326 ast_write32(ast, 0x10000 + dram_reg_info->index, data | temp); in ast_init_dram_reg()
328 ast_write32(ast, 0x10000 + dram_reg_info->index, dram_reg_info->data); in ast_init_dram_reg()
342 switch (ast->chip) { in ast_init_dram_reg()
370 struct pci_dev *pdev = to_pci_dev(dev->dev); in ast_post_gpu()
382 if (ast->chip == AST2600) { in ast_post_gpu()
384 } else if (ast->config_mode == ast_use_p2a) { in ast_post_gpu()
385 if (ast->chip == AST2500) in ast_post_gpu()
387 else if (ast->chip == AST2300 || ast->chip == AST2400) in ast_post_gpu()
394 if (ast->tx_chip_types & AST_TX_SIL164_BIT) in ast_post_gpu()
431 #define CBR_SIZE0 ((1 << 10) - 1)
432 #define CBR_SIZE1 ((4 << 10) - 1)
433 #define CBR_SIZE2 ((64 << 10) - 1)
653 if ((dllmax[cnt] > dllmin[cnt]) && ((dllmax[cnt] - dllmin[cnt]) >= CBR_THRESHOLD2)) { in finetuneDQI_L()
671 if ((dllmax[cnt] > dllmin[cnt]) && ((dllmax[cnt] - dllmin[cnt]) >= CBR_THRESHOLD2)) { in finetuneDQI_L()
674 dlli = ((gold_sadj[0] - dlli) * 19) >> 5; in finetuneDQI_L()
679 dlli = ((dlli - gold_sadj[0]) * 19) >> 5; in finetuneDQI_L()
683 dlli = (8 - dlli) & 0x7; in finetuneDQI_L()
693 if ((dllmax[cnt] > dllmin[cnt]) && ((dllmax[cnt] - dllmin[cnt]) >= CBR_THRESHOLD2)) { in finetuneDQI_L()
696 dlli = ((gold_sadj[1] - dlli) * 19) >> 5; in finetuneDQI_L()
700 dlli = (dlli - 1) & 0x7; in finetuneDQI_L()
703 dlli = ((dlli - gold_sadj[1]) * 19) >> 5; in finetuneDQI_L()
708 dlli = (8 - dlli) & 0x7; in finetuneDQI_L()
778 diff = pass[dqidly][dqsip][1] - pass[dqidly][dqsip][0]; in finetuneDQSI()
782 for (dlli = pass[dqidly][dqsip][0]; dlli > 0 && tag[dqsip][dlli] != 0; dlli--, passcnt[0]++); in finetuneDQSI()
788 passcnt[1] = passcnt[0] - g_side; in finetuneDQSI()
848 if (dllmax[0] == 0 || (dllmax[0]-dllmin[0]) < CBR_THRESHOLD) { in cbr_dll2()
851 if (dllmax[1] == 0 || (dllmax[1]-dllmin[1]) < CBR_THRESHOLD) { in cbr_dll2()
876 param->reg_MADJ = 0x00034C4C; in get_ddr3_info()
877 param->reg_SADJ = 0x00001800; in get_ddr3_info()
878 param->reg_DRV = 0x000000F0; in get_ddr3_info()
879 param->reg_PERIOD = param->dram_freq; in get_ddr3_info()
880 param->rodt = 0; in get_ddr3_info()
882 switch (param->dram_freq) { in get_ddr3_info()
885 param->wodt = 0; in get_ddr3_info()
886 param->reg_AC1 = 0x22202725; in get_ddr3_info()
887 param->reg_AC2 = 0xAA007613 | trap_AC2; in get_ddr3_info()
888 param->reg_DQSIC = 0x000000BA; in get_ddr3_info()
889 param->reg_MRS = 0x04001400 | trap_MRS; in get_ddr3_info()
890 param->reg_EMRS = 0x00000000; in get_ddr3_info()
891 param->reg_IOZ = 0x00000023; in get_ddr3_info()
892 param->reg_DQIDLY = 0x00000074; in get_ddr3_info()
893 param->reg_FREQ = 0x00004DC0; in get_ddr3_info()
894 param->madj_max = 96; in get_ddr3_info()
895 param->dll2_finetune_step = 3; in get_ddr3_info()
896 switch (param->dram_chipid) { in get_ddr3_info()
900 param->reg_AC2 = 0xAA007613 | trap_AC2; in get_ddr3_info()
903 param->reg_AC2 = 0xAA00761C | trap_AC2; in get_ddr3_info()
906 param->reg_AC2 = 0xAA007636 | trap_AC2; in get_ddr3_info()
913 param->wodt = 1; in get_ddr3_info()
914 param->reg_AC1 = 0x33302825; in get_ddr3_info()
915 param->reg_AC2 = 0xCC009617 | trap_AC2; in get_ddr3_info()
916 param->reg_DQSIC = 0x000000E2; in get_ddr3_info()
917 param->reg_MRS = 0x04001600 | trap_MRS; in get_ddr3_info()
918 param->reg_EMRS = 0x00000000; in get_ddr3_info()
919 param->reg_IOZ = 0x00000034; in get_ddr3_info()
920 param->reg_DRV = 0x000000FA; in get_ddr3_info()
921 param->reg_DQIDLY = 0x00000089; in get_ddr3_info()
922 param->reg_FREQ = 0x00005040; in get_ddr3_info()
923 param->madj_max = 96; in get_ddr3_info()
924 param->dll2_finetune_step = 4; in get_ddr3_info()
926 switch (param->dram_chipid) { in get_ddr3_info()
930 param->reg_AC2 = 0xCC009617 | trap_AC2; in get_ddr3_info()
933 param->reg_AC2 = 0xCC009622 | trap_AC2; in get_ddr3_info()
936 param->reg_AC2 = 0xCC00963F | trap_AC2; in get_ddr3_info()
943 param->wodt = 1; in get_ddr3_info()
944 param->reg_AC1 = 0x33302825; in get_ddr3_info()
945 param->reg_AC2 = 0xCC009617 | trap_AC2; in get_ddr3_info()
946 param->reg_DQSIC = 0x000000E2; in get_ddr3_info()
947 param->reg_MRS = 0x04001600 | trap_MRS; in get_ddr3_info()
948 param->reg_EMRS = 0x00000000; in get_ddr3_info()
949 param->reg_IOZ = 0x00000023; in get_ddr3_info()
950 param->reg_DRV = 0x000000FA; in get_ddr3_info()
951 param->reg_DQIDLY = 0x00000089; in get_ddr3_info()
952 param->reg_FREQ = 0x000050C0; in get_ddr3_info()
953 param->madj_max = 96; in get_ddr3_info()
954 param->dll2_finetune_step = 4; in get_ddr3_info()
956 switch (param->dram_chipid) { in get_ddr3_info()
960 param->reg_AC2 = 0xCC009617 | trap_AC2; in get_ddr3_info()
963 param->reg_AC2 = 0xCC009622 | trap_AC2; in get_ddr3_info()
966 param->reg_AC2 = 0xCC00963F | trap_AC2; in get_ddr3_info()
973 param->wodt = 0; in get_ddr3_info()
974 param->reg_AC1 = 0x33302926; in get_ddr3_info()
975 param->reg_AC2 = 0xCD44961A; in get_ddr3_info()
976 param->reg_DQSIC = 0x000000FC; in get_ddr3_info()
977 param->reg_MRS = 0x00081830; in get_ddr3_info()
978 param->reg_EMRS = 0x00000000; in get_ddr3_info()
979 param->reg_IOZ = 0x00000045; in get_ddr3_info()
980 param->reg_DQIDLY = 0x00000097; in get_ddr3_info()
981 param->reg_FREQ = 0x000052C0; in get_ddr3_info()
982 param->madj_max = 88; in get_ddr3_info()
983 param->dll2_finetune_step = 4; in get_ddr3_info()
987 param->wodt = 1; in get_ddr3_info()
988 param->reg_AC1 = 0x33302926; in get_ddr3_info()
989 param->reg_AC2 = 0xDE44A61D; in get_ddr3_info()
990 param->reg_DQSIC = 0x00000117; in get_ddr3_info()
991 param->reg_MRS = 0x00081A30; in get_ddr3_info()
992 param->reg_EMRS = 0x00000000; in get_ddr3_info()
993 param->reg_IOZ = 0x070000BB; in get_ddr3_info()
994 param->reg_DQIDLY = 0x000000A0; in get_ddr3_info()
995 param->reg_FREQ = 0x000054C0; in get_ddr3_info()
996 param->madj_max = 79; in get_ddr3_info()
997 param->dll2_finetune_step = 4; in get_ddr3_info()
1001 param->wodt = 1; in get_ddr3_info()
1002 param->rodt = 1; in get_ddr3_info()
1003 param->reg_AC1 = 0x33302926; in get_ddr3_info()
1004 param->reg_AC2 = 0xEF44B61E; in get_ddr3_info()
1005 param->reg_DQSIC = 0x00000125; in get_ddr3_info()
1006 param->reg_MRS = 0x00081A30; in get_ddr3_info()
1007 param->reg_EMRS = 0x00000040; in get_ddr3_info()
1008 param->reg_DRV = 0x000000F5; in get_ddr3_info()
1009 param->reg_IOZ = 0x00000023; in get_ddr3_info()
1010 param->reg_DQIDLY = 0x00000088; in get_ddr3_info()
1011 param->reg_FREQ = 0x000055C0; in get_ddr3_info()
1012 param->madj_max = 76; in get_ddr3_info()
1013 param->dll2_finetune_step = 3; in get_ddr3_info()
1017 param->reg_MADJ = 0x00136868; in get_ddr3_info()
1018 param->reg_SADJ = 0x00004534; in get_ddr3_info()
1019 param->wodt = 1; in get_ddr3_info()
1020 param->rodt = 1; in get_ddr3_info()
1021 param->reg_AC1 = 0x33302A37; in get_ddr3_info()
1022 param->reg_AC2 = 0xEF56B61E; in get_ddr3_info()
1023 param->reg_DQSIC = 0x0000013F; in get_ddr3_info()
1024 param->reg_MRS = 0x00101A50; in get_ddr3_info()
1025 param->reg_EMRS = 0x00000040; in get_ddr3_info()
1026 param->reg_DRV = 0x000000FA; in get_ddr3_info()
1027 param->reg_IOZ = 0x00000023; in get_ddr3_info()
1028 param->reg_DQIDLY = 0x00000078; in get_ddr3_info()
1029 param->reg_FREQ = 0x000057C0; in get_ddr3_info()
1030 param->madj_max = 136; in get_ddr3_info()
1031 param->dll2_finetune_step = 3; in get_ddr3_info()
1035 param->reg_MADJ = 0x00136868; in get_ddr3_info()
1036 param->reg_SADJ = 0x00004534; in get_ddr3_info()
1037 param->wodt = 1; in get_ddr3_info()
1038 param->rodt = 1; in get_ddr3_info()
1039 param->reg_AC1 = 0x32302A37; in get_ddr3_info()
1040 param->reg_AC2 = 0xDF56B61F; in get_ddr3_info()
1041 param->reg_DQSIC = 0x0000014D; in get_ddr3_info()
1042 param->reg_MRS = 0x00101A50; in get_ddr3_info()
1043 param->reg_EMRS = 0x00000004; in get_ddr3_info()
1044 param->reg_DRV = 0x000000F5; in get_ddr3_info()
1045 param->reg_IOZ = 0x00000023; in get_ddr3_info()
1046 param->reg_DQIDLY = 0x00000078; in get_ddr3_info()
1047 param->reg_FREQ = 0x000058C0; in get_ddr3_info()
1048 param->madj_max = 132; in get_ddr3_info()
1049 param->dll2_finetune_step = 3; in get_ddr3_info()
1053 param->reg_MADJ = 0x00136868; in get_ddr3_info()
1054 param->reg_SADJ = 0x00004534; in get_ddr3_info()
1055 param->wodt = 1; in get_ddr3_info()
1056 param->rodt = 1; in get_ddr3_info()
1057 param->reg_AC1 = 0x32302A37; in get_ddr3_info()
1058 param->reg_AC2 = 0xEF56B621; in get_ddr3_info()
1059 param->reg_DQSIC = 0x0000015A; in get_ddr3_info()
1060 param->reg_MRS = 0x02101A50; in get_ddr3_info()
1061 param->reg_EMRS = 0x00000004; in get_ddr3_info()
1062 param->reg_DRV = 0x000000F5; in get_ddr3_info()
1063 param->reg_IOZ = 0x00000034; in get_ddr3_info()
1064 param->reg_DQIDLY = 0x00000078; in get_ddr3_info()
1065 param->reg_FREQ = 0x000059C0; in get_ddr3_info()
1066 param->madj_max = 128; in get_ddr3_info()
1067 param->dll2_finetune_step = 3; in get_ddr3_info()
1071 switch (param->dram_chipid) { in get_ddr3_info()
1073 param->dram_config = 0x130; in get_ddr3_info()
1077 param->dram_config = 0x131; in get_ddr3_info()
1080 param->dram_config = 0x132; in get_ddr3_info()
1083 param->dram_config = 0x133; in get_ddr3_info()
1087 switch (param->vram_size) { in get_ddr3_info()
1090 param->dram_config |= 0x00; in get_ddr3_info()
1093 param->dram_config |= 0x04; in get_ddr3_info()
1096 param->dram_config |= 0x08; in get_ddr3_info()
1099 param->dram_config |= 0x0c; in get_ddr3_info()
1115 ast_moutdwm(ast, 0x1E6E0064, param->reg_MADJ); in ddr3_init()
1116 ast_moutdwm(ast, 0x1E6E0068, param->reg_SADJ); in ddr3_init()
1118 ast_moutdwm(ast, 0x1E6E0064, param->reg_MADJ | 0xC0000); in ddr3_init()
1121 ast_moutdwm(ast, 0x1E6E0004, param->dram_config); in ddr3_init()
1123 ast_moutdwm(ast, 0x1E6E0010, param->reg_AC1); in ddr3_init()
1124 ast_moutdwm(ast, 0x1E6E0014, param->reg_AC2); in ddr3_init()
1125 ast_moutdwm(ast, 0x1E6E0020, param->reg_DQSIC); in ddr3_init()
1128 ast_moutdwm(ast, 0x1E6E0088, param->reg_DQIDLY); in ddr3_init()
1139 ast_moutdwm(ast, 0x1E6E0060, param->reg_DRV); in ddr3_init()
1140 ast_moutdwm(ast, 0x1E6E006C, param->reg_IOZ); in ddr3_init()
1145 /* Wait MCLK2X lock to MCLK */ in ddr3_init()
1153 if ((data2 & 0xff) > param->madj_max) { in ddr3_init()
1188 ast_moutdwm(ast, 0x1E6E002C, param->reg_MRS | 0x100); in ddr3_init()
1189 ast_moutdwm(ast, 0x1E6E0030, param->reg_EMRS); in ddr3_init()
1194 ast_moutdwm(ast, 0x1E6E002C, param->reg_MRS); in ddr3_init()
1200 if (param->wodt) { in ddr3_init()
1203 if (param->rodt) { in ddr3_init()
1204 data = data | 0x3000 | ((param->reg_AC2 & 0x60000) >> 3); in ddr3_init()
1208 /* Calibrate the DQSI delay */ in ddr3_init()
1212 ast_moutdwm(ast, 0x1E6E0120, param->reg_FREQ); in ddr3_init()
1241 param->reg_MADJ = 0x00034C4C; in get_ddr2_info()
1242 param->reg_SADJ = 0x00001800; in get_ddr2_info()
1243 param->reg_DRV = 0x000000F0; in get_ddr2_info()
1244 param->reg_PERIOD = param->dram_freq; in get_ddr2_info()
1245 param->rodt = 0; in get_ddr2_info()
1247 switch (param->dram_freq) { in get_ddr2_info()
1250 param->wodt = 0; in get_ddr2_info()
1251 param->reg_AC1 = 0x11101513; in get_ddr2_info()
1252 param->reg_AC2 = 0x78117011; in get_ddr2_info()
1253 param->reg_DQSIC = 0x00000092; in get_ddr2_info()
1254 param->reg_MRS = 0x00000842; in get_ddr2_info()
1255 param->reg_EMRS = 0x00000000; in get_ddr2_info()
1256 param->reg_DRV = 0x000000F0; in get_ddr2_info()
1257 param->reg_IOZ = 0x00000034; in get_ddr2_info()
1258 param->reg_DQIDLY = 0x0000005A; in get_ddr2_info()
1259 param->reg_FREQ = 0x00004AC0; in get_ddr2_info()
1260 param->madj_max = 138; in get_ddr2_info()
1261 param->dll2_finetune_step = 3; in get_ddr2_info()
1265 param->wodt = 1; in get_ddr2_info()
1266 param->reg_AC1 = 0x22202613; in get_ddr2_info()
1267 param->reg_AC2 = 0xAA009016 | trap_AC2; in get_ddr2_info()
1268 param->reg_DQSIC = 0x000000BA; in get_ddr2_info()
1269 param->reg_MRS = 0x00000A02 | trap_MRS; in get_ddr2_info()
1270 param->reg_EMRS = 0x00000040; in get_ddr2_info()
1271 param->reg_DRV = 0x000000FA; in get_ddr2_info()
1272 param->reg_IOZ = 0x00000034; in get_ddr2_info()
1273 param->reg_DQIDLY = 0x00000074; in get_ddr2_info()
1274 param->reg_FREQ = 0x00004DC0; in get_ddr2_info()
1275 param->madj_max = 96; in get_ddr2_info()
1276 param->dll2_finetune_step = 3; in get_ddr2_info()
1277 switch (param->dram_chipid) { in get_ddr2_info()
1280 param->reg_AC2 = 0xAA009012 | trap_AC2; in get_ddr2_info()
1283 param->reg_AC2 = 0xAA009016 | trap_AC2; in get_ddr2_info()
1286 param->reg_AC2 = 0xAA009023 | trap_AC2; in get_ddr2_info()
1289 param->reg_AC2 = 0xAA00903B | trap_AC2; in get_ddr2_info()
1296 param->wodt = 1; in get_ddr2_info()
1297 param->rodt = 0; in get_ddr2_info()
1298 param->reg_AC1 = 0x33302714; in get_ddr2_info()
1299 param->reg_AC2 = 0xCC00B01B | trap_AC2; in get_ddr2_info()
1300 param->reg_DQSIC = 0x000000E2; in get_ddr2_info()
1301 param->reg_MRS = 0x00000C02 | trap_MRS; in get_ddr2_info()
1302 param->reg_EMRS = 0x00000040; in get_ddr2_info()
1303 param->reg_DRV = 0x000000FA; in get_ddr2_info()
1304 param->reg_IOZ = 0x00000034; in get_ddr2_info()
1305 param->reg_DQIDLY = 0x00000089; in get_ddr2_info()
1306 param->reg_FREQ = 0x00005040; in get_ddr2_info()
1307 param->madj_max = 96; in get_ddr2_info()
1308 param->dll2_finetune_step = 4; in get_ddr2_info()
1310 switch (param->dram_chipid) { in get_ddr2_info()
1312 param->reg_AC2 = 0xCC00B016 | trap_AC2; in get_ddr2_info()
1316 param->reg_AC2 = 0xCC00B01B | trap_AC2; in get_ddr2_info()
1319 param->reg_AC2 = 0xCC00B02B | trap_AC2; in get_ddr2_info()
1322 param->reg_AC2 = 0xCC00B03F | trap_AC2; in get_ddr2_info()
1330 param->wodt = 1; in get_ddr2_info()
1331 param->rodt = 0; in get_ddr2_info()
1332 param->reg_AC1 = 0x33302714; in get_ddr2_info()
1333 param->reg_AC2 = 0xCC00B01B | trap_AC2; in get_ddr2_info()
1334 param->reg_DQSIC = 0x000000E2; in get_ddr2_info()
1335 param->reg_MRS = 0x00000C02 | trap_MRS; in get_ddr2_info()
1336 param->reg_EMRS = 0x00000040; in get_ddr2_info()
1337 param->reg_DRV = 0x000000FA; in get_ddr2_info()
1338 param->reg_IOZ = 0x00000034; in get_ddr2_info()
1339 param->reg_DQIDLY = 0x00000089; in get_ddr2_info()
1340 param->reg_FREQ = 0x000050C0; in get_ddr2_info()
1341 param->madj_max = 96; in get_ddr2_info()
1342 param->dll2_finetune_step = 4; in get_ddr2_info()
1344 switch (param->dram_chipid) { in get_ddr2_info()
1346 param->reg_AC2 = 0xCC00B016 | trap_AC2; in get_ddr2_info()
1350 param->reg_AC2 = 0xCC00B01B | trap_AC2; in get_ddr2_info()
1353 param->reg_AC2 = 0xCC00B02B | trap_AC2; in get_ddr2_info()
1356 param->reg_AC2 = 0xCC00B03F | trap_AC2; in get_ddr2_info()
1363 param->wodt = 0; in get_ddr2_info()
1364 param->reg_AC1 = 0x33302815; in get_ddr2_info()
1365 param->reg_AC2 = 0xCD44B01E; in get_ddr2_info()
1366 param->reg_DQSIC = 0x000000FC; in get_ddr2_info()
1367 param->reg_MRS = 0x00000E72; in get_ddr2_info()
1368 param->reg_EMRS = 0x00000000; in get_ddr2_info()
1369 param->reg_DRV = 0x00000000; in get_ddr2_info()
1370 param->reg_IOZ = 0x00000034; in get_ddr2_info()
1371 param->reg_DQIDLY = 0x00000097; in get_ddr2_info()
1372 param->reg_FREQ = 0x000052C0; in get_ddr2_info()
1373 param->madj_max = 88; in get_ddr2_info()
1374 param->dll2_finetune_step = 3; in get_ddr2_info()
1378 param->wodt = 1; in get_ddr2_info()
1379 param->rodt = 1; in get_ddr2_info()
1380 param->reg_AC1 = 0x33302815; in get_ddr2_info()
1381 param->reg_AC2 = 0xDE44C022; in get_ddr2_info()
1382 param->reg_DQSIC = 0x00000117; in get_ddr2_info()
1383 param->reg_MRS = 0x00000E72; in get_ddr2_info()
1384 param->reg_EMRS = 0x00000040; in get_ddr2_info()
1385 param->reg_DRV = 0x0000000A; in get_ddr2_info()
1386 param->reg_IOZ = 0x00000045; in get_ddr2_info()
1387 param->reg_DQIDLY = 0x000000A0; in get_ddr2_info()
1388 param->reg_FREQ = 0x000054C0; in get_ddr2_info()
1389 param->madj_max = 79; in get_ddr2_info()
1390 param->dll2_finetune_step = 3; in get_ddr2_info()
1394 param->wodt = 1; in get_ddr2_info()
1395 param->rodt = 1; in get_ddr2_info()
1396 param->reg_AC1 = 0x33302815; in get_ddr2_info()
1397 param->reg_AC2 = 0xEF44D024; in get_ddr2_info()
1398 param->reg_DQSIC = 0x00000125; in get_ddr2_info()
1399 param->reg_MRS = 0x00000E72; in get_ddr2_info()
1400 param->reg_EMRS = 0x00000004; in get_ddr2_info()
1401 param->reg_DRV = 0x000000F9; in get_ddr2_info()
1402 param->reg_IOZ = 0x00000045; in get_ddr2_info()
1403 param->reg_DQIDLY = 0x000000A7; in get_ddr2_info()
1404 param->reg_FREQ = 0x000055C0; in get_ddr2_info()
1405 param->madj_max = 76; in get_ddr2_info()
1406 param->dll2_finetune_step = 3; in get_ddr2_info()
1410 param->wodt = 1; in get_ddr2_info()
1411 param->rodt = 1; in get_ddr2_info()
1412 param->reg_AC1 = 0x43402915; in get_ddr2_info()
1413 param->reg_AC2 = 0xFF44E025; in get_ddr2_info()
1414 param->reg_DQSIC = 0x00000132; in get_ddr2_info()
1415 param->reg_MRS = 0x00000E72; in get_ddr2_info()
1416 param->reg_EMRS = 0x00000040; in get_ddr2_info()
1417 param->reg_DRV = 0x0000000A; in get_ddr2_info()
1418 param->reg_IOZ = 0x00000045; in get_ddr2_info()
1419 param->reg_DQIDLY = 0x000000AD; in get_ddr2_info()
1420 param->reg_FREQ = 0x000056C0; in get_ddr2_info()
1421 param->madj_max = 76; in get_ddr2_info()
1422 param->dll2_finetune_step = 3; in get_ddr2_info()
1426 param->wodt = 1; in get_ddr2_info()
1427 param->rodt = 1; in get_ddr2_info()
1428 param->reg_AC1 = 0x43402915; in get_ddr2_info()
1429 param->reg_AC2 = 0xFF44E027; in get_ddr2_info()
1430 param->reg_DQSIC = 0x0000013F; in get_ddr2_info()
1431 param->reg_MRS = 0x00000E72; in get_ddr2_info()
1432 param->reg_EMRS = 0x00000004; in get_ddr2_info()
1433 param->reg_DRV = 0x000000F5; in get_ddr2_info()
1434 param->reg_IOZ = 0x00000045; in get_ddr2_info()
1435 param->reg_DQIDLY = 0x000000B3; in get_ddr2_info()
1436 param->reg_FREQ = 0x000057C0; in get_ddr2_info()
1437 param->madj_max = 76; in get_ddr2_info()
1438 param->dll2_finetune_step = 3; in get_ddr2_info()
1442 switch (param->dram_chipid) { in get_ddr2_info()
1444 param->dram_config = 0x100; in get_ddr2_info()
1448 param->dram_config = 0x121; in get_ddr2_info()
1451 param->dram_config = 0x122; in get_ddr2_info()
1454 param->dram_config = 0x123; in get_ddr2_info()
1458 switch (param->vram_size) { in get_ddr2_info()
1461 param->dram_config |= 0x00; in get_ddr2_info()
1464 param->dram_config |= 0x04; in get_ddr2_info()
1467 param->dram_config |= 0x08; in get_ddr2_info()
1470 param->dram_config |= 0x0c; in get_ddr2_info()
1483 ast_moutdwm(ast, 0x1E6E0064, param->reg_MADJ); in ddr2_init()
1484 ast_moutdwm(ast, 0x1E6E0068, param->reg_SADJ); in ddr2_init()
1486 ast_moutdwm(ast, 0x1E6E0064, param->reg_MADJ | 0xC0000); in ddr2_init()
1489 ast_moutdwm(ast, 0x1E6E0004, param->dram_config); in ddr2_init()
1491 ast_moutdwm(ast, 0x1E6E0010, param->reg_AC1); in ddr2_init()
1492 ast_moutdwm(ast, 0x1E6E0014, param->reg_AC2); in ddr2_init()
1493 ast_moutdwm(ast, 0x1E6E0020, param->reg_DQSIC); in ddr2_init()
1496 ast_moutdwm(ast, 0x1E6E0088, param->reg_DQIDLY); in ddr2_init()
1507 ast_moutdwm(ast, 0x1E6E0060, param->reg_DRV); in ddr2_init()
1508 ast_moutdwm(ast, 0x1E6E006C, param->reg_IOZ); in ddr2_init()
1514 /* Wait MCLK2X lock to MCLK */ in ddr2_init()
1522 if ((data2 & 0xff) > param->madj_max) { in ddr2_init()
1557 ast_moutdwm(ast, 0x1E6E002C, param->reg_MRS | 0x100); in ddr2_init()
1558 ast_moutdwm(ast, 0x1E6E0030, param->reg_EMRS); in ddr2_init()
1565 ast_moutdwm(ast, 0x1E6E002C, param->reg_MRS); in ddr2_init()
1567 ast_moutdwm(ast, 0x1E6E0030, param->reg_EMRS | 0x380); in ddr2_init()
1569 ast_moutdwm(ast, 0x1E6E0030, param->reg_EMRS); in ddr2_init()
1574 if (param->wodt) { in ddr2_init()
1577 if (param->rodt) { in ddr2_init()
1578 data = data | 0x3000 | ((param->reg_AC2 & 0x60000) >> 3); in ddr2_init()
1581 ast_moutdwm(ast, 0x1E6E0120, param->reg_FREQ); in ddr2_init()
1583 /* Calibrate the DQSI delay */ in ddr2_init()
2011 if (max_tries-- == 0) in ast_dram_init_2500()
2045 * If "Fast restet" is enabled for ARM-ICE debugger, in ast_patch_ahb_2500()
2084 * SCU90 is Multi-function Pin Control #5 in ast_post_chip_2500()
2087 * SCU94 is Multi-function Pin Control #6 in ast_post_chip_2500()