require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_CARDBUS_CARDBUSVAR_H_)) {
    eval 'sub _DEV_CARDBUS_CARDBUSVAR_H_ () {1;}' unless defined(&_DEV_CARDBUS_CARDBUSVAR_H_);
    require 'dev/pci/pcivar.ph';
    require 'dev/cardbus/rbus.ph';
    eval 'sub CARDBUS_ID_REG () {0x;}' unless defined(&CARDBUS_ID_REG);
    eval 'sub CARDBUS_VENDOR_SHIFT () {0;}' unless defined(&CARDBUS_VENDOR_SHIFT);
    eval 'sub CARDBUS_VENDOR_MASK () {0xffff;}' unless defined(&CARDBUS_VENDOR_MASK);
    eval 'sub CARDBUS_VENDOR {
        my($id) = @_;
	    eval q(((($id) >>  &CARDBUS_VENDOR_SHIFT) &  &CARDBUS_VENDOR_MASK));
    }' unless defined(&CARDBUS_VENDOR);
    eval 'sub CARDBUS_PRODUCT_SHIFT () {16;}' unless defined(&CARDBUS_PRODUCT_SHIFT);
    eval 'sub CARDBUS_PRODUCT_MASK () {0xffff;}' unless defined(&CARDBUS_PRODUCT_MASK);
    eval 'sub CARDBUS_PRODUCT {
        my($id) = @_;
	    eval q(((($id) >>  &CARDBUS_PRODUCT_SHIFT) &  &CARDBUS_PRODUCT_MASK));
    }' unless defined(&CARDBUS_PRODUCT);
    eval 'sub CARDBUS_COMMAND_STATUS_REG () {0x4;}' unless defined(&CARDBUS_COMMAND_STATUS_REG);
    eval 'sub CARDBUS_COMMAND_IO_ENABLE () {0x1;}' unless defined(&CARDBUS_COMMAND_IO_ENABLE);
    eval 'sub CARDBUS_COMMAND_MEM_ENABLE () {0x2;}' unless defined(&CARDBUS_COMMAND_MEM_ENABLE);
    eval 'sub CARDBUS_COMMAND_MASTER_ENABLE () {0x4;}' unless defined(&CARDBUS_COMMAND_MASTER_ENABLE);
    eval 'sub CARDBUS_CLASS_REG () {0x8;}' unless defined(&CARDBUS_CLASS_REG);
    eval 'sub CARDBUS_CLASS_SHIFT () {24;}' unless defined(&CARDBUS_CLASS_SHIFT);
    eval 'sub CARDBUS_CLASS_MASK () {0xff;}' unless defined(&CARDBUS_CLASS_MASK);
    eval 'sub CARDBUS_CLASS {
        my($cr) = @_;
	    eval q(((($cr) >>  &CARDBUS_CLASS_SHIFT) &  &CARDBUS_CLASS_MASK));
    }' unless defined(&CARDBUS_CLASS);
    eval 'sub CARDBUS_SUBCLASS_SHIFT () {16;}' unless defined(&CARDBUS_SUBCLASS_SHIFT);
    eval 'sub CARDBUS_SUBCLASS_MASK () {0xff;}' unless defined(&CARDBUS_SUBCLASS_MASK);
    eval 'sub CARDBUS_SUBCLASS {
        my($cr) = @_;
	    eval q(((($cr) >>  &CARDBUS_SUBCLASS_SHIFT) &  &CARDBUS_SUBCLASS_MASK));
    }' unless defined(&CARDBUS_SUBCLASS);
    eval 'sub CARDBUS_INTERFACE_SHIFT () {8;}' unless defined(&CARDBUS_INTERFACE_SHIFT);
    eval 'sub CARDBUS_INTERFACE_MASK () {0xff;}' unless defined(&CARDBUS_INTERFACE_MASK);
    eval 'sub CARDBUS_INTERFACE {
        my($cr) = @_;
	    eval q(((($cr) >>  &CARDBUS_INTERFACE_SHIFT) &  &CARDBUS_INTERFACE_MASK));
    }' unless defined(&CARDBUS_INTERFACE);
    eval 'sub CARDBUS_REVISION_SHIFT () {0;}' unless defined(&CARDBUS_REVISION_SHIFT);
    eval 'sub CARDBUS_REVISION_MASK () {0xff;}' unless defined(&CARDBUS_REVISION_MASK);
    eval 'sub CARDBUS_REVISION {
        my($cr) = @_;
	    eval q(((($cr) >>  &CARDBUS_REVISION_SHIFT) &  &CARDBUS_REVISION_MASK));
    }' unless defined(&CARDBUS_REVISION);
    eval 'sub CARDBUS_CLASS_PREHISTORIC () {0x;}' unless defined(&CARDBUS_CLASS_PREHISTORIC);
    eval 'sub CARDBUS_CLASS_MASS_STORAGE () {0x1;}' unless defined(&CARDBUS_CLASS_MASS_STORAGE);
    eval 'sub CARDBUS_CLASS_NETWORK () {0x2;}' unless defined(&CARDBUS_CLASS_NETWORK);
    eval 'sub CARDBUS_CLASS_DISPLAY () {0x3;}' unless defined(&CARDBUS_CLASS_DISPLAY);
    eval 'sub CARDBUS_CLASS_MULTIMEDIA () {0x4;}' unless defined(&CARDBUS_CLASS_MULTIMEDIA);
    eval 'sub CARDBUS_CLASS_MEMORY () {0x5;}' unless defined(&CARDBUS_CLASS_MEMORY);
    eval 'sub CARDBUS_CLASS_BRIDGE () {0x6;}' unless defined(&CARDBUS_CLASS_BRIDGE);
    eval 'sub CARDBUS_CLASS_COMMUNICATIONS () {0x7;}' unless defined(&CARDBUS_CLASS_COMMUNICATIONS);
    eval 'sub CARDBUS_CLASS_SYSTEM () {0x8;}' unless defined(&CARDBUS_CLASS_SYSTEM);
    eval 'sub CARDBUS_CLASS_INPUT () {0x9;}' unless defined(&CARDBUS_CLASS_INPUT);
    eval 'sub CARDBUS_CLASS_DOCK () {0xa;}' unless defined(&CARDBUS_CLASS_DOCK);
    eval 'sub CARDBUS_CLASS_PROCESSOR () {0xb;}' unless defined(&CARDBUS_CLASS_PROCESSOR);
    eval 'sub CARDBUS_CLASS_SERIALBUS () {0xc;}' unless defined(&CARDBUS_CLASS_SERIALBUS);
    eval 'sub CARDBUS_CLASS_UNDEFINED () {0xff;}' unless defined(&CARDBUS_CLASS_UNDEFINED);
    eval 'sub CARDBUS_SUBCLASS_SERIALBUS_FIREWIRE () {0x;}' unless defined(&CARDBUS_SUBCLASS_SERIALBUS_FIREWIRE);
    eval 'sub CARDBUS_SUBCLASS_SERIALBUS_ACCESS () {0x1;}' unless defined(&CARDBUS_SUBCLASS_SERIALBUS_ACCESS);
    eval 'sub CARDBUS_SUBCLASS_SERIALBUS_SSA () {0x2;}' unless defined(&CARDBUS_SUBCLASS_SERIALBUS_SSA);
    eval 'sub CARDBUS_SUBCLASS_SERIALBUS_USB () {0x3;}' unless defined(&CARDBUS_SUBCLASS_SERIALBUS_USB);
    eval 'sub CARDBUS_SUBCLASS_SERIALBUS_FIBER () {0x4;}' unless defined(&CARDBUS_SUBCLASS_SERIALBUS_FIBER);
    eval 'sub CARDBUS_BHLC_REG () {0xc;}' unless defined(&CARDBUS_BHLC_REG);
    eval 'sub CARDBUS_BIST_SHIFT () {24;}' unless defined(&CARDBUS_BIST_SHIFT);
    eval 'sub CARDBUS_BIST_MASK () {0xff;}' unless defined(&CARDBUS_BIST_MASK);
    eval 'sub CARDBUS_BIST {
        my($bhlcr) = @_;
	    eval q(((($bhlcr) >>  &CARDBUS_BIST_SHIFT) &  &CARDBUS_BIST_MASK));
    }' unless defined(&CARDBUS_BIST);
    eval 'sub CARDBUS_HDRTYPE_SHIFT () {16;}' unless defined(&CARDBUS_HDRTYPE_SHIFT);
    eval 'sub CARDBUS_HDRTYPE_MASK () {0xff;}' unless defined(&CARDBUS_HDRTYPE_MASK);
    eval 'sub CARDBUS_HDRTYPE {
        my($bhlcr) = @_;
	    eval q(((($bhlcr) >>  &CARDBUS_HDRTYPE_SHIFT) &  &CARDBUS_HDRTYPE_MASK));
    }' unless defined(&CARDBUS_HDRTYPE);
    eval 'sub CARDBUS_HDRTYPE_TYPE {
        my($bhlcr) = @_;
	    eval q(( &CARDBUS_HDRTYPE($bhlcr) & 0x7f));
    }' unless defined(&CARDBUS_HDRTYPE_TYPE);
    eval 'sub CARDBUS_HDRTYPE_MULTIFN {
        my($bhlcr) = @_;
	    eval q((( &CARDBUS_HDRTYPE($bhlcr) & 0x80) != 0));
    }' unless defined(&CARDBUS_HDRTYPE_MULTIFN);
    eval 'sub CARDBUS_LATTIMER_SHIFT () {8;}' unless defined(&CARDBUS_LATTIMER_SHIFT);
    eval 'sub CARDBUS_LATTIMER_MASK () {0xff;}' unless defined(&CARDBUS_LATTIMER_MASK);
    eval 'sub CARDBUS_LATTIMER {
        my($bhlcr) = @_;
	    eval q(((($bhlcr) >>  &CARDBUS_LATTIMER_SHIFT) &  &CARDBUS_LATTIMER_MASK));
    }' unless defined(&CARDBUS_LATTIMER);
    eval 'sub CARDBUS_CACHELINE_SHIFT () {0;}' unless defined(&CARDBUS_CACHELINE_SHIFT);
    eval 'sub CARDBUS_CACHELINE_MASK () {0xff;}' unless defined(&CARDBUS_CACHELINE_MASK);
    eval 'sub CARDBUS_CACHELINE {
        my($bhlcr) = @_;
	    eval q(((($bhlcr) >>  &CARDBUS_CACHELINE_SHIFT) &  &CARDBUS_CACHELINE_MASK));
    }' unless defined(&CARDBUS_CACHELINE);
    eval 'sub CARDBUS_BASE0_REG () {0x10;}' unless defined(&CARDBUS_BASE0_REG);
    eval 'sub CARDBUS_BASE1_REG () {0x14;}' unless defined(&CARDBUS_BASE1_REG);
    eval 'sub CARDBUS_BASE2_REG () {0x18;}' unless defined(&CARDBUS_BASE2_REG);
    eval 'sub CARDBUS_BASE3_REG () {0x1c;}' unless defined(&CARDBUS_BASE3_REG);
    eval 'sub CARDBUS_BASE4_REG () {0x20;}' unless defined(&CARDBUS_BASE4_REG);
    eval 'sub CARDBUS_BASE5_REG () {0x24;}' unless defined(&CARDBUS_BASE5_REG);
    eval 'sub CARDBUS_CIS_REG () {0x28;}' unless defined(&CARDBUS_CIS_REG);
    eval 'sub CARDBUS_ROM_REG () {0x30;}' unless defined(&CARDBUS_ROM_REG);
    eval 'sub CARDBUS_CIS_ASIMASK () {0x7;}' unless defined(&CARDBUS_CIS_ASIMASK);
    eval 'sub CARDBUS_CIS_ASI {
        my($x) = @_;
	    eval q(( &CARDBUS_CIS_ASIMASK & ($x)));
    }' unless defined(&CARDBUS_CIS_ASI);
    eval 'sub CARDBUS_CIS_ASI_TUPLE () {0x;}' unless defined(&CARDBUS_CIS_ASI_TUPLE);
    eval 'sub CARDBUS_CIS_ASI_BAR0 () {0x1;}' unless defined(&CARDBUS_CIS_ASI_BAR0);
    eval 'sub CARDBUS_CIS_ASI_BAR1 () {0x2;}' unless defined(&CARDBUS_CIS_ASI_BAR1);
    eval 'sub CARDBUS_CIS_ASI_BAR2 () {0x3;}' unless defined(&CARDBUS_CIS_ASI_BAR2);
    eval 'sub CARDBUS_CIS_ASI_BAR3 () {0x4;}' unless defined(&CARDBUS_CIS_ASI_BAR3);
    eval 'sub CARDBUS_CIS_ASI_BAR4 () {0x5;}' unless defined(&CARDBUS_CIS_ASI_BAR4);
    eval 'sub CARDBUS_CIS_ASI_BAR5 () {0x6;}' unless defined(&CARDBUS_CIS_ASI_BAR5);
    eval 'sub CARDBUS_CIS_ASI_ROM () {0x7;}' unless defined(&CARDBUS_CIS_ASI_ROM);
    eval 'sub CARDBUS_CIS_ADDRMASK () {0xffffff8;}' unless defined(&CARDBUS_CIS_ADDRMASK);
    eval 'sub CARDBUS_CIS_ADDR {
        my($x) = @_;
	    eval q(( &CARDBUS_CIS_ADDRMASK & ($x)));
    }' unless defined(&CARDBUS_CIS_ADDR);
    eval 'sub CARDBUS_CIS_ASI_BAR {
        my($x) = @_;
	    eval q(((( &CARDBUS_CIS_ASIMASK & ($x))-1)*4+0x10));
    }' unless defined(&CARDBUS_CIS_ASI_BAR);
    eval 'sub CARDBUS_CIS_ASI_ROM_IMAGE {
        my($x) = @_;
	    eval q(((($x) >> 28) & 0xf));
    }' unless defined(&CARDBUS_CIS_ASI_ROM_IMAGE);
    eval 'sub CARDBUS_INTERRUPT_REG () {0x3c;}' unless defined(&CARDBUS_INTERRUPT_REG);
    eval 'sub CARDBUS_MAPREG_TYPE_MEM () {0x;}' unless defined(&CARDBUS_MAPREG_TYPE_MEM);
    eval 'sub CARDBUS_MAPREG_TYPE_IO () {0x1;}' unless defined(&CARDBUS_MAPREG_TYPE_IO);
    eval 'sub cbslotcf_dev () { $cf_loc[0];}' unless defined(&cbslotcf_dev);
    eval 'sub cbslotcf_func () { $cf_loc[1];}' unless defined(&cbslotcf_func);
    eval 'sub CBSLOT_UNK_DEV () {-1;}' unless defined(&CBSLOT_UNK_DEV);
    eval 'sub CBSLOT_UNK_FUNC () {-1;}' unless defined(&CBSLOT_UNK_FUNC);
    eval 'sub PCCARD_33V () {0x2;}' unless defined(&PCCARD_33V);
    eval 'sub PCCARD_XXV () {0x4;}' unless defined(&PCCARD_XXV);
    eval 'sub PCCARD_YYV () {0x8;}' unless defined(&PCCARD_YYV);
    eval 'sub CARDBUS_ENABLE () {1;}' unless defined(&CARDBUS_ENABLE);
    eval 'sub CARDBUS_DISABLE () {2;}' unless defined(&CARDBUS_DISABLE);
    eval 'sub CARDBUS_RESET () {4;}' unless defined(&CARDBUS_RESET);
    eval 'sub CARDBUS_CD () {7;}' unless defined(&CARDBUS_CD);
    eval 'sub CARDBUS_NOCARD () {0;}' unless defined(&CARDBUS_NOCARD);
    eval 'sub CARDBUS_5V_CARD () {0x1;}' unless defined(&CARDBUS_5V_CARD);
    eval 'sub CARDBUS_3V_CARD () {0x2;}' unless defined(&CARDBUS_3V_CARD);
    eval 'sub CARDBUS_XV_CARD () {0x4;}' unless defined(&CARDBUS_XV_CARD);
    eval 'sub CARDBUS_YV_CARD () {0x8;}' unless defined(&CARDBUS_YV_CARD);
    eval 'sub CARDBUS_IO_ENABLE () {100;}' unless defined(&CARDBUS_IO_ENABLE);
    eval 'sub CARDBUS_IO_DISABLE () {101;}' unless defined(&CARDBUS_IO_DISABLE);
    eval 'sub CARDBUS_MEM_ENABLE () {102;}' unless defined(&CARDBUS_MEM_ENABLE);
    eval 'sub CARDBUS_MEM_DISABLE () {103;}' unless defined(&CARDBUS_MEM_DISABLE);
    eval 'sub CARDBUS_BM_ENABLE () {104;}' unless defined(&CARDBUS_BM_ENABLE);
    eval 'sub CARDBUS_BM_DISABLE () {105;}' unless defined(&CARDBUS_BM_DISABLE);
    eval 'sub CARDBUS_VCC_UC () {0x;}' unless defined(&CARDBUS_VCC_UC);
    eval 'sub CARDBUS_VCC_3V () {0x1;}' unless defined(&CARDBUS_VCC_3V);
    eval 'sub CARDBUS_VCC_XV () {0x2;}' unless defined(&CARDBUS_VCC_XV);
    eval 'sub CARDBUS_VCC_YV () {0x3;}' unless defined(&CARDBUS_VCC_YV);
    eval 'sub CARDBUS_VCC_0V () {0x4;}' unless defined(&CARDBUS_VCC_0V);
    eval 'sub CARDBUS_VCC_5V () {0x5;}' unless defined(&CARDBUS_VCC_5V);
    eval 'sub CARDBUS_VCCMASK () {0xf;}' unless defined(&CARDBUS_VCCMASK);
    eval 'sub CARDBUS_VPP_UC () {0x;}' unless defined(&CARDBUS_VPP_UC);
    eval 'sub CARDBUS_VPP_VCC () {0x10;}' unless defined(&CARDBUS_VPP_VCC);
    eval 'sub CARDBUS_VPP_12V () {0x30;}' unless defined(&CARDBUS_VPP_12V);
    eval 'sub CARDBUS_VPP_0V () {0x40;}' unless defined(&CARDBUS_VPP_0V);
    eval 'sub CARDBUS_VPPMASK () {0xf0;}' unless defined(&CARDBUS_VPPMASK);
    eval 'sub CARDBUSCF_DEV () {0;}' unless defined(&CARDBUSCF_DEV);
    eval 'sub CARDBUSCF_DEV_DEFAULT () {-1;}' unless defined(&CARDBUSCF_DEV_DEFAULT);
    eval 'sub CARDBUSCF_FUNCTION () {1;}' unless defined(&CARDBUSCF_FUNCTION);
    eval 'sub CARDBUSCF_FUNCTION_DEFAULT () {-1;}' unless defined(&CARDBUSCF_FUNCTION_DEFAULT);
    eval 'sub cardbuscf_dev () { $cf_loc[ &CARDBUSCF_DEV];}' unless defined(&cardbuscf_dev);
    eval 'sub CARDBUS_UNK_DEV () { &CARDBUSCF_DEV_DEFAULT;}' unless defined(&CARDBUS_UNK_DEV);
    eval 'sub cardbuscf_function () { $cf_loc[ &CARDBUSCF_FUNCTION];}' unless defined(&cardbuscf_function);
    eval 'sub CARDBUS_UNK_FUNCTION () { &CARDBUSCF_FUNCTION_DEFAULT;}' unless defined(&CARDBUS_UNK_FUNCTION);
    eval 'sub Cardbus_function_enable {
        my($ct) = @_;
	    eval q( &cardbus_function_enable(($ct)-> &ct_sc, ($ct)-> &ct_func));
    }' unless defined(&Cardbus_function_enable);
    eval 'sub Cardbus_function_disable {
        my($ct) = @_;
	    eval q( &cardbus_function_disable(($ct)-> &ct_sc, ($ct)-> &ct_func));
    }' unless defined(&Cardbus_function_disable);
    eval 'sub Cardbus_mapreg_map {
        my($ct, $reg, $type, $busflags, $tagp, $handlep, $basep, $sizep) = @_;
	    eval q( &cardbus_mapreg_map(($ct)-> &ct_sc, ( ($ct->{ct_func})), ($reg), ($type), ($busflags), ($tagp), ($handlep), ($basep), ($sizep)));
    }' unless defined(&Cardbus_mapreg_map);
    eval 'sub Cardbus_mapreg_unmap {
        my($ct, $reg, $tag, $handle, $size) = @_;
	    eval q( &cardbus_mapreg_unmap(($ct)-> &ct_sc, ( ($ct->{ct_func})), ($reg), ($tag), ($handle), ($size)));
    }' unless defined(&Cardbus_mapreg_unmap);
    eval 'sub Cardbus_make_tag {
        my($ct) = @_;
	    eval q((*($ct)-> ($ct_cf->{cardbus_make_tag}))(($ct)-> &ct_cc, ($ct)-> &ct_bus, ($ct)-> &ct_dev, ($ct)-> &ct_func));
    }' unless defined(&Cardbus_make_tag);
    eval 'sub cardbus_make_tag {
        my($cc, $cf, $bus, $device, $function) = @_;
	    eval q((($cf)-> &cardbus_make_tag)(($cc), ($bus), ($device), ($function)));
    }' unless defined(&cardbus_make_tag);
    eval 'sub Cardbus_free_tag {
        my($ct, $tag) = @_;
	    eval q((*($ct)-> ($ct_cf->{cardbus_free_tag}))(($ct)-> &ct_cc, ($tag)));
    }' unless defined(&Cardbus_free_tag);
    eval 'sub cardbus_free_tag {
        my($cc, $cf, $tag) = @_;
	    eval q((*($cf)-> &cardbus_free_tag)($cc, ($tag)));
    }' unless defined(&cardbus_free_tag);
    eval 'sub Cardbus_conf_read {
        my($ct, $tag, $offs) = @_;
	    eval q((*($ct)-> ($ct_cf->{cardbus_conf_read}))(($ct)-> &ct_cf, ($tag), ($offs)));
    }' unless defined(&Cardbus_conf_read);
    eval 'sub cardbus_conf_read {
        my($cc, $cf, $tag, $offs) = @_;
	    eval q((($cf)-> &cardbus_conf_read)(($cc), ($tag), ($offs)));
    }' unless defined(&cardbus_conf_read);
    eval 'sub Cardbus_conf_write {
        my($ct, $tag, $offs, $val) = @_;
	    eval q((*($ct)-> ($ct_cf->{cardbus_conf_write}))(($ct)-> &ct_cf, ($tag), ($offs), ($val)));
    }' unless defined(&Cardbus_conf_write);
    eval 'sub cardbus_conf_write {
        my($cc, $cf, $tag, $offs, $val) = @_;
	    eval q((($cf)-> &cardbus_conf_write)(($cc), ($tag), ($offs), ($val)));
    }' unless defined(&cardbus_conf_write);
}
1;
