Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
de125bf3
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
de125bf3
编写于
2月 01, 2006
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] powermac pci iomem annotations
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
24954a14
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
46 deletion
+43
-46
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/powermac/pci.c
+43
-46
未找到文件。
arch/powerpc/platforms/powermac/pci.c
浏览文件 @
de125bf3
...
...
@@ -136,14 +136,14 @@ static void __init fixup_bus_range(struct device_node *bridge)
|(((unsigned int)(off)) & 0xFCUL) \
|1UL)
static
unsigned
long
macrisc_cfg_access
(
struct
pci_controller
*
hose
,
static
volatile
void
__iomem
*
macrisc_cfg_access
(
struct
pci_controller
*
hose
,
u8
bus
,
u8
dev_fn
,
u8
offset
)
{
unsigned
int
caddr
;
if
(
bus
==
hose
->
first_busno
)
{
if
(
dev_fn
<
(
11
<<
3
))
return
0
;
return
NULL
;
caddr
=
MACRISC_CFA0
(
dev_fn
,
offset
);
}
else
caddr
=
MACRISC_CFA1
(
bus
,
dev_fn
,
offset
);
...
...
@@ -154,14 +154,14 @@ static unsigned long macrisc_cfg_access(struct pci_controller* hose,
}
while
(
in_le32
(
hose
->
cfg_addr
)
!=
caddr
);
offset
&=
has_uninorth
?
0x07
:
0x03
;
return
((
unsigned
long
)
hose
->
cfg_data
)
+
offset
;
return
hose
->
cfg_data
+
offset
;
}
static
int
macrisc_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
offset
,
int
len
,
u32
*
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -177,13 +177,13 @@ static int macrisc_read_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
*
val
=
in_8
(
(
u8
*
)
addr
);
*
val
=
in_8
(
addr
);
break
;
case
2
:
*
val
=
in_le16
(
(
u16
*
)
addr
);
*
val
=
in_le16
(
addr
);
break
;
default:
*
val
=
in_le32
(
(
u32
*
)
addr
);
*
val
=
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -193,7 +193,7 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
int
offset
,
int
len
,
u32
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -209,16 +209,16 @@ static int macrisc_write_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
out_8
(
(
u8
*
)
addr
,
val
);
(
void
)
in_8
(
(
u8
*
)
addr
);
out_8
(
addr
,
val
);
(
void
)
in_8
(
addr
);
break
;
case
2
:
out_le16
(
(
u16
*
)
addr
,
val
);
(
void
)
in_le16
(
(
u16
*
)
addr
);
out_le16
(
addr
,
val
);
(
void
)
in_le16
(
addr
);
break
;
default:
out_le32
(
(
u32
*
)
addr
,
val
);
(
void
)
in_le32
(
(
u32
*
)
addr
);
out_le32
(
addr
,
val
);
(
void
)
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -348,25 +348,23 @@ static int u3_ht_skip_device(struct pci_controller *hose,
+ (((unsigned int)bus) << 16) \
+ 0x01000000UL)
static
unsigned
long
u3_ht_cfg_access
(
struct
pci_controller
*
hose
,
static
volatile
void
__iomem
*
u3_ht_cfg_access
(
struct
pci_controller
*
hose
,
u8
bus
,
u8
devfn
,
u8
offset
)
{
if
(
bus
==
hose
->
first_busno
)
{
/* For now, we don't self probe U3 HT bridge */
if
(
PCI_SLOT
(
devfn
)
==
0
)
return
0
;
return
((
unsigned
long
)
hose
->
cfg_data
)
+
U3_HT_CFA0
(
devfn
,
offset
);
return
NULL
;
return
hose
->
cfg_data
+
U3_HT_CFA0
(
devfn
,
offset
);
}
else
return
((
unsigned
long
)
hose
->
cfg_data
)
+
U3_HT_CFA1
(
bus
,
devfn
,
offset
);
return
hose
->
cfg_data
+
U3_HT_CFA1
(
bus
,
devfn
,
offset
);
}
static
int
u3_ht_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
offset
,
int
len
,
u32
*
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -400,13 +398,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
*
val
=
in_8
(
(
u8
*
)
addr
);
*
val
=
in_8
(
addr
);
break
;
case
2
:
*
val
=
in_le16
(
(
u16
*
)
addr
);
*
val
=
in_le16
(
addr
);
break
;
default:
*
val
=
in_le32
(
(
u32
*
)
addr
);
*
val
=
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -416,7 +414,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
int
offset
,
int
len
,
u32
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -442,16 +440,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
out_8
(
(
u8
*
)
addr
,
val
);
(
void
)
in_8
(
(
u8
*
)
addr
);
out_8
(
addr
,
val
);
(
void
)
in_8
(
addr
);
break
;
case
2
:
out_le16
(
(
u16
*
)
addr
,
val
);
(
void
)
in_le16
(
(
u16
*
)
addr
);
out_le16
(
addr
,
val
);
(
void
)
in_le16
(
addr
);
break
;
default:
out_le32
((
u32
*
)
addr
,
val
);
(
void
)
in_le32
(
(
u32
*
)
addr
);
out_le32
((
u32
__iomem
*
)
addr
,
val
);
(
void
)
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -476,7 +474,7 @@ static struct pci_ops u3_ht_pci_ops =
|(((unsigned int)(off)) & 0xfcU) \
|1UL)
static
unsigned
long
u4_pcie_cfg_access
(
struct
pci_controller
*
hose
,
static
volatile
void
__iomem
*
u4_pcie_cfg_access
(
struct
pci_controller
*
hose
,
u8
bus
,
u8
dev_fn
,
int
offset
)
{
unsigned
int
caddr
;
...
...
@@ -492,14 +490,14 @@ static unsigned long u4_pcie_cfg_access(struct pci_controller* hose,
}
while
(
in_le32
(
hose
->
cfg_addr
)
!=
caddr
);
offset
&=
0x03
;
return
((
unsigned
long
)
hose
->
cfg_data
)
+
offset
;
return
hose
->
cfg_data
+
offset
;
}
static
int
u4_pcie_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
offset
,
int
len
,
u32
*
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -515,13 +513,13 @@ static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
*
val
=
in_8
(
(
u8
*
)
addr
);
*
val
=
in_8
(
addr
);
break
;
case
2
:
*
val
=
in_le16
(
(
u16
*
)
addr
);
*
val
=
in_le16
(
addr
);
break
;
default:
*
val
=
in_le32
(
(
u32
*
)
addr
);
*
val
=
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -531,7 +529,7 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
int
offset
,
int
len
,
u32
val
)
{
struct
pci_controller
*
hose
;
unsigned
long
addr
;
volatile
void
__iomem
*
addr
;
hose
=
pci_bus_to_host
(
bus
);
if
(
hose
==
NULL
)
...
...
@@ -547,16 +545,16 @@ static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
*/
switch
(
len
)
{
case
1
:
out_8
(
(
u8
*
)
addr
,
val
);
(
void
)
in_8
(
(
u8
*
)
addr
);
out_8
(
addr
,
val
);
(
void
)
in_8
(
addr
);
break
;
case
2
:
out_le16
(
(
u16
*
)
addr
,
val
);
(
void
)
in_le16
(
(
u16
*
)
addr
);
out_le16
(
addr
,
val
);
(
void
)
in_le16
(
addr
);
break
;
default:
out_le32
(
(
u32
*
)
addr
,
val
);
(
void
)
in_le32
(
(
u32
*
)
addr
);
out_le32
(
addr
,
val
);
(
void
)
in_le32
(
addr
);
break
;
}
return
PCIBIOS_SUCCESSFUL
;
...
...
@@ -773,8 +771,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
* the reg address cell, we shall fix that by killing struct
* reg_property and using some accessor functions instead
*/
hose
->
cfg_data
=
(
volatile
unsigned
char
*
)
ioremap
(
0xf2000000
,
0x02000000
);
hose
->
cfg_data
=
ioremap
(
0xf2000000
,
0x02000000
);
/*
* /ht node doesn't expose a "ranges" property, so we "remove"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录