Commit 70ca2c43 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-serial

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents f52ef599 3f6a3bd4
This diff is collapsed.
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
#define S3C2410_LCON_STOPB (1<<2) #define S3C2410_LCON_STOPB (1<<2)
#define S3C2410_LCON_IRM (1<<6) #define S3C2410_LCON_IRM (1<<6)
#define S3C2440_UCON_CLKMASK (3<<10)
#define S3C2440_UCON_PCLK (0<<10)
#define S3C2440_UCON_UCLK (1<<10)
#define S3C2440_UCON_PCLK2 (2<<10)
#define S3C2440_UCON_FCLK (3<<10)
#define S3C2410_UCON_UCLK (1<<10) #define S3C2410_UCON_UCLK (1<<10)
#define S3C2410_UCON_SBREAK (1<<4) #define S3C2410_UCON_SBREAK (1<<4)
...@@ -77,19 +83,35 @@ ...@@ -77,19 +83,35 @@
#define S3C2410_UCON_RXIRQMODE (1<<0) #define S3C2410_UCON_RXIRQMODE (1<<0)
#define S3C2410_UCON_RXFIFO_TOI (1<<7) #define S3C2410_UCON_RXFIFO_TOI (1<<7)
#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL \ #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
| S3C2410_UCON_TXIRQMODE | S3C2410_UCON_RXIRQMODE \ S3C2410_UCON_RXILEVEL | \
| S3C2410_UCON_RXFIFO_TOI) S3C2410_UCON_TXIRQMODE | \
S3C2410_UCON_RXIRQMODE | \
S3C2410_UCON_RXFIFO_TOI)
#define S3C2410_UFCON_FIFOMODE (1<<0) #define S3C2410_UFCON_FIFOMODE (1<<0)
#define S3C2410_UFCON_TXTRIG0 (0<<6) #define S3C2410_UFCON_TXTRIG0 (0<<6)
#define S3C2410_UFCON_RXTRIG8 (1<<4) #define S3C2410_UFCON_RXTRIG8 (1<<4)
#define S3C2410_UFCON_RXTRIG12 (2<<4) #define S3C2410_UFCON_RXTRIG12 (2<<4)
/* S3C2440 FIFO trigger levels */
#define S3C2440_UFCON_RXTRIG1 (0<<4)
#define S3C2440_UFCON_RXTRIG8 (1<<4)
#define S3C2440_UFCON_RXTRIG16 (2<<4)
#define S3C2440_UFCON_RXTRIG32 (3<<4)
#define S3C2440_UFCON_TXTRIG0 (0<<6)
#define S3C2440_UFCON_TXTRIG16 (1<<6)
#define S3C2440_UFCON_TXTRIG32 (2<<6)
#define S3C2440_UFCON_TXTRIG48 (3<<6)
#define S3C2410_UFCON_RESETBOTH (3<<1) #define S3C2410_UFCON_RESETBOTH (3<<1)
#define S3C2410_UFCON_RESETTX (1<<2)
#define S3C2410_UFCON_RESETRX (1<<1)
#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | S3C2410_UFCON_TXTRIG0 \ #define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
| S3C2410_UFCON_RXTRIG8 ) S3C2410_UFCON_TXTRIG0 | \
S3C2410_UFCON_RXTRIG8 )
#define S3C2410_UFSTAT_TXFULL (1<<9) #define S3C2410_UFSTAT_TXFULL (1<<9)
#define S3C2410_UFSTAT_RXFULL (1<<8) #define S3C2410_UFSTAT_RXFULL (1<<8)
...@@ -111,32 +133,36 @@ ...@@ -111,32 +133,36 @@
#define S3C2410_UERSTAT_OVERRUN (1<<0) #define S3C2410_UERSTAT_OVERRUN (1<<0)
#define S3C2410_UERSTAT_FRAME (1<<2) #define S3C2410_UERSTAT_FRAME (1<<2)
#define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | S3C2410_UERSTAT_FRAME) #define S3C2410_UERSTAT_BREAK (1<<3)
#define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \
S3C2410_UERSTAT_FRAME | \
S3C2410_UERSTAT_BREAK)
/* fifo size information */ #define S3C2410_UMSTAT_CTS (1<<0)
#define S3C2410_UMSTAT_DeltaCTS (1<<2)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline int S3C2410_UFCON_RXC(int fcon)
{
if (fcon & S3C2410_UFSTAT_RXFULL)
return 16;
return ((fcon) & S3C2410_UFSTAT_RXMASK) >> S3C2410_UFSTAT_RXSHIFT;
}
static inline int S3C2410_UFCON_TXC(int fcon) /* struct s3c24xx_uart_clksrc
{ *
if (fcon & S3C2410_UFSTAT_TXFULL) * this structure defines a named clock source that can be used for the
return 16; * uart, so that the best clock can be selected for the requested baud
* rate.
return ((fcon) & S3C2410_UFSTAT_TXMASK) >> S3C2410_UFSTAT_TXSHIFT; *
} * min_baud and max_baud define the range of baud-rates this clock is
#endif /* __ASSEMBLY__ */ * acceptable for, if they are both zero, it is assumed any baud rate that
* can be generated from this clock will be used.
*
* divisor gives the divisor from the clock to the one seen by the uart
*/
#define S3C2410_UMSTAT_CTS (1<<0) struct s3c24xx_uart_clksrc {
#define S3C2410_UMSTAT_DeltaCTS (1<<2) const char *name;
unsigned int divisor;
unsigned int min_baud;
unsigned int max_baud;
};
#ifndef __ASSEMBLY__
/* configuration structure for per-machine configurations for the /* configuration structure for per-machine configurations for the
* serial port * serial port
* *
...@@ -148,15 +174,23 @@ struct s3c2410_uartcfg { ...@@ -148,15 +174,23 @@ struct s3c2410_uartcfg {
unsigned char hwport; /* hardware port number */ unsigned char hwport; /* hardware port number */
unsigned char unused; unsigned char unused;
unsigned short flags; unsigned short flags;
unsigned long uart_flags; /* default uart flags */
unsigned long *clock; /* pointer to clock rate */
unsigned long ucon; /* value of ucon for port */ unsigned long ucon; /* value of ucon for port */
unsigned long ulcon; /* value of ulcon for port */ unsigned long ulcon; /* value of ulcon for port */
unsigned long ufcon; /* value of ufcon for port */ unsigned long ufcon; /* value of ufcon for port */
struct s3c24xx_uart_clksrc *clocks;
unsigned int clocks_size;
}; };
extern struct s3c2410_uartcfg *s3c2410_uartcfgs; /* s3c24xx_uart_devs
*
* this is exported from the core as we cannot use driver_register(),
* or platform_add_device() before the console_initcall()
*/
extern struct platform_device *s3c24xx_uart_devs[3];
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment