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
nexedi
linux
Commits
ef7fc902
Commit
ef7fc902
authored
Jan 13, 2011
by
Paul Mundt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common/serial-rework' into sh-latest
parents
fac6c2a8
f43dc23d
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
374 additions
and
188 deletions
+374
-188
arch/arm/mach-shmobile/setup-sh7367.c
arch/arm/mach-shmobile/setup-sh7367.c
+14
-0
arch/arm/mach-shmobile/setup-sh7372.c
arch/arm/mach-shmobile/setup-sh7372.c
+14
-0
arch/arm/mach-shmobile/setup-sh7377.c
arch/arm/mach-shmobile/setup-sh7377.c
+16
-0
arch/arm/mach-shmobile/setup-sh73a0.c
arch/arm/mach-shmobile/setup-sh73a0.c
+18
-0
arch/sh/kernel/cpu/sh2/setup-sh7619.c
arch/sh/kernel/cpu/sh2/setup-sh7619.c
+6
-0
arch/sh/kernel/cpu/sh2a/setup-mxg.c
arch/sh/kernel/cpu/sh2a/setup-mxg.c
+2
-0
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
+16
-0
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
+8
-0
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+8
-0
arch/sh/kernel/cpu/sh3/setup-sh7705.c
arch/sh/kernel/cpu/sh3/setup-sh7705.c
+5
-0
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh3/setup-sh770x.c
+6
-0
arch/sh/kernel/cpu/sh3/setup-sh7710.c
arch/sh/kernel/cpu/sh3/setup-sh7710.c
+6
-0
arch/sh/kernel/cpu/sh3/setup-sh7720.c
arch/sh/kernel/cpu/sh3/setup-sh7720.c
+5
-1
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
+2
-0
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
+26
-10
arch/sh/kernel/cpu/sh4/setup-sh7760.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
+8
-0
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+8
-0
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+2
-0
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+6
-0
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+12
-0
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+12
-0
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+6
-0
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+6
-0
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
+20
-0
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+12
-0
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+12
-0
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+12
-0
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
+6
-0
arch/sh/kernel/cpu/sh5/setup-sh5.c
arch/sh/kernel/cpu/sh5/setup-sh5.c
+2
-0
drivers/serial/sh-sci.c
drivers/serial/sh-sci.c
+76
-24
drivers/serial/sh-sci.h
drivers/serial/sh-sci.h
+0
-153
include/linux/serial_sci.h
include/linux/serial_sci.h
+22
-0
No files found.
arch/arm/mach-shmobile/setup-sh7367.c
View file @
ef7fc902
...
...
@@ -35,6 +35,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xe6c40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc00
),
evt2irq
(
0xc00
),
evt2irq
(
0xc00
),
evt2irq
(
0xc00
)
},
...
...
@@ -52,6 +54,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xe6c50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc20
),
evt2irq
(
0xc20
),
evt2irq
(
0xc20
),
evt2irq
(
0xc20
)
},
...
...
@@ -69,6 +73,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xe6c60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc40
),
evt2irq
(
0xc40
),
evt2irq
(
0xc40
),
evt2irq
(
0xc40
)
},
...
...
@@ -86,6 +92,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xe6c70000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc60
),
evt2irq
(
0xc60
),
evt2irq
(
0xc60
),
evt2irq
(
0xc60
)
},
...
...
@@ -103,6 +111,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xe6c80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd20
),
evt2irq
(
0xd20
),
evt2irq
(
0xd20
),
evt2irq
(
0xd20
)
},
...
...
@@ -120,6 +130,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xe6cb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd40
),
evt2irq
(
0xd40
),
evt2irq
(
0xd40
),
evt2irq
(
0xd40
)
},
...
...
@@ -137,6 +149,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xe6c30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd60
),
evt2irq
(
0xd60
),
evt2irq
(
0xd60
),
evt2irq
(
0xd60
)
},
...
...
arch/arm/mach-shmobile/setup-sh7372.c
View file @
ef7fc902
...
...
@@ -38,6 +38,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xe6c40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0c00
),
evt2irq
(
0x0c00
),
evt2irq
(
0x0c00
),
evt2irq
(
0x0c00
)
},
...
...
@@ -55,6 +57,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xe6c50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0c20
),
evt2irq
(
0x0c20
),
evt2irq
(
0x0c20
),
evt2irq
(
0x0c20
)
},
...
...
@@ -72,6 +76,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xe6c60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0c40
),
evt2irq
(
0x0c40
),
evt2irq
(
0x0c40
),
evt2irq
(
0x0c40
)
},
...
...
@@ -89,6 +95,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xe6c70000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0c60
),
evt2irq
(
0x0c60
),
evt2irq
(
0x0c60
),
evt2irq
(
0x0c60
)
},
...
...
@@ -106,6 +114,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xe6c80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0d20
),
evt2irq
(
0x0d20
),
evt2irq
(
0x0d20
),
evt2irq
(
0x0d20
)
},
...
...
@@ -123,6 +133,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xe6cb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
evt2irq
(
0x0d40
),
evt2irq
(
0x0d40
),
evt2irq
(
0x0d40
),
evt2irq
(
0x0d40
)
},
...
...
@@ -140,6 +152,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xe6c30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFB
,
.
irqs
=
{
evt2irq
(
0x0d60
),
evt2irq
(
0x0d60
),
evt2irq
(
0x0d60
),
evt2irq
(
0x0d60
)
},
...
...
arch/arm/mach-shmobile/setup-sh7377.c
View file @
ef7fc902
...
...
@@ -36,6 +36,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xe6c40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc00
),
evt2irq
(
0xc00
),
evt2irq
(
0xc00
),
evt2irq
(
0xc00
)
},
...
...
@@ -53,6 +55,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xe6c50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc20
),
evt2irq
(
0xc20
),
evt2irq
(
0xc20
),
evt2irq
(
0xc20
)
},
...
...
@@ -70,6 +74,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xe6c60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc40
),
evt2irq
(
0xc40
),
evt2irq
(
0xc40
),
evt2irq
(
0xc40
)
},
...
...
@@ -87,6 +93,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xe6c70000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xc60
),
evt2irq
(
0xc60
),
evt2irq
(
0xc60
),
evt2irq
(
0xc60
)
},
...
...
@@ -104,6 +112,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xe6c80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd20
),
evt2irq
(
0xd20
),
evt2irq
(
0xd20
),
evt2irq
(
0xd20
)
},
...
...
@@ -121,6 +131,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xe6cb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd40
),
evt2irq
(
0xd40
),
evt2irq
(
0xd40
),
evt2irq
(
0xd40
)
},
...
...
@@ -138,6 +150,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xe6cc0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
intcs_evt2irq
(
0x1a80
),
intcs_evt2irq
(
0x1a80
),
intcs_evt2irq
(
0x1a80
),
intcs_evt2irq
(
0x1a80
)
},
...
...
@@ -155,6 +169,8 @@ static struct platform_device scif6_device = {
static
struct
plat_sci_port
scif7_platform_data
=
{
.
mapbase
=
0xe6c30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
evt2irq
(
0xd60
),
evt2irq
(
0xd60
),
evt2irq
(
0xd60
),
evt2irq
(
0xd60
)
},
...
...
arch/arm/mach-shmobile/setup-sh73a0.c
View file @
ef7fc902
...
...
@@ -36,6 +36,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xe6c40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
72
),
gic_spi
(
72
),
gic_spi
(
72
),
gic_spi
(
72
)
},
...
...
@@ -52,6 +54,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xe6c50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
73
),
gic_spi
(
73
),
gic_spi
(
73
),
gic_spi
(
73
)
},
...
...
@@ -68,6 +72,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xe6c60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
74
),
gic_spi
(
74
),
gic_spi
(
74
),
gic_spi
(
74
)
},
...
...
@@ -84,6 +90,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xe6c70000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
75
),
gic_spi
(
75
),
gic_spi
(
75
),
gic_spi
(
75
)
},
...
...
@@ -100,6 +108,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xe6c80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
78
),
gic_spi
(
78
),
gic_spi
(
78
),
gic_spi
(
78
)
},
...
...
@@ -116,6 +126,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xe6cb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
79
),
gic_spi
(
79
),
gic_spi
(
79
),
gic_spi
(
79
)
},
...
...
@@ -132,6 +144,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xe6cc0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
156
),
gic_spi
(
156
),
gic_spi
(
156
),
gic_spi
(
156
)
},
...
...
@@ -148,6 +162,8 @@ static struct platform_device scif6_device = {
static
struct
plat_sci_port
scif7_platform_data
=
{
.
mapbase
=
0xe6cd0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
gic_spi
(
143
),
gic_spi
(
143
),
gic_spi
(
143
),
gic_spi
(
143
)
},
...
...
@@ -164,6 +180,8 @@ static struct platform_device scif7_device = {
static
struct
plat_sci_port
scif8_platform_data
=
{
.
mapbase
=
0xe6c30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIFB
,
.
irqs
=
{
gic_spi
(
80
),
gic_spi
(
80
),
gic_spi
(
80
),
gic_spi
(
80
)
},
...
...
arch/sh/kernel/cpu/sh2/setup-sh7619.c
View file @
ef7fc902
...
...
@@ -62,6 +62,8 @@ static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xf8400000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
88
,
88
,
88
,
88
},
};
...
...
@@ -77,6 +79,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xf8410000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
92
,
92
,
92
,
92
},
};
...
...
@@ -92,6 +96,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xf8420000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
96
,
96
,
96
,
96
},
};
...
...
arch/sh/kernel/cpu/sh2a/setup-mxg.c
View file @
ef7fc902
...
...
@@ -201,6 +201,8 @@ static struct platform_device mtu2_2_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xff804000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
220
,
220
,
220
,
220
},
};
...
...
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
View file @
ef7fc902
...
...
@@ -180,6 +180,8 @@ static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xfffe8000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
180
,
180
,
180
,
180
}
};
...
...
@@ -195,6 +197,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xfffe8800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
184
,
184
,
184
,
184
}
};
...
...
@@ -210,6 +214,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xfffe9000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
188
,
188
,
188
,
188
}
};
...
...
@@ -225,6 +231,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xfffe9800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
192
,
192
,
192
,
192
}
};
...
...
@@ -240,6 +248,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xfffea000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
196
,
196
,
196
,
196
}
};
...
...
@@ -255,6 +265,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xfffea800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
200
,
200
,
200
,
200
}
};
...
...
@@ -270,6 +282,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xfffeb000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
204
,
204
,
204
,
204
}
};
...
...
@@ -285,6 +299,8 @@ static struct platform_device scif6_device = {
static
struct
plat_sci_port
scif7_platform_data
=
{
.
mapbase
=
0xfffeb800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
208
,
208
,
208
,
208
}
};
...
...
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
View file @
ef7fc902
...
...
@@ -176,6 +176,8 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xfffe8000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
192
,
192
,
192
,
192
},
};
...
...
@@ -191,6 +193,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xfffe8800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
196
,
196
,
196
,
196
},
};
...
...
@@ -206,6 +210,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xfffe9000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
200
,
200
,
200
,
200
},
};
...
...
@@ -221,6 +227,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xfffe9800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
204
,
204
,
204
,
204
},
};
...
...
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
View file @
ef7fc902
...
...
@@ -136,6 +136,8 @@ static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xfffe8000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
240
,
240
,
240
,
240
},
};
...
...
@@ -151,6 +153,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xfffe8800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
244
,
244
,
244
,
244
},
};
...
...
@@ -166,6 +170,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xfffe9000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
248
,
248
,
248
,
248
},
};
...
...
@@ -181,6 +187,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xfffe9800
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
252
,
252
,
252
,
252
},
};
...
...
arch/sh/kernel/cpu/sh3/setup-sh7705.c
View file @
ef7fc902
...
...
@@ -70,6 +70,9 @@ static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xa4410000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TIE
|
SCSCR_RIE
|
SCSCR_TE
|
SCSCR_RE
|
SCSCR_CKE1
|
SCSCR_CKE0
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
56
,
56
,
56
},
};
...
...
@@ -85,6 +88,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xa4400000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TIE
|
SCSCR_RIE
|
SCSCR_TE
|
SCSCR_RE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
52
,
52
},
};
...
...
arch/sh/kernel/cpu/sh3/setup-sh770x.c
View file @
ef7fc902
...
...
@@ -109,6 +109,8 @@ static struct platform_device rtc_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xfffffe80
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCI
,
.
irqs
=
{
23
,
23
,
23
,
0
},
};
...
...
@@ -126,6 +128,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xa4000150
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
56
,
56
,
56
,
56
},
};
...
...
@@ -143,6 +147,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xa4000140
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_IRDA
,
.
irqs
=
{
52
,
52
,
52
,
52
},
};
...
...
arch/sh/kernel/cpu/sh3/setup-sh7710.c
View file @
ef7fc902
...
...
@@ -99,6 +99,9 @@ static struct platform_device rtc_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xa4400000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
|
SCSCR_REIE
|
SCSCR_CKE1
|
SCSCR_CKE0
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
52
,
52
,
52
},
};
...
...
@@ -114,6 +117,9 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xa4410000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
|
SCSCR_REIE
|
SCSCR_CKE1
|
SCSCR_CKE0
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
56
,
56
,
56
,
56
},
};
...
...
arch/sh/kernel/cpu/sh3/setup-sh7720.c
View file @
ef7fc902
/*
* S
H7720 Setup
* S
etup code for SH7720, SH7721.
*
* Copyright (C) 2007 Markus Brunner, Mark Jonas
* Copyright (C) 2009 Paul Mundt
...
...
@@ -51,6 +51,8 @@ static struct platform_device rtc_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xa4430000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
@@ -66,6 +68,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xa4438000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_4
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
81
,
81
,
81
,
81
},
};
...
...
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
View file @
ef7fc902
...
...
@@ -18,6 +18,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
41
,
43
,
42
},
};
...
...
arch/sh/kernel/cpu/sh4/setup-sh7750.c
View file @
ef7fc902
...
...
@@ -14,6 +14,7 @@
#include <linux/io.h>
#include <linux/sh_timer.h>
#include <linux/serial_sci.h>
#include <asm/machtypes.h>
static
struct
resource
rtc_resources
[]
=
{
[
0
]
=
{
...
...
@@ -35,33 +36,37 @@ static struct platform_device rtc_device = {
.
resource
=
rtc_resources
,
};
static
struct
plat_sci_port
sci
f0
_platform_data
=
{
static
struct
plat_sci_port
sci_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCI
,
.
irqs
=
{
23
,
23
,
23
,
0
},
};
static
struct
platform_device
sci
f0
_device
=
{
static
struct
platform_device
sci_device
=
{
.
name
=
"sh-sci"
,
.
id
=
0
,
.
dev
=
{
.
platform_data
=
&
sci
f0
_platform_data
,
.
platform_data
=
&
sci_platform_data
,
},
};
static
struct
plat_sci_port
scif
1
_platform_data
=
{
static
struct
plat_sci_port
scif_platform_data
=
{
.
mapbase
=
0xffe80000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_TE
|
SCSCR_RE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
40
,
40
,
40
},
};
static
struct
platform_device
scif
1
_device
=
{
static
struct
platform_device
scif_device
=
{
.
name
=
"sh-sci"
,
.
id
=
1
,
.
dev
=
{
.
platform_data
=
&
scif
1
_platform_data
,
.
platform_data
=
&
scif_platform_data
,
},
};
...
...
@@ -210,8 +215,6 @@ static struct platform_device tmu4_device = {
#endif
static
struct
platform_device
*
sh7750_devices
[]
__initdata
=
{
&
scif0_device
,
&
scif1_device
,
&
rtc_device
,
&
tmu0_device
,
&
tmu1_device
,
...
...
@@ -226,14 +229,19 @@ static struct platform_device *sh7750_devices[] __initdata = {
static
int
__init
sh7750_devices_setup
(
void
)
{
if
(
mach_is_rts7751r2d
())
{
platform_register_device
(
&
scif_device
);
}
else
{
platform_register_device
(
&
sci_device
);
platform_register_device
(
&
scif_device
);
}
return
platform_add_devices
(
sh7750_devices
,
ARRAY_SIZE
(
sh7750_devices
));
}
arch_initcall
(
sh7750_devices_setup
);
static
struct
platform_device
*
sh7750_early_devices
[]
__initdata
=
{
&
scif0_device
,
&
scif1_device
,
&
tmu0_device
,
&
tmu1_device
,
&
tmu2_device
,
...
...
@@ -247,6 +255,14 @@ static struct platform_device *sh7750_early_devices[] __initdata = {
void
__init
plat_early_device_setup
(
void
)
{
if
(
mach_is_rts7751r2d
())
{
scif_platform_data
.
scscr
|=
SCSCR_CKE1
;
early_platform_add_devices
(
&
scif_device
,
1
);
}
else
{
early_platform_add_devices
(
&
sci_device
,
1
);
early_platform_add_devices
(
&
scif_device
,
1
);
}
early_platform_add_devices
(
sh7750_early_devices
,
ARRAY_SIZE
(
sh7750_early_devices
));
}
...
...
arch/sh/kernel/cpu/sh4/setup-sh7760.c
View file @
ef7fc902
...
...
@@ -129,6 +129,8 @@ static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups,
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xfe600000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
53
,
55
,
54
},
};
...
...
@@ -145,6 +147,8 @@ static struct plat_sci_port scif1_platform_data = {
.
mapbase
=
0xfe610000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
type
=
PORT_SCIF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
irqs
=
{
72
,
73
,
75
,
74
},
};
...
...
@@ -159,6 +163,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xfe620000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
76
,
77
,
79
,
78
},
};
...
...
@@ -174,6 +180,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xfe480000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCI
,
.
irqs
=
{
80
,
81
,
82
,
0
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
View file @
ef7fc902
...
...
@@ -19,6 +19,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
@@ -34,6 +36,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
81
,
81
,
81
,
81
},
};
...
...
@@ -49,6 +53,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffe20000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
82
,
82
,
82
,
82
},
};
...
...
@@ -64,6 +70,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xffe30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
83
,
83
,
83
,
83
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
View file @
ef7fc902
...
...
@@ -21,6 +21,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
View file @
ef7fc902
...
...
@@ -181,6 +181,8 @@ struct platform_device dma_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
@@ -196,6 +198,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
81
,
81
,
81
,
81
},
};
...
...
@@ -211,6 +215,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffe20000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
82
,
82
,
82
,
82
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
View file @
ef7fc902
...
...
@@ -24,6 +24,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
@@ -39,6 +41,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
81
,
81
,
81
,
81
},
};
...
...
@@ -54,6 +58,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffe20000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
82
,
82
,
82
,
82
},
};
...
...
@@ -69,6 +75,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xa4e30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
56
,
56
,
56
,
56
},
};
...
...
@@ -84,6 +92,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xa4e40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
88
,
88
,
88
,
88
},
};
...
...
@@ -99,6 +109,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xa4e50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
109
,
109
,
109
,
109
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
View file @
ef7fc902
...
...
@@ -257,6 +257,8 @@ static struct platform_device dma1_device = {
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
80
,
80
,
80
,
80
},
};
...
...
@@ -272,6 +274,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
81
,
81
,
81
,
81
},
};
...
...
@@ -287,6 +291,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffe20000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
82
,
82
,
82
,
82
},
};
...
...
@@ -302,6 +308,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xa4e30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
56
,
56
,
56
,
56
},
};
...
...
@@ -317,6 +325,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xa4e40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
88
,
88
,
88
,
88
},
};
...
...
@@ -332,6 +342,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xa4e50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
,
.
scbrr_algo_id
=
SCBRR_ALGO_3
,
.
type
=
PORT_SCIFA
,
.
irqs
=
{
109
,
109
,
109
,
109
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
View file @
ef7fc902
...
...
@@ -20,6 +20,8 @@
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xfe4b0000
,
/* SCIF2 */
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
40
,
40
,
40
},
};
...
...
@@ -35,6 +37,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xfe4c0000
,
/* SCIF3 */
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
76
,
76
,
76
,
76
},
};
...
...
@@ -50,6 +54,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xfe4d0000
,
/* SCIF4 */
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
104
,
104
,
104
,
104
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
View file @
ef7fc902
...
...
@@ -19,6 +19,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
40
,
40
,
40
},
};
...
...
@@ -34,6 +36,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe08000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
76
,
76
,
76
,
76
},
};
...
...
@@ -49,6 +53,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
104
,
104
,
104
,
104
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
View file @
ef7fc902
...
...
@@ -17,6 +17,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xff923000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
61
,
61
,
61
,
61
},
};
...
...
@@ -32,6 +34,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xff924000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
62
,
62
,
62
,
62
},
};
...
...
@@ -47,6 +51,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xff925000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
63
,
63
,
63
,
63
},
};
...
...
@@ -62,6 +68,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xff926000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
64
,
64
,
64
,
64
},
};
...
...
@@ -77,6 +85,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xff927000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
65
,
65
,
65
,
65
},
};
...
...
@@ -92,6 +102,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xff928000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
66
,
66
,
66
,
66
},
};
...
...
@@ -107,6 +119,8 @@ static struct platform_device scif5_device = {
static
struct
plat_sci_port
scif6_platform_data
=
{
.
mapbase
=
0xff929000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
67
,
67
,
67
,
67
},
};
...
...
@@ -122,6 +136,8 @@ static struct platform_device scif6_device = {
static
struct
plat_sci_port
scif7_platform_data
=
{
.
mapbase
=
0xff92a000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
68
,
68
,
68
,
68
},
};
...
...
@@ -137,6 +153,8 @@ static struct platform_device scif7_device = {
static
struct
plat_sci_port
scif8_platform_data
=
{
.
mapbase
=
0xff92b000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
69
,
69
,
69
,
69
},
};
...
...
@@ -152,6 +170,8 @@ static struct platform_device scif8_device = {
static
struct
plat_sci_port
scif9_platform_data
=
{
.
mapbase
=
0xff92c000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_TOIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
70
,
70
,
70
,
70
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
View file @
ef7fc902
...
...
@@ -20,6 +20,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffe00000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
40
,
40
,
40
},
};
...
...
@@ -35,6 +37,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffe10000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
76
,
76
,
76
,
76
},
};
...
...
@@ -379,6 +383,7 @@ static int __init sh7780_devices_setup(void)
ARRAY_SIZE
(
sh7780_devices
));
}
arch_initcall
(
sh7780_devices_setup
);
static
struct
platform_device
*
sh7780_early_devices
[]
__initdata
=
{
&
scif0_device
,
&
scif1_device
,
...
...
@@ -392,6 +397,13 @@ static struct platform_device *sh7780_early_devices[] __initdata = {
void
__init
plat_early_device_setup
(
void
)
{
if
(
mach_is_sh2007
())
{
scif0_platform_data
.
scscr
&=
~
SCSCR_CKE1
;
scif0_platform_data
.
scbrr_algo_id
=
SCBRR_ALGO_2
;
scif1_platform_data
.
scscr
&=
~
SCSCR_CKE1
;
scif1_platform_data
.
scbrr_algo_id
=
SCBRR_ALGO_2
;
}
early_platform_add_devices
(
sh7780_early_devices
,
ARRAY_SIZE
(
sh7780_early_devices
));
}
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
View file @
ef7fc902
...
...
@@ -23,6 +23,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffea0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
40
,
40
,
40
},
};
...
...
@@ -38,6 +40,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffeb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
44
,
44
,
44
,
44
},
};
...
...
@@ -53,6 +57,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffec0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
60
,
60
,
60
,
60
},
};
...
...
@@ -68,6 +74,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xffed0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
61
,
61
,
61
,
61
},
};
...
...
@@ -83,6 +91,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xffee0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
62
,
62
,
62
,
62
},
};
...
...
@@ -98,6 +108,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xffef0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
63
,
63
,
63
,
63
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
View file @
ef7fc902
...
...
@@ -29,6 +29,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffea0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
41
,
43
,
42
},
};
...
...
@@ -47,6 +49,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffeb0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
44
,
44
,
44
,
44
},
};
...
...
@@ -62,6 +66,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffec0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
50
,
50
,
50
,
50
},
};
...
...
@@ -77,6 +83,8 @@ static struct platform_device scif2_device = {
static
struct
plat_sci_port
scif3_platform_data
=
{
.
mapbase
=
0xffed0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
51
,
51
,
51
,
51
},
};
...
...
@@ -92,6 +100,8 @@ static struct platform_device scif3_device = {
static
struct
plat_sci_port
scif4_platform_data
=
{
.
mapbase
=
0xffee0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
52
,
52
,
52
},
};
...
...
@@ -107,6 +117,8 @@ static struct platform_device scif4_device = {
static
struct
plat_sci_port
scif5_platform_data
=
{
.
mapbase
=
0xffef0000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
|
SCSCR_CKE1
,
.
scbrr_algo_id
=
SCBRR_ALGO_1
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
53
,
53
,
53
,
53
},
};
...
...
arch/sh/kernel/cpu/sh4a/setup-shx3.c
View file @
ef7fc902
...
...
@@ -29,6 +29,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
0xffc30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
41
,
43
,
42
},
};
...
...
@@ -44,6 +46,8 @@ static struct platform_device scif0_device = {
static
struct
plat_sci_port
scif1_platform_data
=
{
.
mapbase
=
0xffc40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
44
,
45
,
47
,
46
},
};
...
...
@@ -59,6 +63,8 @@ static struct platform_device scif1_device = {
static
struct
plat_sci_port
scif2_platform_data
=
{
.
mapbase
=
0xffc60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
53
,
55
,
54
},
};
...
...
arch/sh/kernel/cpu/sh5/setup-sh5.c
View file @
ef7fc902
...
...
@@ -19,6 +19,8 @@
static
struct
plat_sci_port
scif0_platform_data
=
{
.
mapbase
=
PHYS_PERIPHERAL_BLOCK
+
0x01030000
,
.
flags
=
UPF_BOOT_AUTOCONF
|
UPF_IOREMAP
,
.
scscr
=
SCSCR_RE
|
SCSCR_TE
|
SCSCR_REIE
,
.
scbrr_algo_id
=
SCBRR_ALGO_2
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
39
,
40
,
42
,
0
},
};
...
...
drivers/serial/sh-sci.c
View file @
ef7fc902
...
...
@@ -3,7 +3,7 @@
*
* SuperH on-chip serial module support. (SCI with no FIFO / with FIFO)
*
* Copyright (C) 2002 - 20
08
Paul Mundt
* Copyright (C) 2002 - 20
11
Paul Mundt
* Modified to support SH7720 SCIF. Markus Brunner, Mark Jonas (Jul 2007).
*
* based off of the old drivers/char/sh-sci.c by:
...
...
@@ -81,14 +81,22 @@ struct sci_port {
struct
timer_list
break_timer
;
int
break_flag
;
/* SCSCR initialization */
unsigned
int
scscr
;
/* SCBRR calculation algo */
unsigned
int
scbrr_algo_id
;
/* Interface clock */
struct
clk
*
iclk
;
/* Function clock */
struct
clk
*
fclk
;
struct
list_head
node
;
struct
dma_chan
*
chan_tx
;
struct
dma_chan
*
chan_rx
;
#ifdef CONFIG_SERIAL_SH_SCI_DMA
struct
device
*
dma_dev
;
unsigned
int
slave_tx
;
...
...
@@ -415,9 +423,9 @@ static void sci_transmit_chars(struct uart_port *port)
if
(
!
(
status
&
SCxSR_TDxE
(
port
)))
{
ctrl
=
sci_in
(
port
,
SCSCR
);
if
(
uart_circ_empty
(
xmit
))
ctrl
&=
~
SC
I_CTRL_FLAGS
_TIE
;
ctrl
&=
~
SC
SCR
_TIE
;
else
ctrl
|=
SC
I_CTRL_FLAGS
_TIE
;
ctrl
|=
SC
SCR
_TIE
;
sci_out
(
port
,
SCSCR
,
ctrl
);
return
;
}
...
...
@@ -459,7 +467,7 @@ static void sci_transmit_chars(struct uart_port *port)
sci_out
(
port
,
SCxSR
,
SCxSR_TDxE_CLEAR
(
port
));
}
ctrl
|=
SC
I_CTRL_FLAGS
_TIE
;
ctrl
|=
SC
SCR
_TIE
;
sci_out
(
port
,
SCSCR
,
ctrl
);
}
}
...
...
@@ -708,7 +716,7 @@ static irqreturn_t sci_rx_interrupt(int irq, void *ptr)
disable_irq_nosync
(
irq
);
scr
|=
0x4000
;
}
else
{
scr
&=
~
SC
I_CTRL_FLAGS
_RIE
;
scr
&=
~
SC
SCR
_RIE
;
}
sci_out
(
port
,
SCSCR
,
scr
);
/* Clear current interrupt */
...
...
@@ -777,6 +785,18 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr)
return
IRQ_HANDLED
;
}
static
inline
unsigned
long
port_rx_irq_mask
(
struct
uart_port
*
port
)
{
/*
* Not all ports (such as SCIFA) will support REIE. Rather than
* special-casing the port type, we check the port initialization
* IRQ enable mask to see whether the IRQ is desired at all. If
* it's unset, it's logically inferred that there's no point in
* testing for it.
*/
return
SCSCR_RIE
|
(
to_sci_port
(
port
)
->
scscr
&
SCSR_REIE
);
}
static
irqreturn_t
sci_mpxed_interrupt
(
int
irq
,
void
*
ptr
)
{
unsigned
short
ssr_status
,
scr_status
,
err_enabled
;
...
...
@@ -786,22 +806,25 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
ssr_status
=
sci_in
(
port
,
SCxSR
);
scr_status
=
sci_in
(
port
,
SCSCR
);
err_enabled
=
scr_status
&
(
SCI_CTRL_FLAGS_REIE
|
SCI_CTRL_FLAGS_RIE
);
err_enabled
=
scr_status
&
port_rx_irq_mask
(
port
);
/* Tx Interrupt */
if
((
ssr_status
&
SCxSR_TDxE
(
port
))
&&
(
scr_status
&
SC
I_CTRL_FLAGS
_TIE
)
&&
if
((
ssr_status
&
SCxSR_TDxE
(
port
))
&&
(
scr_status
&
SC
SCR
_TIE
)
&&
!
s
->
chan_tx
)
ret
=
sci_tx_interrupt
(
irq
,
ptr
);
/*
* Rx Interrupt: if we're using DMA, the DMA controller clears RDF /
* DR flags
*/
if
(((
ssr_status
&
SCxSR_RDxF
(
port
))
||
s
->
chan_rx
)
&&
(
scr_status
&
SC
I_CTRL_FLAGS
_RIE
))
(
scr_status
&
SC
SCR
_RIE
))
ret
=
sci_rx_interrupt
(
irq
,
ptr
);
/* Error Interrupt */
if
((
ssr_status
&
SCxSR_ERRORS
(
port
))
&&
err_enabled
)
ret
=
sci_er_interrupt
(
irq
,
ptr
);
/* Break Interrupt */
if
((
ssr_status
&
SCxSR_BRK
(
port
))
&&
err_enabled
)
ret
=
sci_br_interrupt
(
irq
,
ptr
);
...
...
@@ -951,7 +974,7 @@ static void sci_dma_tx_complete(void *arg)
schedule_work
(
&
s
->
work_tx
);
}
else
if
(
port
->
type
==
PORT_SCIFA
||
port
->
type
==
PORT_SCIFB
)
{
u16
ctrl
=
sci_in
(
port
,
SCSCR
);
sci_out
(
port
,
SCSCR
,
ctrl
&
~
SC
I_CTRL_FLAGS
_TIE
);
sci_out
(
port
,
SCSCR
,
ctrl
&
~
SC
SCR
_TIE
);
}
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
...
...
@@ -1214,14 +1237,16 @@ static void sci_start_tx(struct uart_port *port)
if
(
new
!=
scr
)
sci_out
(
port
,
SCSCR
,
new
);
}
if
(
s
->
chan_tx
&&
!
uart_circ_empty
(
&
s
->
port
.
state
->
xmit
)
&&
s
->
cookie_tx
<
0
)
schedule_work
(
&
s
->
work_tx
);
#endif
if
(
!
s
->
chan_tx
||
port
->
type
==
PORT_SCIFA
||
port
->
type
==
PORT_SCIFB
)
{
/* Set TIE (Transmit Interrupt Enable) bit in SCSCR */
ctrl
=
sci_in
(
port
,
SCSCR
);
sci_out
(
port
,
SCSCR
,
ctrl
|
SC
I_CTRL_FLAGS
_TIE
);
sci_out
(
port
,
SCSCR
,
ctrl
|
SC
SCR
_TIE
);
}
}
...
...
@@ -1231,20 +1256,24 @@ static void sci_stop_tx(struct uart_port *port)
/* Clear TIE (Transmit Interrupt Enable) bit in SCSCR */
ctrl
=
sci_in
(
port
,
SCSCR
);
if
(
port
->
type
==
PORT_SCIFA
||
port
->
type
==
PORT_SCIFB
)
ctrl
&=
~
0x8000
;
ctrl
&=
~
SCI_CTRL_FLAGS_TIE
;
ctrl
&=
~
SCSCR_TIE
;
sci_out
(
port
,
SCSCR
,
ctrl
);
}
static
void
sci_start_rx
(
struct
uart_port
*
port
)
{
unsigned
short
ctrl
=
SCI_CTRL_FLAGS_RIE
|
SCI_CTRL_FLAGS_REIE
;
unsigned
short
ctrl
;
ctrl
=
sci_in
(
port
,
SCSCR
)
|
port_rx_irq_mask
(
port
);
/* Set RIE (Receive Interrupt Enable) bit in SCSCR */
ctrl
|=
sci_in
(
port
,
SCSCR
);
if
(
port
->
type
==
PORT_SCIFA
||
port
->
type
==
PORT_SCIFB
)
ctrl
&=
~
0x4000
;
sci_out
(
port
,
SCSCR
,
ctrl
);
}
...
...
@@ -1252,11 +1281,13 @@ static void sci_stop_rx(struct uart_port *port)
{
unsigned
short
ctrl
;
/* Clear RIE (Receive Interrupt Enable) bit in SCSCR */
ctrl
=
sci_in
(
port
,
SCSCR
);
if
(
port
->
type
==
PORT_SCIFA
||
port
->
type
==
PORT_SCIFB
)
ctrl
&=
~
0x4000
;
ctrl
&=
~
(
SCI_CTRL_FLAGS_RIE
|
SCI_CTRL_FLAGS_REIE
);
ctrl
&=
~
port_rx_irq_mask
(
port
);
sci_out
(
port
,
SCSCR
,
ctrl
);
}
...
...
@@ -1296,7 +1327,7 @@ static void rx_timer_fn(unsigned long arg)
scr
&=
~
0x4000
;
enable_irq
(
s
->
irqs
[
1
]);
}
sci_out
(
port
,
SCSCR
,
scr
|
SC
I_CTRL_FLAGS
_RIE
);
sci_out
(
port
,
SCSCR
,
scr
|
SC
SCR
_RIE
);
dev_dbg
(
port
->
dev
,
"DMA Rx timed out
\n
"
);
schedule_work
(
&
s
->
work_rx
);
}
...
...
@@ -1442,12 +1473,31 @@ static void sci_shutdown(struct uart_port *port)
s
->
disable
(
port
);
}
static
unsigned
int
sci_scbrr_calc
(
unsigned
int
algo_id
,
unsigned
int
bps
,
unsigned
long
freq
)
{
switch
(
algo_id
)
{
case
SCBRR_ALGO_1
:
return
((
freq
+
16
*
bps
)
/
(
16
*
bps
)
-
1
);
case
SCBRR_ALGO_2
:
return
((
freq
+
16
*
bps
)
/
(
32
*
bps
)
-
1
);
case
SCBRR_ALGO_3
:
return
(((
freq
*
2
)
+
16
*
bps
)
/
(
16
*
bps
)
-
1
);
case
SCBRR_ALGO_4
:
return
(((
freq
*
2
)
+
16
*
bps
)
/
(
32
*
bps
)
-
1
);
case
SCBRR_ALGO_5
:
return
(((
freq
*
1000
/
32
)
/
bps
)
-
1
);
}
/* Warn, but use a safe default */
WARN_ON
(
1
);
return
((
freq
+
16
*
bps
)
/
(
32
*
bps
)
-
1
);
}
static
void
sci_set_termios
(
struct
uart_port
*
port
,
struct
ktermios
*
termios
,
struct
ktermios
*
old
)
{
#ifdef CONFIG_SERIAL_SH_SCI_DMA
struct
sci_port
*
s
=
to_sci_port
(
port
);
#endif
unsigned
int
status
,
baud
,
smr_val
,
max_baud
;
int
t
=
-
1
;
u16
scfcr
=
0
;
...
...
@@ -1464,7 +1514,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
baud
=
uart_get_baud_rate
(
port
,
termios
,
old
,
0
,
max_baud
);
if
(
likely
(
baud
&&
port
->
uartclk
))
t
=
SCBRR_VALUE
(
baud
,
port
->
uartclk
);
t
=
sci_scbrr_calc
(
s
->
scbrr_algo_id
,
baud
,
port
->
uartclk
);
do
{
status
=
sci_in
(
port
,
SCxSR
);
...
...
@@ -1506,7 +1556,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
sci_init_pins
(
port
,
termios
->
c_cflag
);
sci_out
(
port
,
SCFCR
,
scfcr
|
((
termios
->
c_cflag
&
CRTSCTS
)
?
SCFCR_MCE
:
0
));
sci_out
(
port
,
SCSCR
,
SCSCR_INIT
(
port
)
);
sci_out
(
port
,
SCSCR
,
s
->
scscr
);
#ifdef CONFIG_SERIAL_SH_SCI_DMA
/*
...
...
@@ -1679,9 +1729,11 @@ static int __devinit sci_init_single(struct platform_device *dev,
port
->
mapbase
=
p
->
mapbase
;
port
->
membase
=
p
->
membase
;
port
->
irq
=
p
->
irqs
[
SCIx_TXI_IRQ
];
port
->
flags
=
p
->
flags
;
sci_port
->
type
=
port
->
type
=
p
->
type
;
port
->
irq
=
p
->
irqs
[
SCIx_TXI_IRQ
];
port
->
flags
=
p
->
flags
;
sci_port
->
type
=
port
->
type
=
p
->
type
;
sci_port
->
scscr
=
p
->
scscr
;
sci_port
->
scbrr_algo_id
=
p
->
scbrr_algo_id
;
#ifdef CONFIG_SERIAL_SH_SCI_DMA
sci_port
->
dma_dev
=
p
->
dma_dev
;
...
...
drivers/serial/sh-sci.h
View file @
ef7fc902
...
...
@@ -15,27 +15,17 @@
defined(CONFIG_CPU_SUBTYPE_SH7709)
# define SCPCR 0xA4000116
/* 16 bit SCI and SCIF */
# define SCPDR 0xA4000136
/* 8 bit SCI and SCIF */
# define SCSCR_INIT(port) 0x30
/* TIE=0,RIE=0,TE=1,RE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7705)
# define SCIF0 0xA4400000
# define SCIF2 0xA4410000
# define SCSMR_Ir 0xA44A0000
# define IRDA_SCIF SCIF0
# define SCPCR 0xA4000116
# define SCPDR 0xA4000136
/* Set the clock source,
* SCIF2 (0xA4410000) -> External clock, SCK pin used as clock input
* SCIF0 (0xA4400000) -> Internal clock, SCK pin as serial clock output
*/
# define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0
#elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SH73A0) || \
defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
# define SCSCR_INIT(port) 0x0030
/* TIE=0,RIE=0,TE=1,RE=1 */
# define PORT_PTCR 0xA405011EUL
# define PORT_PVCR 0xA4050122UL
# define SCIF_ORER 0x0200
/* overrun error bit */
...
...
@@ -43,7 +33,6 @@
# define SCSPTR1 0xFFE0001C
/* 8 bit SCIF */
# define SCSPTR2 0xFFE80020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x3a
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || \
defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
...
...
@@ -53,39 +42,31 @@
# define SCSPTR1 0xffe0001c
/* 8 bit SCI */
# define SCSPTR2 0xFFE80020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) (((port)->type == PORT_SCI) ? \
0x30
/* TIE=0,RIE=0,TE=1,RE=1 */
: \
0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
)
#elif defined(CONFIG_CPU_SUBTYPE_SH7760)
# define SCSPTR0 0xfe600024
/* 16 bit SCIF */
# define SCSPTR1 0xfe610024
/* 16 bit SCIF */
# define SCSPTR2 0xfe620024
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
# define SCSPTR0 0xA4400000
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define PACR 0xa4050100
# define PBCR 0xa4050102
# define SCSCR_INIT(port) 0x3B
#elif defined(CONFIG_CPU_SUBTYPE_SH7343)
# define SCSPTR0 0xffe00010
/* 16 bit SCIF */
# define SCSPTR1 0xffe10010
/* 16 bit SCIF */
# define SCSPTR2 0xffe20010
/* 16 bit SCIF */
# define SCSPTR3 0xffe30010
/* 16 bit SCIF */
# define SCSCR_INIT(port) 0x32
/* TIE=0,RIE=0,TE=1,RE=1,REIE=0,CKE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7722)
# define PADR 0xA4050120
# define PSDR 0xA405013e
# define PWDR 0xA4050166
# define PSCR 0xA405011E
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x0038
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7366)
# define SCPDR0 0xA405013E
/* 16 bit SCIF0 PSDR */
# define SCSPTR0 SCPDR0
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x0038
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
# define SCSPTR0 0xa4050160
# define SCSPTR1 0xa405013e
...
...
@@ -94,62 +75,38 @@
# define SCSPTR4 0xa4050128
# define SCSPTR5 0xa4050128
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x0038
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) ((port)->type == PORT_SCIFA ? \
0x30
/* TIE=0,RIE=0,TE=1,RE=1 */
: \
0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
)
#elif defined(CONFIG_CPU_SUBTYPE_SH4_202)
# define SCSPTR2 0xffe80020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
# define SCIF_BASE_ADDR 0x01030000
# define SCIF_ADDR_SH5 PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
# define SCIF_PTR2_OFFS 0x0000020
# define SCIF_LSR2_OFFS 0x0000024
# define SCSPTR2 ((port->mapbase)+SCIF_PTR2_OFFS)
/* 16 bit SCIF */
# define SCLSR2 ((port->mapbase)+SCIF_LSR2_OFFS)
/* 16 bit SCIF */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0, TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_H83007) || defined(CONFIG_H83068)
# define SCSCR_INIT(port) 0x30
/* TIE=0,RIE=0,TE=1,RE=1 */
# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port)
#elif defined(CONFIG_H8S2678)
# define SCSCR_INIT(port) 0x30
/* TIE=0,RIE=0,TE=1,RE=1 */
# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port)
#elif defined(CONFIG_CPU_SUBTYPE_SH7757)
# define SCSPTR0 0xfe4b0020
# define SCSPTR1 0xfe4b0020
# define SCSPTR2 0xfe4b0020
# define SCIF_ORER 0x0001
# define SCSCR_INIT(port) 0x38
# define SCIF_ONLY
#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
# define SCSPTR0 0xffe00024
/* 16 bit SCIF */
# define SCSPTR1 0xffe08024
/* 16 bit SCIF */
# define SCSPTR2 0xffe10020
/* 16 bit SCIF/IRDA */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7770)
# define SCSPTR0 0xff923020
/* 16 bit SCIF */
# define SCSPTR1 0xff924020
/* 16 bit SCIF */
# define SCSPTR2 0xff925020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x3c
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1,cke=2 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7780)
# define SCSPTR0 0xffe00024
/* 16 bit SCIF */
# define SCSPTR1 0xffe10024
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* Overrun error bit */
#if defined(CONFIG_SH_SH2007)
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1,CKE1=0 */
# define SCSCR_INIT(port) 0x38
#else
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1,CKE1=1 */
# define SCSCR_INIT(port) 0x3a
#endif
#elif defined(CONFIG_CPU_SUBTYPE_SH7785) || \
defined(CONFIG_CPU_SUBTYPE_SH7786)
# define SCSPTR0 0xffea0024
/* 16 bit SCIF */
...
...
@@ -159,7 +116,6 @@
# define SCSPTR4 0xffee0024
/* 16 bit SCIF */
# define SCSPTR5 0xffef0024
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* Overrun error bit */
# define SCSCR_INIT(port) 0x3a
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7201) || \
defined(CONFIG_CPU_SUBTYPE_SH7203) || \
defined(CONFIG_CPU_SUBTYPE_SH7206) || \
...
...
@@ -174,52 +130,21 @@
# define SCSPTR6 0xfffeB020
/* 16 bit SCIF */
# define SCSPTR7 0xfffeB820
/* 16 bit SCIF */
# endif
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
# define SCSPTR0 0xf8400020
/* 16 bit SCIF */
# define SCSPTR1 0xf8410020
/* 16 bit SCIF */
# define SCSPTR2 0xf8420020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SHX3)
# define SCSPTR0 0xffc30020
/* 16 bit SCIF */
# define SCSPTR1 0xffc40020
/* 16 bit SCIF */
# define SCSPTR2 0xffc50020
/* 16 bit SCIF */
# define SCSPTR3 0xffc60020
/* 16 bit SCIF */
# define SCIF_ORER 0x0001
/* Overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#else
# error CPU subtype not defined
#endif
/* SCSCR */
#define SCI_CTRL_FLAGS_TIE 0x80
/* all */
#define SCI_CTRL_FLAGS_RIE 0x40
/* all */
#define SCI_CTRL_FLAGS_TE 0x20
/* all */
#define SCI_CTRL_FLAGS_RE 0x10
/* all */
#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
defined(CONFIG_CPU_SUBTYPE_SH7091) || \
defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
defined(CONFIG_CPU_SUBTYPE_SH7722) || \
defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
defined(CONFIG_CPU_SUBTYPE_SH7751) || \
defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
defined(CONFIG_CPU_SUBTYPE_SH7763) || \
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7785) || \
defined(CONFIG_CPU_SUBTYPE_SH7786) || \
defined(CONFIG_CPU_SUBTYPE_SHX3)
#define SCI_CTRL_FLAGS_REIE 0x08
/* 7750 SCIF */
#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
#define SCI_CTRL_FLAGS_REIE ((port)->type == PORT_SCIFA ? 0 : 8)
#else
#define SCI_CTRL_FLAGS_REIE 0
#endif
/* SCI_CTRL_FLAGS_MPIE 0x08 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
/* SCI_CTRL_FLAGS_TEIE 0x04 * 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
/* SCI_CTRL_FLAGS_CKE1 0x02 * all */
/* SCI_CTRL_FLAGS_CKE0 0x01 * 7707 SCI/SCIF, 7708 SCI, 7709 SCI/SCIF, 7750 SCI */
/* SCxSR SCI */
#define SCI_TDRE 0x80
/* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
#define SCI_RDRF 0x40
/* 7707 SCI, 7708 SCI, 7709 SCI, 7750 SCI */
...
...
@@ -300,23 +225,11 @@
/* SCFCR */
#define SCFCR_RFRST 0x0002
#define SCFCR_TFRST 0x0004
#define SCFCR_TCRST 0x4000
#define SCFCR_MCE 0x0008
#define SCI_MAJOR 204
#define SCI_MINOR_START 8
/* Generic serial flags */
#define SCI_RX_THROTTLE 0x0000001
#define SCI_MAGIC 0xbabeface
/*
* Events are used to schedule things to happen at timer-interrupt
* time, instead of at rs interrupt time.
*/
#define SCI_EVENT_WRITE_WAKEUP 0
#define SCI_IN(size, offset) \
if ((size) == 8) { \
return ioread8(port->membase + (offset)); \
...
...
@@ -445,8 +358,6 @@
SCIF_FNS
(
SCSMR
,
0x00
,
16
)
SCIF_FNS
(
SCBRR
,
0x04
,
8
)
SCIF_FNS
(
SCSCR
,
0x08
,
16
)
SCIF_FNS
(
SCTDSR
,
0x0c
,
8
)
SCIF_FNS
(
SCFER
,
0x10
,
16
)
SCIF_FNS
(
SCxSR
,
0x14
,
16
)
SCIF_FNS
(
SCFCR
,
0x18
,
16
)
SCIF_FNS
(
SCFDR
,
0x1c
,
16
)
...
...
@@ -476,8 +387,6 @@ SCIx_FNS(SCxTDR, 0x20, 8, 0x0c, 8)
SCIx_FNS
(
SCxSR
,
0x14
,
16
,
0x10
,
16
)
SCIx_FNS
(
SCxRDR
,
0x24
,
8
,
0x14
,
8
)
SCIx_FNS
(
SCSPTR
,
0
,
0
,
0
,
0
)
SCIF_FNS
(
SCTDSR
,
0x0c
,
8
)
SCIF_FNS
(
SCFER
,
0x10
,
16
)
SCIF_FNS
(
SCFCR
,
0x18
,
16
)
SCIF_FNS
(
SCFDR
,
0x1c
,
16
)
SCIF_FNS
(
SCLSR
,
0x24
,
16
)
...
...
@@ -503,7 +412,6 @@ SCIF_FNS(SCLSR, 0, 0, 0x28, 16)
#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
SCIF_FNS
(
SCFDR
,
0
,
0
,
0x1C
,
16
)
SCIF_FNS
(
SCSPTR2
,
0
,
0
,
0x20
,
16
)
SCIF_FNS
(
SCLSR2
,
0
,
0
,
0x24
,
16
)
SCIF_FNS
(
SCTFDR
,
0x0e
,
16
,
0x1C
,
16
)
SCIF_FNS
(
SCRFDR
,
0x0e
,
16
,
0x20
,
16
)
SCIF_FNS
(
SCSPTR
,
0
,
0
,
0x24
,
16
)
...
...
@@ -597,64 +505,3 @@ static inline int sci_rxd_in(struct uart_port *port)
return
1
;
}
#endif
/*
* Values for the BitRate Register (SCBRR)
*
* The values are actually divisors for a frequency which can
* be internal to the SH3 (14.7456MHz) or derived from an external
* clock source. This driver assumes the internal clock is used;
* to support using an external clock source, config options or
* possibly command-line options would need to be added.
*
* Also, to support speeds below 2400 (why?) the lower 2 bits of
* the SCSMR register would also need to be set to non-zero values.
*
* -- Greg Banks 27Feb2000
*
* Answer: The SCBRR register is only eight bits, and the value in
* it gets larger with lower baud rates. At around 2400 (depending on
* the peripherial module clock) you run out of bits. However the
* lower two bits of SCSMR allow the module clock to be divided down,
* scaling the value which is needed in SCBRR.
*
* -- Stuart Menefy - 23 May 2000
*
* I meant, why would anyone bother with bitrates below 2400.
*
* -- Greg Banks - 7Jul2000
*
* You "speedist"! How will I use my 110bps ASR-33 teletype with paper
* tape reader as a console!
*
* -- Mitch Davis - 15 Jul 2000
*/
#if (defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7785) || \
defined(CONFIG_CPU_SUBTYPE_SH7786)) && \
!defined(CONFIG_SH_SH2007)
#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(16*bps)-1)
#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SH73A0) || \
defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
#elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\
defined(CONFIG_CPU_SUBTYPE_SH7724)
static
inline
int
scbrr_calc
(
struct
uart_port
*
port
,
int
bps
,
int
clk
)
{
if
(
port
->
type
==
PORT_SCIF
)
return
(
clk
+
16
*
bps
)
/
(
32
*
bps
)
-
1
;
else
return
((
clk
*
2
)
+
16
*
bps
)
/
(
16
*
bps
)
-
1
;
}
#define SCBRR_VALUE(bps, clk) scbrr_calc(port, bps, clk)
#elif defined(__H8300H__) || defined(__H8300S__)
#define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1)
#else
/* Generic SH */
#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
#endif
include/linux/serial_sci.h
View file @
ef7fc902
...
...
@@ -8,6 +8,23 @@
* Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
*/
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) */
};
#define SCSCR_TIE (1 << 7)
#define SCSCR_RIE (1 << 6)
#define SCSCR_TE (1 << 5)
#define SCSCR_RE (1 << 4)
#define SCSCR_REIE (1 << 3)
/* not supported by all parts */
#define SCSCR_TOIE (1 << 2)
/* not supported by all parts */
#define SCSCR_CKE1 (1 << 1)
#define SCSCR_CKE0 (1 << 0)
/* Offsets into the sci_port->irqs array */
enum
{
SCIx_ERI_IRQ
,
...
...
@@ -29,7 +46,12 @@ struct plat_sci_port {
unsigned
int
type
;
/* SCI / SCIF / IRDA */
upf_t
flags
;
/* UPF_* flags */
char
*
clk
;
/* clock string */
unsigned
int
scbrr_algo_id
;
/* SCBRR calculation algo */
unsigned
int
scscr
;
/* SCSCR initialization */
struct
device
*
dma_dev
;
#ifdef CONFIG_SERIAL_SH_SCI_DMA
unsigned
int
dma_slave_tx
;
unsigned
int
dma_slave_rx
;
...
...
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