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
70876fac
Commit
70876fac
authored
Jun 20, 2007
by
Paul Mundt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'x3'
parents
b2309d68
2b1bd1ac
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1092 additions
and
35 deletions
+1092
-35
arch/sh/Kconfig
arch/sh/Kconfig
+1
-0
arch/sh/configs/shx3_defconfig
arch/sh/configs/shx3_defconfig
+756
-0
arch/sh/kernel/cpu/irq/intc2.c
arch/sh/kernel/cpu/irq/intc2.c
+7
-2
arch/sh/kernel/cpu/sh3/entry.S
arch/sh/kernel/cpu/sh3/entry.S
+19
-0
arch/sh/kernel/cpu/sh4/probe.c
arch/sh/kernel/cpu/sh4/probe.c
+8
-0
arch/sh/kernel/cpu/sh4a/Makefile
arch/sh/kernel/cpu/sh4a/Makefile
+2
-0
arch/sh/kernel/cpu/sh4a/clock-shx3.c
arch/sh/kernel/cpu/sh4a/clock-shx3.c
+135
-0
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
+85
-0
arch/sh/kernel/setup.c
arch/sh/kernel/setup.c
+1
-1
arch/sh/kernel/timers/timer-tmu.c
arch/sh/kernel/timers/timer-tmu.c
+4
-3
arch/sh/mm/Kconfig
arch/sh/mm/Kconfig
+9
-0
drivers/serial/sh-sci.c
drivers/serial/sh-sci.c
+3
-1
drivers/serial/sh-sci.h
drivers/serial/sh-sci.h
+23
-2
include/asm-sh/bugs.h
include/asm-sh/bugs.h
+1
-1
include/asm-sh/cpu-sh4/freq.h
include/asm-sh/cpu-sh4/freq.h
+2
-0
include/asm-sh/cpu-sh4/timer.h
include/asm-sh/cpu-sh4/timer.h
+33
-24
include/asm-sh/processor.h
include/asm-sh/processor.h
+1
-1
include/asm-sh/smp.h
include/asm-sh/smp.h
+2
-0
No files found.
arch/sh/Kconfig
View file @
70876fac
...
@@ -554,6 +554,7 @@ config NR_CPUS
...
@@ -554,6 +554,7 @@ config NR_CPUS
int "Maximum number of CPUs (2-32)"
int "Maximum number of CPUs (2-32)"
range 2 32
range 2 32
depends on SMP
depends on SMP
default "4" if CPU_SHX3
default "2"
default "2"
help
help
This allows you to specify the maximum number of CPUs which this
This allows you to specify the maximum number of CPUs which this
...
...
arch/sh/configs/shx3_defconfig
0 → 100644
View file @
70876fac
This diff is collapsed.
Click to expand it.
arch/sh/kernel/cpu/irq/intc2.c
View file @
70876fac
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/io.h>
#include <asm/smp.h>
static
inline
struct
intc2_desc
*
get_intc2_desc
(
unsigned
int
irq
)
static
inline
struct
intc2_desc
*
get_intc2_desc
(
unsigned
int
irq
)
{
{
...
@@ -24,14 +25,18 @@ static void disable_intc2_irq(unsigned int irq)
...
@@ -24,14 +25,18 @@ static void disable_intc2_irq(unsigned int irq)
{
{
struct
intc2_data
*
p
=
get_irq_chip_data
(
irq
);
struct
intc2_data
*
p
=
get_irq_chip_data
(
irq
);
struct
intc2_desc
*
d
=
get_intc2_desc
(
irq
);
struct
intc2_desc
*
d
=
get_intc2_desc
(
irq
);
ctrl_outl
(
1
<<
p
->
msk_shift
,
d
->
msk_base
+
p
->
msk_offset
);
ctrl_outl
(
1
<<
p
->
msk_shift
,
d
->
msk_base
+
p
->
msk_offset
+
(
hard_smp_processor_id
()
*
4
));
}
}
static
void
enable_intc2_irq
(
unsigned
int
irq
)
static
void
enable_intc2_irq
(
unsigned
int
irq
)
{
{
struct
intc2_data
*
p
=
get_irq_chip_data
(
irq
);
struct
intc2_data
*
p
=
get_irq_chip_data
(
irq
);
struct
intc2_desc
*
d
=
get_intc2_desc
(
irq
);
struct
intc2_desc
*
d
=
get_intc2_desc
(
irq
);
ctrl_outl
(
1
<<
p
->
msk_shift
,
d
->
mskclr_base
+
p
->
msk_offset
);
ctrl_outl
(
1
<<
p
->
msk_shift
,
d
->
mskclr_base
+
p
->
msk_offset
+
(
hard_smp_processor_id
()
*
4
));
}
}
/*
/*
...
...
arch/sh/kernel/cpu/sh3/entry.S
View file @
70876fac
...
@@ -340,8 +340,27 @@ ENTRY(vbr_base)
...
@@ -340,8 +340,27 @@ ENTRY(vbr_base)
general_exception
:
general_exception
:
mov.l
1
f
,
k2
mov.l
1
f
,
k2
mov.l
2
f
,
k3
mov.l
2
f
,
k3
#ifdef CONFIG_CPU_SUBTYPE_SHX3
mov.l
@
k2
,
k2
!
Is
EXPEVT
larger
than
0x800
?
mov
#
0x8
,
k0
shll8
k0
cmp
/
hs
k0
,
k2
bf
0
f
!
then
add
0x580
(
k2
is
0xd80
or
0xda0
)
mov
#
0x58
,
k0
shll2
k0
shll2
k0
add
k0
,
k2
0
:
bra
handle_exception
nop
#else
bra
handle_exception
bra
handle_exception
mov.l
@
k2
,
k2
mov.l
@
k2
,
k2
#endif
.
align
2
.
align
2
1
:
.
long
EXPEVT
1
:
.
long
EXPEVT
2
:
.
long
ret_from_exception
2
:
.
long
ret_from_exception
...
...
arch/sh/kernel/cpu/sh4/probe.c
View file @
70876fac
...
@@ -141,6 +141,14 @@ int __init detect_cpu_and_cache_system(void)
...
@@ -141,6 +141,14 @@ int __init detect_cpu_and_cache_system(void)
current_cpu_data
.
flags
|=
CPU_HAS_LLSC
;
current_cpu_data
.
flags
|=
CPU_HAS_LLSC
;
}
}
break
;
break
;
case
0x4000
:
/* 1st cut */
case
0x4001
:
/* 2nd cut */
current_cpu_data
.
type
=
CPU_SHX3
;
current_cpu_data
.
icache
.
ways
=
4
;
current_cpu_data
.
dcache
.
ways
=
4
;
current_cpu_data
.
flags
|=
CPU_HAS_FPU
|
CPU_HAS_PERF_COUNTER
|
CPU_HAS_LLSC
;
break
;
case
0x8000
:
case
0x8000
:
current_cpu_data
.
type
=
CPU_ST40RA
;
current_cpu_data
.
type
=
CPU_ST40RA
;
current_cpu_data
.
flags
|=
CPU_HAS_FPU
;
current_cpu_data
.
flags
|=
CPU_HAS_FPU
;
...
...
arch/sh/kernel/cpu/sh4a/Makefile
View file @
70876fac
...
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
...
@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o
obj-$(CONFIG_CPU_SUBTYPE_SH73180)
+=
setup-sh73180.o
obj-$(CONFIG_CPU_SUBTYPE_SH73180)
+=
setup-sh73180.o
obj-$(CONFIG_CPU_SUBTYPE_SH7343)
+=
setup-sh7343.o
obj-$(CONFIG_CPU_SUBTYPE_SH7343)
+=
setup-sh7343.o
obj-$(CONFIG_CPU_SUBTYPE_SH7722)
+=
setup-sh7722.o
obj-$(CONFIG_CPU_SUBTYPE_SH7722)
+=
setup-sh7722.o
obj-$(CONFIG_CPU_SUBTYPE_SHX3)
+=
setup-shx3.o
# Primary on-chip clocks (common)
# Primary on-chip clocks (common)
clock-$(CONFIG_CPU_SUBTYPE_SH73180)
:=
clock-sh73180.o
clock-$(CONFIG_CPU_SUBTYPE_SH73180)
:=
clock-sh73180.o
...
@@ -17,5 +18,6 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
...
@@ -17,5 +18,6 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o
clock-$(CONFIG_CPU_SUBTYPE_SH7785)
:=
clock-sh7785.o
clock-$(CONFIG_CPU_SUBTYPE_SH7785)
:=
clock-sh7785.o
clock-$(CONFIG_CPU_SUBTYPE_SH7343)
:=
clock-sh7343.o
clock-$(CONFIG_CPU_SUBTYPE_SH7343)
:=
clock-sh7343.o
clock-$(CONFIG_CPU_SUBTYPE_SH7722)
:=
clock-sh7722.o
clock-$(CONFIG_CPU_SUBTYPE_SH7722)
:=
clock-sh7722.o
clock-$(CONFIG_CPU_SUBTYPE_SHX3)
:=
clock-shx3.o
obj-y
+=
$
(
clock-y
)
obj-y
+=
$
(
clock-y
)
arch/sh/kernel/cpu/sh4a/clock-shx3.c
0 → 100644
View file @
70876fac
/*
* arch/sh/kernel/cpu/sh4/clock-shx3.c
*
* SH-X3 support for the clock framework
*
* Copyright (C) 2006-2007 Renesas Technology Corp.
* Copyright (C) 2006-2007 Renesas Solutions Corp.
* Copyright (C) 2006-2007 Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <asm/clock.h>
#include <asm/freq.h>
#include <asm/io.h>
static
int
ifc_divisors
[]
=
{
1
,
2
,
4
,
6
};
static
int
bfc_divisors
[]
=
{
1
,
1
,
1
,
1
,
1
,
12
,
16
,
18
,
24
,
32
,
36
,
48
};
static
int
pfc_divisors
[]
=
{
1
,
1
,
1
,
1
,
1
,
1
,
1
,
18
,
24
,
32
,
36
,
48
};
static
int
cfc_divisors
[]
=
{
1
,
1
,
4
,
6
};
#define IFC_POS 28
#define IFC_MSK 0x0003
#define BFC_MSK 0x000f
#define PFC_MSK 0x000f
#define CFC_MSK 0x0003
#define BFC_POS 16
#define PFC_POS 0
#define CFC_POS 20
static
void
master_clk_init
(
struct
clk
*
clk
)
{
clk
->
rate
*=
pfc_divisors
[(
ctrl_inl
(
FRQCR
)
>>
PFC_POS
)
&
PFC_MSK
];
}
static
struct
clk_ops
shx3_master_clk_ops
=
{
.
init
=
master_clk_init
,
};
static
void
module_clk_recalc
(
struct
clk
*
clk
)
{
int
idx
=
((
ctrl_inl
(
FRQCR
)
>>
PFC_POS
)
&
PFC_MSK
);
clk
->
rate
=
clk
->
parent
->
rate
/
pfc_divisors
[
idx
];
}
static
struct
clk_ops
shx3_module_clk_ops
=
{
.
recalc
=
module_clk_recalc
,
};
static
void
bus_clk_recalc
(
struct
clk
*
clk
)
{
int
idx
=
((
ctrl_inl
(
FRQCR
)
>>
BFC_POS
)
&
BFC_MSK
);
clk
->
rate
=
clk
->
parent
->
rate
/
bfc_divisors
[
idx
];
}
static
struct
clk_ops
shx3_bus_clk_ops
=
{
.
recalc
=
bus_clk_recalc
,
};
static
void
cpu_clk_recalc
(
struct
clk
*
clk
)
{
int
idx
=
((
ctrl_inl
(
FRQCR
)
>>
IFC_POS
)
&
IFC_MSK
);
clk
->
rate
=
clk
->
parent
->
rate
/
ifc_divisors
[
idx
];
}
static
struct
clk_ops
shx3_cpu_clk_ops
=
{
.
recalc
=
cpu_clk_recalc
,
};
static
struct
clk_ops
*
shx3_clk_ops
[]
=
{
&
shx3_master_clk_ops
,
&
shx3_module_clk_ops
,
&
shx3_bus_clk_ops
,
&
shx3_cpu_clk_ops
,
};
void
__init
arch_init_clk_ops
(
struct
clk_ops
**
ops
,
int
idx
)
{
if
(
idx
<
ARRAY_SIZE
(
shx3_clk_ops
))
*
ops
=
shx3_clk_ops
[
idx
];
}
static
void
shyway_clk_recalc
(
struct
clk
*
clk
)
{
int
idx
=
((
ctrl_inl
(
FRQCR
)
>>
CFC_POS
)
&
CFC_MSK
);
clk
->
rate
=
clk
->
parent
->
rate
/
cfc_divisors
[
idx
];
}
static
struct
clk_ops
shx3_shyway_clk_ops
=
{
.
recalc
=
shyway_clk_recalc
,
};
static
struct
clk
shx3_shyway_clk
=
{
.
name
=
"shyway_clk"
,
.
flags
=
CLK_ALWAYS_ENABLED
,
.
ops
=
&
shx3_shyway_clk_ops
,
};
/*
* Additional SHx3-specific on-chip clocks that aren't already part of the
* clock framework
*/
static
struct
clk
*
shx3_onchip_clocks
[]
=
{
&
shx3_shyway_clk
,
};
static
int
__init
shx3_clk_init
(
void
)
{
struct
clk
*
clk
=
clk_get
(
NULL
,
"master_clk"
);
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
shx3_onchip_clocks
);
i
++
)
{
struct
clk
*
clkp
=
shx3_onchip_clocks
[
i
];
clkp
->
parent
=
clk
;
clk_register
(
clkp
);
clk_enable
(
clkp
);
}
/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate
(
clk
,
clk_get_rate
(
clk
));
clk_put
(
clk
);
return
0
;
}
arch_initcall
(
shx3_clk_init
);
arch/sh/kernel/cpu/sh4a/setup-shx3.c
0 → 100644
View file @
70876fac
/*
* SH-X3 Setup
*
* Copyright (C) 2007 Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/io.h>
#include <asm/sci.h>
static
struct
plat_sci_port
sci_platform_data
[]
=
{
{
.
mapbase
=
0xffc30000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
40
,
41
,
43
,
42
},
},
{
.
mapbase
=
0xffc40000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
44
,
45
,
47
,
46
},
},
{
.
mapbase
=
0xffc50000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
48
,
49
,
51
,
50
},
},
{
.
mapbase
=
0xffc60000
,
.
flags
=
UPF_BOOT_AUTOCONF
,
.
type
=
PORT_SCIF
,
.
irqs
=
{
52
,
53
,
55
,
54
},
},
{
.
flags
=
0
,
}
};
static
struct
platform_device
sci_device
=
{
.
name
=
"sh-sci"
,
.
id
=
-
1
,
.
dev
=
{
.
platform_data
=
sci_platform_data
,
},
};
static
struct
platform_device
*
shx3_devices
[]
__initdata
=
{
&
sci_device
,
};
static
int
__init
shx3_devices_setup
(
void
)
{
return
platform_add_devices
(
shx3_devices
,
ARRAY_SIZE
(
shx3_devices
));
}
__initcall
(
shx3_devices_setup
);
static
struct
intc2_data
intc2_irq_table
[]
=
{
{
16
,
0
,
0
,
0
,
1
,
2
},
/* TMU0 */
{
40
,
4
,
0
,
0x20
,
0
,
3
},
/* SCIF0 ERI */
{
41
,
4
,
0
,
0x20
,
1
,
3
},
/* SCIF0 RXI */
{
42
,
4
,
0
,
0x20
,
2
,
3
},
/* SCIF0 BRI */
{
43
,
4
,
0
,
0x20
,
3
,
3
},
/* SCIF0 TXI */
};
static
struct
intc2_desc
intc2_irq_desc
__read_mostly
=
{
.
prio_base
=
0xfe410000
,
.
msk_base
=
0xfe410820
,
.
mskclr_base
=
0xfe410850
,
.
intc2_data
=
intc2_irq_table
,
.
nr_irqs
=
ARRAY_SIZE
(
intc2_irq_table
),
.
chip
=
{
.
name
=
"INTC2-SHX3"
,
},
};
void
__init
init_IRQ_intc2
(
void
)
{
register_intc2_controller
(
&
intc2_irq_desc
);
}
arch/sh/kernel/setup.c
View file @
70876fac
...
@@ -285,7 +285,7 @@ static const char *cpu_name[] = {
...
@@ -285,7 +285,7 @@ static const char *cpu_name[] = {
[
CPU_SH7770
]
=
"SH7770"
,
[
CPU_SH7780
]
=
"SH7780"
,
[
CPU_SH7770
]
=
"SH7770"
,
[
CPU_SH7780
]
=
"SH7780"
,
[
CPU_SH7781
]
=
"SH7781"
,
[
CPU_SH7343
]
=
"SH7343"
,
[
CPU_SH7781
]
=
"SH7781"
,
[
CPU_SH7343
]
=
"SH7343"
,
[
CPU_SH7785
]
=
"SH7785"
,
[
CPU_SH7722
]
=
"SH7722"
,
[
CPU_SH7785
]
=
"SH7785"
,
[
CPU_SH7722
]
=
"SH7722"
,
[
CPU_SH_NONE
]
=
"Unknown"
[
CPU_SH
X3
]
=
"SH-X3"
,
[
CPU_SH
_NONE
]
=
"Unknown"
};
};
const
char
*
get_cpu_subtype
(
struct
sh_cpuinfo
*
c
)
const
char
*
get_cpu_subtype
(
struct
sh_cpuinfo
*
c
)
...
...
arch/sh/kernel/timers/timer-tmu.c
View file @
70876fac
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
static
int
tmu_timer_start
(
void
)
static
int
tmu_timer_start
(
void
)
{
{
ctrl_outb
(
ctrl_inb
(
TMU_
TSTR
)
|
0x3
,
TMU
_TSTR
);
ctrl_outb
(
ctrl_inb
(
TMU_
012_TSTR
)
|
0x3
,
TMU_012
_TSTR
);
return
0
;
return
0
;
}
}
...
@@ -52,7 +52,7 @@ static void tmu0_timer_set_interval(unsigned long interval, unsigned int reload)
...
@@ -52,7 +52,7 @@ static void tmu0_timer_set_interval(unsigned long interval, unsigned int reload)
static
int
tmu_timer_stop
(
void
)
static
int
tmu_timer_stop
(
void
)
{
{
ctrl_outb
(
ctrl_inb
(
TMU_
TSTR
)
&
~
0x3
,
TMU
_TSTR
);
ctrl_outb
(
ctrl_inb
(
TMU_
012_TSTR
)
&
~
0x3
,
TMU_012
_TSTR
);
return
0
;
return
0
;
}
}
...
@@ -174,7 +174,8 @@ static int tmu_timer_init(void)
...
@@ -174,7 +174,8 @@ static int tmu_timer_init(void)
#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \
#if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \
!defined(CONFIG_CPU_SUBTYPE_SH7760) && \
!defined(CONFIG_CPU_SUBTYPE_SH7760) && \
!defined(CONFIG_CPU_SUBTYPE_SH7785)
!defined(CONFIG_CPU_SUBTYPE_SH7785) && \
!defined(CONFIG_CPU_SUBTYPE_SHX3)
ctrl_outb
(
TMU_TOCR_INIT
,
TMU_TOCR
);
ctrl_outb
(
TMU_TOCR_INIT
,
TMU_TOCR
);
#endif
#endif
...
...
arch/sh/mm/Kconfig
View file @
70876fac
...
@@ -36,6 +36,9 @@ config CPU_SUBTYPE_ST40
...
@@ -36,6 +36,9 @@ config CPU_SUBTYPE_ST40
config CPU_SHX2
config CPU_SHX2
bool
bool
config CPU_SHX3
bool
choice
choice
prompt "Processor sub-type selection"
prompt "Processor sub-type selection"
...
@@ -193,6 +196,12 @@ config CPU_SUBTYPE_SH7785
...
@@ -193,6 +196,12 @@ config CPU_SUBTYPE_SH7785
select CPU_SHX2
select CPU_SHX2
select CPU_HAS_INTC2_IRQ
select CPU_HAS_INTC2_IRQ
config CPU_SUBTYPE_SHX3
bool "Support SH-X3 processor"
select CPU_SH4A
select CPU_SHX3
select CPU_HAS_INTC2_IRQ
# SH4AL-DSP Processor Support
# SH4AL-DSP Processor Support
config CPU_SUBTYPE_SH73180
config CPU_SUBTYPE_SH73180
...
...
drivers/serial/sh-sci.c
View file @
70876fac
...
@@ -367,7 +367,9 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
...
@@ -367,7 +367,9 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
}
else
{
}
else
{
#ifdef CONFIG_CPU_SUBTYPE_SH7343
#ifdef CONFIG_CPU_SUBTYPE_SH7343
/* Nothing */
/* Nothing */
#elif defined(CONFIG_CPU_SUBTYPE_SH7780) || defined(CONFIG_CPU_SUBTYPE_SH7785)
#elif defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7785) || \
defined(CONFIG_CPU_SUBTYPE_SHX3)
ctrl_outw
(
0x0080
,
SCSPTR0
);
/* Set RTS = 1 */
ctrl_outw
(
0x0080
,
SCSPTR0
);
/* Set RTS = 1 */
#else
#else
ctrl_outw
(
0x0080
,
SCSPTR2
);
/* Set RTS = 1 */
ctrl_outw
(
0x0080
,
SCSPTR2
);
/* Set RTS = 1 */
...
...
drivers/serial/sh-sci.h
View file @
70876fac
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
# define SCPDR 0xA4050136
/* 16 bit SCIF */
# define SCPDR 0xA4050136
/* 16 bit SCIF */
# define SCSCR_INIT(port) 0x0030
/* TIE=0,RIE=0,TE=1,RE=1 */
# define SCSCR_INIT(port) 0x0030
/* TIE=0,RIE=0,TE=1,RE=1 */
# define SCIF_ONLY
# define SCIF_ONLY
#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
# define SCSPTR0 0xA4400000
/* 16 bit SCIF */
# define SCSPTR0 0xA4400000
/* 16 bit SCIF */
# define SCI_NPORTS 2
# define SCI_NPORTS 2
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCIF_ORER 0x0001
/* overrun error bit */
...
@@ -173,6 +173,14 @@
...
@@ -173,6 +173,14 @@
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCIF_ORER 0x0001
/* overrun error bit */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
# define SCSCR_INIT(port) 0x38
/* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
# define SCIF_ONLY
# define SCIF_ONLY
#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 */
# define SCIF_ONLY
#else
#else
# error CPU subtype not defined
# error CPU subtype not defined
#endif
#endif
...
@@ -189,7 +197,8 @@
...
@@ -189,7 +197,8 @@
defined(CONFIG_CPU_SUBTYPE_SH7751) || \
defined(CONFIG_CPU_SUBTYPE_SH7751) || \
defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7785)
defined(CONFIG_CPU_SUBTYPE_SH7785) || \
defined(CONFIG_CPU_SUBTYPE_SHX3)
#define SCI_CTRL_FLAGS_REIE 0x08
/* 7750 SCIF */
#define SCI_CTRL_FLAGS_REIE 0x08
/* 7750 SCIF */
#else
#else
#define SCI_CTRL_FLAGS_REIE 0
#define SCI_CTRL_FLAGS_REIE 0
...
@@ -666,6 +675,18 @@ static inline int sci_rxd_in(struct uart_port *port)
...
@@ -666,6 +675,18 @@ static inline int sci_rxd_in(struct uart_port *port)
return
ctrl_inw
(
SCSPTR2
)
&
0x0001
?
1
:
0
;
/* SCIF */
return
ctrl_inw
(
SCSPTR2
)
&
0x0001
?
1
:
0
;
/* SCIF */
return
1
;
return
1
;
}
}
#elif defined(CONFIG_CPU_SUBTYPE_SHX3)
static
inline
int
sci_rxd_in
(
struct
uart_port
*
port
)
{
if
(
port
->
mapbase
==
0xffc30000
)
return
ctrl_inw
(
SCSPTR0
)
&
0x0001
?
1
:
0
;
/* SCIF */
if
(
port
->
mapbase
==
0xffc40000
)
return
ctrl_inw
(
SCSPTR1
)
&
0x0001
?
1
:
0
;
/* SCIF */
if
(
port
->
mapbase
==
0xffc50000
)
return
ctrl_inw
(
SCSPTR2
)
&
0x0001
?
1
:
0
;
/* SCIF */
if
(
port
->
mapbase
==
0xffc60000
)
return
ctrl_inw
(
SCSPTR3
)
&
0x0001
?
1
:
0
;
/* SCIF */
}
#endif
#endif
/*
/*
...
...
include/asm-sh/bugs.h
View file @
70876fac
...
@@ -35,7 +35,7 @@ static void __init check_bugs(void)
...
@@ -35,7 +35,7 @@ static void __init check_bugs(void)
case
CPU_SH7750
...
CPU_SH4_501
:
case
CPU_SH7750
...
CPU_SH4_501
:
*
p
++
=
'4'
;
*
p
++
=
'4'
;
break
;
break
;
case
CPU_SH7770
...
CPU_SH
7785
:
case
CPU_SH7770
...
CPU_SH
X3
:
*
p
++
=
'4'
;
*
p
++
=
'4'
;
*
p
++
=
'a'
;
*
p
++
=
'a'
;
break
;
break
;
...
...
include/asm-sh/cpu-sh4/freq.h
View file @
70876fac
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#define FRQCR0 0xffc80000
#define FRQCR0 0xffc80000
#define FRQCR1 0xffc80004
#define FRQCR1 0xffc80004
#define FRQMR1 0xffc80014
#define FRQMR1 0xffc80014
#elif defined(CONFIG_CPU_SUBTYPE_SHX3)
#define FRQCR 0xffc00014
#else
#else
#define FRQCR 0xffc00000
#define FRQCR 0xffc00000
#define FRQCR_PSTBY 0x0200
#define FRQCR_PSTBY 0x0200
...
...
include/asm-sh/cpu-sh4/timer.h
View file @
70876fac
/*
/*
* include/asm-sh/cpu-sh4/timer.h
* include/asm-sh/cpu-sh4/timer.h
*
*
* Copyright (C) 2004 Lineo Solutions, Inc.
* Copyright (C) 2004 Lineo Solutions, Inc.
*
*
* This file is subject to the terms and conditions of the GNU General Public
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* License. See the file "COPYING" in the main directory of this archive
...
@@ -16,36 +16,45 @@
...
@@ -16,36 +16,45 @@
* SH7750S/SH7750R
* SH7750S/SH7750R
* SH7751/SH7751R
* SH7751/SH7751R
* SH7760
* SH7760
* SH-X3
* ---------------------------------------------------------------------------
* ---------------------------------------------------------------------------
*/
*/
#ifdef CONFIG_CPU_SUBTYPE_SHX3
#if !defined(CONFIG_CPU_SUBTYPE_SH7760)
#define TMU_012_BASE 0xffc10000
#define TMU_TOCR 0xffd80000
/* Byte access */
#define TMU_345_BASE 0xffc20000
#else
#define TMU_012_BASE 0xffd80000
#define TMU_345_BASE 0xfe100000
#endif
#endif
#define TMU_TSTR 0xffd80004
/* Byte access */
#define TMU0_TCOR 0xffd80008
/* Long access */
#define TMU_TOCR TMU_012_BASE
/* Not supported on all CPUs */
#define TMU0_TCNT 0xffd8000c
/* Long access */
#define TMU0_TCR 0xffd80010
/* Word access */
#define TMU1_TCOR 0xffd80014
/* Long access */
#define TMU_012_TSTR (TMU_012_BASE + 0x04)
#define TMU1_TCNT 0xffd80018
/* Long access */
#define TMU_345_TSTR (TMU_345_BASE + 0x04)
#define TMU1_TCR 0xffd8001c
/* Word access */
#define TMU2_TCOR 0xffd80020
/* Long access */
#define TMU0_TCOR (TMU_012_BASE + 0x08)
#define TMU2_TCNT 0xffd80024
/* Long access */
#define TMU0_TCNT (TMU_012_BASE + 0x0c)
#define TMU2_TCR 0xffd80028
/* Word access */
#define TMU0_TCR (TMU_012_BASE + 0x10)
#define TMU2_TCPR 0xffd8002c
/* Long access */
#if !defined(CONFIG_CPU_SUBTYPE_SH7760)
#define TMU1_TCOR (TMU_012_BASE + 0x14)
#define TMU3_TCOR 0xfe100008
/* Long access */
#define TMU1_TCNT (TMU_012_BASE + 0x18)
#define TMU3_TCNT 0xfe10000c
/* Long access */
#define TMU1_TCR (TMU_012_BASE + 0x1c)
#define TMU3_TCR 0xfe100010
/* Word access */
#define TMU
4_TCOR 0xfe100014
/* Long access */
#define TMU
2_TCOR (TMU_012_BASE + 0x20)
#define TMU
4_TCNT 0xfe100018
/* Long access */
#define TMU
2_TCNT (TMU_012_BASE + 0x24)
#define TMU
4_TCR 0xfe10001c
/* Word access */
#define TMU
2_TCR (TMU_012_BASE + 0x28)
#
endif
#
define TMU2_TCPR (TMU_012_BASE + 0x2c)
#endif
/* __ASM_CPU_SH4_TIMER_H */
#define TMU3_TCOR (TMU_345_BASE + 0x08)
#define TMU3_TCNT (TMU_345_BASE + 0x0c)
#define TMU3_TCR (TMU_345_BASE + 0x10)
#define TMU4_TCOR (TMU_345_BASE + 0x14)
#define TMU4_TCNT (TMU_345_BASE + 0x18)
#define TMU4_TCR (TMU_345_BASE + 0x1c)
#define TMU5_TCOR (TMU_345_BASE + 0x20)
#define TMU5_TCNT (TMU_345_BASE + 0x24)
#define TMU5_TCR (TMU_345_BASE + 0x28)
#endif
/* __ASM_CPU_SH4_TIMER_H */
include/asm-sh/processor.h
View file @
70876fac
...
@@ -52,7 +52,7 @@ enum cpu_type {
...
@@ -52,7 +52,7 @@ enum cpu_type {
CPU_SH7760
,
CPU_ST40RA
,
CPU_ST40GX1
,
CPU_SH4_202
,
CPU_SH4_501
,
CPU_SH7760
,
CPU_ST40RA
,
CPU_ST40GX1
,
CPU_SH4_202
,
CPU_SH4_501
,
/* SH-4A types */
/* SH-4A types */
CPU_SH7770
,
CPU_SH7780
,
CPU_SH7781
,
CPU_SH7785
,
CPU_SH7770
,
CPU_SH7780
,
CPU_SH7781
,
CPU_SH7785
,
CPU_SHX3
,
/* SH4AL-DSP types */
/* SH4AL-DSP types */
CPU_SH73180
,
CPU_SH7343
,
CPU_SH7722
,
CPU_SH73180
,
CPU_SH7343
,
CPU_SH7722
,
...
...
include/asm-sh/smp.h
View file @
70876fac
...
@@ -39,4 +39,6 @@ extern struct smp_fn_call_struct smp_fn_call;
...
@@ -39,4 +39,6 @@ extern struct smp_fn_call_struct smp_fn_call;
#endif
/* CONFIG_SMP */
#endif
/* CONFIG_SMP */
#define hard_smp_processor_id() (0)
#endif
/* __ASM_SH_SMP_H */
#endif
/* __ASM_SH_SMP_H */
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