Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
onenand_sim.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/onenand.h>
#include <linux/io.h>

Go to the source code of this file.

Data Structures

struct  onenand_flash
 
struct  onenand_info
 

Macros

#define CONFIG_ONENAND_SIM_MANUFACTURER   0xec
 
#define CONFIG_ONENAND_SIM_DEVICE_ID   0x04
 
#define CONFIG_FLEXONENAND   ((CONFIG_ONENAND_SIM_DEVICE_ID >> 9) & 1)
 
#define CONFIG_ONENAND_SIM_VERSION_ID   0x1e
 
#define CONFIG_ONENAND_SIM_TECHNOLOGY_ID   CONFIG_FLEXONENAND
 
#define CONFIG_FLEXONENAND_SIM_DIE0_BOUNDARY   0x01
 
#define CONFIG_FLEXONENAND_SIM_DIE1_BOUNDARY   0x01
 
#define ONENAND_CORE(flash)   (flash->data)
 
#define ONENAND_CORE_SPARE(flash, this, offset)   ((flash->data) + (this->chipsize) + (offset >> 5))
 
#define ONENAND_MAIN_AREA(this, offset)   (this->base + ONENAND_DATARAM + offset)
 
#define ONENAND_SPARE_AREA(this, offset)   (this->base + ONENAND_SPARERAM + offset)
 
#define ONENAND_GET_WP_STATUS(this)   (readw(this->base + ONENAND_REG_WP_STATUS))
 
#define ONENAND_SET_WP_STATUS(v, this)   (writew(v, this->base + ONENAND_REG_WP_STATUS))
 
#define MAX_ONENAND_PAGESIZE   (4096 + 128)
 
#define PARTITION_NAME   "OneNAND simulator partition"
 
#define DPRINTK(format, args...)
 

Functions

 module_init (onenand_sim_init)
 
 module_exit (onenand_sim_exit)
 
 MODULE_AUTHOR ("Kyungmin Park <[email protected]>")
 
 MODULE_DESCRIPTION ("The OneNAND flash simulator")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CONFIG_FLEXONENAND   ((CONFIG_ONENAND_SIM_DEVICE_ID >> 9) & 1)

Definition at line 37 of file onenand_sim.c.

#define CONFIG_FLEXONENAND_SIM_DIE0_BOUNDARY   0x01

Definition at line 49 of file onenand_sim.c.

#define CONFIG_FLEXONENAND_SIM_DIE1_BOUNDARY   0x01

Definition at line 53 of file onenand_sim.c.

#define CONFIG_ONENAND_SIM_DEVICE_ID   0x04

Definition at line 34 of file onenand_sim.c.

#define CONFIG_ONENAND_SIM_MANUFACTURER   0xec

Definition at line 30 of file onenand_sim.c.

#define CONFIG_ONENAND_SIM_TECHNOLOGY_ID   CONFIG_FLEXONENAND

Definition at line 44 of file onenand_sim.c.

#define CONFIG_ONENAND_SIM_VERSION_ID   0x1e

Definition at line 40 of file onenand_sim.c.

#define DPRINTK (   format,
  args... 
)
Value:
do { \
printk(KERN_DEBUG "%s[%d]: " format "\n", __func__, \
__LINE__, ##args); \
} while (0)

Definition at line 116 of file onenand_sim.c.

#define MAX_ONENAND_PAGESIZE   (4096 + 128)

Definition at line 87 of file onenand_sim.c.

#define ONENAND_CORE (   flash)    (flash->data)

Definition at line 70 of file onenand_sim.c.

#define ONENAND_CORE_SPARE (   flash,
  this,
  offset 
)    ((flash->data) + (this->chipsize) + (offset >> 5))

Definition at line 71 of file onenand_sim.c.

#define ONENAND_GET_WP_STATUS (   this)    (readw(this->base + ONENAND_REG_WP_STATUS))

Definition at line 80 of file onenand_sim.c.

#define ONENAND_MAIN_AREA (   this,
  offset 
)    (this->base + ONENAND_DATARAM + offset)

Definition at line 74 of file onenand_sim.c.

#define ONENAND_SET_WP_STATUS (   v,
  this 
)    (writew(v, this->base + ONENAND_REG_WP_STATUS))

Definition at line 83 of file onenand_sim.c.

#define ONENAND_SPARE_AREA (   this,
  offset 
)    (this->base + ONENAND_SPARERAM + offset)

Definition at line 77 of file onenand_sim.c.

#define PARTITION_NAME   "OneNAND simulator partition"

Definition at line 93 of file onenand_sim.c.

Function Documentation

MODULE_AUTHOR ( "Kyungmin Park <[email protected]>"  )
MODULE_DESCRIPTION ( "The OneNAND flash simulator"  )
module_exit ( onenand_sim_exit  )
module_init ( onenand_sim_init  )
MODULE_LICENSE ( "GPL"  )