require '_h2ph_pre.ph';

no warnings 'redefine';

require 'sys/sensors.ph';
unless(defined(&DEVNAME)) {
    sub DEVNAME {
	my($_s) = @_;
	eval q((($_s)-> ($sc_dev->{dv_xname})));
    }
}
if(defined(&MFI_DEBUG)) {
    eval 'sub DPRINTF () {( &x...)  &do {  &if ( &mfi_debug)  &printf( &x); }  &while(0);}' unless defined(&DPRINTF);
    eval 'sub DNPRINTF () {( &n, &x...)  &do {  &if ( &mfi_debug &  &n)  &printf( &x); }  &while(0);}' unless defined(&DNPRINTF);
    eval 'sub MFI_D_CMD () {0x1;}' unless defined(&MFI_D_CMD);
    eval 'sub MFI_D_INTR () {0x2;}' unless defined(&MFI_D_INTR);
    eval 'sub MFI_D_MISC () {0x4;}' unless defined(&MFI_D_MISC);
    eval 'sub MFI_D_DMA () {0x8;}' unless defined(&MFI_D_DMA);
    eval 'sub MFI_D_IOCTL () {0x10;}' unless defined(&MFI_D_IOCTL);
    eval 'sub MFI_D_RW () {0x20;}' unless defined(&MFI_D_RW);
    eval 'sub MFI_D_MEM () {0x40;}' unless defined(&MFI_D_MEM);
    eval 'sub MFI_D_CCB () {0x80;}' unless defined(&MFI_D_CCB);
} else {
    eval 'sub DPRINTF () {( &x...);}' unless defined(&DPRINTF);
    eval 'sub DNPRINTF () {( &n, &x...);}' unless defined(&DNPRINTF);
}
unless(defined(&MFIMEM_MAP)) {
    sub MFIMEM_MAP {
	my($_am) = @_;
	eval q((($_am)-> &am_map));
    }
}
unless(defined(&MFIMEM_DVA)) {
    sub MFIMEM_DVA {
	my($_am) = @_;
	eval q((($_am)-> ($am_map->{dm_segs[0]}->{ds_addr})));
    }
}
unless(defined(&MFIMEM_KVA)) {
    sub MFIMEM_KVA {
	my($_am) = @_;
	eval q((( &void *)($_am)-> &am_kva));
    }
}
unless(defined(&MFI_DATA_NONE)) {
    sub MFI_DATA_NONE () {	0;}
}
unless(defined(&MFI_DATA_IN)) {
    sub MFI_DATA_IN () {	1;}
}
unless(defined(&MFI_DATA_OUT)) {
    sub MFI_DATA_OUT () {	2;}
}
unless(defined(&MFI_CCB_F_ERR)) {
    sub MFI_CCB_F_ERR () {	(1<<0);}
}
1;
