#include <linux/device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/rslib.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/io.h>
Go to the source code of this file.
|
| module_param (usedma, int, 0644) |
|
| module_param (skipbbt, int, 0644) |
|
| module_param (debug, int, 0644) |
|
| module_param (regdebug, int, 0644) |
|
| module_param (checkecc, int, 0644) |
|
| module_param_array (timing, int,&numtimings, 0644) |
|
| MODULE_DEVICE_TABLE (pci, cafe_nand_tbl) |
|
| module_pci_driver (cafe_nand_pci_driver) |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_AUTHOR ("David Woodhouse <[email protected]>") |
|
| MODULE_DESCRIPTION ("NAND flash driver for OLPC CAFÉ chip") |
|
#define CAFE_GLOBAL_CTRL 0x3004 |
#define CAFE_GLOBAL_IRQ 0x3008 |
#define CAFE_GLOBAL_IRQ_MASK 0x300c |
#define CAFE_NAND_ADDR1 0x1c |
#define CAFE_NAND_ADDR2 0x20 |
#define CAFE_NAND_CTRL1 0x00 |
#define CAFE_NAND_CTRL2 0x04 |
#define CAFE_NAND_CTRL3 0x08 |
#define CAFE_NAND_DATA_LEN 0x18 |
#define CAFE_NAND_DMA_ADDR0 0x44 |
#define CAFE_NAND_DMA_ADDR1 0x48 |
#define CAFE_NAND_DMA_CTRL 0x40 |
#define CAFE_NAND_ECC_RESULT 0x3C |
#define CAFE_NAND_ECC_SYN01 0x50 |
#define CAFE_NAND_ECC_SYN23 0x54 |
#define CAFE_NAND_ECC_SYN45 0x58 |
#define CAFE_NAND_ECC_SYN67 0x5c |
#define CAFE_NAND_IRQ 0x10 |
#define CAFE_NAND_IRQ_MASK 0x14 |
#define CAFE_NAND_NONMEM 0x30 |
#define CAFE_NAND_READ_DATA 0x1000 |
#define CAFE_NAND_RESET 0x3034 |
#define CAFE_NAND_STATUS 0x0c |
#define CAFE_NAND_TIMING1 0x24 |
#define CAFE_NAND_TIMING2 0x28 |
#define CAFE_NAND_TIMING3 0x2c |
#define CAFE_NAND_WRITE_DATA 0x2000 |
#define cafe_readl |
( |
|
cafe, |
|
|
|
addr |
|
) |
| readl((cafe)->mmio + CAFE_##addr) |
#define cafe_writel |
( |
|
cafe, |
|
|
|
datum, |
|
|
|
addr |
|
) |
| writel(datum, (cafe)->mmio + CAFE_##addr) |
#define CTRL1_CHIPSELECT (1<<19) |
MODULE_DEVICE_TABLE |
( |
pci |
, |
|
|
cafe_nand_tbl |
|
|
) |
| |
module_param |
( |
usedma |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
skipbbt |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
regdebug |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
checkecc |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param_array |
( |
timing |
, |
|
|
int |
, |
|
|
& |
numtimings, |
|
|
0644 |
|
|
) |
| |
module_pci_driver |
( |
cafe_nand_pci_driver |
| ) |
|