Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
48e4237d
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看板
提交
48e4237d
编写于
4月 20, 2009
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: pci: Convert the SH-5 code over to the new interface.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
3444f5ec
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
52 deletion
+23
-52
arch/sh/drivers/pci/Kconfig
arch/sh/drivers/pci/Kconfig
+1
-1
arch/sh/drivers/pci/ops-cayman.c
arch/sh/drivers/pci/ops-cayman.c
+0
-11
arch/sh/drivers/pci/pci-sh5.c
arch/sh/drivers/pci/pci-sh5.c
+22
-36
arch/sh/drivers/pci/pci-sh5.h
arch/sh/drivers/pci/pci-sh5.h
+0
-4
未找到文件。
arch/sh/drivers/pci/Kconfig
浏览文件 @
48e4237d
...
...
@@ -23,7 +23,7 @@ config PCI_NEW
bool
depends on PCI
default y if CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7780 || \
CPU_SUBTYPE_SH7785
CPU_SUBTYPE_SH7785
|| CPU_SH5
# This is also board-specific
config PCI_AUTO
...
...
arch/sh/drivers/pci/ops-cayman.c
浏览文件 @
48e4237d
...
...
@@ -75,14 +75,3 @@ int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
return
result
;
}
struct
pci_channel
board_pci_channels
[]
=
{
{
sh5_pci_init
,
&
sh5_pci_ops
,
NULL
,
NULL
,
0
,
0xff
},
{
NULL
,
NULL
,
NULL
,
0
,
0
},
};
int
__init
pcibios_init_platform
(
void
)
{
return
sh5pci_init
(
__pa
(
memory_start
),
__pa
(
memory_end
)
-
__pa
(
memory_start
));
}
arch/sh/drivers/pci/pci-sh5.c
浏览文件 @
48e4237d
...
...
@@ -27,12 +27,6 @@
unsigned
long
pcicr_virt
;
unsigned
long
PCI_IO_AREA
;
int
__init
sh5_pci_init
(
struct
pci_channel
*
chan
)
{
pr_debug
(
"PCI: Starting intialization.
\n
"
);
return
pcibios_init_platform
();
}
/* Rounds a number UP to the nearest power of two. Used for
* sizing the PCI window.
*/
...
...
@@ -95,8 +89,21 @@ static irqreturn_t pcish5_serr_irq(int irq, void *dev_id)
return
IRQ_NONE
;
}
int
__init
sh5pci_init
(
unsigned
long
memStart
,
unsigned
long
memSize
)
static
struct
resource
sh5_io_resource
=
{
/* place holder */
};
static
struct
resource
sh5_mem_resource
=
{
/* place holder */
};
static
struct
pci_channel
sh5pci_controller
=
{
.
pci_ops
=
&
sh5_pci_ops
,
.
mem_resource
=
&
sh5_mem_resource
,
.
mem_offset
=
0x00000000
,
.
io_resource
=
&
sh5_io_resource
,
.
io_offset
=
0x00000000
,
};
static
int
__init
sh5pci_init
(
void
)
{
unsigned
long
memStart
=
__pa
(
memory_start
);
unsigned
long
memSize
=
__pa
(
memory_end
)
-
memStart
;
u32
lsr0
;
u32
uval
;
...
...
@@ -203,35 +210,14 @@ int __init sh5pci_init(unsigned long memStart, unsigned long memSize)
SH5PCI_WRITE
(
AINTM
,
~
0
);
SH5PCI_WRITE
(
PINTM
,
~
0
);
return
0
;
}
sh5_io_resource
.
start
=
PCI_IO_AREA
;
sh5_io_resource
.
end
=
PCI_IO_AREA
+
0x10000
;
#define xPCIBIOS_MIN_IO board_pci_channels->io_resource->start
#define xPCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
sh5_mem_resource
.
start
=
memStart
;
sh5_mem_resource
.
end
=
memStart
+
memSize
;
void
__devinit
pcibios_fixup_bus
(
struct
pci_bus
*
bus
)
{
struct
pci_dev
*
dev
=
bus
->
self
;
int
i
;
if
(
dev
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
bus
->
resource
[
i
]
=
&
dev
->
resource
[
PCI_BRIDGE_RESOURCES
+
i
];
bus
->
resource
[
i
]
->
name
=
bus
->
name
;
}
bus
->
resource
[
0
]
->
flags
|=
IORESOURCE_IO
;
bus
->
resource
[
1
]
->
flags
|=
IORESOURCE_MEM
;
/* For now, propagate host limits to the bus;
* we'll adjust them later. */
bus
->
resource
[
0
]
->
end
=
64
*
1024
-
1
;
bus
->
resource
[
1
]
->
end
=
xPCIBIOS_MIN_MEM
+
(
256
*
1024
*
1024
)
-
1
;
bus
->
resource
[
0
]
->
start
=
xPCIBIOS_MIN_IO
;
bus
->
resource
[
1
]
->
start
=
xPCIBIOS_MIN_MEM
;
/* Turn off downstream PF memory address range by default */
bus
->
resource
[
2
]
->
start
=
1024
*
1024
;
bus
->
resource
[
2
]
->
end
=
bus
->
resource
[
2
]
->
start
-
1
;
}
register_pci_controller
(
&
sh5pci_controller
);
return
0
;
}
arch_initcall
(
sh5pci_init
);
arch/sh/drivers/pci/pci-sh5.h
浏览文件 @
48e4237d
...
...
@@ -107,8 +107,4 @@ extern unsigned long pcicr_virt;
extern
struct
pci_ops
sh5_pci_ops
;
/* arch/sh/drivers/pci/pci-sh5.c */
int
sh5_pci_init
(
struct
pci_channel
*
chan
);
int
sh5pci_init
(
unsigned
long
memStart
,
unsigned
long
memSize
);
#endif
/* __PCI_SH5_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录