• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/shared/

Lines Matching defs:oh

72 typedef int	(*otp_status_t)(void *oh);
73 typedef int (*otp_size_t)(void *oh);
75 typedef uint16 (*otp_read_bit_t)(void *oh, chipcregs_t *cc, uint off);
77 typedef int (*otp_nvread_t)(void *oh, char *data, uint *len);
78 typedef int (*otp_write_region_t)(void *oh, int region, uint16 *data, uint wlen);
81 typedef int (*otp_nvwrite_t)(void *oh, uint16 *data, uint wlen);
82 typedef int (*otp_dump_t)(void *oh, int arg, char *buf, uint size);
83 typedef int (*otp_write_word_t)(void *oh, uint wn, uint16 data);
84 typedef int (*otp_read_word_t)(void *oh, uint wn, uint16 *data);
85 typedef int (*otp_write_bits_t)(void *oh, int bn, int bits, uint8* data);
274 static int ipxotp40n_read2x(void *oh, chipcregs_t *cc, uint off);
275 static int ipxotp_write_rde_nopc(void *oh, chipcregs_t *cc, int rde, uint bit, uint val);
279 BCMNMIATTACHFN(ipxotp_status)(void *oh)
281 otpinfo_t *oi = (otpinfo_t *)oh;
287 BCMNMIATTACHFN(ipxotp_size)(void *oh)
289 otpinfo_t *oi = (otpinfo_t *)oh;
294 BCMNMIATTACHFN(ipxotp_read_bit_common)(void *oh, chipcregs_t *cc, uint off)
296 otpinfo_t *oi = (otpinfo_t *)oh;
334 BCMNMIATTACHFN(ipxotp_read_bit)(void *oh, chipcregs_t *cc, uint off)
338 oi = (otpinfo_t *)oh;
342 return ipxotp_read_bit_common(oh, cc, off);
347 BCMNMIATTACHFN(ipxotp_otprb16)(void *oh, chipcregs_t *cc, uint wn)
357 if ((bit = ipxotp_read_bit(oh, cc, base + i)) == 0xffff)
369 BCMNMIATTACHFN(ipxotp_otpr)(void *oh, chipcregs_t *cc, uint wn)
378 oi = (otpinfo_t *)oh;
900 BCMNMIATTACHFN(ipxotp_read_region)(void *oh, int region, uint16 *data, uint *wlen)
902 otpinfo_t *oi = (otpinfo_t *)oh;
1003 data[i] = ipxotp_otpr(oh, cc, base + i);
1011 BCMNMIATTACHFN(ipxotp_read_word)(void *oh, uint wn, uint16 *data)
1013 otpinfo_t *oi = (otpinfo_t *)oh;
1022 *data = ipxotp_otpr(oh, cc, wn);
1029 BCMNMIATTACHFN(ipxotp_nvread)(void *oh, char *data, uint *len)
1175 BCMNMIATTACHFN(ipxotp40n_read2x)(void *oh, chipcregs_t *cc, uint off)
1179 oi = (otpinfo_t *)oh;
1195 return ipxotp_read_bit_common(oh, cc, off);
1199 BCMNMIATTACHFN(ipxotp40n_read1x)(void *oh, chipcregs_t *cc, uint off, uint fuse)
1203 oi = (otpinfo_t *)oh;
1219 return ipxotp_read_bit_common(oh, cc, off);
1223 BCMNMIATTACHFN(ipxotp40n_verify1x)(void *oh, chipcregs_t *cc, uint off, uint fuse)
1227 oi = (otpinfo_t *)oh;
1243 return ipxotp_read_bit_common(oh, cc, off);
1326 BCMNMIATTACHFN(otp_read1x)(void *oh, uint off, uint fuse)
1328 otpinfo_t *oi = (otpinfo_t *)oh;
1349 BCMNMIATTACHFN(otp_verify1x)(void *oh, uint off, uint fuse)
1351 otpinfo_t *oi = (otpinfo_t *)oh;
1377 BCMNMIATTACHFN(otp_repair_bit)(void *oh, uint off, uint val)
1379 otpinfo_t *oi = (otpinfo_t *)oh;
1385 BCMNMIATTACHFN(otp_write_ones_old)(void *oh, uint off, uint bits)
1387 otpinfo_t *oi = (otpinfo_t *)oh;
1417 BCMNMIATTACHFN(otp_write_ones)(void *oh, uint off, uint bits)
1419 otpinfo_t *oi = (otpinfo_t *)oh;
1486 BCMNMIATTACHFN(ipxotp_write_bits)(void *oh, int bn, int bits, uint8* data)
1488 otpinfo_t *oi = (otpinfo_t *)oh;
1628 BCMNMIATTACHFN(ipxotp_write_rde_nopc)(void *oh, chipcregs_t *cc, int rde, uint bit, uint val)
1630 otpinfo_t *oi = (otpinfo_t *)oh;
1685 BCMNMIATTACHFN(ipxotp_write_rde)(void *oh, int rde, uint bit, uint val)
1687 otpinfo_t *oi = (otpinfo_t *)oh;
1699 err = ipxotp_write_rde_nopc(oh, cc, rde, bit, val);
1714 BCMNMIATTACHFN(ipxotp_fix_word16)(void *oh, uint wn, uint16 mask, uint16 val, chipcregs_t *cc)
1720 oi = (otpinfo_t *)oh;
1736 BCMNMIATTACHFN(ipxotp_check_word16)(void *oh, chipcregs_t *cc, uint wn, uint16 val)
1738 otpinfo_t *oi = (otpinfo_t *)oh;
1760 BCMNMIATTACHFN(ipxotp_write_region)(void *oh, int region, uint16 *data, uint wlen)
1762 otpinfo_t *oi = (otpinfo_t *)oh;
1962 if ((bit = ipxotp_read_bit(oh, cc, otpgu_bit_base + programmed_off)) == 0xffff) {
2003 BCMNMIATTACHFN(ipxotp_write_word)(void *oh, uint wn, uint16 data)
2005 otpinfo_t *oi = (otpinfo_t *)oh;
2253 BCMNMIATTACHFN(ipxotp_lock)(void *oh)
2257 otpinfo_t *oi = (otpinfo_t *)oh;
2304 BCMNMIATTACHFN(ipxotp_nvwrite)(void *oh, uint16 *data, uint wlen)
2314 BCMNMIATTACHFN(ipxotp_dump)(void *oh, int arg, char *buf, uint size)
2316 otpinfo_t *oi = (otpinfo_t *)oh;
2326 count = ipxotp_size(oh);
2333 val = ipxotp_otpr(oh, cc, i);
2474 BCMNMIATTACHFN(hndotp_status)(void *oh)
2476 otpinfo_t *oi = (otpinfo_t *)oh;
2481 BCMNMIATTACHFN(hndotp_size)(void *oh)
2483 otpinfo_t *oi = (otpinfo_t *)oh;
2488 BCMNMIATTACHFN(hndotp_otpr)(void *oh, chipcregs_t *cc, uint wn)
2490 otpinfo_t *oi = (otpinfo_t *)oh;
2504 BCMNMIATTACHFN(hndotp_otproff)(void *oh, chipcregs_t *cc, int woff)
2506 otpinfo_t *oi = (otpinfo_t *)oh;
2522 BCMNMIATTACHFN(hndotp_read_bit)(void *oh, chipcregs_t *cc, uint idx)
2524 otpinfo_t *oi = (otpinfo_t *)oh;
2641 BCMNMIATTACHFN(hndotp_read_region)(void *oh, int region, uint16 *data, uint *wlen)
2643 otpinfo_t *oi = (otpinfo_t *)oh;
2665 data[i] = hndotp_otpr(oh, cc, i);
2673 BCMNMIATTACHFN(hndotp_read_word)(void *oh, uint wn, uint16 *data)
2675 otpinfo_t *oi = (otpinfo_t *)oh;
2683 *data = hndotp_otpr(oh, cc, wn);
2690 BCMNMIATTACHFN(hndotp_nvread)(void *oh, char *data, uint *len)
2693 otpinfo_t *oi = (otpinfo_t *)oh;
2706 st = hndotp_status(oh);
2714 lim = hndotp_size(oh);
2726 rawotp[i] = hndotp_otpr(oh, cc, i);
2842 BCMNMIATTACHFN(hndotp_write_bit)(void *oh, chipcregs_t *cc, int bn, bool bit, int no_retry)
2844 otpinfo_t *oi = (otpinfo_t *)oh;
2932 BCMNMIATTACHFN(hndotp_write_bits)(void *oh, int bn, int bits, uint8* data)
2934 otpinfo_t *oi = (otpinfo_t *)oh;
2952 if (hndotp_write_bit(oh, cc, i + bn, (temp & 0x01), 0) != 0) {
2964 BCMNMIATTACHFN(hndotp_write_word)(void *oh, chipcregs_t *cc, int wn, uint16 data)
2975 err += hndotp_write_bit(oh, cc, base + i, data & 1, 0);
2988 BCMNMIATTACHFN(hndotp_valid_rce)(void *oh, chipcregs_t *cc, int i)
2990 otpinfo_t *oi = (otpinfo_t *)oh;
3004 fw = hndotp_size(oh)/2 + OTP_RC0_OFF + e;
3007 fw = hndotp_size(oh)/2 + OTP_RC1_OFF + e;
3010 rce = hndotp_otpr(oh, cc, fw+1) << 16 | hndotp_otpr(oh, cc, fw);
3021 BCMNMIATTACHFN(hndotp_write_rce)(void *oh, chipcregs_t *cc, int r, uint16* data)
3026 ASSERT(((otpinfo_t *)oh)->ccrev >= 18);
3027 ASSERT(r >= 0 && r < hndotp_size(oh)/(2*OTP_WPR));
3033 int rr = hndotp_valid_rce(oh, cc, rce);
3052 err += hndotp_write_word(oh, cc, hndotp_size(oh)/2+OTP_RD_OFF+rce*4+i,
3063 rcr = hndotp_size(oh)/2 + OTP_RC0_OFF;
3066 rcr = hndotp_size(oh)/2 + OTP_RC1_OFF;
3074 if (hndotp_write_bit(oh, cc, bit, (rt & (err ? 0 : 1)), err)) {
3087 if (hndotp_write_bit(oh, cc, bit, (sign & (err ? 0 : 1)), err)) {
3113 BCMNMIATTACHFN(hndotp_write_row)(void *oh, chipcregs_t *cc, int wn, uint16* data, bool rewrite)
3115 otpinfo_t *oi = (otpinfo_t *)oh;
3122 if (rewrite && (data[i] == hndotp_otpr(oh, cc, wn+i)))
3125 err += hndotp_write_word(oh, cc, wn + i, data[i]);
3131 if ((err = hndotp_write_rce(oh, cc, wn / OTP_WPR, data)))
3140 BCMNMIATTACHFN(hndotp_write_region)(void *oh, int region, uint16 *data, uint wlen)
3142 otpinfo_t *oi = (otpinfo_t *)oh;
3206 if ((ret = hndotp_write_row(oh, cc, wn, data, rewrite)) != 0) {
3220 if (hndotp_write_word(oh, cc, (oi->size / 2) + OTP_BOUNDARY_OFF, lim * 2) != 0) {
3224 if (hndotp_write_word(oh, cc, (oi->size / 2) + OTP_HWSIGN_OFF,
3232 if (hndotp_write_word(oh, cc, (oi->size / 2) + OTP_SWSIGN_OFF,
3239 if (hndotp_write_word(oh, cc, (oi->size / 2) + OTP_CIDSIGN_OFF,
3274 BCMNMIATTACHFN(hndotp_lock)(void *oh)
3276 otpinfo_t *oi = (otpinfo_t *)oh;
3296 if ((hndotp_valid_rce(oh, cc, i) != -1))
3302 if ((hndotp_valid_rce(oh, cc, i) == -1)) {
3309 rcr = hndotp_size(oh)/2 + OTP_RC0_OFF;
3312 rcr = hndotp_size(oh)/2 + OTP_RC1_OFF;
3318 hndotp_write_bit(oh, cc, bit, 0, 1);
3333 BCMNMIATTACHFN(hndotp_nvwrite)(void *oh, uint16 *data, uint wlen)
3335 otpinfo_t *oi = (otpinfo_t *)oh;
3361 if (hndotp_otpr(oh, cc, wn) == OTP_MAGIC) {
3362 base = wn + (hndotp_otpr(oh, cc, wn + 1) / 2);
3396 err = hndotp_write_word(oh, cc, base, hdr[0]);
3400 err += hndotp_write_word(oh, cc, wn++, *p++);
3412 err += hndotp_write_word(oh, cc, wn++, crc);
3423 err += hndotp_write_word(oh, cc, base + 1, clen);
3429 if (hndotp_write_word(oh, cc, (oi->size / 2) + OTP_BOUNDARY_OFF,
3431 gerr += hndotp_write_word(oh, cc, (oi->size / 2) + OTP_HWSIGN_OFF,
3472 BCMNMIATTACHFN(hndotp_otprb16)(void *oh, chipcregs_t *cc, uint wn)
3480 if ((bit = hndotp_read_bit(oh, cc, base + i)) == 0xffff)
3490 BCMNMIATTACHFN(hndotp_dump)(void *oh, int arg, char *buf, uint size)
3492 otpinfo_t *oi = (otpinfo_t *)oh;
3520 val = hndotp_otpr(oh, cc, i);
3527 hndotp_read_bit(oh, cc, ((i / 4) * 65) + 64) & 1);
3595 BCMNMIATTACHFN(otp_status)(void *oh)
3597 otpinfo_t *oi = (otpinfo_t *)oh;
3599 return oi->fn->status(oh);
3603 BCMNMIATTACHFN(otp_size)(void *oh)
3605 otpinfo_t *oi = (otpinfo_t *)oh;
3607 return oi->fn->size(oh);
3611 BCMNMIATTACHFN(otp_read_bit)(void *oh, uint offset)
3613 otpinfo_t *oi = (otpinfo_t *)oh;
3616 uint16 readBit = (uint16)oi->fn->read_bit(oh, cc, offset);
3623 BCMNMIATTACHFN(otp_write_bits)(void *oh, uint offset, int bits, uint8* data)
3625 otpinfo_t *oi = (otpinfo_t *)oh;
3626 return oi->fn->write_bits(oh, offset, bits, data);
3685 void *oh;
3696 oh = otp_init(sih);
3697 if (oh == NULL) {
3703 err = (((otpinfo_t*)oh)->fn->read_region)(oh, region, data, wlen);
3716 void *oh;
3727 oh = otp_init(sih);
3728 if (oh == NULL) {
3734 if (((otpinfo_t*)oh)->fn->read_word == NULL) {
3738 err = (((otpinfo_t*)oh)->fn->read_word)(oh, wn, data);
3748 BCMNMIATTACHFN(otp_nvread)(void *oh, char *data, uint *len)
3750 otpinfo_t *oi = (otpinfo_t *)oh;
3752 return oi->fn->nvread(oh, data, len);
3760 void *oh;
3771 oh = otp_init(sih);
3772 if (oh == NULL) {
3778 err = (((otpinfo_t*)oh)->fn->write_region)(oh, region, data, wlen);
3791 void *oh;
3802 oh = otp_init(sih);
3803 if (oh == NULL) {
3809 if (((otpinfo_t*)oh)->fn->write_word == NULL) {
3813 err = (((otpinfo_t*)oh)->fn->write_word)(oh, wn, data);
3825 void *oh = otp_init(sih);
3827 if (oh == NULL) {
3831 return (((otpinfo_t*)oh)->fn->cis_append_region)(sih, region, vars, count);
3838 void *oh;
3849 oh = otp_init(sih);
3850 if (oh == NULL) {
3856 ret = (((otpinfo_t*)oh)->fn->lock)(oh);
3866 BCMNMIATTACHFN(otp_nvwrite)(void *oh, uint16 *data, uint wlen)
3868 otpinfo_t *oi = (otpinfo_t *)oh;
3870 return oi->fn->nvwrite(oh, data, wlen);
3876 BCMNMIATTACHFN(otp_dump)(void *oh, int arg, char *buf, uint size)
3878 otpinfo_t *oi = (otpinfo_t *)oh;
3883 return oi->fn->dump(oh, arg, buf, size);
3887 BCMNMIATTACHFN(otp_dumpstats)(void *oh, int arg, char *buf, uint size)
3889 otpinfo_t *oi = (otpinfo_t *)oh;