CSR_SPR
PUTCSR(afep, CSR_SPR, eeread & ~SPR_SROM_CHIP);
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread | val);
PUTCSR(afep, CSR_SPR, eeread | val | SPR_SROM_CLOCK);
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread | SPR_SROM_CLOCK);
if (GETCSR(afep, CSR_SPR) & SPR_SROM_DOUT) {
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread &~ SPR_SROM_CHIP);
PUTCSR(afep, CSR_SPR, val);
PUTCSR(afep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(afep, CSR_SPR, val);
PUTCSR(afep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(afep, CSR_SPR, val);
bit = (GETCSR(afep, CSR_SPR) & SPR_MII_DIN) ? 1 : 0;
PUTCSR(afep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(afep, CSR_SPR, eeread & ~SPR_SROM_CHIP);
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread | val);
PUTCSR(afep, CSR_SPR, eeread | val | SPR_SROM_CLOCK);
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread | SPR_SROM_CLOCK);
if (!(GETCSR(afep, CSR_SPR) & SPR_SROM_DOUT)) {
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread);
PUTCSR(afep, CSR_SPR, eeread &~ SPR_SROM_CHIP);
PUTCSR(mxfep, CSR_SPR, val);
PUTCSR(mxfep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(mxfep, CSR_SPR, val);
PUTCSR(mxfep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(mxfep, CSR_SPR, val);
bit = (GETCSR(mxfep, CSR_SPR) & SPR_MII_DIN) ? 1 : 0;
PUTCSR(mxfep, CSR_SPR, val | SPR_MII_CLOCK);
PUTCSR(mxfep, CSR_SPR, eeread & ~SPR_SROM_CHIP);
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread | val);
PUTCSR(mxfep, CSR_SPR, eeread | val | SPR_SROM_CLOCK);
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread | SPR_SROM_CLOCK);
if (!(GETCSR(mxfep, CSR_SPR) & SPR_SROM_DOUT)) {
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread &~ SPR_SROM_CHIP);
PUTCSR(mxfep, CSR_SPR, eeread & ~SPR_SROM_CHIP);
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread | val);
PUTCSR(mxfep, CSR_SPR, eeread | val | SPR_SROM_CLOCK);
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread | SPR_SROM_CLOCK);
if (GETCSR(mxfep, CSR_SPR) & SPR_SROM_DOUT) {
PUTCSR(mxfep, CSR_SPR, eeread);
PUTCSR(mxfep, CSR_SPR, eeread &~ SPR_SROM_CHIP);