Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
r852.h File Reference
#include <linux/pci.h>
#include <linux/completion.h>
#include <linux/workqueue.h>
#include <linux/mtd/nand.h>
#include <linux/spinlock.h>

Go to the source code of this file.

Data Structures

struct  r852_device
 

Macros

#define R852_DATALINE   0x00
 
#define R852_CTL   0x04
 
#define R852_CTL_COMMAND   0x01 /* send command (#CLE)*/
 
#define R852_CTL_DATA   0x02 /* read/write data (#ALE)*/
 
#define R852_CTL_ON   0x04 /* only seem to controls the hd led, */
 
#define R852_CTL_RESET   0x08 /* unknown, set only on start once*/
 
#define R852_CTL_CARDENABLE   0x10 /* probably (#CE) - always set*/
 
#define R852_CTL_ECC_ENABLE   0x20 /* enable ecc engine */
 
#define R852_CTL_ECC_ACCESS   0x40 /* read/write ecc via reg #0*/
 
#define R852_CTL_WRITE   0x80 /* set when performing writes (#WP) */
 
#define R852_CARD_STA   0x05
 
#define R852_CARD_STA_CD   0x01 /* state of #CD line, same as 0x04 */
 
#define R852_CARD_STA_RO   0x02 /* card is readonly */
 
#define R852_CARD_STA_PRESENT   0x04 /* card is present (#CD) */
 
#define R852_CARD_STA_ABSENT   0x08 /* card is absent */
 
#define R852_CARD_STA_BUSY   0x80 /* card is busy - (#R/B) */
 
#define R852_CARD_IRQ_STA   0x06 /* IRQ status */
 
#define R852_CARD_IRQ_ENABLE   0x07 /* IRQ enable */
 
#define R852_CARD_IRQ_CD   0x01 /* fire when #CD lights, same as 0x04*/
 
#define R852_CARD_IRQ_REMOVE   0x04 /* detect card removal */
 
#define R852_CARD_IRQ_INSERT   0x08 /* detect card insert */
 
#define R852_CARD_IRQ_UNK1   0x10 /* unknown */
 
#define R852_CARD_IRQ_GENABLE   0x80 /* general enable */
 
#define R852_CARD_IRQ_MASK   0x1D
 
#define R852_HW   0x08
 
#define R852_HW_ENABLED   0x01 /* hw enabled */
 
#define R852_HW_UNKNOWN   0x80
 
#define R852_DMA_CAP   0x09
 
#define R852_SMBIT   0x20 /* if set with bit #6 or bit #7, then */
 
#define R852_DMA1   0x40 /* if set w/bit #7, dma is supported */
 
#define R852_DMA2   0x80 /* if set w/bit #6, dma is supported */
 
#define R852_DMA_ADDR   0x0C
 
#define R852_DMA_SETTINGS   0x10
 
#define R852_DMA_MEMORY   0x01 /* (memory <-> internal hw buffer) */
 
#define R852_DMA_READ   0x02 /* 0 = write, 1 = read */
 
#define R852_DMA_INTERNAL   0x04 /* (internal hw buffer <-> card) */
 
#define R852_DMA_IRQ_STA   0x14
 
#define R852_DMA_IRQ_ENABLE   0x18
 
#define R852_DMA_IRQ_MEMORY   0x01 /* (memory <-> internal hw buffer) */
 
#define R852_DMA_IRQ_ERROR   0x02 /* error did happen */
 
#define R852_DMA_IRQ_INTERNAL   0x04 /* (internal hw buffer <-> card) */
 
#define R852_DMA_IRQ_MASK   0x07 /* mask of all IRQ bits */
 
#define R852_ECC_ERR_BIT_MSK   0x07 /* error bit location */
 
#define R852_ECC_CORRECT   0x10 /* no errors - (guessed) */
 
#define R852_ECC_CORRECTABLE   0x20 /* correctable error exist */
 
#define R852_ECC_FAIL   0x40 /* non correctable error detected */
 
#define R852_DMA_LEN   512
 
#define DMA_INTERNAL   0
 
#define DMA_MEMORY   1
 
#define DRV_NAME   "r852"
 
#define dbg(format,...)
 
#define dbg_verbose(format,...)
 
#define message(format,...)   printk(KERN_INFO DRV_NAME ": " format "\n", ## __VA_ARGS__)
 

Macro Definition Documentation

#define dbg (   format,
  ... 
)
Value:
if (debug) \
printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)

Definition at line 151 of file r852.h.

#define dbg_verbose (   format,
  ... 
)
Value:
if (debug > 1) \
printk(KERN_DEBUG DRV_NAME ": " format "\n", ## __VA_ARGS__)

Definition at line 155 of file r852.h.

#define DMA_INTERNAL   0

Definition at line 106 of file r852.h.

#define DMA_MEMORY   1

Definition at line 107 of file r852.h.

#define DRV_NAME   "r852"

Definition at line 148 of file r852.h.

#define message (   format,
  ... 
)    printk(KERN_INFO DRV_NAME ": " format "\n", ## __VA_ARGS__)

Definition at line 160 of file r852.h.

#define R852_CARD_IRQ_CD   0x01 /* fire when #CD lights, same as 0x04*/

Definition at line 51 of file r852.h.

#define R852_CARD_IRQ_ENABLE   0x07 /* IRQ enable */

Definition at line 49 of file r852.h.

#define R852_CARD_IRQ_GENABLE   0x80 /* general enable */

Definition at line 55 of file r852.h.

#define R852_CARD_IRQ_INSERT   0x08 /* detect card insert */

Definition at line 53 of file r852.h.

#define R852_CARD_IRQ_MASK   0x1D

Definition at line 56 of file r852.h.

#define R852_CARD_IRQ_REMOVE   0x04 /* detect card removal */

Definition at line 52 of file r852.h.

#define R852_CARD_IRQ_STA   0x06 /* IRQ status */

Definition at line 48 of file r852.h.

#define R852_CARD_IRQ_UNK1   0x10 /* unknown */

Definition at line 54 of file r852.h.

#define R852_CARD_STA   0x05

Definition at line 39 of file r852.h.

#define R852_CARD_STA_ABSENT   0x08 /* card is absent */

Definition at line 44 of file r852.h.

#define R852_CARD_STA_BUSY   0x80 /* card is busy - (#R/B) */

Definition at line 45 of file r852.h.

#define R852_CARD_STA_CD   0x01 /* state of #CD line, same as 0x04 */

Definition at line 41 of file r852.h.

#define R852_CARD_STA_PRESENT   0x04 /* card is present (#CD) */

Definition at line 43 of file r852.h.

#define R852_CARD_STA_RO   0x02 /* card is readonly */

Definition at line 42 of file r852.h.

#define R852_CTL   0x04

Definition at line 27 of file r852.h.

#define R852_CTL_CARDENABLE   0x10 /* probably (#CE) - always set*/

Definition at line 33 of file r852.h.

#define R852_CTL_COMMAND   0x01 /* send command (#CLE)*/

Definition at line 28 of file r852.h.

#define R852_CTL_DATA   0x02 /* read/write data (#ALE)*/

Definition at line 29 of file r852.h.

#define R852_CTL_ECC_ACCESS   0x40 /* read/write ecc via reg #0*/

Definition at line 35 of file r852.h.

#define R852_CTL_ECC_ENABLE   0x20 /* enable ecc engine */

Definition at line 34 of file r852.h.

#define R852_CTL_ON   0x04 /* only seem to controls the hd led, */

Definition at line 30 of file r852.h.

#define R852_CTL_RESET   0x08 /* unknown, set only on start once*/

Definition at line 32 of file r852.h.

#define R852_CTL_WRITE   0x80 /* set when performing writes (#WP) */

Definition at line 36 of file r852.h.

#define R852_DATALINE   0x00

Definition at line 24 of file r852.h.

#define R852_DMA1   0x40 /* if set w/bit #7, dma is supported */

Definition at line 70 of file r852.h.

#define R852_DMA2   0x80 /* if set w/bit #6, dma is supported */

Definition at line 71 of file r852.h.

#define R852_DMA_ADDR   0x0C

Definition at line 75 of file r852.h.

#define R852_DMA_CAP   0x09

Definition at line 67 of file r852.h.

#define R852_DMA_INTERNAL   0x04 /* (internal hw buffer <-> card) */

Definition at line 82 of file r852.h.

#define R852_DMA_IRQ_ENABLE   0x18

Definition at line 88 of file r852.h.

#define R852_DMA_IRQ_ERROR   0x02 /* error did happen */

Definition at line 91 of file r852.h.

#define R852_DMA_IRQ_INTERNAL   0x04 /* (internal hw buffer <-> card) */

Definition at line 92 of file r852.h.

#define R852_DMA_IRQ_MASK   0x07 /* mask of all IRQ bits */

Definition at line 93 of file r852.h.

#define R852_DMA_IRQ_MEMORY   0x01 /* (memory <-> internal hw buffer) */

Definition at line 90 of file r852.h.

#define R852_DMA_IRQ_STA   0x14

Definition at line 85 of file r852.h.

#define R852_DMA_LEN   512

Definition at line 104 of file r852.h.

#define R852_DMA_MEMORY   0x01 /* (memory <-> internal hw buffer) */

Definition at line 80 of file r852.h.

#define R852_DMA_READ   0x02 /* 0 = write, 1 = read */

Definition at line 81 of file r852.h.

#define R852_DMA_SETTINGS   0x10

Definition at line 79 of file r852.h.

#define R852_ECC_CORRECT   0x10 /* no errors - (guessed) */

Definition at line 100 of file r852.h.

#define R852_ECC_CORRECTABLE   0x20 /* correctable error exist */

Definition at line 101 of file r852.h.

#define R852_ECC_ERR_BIT_MSK   0x07 /* error bit location */

Definition at line 99 of file r852.h.

#define R852_ECC_FAIL   0x40 /* non correctable error detected */

Definition at line 102 of file r852.h.

#define R852_HW   0x08

Definition at line 61 of file r852.h.

#define R852_HW_ENABLED   0x01 /* hw enabled */

Definition at line 62 of file r852.h.

#define R852_HW_UNKNOWN   0x80

Definition at line 63 of file r852.h.

#define R852_SMBIT   0x20 /* if set with bit #6 or bit #7, then */

Definition at line 68 of file r852.h.