Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
70ca2c43
Commit
70ca2c43
authored
Nov 14, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-serial
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
f52ef599
3f6a3bd4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1168 additions
and
351 deletions
+1168
-351
drivers/serial/s3c2410.c
drivers/serial/s3c2410.c
+1106
-323
include/asm-arm/arch-s3c2410/regs-serial.h
include/asm-arm/arch-s3c2410/regs-serial.h
+62
-28
No files found.
drivers/serial/s3c2410.c
View file @
70ca2c43
This diff is collapsed.
Click to expand it.
include/asm-arm/arch-s3c2410/regs-serial.h
View file @
70ca2c43
...
...
@@ -68,6 +68,12 @@
#define S3C2410_LCON_STOPB (1<<2)
#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_SBREAK (1<<4)
...
...
@@ -77,19 +83,35 @@
#define S3C2410_UCON_RXIRQMODE (1<<0)
#define S3C2410_UCON_RXFIFO_TOI (1<<7)
#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL \
| S3C2410_UCON_TXIRQMODE | S3C2410_UCON_RXIRQMODE \
| S3C2410_UCON_RXFIFO_TOI)
#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
S3C2410_UCON_TXIRQMODE | \
S3C2410_UCON_RXIRQMODE | \
S3C2410_UCON_RXFIFO_TOI)
#define S3C2410_UFCON_FIFOMODE (1<<0)
#define S3C2410_UFCON_TXTRIG0 (0<<6)
#define S3C2410_UFCON_RXTRIG8 (1<<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_RESETTX (1<<2)
#define S3C2410_UFCON_RESETRX (1<<1)
#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | S3C2410_UFCON_TXTRIG0 \
| S3C2410_UFCON_RXTRIG8 )
#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
S3C2410_UFCON_TXTRIG0 | \
S3C2410_UFCON_RXTRIG8 )
#define S3C2410_UFSTAT_TXFULL (1<<9)
#define S3C2410_UFSTAT_RXFULL (1<<8)
...
...
@@ -111,32 +133,36 @@
#define S3C2410_UERSTAT_OVERRUN (1<<0)
#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__
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
)
{
if
(
fcon
&
S3C2410_UFSTAT_TXFULL
)
return
16
;
return
((
fcon
)
&
S3C2410_UFSTAT_TXMASK
)
>>
S3C2410_UFSTAT_TXSHIFT
;
}
#endif
/* __ASSEMBLY__ */
/* struct s3c24xx_uart_clksrc
*
* this structure defines a named clock source that can be used for the
* uart, so that the best clock can be selected for the requested baud
* rate.
*
* min_baud and max_baud define the range of baud-rates this clock is
* 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)
#define S3C2410_UMSTAT_DeltaCTS (1<<2)
struct
s3c24xx_uart_clksrc
{
const
char
*
name
;
unsigned
int
divisor
;
unsigned
int
min_baud
;
unsigned
int
max_baud
;
};
#ifndef __ASSEMBLY__
/* configuration structure for per-machine configurations for the
* serial port
*
...
...
@@ -148,15 +174,23 @@ struct s3c2410_uartcfg {
unsigned
char
hwport
;
/* hardware port number */
unsigned
char
unused
;
unsigned
short
flags
;
unsigned
long
*
clock
;
/* pointer to clock rate */
unsigned
long
uart_flags
;
/* default uart flags */
unsigned
long
ucon
;
/* value of ucon for port */
unsigned
long
ulcon
;
/* value of ulcon 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__ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment