Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
cb710.h File Reference
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/mmc/host.h>
#include <linux/highmem.h>
#include <linux/scatterlist.h>

Go to the source code of this file.

Data Structures

struct  cb710_slot
 
struct  cb710_chip
 

Macros

#define CB710_SLOT_MMC   1
 
#define CB710_SLOT_MS   2
 
#define CB710_SLOT_SM   4
 
#define CB710_PORT_ACCESSORS(t)
 
#define cb710_dump_regs(c, d)   do {} while (0)
 
#define CB710_DUMP_REGS_MMC   0x0F
 
#define CB710_DUMP_REGS_MS   0x30
 
#define CB710_DUMP_REGS_SM   0xC0
 
#define CB710_DUMP_REGS_ALL   0xFF
 
#define CB710_DUMP_REGS_MASK   0xFF
 
#define CB710_DUMP_ACCESS_8   0x100
 
#define CB710_DUMP_ACCESS_16   0x200
 
#define CB710_DUMP_ACCESS_32   0x400
 
#define CB710_DUMP_ACCESS_ALL   0x700
 
#define CB710_DUMP_ACCESS_MASK   0x700
 
#define LINUX_CB710_SG_H
 

Typedefs

typedef int(* cb710_irq_handler_t )(struct cb710_slot *)
 

Functions

void cb710_pci_update_config_reg (struct pci_dev *pdev, int reg, uint32_t and, uint32_t xor)
 
void cb710_set_irq_handler (struct cb710_slot *slot, cb710_irq_handler_t handler)
 
uint32_t cb710_sg_dwiter_read_next_block (struct sg_mapping_iter *miter)
 
void cb710_sg_dwiter_write_next_block (struct sg_mapping_iter *miter, uint32_t data)
 

Macro Definition Documentation

#define CB710_DUMP_ACCESS_16   0x200

Definition at line 122 of file cb710.h.

#define CB710_DUMP_ACCESS_32   0x400

Definition at line 123 of file cb710.h.

#define CB710_DUMP_ACCESS_8   0x100

Definition at line 121 of file cb710.h.

#define CB710_DUMP_ACCESS_ALL   0x700

Definition at line 124 of file cb710.h.

#define CB710_DUMP_ACCESS_MASK   0x700

Definition at line 125 of file cb710.h.

#define cb710_dump_regs (   c,
  d 
)    do {} while (0)

Definition at line 112 of file cb710.h.

#define CB710_DUMP_REGS_ALL   0xFF

Definition at line 118 of file cb710.h.

#define CB710_DUMP_REGS_MASK   0xFF

Definition at line 119 of file cb710.h.

#define CB710_DUMP_REGS_MMC   0x0F

Definition at line 115 of file cb710.h.

#define CB710_DUMP_REGS_MS   0x30

Definition at line 116 of file cb710.h.

#define CB710_DUMP_REGS_SM   0xC0

Definition at line 117 of file cb710.h.

#define CB710_PORT_ACCESSORS (   t)
Value:
static inline void cb710_write_port_##t(struct cb710_slot *slot, \
unsigned port, u##t value) \
{ \
iowrite##t(value, slot->iobase + port); \
} \
\
static inline u##t cb710_read_port_##t(struct cb710_slot *slot, \
unsigned port) \
{ \
return ioread##t(slot->iobase + port); \
} \
\
static inline void cb710_modify_port_##t(struct cb710_slot *slot, \
unsigned port, u##t set, u##t clear) \
{ \
iowrite##t( \
(ioread##t(slot->iobase + port) & ~clear)|set, \
slot->iobase + port); \
}

Definition at line 54 of file cb710.h.

#define CB710_SLOT_MMC   1

Definition at line 49 of file cb710.h.

#define CB710_SLOT_MS   2

Definition at line 50 of file cb710.h.

#define CB710_SLOT_SM   4

Definition at line 51 of file cb710.h.

#define LINUX_CB710_SG_H

Definition at line 138 of file cb710.h.

Typedef Documentation

typedef int(* cb710_irq_handler_t)(struct cb710_slot *)

Definition at line 22 of file cb710.h.

Function Documentation

void cb710_pci_update_config_reg ( struct pci_dev pdev,
int  reg,
uint32_t  and,
uint32_t  xor 
)

Definition at line 21 of file core.c.

void cb710_set_irq_handler ( struct cb710_slot slot,
cb710_irq_handler_t  handler 
)

Definition at line 161 of file core.c.

uint32_t cb710_sg_dwiter_read_next_block ( struct sg_mapping_iter miter)

cb710_sg_dwiter_read_next_block() - get next 32-bit word from sg buffer : sg mapping iterator used for reading

Description: Returns 32-bit word starting at byte pointed to by @ handling any alignment issues. Bytes past the buffer's end are not accessed (read) but are returned as zeroes. @ is advanced by 4 bytes or to the end of buffer whichever is closer.

Context: Same requirements as in sg_miter_next().

Returns: 32-bit word just read.

Definition at line 93 of file sgbuf2.c.

void cb710_sg_dwiter_write_next_block ( struct sg_mapping_iter miter,
uint32_t  data 
)

cb710_sg_dwiter_write_next_block() - write next 32-bit word to sg buffer : sg mapping iterator used for writing

Description: Writes 32-bit word starting at byte pointed to by @ handling any alignment issues. Bytes which would be written past the buffer's end are silently discarded. @ is advanced by 4 bytes or to the end of buffer whichever is closer.

Context: Same requirements as in sg_miter_next().

Definition at line 133 of file sgbuf2.c.