Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
02d087db
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看板
提交
02d087db
编写于
6月 28, 2007
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MTD] m25p80: Use correct units for binary multiples
Signed-off-by:
N
David Woodhouse
<
dwmw2@infradead.org
>
上级
fa0a8c71
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
drivers/mtd/devices/m25p80.c
drivers/mtd/devices/m25p80.c
+9
-9
未找到文件。
drivers/mtd/devices/m25p80.c
浏览文件 @
02d087db
...
...
@@ -36,9 +36,9 @@
#define OPCODE_READ 0x03
/* Read data bytes (low frequency) */
#define OPCODE_FAST_READ 0x0b
/* Read data bytes (high frequency) */
#define OPCODE_PP 0x02
/* Page program (up to 256 bytes) */
#define OPCODE_BE_4K
0x20
/* Erase 4K
block */
#define OPCODE_BE_32K 0x52
/* Erase 32K block */
#define OPCODE_SE 0xd8
/* Sector erase (usually 64K) */
#define OPCODE_BE_4K
0x20
/* Erase 4KiB
block */
#define OPCODE_BE_32K 0x52
/* Erase 32K
iB
block */
#define OPCODE_SE 0xd8
/* Sector erase (usually 64K
iB
) */
#define OPCODE_RDID 0x9f
/* Read JEDEC ID */
/* Status Register bits. */
...
...
@@ -150,7 +150,7 @@ static int wait_till_ready(struct m25p *flash)
*/
static
int
erase_sector
(
struct
m25p
*
flash
,
u32
offset
)
{
DEBUG
(
MTD_DEBUG_LEVEL3
,
"%s: %s %dK at 0x%08x
\n
"
,
DEBUG
(
MTD_DEBUG_LEVEL3
,
"%s: %s %dK
iB
at 0x%08x
\n
"
,
flash
->
spi
->
dev
.
bus_id
,
__FUNCTION__
,
flash
->
mtd
.
erasesize
/
1024
,
offset
);
...
...
@@ -473,7 +473,7 @@ static struct flash_info __devinitdata m25p_data [] = {
{
"m25pe80"
,
0x208014
,
64
*
1024
,
16
,
},
{
"m25pe16"
,
0x208015
,
64
*
1024
,
32
,
SECT_4K
,
},
/* Winbond -- w25x "blocks" are 64K, "sectors" are 4K */
/* Winbond -- w25x "blocks" are 64K, "sectors" are 4K
iB
*/
{
"w25x10"
,
0xef3011
,
64
*
1024
,
2
,
SECT_4K
,
},
{
"w25x20"
,
0xef3012
,
64
*
1024
,
4
,
SECT_4K
,
},
{
"w25x40"
,
0xef3013
,
64
*
1024
,
8
,
SECT_4K
,
},
...
...
@@ -601,8 +601,8 @@ static int __devinit m25p_probe(struct spi_device *spi)
flash
->
mtd
.
size
/
1024
);
DEBUG
(
MTD_DEBUG_LEVEL2
,
"mtd .name = %s, .size = 0x%.8x (%uM) "
".erasesize = 0x%.8x (%uK) .numeraseregions = %d
\n
"
,
"mtd .name = %s, .size = 0x%.8x (%uM
iB
) "
".erasesize = 0x%.8x (%uK
iB
) .numeraseregions = %d
\n
"
,
flash
->
mtd
.
name
,
flash
->
mtd
.
size
,
flash
->
mtd
.
size
/
(
1024
*
1024
),
flash
->
mtd
.
erasesize
,
flash
->
mtd
.
erasesize
/
1024
,
...
...
@@ -612,7 +612,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
for
(
i
=
0
;
i
<
flash
->
mtd
.
numeraseregions
;
i
++
)
DEBUG
(
MTD_DEBUG_LEVEL2
,
"mtd.eraseregions[%d] = { .offset = 0x%.8x, "
".erasesize = 0x%.8x (%uK), "
".erasesize = 0x%.8x (%uK
iB
), "
".numblocks = %d }
\n
"
,
i
,
flash
->
mtd
.
eraseregions
[
i
].
offset
,
flash
->
mtd
.
eraseregions
[
i
].
erasesize
,
...
...
@@ -643,7 +643,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
for
(
i
=
0
;
i
<
nr_parts
;
i
++
)
{
DEBUG
(
MTD_DEBUG_LEVEL2
,
"partitions[%d] = "
"{.name = %s, .offset = 0x%.8x, "
".size = 0x%.8x (%uK) }
\n
"
,
".size = 0x%.8x (%uK
iB
) }
\n
"
,
i
,
parts
[
i
].
name
,
parts
[
i
].
offset
,
parts
[
i
].
size
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录