Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

mxc_nd.c File Reference


Detailed Description

This file contains the hardware specific layer for NAND Flash on MXC processor.

Definition in file mxc_nd.c.

#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <asm/io.h>
#include <asm/mach/flash.h>
#include "mxc_nd.h"

Go to the source code of this file.

Classes

struct  mxc_mtd_s
struct  nand_info

Defines

#define BITPOS(x)   ((x) & 0xf)
#define COLPOS(x)   ((x) >> 4)
#define DVR_VER   "2.1"
#define MAIN_SINGLEBIT_ERROR   0x4
#define mxcnd_resume   NULL
#define mxcnd_suspend   NULL
#define SPARE_SINGLEBIT_ERROR   0x1
#define TROP_US_DELAY   2000

Functions

static u16 get_dev_status (void)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("MXC NAND MTD driver")
 module_exit (mxc_nd_cleanup)
 module_init (mxc_nd_init)
 MODULE_LICENSE ("GPL")
static int mxc_nand_calculate_ecc (struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
static void mxc_nand_command (struct mtd_info *mtd, unsigned command, int column, int page_addr)
static int mxc_nand_correct_data (struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)
static int mxc_nand_dev_ready (struct mtd_info *mtd)
static void mxc_nand_enable_hwecc (struct mtd_info *mtd, int mode)
static void mxc_nand_read_buf (struct mtd_info *mtd, u_char *buf, int len)
static u_char mxc_nand_read_byte (struct mtd_info *mtd)
static u16 mxc_nand_read_word (struct mtd_info *mtd)
static int mxc_nand_scan_bbt (struct mtd_info *mtd)
static void mxc_nand_select_chip (struct mtd_info *mtd, int chip)
static int mxc_nand_verify_buf (struct mtd_info *mtd, const u_char *buf, int len)
static void mxc_nand_write_buf (struct mtd_info *mtd, const u_char *buf, int len)
static void __exit mxc_nd_cleanup (void)
static void mxc_nd_correct_ecc (u8 buf_id, bool spare)
static void mxc_nd_correct_error (u8 buf_id, u16 eccpos, bool bSpareOnly)
static int __init mxc_nd_init (void)
static irqreturn_t mxc_nfc_irq (int irq, void *dev_id)
static int __init mxcnd_probe (struct platform_device *pdev)
static int __exit mxcnd_remove (struct platform_device *pdev)
static void send_addr (u16 addr, bool islast)
static void send_cmd (u16 cmd, bool useirq)
static void send_prog_page (u8 buf_id, bool bSpareOnly)
static void send_read_id (void)
static void send_read_page (u8 buf_id, bool bSpareOnly)
static void wait_op_done (int maxRetries, u16 param, bool useirq)

Variables

static struct nand_bbt_descr bbt_main_descr
static struct nand_bbt_descr bbt_mirror_descr
static uint8_t bbt_pattern [] = { 'B', 'b', 't', '0' }
static int Ecc_disabled
static struct nand_info g_nandfc_info
static int hardware_ecc = 1
static wait_queue_head_t irq_waitq
static int is2k_Pagesize = 0
static struct nand_bbt_descr largepage_memorybased
static uint8_t mirror_pattern [] = { '1', 't', 'b', 'B' }
static struct mxc_mtd_s * mxc_nand_data
static struct platform_driver mxcnd_driver
static struct nand_ecclayout nand_hw_eccoob_16
static struct nand_ecclayout nand_hw_eccoob_2k
static struct nand_ecclayout nand_hw_eccoob_8
static struct clk * nfc_clk
static uint8_t scan_ff_pattern [] = { 0xff, 0xff }
static struct nand_bbt_descr smallpage_memorybased


Generated by  Doxygen 1.6.0   Back to index