blob: 3ff9f3af25916ce69875cea8d844b68b7ab2928f [file] [log] [blame]
/*
* Copyright Codito Technologies (www.codito.com)
*
* include/asm-arc/serial.h
*
* Copyright (C)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Authors : Sandeep Patil (sandeep.patil@codito.com)
* Pradeep Sawlani (pradeep.sawlani@codito.com)
*/
#ifndef _ASM_ARC_SERIAL_H
#define _ASM_ARC_SERIAL_H
#include <config.h>
typedef volatile struct {
volatile unsigned char id0 __attribute__((aligned(4)));
volatile unsigned char id1 __attribute__((aligned(4)));
volatile unsigned char id2 __attribute__((aligned(4)));
volatile unsigned char id3 __attribute__((aligned(4)));
volatile unsigned char data __attribute__((aligned(4)));
volatile unsigned char status __attribute__((aligned(4)));
volatile unsigned char baudl __attribute__((aligned(4)));
volatile unsigned char baudh __attribute__((aligned(4)));
} arc_uart;
/*
* Define the number of ports supported and their irqs.
*/
#define NR_PORTS 1
#define CONSOLE_BAUD_RATE CONFIG_ARC_SERIAL_BAUD
#define UART_RXENB 0x04
#define UART_RXEMPTY 0x20
#define UART_FRAME_ERR 0x01
#define UART_OVERFLOW_ERR 0x02
#define UART_TXENB 0x40
#define UART_TXEMPTY 0x80
/* UART control registers */
#define ARC_UART_CREG_DATATX UART_BASEADDR + 0x4
#define ARC_UART_CREG_DATARX UART_BASEADDR + 0x4
#define ARC_UART_CREG_STATUS UART_BASEADDR + 0x5
#endif /* _ASM_ARC_SERIAL_H */