Lines Matching refs:fid

57 /* Return a frequency in MHz, given an input fid */
58 static u32 find_freq_from_fid(u32 fid)
60 return 800 + (fid * 100);
63 /* Return a frequency in KHz, given an input fid */
64 static u32 find_khz_freq_from_fid(u32 fid)
66 return 1000 * find_freq_from_fid(fid);
69 /* Return the vco fid for an input fid
71 * Each "low" fid has corresponding "high" fid, and you can get to "low" fids
72 * only from corresponding high fids. This returns "high" fid corresponding to
75 static u32 convert_fid_to_vco_fid(u32 fid)
77 if (fid < HI_FID_TABLE_BOTTOM)
78 return 8 + (2 * fid);
80 return fid;
96 * Update the global current fid / vid values from the status msr.
134 u8 fid, vid;
138 fid = lo & MSR_S_LO_CURRENT_FID;
139 lo = fid | (vid << MSR_C_LO_VID_SHIFT);
145 /* write the new fid value along with the other control fields to the msr */
146 static int write_new_fid(struct powernow_k8_data *data, u32 fid)
152 if ((fid & INVALID_FID_MASK) || (data->currvid & INVALID_VID_MASK)) {
153 pr_err("internal error - overflow on fid write\n");
157 lo = fid;
161 pr_debug("writing fid 0x%x, lo 0x%x, hi 0x%x\n",
162 fid, lo, data->plllock * PLL_LOCK_CONVERSION);
175 pr_err("vid change on fid trans, old 0x%x, new 0x%x\n",
180 if (fid != data->currfid) {
181 pr_err("fid trans failed, fid 0x%x, curr 0x%x\n", fid,
217 pr_err("fid changed on vid trans, old 0x%x new 0x%x\n",
250 /* Change Opteron/Athlon64 fid and vid, by the 3 phases. */
273 pr_debug("transitioned (cpu%d): new fid 0x%x, vid 0x%x\n",
341 pr_err("ph2 null fid transition 0x%x\n", data->currfid);
388 pr_err("ph2: mismatch, failed fid transition, curr 0x%x, req 0x%x\n",
421 pr_err("ph3: bad fid change, save 0x%x, curr 0x%x\n",
514 if (pst[j].fid > MAX_FID) {
518 if (j && (pst[j].fid < HI_FID_TABLE_BOTTOM)) {
519 /* Only first fid is allowed to be in "low" range */
521 pst[j].fid);
524 if (pst[j].fid < lastfid)
525 lastfid = pst[j].fid;
532 pr_info(FW_BUG "first fid not from lo freq table\n");
549 pr_info("fid 0x%x (%d MHz), vid 0x%x\n",
573 if (pst[j-1].fid >= pst[j].fid) {
594 powernow_table[j].driver_data = pst[j].fid; /* lower 8 bits */
596 freq = find_khz_freq_from_fid(pst[j].fid);
613 if ((pst[j].fid == data->currfid) &&
804 u32 fid;
811 fid = status & EXT_FID_MASK;
815 fid = control & FID_MASK;
819 pr_debug(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);
821 index = fid | (vid<<8);
824 freq = find_khz_freq_from_fid(fid);
879 /* Take a frequency, and issue the fid/vid transition command */
884 u32 fid = 0;
891 /* fid/vid correctness check for k8 */
892 /* fid are the lower 8 bits of the index we stored into
896 fid = data->powernow_table[index].driver_data & 0xFF;
899 pr_debug("table matched fid 0x%x, giving vid 0x%x\n", fid, vid);
904 if ((data->currvid == vid) && (data->currfid == fid)) {
905 pr_debug("target matches current values (fid 0x%x, vid 0x%x)\n",
906 fid, vid);
910 pr_debug("cpu %d, changing to fid 0x%x, vid 0x%x\n",
911 smp_processor_id(), fid, vid);
913 freqs.new = find_khz_freq_from_fid(fid);
916 res = transition_fid_vid(data, fid, vid);
955 pr_debug("targ: curr fid 0x%x, vid 0x%x\n",
1075 pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n",