Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
86d758ef
Commit
86d758ef
authored
Oct 28, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'sh/serial-rework' and 'sh/oprofile'
parents
b2d86a3f
15c73aaa
2a88b6e8
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
87 deletions
+18
-87
arch/sh/oprofile/op_model_sh7750.c
arch/sh/oprofile/op_model_sh7750.c
+2
-4
drivers/serial/sh-sci.c
drivers/serial/sh-sci.c
+1
-16
drivers/serial/sh-sci.h
drivers/serial/sh-sci.h
+15
-67
No files found.
arch/sh/oprofile/op_model_sh7750.c
View file @
86d758ef
...
@@ -255,10 +255,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
...
@@ -255,10 +255,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
return
-
ENODEV
;
return
-
ENODEV
;
ops
=
&
sh7750_perf_counter_ops
;
ops
=
&
sh7750_perf_counter_ops
;
ops
->
cpu_type
=
(
char
*
)
get_cpu_subtype
(
&
current_cpu_data
)
;
ops
->
cpu_type
=
"sh/sh7750"
;
printk
(
KERN_INFO
"oprofile: using SH-4 (%s) performance monitoring.
\n
"
,
printk
(
KERN_INFO
"oprofile: using SH-4 performance monitoring.
\n
"
);
sh7750_perf_counter_ops
.
cpu_type
);
/* Clear the counters */
/* Clear the counters */
ctrl_outw
(
ctrl_inw
(
PMCR1
)
|
PMCR_PMCLR
,
PMCR1
);
ctrl_outw
(
ctrl_inw
(
PMCR1
)
|
PMCR_PMCLR
,
PMCR1
);
...
@@ -270,4 +269,3 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
...
@@ -270,4 +269,3 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
void
oprofile_arch_exit
(
void
)
void
oprofile_arch_exit
(
void
)
{
{
}
}
drivers/serial/sh-sci.c
View file @
86d758ef
...
@@ -250,8 +250,7 @@ static inline void h8300_sci_disable(struct uart_port *port)
...
@@ -250,8 +250,7 @@ static inline void h8300_sci_disable(struct uart_port *port)
}
}
#endif
#endif
#if defined(SCI_ONLY) || defined(SCI_AND_SCIF) && \
#if defined(__H8300H__) || defined(__H8300S__)
defined(__H8300H__) || defined(__H8300S__)
static
void
sci_init_pins_sci
(
struct
uart_port
*
port
,
unsigned
int
cflag
)
static
void
sci_init_pins_sci
(
struct
uart_port
*
port
,
unsigned
int
cflag
)
{
{
int
ch
=
(
port
->
mapbase
-
SMR0
)
>>
3
;
int
ch
=
(
port
->
mapbase
-
SMR0
)
>>
3
;
...
@@ -285,11 +284,6 @@ static void sci_init_pins_irda(struct uart_port *port, unsigned int cflag)
...
@@ -285,11 +284,6 @@ static void sci_init_pins_irda(struct uart_port *port, unsigned int cflag)
#define sci_init_pins_irda NULL
#define sci_init_pins_irda NULL
#endif
#endif
#ifdef SCI_ONLY
#define sci_init_pins_scif NULL
#endif
#if defined(SCIF_ONLY) || defined(SCI_AND_SCIF)
#if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
#if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
static
void
sci_init_pins_scif
(
struct
uart_port
*
port
,
unsigned
int
cflag
)
static
void
sci_init_pins_scif
(
struct
uart_port
*
port
,
unsigned
int
cflag
)
{
{
...
@@ -449,7 +443,6 @@ static inline int scif_rxroom(struct uart_port *port)
...
@@ -449,7 +443,6 @@ static inline int scif_rxroom(struct uart_port *port)
return
sci_in
(
port
,
SCFDR
)
&
SCIF_RFDC_MASK
;
return
sci_in
(
port
,
SCFDR
)
&
SCIF_RFDC_MASK
;
}
}
#endif
#endif
#endif
/* SCIF_ONLY || SCI_AND_SCIF */
static
inline
int
sci_txroom
(
struct
uart_port
*
port
)
static
inline
int
sci_txroom
(
struct
uart_port
*
port
)
{
{
...
@@ -485,11 +478,9 @@ static void sci_transmit_chars(struct uart_port *port)
...
@@ -485,11 +478,9 @@ static void sci_transmit_chars(struct uart_port *port)
return
;
return
;
}
}
#ifndef SCI_ONLY
if
(
port
->
type
==
PORT_SCIF
)
if
(
port
->
type
==
PORT_SCIF
)
count
=
scif_txroom
(
port
);
count
=
scif_txroom
(
port
);
else
else
#endif
count
=
sci_txroom
(
port
);
count
=
sci_txroom
(
port
);
do
{
do
{
...
@@ -519,12 +510,10 @@ static void sci_transmit_chars(struct uart_port *port)
...
@@ -519,12 +510,10 @@ static void sci_transmit_chars(struct uart_port *port)
}
else
{
}
else
{
ctrl
=
sci_in
(
port
,
SCSCR
);
ctrl
=
sci_in
(
port
,
SCSCR
);
#if !defined(SCI_ONLY)
if
(
port
->
type
==
PORT_SCIF
)
{
if
(
port
->
type
==
PORT_SCIF
)
{
sci_in
(
port
,
SCxSR
);
/* Dummy read */
sci_in
(
port
,
SCxSR
);
/* Dummy read */
sci_out
(
port
,
SCxSR
,
SCxSR_TDxE_CLEAR
(
port
));
sci_out
(
port
,
SCxSR
,
SCxSR_TDxE_CLEAR
(
port
));
}
}
#endif
ctrl
|=
SCI_CTRL_FLAGS_TIE
;
ctrl
|=
SCI_CTRL_FLAGS_TIE
;
sci_out
(
port
,
SCSCR
,
ctrl
);
sci_out
(
port
,
SCSCR
,
ctrl
);
...
@@ -547,11 +536,9 @@ static inline void sci_receive_chars(struct uart_port *port)
...
@@ -547,11 +536,9 @@ static inline void sci_receive_chars(struct uart_port *port)
return
;
return
;
while
(
1
)
{
while
(
1
)
{
#if !defined(SCI_ONLY)
if
(
port
->
type
==
PORT_SCIF
)
if
(
port
->
type
==
PORT_SCIF
)
count
=
scif_rxroom
(
port
);
count
=
scif_rxroom
(
port
);
else
else
#endif
count
=
sci_rxroom
(
port
);
count
=
sci_rxroom
(
port
);
/* Don't copy more bytes than there is room for in the buffer */
/* Don't copy more bytes than there is room for in the buffer */
...
@@ -1054,10 +1041,8 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
...
@@ -1054,10 +1041,8 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
sci_out
(
port
,
SCSCR
,
0x00
);
/* TE=0, RE=0, CKE1=0 */
sci_out
(
port
,
SCSCR
,
0x00
);
/* TE=0, RE=0, CKE1=0 */
#if !defined(SCI_ONLY)
if
(
port
->
type
==
PORT_SCIF
)
if
(
port
->
type
==
PORT_SCIF
)
sci_out
(
port
,
SCFCR
,
SCFCR_RFRST
|
SCFCR_TFRST
);
sci_out
(
port
,
SCFCR
,
SCFCR_RFRST
|
SCFCR_TFRST
);
#endif
smr_val
=
sci_in
(
port
,
SCSMR
)
&
3
;
smr_val
=
sci_in
(
port
,
SCSMR
)
&
3
;
if
((
termios
->
c_cflag
&
CSIZE
)
==
CS7
)
if
((
termios
->
c_cflag
&
CSIZE
)
==
CS7
)
...
...
drivers/serial/sh-sci.h
View file @
86d758ef
This diff is collapsed.
Click to expand it.
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