require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_PCIIDE_NFORCE_REG_H_)) {
    eval 'sub _DEV_PCI_PCIIDE_NFORCE_REG_H_ () {1;}' unless defined(&_DEV_PCI_PCIIDE_NFORCE_REG_H_);
    eval 'sub NFORCE_CONF () {0x50;}' unless defined(&NFORCE_CONF);
    eval 'sub NFORCE_CHAN_EN {
        my($chan) = @_;
	    eval q((0x1 << (1- ($chan))));
    }' unless defined(&NFORCE_CHAN_EN);
    eval 'sub NFORCE_PIODMATIM () {0x58;}' unless defined(&NFORCE_PIODMATIM);
    eval 'sub NFORCE_PIODMATIM_MASK {
        my($chan) = @_;
	    eval q((0xffff << ((1- ($chan)) * 16)));
    }' unless defined(&NFORCE_PIODMATIM_MASK);
    eval 'sub NFORCE_PIODMATIM_SET {
        my($chan, $drive, $x) = @_;
	    eval q((($x) << ((3- (($chan) * 2+ ($drive))) * 8)));
    }' unless defined(&NFORCE_PIODMATIM_SET);
    eval 'sub NFORCE_PIOTIM () {0x5c;}' unless defined(&NFORCE_PIOTIM);
    eval 'sub NFORCE_UDMATIM () {0x60;}' unless defined(&NFORCE_UDMATIM);
    eval 'sub NFORCE_UDMATIM_MASK {
        my($chan) = @_;
	    eval q((0xffff << ((1- ($chan)) * 16)));
    }' unless defined(&NFORCE_UDMATIM_MASK);
    eval 'sub NFORCE_UDMATIM_SET {
        my($chan, $drive, $x) = @_;
	    eval q((($x) << ((3- (($chan) * 2+ ($drive))) * 8)));
    }' unless defined(&NFORCE_UDMATIM_SET);
    eval 'sub NFORCE_UDMA_EN {
        my($chan, $drive) = @_;
	    eval q((0x40 << ((3- (($chan) * 2+ ($drive))) * 8)));
    }' unless defined(&NFORCE_UDMA_EN);
    eval 'sub NFORCE_UDMA_ENM {
        my($chan, $drive) = @_;
	    eval q((0x80 << ((3- (($chan) * 2+ ($drive))) * 8)));
    }' unless defined(&NFORCE_UDMA_ENM);
}
1;
