Linux Kernel
3.7.1
|
#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/mtd/partitions.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/completion.h>
#include <linux/of_device.h>
#include <linux/of_mtd.h>
#include <asm/mach/flash.h>
#include <linux/platform_data/mtd-mxc_nand.h>
#include <mach/hardware.h>
Go to the source code of this file.
Data Structures | |
struct | mxc_nand_devtype_data |
struct | mxc_nand_host |
Functions | |
module_platform_driver (mxcnd_driver) | |
MODULE_AUTHOR ("Freescale Semiconductor, Inc.") | |
MODULE_DESCRIPTION ("MXC NAND MTD driver") | |
MODULE_LICENSE ("GPL") | |
#define DRIVER_NAME "mxc_nand" |
Definition at line 42 of file mxc_nand.c.
#define NFC_ADDR (1 << 1) |
Definition at line 91 of file mxc_nand.c.
#define NFC_CMD (1 << 0) |
Definition at line 90 of file mxc_nand.c.
#define NFC_ID (1 << 4) |
Definition at line 94 of file mxc_nand.c.
#define NFC_INPUT (1 << 2) |
Definition at line 92 of file mxc_nand.c.
#define nfc_is_v1 | ( | ) | (cpu_is_mx31() || cpu_is_mx27() || cpu_is_mx21()) |
Definition at line 45 of file mxc_nand.c.
#define nfc_is_v21 | ( | ) | (cpu_is_mx25() || cpu_is_mx35()) |
Definition at line 44 of file mxc_nand.c.
#define nfc_is_v3_2a | ( | ) | cpu_is_mx51() |
Definition at line 46 of file mxc_nand.c.
#define nfc_is_v3_2b | ( | ) | cpu_is_mx53() |
Definition at line 47 of file mxc_nand.c.
#define NFC_OUTPUT (1 << 3) |
Definition at line 93 of file mxc_nand.c.
#define NFC_STATUS (1 << 5) |
Definition at line 95 of file mxc_nand.c.
Definition at line 60 of file mxc_nand.c.
Definition at line 59 of file mxc_nand.c.
Definition at line 51 of file mxc_nand.c.
Definition at line 50 of file mxc_nand.c.
Definition at line 54 of file mxc_nand.c.
Definition at line 70 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_BIG (1 << 5) |
Definition at line 77 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_CE (1 << 7) |
Definition at line 79 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_ECC_EN (1 << 3) |
Definition at line 75 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_INT_MSK (1 << 4) |
Definition at line 76 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_RST (1 << 6) |
Definition at line 78 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG1_SP_EN (1 << 2) |
Definition at line 74 of file mxc_nand.c.
Definition at line 71 of file mxc_nand.c.
#define NFC_V1_V2_CONFIG2_INT (1 << 15) |
Definition at line 84 of file mxc_nand.c.
Definition at line 55 of file mxc_nand.c.
Definition at line 52 of file mxc_nand.c.
Definition at line 53 of file mxc_nand.c.
Definition at line 69 of file mxc_nand.c.
Definition at line 56 of file mxc_nand.c.
Definition at line 57 of file mxc_nand.c.
Definition at line 58 of file mxc_nand.c.
Definition at line 65 of file mxc_nand.c.
Definition at line 66 of file mxc_nand.c.
Definition at line 67 of file mxc_nand.c.
Definition at line 68 of file mxc_nand.c.
Definition at line 61 of file mxc_nand.c.
Definition at line 62 of file mxc_nand.c.
Definition at line 63 of file mxc_nand.c.
Definition at line 64 of file mxc_nand.c.
#define NFC_V2_CONFIG1_ECC_MODE_4 (1 << 0) |
Definition at line 73 of file mxc_nand.c.
#define NFC_V2_CONFIG1_FP_INT (1 << 11) |
Definition at line 82 of file mxc_nand.c.
#define NFC_V2_CONFIG1_ONE_CYCLE (1 << 8) |
Definition at line 80 of file mxc_nand.c.
Definition at line 81 of file mxc_nand.c.
#define NFC_V3_CONFIG1 (host->regs_axi + 0x34) |
Definition at line 100 of file mxc_nand.c.
Definition at line 102 of file mxc_nand.c.
#define NFC_V3_CONFIG1_SP_EN (1 << 0) |
Definition at line 101 of file mxc_nand.c.
#define NFC_V3_CONFIG2 (host->regs_ip + 0x24) |
Definition at line 116 of file mxc_nand.c.
#define NFC_V3_CONFIG2_2CMD_PHASES (1 << 4) |
Definition at line 122 of file mxc_nand.c.
#define NFC_V3_CONFIG2_ECC_EN (1 << 3) |
Definition at line 121 of file mxc_nand.c.
#define NFC_V3_CONFIG2_ECC_MODE_8 (1 << 6) |
Definition at line 124 of file mxc_nand.c.
#define NFC_V3_CONFIG2_INT_MSK (1 << 15) |
Definition at line 127 of file mxc_nand.c.
#define NFC_V3_CONFIG2_NUM_ADDR_PHASE0 (1 << 5) |
Definition at line 123 of file mxc_nand.c.
Definition at line 126 of file mxc_nand.c.
#define NFC_V3_CONFIG2_ONE_CYCLE (1 << 2) |
Definition at line 120 of file mxc_nand.c.
Definition at line 125 of file mxc_nand.c.
#define NFC_V3_CONFIG2_PS_2048 (1 << 0) |
Definition at line 118 of file mxc_nand.c.
#define NFC_V3_CONFIG2_PS_4096 (2 << 0) |
Definition at line 119 of file mxc_nand.c.
#define NFC_V3_CONFIG2_PS_512 (0 << 0) |
Definition at line 117 of file mxc_nand.c.
Definition at line 129 of file mxc_nand.c.
Definition at line 128 of file mxc_nand.c.
#define NFC_V3_CONFIG3 (host->regs_ip + 0x28) |
Definition at line 131 of file mxc_nand.c.
Definition at line 132 of file mxc_nand.c.
#define NFC_V3_CONFIG3_FW8 (1 << 3) |
Definition at line 133 of file mxc_nand.c.
#define NFC_V3_CONFIG3_NO_SDMA (1 << 20) |
Definition at line 137 of file mxc_nand.c.
Definition at line 135 of file mxc_nand.c.
#define NFC_V3_CONFIG3_RBB_MODE (1 << 15) |
Definition at line 136 of file mxc_nand.c.
Definition at line 134 of file mxc_nand.c.
#define NFC_V3_DELAY_LINE (host->regs_ip + 0x34) |
Definition at line 143 of file mxc_nand.c.
#define NFC_V3_ECC_STATUS_RESULT (host->regs_axi + 0x38) |
Definition at line 104 of file mxc_nand.c.
#define NFC_V3_FLASH_ADDR0 (host->regs_axi + 0x04) |
Definition at line 98 of file mxc_nand.c.
#define NFC_V3_FLASH_CMD (host->regs_axi + 0x00) |
Definition at line 97 of file mxc_nand.c.
#define NFC_V3_IPC (host->regs_ip + 0x2C) |
Definition at line 139 of file mxc_nand.c.
#define NFC_V3_IPC_CREQ (1 << 0) |
Definition at line 140 of file mxc_nand.c.
#define NFC_V3_IPC_INT (1 << 31) |
Definition at line 141 of file mxc_nand.c.
#define NFC_V3_LAUNCH (host->regs_axi + 0x40) |
Definition at line 106 of file mxc_nand.c.
#define NFC_V3_WRPROT (host->regs_ip + 0x0) |
Definition at line 108 of file mxc_nand.c.
#define NFC_V3_WRPROT_BLS_UNLOCK (2 << 6) |
Definition at line 112 of file mxc_nand.c.
#define NFC_V3_WRPROT_LOCK (1 << 1) |
Definition at line 110 of file mxc_nand.c.
#define NFC_V3_WRPROT_LOCK_TIGHT (1 << 0) |
Definition at line 109 of file mxc_nand.c.
#define NFC_V3_WRPROT_UNLOCK (1 << 2) |
Definition at line 111 of file mxc_nand.c.
#define NFC_V3_WRPROT_UNLOCK_BLK_ADD0 (host->regs_ip + 0x04) |
Definition at line 114 of file mxc_nand.c.
MODULE_AUTHOR | ( | "Freescale | Semiconductor, |
Inc." | |||
) |
MODULE_DESCRIPTION | ( | "MXC NAND MTD driver" | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_platform_driver | ( | mxcnd_driver | ) |