Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2333f212
Commit
2333f212
authored
Jan 18, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/rmk/linux-2.6-arm
parents
097916ec
37b797b2
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
193 additions
and
207 deletions
+193
-207
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/head.S
+1
-1
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+4
-1
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+18
-11
arch/arm/kernel/signal.h
arch/arm/kernel/signal.h
+1
-1
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/common.c
+2
-1
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/clock.c
+22
-22
arch/arm/mach-omap1/clock.h
arch/arm/mach-omap1/clock.h
+84
-84
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap1/serial.c
+3
-3
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.c
+15
-17
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock.h
+6
-6
arch/arm/mach-omap2/serial.c
arch/arm/mach-omap2/serial.c
+6
-6
arch/arm/mach-omap2/timer-gp.c
arch/arm/mach-omap2/timer-gp.c
+1
-1
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/clock.c
+4
-37
arch/arm/plat-omap/gpio.c
arch/arm/plat-omap/gpio.c
+3
-3
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-omap/mcbsp.c
+6
-6
arch/arm/plat-omap/ocpi.c
arch/arm/plat-omap/ocpi.c
+2
-2
drivers/serial/Kconfig
drivers/serial/Kconfig
+1
-1
drivers/serial/at91_serial.c
drivers/serial/at91_serial.c
+0
-2
include/asm-arm/arch-omap/clock.h
include/asm-arm/arch-omap/clock.h
+0
-2
include/asm-arm/arch-pxa/pxa-regs.h
include/asm-arm/arch-pxa/pxa-regs.h
+14
-0
No files found.
arch/arm/boot/compressed/head.S
View file @
2333f212
...
@@ -334,7 +334,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
...
@@ -334,7 +334,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
mov
r1
,
#
0x12
mov
r1
,
#
0x12
orr
r1
,
r1
,
#
3
<<
10
orr
r1
,
r1
,
#
3
<<
10
add
r2
,
r3
,
#
16384
add
r2
,
r3
,
#
16384
1
:
cmp
r1
,
r
8
@
if
virt
>
start
of
RAM
1
:
cmp
r1
,
r
9
@
if
virt
>
start
of
RAM
orrhs
r1
,
r1
,
#
0x0c
@
set
cacheable
,
bufferable
orrhs
r1
,
r1
,
#
0x0c
@
set
cacheable
,
bufferable
cmp
r1
,
r10
@
if
virt
>
end
of
RAM
cmp
r1
,
r10
@
if
virt
>
end
of
RAM
bichs
r1
,
r1
,
#
0x0c
@
clear
cacheable
,
bufferable
bichs
r1
,
r1
,
#
0x0c
@
clear
cacheable
,
bufferable
...
...
arch/arm/kernel/entry-armv.S
View file @
2333f212
...
@@ -735,8 +735,11 @@ __kuser_cmpxchg: @ 0xffff0fc0
...
@@ -735,8 +735,11 @@ __kuser_cmpxchg: @ 0xffff0fc0
*
The
kernel
itself
must
perform
the
operation
.
*
The
kernel
itself
must
perform
the
operation
.
*
A
special
ghost
syscall
is
used
for
that
(
see
traps
.
c
)
.
*
A
special
ghost
syscall
is
used
for
that
(
see
traps
.
c
)
.
*/
*/
stmfd
sp
!,
{
r7
,
lr
}
mov
r7
,
#
0xff00
@
0xfff0
into
r7
for
EABI
orr
r7
,
r7
,
#
0xf0
swi
#
0x9ffff0
swi
#
0x9ffff0
mov
pc
,
lr
ldmfd
sp
!,
{
r7
,
pc
}
#elif __LINUX_ARM_ARCH__ < 6
#elif __LINUX_ARM_ARCH__ < 6
...
...
arch/arm/kernel/signal.c
View file @
2333f212
...
@@ -29,6 +29,12 @@
...
@@ -29,6 +29,12 @@
#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn))
#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn))
#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn))
#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn))
/*
* With EABI, the syscall number has to be loaded into r7.
*/
#define MOV_R7_NR_SIGRETURN (0xe3a07000 | (__NR_sigreturn - __NR_SYSCALL_BASE))
#define MOV_R7_NR_RT_SIGRETURN (0xe3a07000 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
/*
/*
* For Thumb syscalls, we pass the syscall number via r7. We therefore
* For Thumb syscalls, we pass the syscall number via r7. We therefore
* need two 16-bit instructions.
* need two 16-bit instructions.
...
@@ -36,9 +42,9 @@
...
@@ -36,9 +42,9 @@
#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
const
unsigned
long
sigreturn_codes
[
4
]
=
{
const
unsigned
long
sigreturn_codes
[
7
]
=
{
SWI_SYS_SIGRETURN
,
SWI_THUMB_SIGRETURN
,
MOV_R7_NR_SIGRETURN
,
SWI_SYS_SIGRETURN
,
SWI_THUMB_SIGRETURN
,
SWI_SYS_RT_SIGRETURN
,
SWI_THUMB_RT_SIGRETURN
MOV_R7_NR_RT_SIGRETURN
,
SWI_SYS_RT_SIGRETURN
,
SWI_THUMB_RT_SIGRETURN
,
};
};
static
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
,
int
syscall
);
static
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
,
int
syscall
);
...
@@ -189,7 +195,7 @@ struct aux_sigframe {
...
@@ -189,7 +195,7 @@ struct aux_sigframe {
struct
sigframe
{
struct
sigframe
{
struct
sigcontext
sc
;
struct
sigcontext
sc
;
unsigned
long
extramask
[
_NSIG_WORDS
-
1
];
unsigned
long
extramask
[
_NSIG_WORDS
-
1
];
unsigned
long
retcode
;
unsigned
long
retcode
[
2
]
;
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
};
};
...
@@ -198,7 +204,7 @@ struct rt_sigframe {
...
@@ -198,7 +204,7 @@ struct rt_sigframe {
void
__user
*
puc
;
void
__user
*
puc
;
struct
siginfo
info
;
struct
siginfo
info
;
struct
ucontext
uc
;
struct
ucontext
uc
;
unsigned
long
retcode
;
unsigned
long
retcode
[
2
]
;
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
};
};
...
@@ -436,12 +442,13 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
...
@@ -436,12 +442,13 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
if
(
ka
->
sa
.
sa_flags
&
SA_RESTORER
)
{
if
(
ka
->
sa
.
sa_flags
&
SA_RESTORER
)
{
retcode
=
(
unsigned
long
)
ka
->
sa
.
sa_restorer
;
retcode
=
(
unsigned
long
)
ka
->
sa
.
sa_restorer
;
}
else
{
}
else
{
unsigned
int
idx
=
thumb
;
unsigned
int
idx
=
thumb
<<
1
;
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
idx
+=
2
;
idx
+=
3
;
if
(
__put_user
(
sigreturn_codes
[
idx
],
rc
))
if
(
__put_user
(
sigreturn_codes
[
idx
],
rc
)
||
__put_user
(
sigreturn_codes
[
idx
+
1
],
rc
+
1
))
return
1
;
return
1
;
if
(
cpsr
&
MODE32_BIT
)
{
if
(
cpsr
&
MODE32_BIT
)
{
...
@@ -456,7 +463,7 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
...
@@ -456,7 +463,7 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
* the return code written onto the stack.
* the return code written onto the stack.
*/
*/
flush_icache_range
((
unsigned
long
)
rc
,
flush_icache_range
((
unsigned
long
)
rc
,
(
unsigned
long
)(
rc
+
1
));
(
unsigned
long
)(
rc
+
2
));
retcode
=
((
unsigned
long
)
rc
)
+
thumb
;
retcode
=
((
unsigned
long
)
rc
)
+
thumb
;
}
}
...
@@ -488,7 +495,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
...
@@ -488,7 +495,7 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
}
}
if
(
err
==
0
)
if
(
err
==
0
)
err
=
setup_return
(
regs
,
ka
,
&
frame
->
retcode
,
frame
,
usig
);
err
=
setup_return
(
regs
,
ka
,
frame
->
retcode
,
frame
,
usig
);
return
err
;
return
err
;
}
}
...
@@ -522,7 +529,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
...
@@ -522,7 +529,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
if
(
err
==
0
)
if
(
err
==
0
)
err
=
setup_return
(
regs
,
ka
,
&
frame
->
retcode
,
frame
,
usig
);
err
=
setup_return
(
regs
,
ka
,
frame
->
retcode
,
frame
,
usig
);
if
(
err
==
0
)
{
if
(
err
==
0
)
{
/*
/*
...
...
arch/arm/kernel/signal.h
View file @
2333f212
...
@@ -9,4 +9,4 @@
...
@@ -9,4 +9,4 @@
*/
*/
#define KERN_SIGRETURN_CODE 0xffff0500
#define KERN_SIGRETURN_CODE 0xffff0500
extern
const
unsigned
long
sigreturn_codes
[
4
];
extern
const
unsigned
long
sigreturn_codes
[
7
];
arch/arm/mach-ixp4xx/common.c
View file @
2333f212
...
@@ -333,6 +333,7 @@ static struct platform_device *ixp46x_devices[] __initdata = {
...
@@ -333,6 +333,7 @@ static struct platform_device *ixp46x_devices[] __initdata = {
};
};
unsigned
long
ixp4xx_exp_bus_size
;
unsigned
long
ixp4xx_exp_bus_size
;
EXPORT_SYMBOL
(
ixp4xx_exp_bus_size
);
void
__init
ixp4xx_sys_init
(
void
)
void
__init
ixp4xx_sys_init
(
void
)
{
{
...
@@ -352,7 +353,7 @@ void __init ixp4xx_sys_init(void)
...
@@ -352,7 +353,7 @@ void __init ixp4xx_sys_init(void)
}
}
}
}
printk
(
"IXP4xx: Using %uMiB expansion bus window size
\n
"
,
printk
(
"IXP4xx: Using %
l
uMiB expansion bus window size
\n
"
,
ixp4xx_exp_bus_size
>>
20
);
ixp4xx_exp_bus_size
>>
20
);
}
}
arch/arm/mach-omap1/clock.c
View file @
2333f212
...
@@ -50,10 +50,10 @@ static int omap1_clk_enable_dsp_domain(struct clk *clk)
...
@@ -50,10 +50,10 @@ static int omap1_clk_enable_dsp_domain(struct clk *clk)
{
{
int
retval
;
int
retval
;
retval
=
omap1_clk_
us
e
(
&
api_ck
.
clk
);
retval
=
omap1_clk_
enabl
e
(
&
api_ck
.
clk
);
if
(
!
retval
)
{
if
(
!
retval
)
{
retval
=
omap1_clk_enable
(
clk
);
retval
=
omap1_clk_enable
_generic
(
clk
);
omap1_clk_
unus
e
(
&
api_ck
.
clk
);
omap1_clk_
disabl
e
(
&
api_ck
.
clk
);
}
}
return
retval
;
return
retval
;
...
@@ -61,9 +61,9 @@ static int omap1_clk_enable_dsp_domain(struct clk *clk)
...
@@ -61,9 +61,9 @@ static int omap1_clk_enable_dsp_domain(struct clk *clk)
static
void
omap1_clk_disable_dsp_domain
(
struct
clk
*
clk
)
static
void
omap1_clk_disable_dsp_domain
(
struct
clk
*
clk
)
{
{
if
(
omap1_clk_
us
e
(
&
api_ck
.
clk
)
==
0
)
{
if
(
omap1_clk_
enabl
e
(
&
api_ck
.
clk
)
==
0
)
{
omap1_clk_disable
(
clk
);
omap1_clk_disable
_generic
(
clk
);
omap1_clk_
unus
e
(
&
api_ck
.
clk
);
omap1_clk_
disabl
e
(
&
api_ck
.
clk
);
}
}
}
}
...
@@ -72,7 +72,7 @@ static int omap1_clk_enable_uart_functional(struct clk *clk)
...
@@ -72,7 +72,7 @@ static int omap1_clk_enable_uart_functional(struct clk *clk)
int
ret
;
int
ret
;
struct
uart_clk
*
uclk
;
struct
uart_clk
*
uclk
;
ret
=
omap1_clk_enable
(
clk
);
ret
=
omap1_clk_enable
_generic
(
clk
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
/* Set smart idle acknowledgement mode */
/* Set smart idle acknowledgement mode */
uclk
=
(
struct
uart_clk
*
)
clk
;
uclk
=
(
struct
uart_clk
*
)
clk
;
...
@@ -91,7 +91,7 @@ static void omap1_clk_disable_uart_functional(struct clk *clk)
...
@@ -91,7 +91,7 @@ static void omap1_clk_disable_uart_functional(struct clk *clk)
uclk
=
(
struct
uart_clk
*
)
clk
;
uclk
=
(
struct
uart_clk
*
)
clk
;
omap_writeb
((
omap_readb
(
uclk
->
sysc_addr
)
&
~
0x18
),
uclk
->
sysc_addr
);
omap_writeb
((
omap_readb
(
uclk
->
sysc_addr
)
&
~
0x18
),
uclk
->
sysc_addr
);
omap1_clk_disable
(
clk
);
omap1_clk_disable
_generic
(
clk
);
}
}
static
void
omap1_clk_allow_idle
(
struct
clk
*
clk
)
static
void
omap1_clk_allow_idle
(
struct
clk
*
clk
)
...
@@ -230,9 +230,9 @@ static void omap1_ckctl_recalc_dsp_domain(struct clk * clk)
...
@@ -230,9 +230,9 @@ static void omap1_ckctl_recalc_dsp_domain(struct clk * clk)
* Note that DSP_CKCTL virt addr = phys addr, so
* Note that DSP_CKCTL virt addr = phys addr, so
* we must use __raw_readw() instead of omap_readw().
* we must use __raw_readw() instead of omap_readw().
*/
*/
omap1_clk_
us
e
(
&
api_ck
.
clk
);
omap1_clk_
enabl
e
(
&
api_ck
.
clk
);
dsor
=
1
<<
(
3
&
(
__raw_readw
(
DSP_CKCTL
)
>>
clk
->
rate_offset
));
dsor
=
1
<<
(
3
&
(
__raw_readw
(
DSP_CKCTL
)
>>
clk
->
rate_offset
));
omap1_clk_
unus
e
(
&
api_ck
.
clk
);
omap1_clk_
disabl
e
(
&
api_ck
.
clk
);
if
(
unlikely
(
clk
->
rate
==
clk
->
parent
->
rate
/
dsor
))
if
(
unlikely
(
clk
->
rate
==
clk
->
parent
->
rate
/
dsor
))
return
;
/* No change, quick exit */
return
;
/* No change, quick exit */
...
@@ -412,12 +412,12 @@ static void omap1_init_ext_clk(struct clk * clk)
...
@@ -412,12 +412,12 @@ static void omap1_init_ext_clk(struct clk * clk)
clk
->
rate
=
96000000
/
dsor
;
clk
->
rate
=
96000000
/
dsor
;
}
}
static
int
omap1_clk_
us
e
(
struct
clk
*
clk
)
static
int
omap1_clk_
enabl
e
(
struct
clk
*
clk
)
{
{
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
->
usecount
++
==
0
)
{
if
(
clk
->
usecount
++
==
0
)
{
if
(
likely
(
clk
->
parent
))
{
if
(
likely
(
clk
->
parent
))
{
ret
=
omap1_clk_
us
e
(
clk
->
parent
);
ret
=
omap1_clk_
enabl
e
(
clk
->
parent
);
if
(
unlikely
(
ret
!=
0
))
{
if
(
unlikely
(
ret
!=
0
))
{
clk
->
usecount
--
;
clk
->
usecount
--
;
...
@@ -432,7 +432,7 @@ static int omap1_clk_use(struct clk *clk)
...
@@ -432,7 +432,7 @@ static int omap1_clk_use(struct clk *clk)
ret
=
clk
->
enable
(
clk
);
ret
=
clk
->
enable
(
clk
);
if
(
unlikely
(
ret
!=
0
)
&&
clk
->
parent
)
{
if
(
unlikely
(
ret
!=
0
)
&&
clk
->
parent
)
{
omap1_clk_
unus
e
(
clk
->
parent
);
omap1_clk_
disabl
e
(
clk
->
parent
);
clk
->
usecount
--
;
clk
->
usecount
--
;
}
}
}
}
...
@@ -440,12 +440,12 @@ static int omap1_clk_use(struct clk *clk)
...
@@ -440,12 +440,12 @@ static int omap1_clk_use(struct clk *clk)
return
ret
;
return
ret
;
}
}
static
void
omap1_clk_
unus
e
(
struct
clk
*
clk
)
static
void
omap1_clk_
disabl
e
(
struct
clk
*
clk
)
{
{
if
(
clk
->
usecount
>
0
&&
!
(
--
clk
->
usecount
))
{
if
(
clk
->
usecount
>
0
&&
!
(
--
clk
->
usecount
))
{
clk
->
disable
(
clk
);
clk
->
disable
(
clk
);
if
(
likely
(
clk
->
parent
))
{
if
(
likely
(
clk
->
parent
))
{
omap1_clk_
unus
e
(
clk
->
parent
);
omap1_clk_
disabl
e
(
clk
->
parent
);
if
(
clk
->
flags
&
CLOCK_NO_IDLE_PARENT
)
if
(
clk
->
flags
&
CLOCK_NO_IDLE_PARENT
)
if
(
!
cpu_is_omap24xx
())
if
(
!
cpu_is_omap24xx
())
omap1_clk_allow_idle
(
clk
->
parent
);
omap1_clk_allow_idle
(
clk
->
parent
);
...
@@ -453,7 +453,7 @@ static void omap1_clk_unuse(struct clk *clk)
...
@@ -453,7 +453,7 @@ static void omap1_clk_unuse(struct clk *clk)
}
}
}
}
static
int
omap1_clk_enable
(
struct
clk
*
clk
)
static
int
omap1_clk_enable
_generic
(
struct
clk
*
clk
)
{
{
__u16
regval16
;
__u16
regval16
;
__u32
regval32
;
__u32
regval32
;
...
@@ -492,7 +492,7 @@ static int omap1_clk_enable(struct clk *clk)
...
@@ -492,7 +492,7 @@ static int omap1_clk_enable(struct clk *clk)
return
0
;
return
0
;
}
}
static
void
omap1_clk_disable
(
struct
clk
*
clk
)
static
void
omap1_clk_disable
_generic
(
struct
clk
*
clk
)
{
{
__u16
regval16
;
__u16
regval16
;
__u32
regval32
;
__u32
regval32
;
...
@@ -654,8 +654,8 @@ late_initcall(omap1_late_clk_reset);
...
@@ -654,8 +654,8 @@ late_initcall(omap1_late_clk_reset);
#endif
#endif
static
struct
clk_functions
omap1_clk_functions
=
{
static
struct
clk_functions
omap1_clk_functions
=
{
.
clk_
use
=
omap1_clk_us
e
,
.
clk_
enable
=
omap1_clk_enabl
e
,
.
clk_
unuse
=
omap1_clk_unus
e
,
.
clk_
disable
=
omap1_clk_disabl
e
,
.
clk_round_rate
=
omap1_clk_round_rate
,
.
clk_round_rate
=
omap1_clk_round_rate
,
.
clk_set_rate
=
omap1_clk_set_rate
,
.
clk_set_rate
=
omap1_clk_set_rate
,
};
};
...
@@ -780,9 +780,9 @@ int __init omap1_clk_init(void)
...
@@ -780,9 +780,9 @@ int __init omap1_clk_init(void)
* Only enable those clocks we will need, let the drivers
* Only enable those clocks we will need, let the drivers
* enable other clocks as necessary
* enable other clocks as necessary
*/
*/
clk_
us
e
(
&
armper_ck
.
clk
);
clk_
enabl
e
(
&
armper_ck
.
clk
);
clk_
us
e
(
&
armxor_ck
.
clk
);
clk_
enabl
e
(
&
armxor_ck
.
clk
);
clk_
us
e
(
&
armtim_ck
.
clk
);
/* This should be done by timer code */
clk_
enabl
e
(
&
armtim_ck
.
clk
);
/* This should be done by timer code */
if
(
cpu_is_omap1510
())
if
(
cpu_is_omap1510
())
clk_enable
(
&
arm_gpio_ck
);
clk_enable
(
&
arm_gpio_ck
);
...
...
arch/arm/mach-omap1/clock.h
View file @
2333f212
This diff is collapsed.
Click to expand it.
arch/arm/mach-omap1/serial.c
View file @
2333f212
...
@@ -146,7 +146,7 @@ void __init omap_serial_init(void)
...
@@ -146,7 +146,7 @@ void __init omap_serial_init(void)
if
(
IS_ERR
(
uart1_ck
))
if
(
IS_ERR
(
uart1_ck
))
printk
(
"Could not get uart1_ck
\n
"
);
printk
(
"Could not get uart1_ck
\n
"
);
else
{
else
{
clk_
us
e
(
uart1_ck
);
clk_
enabl
e
(
uart1_ck
);
if
(
cpu_is_omap1510
())
if
(
cpu_is_omap1510
())
clk_set_rate
(
uart1_ck
,
12000000
);
clk_set_rate
(
uart1_ck
,
12000000
);
}
}
...
@@ -166,7 +166,7 @@ void __init omap_serial_init(void)
...
@@ -166,7 +166,7 @@ void __init omap_serial_init(void)
if
(
IS_ERR
(
uart2_ck
))
if
(
IS_ERR
(
uart2_ck
))
printk
(
"Could not get uart2_ck
\n
"
);
printk
(
"Could not get uart2_ck
\n
"
);
else
{
else
{
clk_
us
e
(
uart2_ck
);
clk_
enabl
e
(
uart2_ck
);
if
(
cpu_is_omap1510
())
if
(
cpu_is_omap1510
())
clk_set_rate
(
uart2_ck
,
12000000
);
clk_set_rate
(
uart2_ck
,
12000000
);
else
else
...
@@ -188,7 +188,7 @@ void __init omap_serial_init(void)
...
@@ -188,7 +188,7 @@ void __init omap_serial_init(void)
if
(
IS_ERR
(
uart3_ck
))
if
(
IS_ERR
(
uart3_ck
))
printk
(
"Could not get uart3_ck
\n
"
);
printk
(
"Could not get uart3_ck
\n
"
);
else
{
else
{
clk_
us
e
(
uart3_ck
);
clk_
enabl
e
(
uart3_ck
);
if
(
cpu_is_omap1510
())
if
(
cpu_is_omap1510
())
clk_set_rate
(
uart3_ck
,
12000000
);
clk_set_rate
(
uart3_ck
,
12000000
);
}
}
...
...
arch/arm/mach-omap2/clock.c
View file @
2333f212
...
@@ -111,7 +111,7 @@ static void omap2_clk_fixed_enable(struct clk *clk)
...
@@ -111,7 +111,7 @@ static void omap2_clk_fixed_enable(struct clk *clk)
/* Enables clock without considering parent dependencies or use count
/* Enables clock without considering parent dependencies or use count
* REVISIT: Maybe change this to use clk->enable like on omap1?
* REVISIT: Maybe change this to use clk->enable like on omap1?
*/
*/
static
int
omap2_clk_enable
(
struct
clk
*
clk
)
static
int
_
omap2_clk_enable
(
struct
clk
*
clk
)
{
{
u32
regval32
;
u32
regval32
;
...
@@ -150,7 +150,7 @@ static void omap2_clk_fixed_disable(struct clk *clk)
...
@@ -150,7 +150,7 @@ static void omap2_clk_fixed_disable(struct clk *clk)
}
}
/* Disables clock without considering parent dependencies or use count */
/* Disables clock without considering parent dependencies or use count */
static
void
omap2_clk_disable
(
struct
clk
*
clk
)
static
void
_
omap2_clk_disable
(
struct
clk
*
clk
)
{
{
u32
regval32
;
u32
regval32
;
...
@@ -167,23 +167,23 @@ static void omap2_clk_disable(struct clk *clk)
...
@@ -167,23 +167,23 @@ static void omap2_clk_disable(struct clk *clk)
__raw_writel
(
regval32
,
clk
->
enable_reg
);
__raw_writel
(
regval32
,
clk
->
enable_reg
);
}
}
static
int
omap2_clk_
us
e
(
struct
clk
*
clk
)
static
int
omap2_clk_
enabl
e
(
struct
clk
*
clk
)
{
{
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
->
usecount
++
==
0
)
{
if
(
clk
->
usecount
++
==
0
)
{
if
(
likely
((
u32
)
clk
->
parent
))
if
(
likely
((
u32
)
clk
->
parent
))
ret
=
omap2_clk_
us
e
(
clk
->
parent
);
ret
=
omap2_clk_
enabl
e
(
clk
->
parent
);
if
(
unlikely
(
ret
!=
0
))
{
if
(
unlikely
(
ret
!=
0
))
{
clk
->
usecount
--
;
clk
->
usecount
--
;
return
ret
;
return
ret
;
}
}
ret
=
omap2_clk_enable
(
clk
);
ret
=
_
omap2_clk_enable
(
clk
);
if
(
unlikely
(
ret
!=
0
)
&&
clk
->
parent
)
{
if
(
unlikely
(
ret
!=
0
)
&&
clk
->
parent
)
{
omap2_clk_
unus
e
(
clk
->
parent
);
omap2_clk_
disabl
e
(
clk
->
parent
);
clk
->
usecount
--
;
clk
->
usecount
--
;
}
}
}
}
...
@@ -191,12 +191,12 @@ static int omap2_clk_use(struct clk *clk)
...
@@ -191,12 +191,12 @@ static int omap2_clk_use(struct clk *clk)
return
ret
;
return
ret
;
}
}
static
void
omap2_clk_
unus
e
(
struct
clk
*
clk
)
static
void
omap2_clk_
disabl
e
(
struct
clk
*
clk
)
{
{
if
(
clk
->
usecount
>
0
&&
!
(
--
clk
->
usecount
))
{
if
(
clk
->
usecount
>
0
&&
!
(
--
clk
->
usecount
))
{
omap2_clk_disable
(
clk
);
_
omap2_clk_disable
(
clk
);
if
(
likely
((
u32
)
clk
->
parent
))
if
(
likely
((
u32
)
clk
->
parent
))
omap2_clk_
unus
e
(
clk
->
parent
);
omap2_clk_
disabl
e
(
clk
->
parent
);
}
}
}
}
...
@@ -873,7 +873,7 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
...
@@ -873,7 +873,7 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
reg
=
(
void
__iomem
*
)
src_sel
;
reg
=
(
void
__iomem
*
)
src_sel
;
if
(
clk
->
usecount
>
0
)
if
(
clk
->
usecount
>
0
)
omap2_clk_disable
(
clk
);
_
omap2_clk_disable
(
clk
);
/* Set new source value (previous dividers if any in effect) */
/* Set new source value (previous dividers if any in effect) */
reg_val
=
__raw_readl
(
reg
)
&
~
(
field_mask
<<
src_off
);
reg_val
=
__raw_readl
(
reg
)
&
~
(
field_mask
<<
src_off
);
...
@@ -884,7 +884,7 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
...
@@ -884,7 +884,7 @@ static int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
__raw_writel
(
0x1
,
(
void
__iomem
*
)
&
PRCM_CLKCFG_CTRL
);
__raw_writel
(
0x1
,
(
void
__iomem
*
)
&
PRCM_CLKCFG_CTRL
);
if
(
clk
->
usecount
>
0
)
if
(
clk
->
usecount
>
0
)
omap2_clk_enable
(
clk
);
_
omap2_clk_enable
(
clk
);
clk
->
parent
=
new_parent
;
clk
->
parent
=
new_parent
;
...
@@ -999,8 +999,6 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
...
@@ -999,8 +999,6 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
static
struct
clk_functions
omap2_clk_functions
=
{
static
struct
clk_functions
omap2_clk_functions
=
{
.
clk_enable
=
omap2_clk_enable
,
.
clk_enable
=
omap2_clk_enable
,
.
clk_disable
=
omap2_clk_disable
,
.
clk_disable
=
omap2_clk_disable
,
.
clk_use
=
omap2_clk_use
,
.
clk_unuse
=
omap2_clk_unuse
,
.
clk_round_rate
=
omap2_clk_round_rate
,
.
clk_round_rate
=
omap2_clk_round_rate
,
.
clk_set_rate
=
omap2_clk_set_rate
,
.
clk_set_rate
=
omap2_clk_set_rate
,
.
clk_set_parent
=
omap2_clk_set_parent
,
.
clk_set_parent
=
omap2_clk_set_parent
,
...
@@ -1045,7 +1043,7 @@ static void __init omap2_disable_unused_clocks(void)
...
@@ -1045,7 +1043,7 @@ static void __init omap2_disable_unused_clocks(void)
continue
;
continue
;
printk
(
KERN_INFO
"Disabling unused clock
\"
%s
\"\n
"
,
ck
->
name
);
printk
(
KERN_INFO
"Disabling unused clock
\"
%s
\"\n
"
,
ck
->
name
);
omap2_clk_disable
(
ck
);
_
omap2_clk_disable
(
ck
);
}
}
}
}
late_initcall
(
omap2_disable_unused_clocks
);
late_initcall
(
omap2_disable_unused_clocks
);
...
@@ -1120,10 +1118,10 @@ int __init omap2_clk_init(void)
...
@@ -1120,10 +1118,10 @@ int __init omap2_clk_init(void)
* Only enable those clocks we will need, let the drivers
* Only enable those clocks we will need, let the drivers
* enable other clocks as necessary
* enable other clocks as necessary
*/
*/
clk_
us
e
(
&
sync_32k_ick
);
clk_
enabl
e
(
&
sync_32k_ick
);
clk_
us
e
(
&
omapctrl_ick
);
clk_
enabl
e
(
&
omapctrl_ick
);
if
(
cpu_is_omap2430
())
if
(
cpu_is_omap2430
())
clk_
us
e
(
&
sdrc_ick
);
clk_
enabl
e
(
&
sdrc_ick
);
return
0
;
return
0
;
}
}
arch/arm/mach-omap2/clock.h
View file @
2333f212
...
@@ -24,7 +24,7 @@ static void omap2_propagate_rate(struct clk * clk);
...
@@ -24,7 +24,7 @@ static void omap2_propagate_rate(struct clk * clk);
static
void
omap2_mpu_recalc
(
struct
clk
*
clk
);
static
void
omap2_mpu_recalc
(
struct
clk
*
clk
);
static
int
omap2_select_table_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
static
int
omap2_select_table_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
static
long
omap2_round_to_table_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
static
long
omap2_round_to_table_rate
(
struct
clk
*
clk
,
unsigned
long
rate
);
static
void
omap2_clk_
unus
e
(
struct
clk
*
clk
);
static
void
omap2_clk_
disabl
e
(
struct
clk
*
clk
);
static
void
omap2_sys_clk_recalc
(
struct
clk
*
clk
);
static
void
omap2_sys_clk_recalc
(
struct
clk
*
clk
);
static
u32
omap2_clksel_to_divisor
(
u32
div_sel
,
u32
field_val
);
static
u32
omap2_clksel_to_divisor
(
u32
div_sel
,
u32
field_val
);
static
u32
omap2_clksel_get_divisor
(
struct
clk
*
clk
);
static
u32
omap2_clksel_get_divisor
(
struct
clk
*
clk
);
...
@@ -859,7 +859,7 @@ static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
...
@@ -859,7 +859,7 @@ static struct clk core_l3_ck = { /* Used for ick and fck, interconnect */
static
struct
clk
usb_l4_ick
=
{
/* FS-USB interface clock */
static
struct
clk
usb_l4_ick
=
{
/* FS-USB interface clock */
.
name
=
"usb_l4_ick"
,
.
name
=
"usb_l4_ick"
,
.
parent
=
&
core_ck
,
.
parent
=
&
core_
l3_
ck
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
|
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
|
RATE_CKCTL
|
CM_CORE_SEL1
|
DELAYED_APP
|
RATE_CKCTL
|
CM_CORE_SEL1
|
DELAYED_APP
|
CONFIG_PARTICIPANT
,
CONFIG_PARTICIPANT
,
...
@@ -1045,7 +1045,7 @@ static struct clk gpt1_ick = {
...
@@ -1045,7 +1045,7 @@ static struct clk gpt1_ick = {
.
name
=
"gpt1_ick"
,
.
name
=
"gpt1_ick"
,
.
parent
=
&
l4_ck
,
.
parent
=
&
l4_ck
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN_WKUP
,
/* Bit
4
*/
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN_WKUP
,
/* Bit
0
*/
.
enable_bit
=
0
,
.
enable_bit
=
0
,
.
recalc
=
&
omap2_followparent_recalc
,
.
recalc
=
&
omap2_followparent_recalc
,
};
};
...
@@ -1055,7 +1055,7 @@ static struct clk gpt1_fck = {
...
@@ -1055,7 +1055,7 @@ static struct clk gpt1_fck = {
.
parent
=
&
func_32k_ck
,
.
parent
=
&
func_32k_ck
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
|
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
|
CM_WKUP_SEL1
,
CM_WKUP_SEL1
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_FCLKEN_WKUP
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_FCLKEN_WKUP
,
/* Bit0 */
.
enable_bit
=
0
,
.
enable_bit
=
0
,
.
src_offset
=
0
,
.
src_offset
=
0
,
.
recalc
=
&
omap2_followparent_recalc
,
.
recalc
=
&
omap2_followparent_recalc
,
...
@@ -1065,7 +1065,7 @@ static struct clk gpt2_ick = {
...
@@ -1065,7 +1065,7 @@ static struct clk gpt2_ick = {
.
name
=
"gpt2_ick"
,
.
name
=
"gpt2_ick"
,
.
parent
=
&
l4_ck
,
.
parent
=
&
l4_ck
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
,
.
flags
=
CLOCK_IN_OMAP242X
|
CLOCK_IN_OMAP243X
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN1_CORE
,
/*
b
it4 */
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN1_CORE
,
/*
B
it4 */
.
enable_bit
=
0
,
.
enable_bit
=
0
,
.
recalc
=
&
omap2_followparent_recalc
,
.
recalc
=
&
omap2_followparent_recalc
,
};
};
...
@@ -1839,7 +1839,7 @@ static struct clk usb_fck = {
...
@@ -1839,7 +1839,7 @@ static struct clk usb_fck = {
static
struct
clk
usbhs_ick
=
{
static
struct
clk
usbhs_ick
=
{
.
name
=
"usbhs_ick"
,
.
name
=
"usbhs_ick"
,
.
parent
=
&
l4
_ck
,
.
parent
=
&
core_l3
_ck
,
.
flags
=
CLOCK_IN_OMAP243X
,
.
flags
=
CLOCK_IN_OMAP243X
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN2_CORE
,
.
enable_reg
=
(
void
__iomem
*
)
&
CM_ICLKEN2_CORE
,
.
enable_bit
=
6
,
.
enable_bit
=
6
,
...
...
arch/arm/mach-omap2/serial.c
View file @
2333f212
...
@@ -119,14 +119,14 @@ void __init omap_serial_init()
...
@@ -119,14 +119,14 @@ void __init omap_serial_init()
if
(
IS_ERR
(
uart1_ick
))
if
(
IS_ERR
(
uart1_ick
))
printk
(
"Could not get uart1_ick
\n
"
);
printk
(
"Could not get uart1_ick
\n
"
);
else
{
else
{
clk_
us
e
(
uart1_ick
);
clk_
enabl
e
(
uart1_ick
);
}
}
uart1_fck
=
clk_get
(
NULL
,
"uart1_fck"
);
uart1_fck
=
clk_get
(
NULL
,
"uart1_fck"
);
if
(
IS_ERR
(
uart1_fck
))
if
(
IS_ERR
(
uart1_fck
))
printk
(
"Could not get uart1_fck
\n
"
);
printk
(
"Could not get uart1_fck
\n
"
);
else
{
else
{
clk_
us
e
(
uart1_fck
);
clk_
enabl
e
(
uart1_fck
);
}
}
break
;
break
;
case
1
:
case
1
:
...
@@ -134,14 +134,14 @@ void __init omap_serial_init()
...
@@ -134,14 +134,14 @@ void __init omap_serial_init()
if
(
IS_ERR
(
uart2_ick
))
if
(
IS_ERR
(
uart2_ick
))
printk
(
"Could not get uart2_ick
\n
"
);
printk
(
"Could not get uart2_ick
\n
"
);
else
{
else
{
clk_
us
e
(
uart2_ick
);
clk_
enabl
e
(
uart2_ick
);
}
}
uart2_fck
=
clk_get
(
NULL
,
"uart2_fck"
);
uart2_fck
=
clk_get
(
NULL
,
"uart2_fck"
);
if
(
IS_ERR
(
uart2_fck
))
if
(
IS_ERR
(
uart2_fck
))
printk
(
"Could not get uart2_fck
\n
"
);
printk
(
"Could not get uart2_fck
\n
"
);
else
{
else
{
clk_
us
e
(
uart2_fck
);
clk_
enabl
e
(
uart2_fck
);
}
}
break
;
break
;
case
2
:
case
2
:
...
@@ -149,14 +149,14 @@ void __init omap_serial_init()
...
@@ -149,14 +149,14 @@ void __init omap_serial_init()
if
(
IS_ERR
(
uart3_ick
))
if
(
IS_ERR
(
uart3_ick
))
printk
(
"Could not get uart3_ick
\n
"
);
printk
(
"Could not get uart3_ick
\n
"
);
else
{
else
{
clk_
us
e
(
uart3_ick
);
clk_
enabl
e
(
uart3_ick
);
}
}
uart3_fck
=
clk_get
(
NULL
,
"uart3_fck"
);
uart3_fck
=
clk_get
(
NULL
,
"uart3_fck"
);
if
(
IS_ERR
(
uart3_fck
))
if
(
IS_ERR
(
uart3_fck
))
printk
(
"Could not get uart3_fck
\n
"
);
printk
(
"Could not get uart3_fck
\n
"
);
else
{
else
{
clk_
us
e
(
uart3_fck
);
clk_
enabl
e
(
uart3_fck
);
}
}
break
;
break
;
}
}
...
...
arch/arm/mach-omap2/timer-gp.c
View file @
2333f212
...
@@ -104,7 +104,7 @@ static void __init omap2_gp_timer_init(void)
...
@@ -104,7 +104,7 @@ static void __init omap2_gp_timer_init(void)
if
(
IS_ERR
(
sys_ck
))
if
(
IS_ERR
(
sys_ck
))
printk
(
KERN_ERR
"Could not get sys_ck
\n
"
);
printk
(
KERN_ERR
"Could not get sys_ck
\n
"
);
else
{
else
{
clk_
us
e
(
sys_ck
);
clk_
enabl
e
(
sys_ck
);
tick_period
=
clk_get_rate
(
sys_ck
)
/
100
;
tick_period
=
clk_get_rate
(
sys_ck
)
/
100
;
clk_put
(
sys_ck
);
clk_put
(
sys_ck
);
}
}
...
...
arch/arm/plat-omap/clock.c
View file @
2333f212
...
@@ -34,7 +34,7 @@ DEFINE_SPINLOCK(clockfw_lock);
...
@@ -34,7 +34,7 @@ DEFINE_SPINLOCK(clockfw_lock);
static
struct
clk_functions
*
arch_clock
;
static
struct
clk_functions
*
arch_clock
;
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
* Standard clock functions defined in
asm/hardware/cloc
k.h
* Standard clock functions defined in
include/linux/cl
k.h
*-------------------------------------------------------------------------*/
*-------------------------------------------------------------------------*/
struct
clk
*
clk_get
(
struct
device
*
dev
,
const
char
*
id
)
struct
clk
*
clk_get
(
struct
device
*
dev
,
const
char
*
id
)
...
@@ -60,12 +60,8 @@ int clk_enable(struct clk *clk)
...
@@ -60,12 +60,8 @@ int clk_enable(struct clk *clk)
int
ret
=
0
;
int
ret
=
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
clk
->
enable
)
if
(
arch_clock
->
clk_enable
)
ret
=
clk
->
enable
(
clk
);
else
if
(
arch_clock
->
clk_enable
)
ret
=
arch_clock
->
clk_enable
(
clk
);
ret
=
arch_clock
->
clk_enable
(
clk
);
else
printk
(
KERN_ERR
"Could not enable clock %s
\n
"
,
clk
->
name
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
return
ret
;
return
ret
;
...
@@ -77,41 +73,12 @@ void clk_disable(struct clk *clk)
...
@@ -77,41 +73,12 @@ void clk_disable(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
clk
->
disable
)
if
(
arch_clock
->
clk_disable
)
clk
->
disable
(
clk
);
else
if
(
arch_clock
->
clk_disable
)
arch_clock
->
clk_disable
(
clk
);
arch_clock
->
clk_disable
(
clk
);
else
printk
(
KERN_ERR
"Could not disable clock %s
\n
"
,
clk
->
name
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
}
}
EXPORT_SYMBOL
(
clk_disable
);
EXPORT_SYMBOL
(
clk_disable
);
int
clk_use
(
struct
clk
*
clk
)
{
unsigned
long
flags
;
int
ret
=
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_use
)
ret
=
arch_clock
->
clk_use
(
clk
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
return
ret
;
}
EXPORT_SYMBOL
(
clk_use
);
void
clk_unuse
(
struct
clk
*
clk
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_unuse
)
arch_clock
->
clk_unuse
(
clk
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
}
EXPORT_SYMBOL
(
clk_unuse
);
int
clk_get_usecount
(
struct
clk
*
clk
)
int
clk_get_usecount
(
struct
clk
*
clk
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -146,7 +113,7 @@ void clk_put(struct clk *clk)
...
@@ -146,7 +113,7 @@ void clk_put(struct clk *clk)
EXPORT_SYMBOL
(
clk_put
);
EXPORT_SYMBOL
(
clk_put
);
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
* Optional clock functions defined in
asm/hardware/cloc
k.h
* Optional clock functions defined in
include/linux/cl
k.h
*-------------------------------------------------------------------------*/
*-------------------------------------------------------------------------*/
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
long
clk_round_rate
(
struct
clk
*
clk
,
unsigned
long
rate
)
...
...
arch/arm/plat-omap/gpio.c
View file @
2333f212
...
@@ -853,19 +853,19 @@ static int __init _omap_gpio_init(void)
...
@@ -853,19 +853,19 @@ static int __init _omap_gpio_init(void)
if
(
IS_ERR
(
gpio_ick
))
if
(
IS_ERR
(
gpio_ick
))
printk
(
"Could not get arm_gpio_ck
\n
"
);
printk
(
"Could not get arm_gpio_ck
\n
"
);
else
else
clk_
us
e
(
gpio_ick
);
clk_
enabl
e
(
gpio_ick
);
}
}
if
(
cpu_is_omap24xx
())
{
if
(
cpu_is_omap24xx
())
{
gpio_ick
=
clk_get
(
NULL
,
"gpios_ick"
);
gpio_ick
=
clk_get
(
NULL
,
"gpios_ick"
);
if
(
IS_ERR
(
gpio_ick
))
if
(
IS_ERR
(
gpio_ick
))
printk
(
"Could not get gpios_ick
\n
"
);
printk
(
"Could not get gpios_ick
\n
"
);
else
else
clk_
us
e
(
gpio_ick
);
clk_
enabl
e
(
gpio_ick
);
gpio_fck
=
clk_get
(
NULL
,
"gpios_fck"
);
gpio_fck
=
clk_get
(
NULL
,
"gpios_fck"
);
if
(
IS_ERR
(
gpio_ick
))
if
(
IS_ERR
(
gpio_ick
))
printk
(
"Could not get gpios_fck
\n
"
);
printk
(
"Could not get gpios_fck
\n
"
);
else
else
clk_
us
e
(
gpio_fck
);
clk_
enabl
e
(
gpio_fck
);
}
}
#ifdef CONFIG_ARCH_OMAP15XX
#ifdef CONFIG_ARCH_OMAP15XX
...
...
arch/arm/plat-omap/mcbsp.c
View file @
2333f212
...
@@ -190,11 +190,11 @@ static int omap_mcbsp_check(unsigned int id)
...
@@ -190,11 +190,11 @@ static int omap_mcbsp_check(unsigned int id)
static
void
omap_mcbsp_dsp_request
(
void
)
static
void
omap_mcbsp_dsp_request
(
void
)
{
{
if
(
cpu_is_omap1510
()
||
cpu_is_omap16xx
())
{
if
(
cpu_is_omap1510
()
||
cpu_is_omap16xx
())
{
clk_
us
e
(
mcbsp_dsp_ck
);
clk_
enabl
e
(
mcbsp_dsp_ck
);
clk_
us
e
(
mcbsp_api_ck
);
clk_
enabl
e
(
mcbsp_api_ck
);
/* enable 12MHz clock to mcbsp 1 & 3 */
/* enable 12MHz clock to mcbsp 1 & 3 */
clk_
us
e
(
mcbsp_dspxor_ck
);
clk_
enabl
e
(
mcbsp_dspxor_ck
);
/*
/*
* DSP external peripheral reset
* DSP external peripheral reset
...
@@ -208,9 +208,9 @@ static void omap_mcbsp_dsp_request(void)
...
@@ -208,9 +208,9 @@ static void omap_mcbsp_dsp_request(void)
static
void
omap_mcbsp_dsp_free
(
void
)
static
void
omap_mcbsp_dsp_free
(
void
)
{
{
if
(
cpu_is_omap1510
()
||
cpu_is_omap16xx
())
{
if
(
cpu_is_omap1510
()
||
cpu_is_omap16xx
())
{
clk_
unus
e
(
mcbsp_dspxor_ck
);
clk_
disabl
e
(
mcbsp_dspxor_ck
);
clk_
unus
e
(
mcbsp_dsp_ck
);
clk_
disabl
e
(
mcbsp_dsp_ck
);
clk_
unus
e
(
mcbsp_api_ck
);
clk_
disabl
e
(
mcbsp_api_ck
);
}
}
}
}
...
...
arch/arm/plat-omap/ocpi.c
View file @
2333f212
...
@@ -88,7 +88,7 @@ static int __init omap_ocpi_init(void)
...
@@ -88,7 +88,7 @@ static int __init omap_ocpi_init(void)
if
(
IS_ERR
(
ocpi_ck
))
if
(
IS_ERR
(
ocpi_ck
))
return
PTR_ERR
(
ocpi_ck
);
return
PTR_ERR
(
ocpi_ck
);
clk_
us
e
(
ocpi_ck
);
clk_
enabl
e
(
ocpi_ck
);
ocpi_enable
();
ocpi_enable
();
printk
(
"OMAP OCPI interconnect driver loaded
\n
"
);
printk
(
"OMAP OCPI interconnect driver loaded
\n
"
);
...
@@ -102,7 +102,7 @@ static void __exit omap_ocpi_exit(void)
...
@@ -102,7 +102,7 @@ static void __exit omap_ocpi_exit(void)
if
(
!
cpu_is_omap16xx
())
if
(
!
cpu_is_omap16xx
())
return
;
return
;
clk_
unus
e
(
ocpi_ck
);
clk_
disabl
e
(
ocpi_ck
);
clk_put
(
ocpi_ck
);
clk_put
(
ocpi_ck
);
}
}
...
...
drivers/serial/Kconfig
View file @
2333f212
...
@@ -301,7 +301,7 @@ config SERIAL_AT91_TTYAT
...
@@ -301,7 +301,7 @@ config SERIAL_AT91_TTYAT
depends on SERIAL_AT91=y
depends on SERIAL_AT91=y
help
help
Say Y here if you wish to have the five internal AT91RM9200 UARTs
Say Y here if you wish to have the five internal AT91RM9200 UARTs
appear as /dev/ttyAT0-4 (major 2
40, minor 0-4
) instead of the
appear as /dev/ttyAT0-4 (major 2
04, minor 154-158
) instead of the
normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if
normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if
you also want other UARTs, such as external 8250/16C550 compatible
you also want other UARTs, such as external 8250/16C550 compatible
UARTs.
UARTs.
...
...
drivers/serial/at91_serial.c
View file @
2333f212
...
@@ -222,8 +222,6 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs)
...
@@ -222,8 +222,6 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs)
while
(
status
&
(
AT91_US_RXRDY
))
{
while
(
status
&
(
AT91_US_RXRDY
))
{
ch
=
UART_GET_CHAR
(
port
);
ch
=
UART_GET_CHAR
(
port
);
if
(
tty
->
flip
.
count
>=
TTY_FLIPBUF_SIZE
)
goto
ignore_char
;
port
->
icount
.
rx
++
;
port
->
icount
.
rx
++
;
flg
=
TTY_NORMAL
;
flg
=
TTY_NORMAL
;
...
...
include/asm-arm/arch-omap/clock.h
View file @
2333f212
...
@@ -38,8 +38,6 @@ struct clk {
...
@@ -38,8 +38,6 @@ struct clk {
struct
clk_functions
{
struct
clk_functions
{
int
(
*
clk_enable
)(
struct
clk
*
clk
);
int
(
*
clk_enable
)(
struct
clk
*
clk
);
void
(
*
clk_disable
)(
struct
clk
*
clk
);
void
(
*
clk_disable
)(
struct
clk
*
clk
);
int
(
*
clk_use
)(
struct
clk
*
clk
);
void
(
*
clk_unuse
)(
struct
clk
*
clk
);
long
(
*
clk_round_rate
)(
struct
clk
*
clk
,
unsigned
long
rate
);
long
(
*
clk_round_rate
)(
struct
clk
*
clk
,
unsigned
long
rate
);
int
(
*
clk_set_rate
)(
struct
clk
*
clk
,
unsigned
long
rate
);
int
(
*
clk_set_rate
)(
struct
clk
*
clk
,
unsigned
long
rate
);
int
(
*
clk_set_parent
)(
struct
clk
*
clk
,
struct
clk
*
parent
);
int
(
*
clk_set_parent
)(
struct
clk
*
clk
,
struct
clk
*
parent
);
...
...
include/asm-arm/arch-pxa/pxa-regs.h
View file @
2333f212
...
@@ -108,6 +108,7 @@
...
@@ -108,6 +108,7 @@
#define DCSR_STARTINTR (1 << 1)
/* Start Interrupt (read / write) */
#define DCSR_STARTINTR (1 << 1)
/* Start Interrupt (read / write) */
#define DCSR_BUSERR (1 << 0)
/* Bus Error Interrupt (read / write) */
#define DCSR_BUSERR (1 << 0)
/* Bus Error Interrupt (read / write) */
#define DALGN __REG(0x400000a0)
/* DMA Alignment Register */
#define DINT __REG(0x400000f0)
/* DMA Interrupt Register */
#define DINT __REG(0x400000f0)
/* DMA Interrupt Register */
#define DRCMR(n) __REG2(0x40000100, (n)<<2)
#define DRCMR(n) __REG2(0x40000100, (n)<<2)
...
@@ -1614,8 +1615,21 @@
...
@@ -1614,8 +1615,21 @@
#define SSCR0_National (0x2 << 4)
/* National Microwire */
#define SSCR0_National (0x2 << 4)
/* National Microwire */
#define SSCR0_ECS (1 << 6)
/* External clock select */
#define SSCR0_ECS (1 << 6)
/* External clock select */
#define SSCR0_SSE (1 << 7)
/* Synchronous Serial Port Enable */
#define SSCR0_SSE (1 << 7)
/* Synchronous Serial Port Enable */
#if defined(CONFIG_PXA25x)
#define SSCR0_SCR (0x0000ff00)
/* Serial Clock Rate (mask) */
#define SSCR0_SCR (0x0000ff00)
/* Serial Clock Rate (mask) */
#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8)
/* Divisor [2..512] */
#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8)
/* Divisor [2..512] */
#elif defined(CONFIG_PXA27x)
#define SSCR0_SCR (0x000fff00)
/* Serial Clock Rate (mask) */
#define SSCR0_SerClkDiv(x) (((x) - 1) << 8)
/* Divisor [1..4096] */
#define SSCR0_EDSS (1 << 20)
/* Extended data size select */
#define SSCR0_NCS (1 << 21)
/* Network clock select */
#define SSCR0_RIM (1 << 22)
/* Receive FIFO overrrun interrupt mask */
#define SSCR0_TUM (1 << 23)
/* Transmit FIFO underrun interrupt mask */
#define SSCR0_FRDC (0x07000000)
/* Frame rate divider control (mask) */
#define SSCR0_SlotsPerFrm(c) ((x) - 1)
/* Time slots per frame [1..8] */
#define SSCR0_ADC (1 << 30)
/* Audio clock select */
#define SSCR0_MOD (1 << 31)
/* Mode (normal or network) */
#endif
#define SSCR1_RIE (1 << 0)
/* Receive FIFO Interrupt Enable */
#define SSCR1_RIE (1 << 0)
/* Receive FIFO Interrupt Enable */
#define SSCR1_TIE (1 << 1)
/* Transmit FIFO Interrupt Enable */
#define SSCR1_TIE (1 << 1)
/* Transmit FIFO Interrupt Enable */
...
...
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