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

Go to the source code of this file.

Data Structures

struct  si_pub
 
struct  gpioh_item
 
struct  si_info
 

Macros

#define SI_CORE_SIZE   0x1000
 
#define SI_MAXCORES   16
 
#define SI_PCI_DMA_SZ   0x40000000
 
#define SI_PCIE_DMA_H32   0x80000000
 
#define SI_CC_IDX   0
 
#define SOCI_AI   1
 
#define SI_CLK_CTL_ST   0x1e0 /* clock control and status */
 
#define CCS_FORCEALP   0x00000001 /* force ALP request */
 
#define CCS_FORCEHT   0x00000002 /* force HT request */
 
#define CCS_FORCEILP   0x00000004 /* force ILP request */
 
#define CCS_ALPAREQ   0x00000008 /* ALP Avail Request */
 
#define CCS_HTAREQ   0x00000010 /* HT Avail Request */
 
#define CCS_FORCEHWREQOFF   0x00000020 /* Force HW Clock Request Off */
 
#define CCS_ERSRC_REQ_MASK   0x00000700 /* external resource requests */
 
#define CCS_ERSRC_REQ_SHIFT   8
 
#define CCS_ALPAVAIL   0x00010000 /* ALP is available */
 
#define CCS_HTAVAIL   0x00020000 /* HT is available */
 
#define CCS_BP_ON_APL   0x00040000 /* RO: running on ALP clock */
 
#define CCS_BP_ON_HT   0x00080000 /* RO: running on HT clock */
 
#define CCS_ERSRC_STS_MASK   0x07000000 /* external resource status */
 
#define CCS_ERSRC_STS_SHIFT   24
 
#define CCS0_HTAVAIL   0x00010000
 
#define CCS0_ALPAVAIL   0x00020000
 
#define FLASH_MIN   0x00020000 /* Minimum flash size */
 
#define CC_SROM_OTP   0x800 /* SROM/OTP address space */
 
#define GPIO_ONTIME_SHIFT   16
 
#define CLKD_OTP   0x000f0000
 
#define CLKD_OTP_SHIFT   16
 
#define LPOMINFREQ   25000 /* low power oscillator min */
 
#define LPOMAXFREQ   43000 /* low power oscillator max */
 
#define XTALMINFREQ   19800000 /* 20 MHz - 1% */
 
#define XTALMAXFREQ   20200000 /* 20 MHz + 1% */
 
#define PCIMINFREQ   25000000 /* 25 MHz */
 
#define PCIMAXFREQ   34000000 /* 33 MHz + fudge */
 
#define ILP_DIV_5MHZ   0 /* ILP = 5 MHz */
 
#define ILP_DIV_1MHZ   4 /* ILP = 1 MHz */
 
#define XTAL   0x1 /* primary crystal oscillator (2050) */
 
#define PLL   0x2 /* main chip pll */
 
#define GPIO_DRV_PRIORITY   0 /* Driver */
 
#define GPIO_APP_PRIORITY   1 /* Application */
 
#define GPIO_HI_PRIORITY
 
#define GPIO_PULLUP   0
 
#define GPIO_PULLDN   1
 
#define GPIO_REGEVT   0 /* GPIO register event */
 
#define GPIO_REGEVT_INTMSK   1 /* GPIO register event int mask */
 
#define GPIO_REGEVT_INTPOL   2 /* GPIO register event int polarity */
 
#define SI_DEVPATH_BUFSZ   16 /* min buffer size in bytes */
 
#define SI_DOATTACH   1
 
#define SI_PCIDOWN   2
 
#define SI_PCIUP   3
 

Functions

u32 ai_core_cflags (struct bcma_device *core, u32 mask, u32 val)
 
struct si_pubai_attach (struct bcma_bus *pbus)
 
void ai_detach (struct si_pub *sih)
 
uint ai_cc_reg (struct si_pub *sih, uint regoff, u32 mask, u32 val)
 
void ai_clkctl_init (struct si_pub *sih)
 
u16 ai_clkctl_fast_pwrup_delay (struct si_pub *sih)
 
bool ai_clkctl_cc (struct si_pub *sih, enum bcma_clkmode mode)
 
bool ai_deviceremoved (struct si_pub *sih)
 
void ai_pci_down (struct si_pub *sih)
 
void ai_pci_up (struct si_pub *sih)
 
void ai_epa_4313war (struct si_pub *sih)
 

Macro Definition Documentation

#define CC_SROM_OTP   0x800 /* SROM/OTP address space */

Definition at line 82 of file aiutils.h.

#define CCS0_ALPAVAIL   0x00020000

Definition at line 73 of file aiutils.h.

#define CCS0_HTAVAIL   0x00010000

Definition at line 71 of file aiutils.h.

#define CCS_ALPAREQ   0x00000008 /* ALP Avail Request */

Definition at line 58 of file aiutils.h.

#define CCS_ALPAVAIL   0x00010000 /* ALP is available */

Definition at line 63 of file aiutils.h.

#define CCS_BP_ON_APL   0x00040000 /* RO: running on ALP clock */

Definition at line 65 of file aiutils.h.

#define CCS_BP_ON_HT   0x00080000 /* RO: running on HT clock */

Definition at line 66 of file aiutils.h.

#define CCS_ERSRC_REQ_MASK   0x00000700 /* external resource requests */

Definition at line 61 of file aiutils.h.

#define CCS_ERSRC_REQ_SHIFT   8

Definition at line 62 of file aiutils.h.

#define CCS_ERSRC_STS_MASK   0x07000000 /* external resource status */

Definition at line 67 of file aiutils.h.

#define CCS_ERSRC_STS_SHIFT   24

Definition at line 68 of file aiutils.h.

#define CCS_FORCEALP   0x00000001 /* force ALP request */

Definition at line 55 of file aiutils.h.

#define CCS_FORCEHT   0x00000002 /* force HT request */

Definition at line 56 of file aiutils.h.

#define CCS_FORCEHWREQOFF   0x00000020 /* Force HW Clock Request Off */

Definition at line 60 of file aiutils.h.

#define CCS_FORCEILP   0x00000004 /* force ILP request */

Definition at line 57 of file aiutils.h.

#define CCS_HTAREQ   0x00000010 /* HT Avail Request */

Definition at line 59 of file aiutils.h.

#define CCS_HTAVAIL   0x00020000 /* HT is available */

Definition at line 64 of file aiutils.h.

#define CLKD_OTP   0x000f0000

Definition at line 88 of file aiutils.h.

#define CLKD_OTP_SHIFT   16

Definition at line 89 of file aiutils.h.

#define FLASH_MIN   0x00020000 /* Minimum flash size */

Definition at line 80 of file aiutils.h.

#define GPIO_APP_PRIORITY   1 /* Application */

Definition at line 108 of file aiutils.h.

#define GPIO_DRV_PRIORITY   0 /* Driver */

Definition at line 107 of file aiutils.h.

#define GPIO_HI_PRIORITY
Value:
2 /* Highest priority. Ignore GPIO
* reservation
*/

Definition at line 109 of file aiutils.h.

#define GPIO_ONTIME_SHIFT   16

Definition at line 85 of file aiutils.h.

#define GPIO_PULLDN   1

Definition at line 113 of file aiutils.h.

#define GPIO_PULLUP   0

Definition at line 112 of file aiutils.h.

#define GPIO_REGEVT   0 /* GPIO register event */

Definition at line 116 of file aiutils.h.

#define GPIO_REGEVT_INTMSK   1 /* GPIO register event int mask */

Definition at line 117 of file aiutils.h.

#define GPIO_REGEVT_INTPOL   2 /* GPIO register event int polarity */

Definition at line 118 of file aiutils.h.

#define ILP_DIV_1MHZ   4 /* ILP = 1 MHz */

Definition at line 100 of file aiutils.h.

#define ILP_DIV_5MHZ   0 /* ILP = 5 MHz */

Definition at line 99 of file aiutils.h.

#define LPOMAXFREQ   43000 /* low power oscillator max */

Definition at line 93 of file aiutils.h.

#define LPOMINFREQ   25000 /* low power oscillator min */

Definition at line 92 of file aiutils.h.

#define PCIMAXFREQ   34000000 /* 33 MHz + fudge */

Definition at line 97 of file aiutils.h.

#define PCIMINFREQ   25000000 /* 25 MHz */

Definition at line 96 of file aiutils.h.

#define PLL   0x2 /* main chip pll */

Definition at line 104 of file aiutils.h.

#define SI_CC_IDX   0

Definition at line 44 of file aiutils.h.

#define SI_CLK_CTL_ST   0x1e0 /* clock control and status */

Definition at line 52 of file aiutils.h.

#define SI_CORE_SIZE   0x1000

Definition at line 29 of file aiutils.h.

#define SI_DEVPATH_BUFSZ   16 /* min buffer size in bytes */

Definition at line 121 of file aiutils.h.

#define SI_DOATTACH   1

Definition at line 124 of file aiutils.h.

#define SI_MAXCORES   16

Definition at line 35 of file aiutils.h.

#define SI_PCI_DMA_SZ   0x40000000

Definition at line 38 of file aiutils.h.

#define SI_PCIDOWN   2

Definition at line 125 of file aiutils.h.

#define SI_PCIE_DMA_H32   0x80000000

Definition at line 41 of file aiutils.h.

#define SI_PCIUP   3

Definition at line 126 of file aiutils.h.

#define SOCI_AI   1

Definition at line 47 of file aiutils.h.

#define XTAL   0x1 /* primary crystal oscillator (2050) */

Definition at line 103 of file aiutils.h.

#define XTALMAXFREQ   20200000 /* 20 MHz + 1% */

Definition at line 95 of file aiutils.h.

#define XTALMINFREQ   19800000 /* 20 MHz - 1% */

Definition at line 94 of file aiutils.h.

Function Documentation

struct si_pub* ai_attach ( struct bcma_bus pbus)
read

Definition at line 516 of file aiutils.c.

uint ai_cc_reg ( struct si_pub sih,
uint  regoff,
u32  mask,
u32  val 
)

Definition at line 549 of file aiutils.c.

bool ai_clkctl_cc ( struct si_pub sih,
enum bcma_clkmode  mode 
)

Definition at line 676 of file aiutils.c.

u16 ai_clkctl_fast_pwrup_delay ( struct si_pub sih)

Definition at line 642 of file aiutils.c.

void ai_clkctl_init ( struct si_pub sih)

Definition at line 619 of file aiutils.c.

u32 ai_core_cflags ( struct bcma_device core,
u32  mask,
u32  val 
)
void ai_detach ( struct si_pub sih)

Definition at line 534 of file aiutils.c.

bool ai_deviceremoved ( struct si_pub sih)

Definition at line 722 of file aiutils.c.

void ai_epa_4313war ( struct si_pub sih)

Definition at line 710 of file aiutils.c.

void ai_pci_down ( struct si_pub sih)

Definition at line 699 of file aiutils.c.

void ai_pci_up ( struct si_pub sih)

Definition at line 688 of file aiutils.c.