#define REG_IQ_CYCLES 0x1C
#define REG_RX_THRES 0x20
+#define UART_TX_FULL 0x2
+#define UART_RX_FULL 0x8
+
static volatile void *uart_base;
void shakti_uart_putc(char ch)
{
- while((readw(uart_base + REG_STATUS) & 0x2) == 0);
+ while((readw(uart_base + REG_STATUS) & UART_TX_FULL))
+ ;
writeb(ch, uart_base + REG_TX);
}
int shakti_uart_getc(void)
{
u16 status = readw(uart_base + REG_STATUS);
- if (status & 0x8)
+ if (status & UART_RX_FULL)
return readb(uart_base + REG_RX);
return -1;
}