zoukankan      html  css  js  c++  java
  • Linux 下 Nand Flash 驱动主要数据结构说明

    s3c2410 专有数据结构

    1. s3c2410_nand_set

    struct s3c2410_nand_set {

    int                    nr_chips;     /* 芯片的数目 */

    int                    nr_partitions; /* 分区的数目 */

    char                   *name;          /* 集合名称   */

    int                   nr_map;       /* 可选, 底层逻辑到物理的芯片数目 */ struct mtd_partition                      partitions;   /* 分区列表   */

    };

    1. 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);

    };

    1. 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;

    };

    1. 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;

    /* Nand Flash 时钟 */

    void  iomem

    int

    *regs;

    mtd_count;

    /* 寄存器基地址(map 后的逻辑地址) */

    /* MTD 的数目 */

    unsigned char

    is_s3c2440;

    };

    1. struct                                       clk 在 arch/arm/mach­s3c2410/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 打开方法 */

    };

  • 相关阅读:
    新MGDN论坛(NewMGDN.com)重新上线
    从MapGuide Enterprise 2010针对XSS的的安全补丁看.Net 编程的安全性
    Map 3D 2010 开发中的OnCheckIn事件处理
    Windows 7上开发MapGuide时的安装问题
    Maestro的最近进展
    “Sharing Position with Friends” in MGE based Web GIS Application
    预告5月28号:Autodesk MapGuide Enterprise 2011 API 新功能培训
    Improvement for “Sharing Position with Friends” in MGE based Web GIS Application
    AutoCAD Map3D 改进意见征集活动
    Windows 7 Tips! 透明缓存(transparent caching)技术
  • 原文地址:https://www.cnblogs.com/fanweisheng/p/11106197.html
Copyright © 2011-2022 走看看