Linux 下 Nand Flash 驱动主要数据结构说明
s3c2410 专有数据结构
- s3c2410_nand_set
struct s3c2410_nand_set {
int nr_chips; /* 芯片的数目 */
int nr_partitions; /* 分区的数目 */
char *name; /* 集合名称 */
int nr_map; /* 可选, 底层逻辑到物理的芯片数目 */ struct mtd_partition partitions; /* 分区列表 */
};
- s3c2410_platform_and
struct s3c2410_platform_nand {
/* timing information for controller, all times in nanoseconds */
int tacls; /* 从 CLE/ALE 有效到 nWE/nOE 的时间 */ int twrph0; /* nWE/nOE 的有效时间 */
int twrph1; /* 从释放 CLE/ALE 到 nWE/nOE 不活动的时间 */
int nr_sets; /* 集合数目 */
struct s3c2410_nand_set sets; /* 集合列表 */
/* 根据芯片编号选择有效集合 */
void (*select_chip)(struct s3c2410_nand_set , int chip);
};
- s3c2410_nand_mtd 在 drivers/mtd/nand/s3c2410.c 中, struct s3c2410_nand_mtd {
struct mtd_info mtd; /* MTD 信息 */
struct nand_chip chip; /* nand flash 芯片信息 */ struct s3c2410_nand_set set; /* nand flash 集合 */ struct s3c2410_nand_info *info; /* nand flash 信息 */ int scan_res;
};
- s3c2410_nand_info
struct s3c2410_nand_info {
/* mtd info */
struct nand_hw_control controller; /* 硬件控制器 */ struct s3c2410_nand_mtd *mtds; /* MTD 设备表 */ struct s3c2410_platform_nand platform; /* Nand 设备的平台 */
|
/* device info */ |
|||
|
struct device |
*device; |
/* 设备指针 */ |
|
|
struct resource |
*area; |
/* 资源指针 */ |
|
|
struct clk |
*clk; |
/* |
|
|
void iomem int |
*regs; mtd_count; |
/* 寄存器基地址(map 后的逻辑地址) */ /* |
|
|
unsigned char |
is_s3c2440; |
||
|
}; |
|||
- struct clk 在 arch/arm/machs3c2410/clock.h
中 struct clk
{
struct
list_head list; /* clock 列表结点 */ struct module *owner; /* 所属模块 */ struct
clk *parent; /* 父结点 */
const char *name; /* 名称 */
int id; /* 编号 */
atomic_t used; /* 使用者计数
*/ unsigned long rate; /*
时钟速率 */ unsigned long
ctrlbit; /* 控制位 */
int (*enable)(struct clk *, int enable);
/* Clock 打开方法 */
};
Linux 下 Nand Flash 驱动主要数据结构说明的更多相关文章
- 如何编写linux下nand flash驱动-4
2. 软件方面 如果想要在Linux下编写Nand Flash驱动,那么就先要搞清楚Linux下,关于此部分的整个框架.弄明白,系统是如何管理你的nand flash的,以及,系统都帮你做 ...
- 如何编写linux下nand flash驱动-2
[Nand Flash引脚(Pin)的说明] 图3.Nand Flash引脚功能说明 上图是常见的Nand Flash所拥有的引脚(Pin)所对应的功能,简单翻译如下: 1. I/O0 ~ ...
- Linux 下 Nand Flash 驱动说明
注册 driver_register 通过 module_init(s3c2410_nand_init);注册 Nand Flash 驱动. 在 s3c2410_nand_init ()中通过 dri ...
- 如何编写linux下nand flash驱动-1
1. 硬件特性: [Flash的硬件实现机制] Flash全名叫做Flash Memory,属于非易失性存储设备(Non-volatile Memory Device),与此相对应的是易失 ...
- 如何编写linux下nand flash驱动-3
[读(read)操作过程详解] 以最简单的read操作为例,解释如何理解时序图,以及将时序图 中的要求,转化为代码. 解释时序图之前,让我们先要搞清楚,我们要做的事情:那就是,要从nand flash ...
- 15.1 linux操作系统下nand flash驱动框架2
当我们需要在操作系统上读写普通文件的时候,总是需要一层层往下,最终到达硬件相关操作,当然底层设备大多数都是块设备 NAND FLASH就作为一个最底层的块设备. 而写驱动,就是要构建硬件与操作系统之间 ...
- Linux 下 Nand Flash 调用关系
Nand Flash 设备添加时数据结构包含关系 struct mtd_partition partition_info[] --> struct s3c2410_nand_set ...
- Smart210学习记录----nand flash驱动
[详解]如何编写Linux下Nand Flash驱动 :http://www.cnblogs.com/linux-rookie/articles/3016990.html 当读写文件请求到来的时候, ...
- 【驱动】linux系统下nand flash驱动程序框架
linux操作系统下nand flash驱动框架 当我们需要在操作系统上读写普通文件的时候,总是需要一层层往下,最终到达硬件相关操作,当然底层设备大多数都是块设备 NAND FLASH就作为一个最底层 ...
随机推荐
- 2019hdu第二场
10:签到求n!取模 #include <iostream> #include <iterator> #include <algorithm> typedef lo ...
- dcoker安装redis
一.安装 搜索镜像 #docker search redis 拉取镜像 #docker pull redis 创建redis容器 #docker run -d --name redis --resta ...
- NX二次开发-获取坐标系信息UF_CSYS_ask_csys_info
NX9+VS2012 #include <uf.h> #include <uf_csys.h> UF_initialize(); //获取WCS标识 tag_t WcsId = ...
- NX二次开发-UFUN按类型遍历名字获取Tag函数UF_OBJ_cycle_by_name_and_type
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <u ...
- NX二次开发-UFUN输入对象tag获得part名字UF_OBJ_ask_owning_part
NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_part.h> #include < ...
- POJ3436:ACM Computer Factory-最大流
目录 目录 思路: (有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 目录 题意:传送门 原题目描述在最下面. 题目真难读懂 有\(n\)台机器,每台机器有\(p\)个部分,每台机 ...
- 'ddkbuild.cmd' 不是内部或外部命令,也不是可运行的程序
转自VC错误:http://www.vcerror.com/?p=49 问题描述: 错误:'ddkbuild.cmd' 不是内部或外部命令,也不是可运行的程序 解决方法: 详细的解决方法可参考VC错误 ...
- LeetCode 627. Swap Salary (交换工资)
题目标签: 题目给了我们一个 工资表格,让我们把 男女性别对换. 这里可以利用IF, IF(condition, value_if_true, value_if_false). Java Soluti ...
- due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.jaxen.util.AncestorAxisIt
七月 31, 2019 4:39:01 下午 org.apache.catalina.startup.VersionLoggerListener log信息: Server version: Apac ...
- class1and2_tkinter之 Label & Button 标签和按钮
''' # ------------------------------------------------------------ # # 1. 使用tkinter设置一个标签 # # # 设计tk ...