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

mxc_nd2.c File Reference

Detailed Description

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

Definition in file mxc_nd2.c.

#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.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/partitions.h>
#include <asm/mach/flash.h>
#include <asm/io.h>
#include "mxc_nd2.h"
#include "nand_device_info.h"

Go to the source code of this file.


struct  mxc_mtd_s
struct  nand_info


#define DVR_VER   "3.0"
#define mxcnd_resume   NULL
#define mxcnd_suspend   NULL
#define TROP_US_DELAY   (1000 * 1000)


static void copy_spare (struct mtd_info *mtd, void *pbuf, void *pspare, int len, bool bfrom)
static u16 get_dev_status (void)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 module_exit (mxc_nd_cleanup)
 module_init (mxc_nd_init)
static int mxc_alloc_buf (void)
static int mxc_check_ecc_status (struct mtd_info *mtd)
static void mxc_do_addr_cycle (struct mtd_info *mtd, int column, int page_addr)
static void mxc_free_buf (void)
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 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 uint8_t mxc_nand_read_byte (struct mtd_info *mtd)
static u_char mxc_nand_read_byte16 (struct mtd_info *mtd)
static int mxc_nand_read_oob (struct mtd_info *mtd, struct nand_chip *chip, int page, int sndcmd)
static int mxc_nand_read_page (struct mtd_info *mtd, struct nand_chip *chip, uint8_t *buf)
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 mxc_nand_write_page (struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf)
static void __exit mxc_nd_cleanup (void)
static int __init mxc_nd_init (void)
static void mxc_nfc_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)
int nand_scan_mid (struct mtd_info *mtd)
static void nfc_memcpy (void *dest, void *src, int len)
static void send_addr (u16 addr, bool useirq)
static void send_atomic_cmd (u16 cmd, bool useirq)
static void send_cmd (struct mtd_info *mtd, u16 cmd, bool useirq)
static void send_prog_page (u8 buf_id)
static void send_read_id (void)
static void send_read_page (u8 buf_id)
static void wait_op_done (int maxRetries, bool useirq)


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 u8 * data_buf
static struct nand_info g_nandfc_info
static int g_page_mask
static int hardware_ecc = 1
static wait_queue_head_t irq_waitq
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_2k
static struct nand_ecclayout nand_hw_eccoob_4k
static struct nand_ecclayout nand_hw_eccoob_512
static void __iomem * nfc_axi_base
static struct clk * nfc_clk
static void __iomem * nfc_ip_base
static u8 num_of_interleave = 1
static u8 * oob_buf
static uint8_t scan_ff_pattern [] = { 0xff, 0xff }
static struct nand_bbt_descr smallpage_memorybased

Generated by  Doxygen 1.6.0   Back to index