require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_OFW_OFW_PCI_H_)) {
    eval 'sub _DEV_OFW_OFW_PCI_H_ () {1;}' unless defined(&_DEV_OFW_OFW_PCI_H_);
    eval 'sub OFW_PCI_PHYS_HI_NONRELOCATABLE () {0x80000000;}' unless defined(&OFW_PCI_PHYS_HI_NONRELOCATABLE);
    eval 'sub OFW_PCI_PHYS_HI_PREFETCHABLE () {0x40000000;}' unless defined(&OFW_PCI_PHYS_HI_PREFETCHABLE);
    eval 'sub OFW_PCI_PHYS_HI_ALIASED () {0x20000000;}' unless defined(&OFW_PCI_PHYS_HI_ALIASED);
    eval 'sub OFW_PCI_PHYS_HI_SPACEMASK () {0x3000000;}' unless defined(&OFW_PCI_PHYS_HI_SPACEMASK);
    eval 'sub OFW_PCI_PHYS_HI_BUSMASK () {0xff0000;}' unless defined(&OFW_PCI_PHYS_HI_BUSMASK);
    eval 'sub OFW_PCI_PHYS_HI_BUSSHIFT () {16;}' unless defined(&OFW_PCI_PHYS_HI_BUSSHIFT);
    eval 'sub OFW_PCI_PHYS_HI_DEVICEMASK () {0xf800;}' unless defined(&OFW_PCI_PHYS_HI_DEVICEMASK);
    eval 'sub OFW_PCI_PHYS_HI_DEVICESHIFT () {11;}' unless defined(&OFW_PCI_PHYS_HI_DEVICESHIFT);
    eval 'sub OFW_PCI_PHYS_HI_FUNCTIONMASK () {0x700;}' unless defined(&OFW_PCI_PHYS_HI_FUNCTIONMASK);
    eval 'sub OFW_PCI_PHYS_HI_FUNCTIONSHIFT () {8;}' unless defined(&OFW_PCI_PHYS_HI_FUNCTIONSHIFT);
    eval 'sub OFW_PCI_PHYS_HI_REGISTERMASK () {0xff;}' unless defined(&OFW_PCI_PHYS_HI_REGISTERMASK);
    eval 'sub OFW_PCI_PHYS_HI_SPACE_CONFIG () {0x;}' unless defined(&OFW_PCI_PHYS_HI_SPACE_CONFIG);
    eval 'sub OFW_PCI_PHYS_HI_SPACE_IO () {0x1000000;}' unless defined(&OFW_PCI_PHYS_HI_SPACE_IO);
    eval 'sub OFW_PCI_PHYS_HI_SPACE_MEM32 () {0x2000000;}' unless defined(&OFW_PCI_PHYS_HI_SPACE_MEM32);
    eval 'sub OFW_PCI_PHYS_HI_SPACE_MEM64 () {0x3000000;}' unless defined(&OFW_PCI_PHYS_HI_SPACE_MEM64);
    eval 'sub OFW_PCI_PHYS_HI_BUS {
        my($hi) = @_;
	    eval q(((($hi) &  &OFW_PCI_PHYS_HI_BUSMASK) >>  &OFW_PCI_PHYS_HI_BUSSHIFT));
    }' unless defined(&OFW_PCI_PHYS_HI_BUS);
    eval 'sub OFW_PCI_PHYS_HI_DEVICE {
        my($hi) = @_;
	    eval q(((($hi) &  &OFW_PCI_PHYS_HI_DEVICEMASK) >>  &OFW_PCI_PHYS_HI_DEVICESHIFT));
    }' unless defined(&OFW_PCI_PHYS_HI_DEVICE);
    eval 'sub OFW_PCI_PHYS_HI_FUNCTION {
        my($hi) = @_;
	    eval q(((($hi) &  &OFW_PCI_PHYS_HI_FUNCTIONMASK) >>  &OFW_PCI_PHYS_HI_FUNCTIONSHIFT));
    }' unless defined(&OFW_PCI_PHYS_HI_FUNCTION);
}
1;
