Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tmio_nand.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/mfd/tmio.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  tmio_nand
 

Macros

#define CCR_COMMAND   0x04 /* w Command */
 
#define CCR_BASE   0x10 /* l NAND Flash Control Reg Base Addr */
 
#define CCR_INTP   0x3d /* b Interrupt Pin */
 
#define CCR_INTE   0x48 /* b Interrupt Enable */
 
#define CCR_EC   0x4a /* b Event Control */
 
#define CCR_ICC   0x4c /* b Internal Clock Control */
 
#define CCR_ECCC   0x5b /* b ECC Control */
 
#define CCR_NFTC   0x60 /* b NAND Flash Transaction Control */
 
#define CCR_NFM   0x61 /* b NAND Flash Monitor */
 
#define CCR_NFPSC   0x62 /* b NAND Flash Power Supply Control */
 
#define CCR_NFDC   0x63 /* b NAND Flash Detect Control */
 
#define FCR_DATA   0x00 /* bwl Data Register */
 
#define FCR_MODE   0x04 /* b Mode Register */
 
#define FCR_STATUS   0x05 /* b Status Register */
 
#define FCR_ISR   0x06 /* b Interrupt Status Register */
 
#define FCR_IMR   0x07 /* b Interrupt Mask Register */
 
#define FCR_MODE_DATA   0x94 /* Data Data_Mode */
 
#define FCR_MODE_COMMAND   0x95 /* Data Command_Mode */
 
#define FCR_MODE_ADDRESS   0x96 /* Data Address_Mode */
 
#define FCR_MODE_HWECC_CALC   0xB4 /* HW-ECC Data */
 
#define FCR_MODE_HWECC_RESULT   0xD4 /* HW-ECC Calc result Read_Mode */
 
#define FCR_MODE_HWECC_RESET   0xF4 /* HW-ECC Reset */
 
#define FCR_MODE_POWER_ON   0x0C /* Power Supply ON to SSFDC card */
 
#define FCR_MODE_POWER_OFF   0x08 /* Power Supply OFF to SSFDC card */
 
#define FCR_MODE_LED_OFF   0x00 /* LED OFF */
 
#define FCR_MODE_LED_ON   0x04 /* LED ON */
 
#define FCR_MODE_EJECT_ON   0x68 /* Ejection events active */
 
#define FCR_MODE_EJECT_OFF   0x08 /* Ejection events ignored */
 
#define FCR_MODE_LOCK   0x6C /* Lock_Mode. Eject Switch Invalid */
 
#define FCR_MODE_UNLOCK   0x0C /* UnLock_Mode. Eject Switch is valid */
 
#define FCR_MODE_CONTROLLER_ID   0x40 /* Controller ID Read */
 
#define FCR_MODE_STANDBY   0x00 /* SSFDC card Changes Standby State */
 
#define FCR_MODE_WE   0x80
 
#define FCR_MODE_ECC1   0x40
 
#define FCR_MODE_ECC0   0x20
 
#define FCR_MODE_CE   0x10
 
#define FCR_MODE_PCNT1   0x08
 
#define FCR_MODE_PCNT0   0x04
 
#define FCR_MODE_ALE   0x02
 
#define FCR_MODE_CLE   0x01
 
#define FCR_STATUS_BUSY   0x80
 
#define mtd_to_tmio(m)   container_of(m, struct tmio_nand, mtd)
 
#define tmio_suspend   NULL
 
#define tmio_resume   NULL
 

Functions

 module_platform_driver (tmio_driver)
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_AUTHOR ("Ian Molton, Dirk Opfer, Chris Humbert, Dmitry Baryshkov")
 
 MODULE_DESCRIPTION ("NAND flash driver on Toshiba Mobile IO controller")
 
 MODULE_ALIAS ("platform:tmio-nand")
 

Macro Definition Documentation

#define CCR_BASE   0x10 /* l NAND Flash Control Reg Base Addr */

Definition at line 48 of file tmio_nand.c.

#define CCR_COMMAND   0x04 /* w Command */

Definition at line 47 of file tmio_nand.c.

#define CCR_EC   0x4a /* b Event Control */

Definition at line 51 of file tmio_nand.c.

#define CCR_ECCC   0x5b /* b ECC Control */

Definition at line 53 of file tmio_nand.c.

#define CCR_ICC   0x4c /* b Internal Clock Control */

Definition at line 52 of file tmio_nand.c.

#define CCR_INTE   0x48 /* b Interrupt Enable */

Definition at line 50 of file tmio_nand.c.

#define CCR_INTP   0x3d /* b Interrupt Pin */

Definition at line 49 of file tmio_nand.c.

#define CCR_NFDC   0x63 /* b NAND Flash Detect Control */

Definition at line 57 of file tmio_nand.c.

#define CCR_NFM   0x61 /* b NAND Flash Monitor */

Definition at line 55 of file tmio_nand.c.

#define CCR_NFPSC   0x62 /* b NAND Flash Power Supply Control */

Definition at line 56 of file tmio_nand.c.

#define CCR_NFTC   0x60 /* b NAND Flash Transaction Control */

Definition at line 54 of file tmio_nand.c.

#define FCR_DATA   0x00 /* bwl Data Register */

Definition at line 62 of file tmio_nand.c.

#define FCR_IMR   0x07 /* b Interrupt Mask Register */

Definition at line 66 of file tmio_nand.c.

#define FCR_ISR   0x06 /* b Interrupt Status Register */

Definition at line 65 of file tmio_nand.c.

#define FCR_MODE   0x04 /* b Mode Register */

Definition at line 63 of file tmio_nand.c.

#define FCR_MODE_ADDRESS   0x96 /* Data Address_Mode */

Definition at line 71 of file tmio_nand.c.

#define FCR_MODE_ALE   0x02

Definition at line 98 of file tmio_nand.c.

#define FCR_MODE_CE   0x10

Definition at line 95 of file tmio_nand.c.

#define FCR_MODE_CLE   0x01

Definition at line 99 of file tmio_nand.c.

#define FCR_MODE_COMMAND   0x95 /* Data Command_Mode */

Definition at line 70 of file tmio_nand.c.

#define FCR_MODE_CONTROLLER_ID   0x40 /* Controller ID Read */

Definition at line 89 of file tmio_nand.c.

#define FCR_MODE_DATA   0x94 /* Data Data_Mode */

Definition at line 69 of file tmio_nand.c.

#define FCR_MODE_ECC0   0x20

Definition at line 94 of file tmio_nand.c.

#define FCR_MODE_ECC1   0x40

Definition at line 93 of file tmio_nand.c.

#define FCR_MODE_EJECT_OFF   0x08 /* Ejection events ignored */

Definition at line 84 of file tmio_nand.c.

#define FCR_MODE_EJECT_ON   0x68 /* Ejection events active */

Definition at line 83 of file tmio_nand.c.

#define FCR_MODE_HWECC_CALC   0xB4 /* HW-ECC Data */

Definition at line 73 of file tmio_nand.c.

#define FCR_MODE_HWECC_RESET   0xF4 /* HW-ECC Reset */

Definition at line 75 of file tmio_nand.c.

#define FCR_MODE_HWECC_RESULT   0xD4 /* HW-ECC Calc result Read_Mode */

Definition at line 74 of file tmio_nand.c.

#define FCR_MODE_LED_OFF   0x00 /* LED OFF */

Definition at line 80 of file tmio_nand.c.

#define FCR_MODE_LED_ON   0x04 /* LED ON */

Definition at line 81 of file tmio_nand.c.

#define FCR_MODE_LOCK   0x6C /* Lock_Mode. Eject Switch Invalid */

Definition at line 86 of file tmio_nand.c.

#define FCR_MODE_PCNT0   0x04

Definition at line 97 of file tmio_nand.c.

#define FCR_MODE_PCNT1   0x08

Definition at line 96 of file tmio_nand.c.

#define FCR_MODE_POWER_OFF   0x08 /* Power Supply OFF to SSFDC card */

Definition at line 78 of file tmio_nand.c.

#define FCR_MODE_POWER_ON   0x0C /* Power Supply ON to SSFDC card */

Definition at line 77 of file tmio_nand.c.

#define FCR_MODE_STANDBY   0x00 /* SSFDC card Changes Standby State */

Definition at line 90 of file tmio_nand.c.

#define FCR_MODE_UNLOCK   0x0C /* UnLock_Mode. Eject Switch is valid */

Definition at line 87 of file tmio_nand.c.

#define FCR_MODE_WE   0x80

Definition at line 92 of file tmio_nand.c.

#define FCR_STATUS   0x05 /* b Status Register */

Definition at line 64 of file tmio_nand.c.

#define FCR_STATUS_BUSY   0x80

Definition at line 101 of file tmio_nand.c.

#define mtd_to_tmio (   m)    container_of(m, struct tmio_nand, mtd)

Definition at line 122 of file tmio_nand.c.

#define tmio_resume   NULL

Definition at line 512 of file tmio_nand.c.

#define tmio_suspend   NULL

Definition at line 511 of file tmio_nand.c.

Function Documentation

MODULE_ALIAS ( "platform:tmio-nand"  )
MODULE_AUTHOR ( "Ian  Molton,
Dirk  Opfer,
Chris  Humbert,
Dmitry Baryshkov"   
)
MODULE_DESCRIPTION ( "NAND flash driver on Toshiba Mobile IO controller )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( tmio_driver  )