bfin_serial_5xx.h 1.4 KB
Newer Older
1
/*
2
 * Copyright 2007-2009 Analog Devices Inc.
3
 *
4
 * Licensed under the GPL-2 or later
5 6
 */

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#include <asm/dma.h>
#include <asm/portmux.h>

#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
# define CONFIG_SERIAL_BFIN_CTSRTS

# ifndef CONFIG_UART0_CTS_PIN
#  define CONFIG_UART0_CTS_PIN -1
# endif

# ifndef CONFIG_UART0_RTS_PIN
#  define CONFIG_UART0_RTS_PIN -1
# endif

# ifndef CONFIG_UART1_CTS_PIN
#  define CONFIG_UART1_CTS_PIN -1
# endif

# ifndef CONFIG_UART1_RTS_PIN
#  define CONFIG_UART1_RTS_PIN -1
# endif
#endif
29

30 31 32
struct bfin_serial_res {
	unsigned long uart_base_addr;
	int uart_irq;
S
Sonic Zhang 已提交
33
	int uart_status_irq;
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
#ifdef CONFIG_SERIAL_BFIN_DMA
	unsigned int uart_tx_dma_channel;
	unsigned int uart_rx_dma_channel;
#endif
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
	int uart_cts_pin;
	int uart_rts_pin;
#endif
};

struct bfin_serial_res bfin_serial_resource[] = {
#ifdef CONFIG_SERIAL_BFIN_UART0
	{
	 0xFFC00400,
	 IRQ_UART0_RX,
S
Sonic Zhang 已提交
49
	 IRQ_UART0_ERROR,
50 51 52 53
#ifdef CONFIG_SERIAL_BFIN_DMA
	 CH_UART0_TX,
	 CH_UART0_RX,
#endif
54
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
55 56 57 58 59 60 61 62 63
	 CONFIG_UART0_CTS_PIN,
	 CONFIG_UART0_RTS_PIN,
#endif
	 },
#endif
#ifdef CONFIG_SERIAL_BFIN_UART1
	{
	 0xFFC02000,
	 IRQ_UART1_RX,
S
Sonic Zhang 已提交
64
	 IRQ_UART1_ERROR,
65 66 67 68
#ifdef CONFIG_SERIAL_BFIN_DMA
	 CH_UART1_TX,
	 CH_UART1_RX,
#endif
69
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
70 71 72 73 74 75 76 77
	 CONFIG_UART1_CTS_PIN,
	 CONFIG_UART1_RTS_PIN,
#endif
	 },
#endif
};

#define DRIVER_NAME "bfin-uart"
78 79

#include <asm/bfin_serial.h>