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

Go to the source code of this file.

Macros

#define UWBCAPINFO   0x00 /* == UWBCAPDATA(0) */
 
#define UWBCAPINFO_TO_N_CAPS(c)   (((c) >> 0) & 0xFull)
 
#define UWBCAPDATA(n)   (8*(n))
 
#define UWBCAPDATA_TO_VERSION(c)   (((c) >> 32) & 0xFFFFull)
 
#define UWBCAPDATA_TO_OFFSET(c)   (((c) >> 18) & 0x3FFFull)
 
#define UWBCAPDATA_TO_BAR(c)   (((c) >> 16) & 0x3ull)
 
#define UWBCAPDATA_TO_SIZE(c)   ((((c) >> 8) & 0xFFull) * sizeof(u32))
 
#define UWBCAPDATA_TO_CAP_ID(c)   (((c) >> 0) & 0xFFull)
 
#define UWBCAPDATA_SIZE(n)   (8 + 8*(n))
 
#define URCCMD   0x00
 
#define URCCMD_RESET   (1 << 31) /* UMC Hardware reset */
 
#define URCCMD_RS   (1 << 30) /* Run/Stop */
 
#define URCCMD_EARV   (1 << 29) /* Event Address Register Valid */
 
#define URCCMD_ACTIVE   (1 << 15) /* Command is active */
 
#define URCCMD_IWR   (1 << 14) /* Interrupt When Ready */
 
#define URCCMD_SIZE_MASK   0x00000fff /* Command size mask */
 
#define URCSTS   0x04
 
#define URCSTS_EPS   (1 << 17) /* Event Processing Status */
 
#define URCSTS_HALTED   (1 << 16) /* RC halted */
 
#define URCSTS_HSE   (1 << 10) /* Host System Error...fried */
 
#define URCSTS_ER   (1 << 9) /* Event Ready */
 
#define URCSTS_RCI   (1 << 8) /* Ready for Command Interrupt */
 
#define URCSTS_INT_MASK   0x00000700 /* URC interrupt sources */
 
#define URCSTS_ISI   0x000000ff /* Interrupt Source Identification */
 
#define URCINTR   0x08
 
#define URCINTR_EN_ALL   0x000007ff /* Enable all interrupt sources */
 
#define URCCMDADDR   0x10
 
#define URCEVTADDR   0x18
 
#define URCEVTADDR_OFFSET_MASK   0xfff /* Event pointer offset mask */
 

Functions

int whci_wait_for (struct device *dev, u32 __iomem *reg, u32 mask, u32 result, unsigned long max_ms, const char *tag)
 

Macro Definition Documentation

#define URCCMD   0x00

Definition at line 56 of file whci.h.

#define URCCMD_ACTIVE   (1 << 15) /* Command is active */

Definition at line 60 of file whci.h.

#define URCCMD_EARV   (1 << 29) /* Event Address Register Valid */

Definition at line 59 of file whci.h.

#define URCCMD_IWR   (1 << 14) /* Interrupt When Ready */

Definition at line 61 of file whci.h.

#define URCCMD_RESET   (1 << 31) /* UMC Hardware reset */

Definition at line 57 of file whci.h.

#define URCCMD_RS   (1 << 30) /* Run/Stop */

Definition at line 58 of file whci.h.

#define URCCMD_SIZE_MASK   0x00000fff /* Command size mask */

Definition at line 62 of file whci.h.

#define URCCMDADDR   0x10

Definition at line 73 of file whci.h.

#define URCEVTADDR   0x18

Definition at line 74 of file whci.h.

#define URCEVTADDR_OFFSET_MASK   0xfff /* Event pointer offset mask */

Definition at line 75 of file whci.h.

#define URCINTR   0x08

Definition at line 71 of file whci.h.

#define URCINTR_EN_ALL   0x000007ff /* Enable all interrupt sources */

Definition at line 72 of file whci.h.

#define URCSTS   0x04

Definition at line 63 of file whci.h.

#define URCSTS_EPS   (1 << 17) /* Event Processing Status */

Definition at line 64 of file whci.h.

#define URCSTS_ER   (1 << 9) /* Event Ready */

Definition at line 67 of file whci.h.

#define URCSTS_HALTED   (1 << 16) /* RC halted */

Definition at line 65 of file whci.h.

#define URCSTS_HSE   (1 << 10) /* Host System Error...fried */

Definition at line 66 of file whci.h.

#define URCSTS_INT_MASK   0x00000700 /* URC interrupt sources */

Definition at line 69 of file whci.h.

#define URCSTS_ISI   0x000000ff /* Interrupt Source Identification */

Definition at line 70 of file whci.h.

#define URCSTS_RCI   (1 << 8) /* Ready for Command Interrupt */

Definition at line 68 of file whci.h.

#define UWBCAPDATA (   n)    (8*(n))

Definition at line 39 of file whci.h.

#define UWBCAPDATA_SIZE (   n)    (8 + 8*(n))

Definition at line 48 of file whci.h.

#define UWBCAPDATA_TO_BAR (   c)    (((c) >> 16) & 0x3ull)

Definition at line 42 of file whci.h.

#define UWBCAPDATA_TO_CAP_ID (   c)    (((c) >> 0) & 0xFFull)

Definition at line 44 of file whci.h.

#define UWBCAPDATA_TO_OFFSET (   c)    (((c) >> 18) & 0x3FFFull)

Definition at line 41 of file whci.h.

#define UWBCAPDATA_TO_SIZE (   c)    ((((c) >> 8) & 0xFFull) * sizeof(u32))

Definition at line 43 of file whci.h.

#define UWBCAPDATA_TO_VERSION (   c)    (((c) >> 32) & 0xFFFFull)

Definition at line 40 of file whci.h.

#define UWBCAPINFO   0x00 /* == UWBCAPDATA(0) */

Definition at line 37 of file whci.h.

#define UWBCAPINFO_TO_N_CAPS (   c)    (((c) >> 0) & 0xFull)

Definition at line 38 of file whci.h.

Function Documentation

int whci_wait_for ( struct device dev,
u32 __iomem reg,
u32  mask,
u32  result,
unsigned long  max_ms,
const char tag 
)

whci_wait_for - wait for a WHCI register to be set

Polls (for at most ms) until '* & ==

Returns
'.

Definition at line 63 of file whci.c.