Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ac7643e4
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ac7643e4
编写于
9月 15, 2008
作者:
K
Kevin Hilman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: DaVinci: Update IO address pointer typechecking
Signed-off-by:
N
Kevin Hilman
<
khilman@deeprootsystems.com
>
上级
45e9c0de
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
31 deletion
+14
-31
arch/arm/mach-davinci/board-evm.c
arch/arm/mach-davinci/board-evm.c
+1
-1
arch/arm/mach-davinci/include/mach/io.h
arch/arm/mach-davinci/include/mach/io.h
+13
-30
未找到文件。
arch/arm/mach-davinci/board-evm.c
浏览文件 @
ac7643e4
...
...
@@ -124,7 +124,7 @@ static __init void davinci_evm_irq_init(void)
MACHINE_START
(
DAVINCI_EVM
,
"DaVinci EVM"
)
/* Maintainer: MontaVista Software <source@mvista.com> */
.
phys_io
=
IO_PHYS
,
.
io_pg_offst
=
(
io_p2v
(
IO_PHYS
)
>>
18
)
&
0xfffc
,
.
io_pg_offst
=
(
__IO_ADDRESS
(
IO_PHYS
)
>>
18
)
&
0xfffc
,
.
boot_params
=
(
DAVINCI_DDR_BASE
+
0x100
),
.
map_io
=
davinci_evm_map_io
,
.
init_irq
=
davinci_evm_irq_init
,
...
...
arch/arm/mach-davinci/include/mach/io.h
浏览文件 @
ac7643e4
...
...
@@ -22,9 +22,8 @@
#define IO_OFFSET 0xfd000000
/* Virtual IO = 0xfec00000 */
#define IO_SIZE 0x00400000
#define IO_VIRT (IO_PHYS + IO_OFFSET)
#define io_p2v(pa) ((pa) + IO_OFFSET)
#define io_v2p(va) ((va) - IO_OFFSET)
#define
IO_ADDRESS(x) io_p2v(x
)
#define
__IO_ADDRESS(x) ((x) + IO_OFFSET
)
/*
* We don't actually have real ISA nor PCI buses, but there is so many
...
...
@@ -35,7 +34,12 @@
#define __mem_pci(a) (a)
#define __mem_isa(a) (a)
#ifndef __ASSEMBLER__
#define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa))
#ifdef __ASSEMBLER__
#define IOMEM(x) x
#else
#define IOMEM(x) ((void __force __iomem *)(x))
/*
* Functions to access the DaVinci IO region
...
...
@@ -46,34 +50,13 @@
* - DO NOT use hardcoded virtual addresses to allow changing the
* IO address space again if needed
*/
#define davinci_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
#define davinci_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
#define davinci_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
#define davinci_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
#define davinci_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
#define davinci_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
/* 16 bit uses LDRH/STRH, base +/- offset_8 */
typedef
struct
{
volatile
u16
offset
[
256
];
}
__regbase16
;
#define __REGV16(vaddr) ((__regbase16 *)((vaddr)&~0xff)) \
->offset[((vaddr)&0xff)>>1]
#define __REG16(paddr) __REGV16(io_p2v(paddr))
/* 8/32 bit uses LDR/STR, base +/- offset_12 */
typedef
struct
{
volatile
u8
offset
[
4096
];
}
__regbase8
;
#define __REGV8(vaddr) ((__regbase8 *)((vaddr)&~4095)) \
->offset[((vaddr)&4095)>>0]
#define __REG8(paddr) __REGV8(io_p2v(paddr))
typedef
struct
{
volatile
u32
offset
[
4096
];
}
__regbase32
;
#define __REGV32(vaddr) ((__regbase32 *)((vaddr)&~4095)) \
->offset[((vaddr)&4095)>>2]
#define __REG(paddr) __REGV32(io_p2v(paddr))
#else
#define davinci_readb(a) __raw_readb(IO_ADDRESS(a))
#define davinci_readw(a) __raw_readw(IO_ADDRESS(a))
#define davinci_readl(a) __raw_readl(IO_ADDRESS(a))
#define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
#define davinci_writeb(v, a) __raw_writeb(v, IO_ADDRESS(a))
#define davinci_writew(v, a) __raw_writew(v, IO_ADDRESS(a))
#define davinci_writel(v, a) __raw_writel(v, IO_ADDRESS(a))
#endif
/* __ASSEMBLER__ */
#endif
/* __ASM_ARCH_IO_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录