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
e62db384
Commit
e62db384
authored
Dec 24, 2013
by
Simon Horman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sh-sci' into soc3-base
parents
250d829f
ec09c5eb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
164 additions
and
192 deletions
+164
-192
drivers/tty/serial/sh-sci.c
drivers/tty/serial/sh-sci.c
+153
-167
drivers/tty/serial/sh-sci.h
drivers/tty/serial/sh-sci.h
+1
-1
include/linux/serial_sci.h
include/linux/serial_sci.h
+10
-24
No files found.
drivers/tty/serial/sh-sci.c
View file @
e62db384
This diff is collapsed.
Click to expand it.
drivers/tty/serial/sh-sci.h
View file @
e62db384
...
...
@@ -9,7 +9,7 @@
#define SCxSR_PER(port) (((port)->type == PORT_SCI) ? SCI_PER : SCIF_PER)
#define SCxSR_BRK(port) (((port)->type == PORT_SCI) ? 0x00 : SCIF_BRK)
#define SCxSR_ERRORS(port) (to_sci_port(port)->
cfg->
error_mask)
#define SCxSR_ERRORS(port) (to_sci_port(port)->error_mask)
#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \
...
...
include/linux/serial_sci.h
View file @
e62db384
...
...
@@ -11,11 +11,11 @@
#define SCIx_NOT_SUPPORTED (-1)
enum
{
SCBRR_ALGO_
1
,
/* ((clk + 16 * bps) / (16 * bps) - 1)
*/
SCBRR_ALGO_
2
,
/* ((clk + 16 * bps) / (32 * bps) - 1
) */
SCBRR_ALGO_
3
,
/* (((clk * 2) + 16 * bps) / (16 * bps) - 1)
*/
SCBRR_ALGO_
4
,
/* (((clk * 2) + 16 * bps) / (32 * bps) - 1
) */
SCBRR_ALGO_
5
,
/* (((clk * 1000 / 32) / bps) - 1)
*/
SCBRR_ALGO_
NONE
,
/* Compute sampling rate in the driver
*/
SCBRR_ALGO_
1
,
/* clk / (16 * bps
) */
SCBRR_ALGO_
2
,
/* DIV_ROUND_CLOSEST(clk, 32 * bps) - 1
*/
SCBRR_ALGO_
3
,
/* clk / (8 * bps
) */
SCBRR_ALGO_
4
,
/* DIV_ROUND_CLOSEST(clk, 16 * bps) - 1
*/
SCBRR_ALGO_6
,
/* HSCIF variable sample rate algorithm */
};
...
...
@@ -70,17 +70,6 @@ enum {
SCIx_MUX_IRQ
=
SCIx_NR_IRQS
,
/* special case */
};
/* Offsets into the sci_port->gpios array */
enum
{
SCIx_SCK
,
SCIx_RXD
,
SCIx_TXD
,
SCIx_CTS
,
SCIx_RTS
,
SCIx_NR_FNS
,
};
enum
{
SCIx_PROBE_REGTYPE
,
...
...
@@ -108,10 +97,10 @@ enum {
}
#define SCIx_IRQ_IS_MUXED(port) \
((port)->
cfg->
irqs[SCIx_ERI_IRQ] == \
(port)->
cfg->
irqs[SCIx_RXI_IRQ]) || \
((port)->
cfg->
irqs[SCIx_ERI_IRQ] && \
!(port)->cfg->irqs[SCIx_RXI_IRQ]
)
((port)->irqs[SCIx_ERI_IRQ] == \
(port)->irqs[SCIx_RXI_IRQ]) || \
((port)->irqs[SCIx_ERI_IRQ] && \
((port)->irqs[SCIx_RXI_IRQ] < 0)
)
/*
* SCI register subset common for all port types.
* Not all registers will exist on all parts.
...
...
@@ -142,20 +131,17 @@ struct plat_sci_port_ops {
struct
plat_sci_port
{
unsigned
long
mapbase
;
/* resource base */
unsigned
int
irqs
[
SCIx_NR_IRQS
];
/* ERI, RXI, TXI, BRI */
unsigned
int
gpios
[
SCIx_NR_FNS
];
/* SCK, RXD, TXD, CTS, RTS */
unsigned
int
type
;
/* SCI / SCIF / IRDA / HSCIF */
upf_t
flags
;
/* UPF_* flags */
unsigned
long
capabilities
;
/* Port features/capabilities */
unsigned
int
sampling_rate
;
unsigned
int
scbrr_algo_id
;
/* SCBRR calculation algo */
unsigned
int
scscr
;
/* SCSCR initialization */
/*
* Platform overrides if necessary, defaults otherwise.
*/
int
overrun_bit
;
unsigned
int
error_mask
;
int
port_reg
;
unsigned
char
regshift
;
unsigned
char
regtype
;
...
...
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