Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
62d6b66e
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
62d6b66e
编写于
11月 09, 2007
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: Move sh32 optimized I/O routines to arch/sh/lib/
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
7a65eaf4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
83 addition
and
68 deletion
+83
-68
arch/sh/kernel/io.c
arch/sh/kernel/io.c
+0
-67
arch/sh/lib/Makefile
arch/sh/lib/Makefile
+1
-1
arch/sh/lib/io.c
arch/sh/lib/io.c
+82
-0
未找到文件。
arch/sh/kernel/io.c
浏览文件 @
62d6b66e
...
@@ -61,73 +61,6 @@ void memset_io(volatile void __iomem *dst, int c, unsigned long count)
...
@@ -61,73 +61,6 @@ void memset_io(volatile void __iomem *dst, int c, unsigned long count)
}
}
EXPORT_SYMBOL
(
memset_io
);
EXPORT_SYMBOL
(
memset_io
);
void
__raw_readsl
(
unsigned
long
addr
,
void
*
datap
,
int
len
)
{
u32
*
data
;
for
(
data
=
datap
;
(
len
!=
0
)
&&
(((
u32
)
data
&
0x1f
)
!=
0
);
len
--
)
*
data
++
=
ctrl_inl
(
addr
);
if
(
likely
(
len
>=
(
0x20
>>
2
)))
{
int
tmp2
,
tmp3
,
tmp4
,
tmp5
,
tmp6
;
__asm__
__volatile__
(
"1:
\n\t
"
"mov.l @%7, r0
\n\t
"
"mov.l @%7, %2
\n\t
"
#ifdef CONFIG_CPU_SH4
"movca.l r0, @%0
\n\t
"
#else
"mov.l r0, @%0
\n\t
"
#endif
"mov.l @%7, %3
\n\t
"
"mov.l @%7, %4
\n\t
"
"mov.l @%7, %5
\n\t
"
"mov.l @%7, %6
\n\t
"
"mov.l @%7, r7
\n\t
"
"mov.l @%7, r0
\n\t
"
"mov.l %2, @(0x04,%0)
\n\t
"
"mov #0x20>>2, %2
\n\t
"
"mov.l %3, @(0x08,%0)
\n\t
"
"sub %2, %1
\n\t
"
"mov.l %4, @(0x0c,%0)
\n\t
"
"cmp/hi %1, %2 ! T if 32 > len
\n\t
"
"mov.l %5, @(0x10,%0)
\n\t
"
"mov.l %6, @(0x14,%0)
\n\t
"
"mov.l r7, @(0x18,%0)
\n\t
"
"mov.l r0, @(0x1c,%0)
\n\t
"
"bf.s 1b
\n\t
"
" add #0x20, %0
\n\t
"
:
"=&r"
(
data
),
"=&r"
(
len
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
),
"=&r"
(
tmp5
),
"=&r"
(
tmp6
)
:
"r"
(
addr
),
"0"
(
data
),
"1"
(
len
)
:
"r0"
,
"r7"
,
"t"
,
"memory"
);
}
for
(;
len
!=
0
;
len
--
)
*
data
++
=
ctrl_inl
(
addr
);
}
EXPORT_SYMBOL
(
__raw_readsl
);
void
__raw_writesl
(
unsigned
long
addr
,
const
void
*
data
,
int
len
)
{
if
(
likely
(
len
!=
0
))
{
int
tmp1
;
__asm__
__volatile__
(
"1:
\n\t
"
"mov.l @%0+, %1
\n\t
"
"dt %3
\n\t
"
"bf.s 1b
\n\t
"
" mov.l %1, @%4
\n\t
"
:
"=&r"
(
data
),
"=&r"
(
tmp1
)
:
"0"
(
data
),
"r"
(
len
),
"r"
(
addr
)
:
"t"
,
"memory"
);
}
}
EXPORT_SYMBOL
(
__raw_writesl
);
void
__iomem
*
ioport_map
(
unsigned
long
port
,
unsigned
int
nr
)
void
__iomem
*
ioport_map
(
unsigned
long
port
,
unsigned
int
nr
)
{
{
return
sh_mv
.
mv_ioport_map
(
port
,
nr
);
return
sh_mv
.
mv_ioport_map
(
port
,
nr
);
...
...
arch/sh/lib/Makefile
浏览文件 @
62d6b66e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Makefile for SuperH-specific library files..
# Makefile for SuperH-specific library files..
#
#
lib-y
=
delay.o memset.o memmove.o memchr.o
\
lib-y
=
delay.o
io.o
memset.o memmove.o memchr.o
\
checksum.o strlen.o div64.o div64-generic.o
checksum.o strlen.o div64.o div64-generic.o
memcpy-y
:=
memcpy.o
memcpy-y
:=
memcpy.o
...
...
arch/sh/lib/io.c
0 → 100644
浏览文件 @
62d6b66e
/*
* arch/sh/lib/io.c - SH32 optimized I/O routines
*
* Copyright (C) 2000 Stuart Menefy
* Copyright (C) 2005 Paul Mundt
*
* Provide real functions which expand to whatever the header file defined.
* Also definitions of machine independent IO functions.
*
* 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/module.h>
#include <linux/io.h>
void
__raw_readsl
(
unsigned
long
addr
,
void
*
datap
,
int
len
)
{
u32
*
data
;
for
(
data
=
datap
;
(
len
!=
0
)
&&
(((
u32
)
data
&
0x1f
)
!=
0
);
len
--
)
*
data
++
=
ctrl_inl
(
addr
);
if
(
likely
(
len
>=
(
0x20
>>
2
)))
{
int
tmp2
,
tmp3
,
tmp4
,
tmp5
,
tmp6
;
__asm__
__volatile__
(
"1:
\n\t
"
"mov.l @%7, r0
\n\t
"
"mov.l @%7, %2
\n\t
"
#ifdef CONFIG_CPU_SH4
"movca.l r0, @%0
\n\t
"
#else
"mov.l r0, @%0
\n\t
"
#endif
"mov.l @%7, %3
\n\t
"
"mov.l @%7, %4
\n\t
"
"mov.l @%7, %5
\n\t
"
"mov.l @%7, %6
\n\t
"
"mov.l @%7, r7
\n\t
"
"mov.l @%7, r0
\n\t
"
"mov.l %2, @(0x04,%0)
\n\t
"
"mov #0x20>>2, %2
\n\t
"
"mov.l %3, @(0x08,%0)
\n\t
"
"sub %2, %1
\n\t
"
"mov.l %4, @(0x0c,%0)
\n\t
"
"cmp/hi %1, %2 ! T if 32 > len
\n\t
"
"mov.l %5, @(0x10,%0)
\n\t
"
"mov.l %6, @(0x14,%0)
\n\t
"
"mov.l r7, @(0x18,%0)
\n\t
"
"mov.l r0, @(0x1c,%0)
\n\t
"
"bf.s 1b
\n\t
"
" add #0x20, %0
\n\t
"
:
"=&r"
(
data
),
"=&r"
(
len
),
"=&r"
(
tmp2
),
"=&r"
(
tmp3
),
"=&r"
(
tmp4
),
"=&r"
(
tmp5
),
"=&r"
(
tmp6
)
:
"r"
(
addr
),
"0"
(
data
),
"1"
(
len
)
:
"r0"
,
"r7"
,
"t"
,
"memory"
);
}
for
(;
len
!=
0
;
len
--
)
*
data
++
=
ctrl_inl
(
addr
);
}
EXPORT_SYMBOL
(
__raw_readsl
);
void
__raw_writesl
(
unsigned
long
addr
,
const
void
*
data
,
int
len
)
{
if
(
likely
(
len
!=
0
))
{
int
tmp1
;
__asm__
__volatile__
(
"1:
\n\t
"
"mov.l @%0+, %1
\n\t
"
"dt %3
\n\t
"
"bf.s 1b
\n\t
"
" mov.l %1, @%4
\n\t
"
:
"=&r"
(
data
),
"=&r"
(
tmp1
)
:
"0"
(
data
),
"r"
(
len
),
"r"
(
addr
)
:
"t"
,
"memory"
);
}
}
EXPORT_SYMBOL
(
__raw_writesl
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录