Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
b5ba0740
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b5ba0740
编写于
6月 23, 2006
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SPARC64]: Make auxio a real driver.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
4f62d158
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
74 addition
and
45 deletion
+74
-45
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/auxio.c
+74
-35
arch/sparc64/kernel/ebus.c
arch/sparc64/kernel/ebus.c
+0
-8
arch/sparc64/kernel/sbus.c
arch/sparc64/kernel/sbus.c
+0
-2
未找到文件。
arch/sparc64/kernel/auxio.c
浏览文件 @
b5ba0740
...
...
@@ -110,43 +110,82 @@ void auxio_set_lte(int on)
}
}
void
__init
auxio_probe
(
void
)
static
void
__devinit
auxio_report_dev
(
struct
device_node
*
dp
)
{
struct
sbus_bus
*
sbus
;
struct
sbus_dev
*
sdev
=
NULL
;
for_each_sbus
(
sbus
)
{
for_each_sbusdev
(
sdev
,
sbus
)
{
if
(
!
strcmp
(
sdev
->
prom_name
,
"auxio"
))
goto
found_sdev
;
}
}
found_sdev:
if
(
sdev
)
{
auxio_devtype
=
AUXIO_TYPE_SBUS
;
auxio_register
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
sdev
->
reg_addrs
[
0
].
reg_size
,
"auxiliaryIO"
);
}
printk
(
KERN_INFO
"AUXIO: Found device at %s
\n
"
,
dp
->
full_name
);
}
static
struct
of_device_id
auxio_match
[]
=
{
{
.
name
=
"auxio"
,
},
{},
};
MODULE_DEVICE_TABLE
(
of
,
auxio_match
);
#ifdef CONFIG_SBUS
static
int
__devinit
auxio_sbus_probe
(
struct
of_device
*
dev
,
const
struct
of_device_id
*
match
)
{
struct
sbus_dev
*
sdev
=
to_sbus_device
(
&
dev
->
dev
);
auxio_devtype
=
AUXIO_TYPE_SBUS
;
auxio_register
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
sdev
->
reg_addrs
[
0
].
reg_size
,
"auxiliaryIO"
);
if
(
!
auxio_register
)
return
-
ENODEV
;
auxio_report_dev
(
dev
->
node
);
return
0
;
}
static
struct
of_platform_driver
auxio_sbus_driver
=
{
.
name
=
"auxio"
,
.
match_table
=
auxio_match
,
.
probe
=
auxio_sbus_probe
,
};
#endif
#ifdef CONFIG_PCI
else
{
struct
linux_ebus
*
ebus
;
struct
linux_ebus_device
*
edev
=
NULL
;
for_each_ebus
(
ebus
)
{
for_each_ebusdev
(
edev
,
ebus
)
{
if
(
!
strcmp
(
edev
->
prom_node
->
name
,
"auxio"
))
goto
ebus_done
;
}
}
ebus_done:
if
(
edev
)
{
auxio_devtype
=
AUXIO_TYPE_EBUS
;
auxio_register
=
ioremap
(
edev
->
resource
[
0
].
start
,
sizeof
(
u32
));
}
}
static
int
__devinit
auxio_ebus_probe
(
struct
of_device
*
dev
,
const
struct
of_device_id
*
match
)
{
struct
linux_ebus_device
*
edev
=
to_ebus_device
(
&
dev
->
dev
);
auxio_devtype
=
AUXIO_TYPE_EBUS
;
auxio_register
=
ioremap
(
edev
->
resource
[
0
].
start
,
sizeof
(
u32
));
if
(
!
auxio_register
)
return
-
ENODEV
;
auxio_report_dev
(
dev
->
node
);
auxio_set_led
(
AUXIO_LED_ON
);
return
0
;
}
static
struct
of_platform_driver
auxio_ebus_driver
=
{
.
name
=
"auxio"
,
.
match_table
=
auxio_match
,
.
probe
=
auxio_ebus_probe
,
};
#endif
static
int
__init
auxio_probe
(
void
)
{
#ifdef CONFIG_SBUS
of_register_driver
(
&
auxio_sbus_driver
,
&
sbus_bus_type
);
#endif
#ifdef CONFIG_PCI
of_register_driver
(
&
auxio_ebus_driver
,
&
ebus_bus_type
);
#endif
return
0
;
}
/* Must be after subsys_initcall() so that busses are probed. Must
* be before device_initcall() because things like the floppy driver
* need to use the AUXIO register.
*/
fs_initcall
(
auxio_probe
);
arch/sparc64/kernel/ebus.c
浏览文件 @
b5ba0740
...
...
@@ -269,10 +269,6 @@ EXPORT_SYMBOL(ebus_dma_enable);
struct
linux_ebus
*
ebus_chain
=
NULL
;
#ifdef CONFIG_SUN_AUXIO
extern
void
auxio_probe
(
void
);
#endif
static
inline
void
*
ebus_alloc
(
size_t
size
)
{
void
*
mem
;
...
...
@@ -630,8 +626,4 @@ void __init ebus_init(void)
++
num_ebus
;
}
pci_dev_put
(
pdev
);
/* XXX for the case, when ebusnd is 0, is it OK? */
#ifdef CONFIG_SUN_AUXIO
auxio_probe
();
#endif
}
arch/sparc64/kernel/sbus.c
浏览文件 @
b5ba0740
...
...
@@ -1269,10 +1269,8 @@ int __init sbus_arch_preinit(void)
void
__init
sbus_arch_postinit
(
void
)
{
extern
void
firetruck_init
(
void
);
extern
void
auxio_probe
(
void
);
extern
void
clock_probe
(
void
);
firetruck_init
();
auxio_probe
();
clock_probe
();
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录