Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/gfp.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <asm/mpc5121.h>
Go to the source code of this file.
Data Structures | |
struct | mpc5121_nfc_prv |
Macros | |
#define | NFC_MAIN_AREA(n) ((n) * 0x200) |
#define | NFC_SPARE_BUFFERS 8 |
#define | NFC_SPARE_LEN 0x40 |
#define | NFC_SPARE_AREA(n) (0x1000 + ((n) * NFC_SPARE_LEN)) |
#define | NFC_BUF_ADDR 0x1E04 |
#define | NFC_FLASH_ADDR 0x1E06 |
#define | NFC_FLASH_CMD 0x1E08 |
#define | NFC_CONFIG 0x1E0A |
#define | NFC_ECC_STATUS1 0x1E0C |
#define | NFC_ECC_STATUS2 0x1E0E |
#define | NFC_SPAS 0x1E10 |
#define | NFC_WRPROT 0x1E12 |
#define | NFC_NF_WRPRST 0x1E18 |
#define | NFC_CONFIG1 0x1E1A |
#define | NFC_CONFIG2 0x1E1C |
#define | NFC_UNLOCKSTART_BLK0 0x1E20 |
#define | NFC_UNLOCKEND_BLK0 0x1E22 |
#define | NFC_UNLOCKSTART_BLK1 0x1E24 |
#define | NFC_UNLOCKEND_BLK1 0x1E26 |
#define | NFC_UNLOCKSTART_BLK2 0x1E28 |
#define | NFC_UNLOCKEND_BLK2 0x1E2A |
#define | NFC_UNLOCKSTART_BLK3 0x1E2C |
#define | NFC_UNLOCKEND_BLK3 0x1E2E |
#define | NFC_RBA_MASK (7 << 0) |
#define | NFC_ACTIVE_CS_SHIFT 5 |
#define | NFC_ACTIVE_CS_MASK (3 << NFC_ACTIVE_CS_SHIFT) |
#define | NFC_BLS_UNLOCKED (1 << 1) |
#define | NFC_ECC_4BIT (1 << 0) |
#define | NFC_FULL_PAGE_DMA (1 << 1) |
#define | NFC_SPARE_ONLY (1 << 2) |
#define | NFC_ECC_ENABLE (1 << 3) |
#define | NFC_INT_MASK (1 << 4) |
#define | NFC_BIG_ENDIAN (1 << 5) |
#define | NFC_RESET (1 << 6) |
#define | NFC_CE (1 << 7) |
#define | NFC_ONE_CYCLE (1 << 8) |
#define | NFC_PPB_32 (0 << 9) |
#define | NFC_PPB_64 (1 << 9) |
#define | NFC_PPB_128 (2 << 9) |
#define | NFC_PPB_256 (3 << 9) |
#define | NFC_PPB_MASK (3 << 9) |
#define | NFC_FULL_PAGE_INT (1 << 11) |
#define | NFC_COMMAND (1 << 0) |
#define | NFC_ADDRESS (1 << 1) |
#define | NFC_INPUT (1 << 2) |
#define | NFC_OUTPUT (1 << 3) |
#define | NFC_ID (1 << 4) |
#define | NFC_STATUS (1 << 5) |
#define | NFC_CMD_FAIL (1 << 15) |
#define | NFC_INT (1 << 15) |
#define | NFC_WPC_LOCK_TIGHT (1 << 0) |
#define | NFC_WPC_LOCK (1 << 1) |
#define | NFC_WPC_UNLOCK (1 << 2) |
#define | DRV_NAME "mpc5121_nfc" |
#define | NFC_RESET_TIMEOUT 1000 /* 1 ms */ |
#define | NFC_TIMEOUT (HZ / 10) /* 1/10 s */ |
Functions | |
module_platform_driver (mpc5121_nfc_driver) | |
MODULE_AUTHOR ("Freescale Semiconductor, Inc.") | |
MODULE_DESCRIPTION ("MPC5121 NAND MTD driver") | |
MODULE_LICENSE ("GPL") | |
#define DRV_NAME "mpc5121_nfc" |
Definition at line 113 of file mpc5121_nfc.c.
#define NFC_ACTIVE_CS_MASK (3 << NFC_ACTIVE_CS_SHIFT) |
Definition at line 76 of file mpc5121_nfc.c.
#define NFC_ACTIVE_CS_SHIFT 5 |
Definition at line 75 of file mpc5121_nfc.c.
#define NFC_ADDRESS (1 << 1) |
Definition at line 100 of file mpc5121_nfc.c.
#define NFC_BIG_ENDIAN (1 << 5) |
Definition at line 87 of file mpc5121_nfc.c.
#define NFC_BLS_UNLOCKED (1 << 1) |
Definition at line 79 of file mpc5121_nfc.c.
#define NFC_BUF_ADDR 0x1E04 |
Definition at line 53 of file mpc5121_nfc.c.
#define NFC_CE (1 << 7) |
Definition at line 89 of file mpc5121_nfc.c.
#define NFC_CMD_FAIL (1 << 15) |
Definition at line 105 of file mpc5121_nfc.c.
#define NFC_COMMAND (1 << 0) |
Definition at line 99 of file mpc5121_nfc.c.
#define NFC_CONFIG 0x1E0A |
Definition at line 56 of file mpc5121_nfc.c.
#define NFC_CONFIG1 0x1E1A |
Definition at line 62 of file mpc5121_nfc.c.
#define NFC_CONFIG2 0x1E1C |
Definition at line 63 of file mpc5121_nfc.c.
#define NFC_ECC_4BIT (1 << 0) |
Definition at line 82 of file mpc5121_nfc.c.
#define NFC_ECC_ENABLE (1 << 3) |
Definition at line 85 of file mpc5121_nfc.c.
#define NFC_ECC_STATUS1 0x1E0C |
Definition at line 57 of file mpc5121_nfc.c.
#define NFC_ECC_STATUS2 0x1E0E |
Definition at line 58 of file mpc5121_nfc.c.
#define NFC_FLASH_ADDR 0x1E06 |
Definition at line 54 of file mpc5121_nfc.c.
#define NFC_FLASH_CMD 0x1E08 |
Definition at line 55 of file mpc5121_nfc.c.
#define NFC_FULL_PAGE_DMA (1 << 1) |
Definition at line 83 of file mpc5121_nfc.c.
#define NFC_FULL_PAGE_INT (1 << 11) |
Definition at line 96 of file mpc5121_nfc.c.
#define NFC_ID (1 << 4) |
Definition at line 103 of file mpc5121_nfc.c.
#define NFC_INPUT (1 << 2) |
Definition at line 101 of file mpc5121_nfc.c.
#define NFC_INT (1 << 15) |
Definition at line 106 of file mpc5121_nfc.c.
#define NFC_INT_MASK (1 << 4) |
Definition at line 86 of file mpc5121_nfc.c.
Definition at line 45 of file mpc5121_nfc.c.
#define NFC_NF_WRPRST 0x1E18 |
Definition at line 61 of file mpc5121_nfc.c.
#define NFC_ONE_CYCLE (1 << 8) |
Definition at line 90 of file mpc5121_nfc.c.
#define NFC_OUTPUT (1 << 3) |
Definition at line 102 of file mpc5121_nfc.c.
#define NFC_PPB_128 (2 << 9) |
Definition at line 93 of file mpc5121_nfc.c.
#define NFC_PPB_256 (3 << 9) |
Definition at line 94 of file mpc5121_nfc.c.
#define NFC_PPB_32 (0 << 9) |
Definition at line 91 of file mpc5121_nfc.c.
#define NFC_PPB_64 (1 << 9) |
Definition at line 92 of file mpc5121_nfc.c.
#define NFC_PPB_MASK (3 << 9) |
Definition at line 95 of file mpc5121_nfc.c.
#define NFC_RBA_MASK (7 << 0) |
Definition at line 74 of file mpc5121_nfc.c.
#define NFC_RESET (1 << 6) |
Definition at line 88 of file mpc5121_nfc.c.
#define NFC_RESET_TIMEOUT 1000 /* 1 ms */ |
Definition at line 116 of file mpc5121_nfc.c.
#define NFC_SPARE_AREA | ( | n | ) | (0x1000 + ((n) * NFC_SPARE_LEN)) |
Definition at line 50 of file mpc5121_nfc.c.
#define NFC_SPARE_BUFFERS 8 |
Definition at line 48 of file mpc5121_nfc.c.
#define NFC_SPARE_LEN 0x40 |
Definition at line 49 of file mpc5121_nfc.c.
#define NFC_SPARE_ONLY (1 << 2) |
Definition at line 84 of file mpc5121_nfc.c.
#define NFC_SPAS 0x1E10 |
Definition at line 59 of file mpc5121_nfc.c.
#define NFC_STATUS (1 << 5) |
Definition at line 104 of file mpc5121_nfc.c.
Definition at line 117 of file mpc5121_nfc.c.
#define NFC_UNLOCKEND_BLK0 0x1E22 |
Definition at line 65 of file mpc5121_nfc.c.
#define NFC_UNLOCKEND_BLK1 0x1E26 |
Definition at line 67 of file mpc5121_nfc.c.
#define NFC_UNLOCKEND_BLK2 0x1E2A |
Definition at line 69 of file mpc5121_nfc.c.
#define NFC_UNLOCKEND_BLK3 0x1E2E |
Definition at line 71 of file mpc5121_nfc.c.
#define NFC_UNLOCKSTART_BLK0 0x1E20 |
Definition at line 64 of file mpc5121_nfc.c.
#define NFC_UNLOCKSTART_BLK1 0x1E24 |
Definition at line 66 of file mpc5121_nfc.c.
#define NFC_UNLOCKSTART_BLK2 0x1E28 |
Definition at line 68 of file mpc5121_nfc.c.
#define NFC_UNLOCKSTART_BLK3 0x1E2C |
Definition at line 70 of file mpc5121_nfc.c.
#define NFC_WPC_LOCK (1 << 1) |
Definition at line 110 of file mpc5121_nfc.c.
#define NFC_WPC_LOCK_TIGHT (1 << 0) |
Definition at line 109 of file mpc5121_nfc.c.
#define NFC_WPC_UNLOCK (1 << 2) |
Definition at line 111 of file mpc5121_nfc.c.
#define NFC_WRPROT 0x1E12 |
Definition at line 60 of file mpc5121_nfc.c.
MODULE_AUTHOR | ( | "Freescale | Semiconductor, |
Inc." | |||
) |
MODULE_DESCRIPTION | ( | "MPC5121 NAND MTD driver" | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_platform_driver | ( | mpc5121_nfc_driver | ) |