require '_h2ph_pre.ph';

no warnings 'redefine';

require 'dev/ic/ns16550reg.ph';
unless(defined(&COM_FREQ)) {
    eval 'sub COM_FREQ () {1843200;}' unless defined(&COM_FREQ);
}
unless(defined(&COM_TOLERANCE)) {
    sub COM_TOLERANCE () {	30;}
}
unless(defined(&IER_ERXRDY)) {
    sub IER_ERXRDY () {	0x1;}
}
unless(defined(&IER_ETXRDY)) {
    sub IER_ETXRDY () {	0x2;}
}
unless(defined(&IER_ERLS)) {
    sub IER_ERLS () {	0x4;}
}
unless(defined(&IER_EMSC)) {
    sub IER_EMSC () {	0x8;}
}
unless(defined(&IER_SLEEP)) {
    sub IER_SLEEP () {	0x10;}
}
unless(defined(&IER_ERXTOUT)) {
    sub IER_ERXTOUT () {	0x10;}
}
unless(defined(&IER_EUART)) {
    sub IER_EUART () {	0x40;}
}
unless(defined(&IIR_IMASK)) {
    sub IIR_IMASK () {	0xf;}
}
unless(defined(&IIR_RXTOUT)) {
    sub IIR_RXTOUT () {	0xc;}
}
unless(defined(&IIR_RLS)) {
    sub IIR_RLS () {	0x6;}
}
unless(defined(&IIR_RXRDY)) {
    sub IIR_RXRDY () {	0x4;}
}
unless(defined(&IIR_TXRDY)) {
    sub IIR_TXRDY () {	0x2;}
}
unless(defined(&IIR_MLSC)) {
    sub IIR_MLSC () {	0x;}
}
unless(defined(&IIR_NOPEND)) {
    sub IIR_NOPEND () {	0x1;}
}
unless(defined(&IIR_FIFO_MASK)) {
    sub IIR_FIFO_MASK () {	0xc0;}
}
unless(defined(&FIFO_ENABLE)) {
    sub FIFO_ENABLE () {	0x1;}
}
unless(defined(&FIFO_RCV_RST)) {
    sub FIFO_RCV_RST () {	0x2;}
}
unless(defined(&FIFO_XMT_RST)) {
    sub FIFO_XMT_RST () {	0x4;}
}
unless(defined(&FIFO_DMA_MODE)) {
    sub FIFO_DMA_MODE () {	0x8;}
}
unless(defined(&FIFO_TRIGGER_1)) {
    sub FIFO_TRIGGER_1 () {	0x;}
}
unless(defined(&FIFO_TRIGGER_4)) {
    sub FIFO_TRIGGER_4 () {	0x40;}
}
unless(defined(&FIFO_TRIGGER_8)) {
    sub FIFO_TRIGGER_8 () {	0x80;}
}
unless(defined(&FIFO_TRIGGER_14)) {
    sub FIFO_TRIGGER_14 () {	0xc0;}
}
unless(defined(&FIFO_RCV_TRIGGER_8)) {
    sub FIFO_RCV_TRIGGER_8 () {	0x;}
}
unless(defined(&FIFO_RCV_TRIGGER_16)) {
    sub FIFO_RCV_TRIGGER_16 () {	0x40;}
}
unless(defined(&FIFO_RCV_TRIGGER_24)) {
    sub FIFO_RCV_TRIGGER_24 () {	0x80;}
}
unless(defined(&FIFO_RCV_TRIGGER_28)) {
    sub FIFO_RCV_TRIGGER_28 () {	0xc0;}
}
unless(defined(&FIFO_XMT_TRIGGER_16)) {
    sub FIFO_XMT_TRIGGER_16 () {	0x;}
}
unless(defined(&FIFO_XMT_TRIGGER_8)) {
    sub FIFO_XMT_TRIGGER_8 () {	0x10;}
}
unless(defined(&FIFO_XMT_TRIGGER_24)) {
    sub FIFO_XMT_TRIGGER_24 () {	0x20;}
}
unless(defined(&FIFO_XMT_TRIGGER_30)) {
    sub FIFO_XMT_TRIGGER_30 () {	0x30;}
}
unless(defined(&FIFO_RCV3_TRIGGER_8)) {
    sub FIFO_RCV3_TRIGGER_8 () {	 &FIFO_RCV_TRIGGER_8;}
}
unless(defined(&FIFO_RCV3_TRIGGER_16)) {
    sub FIFO_RCV3_TRIGGER_16 () {	 &FIFO_RCV_TRIGGER_16;}
}
unless(defined(&FIFO_RCV3_TRIGGER_56)) {
    sub FIFO_RCV3_TRIGGER_56 () {	0x80;}
}
unless(defined(&FIFO_RCV3_TRIGGER_60)) {
    sub FIFO_RCV3_TRIGGER_60 () {	0xc0;}
}
unless(defined(&FIFO_XMT3_TRIGGER_8)) {
    sub FIFO_XMT3_TRIGGER_8 () {	0x;}
}
unless(defined(&FIFO_XMT3_TRIGGER_16)) {
    sub FIFO_XMT3_TRIGGER_16 () {	0x10;}
}
unless(defined(&FIFO_XMT3_TRIGGER_32)) {
    sub FIFO_XMT3_TRIGGER_32 () {	0x20;}
}
unless(defined(&FIFO_XMT3_TRIGGER_56)) {
    sub FIFO_XMT3_TRIGGER_56 () {	0x30;}
}
unless(defined(&FIFO_ENABLE_64BYTE)) {
    sub FIFO_ENABLE_64BYTE () {	0x20;}
}
unless(defined(&LCR_DLAB)) {
    sub LCR_DLAB () {	0x80;}
}
unless(defined(&LCR_SBREAK)) {
    sub LCR_SBREAK () {	0x40;}
}
unless(defined(&LCR_PZERO)) {
    sub LCR_PZERO () {	0x38;}
}
unless(defined(&LCR_PONE)) {
    sub LCR_PONE () {	0x28;}
}
unless(defined(&LCR_PEVEN)) {
    sub LCR_PEVEN () {	0x18;}
}
unless(defined(&LCR_PODD)) {
    sub LCR_PODD () {	0x8;}
}
unless(defined(&LCR_PNONE)) {
    sub LCR_PNONE () {	0x;}
}
unless(defined(&LCR_PENAB)) {
    sub LCR_PENAB () {	0x8;}
}
unless(defined(&LCR_STOPB)) {
    sub LCR_STOPB () {	0x4;}
}
unless(defined(&LCR_8BITS)) {
    sub LCR_8BITS () {	0x3;}
}
unless(defined(&LCR_7BITS)) {
    sub LCR_7BITS () {	0x2;}
}
unless(defined(&LCR_6BITS)) {
    sub LCR_6BITS () {	0x1;}
}
unless(defined(&LCR_5BITS)) {
    sub LCR_5BITS () {	0x;}
}
unless(defined(&LCR_EFR)) {
    sub LCR_EFR () {	0xbf;}
}
unless(defined(&MCR_AFE)) {
    sub MCR_AFE () {	0x20;}
}
unless(defined(&MCR_LOOPBACK)) {
    sub MCR_LOOPBACK () {	0x10;}
}
unless(defined(&MCR_IENABLE)) {
    sub MCR_IENABLE () {	0x8;}
}
unless(defined(&MCR_DRS)) {
    sub MCR_DRS () {	0x4;}
}
unless(defined(&MCR_RTS)) {
    sub MCR_RTS () {	0x2;}
}
unless(defined(&MCR_DTR)) {
    sub MCR_DTR () {	0x1;}
}
unless(defined(&LSR_RCV_FIFO)) {
    sub LSR_RCV_FIFO () {	0x80;}
}
unless(defined(&LSR_TSRE)) {
    sub LSR_TSRE () {	0x40;}
}
unless(defined(&LSR_TXRDY)) {
    sub LSR_TXRDY () {	0x20;}
}
unless(defined(&LSR_BI)) {
    sub LSR_BI () {	0x10;}
}
unless(defined(&LSR_FE)) {
    sub LSR_FE () {	0x8;}
}
unless(defined(&LSR_PE)) {
    sub LSR_PE () {	0x4;}
}
unless(defined(&LSR_OE)) {
    sub LSR_OE () {	0x2;}
}
unless(defined(&LSR_RXRDY)) {
    sub LSR_RXRDY () {	0x1;}
}
unless(defined(&LSR_RCV_MASK)) {
    sub LSR_RCV_MASK () {	0x1f;}
}
unless(defined(&MSR_DCD)) {
    sub MSR_DCD () {	0x80;}
}
unless(defined(&MSR_RI)) {
    sub MSR_RI () {	0x40;}
}
unless(defined(&MSR_DSR)) {
    sub MSR_DSR () {	0x20;}
}
unless(defined(&MSR_CTS)) {
    sub MSR_CTS () {	0x10;}
}
unless(defined(&MSR_DDCD)) {
    sub MSR_DDCD () {	0x8;}
}
unless(defined(&MSR_TERI)) {
    sub MSR_TERI () {	0x4;}
}
unless(defined(&MSR_DDSR)) {
    sub MSR_DDSR () {	0x2;}
}
unless(defined(&MSR_DCTS)) {
    sub MSR_DCTS () {	0x1;}
}
unless(defined(&EFR_ECB)) {
    sub EFR_ECB () {	0x10;}
}
unless(defined(&EFR_SCD)) {
    sub EFR_SCD () {	0x20;}
}
unless(defined(&EFR_RTS)) {
    sub EFR_RTS () {	0x40;}
}
unless(defined(&EFR_CTS)) {
    sub EFR_CTS () {	0x80;}
}
unless(defined(&FCTL_MODE)) {
    sub FCTL_MODE () {	0x80;}
}
unless(defined(&FCTL_SWAP)) {
    sub FCTL_SWAP () {	0x40;}
}
unless(defined(&FCTL_RS485)) {
    sub FCTL_RS485 () {	0x8;}
}
unless(defined(&FCTL_IrRxInv)) {
    sub FCTL_IrRxInv () {	0x4;}
}
unless(defined(&FCTL_TRIGGER2)) {
    sub FCTL_TRIGGER2 () {	0x10;}
}
unless(defined(&FCTL_TRIGGER3)) {
    sub FCTL_TRIGGER3 () {	0x20;}
}
unless(defined(&ISR_XMITIR)) {
    sub ISR_XMITIR () {	0x1;}
}
unless(defined(&ISR_RCVEIR)) {
    sub ISR_RCVEIR () {	0x2;}
}
unless(defined(&ISR_XMODE)) {
    sub ISR_XMODE () {	0x4;}
}
unless(defined(&ISR_TXPL)) {
    sub ISR_TXPL () {	0x8;}
}
unless(defined(&ISR_RXPL)) {
    sub ISR_RXPL () {	0x10;}
}
if(defined(&COM_PXA2X0)) {
    eval 'sub COM_NPORTS () {9;}' unless defined(&COM_NPORTS);
} else {
    eval 'sub COM_NPORTS () {8;}' unless defined(&COM_NPORTS);
}
unless(defined(&CONADDR)) {
    eval 'sub CONADDR () {(0x3f8);}' unless defined(&CONADDR);
} else {
    eval 'sub CONADDR_OVERRIDE () {1;}' unless defined(&CONADDR_OVERRIDE);
}
unless(defined(&CONUNIT)) {
    eval 'sub CONUNIT () {(0);}' unless defined(&CONUNIT);
}
1;
