require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_DEV_IC_W83L518DREG_H)) {
    eval 'sub _SYS_DEV_IC_W83L518DREG_H () {1;}' unless defined(&_SYS_DEV_IC_W83L518DREG_H);
    eval 'sub WB_REG_RESET () {0x2;}' unless defined(&WB_REG_RESET);
    eval 'sub WB_RESET_SWRST () {0x1;}' unless defined(&WB_RESET_SWRST);
    eval 'sub WB_REG_DEVNO () {0x7;}' unless defined(&WB_REG_DEVNO);
    eval 'sub WB_DEVNO_SC () {0x;}' unless defined(&WB_DEVNO_SC);
    eval 'sub WB_DEVNO_MS () {0x1;}' unless defined(&WB_DEVNO_MS);
    eval 'sub WB_DEVNO_GPIO () {0x2;}' unless defined(&WB_DEVNO_GPIO);
    eval 'sub WB_DEVNO_SD () {0x3;}' unless defined(&WB_DEVNO_SD);
    eval 'sub WB_REG_DEVID_HI () {0x20;}' unless defined(&WB_REG_DEVID_HI);
    eval 'sub WB_REG_DEVID_LO () {0x21;}' unless defined(&WB_REG_DEVID_LO);
    eval 'sub WB_DEVID_W83L518D () {0x7110;}' unless defined(&WB_DEVID_W83L518D);
    eval 'sub WB_DEVID_W83L519D () {0x7120;}' unless defined(&WB_DEVID_W83L519D);
    eval 'sub WB_DEVID_REVISION {
        my($id) = @_;
	    eval q((($id) & 0xf));
    }' unless defined(&WB_DEVID_REVISION);
    eval 'sub WB_REG_POWER () {0x22;}' unless defined(&WB_REG_POWER);
    eval 'sub WB_POWER_SC () {0x80;}' unless defined(&WB_POWER_SC);
    eval 'sub WB_POWER_MS () {0x40;}' unless defined(&WB_POWER_MS);
    eval 'sub WB_POWER_SD () {0x20;}' unless defined(&WB_POWER_SD);
    eval 'sub WB_REG_PME () {0x23;}' unless defined(&WB_REG_PME);
    eval 'sub WB_PME_PME_EN () {0x80;}' unless defined(&WB_PME_PME_EN);
    eval 'sub WB_PME_MSPME_EN () {0x40;}' unless defined(&WB_PME_MSPME_EN);
    eval 'sub WB_PME_SDPME_EN () {0x20;}' unless defined(&WB_PME_SDPME_EN);
    eval 'sub WB_PME_SCPME_EN () {0x10;}' unless defined(&WB_PME_SCPME_EN);
    eval 'sub WB_REG_PMESTS () {0x24;}' unless defined(&WB_REG_PMESTS);
    eval 'sub WB_PMESTS_MSPME_STS () {0x40;}' unless defined(&WB_PMESTS_MSPME_STS);
    eval 'sub WB_PMESTS_SDPME_STS () {0x20;}' unless defined(&WB_PMESTS_SDPME_STS);
    eval 'sub WB_PMESTS_SCPME_STS () {0x10;}' unless defined(&WB_PMESTS_SCPME_STS);
    eval 'sub WB_REG_CFG () {0x26;}' unless defined(&WB_REG_CFG);
    eval 'sub WB_CFG_HEFRAS () {0x40;}' unless defined(&WB_CFG_HEFRAS);
    eval 'sub WB_CFG_LOCKREG () {0x20;}' unless defined(&WB_CFG_LOCKREG);
    eval 'sub WB_REG_MFSEL () {0x29;}' unless defined(&WB_REG_MFSEL);
    eval 'sub WB_REG_DEV_EN () {0x30;}' unless defined(&WB_REG_DEV_EN);
    eval 'sub WB_DEV_EN_ACTIVE () {0x1;}' unless defined(&WB_DEV_EN_ACTIVE);
    eval 'sub WB_REG_DEV_BASE_HI () {0x60;}' unless defined(&WB_REG_DEV_BASE_HI);
    eval 'sub WB_REG_DEV_BASE_LO () {0x61;}' unless defined(&WB_REG_DEV_BASE_LO);
    eval 'sub WB_REG_DEV_IRQ () {0x70;}' unless defined(&WB_REG_DEV_IRQ);
    eval 'sub WB_DEV_IRQ_MASK () {0xf;}' unless defined(&WB_DEV_IRQ_MASK);
    eval 'sub WB_REG_DEV_DRQ () {0x74;}' unless defined(&WB_REG_DEV_DRQ);
    eval 'sub WB_DEV_DRQ_MASK () {0xf;}' unless defined(&WB_DEV_DRQ_MASK);
    eval 'sub WB_REG_DEV_MISC () {0xf0;}' unless defined(&WB_REG_DEV_MISC);
    eval 'sub WB_DEV_MISC_SCIRQ_SHR () {0x80;}' unless defined(&WB_DEV_MISC_SCIRQ_SHR);
    eval 'sub WB_DEV_MISC_SCPSNT_POL () {0x1;}' unless defined(&WB_DEV_MISC_SCPSNT_POL);
    eval 'sub WB_DEV_MISC_MSIRQ_POLL () {0x10;}' unless defined(&WB_DEV_MISC_MSIRQ_POLL);
    eval 'sub WB_DEV_MISC_MSIRQ_POLP () {0x8;}' unless defined(&WB_DEV_MISC_MSIRQ_POLP);
    eval 'sub WB_DEV_MISC_MSIRQ_SHR () {0x4;}' unless defined(&WB_DEV_MISC_MSIRQ_SHR);
    eval 'sub WB_DEV_MISC_MS4OUT_POL () {0x2;}' unless defined(&WB_DEV_MISC_MS4OUT_POL);
    eval 'sub WB_DEV_MISC_MS4OUT_EN () {0x1;}' unless defined(&WB_DEV_MISC_MS4OUT_EN);
    eval 'sub WB_DEV_MISC_SDDATA3_HI () {0x20;}' unless defined(&WB_DEV_MISC_SDDATA3_HI);
    eval 'sub WB_DEV_MISC_SDDATA3_OUT () {0x10;}' unless defined(&WB_DEV_MISC_SDDATA3_OUT);
    eval 'sub WB_DEV_MISC_SDGP11_HI () {0x4;}' unless defined(&WB_DEV_MISC_SDGP11_HI);
    eval 'sub WB_DEV_MISC_SDGP11_DET () {0x2;}' unless defined(&WB_DEV_MISC_SDGP11_DET);
    eval 'sub WB_DEV_MISC_SDDATA3_DET () {0x1;}' unless defined(&WB_DEV_MISC_SDDATA3_DET);
    eval 'sub WB_REG_DEV_IRQCFG () {0xf1;}' unless defined(&WB_REG_DEV_IRQCFG);
    eval 'sub WB_DEV_IRQCFG_HI_L () {0x8;}' unless defined(&WB_DEV_IRQCFG_HI_L);
    eval 'sub WB_DEV_IRQCFG_HI_P () {0x4;}' unless defined(&WB_DEV_IRQCFG_HI_P);
    eval 'sub WB_DEV_IRQCFG_MODE () {0x2;}' unless defined(&WB_DEV_IRQCFG_MODE);
    eval 'sub WB_DEV_IRQCFG_DEBOUNCE () {0x1;}' unless defined(&WB_DEV_IRQCFG_DEBOUNCE);
    eval 'sub WB_SD_COMMAND () {0x;}' unless defined(&WB_SD_COMMAND);
    eval 'sub WB_SD_FIFO () {0x1;}' unless defined(&WB_SD_FIFO);
    eval 'sub WB_SD_INTCTL () {0x2;}' unless defined(&WB_SD_INTCTL);
    eval 'sub WB_SD_INTSTS () {0x3;}' unless defined(&WB_SD_INTSTS);
    eval 'sub WB_INT_PENDING () {0x80;}' unless defined(&WB_INT_PENDING);
    eval 'sub WB_INT_CARD () {0x40;}' unless defined(&WB_INT_CARD);
    eval 'sub WB_INT_FIFO () {0x20;}' unless defined(&WB_INT_FIFO);
    eval 'sub WB_INT_CRC () {0x10;}' unless defined(&WB_INT_CRC);
    eval 'sub WB_INT_TIMEOUT () {0x8;}' unless defined(&WB_INT_TIMEOUT);
    eval 'sub WB_INT_PROGEND () {0x4;}' unless defined(&WB_INT_PROGEND);
    eval 'sub WB_INT_BUSYEND () {0x2;}' unless defined(&WB_INT_BUSYEND);
    eval 'sub WB_INT_TC () {0x1;}' unless defined(&WB_INT_TC);
    eval 'sub WB_INT_DEFAULT () {( &WB_INT_CARD| &WB_INT_FIFO| &WB_INT_CRC| &WB_INT_TIMEOUT);}' unless defined(&WB_INT_DEFAULT);
    eval 'sub WB_SD_FIFOSTS () {0x4;}' unless defined(&WB_SD_FIFOSTS);
    eval 'sub WB_FIFO_EMPTY () {0x80;}' unless defined(&WB_FIFO_EMPTY);
    eval 'sub WB_FIFO_FULL () {0x40;}' unless defined(&WB_FIFO_FULL);
    eval 'sub WB_FIFO_EMPTY_THRES () {0x20;}' unless defined(&WB_FIFO_EMPTY_THRES);
    eval 'sub WB_FIFO_FULL_THRES () {0x10;}' unless defined(&WB_FIFO_FULL_THRES);
    eval 'sub WB_FIFO_DEPTH_MASK () {0xf;}' unless defined(&WB_FIFO_DEPTH_MASK);
    eval 'sub WB_SD_INDEX () {0x5;}' unless defined(&WB_SD_INDEX);
    eval 'sub WB_INDEX_CLK () {0x1;}' unless defined(&WB_INDEX_CLK);
    eval 'sub WB_CLK_375K () {0x;}' unless defined(&WB_CLK_375K);
    eval 'sub WB_CLK_12M () {0x1;}' unless defined(&WB_CLK_12M);
    eval 'sub WB_CLK_16M () {0x2;}' unless defined(&WB_CLK_16M);
    eval 'sub WB_CLK_24M () {0x3;}' unless defined(&WB_CLK_24M);
    eval 'sub WB_INDEX_PBSMSB () {0x2;}' unless defined(&WB_INDEX_PBSMSB);
    eval 'sub WB_INDEX_TAAC () {0x3;}' unless defined(&WB_INDEX_TAAC);
    eval 'sub WB_INDEX_NSAC () {0x4;}' unless defined(&WB_INDEX_NSAC);
    eval 'sub WB_INDEX_PBSLSB () {0x5;}' unless defined(&WB_INDEX_PBSLSB);
    eval 'sub WB_INDEX_SETUP () {0x6;}' unless defined(&WB_INDEX_SETUP);
    eval 'sub WB_SETUP_DATA3_HI () {0x8;}' unless defined(&WB_SETUP_DATA3_HI);
    eval 'sub WB_SETUP_FIFO_RST () {0x4;}' unless defined(&WB_SETUP_FIFO_RST);
    eval 'sub WB_SETUP_SOFT_RST () {0x2;}' unless defined(&WB_SETUP_SOFT_RST);
    eval 'sub WB_INDEX_DMA () {0x7;}' unless defined(&WB_INDEX_DMA);
    eval 'sub WB_INDEX_FIFOEN () {0x8;}' unless defined(&WB_INDEX_FIFOEN);
    eval 'sub WB_FIFOEN_EMPTY () {0x20;}' unless defined(&WB_FIFOEN_EMPTY);
    eval 'sub WB_FIFOEN_FULL () {0x10;}' unless defined(&WB_FIFOEN_FULL);
    eval 'sub WB_INDEX_STATUS () {0x10;}' unless defined(&WB_INDEX_STATUS);
    eval 'sub WB_STATUS_BLOCK_READ () {0x80;}' unless defined(&WB_STATUS_BLOCK_READ);
    eval 'sub WB_STATUS_BLOCK_WRITE () {0x40;}' unless defined(&WB_STATUS_BLOCK_WRITE);
    eval 'sub WB_STATUS_BUSY () {0x20;}' unless defined(&WB_STATUS_BUSY);
    eval 'sub WB_STATUS_CARD_TRAFFIC () {0x4;}' unless defined(&WB_STATUS_CARD_TRAFFIC);
    eval 'sub WB_STATUS_SEND_COMMAND () {0x2;}' unless defined(&WB_STATUS_SEND_COMMAND);
    eval 'sub WB_STATUS_RECV_RES () {0x1;}' unless defined(&WB_STATUS_RECV_RES);
    eval 'sub WB_INDEX_RESPLEN () {0x1e;}' unless defined(&WB_INDEX_RESPLEN);
    eval 'sub WB_INDEX_RESP {
        my($n) = @_;
	    eval q((0x1f + ($n)));
    }' unless defined(&WB_INDEX_RESP);
    eval 'sub WB_INDEX_CRCSTS () {0x30;}' unless defined(&WB_INDEX_CRCSTS);
    eval 'sub WB_INDEX_ISR () {0x3f;}' unless defined(&WB_INDEX_ISR);
    eval 'sub WB_SD_DATA () {0x6;}' unless defined(&WB_SD_DATA);
    eval 'sub WB_SD_CSR () {0x7;}' unless defined(&WB_SD_CSR);
    eval 'sub WB_CSR_MS_LED () {0x20;}' unless defined(&WB_CSR_MS_LED);
    eval 'sub WB_CSR_POWER_N () {0x10;}' unless defined(&WB_CSR_POWER_N);
    eval 'sub WB_CSR_WRITE_PROTECT () {0x4;}' unless defined(&WB_CSR_WRITE_PROTECT);
    eval 'sub WB_CSR_CARD_PRESENT () {0x1;}' unless defined(&WB_CSR_CARD_PRESENT);
}
1;
