Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
73e4dbe4
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
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看板
提交
73e4dbe4
编写于
1月 25, 2013
作者:
R
Rafał Miłecki
提交者:
John W. Linville
1月 30, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bcma: register platform device for parallel flash
Signed-off-by:
N
John W. Linville
<
linville@tuxdriver.com
>
上级
c7a4a9e3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
5 deletion
+42
-5
drivers/bcma/bcma_private.h
drivers/bcma/bcma_private.h
+1
-0
drivers/bcma/driver_mips.c
drivers/bcma/driver_mips.c
+33
-5
drivers/bcma/main.c
drivers/bcma/main.c
+8
-0
未找到文件。
drivers/bcma/bcma_private.h
浏览文件 @
73e4dbe4
...
...
@@ -47,6 +47,7 @@ int bcma_sprom_get(struct bcma_bus *bus);
/* driver_chipcommon.c */
#ifdef CONFIG_BCMA_DRIVER_MIPS
void
bcma_chipco_serial_init
(
struct
bcma_drv_cc
*
cc
);
extern
struct
platform_device
bcma_pflash_dev
;
#endif
/* CONFIG_BCMA_DRIVER_MIPS */
/* driver_chipcommon_pmu.c */
...
...
drivers/bcma/driver_mips.c
浏览文件 @
73e4dbe4
...
...
@@ -14,11 +14,33 @@
#include <linux/bcma/bcma.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/serial_reg.h>
#include <linux/time.h>
static
const
char
*
part_probes
[]
=
{
"bcm47xxpart"
,
NULL
};
static
struct
physmap_flash_data
bcma_pflash_data
=
{
.
part_probe_types
=
part_probes
,
};
static
struct
resource
bcma_pflash_resource
=
{
.
name
=
"bcma_pflash"
,
.
flags
=
IORESOURCE_MEM
,
};
struct
platform_device
bcma_pflash_dev
=
{
.
name
=
"physmap-flash"
,
.
dev
=
{
.
platform_data
=
&
bcma_pflash_data
,
},
.
resource
=
&
bcma_pflash_resource
,
.
num_resources
=
1
,
};
/* The 47162a0 hangs when reading MIPS DMP registers registers */
static
inline
bool
bcma_core_mips_bcm47162a0_quirk
(
struct
bcma_device
*
dev
)
{
...
...
@@ -211,6 +233,7 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
{
struct
bcma_bus
*
bus
=
mcore
->
core
->
bus
;
struct
bcma_drv_cc
*
cc
=
&
bus
->
drv_cc
;
struct
bcma_pflash
*
pflash
=
&
cc
->
pflash
;
switch
(
cc
->
capabilities
&
BCMA_CC_CAP_FLASHT
)
{
case
BCMA_CC_FLASHT_STSER
:
...
...
@@ -220,15 +243,20 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
break
;
case
BCMA_CC_FLASHT_PARA
:
bcma_debug
(
bus
,
"Found parallel flash
\n
"
);
cc
->
pflash
.
present
=
true
;
cc
->
pflash
.
window
=
BCMA_SOC_FLASH2
;
cc
->
pflash
.
window_size
=
BCMA_SOC_FLASH2_SZ
;
pflash
->
present
=
true
;
pflash
->
window
=
BCMA_SOC_FLASH2
;
pflash
->
window_size
=
BCMA_SOC_FLASH2_SZ
;
if
((
bcma_read32
(
cc
->
core
,
BCMA_CC_FLASH_CFG
)
&
BCMA_CC_FLASH_CFG_DS
)
==
0
)
cc
->
pflash
.
buswidth
=
1
;
pflash
->
buswidth
=
1
;
else
cc
->
pflash
.
buswidth
=
2
;
pflash
->
buswidth
=
2
;
bcma_pflash_data
.
width
=
pflash
->
buswidth
;
bcma_pflash_resource
.
start
=
pflash
->
window
;
bcma_pflash_resource
.
end
=
pflash
->
window
+
pflash
->
window_size
;
break
;
default:
bcma_err
(
bus
,
"Flash type not supported
\n
"
);
...
...
drivers/bcma/main.c
浏览文件 @
73e4dbe4
...
...
@@ -149,6 +149,14 @@ static int bcma_register_cores(struct bcma_bus *bus)
dev_id
++
;
}
#ifdef CONFIG_BCMA_DRIVER_MIPS
if
(
bus
->
drv_cc
.
pflash
.
present
)
{
err
=
platform_device_register
(
&
bcma_pflash_dev
);
if
(
err
)
bcma_err
(
bus
,
"Error registering parallel flash
\n
"
);
}
#endif
#ifdef CONFIG_BCMA_SFLASH
if
(
bus
->
drv_cc
.
sflash
.
present
)
{
err
=
platform_device_register
(
&
bcma_sflash_dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录