Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
fsmc.h File Reference
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/types.h>
#include <linux/mtd/partitions.h>
#include <asm/param.h>

Go to the source code of this file.

Data Structures

struct  fsmc_nand_eccplace
 
struct  fsmc_eccplace
 
struct  fsmc_nand_timings
 
struct  fsmc_nand_platform_data
 

Macros

#define FSMC_NAND_BW8   1
 
#define FSMC_NAND_BW16   2
 
#define FSMC_MAX_NOR_BANKS   4
 
#define FSMC_MAX_NAND_BANKS   4
 
#define FSMC_FLASH_WIDTH8   1
 
#define FSMC_FLASH_WIDTH16   2
 
#define CTRL   0x0
 
#define BANK_ENABLE   (1 << 0)
 
#define MUXED   (1 << 1)
 
#define NOR_DEV   (2 << 2)
 
#define WIDTH_8   (0 << 4)
 
#define WIDTH_16   (1 << 4)
 
#define RSTPWRDWN   (1 << 6)
 
#define WPROT   (1 << 7)
 
#define WRT_ENABLE   (1 << 12)
 
#define WAIT_ENB   (1 << 13)
 
#define CTRL_TIM   0x4
 
#define FSMC_NOR_BANK_SZ   0x8
 
#define FSMC_NOR_REG_SIZE   0x40
 
#define FSMC_NOR_REG(base, bank, reg)
 
#define PC   0x00
 
#define FSMC_RESET   (1 << 0)
 
#define FSMC_WAITON   (1 << 1)
 
#define FSMC_ENABLE   (1 << 2)
 
#define FSMC_DEVTYPE_NAND   (1 << 3)
 
#define FSMC_DEVWID_8   (0 << 4)
 
#define FSMC_DEVWID_16   (1 << 4)
 
#define FSMC_ECCEN   (1 << 6)
 
#define FSMC_ECCPLEN_512   (0 << 7)
 
#define FSMC_ECCPLEN_256   (1 << 7)
 
#define FSMC_TCLR_1   (1)
 
#define FSMC_TCLR_SHIFT   (9)
 
#define FSMC_TCLR_MASK   (0xF)
 
#define FSMC_TAR_1   (1)
 
#define FSMC_TAR_SHIFT   (13)
 
#define FSMC_TAR_MASK   (0xF)
 
#define STS   0x04
 
#define FSMC_CODE_RDY   (1 << 15)
 
#define COMM   0x08
 
#define FSMC_TSET_0   0
 
#define FSMC_TSET_SHIFT   0
 
#define FSMC_TSET_MASK   0xFF
 
#define FSMC_TWAIT_6   6
 
#define FSMC_TWAIT_SHIFT   8
 
#define FSMC_TWAIT_MASK   0xFF
 
#define FSMC_THOLD_4   4
 
#define FSMC_THOLD_SHIFT   16
 
#define FSMC_THOLD_MASK   0xFF
 
#define FSMC_THIZ_1   1
 
#define FSMC_THIZ_SHIFT   24
 
#define FSMC_THIZ_MASK   0xFF
 
#define ATTRIB   0x0C
 
#define IOATA   0x10
 
#define ECC1   0x14
 
#define ECC2   0x18
 
#define ECC3   0x1C
 
#define FSMC_NAND_BANK_SZ   0x20
 
#define FSMC_NAND_REG(base, bank, reg)
 
#define FSMC_BUSY_WAIT_TIMEOUT   (1 * HZ)
 
#define MAX_ECCPLACE_ENTRIES   32
 

Enumerations

enum  access_mode { USE_DMA_ACCESS = 1, USE_WORD_ACCESS }
 

Functions

int __init fsmc_nor_init (struct platform_device *pdev, unsigned long base, uint32_t bank, uint32_t width)
 
void __init fsmc_init_board_info (struct platform_device *pdev, struct mtd_partition *partitions, unsigned int nr_partitions, unsigned int width)
 

Macro Definition Documentation

#define ATTRIB   0x0C

Definition at line 93 of file fsmc.h.

#define BANK_ENABLE   (1 << 0)

Definition at line 38 of file fsmc.h.

#define COMM   0x08

Definition at line 79 of file fsmc.h.

#define CTRL   0x0

Definition at line 36 of file fsmc.h.

#define CTRL_TIM   0x4

Definition at line 48 of file fsmc.h.

#define ECC1   0x14

Definition at line 95 of file fsmc.h.

#define ECC2   0x18

Definition at line 96 of file fsmc.h.

#define ECC3   0x1C

Definition at line 97 of file fsmc.h.

#define FSMC_BUSY_WAIT_TIMEOUT   (1 * HZ)

Definition at line 104 of file fsmc.h.

#define FSMC_CODE_RDY   (1 << 15)

Definition at line 78 of file fsmc.h.

#define FSMC_DEVTYPE_NAND   (1 << 3)

Definition at line 64 of file fsmc.h.

#define FSMC_DEVWID_16   (1 << 4)

Definition at line 66 of file fsmc.h.

#define FSMC_DEVWID_8   (0 << 4)

Definition at line 65 of file fsmc.h.

#define FSMC_ECCEN   (1 << 6)

Definition at line 67 of file fsmc.h.

#define FSMC_ECCPLEN_256   (1 << 7)

Definition at line 69 of file fsmc.h.

#define FSMC_ECCPLEN_512   (0 << 7)

Definition at line 68 of file fsmc.h.

#define FSMC_ENABLE   (1 << 2)

Definition at line 63 of file fsmc.h.

#define FSMC_FLASH_WIDTH16   2

Definition at line 33 of file fsmc.h.

#define FSMC_FLASH_WIDTH8   1

Definition at line 32 of file fsmc.h.

#define FSMC_MAX_NAND_BANKS   4

Definition at line 30 of file fsmc.h.

#define FSMC_MAX_NOR_BANKS   4

Definition at line 29 of file fsmc.h.

#define FSMC_NAND_BANK_SZ   0x20

Definition at line 98 of file fsmc.h.

#define FSMC_NAND_BW16   2

Definition at line 27 of file fsmc.h.

#define FSMC_NAND_BW8   1

Definition at line 26 of file fsmc.h.

#define FSMC_NAND_REG (   base,
  bank,
  reg 
)
Value:

Definition at line 100 of file fsmc.h.

#define FSMC_NOR_BANK_SZ   0x8

Definition at line 51 of file fsmc.h.

#define FSMC_NOR_REG (   base,
  bank,
  reg 
)
Value:
(base + \
FSMC_NOR_BANK_SZ * (bank) + \
reg)

Definition at line 54 of file fsmc.h.

#define FSMC_NOR_REG_SIZE   0x40

Definition at line 52 of file fsmc.h.

#define FSMC_RESET   (1 << 0)

Definition at line 61 of file fsmc.h.

#define FSMC_TAR_1   (1)

Definition at line 73 of file fsmc.h.

#define FSMC_TAR_MASK   (0xF)

Definition at line 75 of file fsmc.h.

#define FSMC_TAR_SHIFT   (13)

Definition at line 74 of file fsmc.h.

#define FSMC_TCLR_1   (1)

Definition at line 70 of file fsmc.h.

#define FSMC_TCLR_MASK   (0xF)

Definition at line 72 of file fsmc.h.

#define FSMC_TCLR_SHIFT   (9)

Definition at line 71 of file fsmc.h.

#define FSMC_THIZ_1   1

Definition at line 90 of file fsmc.h.

#define FSMC_THIZ_MASK   0xFF

Definition at line 92 of file fsmc.h.

#define FSMC_THIZ_SHIFT   24

Definition at line 91 of file fsmc.h.

#define FSMC_THOLD_4   4

Definition at line 87 of file fsmc.h.

#define FSMC_THOLD_MASK   0xFF

Definition at line 89 of file fsmc.h.

#define FSMC_THOLD_SHIFT   16

Definition at line 88 of file fsmc.h.

#define FSMC_TSET_0   0

Definition at line 81 of file fsmc.h.

#define FSMC_TSET_MASK   0xFF

Definition at line 83 of file fsmc.h.

#define FSMC_TSET_SHIFT   0

Definition at line 82 of file fsmc.h.

#define FSMC_TWAIT_6   6

Definition at line 84 of file fsmc.h.

#define FSMC_TWAIT_MASK   0xFF

Definition at line 86 of file fsmc.h.

#define FSMC_TWAIT_SHIFT   8

Definition at line 85 of file fsmc.h.

#define FSMC_WAITON   (1 << 1)

Definition at line 62 of file fsmc.h.

#define IOATA   0x10

Definition at line 94 of file fsmc.h.

#define MAX_ECCPLACE_ENTRIES   32

Definition at line 113 of file fsmc.h.

#define MUXED   (1 << 1)

Definition at line 39 of file fsmc.h.

#define NOR_DEV   (2 << 2)

Definition at line 40 of file fsmc.h.

#define PC   0x00

Definition at line 59 of file fsmc.h.

#define RSTPWRDWN   (1 << 6)

Definition at line 43 of file fsmc.h.

#define STS   0x04

Definition at line 76 of file fsmc.h.

#define WAIT_ENB   (1 << 13)

Definition at line 46 of file fsmc.h.

#define WIDTH_16   (1 << 4)

Definition at line 42 of file fsmc.h.

#define WIDTH_8   (0 << 4)

Definition at line 41 of file fsmc.h.

#define WPROT   (1 << 7)

Definition at line 44 of file fsmc.h.

#define WRT_ENABLE   (1 << 12)

Definition at line 45 of file fsmc.h.

Enumeration Type Documentation

Enumerator:
USE_DMA_ACCESS 
USE_WORD_ACCESS 

Definition at line 133 of file fsmc.h.

Function Documentation

void __init fsmc_init_board_info ( struct platform_device pdev,
struct mtd_partition partitions,
unsigned int  nr_partitions,
unsigned int  width 
)
int __init fsmc_nor_init ( struct platform_device pdev,
unsigned long  base,
uint32_t  bank,
uint32_t  width 
)