Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
bestcomm_priv.h File Reference
#include <linux/spinlock.h>
#include <linux/of.h>
#include <asm/io.h>
#include <asm/mpc52xx.h>
#include "sram.h"

Go to the source code of this file.

Data Structures

struct  bcom_tdt
 
struct  bcom_engine
 
struct  bcom_task_header
 

Macros

#define BCOM_MAX_TASKS   16
 
#define BCOM_MAX_VAR   24
 
#define BCOM_MAX_INC   8
 
#define BCOM_MAX_FDT   64
 
#define BCOM_MAX_CTX   20
 
#define BCOM_CTX_SIZE   (BCOM_MAX_CTX * sizeof(u32))
 
#define BCOM_CTX_ALIGN   0x100
 
#define BCOM_VAR_SIZE   (BCOM_MAX_VAR * sizeof(u32))
 
#define BCOM_INC_SIZE   (BCOM_MAX_INC * sizeof(u32))
 
#define BCOM_VAR_ALIGN   0x80
 
#define BCOM_FDT_SIZE   (BCOM_MAX_FDT * sizeof(u32))
 
#define BCOM_FDT_ALIGN   0x100
 
#define BCOM_TASK_MAGIC   0x4243544B /* 'BCTK' */
 
#define BCOM_DESC_NOP   0x000001f8
 
#define BCOM_LCD_MASK   0x80000000
 
#define BCOM_DRD_EXTENDED   0x40000000
 
#define BCOM_DRD_INITIATOR_SHIFT   21
 
#define BCOM_PRAGMA_BIT_RSV   7 /* reserved pragma bit */
 
#define BCOM_PRAGMA_BIT_PRECISE_INC   6 /* increment 0=when possible, */
 
#define BCOM_PRAGMA_BIT_RST_ERROR_NO   5 /* don't reset errors on */
 
#define BCOM_PRAGMA_BIT_PACK   4 /* pack data enable */
 
#define BCOM_PRAGMA_BIT_INTEGER   3 /* data alignment */
 
#define BCOM_PRAGMA_BIT_SPECREAD   2 /* XLB speculative read */
 
#define BCOM_PRAGMA_BIT_CW   1 /* write line buffer enable */
 
#define BCOM_PRAGMA_BIT_RL   0 /* read line buffer enable */
 
#define BCOM_STD_PRAGMA
 
#define BCOM_PCI_PRAGMA
 
#define BCOM_ATA_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_CRC16_DP_0_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_CRC16_DP_1_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_FEC_RX_BD_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_FEC_TX_BD_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_0_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_1_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_2_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_3_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_BD_0_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_DP_BD_1_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_RX_BD_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_TX_BD_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_GEN_LPC_PRAGMA   BCOM_STD_PRAGMA
 
#define BCOM_PCI_RX_PRAGMA   BCOM_PCI_PRAGMA
 
#define BCOM_PCI_TX_PRAGMA   BCOM_PCI_PRAGMA
 
#define BCOM_INITIATOR_ALWAYS   0
 
#define BCOM_INITIATOR_SCTMR_0   1
 
#define BCOM_INITIATOR_SCTMR_1   2
 
#define BCOM_INITIATOR_FEC_RX   3
 
#define BCOM_INITIATOR_FEC_TX   4
 
#define BCOM_INITIATOR_ATA_RX   5
 
#define BCOM_INITIATOR_ATA_TX   6
 
#define BCOM_INITIATOR_SCPCI_RX   7
 
#define BCOM_INITIATOR_SCPCI_TX   8
 
#define BCOM_INITIATOR_PSC3_RX   9
 
#define BCOM_INITIATOR_PSC3_TX   10
 
#define BCOM_INITIATOR_PSC2_RX   11
 
#define BCOM_INITIATOR_PSC2_TX   12
 
#define BCOM_INITIATOR_PSC1_RX   13
 
#define BCOM_INITIATOR_PSC1_TX   14
 
#define BCOM_INITIATOR_SCTMR_2   15
 
#define BCOM_INITIATOR_SCLPC   16
 
#define BCOM_INITIATOR_PSC5_RX   17
 
#define BCOM_INITIATOR_PSC5_TX   18
 
#define BCOM_INITIATOR_PSC4_RX   19
 
#define BCOM_INITIATOR_PSC4_TX   20
 
#define BCOM_INITIATOR_I2C2_RX   21
 
#define BCOM_INITIATOR_I2C2_TX   22
 
#define BCOM_INITIATOR_I2C1_RX   23
 
#define BCOM_INITIATOR_I2C1_TX   24
 
#define BCOM_INITIATOR_PSC6_RX   25
 
#define BCOM_INITIATOR_PSC6_TX   26
 
#define BCOM_INITIATOR_IRDA_RX   25
 
#define BCOM_INITIATOR_IRDA_TX   26
 
#define BCOM_INITIATOR_SCTMR_3   27
 
#define BCOM_INITIATOR_SCTMR_4   28
 
#define BCOM_INITIATOR_SCTMR_5   29
 
#define BCOM_INITIATOR_SCTMR_6   30
 
#define BCOM_INITIATOR_SCTMR_7   31
 
#define BCOM_IPR_ALWAYS   7
 
#define BCOM_IPR_SCTMR_0   2
 
#define BCOM_IPR_SCTMR_1   2
 
#define BCOM_IPR_FEC_RX   6
 
#define BCOM_IPR_FEC_TX   5
 
#define BCOM_IPR_ATA_RX   7
 
#define BCOM_IPR_ATA_TX   7
 
#define BCOM_IPR_SCPCI_RX   2
 
#define BCOM_IPR_SCPCI_TX   2
 
#define BCOM_IPR_PSC3_RX   2
 
#define BCOM_IPR_PSC3_TX   2
 
#define BCOM_IPR_PSC2_RX   2
 
#define BCOM_IPR_PSC2_TX   2
 
#define BCOM_IPR_PSC1_RX   2
 
#define BCOM_IPR_PSC1_TX   2
 
#define BCOM_IPR_SCTMR_2   2
 
#define BCOM_IPR_SCLPC   2
 
#define BCOM_IPR_PSC5_RX   2
 
#define BCOM_IPR_PSC5_TX   2
 
#define BCOM_IPR_PSC4_RX   2
 
#define BCOM_IPR_PSC4_TX   2
 
#define BCOM_IPR_I2C2_RX   2
 
#define BCOM_IPR_I2C2_TX   2
 
#define BCOM_IPR_I2C1_RX   2
 
#define BCOM_IPR_I2C1_TX   2
 
#define BCOM_IPR_PSC6_RX   2
 
#define BCOM_IPR_PSC6_TX   2
 
#define BCOM_IPR_IRDA_RX   2
 
#define BCOM_IPR_IRDA_TX   2
 
#define BCOM_IPR_SCTMR_3   2
 
#define BCOM_IPR_SCTMR_4   2
 
#define BCOM_IPR_SCTMR_5   2
 
#define BCOM_IPR_SCTMR_6   2
 
#define BCOM_IPR_SCTMR_7   2
 
#define TASK_ENABLE   0x8000
 

Functions

struct bcom_taskbcom_task_alloc (int bd_count, int bd_size, int priv_size)
 
void bcom_task_free (struct bcom_task *tsk)
 
int bcom_load_image (int task, u32 *task_image)
 
void bcom_set_initiator (int task, int initiator)
 

Variables

struct bcom_enginebcom_eng
 

Macro Definition Documentation

#define BCOM_ATA_PRAGMA   BCOM_STD_PRAGMA

Definition at line 142 of file bestcomm_priv.h.

#define BCOM_CRC16_DP_0_PRAGMA   BCOM_STD_PRAGMA

Definition at line 143 of file bestcomm_priv.h.

#define BCOM_CRC16_DP_1_PRAGMA   BCOM_STD_PRAGMA

Definition at line 144 of file bestcomm_priv.h.

#define BCOM_CTX_ALIGN   0x100

Definition at line 41 of file bestcomm_priv.h.

#define BCOM_CTX_SIZE   (BCOM_MAX_CTX * sizeof(u32))

Definition at line 40 of file bestcomm_priv.h.

#define BCOM_DESC_NOP   0x000001f8

Definition at line 101 of file bestcomm_priv.h.

#define BCOM_DRD_EXTENDED   0x40000000

Definition at line 103 of file bestcomm_priv.h.

#define BCOM_DRD_INITIATOR_SHIFT   21

Definition at line 104 of file bestcomm_priv.h.

#define BCOM_FDT_ALIGN   0x100

Definition at line 46 of file bestcomm_priv.h.

#define BCOM_FDT_SIZE   (BCOM_MAX_FDT * sizeof(u32))

Definition at line 45 of file bestcomm_priv.h.

#define BCOM_FEC_RX_BD_PRAGMA   BCOM_STD_PRAGMA

Definition at line 145 of file bestcomm_priv.h.

#define BCOM_FEC_TX_BD_PRAGMA   BCOM_STD_PRAGMA

Definition at line 146 of file bestcomm_priv.h.

#define BCOM_GEN_DP_0_PRAGMA   BCOM_STD_PRAGMA

Definition at line 147 of file bestcomm_priv.h.

#define BCOM_GEN_DP_1_PRAGMA   BCOM_STD_PRAGMA

Definition at line 148 of file bestcomm_priv.h.

#define BCOM_GEN_DP_2_PRAGMA   BCOM_STD_PRAGMA

Definition at line 149 of file bestcomm_priv.h.

#define BCOM_GEN_DP_3_PRAGMA   BCOM_STD_PRAGMA

Definition at line 150 of file bestcomm_priv.h.

#define BCOM_GEN_DP_BD_0_PRAGMA   BCOM_STD_PRAGMA

Definition at line 151 of file bestcomm_priv.h.

#define BCOM_GEN_DP_BD_1_PRAGMA   BCOM_STD_PRAGMA

Definition at line 152 of file bestcomm_priv.h.

#define BCOM_GEN_LPC_PRAGMA   BCOM_STD_PRAGMA

Definition at line 155 of file bestcomm_priv.h.

#define BCOM_GEN_RX_BD_PRAGMA   BCOM_STD_PRAGMA

Definition at line 153 of file bestcomm_priv.h.

#define BCOM_GEN_TX_BD_PRAGMA   BCOM_STD_PRAGMA

Definition at line 154 of file bestcomm_priv.h.

#define BCOM_INC_SIZE   (BCOM_MAX_INC * sizeof(u32))

Definition at line 43 of file bestcomm_priv.h.

#define BCOM_INITIATOR_ALWAYS   0

Definition at line 160 of file bestcomm_priv.h.

#define BCOM_INITIATOR_ATA_RX   5

Definition at line 165 of file bestcomm_priv.h.

#define BCOM_INITIATOR_ATA_TX   6

Definition at line 166 of file bestcomm_priv.h.

#define BCOM_INITIATOR_FEC_RX   3

Definition at line 163 of file bestcomm_priv.h.

#define BCOM_INITIATOR_FEC_TX   4

Definition at line 164 of file bestcomm_priv.h.

#define BCOM_INITIATOR_I2C1_RX   23

Definition at line 183 of file bestcomm_priv.h.

#define BCOM_INITIATOR_I2C1_TX   24

Definition at line 184 of file bestcomm_priv.h.

#define BCOM_INITIATOR_I2C2_RX   21

Definition at line 181 of file bestcomm_priv.h.

#define BCOM_INITIATOR_I2C2_TX   22

Definition at line 182 of file bestcomm_priv.h.

#define BCOM_INITIATOR_IRDA_RX   25

Definition at line 187 of file bestcomm_priv.h.

#define BCOM_INITIATOR_IRDA_TX   26

Definition at line 188 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC1_RX   13

Definition at line 173 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC1_TX   14

Definition at line 174 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC2_RX   11

Definition at line 171 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC2_TX   12

Definition at line 172 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC3_RX   9

Definition at line 169 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC3_TX   10

Definition at line 170 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC4_RX   19

Definition at line 179 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC4_TX   20

Definition at line 180 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC5_RX   17

Definition at line 177 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC5_TX   18

Definition at line 178 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC6_RX   25

Definition at line 185 of file bestcomm_priv.h.

#define BCOM_INITIATOR_PSC6_TX   26

Definition at line 186 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCLPC   16

Definition at line 176 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCPCI_RX   7

Definition at line 167 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCPCI_TX   8

Definition at line 168 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_0   1

Definition at line 161 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_1   2

Definition at line 162 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_2   15

Definition at line 175 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_3   27

Definition at line 189 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_4   28

Definition at line 190 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_5   29

Definition at line 191 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_6   30

Definition at line 192 of file bestcomm_priv.h.

#define BCOM_INITIATOR_SCTMR_7   31

Definition at line 193 of file bestcomm_priv.h.

#define BCOM_IPR_ALWAYS   7

Definition at line 196 of file bestcomm_priv.h.

#define BCOM_IPR_ATA_RX   7

Definition at line 201 of file bestcomm_priv.h.

#define BCOM_IPR_ATA_TX   7

Definition at line 202 of file bestcomm_priv.h.

#define BCOM_IPR_FEC_RX   6

Definition at line 199 of file bestcomm_priv.h.

#define BCOM_IPR_FEC_TX   5

Definition at line 200 of file bestcomm_priv.h.

#define BCOM_IPR_I2C1_RX   2

Definition at line 219 of file bestcomm_priv.h.

#define BCOM_IPR_I2C1_TX   2

Definition at line 220 of file bestcomm_priv.h.

#define BCOM_IPR_I2C2_RX   2

Definition at line 217 of file bestcomm_priv.h.

#define BCOM_IPR_I2C2_TX   2

Definition at line 218 of file bestcomm_priv.h.

#define BCOM_IPR_IRDA_RX   2

Definition at line 223 of file bestcomm_priv.h.

#define BCOM_IPR_IRDA_TX   2

Definition at line 224 of file bestcomm_priv.h.

#define BCOM_IPR_PSC1_RX   2

Definition at line 209 of file bestcomm_priv.h.

#define BCOM_IPR_PSC1_TX   2

Definition at line 210 of file bestcomm_priv.h.

#define BCOM_IPR_PSC2_RX   2

Definition at line 207 of file bestcomm_priv.h.

#define BCOM_IPR_PSC2_TX   2

Definition at line 208 of file bestcomm_priv.h.

#define BCOM_IPR_PSC3_RX   2

Definition at line 205 of file bestcomm_priv.h.

#define BCOM_IPR_PSC3_TX   2

Definition at line 206 of file bestcomm_priv.h.

#define BCOM_IPR_PSC4_RX   2

Definition at line 215 of file bestcomm_priv.h.

#define BCOM_IPR_PSC4_TX   2

Definition at line 216 of file bestcomm_priv.h.

#define BCOM_IPR_PSC5_RX   2

Definition at line 213 of file bestcomm_priv.h.

#define BCOM_IPR_PSC5_TX   2

Definition at line 214 of file bestcomm_priv.h.

#define BCOM_IPR_PSC6_RX   2

Definition at line 221 of file bestcomm_priv.h.

#define BCOM_IPR_PSC6_TX   2

Definition at line 222 of file bestcomm_priv.h.

#define BCOM_IPR_SCLPC   2

Definition at line 212 of file bestcomm_priv.h.

#define BCOM_IPR_SCPCI_RX   2

Definition at line 203 of file bestcomm_priv.h.

#define BCOM_IPR_SCPCI_TX   2

Definition at line 204 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_0   2

Definition at line 197 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_1   2

Definition at line 198 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_2   2

Definition at line 211 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_3   2

Definition at line 225 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_4   2

Definition at line 226 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_5   2

Definition at line 227 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_6   2

Definition at line 228 of file bestcomm_priv.h.

#define BCOM_IPR_SCTMR_7   2

Definition at line 229 of file bestcomm_priv.h.

#define BCOM_LCD_MASK   0x80000000

Definition at line 102 of file bestcomm_priv.h.

#define BCOM_MAX_CTX   20

Definition at line 39 of file bestcomm_priv.h.

#define BCOM_MAX_FDT   64

Definition at line 38 of file bestcomm_priv.h.

#define BCOM_MAX_INC   8

Definition at line 37 of file bestcomm_priv.h.

#define BCOM_MAX_TASKS   16

Definition at line 35 of file bestcomm_priv.h.

#define BCOM_MAX_VAR   24

Definition at line 36 of file bestcomm_priv.h.

#define BCOM_PCI_PRAGMA
Value:

Definition at line 133 of file bestcomm_priv.h.

#define BCOM_PCI_RX_PRAGMA   BCOM_PCI_PRAGMA

Definition at line 156 of file bestcomm_priv.h.

#define BCOM_PCI_TX_PRAGMA   BCOM_PCI_PRAGMA

Definition at line 157 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_CW   1 /* write line buffer enable */

Definition at line 116 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_INTEGER   3 /* data alignment */

Definition at line 113 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_PACK   4 /* pack data enable */

Definition at line 112 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_PRECISE_INC   6 /* increment 0=when possible, */

Definition at line 108 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_RL   0 /* read line buffer enable */

Definition at line 117 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_RST_ERROR_NO   5 /* don't reset errors on */

Definition at line 110 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_RSV   7 /* reserved pragma bit */

Definition at line 107 of file bestcomm_priv.h.

#define BCOM_PRAGMA_BIT_SPECREAD   2 /* XLB speculative read */

Definition at line 115 of file bestcomm_priv.h.

#define BCOM_STD_PRAGMA
Value:

Definition at line 124 of file bestcomm_priv.h.

#define BCOM_TASK_MAGIC   0x4243544B /* 'BCTK' */

Definition at line 89 of file bestcomm_priv.h.

#define BCOM_VAR_ALIGN   0x80

Definition at line 44 of file bestcomm_priv.h.

#define BCOM_VAR_SIZE   (BCOM_MAX_VAR * sizeof(u32))

Definition at line 42 of file bestcomm_priv.h.

#define TASK_ENABLE   0x8000

Definition at line 242 of file bestcomm_priv.h.

Function Documentation

int bcom_load_image ( int  task,
u32 task_image 
)

Definition at line 139 of file bestcomm.c.

void bcom_set_initiator ( int  task,
int  initiator 
)

Definition at line 204 of file bestcomm.c.

struct bcom_task* bcom_task_alloc ( int  bd_count,
int  bd_size,
int  priv_size 
)
read

Definition at line 50 of file bestcomm.c.

void bcom_task_free ( struct bcom_task tsk)

Definition at line 121 of file bestcomm.c.

Variable Documentation

struct bcom_engine* bcom_eng

Definition at line 40 of file bestcomm.c.