require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_MII_MII_H_)) {
    eval 'sub _DEV_MII_MII_H_ () {1;}' unless defined(&_DEV_MII_MII_H_);
    eval 'sub MII_NPHY () {32;}' unless defined(&MII_NPHY);
    eval 'sub MII_COMMAND_START () {0x1;}' unless defined(&MII_COMMAND_START);
    eval 'sub MII_COMMAND_READ () {0x2;}' unless defined(&MII_COMMAND_READ);
    eval 'sub MII_COMMAND_WRITE () {0x1;}' unless defined(&MII_COMMAND_WRITE);
    eval 'sub MII_COMMAND_ACK () {0x2;}' unless defined(&MII_COMMAND_ACK);
    eval 'sub MII_BMCR () {0x;}' unless defined(&MII_BMCR);
    eval 'sub BMCR_RESET () {0x8000;}' unless defined(&BMCR_RESET);
    eval 'sub BMCR_LOOP () {0x4000;}' unless defined(&BMCR_LOOP);
    eval 'sub BMCR_SPEED0 () {0x2000;}' unless defined(&BMCR_SPEED0);
    eval 'sub BMCR_AUTOEN () {0x1000;}' unless defined(&BMCR_AUTOEN);
    eval 'sub BMCR_PDOWN () {0x800;}' unless defined(&BMCR_PDOWN);
    eval 'sub BMCR_ISO () {0x400;}' unless defined(&BMCR_ISO);
    eval 'sub BMCR_STARTNEG () {0x200;}' unless defined(&BMCR_STARTNEG);
    eval 'sub BMCR_FDX () {0x100;}' unless defined(&BMCR_FDX);
    eval 'sub BMCR_CTEST () {0x80;}' unless defined(&BMCR_CTEST);
    eval 'sub BMCR_SPEED1 () {0x40;}' unless defined(&BMCR_SPEED1);
    eval 'sub BMCR_S10 () {0x;}' unless defined(&BMCR_S10);
    eval 'sub BMCR_S100 () { &BMCR_SPEED0;}' unless defined(&BMCR_S100);
    eval 'sub BMCR_S1000 () { &BMCR_SPEED1;}' unless defined(&BMCR_S1000);
    eval 'sub BMCR_SPEED {
        my($x) = @_;
	    eval q((($x) & ( &BMCR_SPEED0| &BMCR_SPEED1)));
    }' unless defined(&BMCR_SPEED);
    eval 'sub MII_BMSR () {0x1;}' unless defined(&MII_BMSR);
    eval 'sub BMSR_100T4 () {0x8000;}' unless defined(&BMSR_100T4);
    eval 'sub BMSR_100TXFDX () {0x4000;}' unless defined(&BMSR_100TXFDX);
    eval 'sub BMSR_100TXHDX () {0x2000;}' unless defined(&BMSR_100TXHDX);
    eval 'sub BMSR_10TFDX () {0x1000;}' unless defined(&BMSR_10TFDX);
    eval 'sub BMSR_10THDX () {0x800;}' unless defined(&BMSR_10THDX);
    eval 'sub BMSR_MFPS () {0x40;}' unless defined(&BMSR_MFPS);
    eval 'sub BMSR_100T2FDX () {0x400;}' unless defined(&BMSR_100T2FDX);
    eval 'sub BMSR_100T2HDX () {0x200;}' unless defined(&BMSR_100T2HDX);
    eval 'sub BMSR_EXTSTAT () {0x100;}' unless defined(&BMSR_EXTSTAT);
    eval 'sub BMSR_ACOMP () {0x20;}' unless defined(&BMSR_ACOMP);
    eval 'sub BMSR_RFAULT () {0x10;}' unless defined(&BMSR_RFAULT);
    eval 'sub BMSR_ANEG () {0x8;}' unless defined(&BMSR_ANEG);
    eval 'sub BMSR_LINK () {0x4;}' unless defined(&BMSR_LINK);
    eval 'sub BMSR_JABBER () {0x2;}' unless defined(&BMSR_JABBER);
    eval 'sub BMSR_EXTCAP () {0x1;}' unless defined(&BMSR_EXTCAP);
    eval 'sub BMSR_MEDIAMASK () {( &BMSR_100T4| &BMSR_100TXFDX| &BMSR_100TXHDX|  &BMSR_10TFDX| &BMSR_10THDX| &BMSR_100T2FDX| &BMSR_100T2HDX);}' unless defined(&BMSR_MEDIAMASK);
    eval 'sub BMSR_MEDIA_TO_ANAR {
        my($x) = @_;
	    eval q(((($x) &  &BMSR_MEDIAMASK) >> 6));
    }' unless defined(&BMSR_MEDIA_TO_ANAR);
    eval 'sub MII_PHYIDR1 () {0x2;}' unless defined(&MII_PHYIDR1);
    eval 'sub MII_PHYIDR2 () {0x3;}' unless defined(&MII_PHYIDR2);
    eval 'sub IDR2_OUILSB () {0xfc00;}' unless defined(&IDR2_OUILSB);
    eval 'sub IDR2_MODEL () {0x3f0;}' unless defined(&IDR2_MODEL);
    eval 'sub IDR2_REV () {0xf;}' unless defined(&IDR2_REV);
    eval 'sub MII_ANAR () {0x4;}' unless defined(&MII_ANAR);
    eval 'sub ANAR_NP () {0x8000;}' unless defined(&ANAR_NP);
    eval 'sub ANAR_ACK () {0x4000;}' unless defined(&ANAR_ACK);
    eval 'sub ANAR_RF () {0x2000;}' unless defined(&ANAR_RF);
    eval 'sub ANAR_FC () {0x400;}' unless defined(&ANAR_FC);
    eval 'sub ANAR_T4 () {0x200;}' unless defined(&ANAR_T4);
    eval 'sub ANAR_TX_FD () {0x100;}' unless defined(&ANAR_TX_FD);
    eval 'sub ANAR_TX () {0x80;}' unless defined(&ANAR_TX);
    eval 'sub ANAR_10_FD () {0x40;}' unless defined(&ANAR_10_FD);
    eval 'sub ANAR_10 () {0x20;}' unless defined(&ANAR_10);
    eval 'sub ANAR_CSMA () {0x1;}' unless defined(&ANAR_CSMA);
    eval 'sub ANAR_PAUSE_NONE () {(0<< 10);}' unless defined(&ANAR_PAUSE_NONE);
    eval 'sub ANAR_PAUSE_SYM () {(1<< 10);}' unless defined(&ANAR_PAUSE_SYM);
    eval 'sub ANAR_PAUSE_ASYM () {(2<< 10);}' unless defined(&ANAR_PAUSE_ASYM);
    eval 'sub ANAR_PAUSE_TOWARDS () {(3<< 10);}' unless defined(&ANAR_PAUSE_TOWARDS);
    eval 'sub ANAR_X_FD () {0x20;}' unless defined(&ANAR_X_FD);
    eval 'sub ANAR_X_HD () {0x40;}' unless defined(&ANAR_X_HD);
    eval 'sub ANAR_X_PAUSE_NONE () {(0<< 7);}' unless defined(&ANAR_X_PAUSE_NONE);
    eval 'sub ANAR_X_PAUSE_SYM () {(1<< 7);}' unless defined(&ANAR_X_PAUSE_SYM);
    eval 'sub ANAR_X_PAUSE_ASYM () {(2<< 7);}' unless defined(&ANAR_X_PAUSE_ASYM);
    eval 'sub ANAR_X_PAUSE_TOWARDS () {(3<< 7);}' unless defined(&ANAR_X_PAUSE_TOWARDS);
    eval 'sub MII_ANLPAR () {0x5;}' unless defined(&MII_ANLPAR);
    eval 'sub ANLPAR_NP () {0x8000;}' unless defined(&ANLPAR_NP);
    eval 'sub ANLPAR_ACK () {0x4000;}' unless defined(&ANLPAR_ACK);
    eval 'sub ANLPAR_RF () {0x2000;}' unless defined(&ANLPAR_RF);
    eval 'sub ANLPAR_FC () {0x400;}' unless defined(&ANLPAR_FC);
    eval 'sub ANLPAR_T4 () {0x200;}' unless defined(&ANLPAR_T4);
    eval 'sub ANLPAR_TX_FD () {0x100;}' unless defined(&ANLPAR_TX_FD);
    eval 'sub ANLPAR_TX () {0x80;}' unless defined(&ANLPAR_TX);
    eval 'sub ANLPAR_10_FD () {0x40;}' unless defined(&ANLPAR_10_FD);
    eval 'sub ANLPAR_10 () {0x20;}' unless defined(&ANLPAR_10);
    eval 'sub ANLPAR_CSMA () {0x1;}' unless defined(&ANLPAR_CSMA);
    eval 'sub ANLPAR_PAUSE_MASK () {(3<< 10);}' unless defined(&ANLPAR_PAUSE_MASK);
    eval 'sub ANLPAR_PAUSE_NONE () {(0<< 10);}' unless defined(&ANLPAR_PAUSE_NONE);
    eval 'sub ANLPAR_PAUSE_SYM () {(1<< 10);}' unless defined(&ANLPAR_PAUSE_SYM);
    eval 'sub ANLPAR_PAUSE_ASYM () {(2<< 10);}' unless defined(&ANLPAR_PAUSE_ASYM);
    eval 'sub ANLPAR_PAUSE_TOWARDS () {(3<< 10);}' unless defined(&ANLPAR_PAUSE_TOWARDS);
    eval 'sub ANLPAR_X_FD () {0x20;}' unless defined(&ANLPAR_X_FD);
    eval 'sub ANLPAR_X_HD () {0x40;}' unless defined(&ANLPAR_X_HD);
    eval 'sub ANLPAR_X_PAUSE_MASK () {(3<< 7);}' unless defined(&ANLPAR_X_PAUSE_MASK);
    eval 'sub ANLPAR_X_PAUSE_NONE () {(0<< 7);}' unless defined(&ANLPAR_X_PAUSE_NONE);
    eval 'sub ANLPAR_X_PAUSE_SYM () {(1<< 7);}' unless defined(&ANLPAR_X_PAUSE_SYM);
    eval 'sub ANLPAR_X_PAUSE_ASYM () {(2<< 7);}' unless defined(&ANLPAR_X_PAUSE_ASYM);
    eval 'sub ANLPAR_X_PAUSE_TOWARDS () {(3<< 7);}' unless defined(&ANLPAR_X_PAUSE_TOWARDS);
    eval 'sub MII_ANER () {0x6;}' unless defined(&MII_ANER);
    eval 'sub ANER_MLF () {0x10;}' unless defined(&ANER_MLF);
    eval 'sub ANER_LPNP () {0x8;}' unless defined(&ANER_LPNP);
    eval 'sub ANER_NP () {0x4;}' unless defined(&ANER_NP);
    eval 'sub ANER_PAGE_RX () {0x2;}' unless defined(&ANER_PAGE_RX);
    eval 'sub ANER_LPAN () {0x1;}' unless defined(&ANER_LPAN);
    eval 'sub MII_ANNP () {0x7;}' unless defined(&MII_ANNP);
    eval 'sub MII_ANLPRNP () {0x8;}' unless defined(&MII_ANLPRNP);
    eval 'sub MII_100T2CR () {0x9;}' unless defined(&MII_100T2CR);
    eval 'sub GTCR_TEST_MASK () {0xe000;}' unless defined(&GTCR_TEST_MASK);
    eval 'sub GTCR_MAN_MS () {0x1000;}' unless defined(&GTCR_MAN_MS);
    eval 'sub GTCR_ADV_MS () {0x800;}' unless defined(&GTCR_ADV_MS);
    eval 'sub GTCR_PORT_TYPE () {0x400;}' unless defined(&GTCR_PORT_TYPE);
    eval 'sub GTCR_ADV_1000TFDX () {0x200;}' unless defined(&GTCR_ADV_1000TFDX);
    eval 'sub GTCR_ADV_1000THDX () {0x100;}' unless defined(&GTCR_ADV_1000THDX);
    eval 'sub MII_100T2SR () {0xa;}' unless defined(&MII_100T2SR);
    eval 'sub GTSR_MAN_MS_FLT () {0x8000;}' unless defined(&GTSR_MAN_MS_FLT);
    eval 'sub GTSR_MS_RES () {0x4000;}' unless defined(&GTSR_MS_RES);
    eval 'sub GTSR_LRS () {0x2000;}' unless defined(&GTSR_LRS);
    eval 'sub GTSR_RRS () {0x1000;}' unless defined(&GTSR_RRS);
    eval 'sub GTSR_LP_1000TFDX () {0x800;}' unless defined(&GTSR_LP_1000TFDX);
    eval 'sub GTSR_LP_1000THDX () {0x400;}' unless defined(&GTSR_LP_1000THDX);
    eval 'sub GTSR_LP_ASM_DIR () {0x200;}' unless defined(&GTSR_LP_ASM_DIR);
    eval 'sub GTSR_IDLE_ERR () {0xff;}' unless defined(&GTSR_IDLE_ERR);
    eval 'sub MII_EXTSR () {0xf;}' unless defined(&MII_EXTSR);
    eval 'sub EXTSR_1000XFDX () {0x8000;}' unless defined(&EXTSR_1000XFDX);
    eval 'sub EXTSR_1000XHDX () {0x4000;}' unless defined(&EXTSR_1000XHDX);
    eval 'sub EXTSR_1000TFDX () {0x2000;}' unless defined(&EXTSR_1000TFDX);
    eval 'sub EXTSR_1000THDX () {0x1000;}' unless defined(&EXTSR_1000THDX);
    eval 'sub EXTSR_MEDIAMASK () {( &EXTSR_1000XFDX| &EXTSR_1000XHDX|  &EXTSR_1000TFDX| &EXTSR_1000THDX);}' unless defined(&EXTSR_MEDIAMASK);
}
1;
