1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 173 unchanged lines hidden (view full) --- 182 IT_GPI1 = 0x04000, 183 IT_TXDLOW = 0x08000, 184 IT_SRPD = 0x10000, 185 IT_ACK = 0x20000 186}; 187 188// Receive Descriptor struct 189struct RxDesc { |
190 union { |
191 struct { 192 Addr buf; 193 uint16_t len; 194 uint16_t csum; 195 uint8_t status; 196 uint8_t errors; 197 uint16_t vlan; 198 } legacy; --- 46 unchanged lines hidden (view full) --- 245inline void setDd(TxDesc *d) { replaceBits(d->d2, 35, 32, ULL(1)); } 246 247inline bool ide(TxDesc *d) { return bits(d->d2, 31,31) && (getType(d) == TXD_DATA || isLegacy(d)); } 248inline bool vle(TxDesc *d) { assert(isLegacy(d) || isData(d)); return bits(d->d2, 30,30); } 249inline bool rs(TxDesc *d) { return bits(d->d2, 27,27); } 250inline bool ic(TxDesc *d) { assert(isLegacy(d) || isData(d)); return isLegacy(d) && bits(d->d2, 26,26); } 251inline bool tse(TxDesc *d) { 252 if (isTypes(d, TXD_CNXT, TXD_DATA)) |
253 return bits(d->d2, 26,26); |
254 if (isType(d, TXD_ADVDATA)) 255 return bits(d->d2, 31, 31); 256 return false; 257} 258 259inline bool ifcs(TxDesc *d) { assert(isLegacy(d) || isData(d)); return bits(d->d2, 25,25); } 260inline bool eop(TxDesc *d) { assert(isLegacy(d) || isData(d)); return bits(d->d2, 24,24); } 261inline bool ip(TxDesc *d) { assert(isContext(d)); return bits(d->d2, 25,25); } --- 8 unchanged lines hidden (view full) --- 270inline int tucse(TxDesc *d) { assert(isContext(d)); return bits(d->d1,63,48); } 271inline int tucso(TxDesc *d) { assert(isContext(d)); return bits(d->d1,47,40); } 272inline int tucss(TxDesc *d) { assert(isContext(d)); return bits(d->d1,39,32); } 273inline int ipcse(TxDesc *d) { assert(isContext(d)); return bits(d->d1,31,16); } 274inline int ipcso(TxDesc *d) { assert(isContext(d)); return bits(d->d1,15,8); } 275inline int ipcss(TxDesc *d) { assert(isContext(d)); return bits(d->d1,7,0); } 276inline int mss(TxDesc *d) { assert(isContext(d)); return bits(d->d2,63,48); } 277inline int hdrlen(TxDesc *d) { |
278 assert(isContext(d)); |
279 if (!isAdvDesc(d)) 280 return bits(d->d2,47,40); |
281 return bits(d->d2, 47,40) + bits(d->d1, 8,0) + bits(d->d1, 15, 9); |
282} 283 284inline int getTsoLen(TxDesc *d) { assert(isType(d, TXD_ADVDATA)); return bits(d->d2, 63,46); } 285inline int utcmd(TxDesc *d) { assert(isContext(d)); return bits(d->d2,24,31); } 286} // namespace TxdOp 287 288 289#define ADD_FIELD32(NAME, OFFSET, BITS) \ --- 449 unchanged lines hidden (view full) --- 739 ADD_FIELD32(swesmbi, 1,1); // Software eeporm semaphore 740 ADD_FIELD32(wmng, 2,1); // Wake MNG clock 741 ADD_FIELD32(reserved, 3, 29); 742 }; 743 SWSM swsm; 744 745 struct FWSM : public Reg<uint32_t> { // 0x5B54 FWSM register 746 using Reg<uint32_t>::operator=; |
747 ADD_FIELD32(eep_fw_semaphore,0,1); 748 ADD_FIELD32(fw_mode, 1,3); 749 ADD_FIELD32(ide, 4,1); |
750 ADD_FIELD32(sol, 5,1); 751 ADD_FIELD32(eep_roload, 6,1); 752 ADD_FIELD32(reserved, 7,8); 753 ADD_FIELD32(fw_val_bit, 15, 1); 754 ADD_FIELD32(reset_cnt, 16, 3); 755 ADD_FIELD32(ext_err_ind, 19, 6); 756 ADD_FIELD32(reserved2, 25, 7); 757 }; --- 97 unchanged lines hidden --- |