require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&IXP_PIO_TIMING)) {
    sub IXP_PIO_TIMING () {	0x40;}
}
unless(defined(&IXP_MDMA_TIMING)) {
    sub IXP_MDMA_TIMING () {	0x44;}
}
unless(defined(&IXP_PIO_CTL)) {
    sub IXP_PIO_CTL () {	0x48;}
}
unless(defined(&IXP_PIO_MODE)) {
    sub IXP_PIO_MODE () {	0x4a;}
}
unless(defined(&IXP_UDMA_CTL)) {
    sub IXP_UDMA_CTL () {	0x54;}
}
unless(defined(&IXP_UDMA_MODE)) {
    sub IXP_UDMA_MODE () {	0x56;}
}
unless(defined(&IXP_UDMA_ENABLE)) {
    sub IXP_UDMA_ENABLE {
	my($u, $c, $d) = @_;
	eval q( &do { ($u) |= (1<< (2* ($c) + ($d))); }  &while (0));
    }
}
unless(defined(&IXP_UDMA_DISABLE)) {
    sub IXP_UDMA_DISABLE {
	my($u, $c, $d) = @_;
	eval q( &do { ($u) &= ~(1<< (2* ($c) + ($d))); }  &while (0));
    }
}
unless(defined(&IXP_SET_MODE)) {
    sub IXP_SET_MODE {
	my($u, $c, $d, $m) = @_;
	eval q( &do { 'int'  &__ixpshift = 16+ 8*($c) + 4*($d); ($u) &= ~(0x7 <<  &__ixpshift); ($u) |= ((($m) & 0x7) <<  &__ixpshift); }  &while (0));
    }
}
unless(defined(&IXP_SET_TIMING)) {
    sub IXP_SET_TIMING {
	my($m, $c, $d, $t) = @_;
	eval q( &do { 'int'  &__ixpshift = 16*($c) + 8*($d); ($m) &= ~(0xff <<  &__ixpshift); ($m) |= (($t) & 0xff) <<  &__ixpshift; }  &while (0));
    }
}
1;
