Commit a41ee6f7 authored by Bruno Gomes's avatar Bruno Gomes

LIBIOP: remove old iop files dependency. Further cleanup executed.

refs #112663
parent cb85b22c
......@@ -17,7 +17,6 @@
#include <IOPgr1553b.h>
#include <IOPgr1553bc.h>
#include <IOPgr1553rt.h>
#include <IOPdriverconfig_interface.h>
uint32_t gr1553b_initialize(iop_device_driver_t *iop_dev, void *arg)
{
......@@ -59,8 +58,6 @@ uint32_t gr1553b_initialize(iop_device_driver_t *iop_dev, void *arg)
}
/* Clear pointers. These fields will be filled later*/
bdev->cl = NULL;
bdev->cl_size = 0;
bdev->buf_mem_start = (milstd_data_buf *) NULL;
bdev->sync = NULL;
bdev->last_read = NULL;
......@@ -104,13 +101,13 @@ uint32_t gr1553b_initialize(iop_device_driver_t *iop_dev, void *arg)
uint32_t gr1553b_open(iop_device_driver_t *iop_dev, void *arg)
{
/* Get driver priv struct */
iop_1553_device_t *device = (iop_1553_device_t *) iop_dev;
grb_priv *bdev = (grb_priv *) (device->dev.driver);
/* Get driver priv struct */
iop_1553_device_t *device = (iop_1553_device_t *) iop_dev;
grb_priv *bdev = (grb_priv *) (device->dev.driver);
/* return code */
air_status_code_e status = AIR_SUCCESSFUL;
/* Initialize the device according to the selected operative mode */
switch (bdev->user_config->operating_mode) {
......@@ -145,9 +142,9 @@ uint32_t gr1553b_open(iop_device_driver_t *iop_dev, void *arg)
uint32_t gr1553b_close(iop_device_driver_t *iop_dev, void *arg)
{
/* Get driver priv struct */
iop_1553_device_t *device = (iop_1553_device_t *) iop_dev;
grb_priv *bdev = (grb_priv *) (device->dev.driver);
/* Get driver priv struct */
iop_1553_device_t *device = (iop_1553_device_t *) iop_dev;
grb_priv *bdev = (grb_priv *) (device->dev.driver);
/* return code */
air_status_code_e status = AIR_SUCCESSFUL;
......
......@@ -32,13 +32,30 @@
#include <iop_error.h>
#include <IOPgr1553b.h>
#include <IOPgr1553bc.h>
#include <IOPmilstd_config.h>
#include <IOPdriverconfig_interface.h>
#include <bsp.h>
/** returns the first address found after p that is aligned with c */
#define MEM_ALIGN(p,c) ((((unsigned int)(p))+((c)-1)) & ~((c)-1))
/**
* @brief Returns the virtual address of a physical address
* which was already converted from a virtual address
*/
static unsigned long get_virtual_addr(grb_priv *priv, unsigned long p_addr)
{
/* Iterator */
int i;
/* Go through all the addresses that were converted previously */
for(i = 0; i < (priv->cl_size + 2); i++){
/* Check if the physical address is matching and return the virtual address */
if(priv->hwlist[i].p_addr == p_addr){
return priv->hwlist[i].v_addr;
}
}
return 0;
}
/* Reset software and BC hardware into a known "unused/init" state */
void gr1553bc_device_init(grb_priv *priv)
{
......@@ -326,7 +343,7 @@ static inline void clear_acessed_bit(volatile uint32_t *sw)
}
static int update_command(struct gr1553bc_bd_tr *desc, iop_buffer_t *buf){
static int update_command(grb_priv *priv, iop_buffer_t *buf){
int rc = 0;
......@@ -345,6 +362,8 @@ static int update_command(struct gr1553bc_bd_tr *desc, iop_buffer_t *buf){
/* milstd header */
milstd_header_t *hdr;
struct gr1553bc_bd_tr *desc = priv->last_read;
trbit = ((desc->settings[1] >> 10) & 0x1);
subaddress2 = ((desc->settings[1] >> 16) & 0x1f);
......@@ -378,7 +397,7 @@ static int update_command(struct gr1553bc_bd_tr *desc, iop_buffer_t *buf){
if((wcmc == 16) || (wcmc == 18) || (wcmc == 19)){
/* copy received data to user buffer */
memcpy(get_payload(buf), (void *)get_virtual_addr(desc->dptr), 2);
memcpy(get_payload(buf), (void *)get_virtual_addr(priv, desc->dptr), 2);
/* data length */
buf->payload_size = 2;
......@@ -406,7 +425,7 @@ static int update_command(struct gr1553bc_bd_tr *desc, iop_buffer_t *buf){
}
/* copy received data to user buffer */
memcpy(get_payload(buf), (void *)get_virtual_addr(desc->dptr), wcmc*2);
memcpy(get_payload(buf), (void *)get_virtual_addr(priv, desc->dptr), wcmc*2);
/* data length */
buf->payload_size = wcmc*2;
......@@ -493,7 +512,7 @@ uint32_t gr1553bc_read(iop_device_driver_t *iop_dev, void *arg)
} else{
/* descriptor was acessed, so obtain any data and check for errors */
if(update_command(current, wrapper->buffer) == 1){
if(update_command(priv, wrapper->buffer) == 1){
/* data was successfully read */
end = 1;
......@@ -507,7 +526,7 @@ uint32_t gr1553bc_read(iop_device_driver_t *iop_dev, void *arg)
} else { /*< branch */
/*follow branch and update last_read */
priv->last_read = (struct gr1553bc_bd_tr *) get_virtual_addr(current->settings[1]);
priv->last_read = (struct gr1553bc_bd_tr *) get_virtual_addr(priv, current->settings[1]);
}
......@@ -556,7 +575,7 @@ uint32_t gr1553bc_write(iop_device_driver_t *iop_dev, void *arg)
if(desc != NULL){
/* lets copy the data */
memcpy((void *)get_virtual_addr(desc->dptr), (void *)get_payload(wrapper->buffer), get_payload_size(wrapper->buffer));
memcpy((void *)get_virtual_addr(priv, desc->dptr), (void *)get_payload(wrapper->buffer), get_payload_size(wrapper->buffer));
/* and enable the descriptor. Clear dummy bit */
desc->settings[1] &= ~GR1553BC_TR_DUMMY_1;
......@@ -607,8 +626,8 @@ air_status_code_e gr1553bc_erase_async_data(grb_priv *priv)
iop_debug("Erasing 1553 asynchronous list\n");
/* Erase the asynchronous blocks */
memset(priv->async, 0, (iop_milstd_get_async_command_list_size()-1) * 16);
memset(priv->async_buf_mem_start, 0, (iop_milstd_get_async_command_list_size()-1) * 2 * 32);
memset(priv->async, 0, (priv->a_cl_size-1) * 16);
memset(priv->async_buf_mem_start, 0, (priv->a_cl_size-1) * 2 * 32);
return AIR_SUCCESSFUL;
}
......@@ -649,7 +668,7 @@ air_status_code_e gr1553bc_add_async_data(grb_priv *priv, uint8_t *data, milstd_
wcmc = ((size + 1) / 2) % 32;
/* Find the next available slot in the asynchronous command list */
for(i = 0; i < iop_milstd_get_async_command_list_size()-1; i++){
for(i = 0; i < priv->a_cl_size-1; i++){
/* An empty list should have a null pointer*/
if(priv->async[i].dptr == 0){
break;
......@@ -657,7 +676,7 @@ air_status_code_e gr1553bc_add_async_data(grb_priv *priv, uint8_t *data, milstd_
}
/* If the end of the list is reached then there is no available slot */
if(i == iop_milstd_get_async_command_list_size()-1){
if(i == priv->a_cl_size-1){
iop_raise_error(QUEUE_OVERFLOW);
return AIR_NOT_AVAILABLE;
}
......@@ -702,9 +721,6 @@ static void translate_command(grb_priv *priv, unsigned int offset, unsigned int
/* Current bc descriptor */
struct gr1553bc_bd_tr *desc;
/* Get list of matching physical/virtual addresses*/
gr1553hwaddr *gr1553hwlist = iop_get_gr1553hwlist();
/* user command list*/
user_list = &priv->cl[offset];
......@@ -719,10 +735,9 @@ static void translate_command(grb_priv *priv, unsigned int offset, unsigned int
word0 = GR1553BC_UNCOND_JMP;
/* Calculate branch address */
gr1553hwlist[offset].v_addr = (uint32_t) (&priv->sync[0] + (user_list->branch_offset));
gr1553hwlist[offset].p_addr = (uint32_t) air_syscall_get_physical_addr((uintptr_t)gr1553hwlist[offset].v_addr);
word1 = gr1553hwlist[offset].p_addr;
priv->hwlist[offset].v_addr = (uint32_t) (&priv->sync[0] + (user_list->branch_offset));
priv->hwlist[offset].p_addr = (uint32_t) air_syscall_get_physical_addr((uintptr_t)priv->hwlist[offset].v_addr);
word1 = priv->hwlist[offset].p_addr;
/* No data pointer */
dptr = (uint32_t) NULL;
......@@ -737,8 +752,8 @@ static void translate_command(grb_priv *priv, unsigned int offset, unsigned int
/* No data pointer */
dptr = (uint32_t) NULL;
gr1553hwlist[offset].v_addr = 0;
gr1553hwlist[offset].p_addr = 0;
priv->hwlist[offset].v_addr = 0;
priv->hwlist[offset].p_addr = 0;
} else { /*< Transfer */
......@@ -775,14 +790,14 @@ static void translate_command(grb_priv *priv, unsigned int offset, unsigned int
}
/* Calculate data buffer position */
gr1553hwlist[offset].v_addr = (uint32_t) (&priv->buf_mem_start[(*data_offset)][0]);
gr1553hwlist[offset].p_addr = (uint32_t) air_syscall_get_physical_addr((uintptr_t)gr1553hwlist[offset].v_addr);
dptr = gr1553hwlist[offset].p_addr;
priv->hwlist[offset].v_addr = (uint32_t) (&priv->buf_mem_start[(*data_offset)][0]);
priv->hwlist[offset].p_addr = (uint32_t) air_syscall_get_physical_addr((uintptr_t)priv->hwlist[offset].v_addr);
dptr = priv->hwlist[offset].p_addr;
/* increment data offset*/
(*data_offset)++;
}
/* Store words in the final descriptors */
desc->settings[0] = word0;
desc->settings[1] = word1;
......@@ -797,28 +812,12 @@ static void translate_command(grb_priv *priv, unsigned int offset, unsigned int
void gr1553bc_init_list(grb_priv *priv)
{
/* User defined command list */
bc_command_t *cl;
/* command list size */
int cl_size;
/* Iterator */
int i;
/* data offset used to split data memory in 64 bytes buffers */
unsigned int data_offset = 0;
/* get user defined command list */
cl = iop_milstd_get_command_list();
/* get user defined BC command list size */
cl_size = iop_milstd_get_command_list_size();
/* store user command list information */
priv->cl = cl;
priv->cl_size = cl_size;
/* Align memory to a 16 bytes boundary */
priv->mem_start = (void *) MEM_ALIGN(priv->mem_start, GR1553BC_BD_ALIGN);
......@@ -827,18 +826,18 @@ void gr1553bc_init_list(grb_priv *priv)
/* next block to be read */
priv->last_read = priv->mem_start;
/* memory after the command list is used to store data buffers */
priv->buf_mem_start = (milstd_data_buf *)(((uint32_t *)priv->sync) + (cl_size*4));
priv->buf_mem_start = (milstd_data_buf *)(((uint32_t *)priv->sync) + (priv->cl_size*4));
/* memory after the data buffers used to store the asynchronous command list */
priv->async = (struct gr1553bc_bd_tr *)(((uint32_t *)priv->buf_mem_start) + (iop_milstd_get_data_buffers_size()*16));
priv->async = (struct gr1553bc_bd_tr *)(((uint32_t *)priv->buf_mem_start) + (priv->data_buffer_size*16));
/* memory after the async command list is used to store async data buffers */
priv->async_buf_mem_start = (milstd_data_buf *)(((uint32_t *)priv->async) + (iop_milstd_get_async_command_list_size()*4));
priv->async_buf_mem_start = (milstd_data_buf *)(((uint32_t *)priv->async) + (priv->a_cl_size*4));
/* iterate over all user defined bc commands */
for(i = 0; i < cl_size; i++){
for(i = 0; i < priv->cl_size; i++){
/* lets translate the bc command list to something the hw can understand */
translate_command(priv, i, &data_offset);
......@@ -846,8 +845,8 @@ void gr1553bc_init_list(grb_priv *priv)
}
/* Last async command ends list */
if(iop_milstd_get_async_command_list_size())
priv->async[iop_milstd_get_async_command_list_size() - 1].settings[0] = 0x800000FF;
if(priv->a_cl_size)
priv->async[priv->a_cl_size - 1].settings[0] = 0x800000FF;
}
/**
......@@ -858,9 +857,6 @@ void gr1553bc_start_sync(grb_priv *priv)
{
uint32_t ctrl;
/* Get list of matching physical/virtual addresses*/
gr1553hwaddr *gr1553hwlist = iop_get_gr1553hwlist();
/* BC control register is protected by a key */
ctrl = GR1553BC_KEY;
......@@ -871,9 +867,9 @@ void gr1553bc_start_sync(grb_priv *priv)
ctrl |= GR1553B_BC_ACT_SCSRT;
/* write transfer list pointer register */
gr1553hwlist[iop_milstd_get_command_list_size()].v_addr = (uint32_t) priv->sync;
gr1553hwlist[iop_milstd_get_command_list_size()].p_addr = (uint32_t)air_syscall_get_physical_addr((uintptr_t)priv->sync);
GR1553BC_WRITE_REG(&priv->regs->bc_bd, gr1553hwlist[iop_milstd_get_command_list_size()].p_addr);
priv->hwlist[priv->cl_size].v_addr = (uint32_t) priv->sync;
priv->hwlist[priv->cl_size].p_addr = (uint32_t)air_syscall_get_physical_addr((uintptr_t)priv->sync);
GR1553BC_WRITE_REG(&priv->regs->bc_bd, priv->hwlist[priv->cl_size].p_addr);
}
/* If not enabled before, we enable it now. */
......@@ -900,9 +896,6 @@ void gr1553bc_start_async(grb_priv *priv)
{
uint32_t ctrl;
/* Get list of matching physical/virtual addresses*/
gr1553hwaddr *gr1553hwlist = iop_get_gr1553hwlist();
/* Get device's internal structure */
ctrl = GR1553BC_KEY;
......@@ -913,9 +906,9 @@ void gr1553bc_start_async(grb_priv *priv)
ctrl |= GR1553B_BC_ACT_ASSRT;
/* write transfer list pointer register */
gr1553hwlist[iop_milstd_get_command_list_size() + 1].v_addr = (uint32_t) priv->async;
gr1553hwlist[iop_milstd_get_command_list_size() + 1].p_addr = (uint32_t)air_syscall_get_physical_addr((uintptr_t)priv->async);
GR1553BC_WRITE_REG(&priv->regs->bc_abd, gr1553hwlist[iop_milstd_get_command_list_size() + 1].p_addr);
priv->hwlist[priv->cl_size + 1].v_addr = (uint32_t) priv->async;
priv->hwlist[priv->cl_size + 1].p_addr = (uint32_t)air_syscall_get_physical_addr((uintptr_t)priv->async);
GR1553BC_WRITE_REG(&priv->regs->bc_abd, priv->hwlist[priv->cl_size + 1].p_addr);
}
GR1553BC_WRITE_REG(&priv->regs->bc_ctrl, ctrl);
......@@ -932,25 +925,3 @@ void gr1553bc_start_async(grb_priv *priv)
return;
}
/**
* @brief Returns the virtual address of a physical address
* which was already converted from a virtual address
*/
unsigned long get_virtual_addr(unsigned long p_addr)
{
/* Iterator */
int i;
/* Get list of matching physical/virtual addresses*/
gr1553hwaddr *gr1553hwlist = iop_get_gr1553hwlist();
/* Go through all the addresses that were converted previously */
for(i = 0; i < (iop_milstd_get_command_list_size() + 2); i++){
/* Check if the physical address is matching and return the virtual address */
if(gr1553hwlist[i].p_addr == p_addr){
return gr1553hwlist[i].v_addr;
}
}
return 0;
}
......@@ -29,12 +29,8 @@
#include <IOPgr1553rt.h>
#include <iop_error.h>
#include <IOPlibio.h>
#include <iop.h>
#include <bsp.h>
#include <IOPmilstd_config.h>
#include <IOPdriverconfig_interface.h>
#define GR1553RT_WRITE_MEM(adr, val) *(volatile uint32_t *)(adr) = (val)
......@@ -201,7 +197,7 @@ uint32_t gr1553rt_read(iop_device_driver_t *iop_dev, void *arg){
grb_priv *priv = (grb_priv *) (device->dev.driver);
/* user arguments*/
libio_rw_args_t *rw_args = (libio_rw_args_t *) arg;
iop_wrapper_t *wrapper = (iop_wrapper_t *) arg;
/* block descriptor */
struct gr1553rt_bd *bd;
......@@ -213,8 +209,8 @@ uint32_t gr1553rt_read(iop_device_driver_t *iop_dev, void *arg){
unsigned int buf_per_sub = priv->user_config->databufs_per_sub;
/* Verify if the user correctly provided data and header*/
if((rw_args->data == NULL) || (rw_args->hdr == NULL)){
/* Verify if the user correctly provided data*/
if(get_payload(wrapper->buffer) == NULL){
return AIR_INVALID_PARAM;
}
......@@ -248,16 +244,15 @@ uint32_t gr1553rt_read(iop_device_driver_t *iop_dev, void *arg){
if((wc > 0) /*&& (sw == 0)*/){
/* Insert data size */
rw_args->bytes_moved = rw_args->data_len = wc*2;
wrapper->buffer->payload_size= wc*2;
/* copy data to user's buffer */
memcpy(rw_args->data, (void *)bd->dptr, wc*2);
memcpy(get_payload(wrapper->buffer), (void *)bd->dptr, wc*2);
milstd_header_t * hdr = (milstd_header_t *)get_header(wrapper->buffer);
/* copy subaddress */
rw_args->hdr[0] = i;
/* header length is always 1*/
rw_args->hdr_len = 1;
hdr->address = i;
/* re-enable the block descriptor (unset data valid bit)*/
bd->ctrl = 0;
......@@ -310,9 +305,6 @@ uint32_t gr1553rt_write(iop_device_driver_t *iop_dev, void *arg){
iop_1553_device_t *device = (iop_1553_device_t *) iop_dev;
grb_priv *priv = (grb_priv *) (device->dev.driver);
/* user arguments*/
libio_rw_args_t *rw_args = (libio_rw_args_t *) arg;
/* subaddress table */
struct gr1553rt_sa *table = priv->sa_table;
......@@ -322,20 +314,21 @@ uint32_t gr1553rt_write(iop_device_driver_t *iop_dev, void *arg){
unsigned int suba;
unsigned int wc;
iop_wrapper_t *wrapper = (iop_wrapper_t *) arg;
milstd_header_t * hdr = (milstd_header_t *)get_header(wrapper->buffer);
/* Verify if user request does not exceed the maximum data size for milstd*/
if(rw_args->data_len > 64){
if(get_payload_size(wrapper->buffer) > 64){
return AIR_INVALID_CONFIG;
}
/* Verify if the user correctly provided data and header*/
if((rw_args->data == NULL) || (rw_args->hdr == NULL)){
/* Verify if the user correctly provided data*/
if(get_payload(wrapper->buffer) == NULL){
return AIR_INVALID_PARAM;
}
/* Get target subaddress */
suba = *((unsigned char *)rw_args->hdr) & 0x7F;
suba = hdr->address;
/* verify if we have a valid subaddress */
if((suba < 0) || (suba > 32)){
......@@ -350,7 +343,7 @@ uint32_t gr1553rt_write(iop_device_driver_t *iop_dev, void *arg){
bd = (struct gr1553rt_bd *) table->txptr;
/* get word count */
wc = rw_args->data_len/2;
wc = get_payload_size(wrapper->buffer)/2;
/* word count zero means 32 words */
if(wc == 32){
......@@ -370,13 +363,10 @@ uint32_t gr1553rt_write(iop_device_driver_t *iop_dev, void *arg){
}
/* copy data buffer */
memcpy((void *)bd->dptr, (void *)rw_args->data, rw_args->data_len);
memcpy((void *)bd->dptr, get_payload(wrapper->buffer), get_payload_size(wrapper->buffer));
/* insert word count in descriptor control word */
bd->ctrl = ((wc & 0x1F) << 3);
/* inform user of how much data was written*/
rw_args->bytes_moved = wc+2;
return AIR_SUCCESSFUL;
}
......@@ -49,7 +49,6 @@ extern "C" {
#include <iop.h>
#include <gr1553_support.h>
#include <IOPmilstd_config.h>
/*grb_user_config_t operating modes*/
#define GR1553B_MODE_BC 0x0 /**< Bus Controler Mode*/
......@@ -142,6 +141,14 @@ typedef struct {
typedef uint32_t milstd_data_buf[16];
/**
* @brief Store matching physical/virtual addresses used in the GR1553BC
*/
typedef struct {
uint32_t v_addr;
uint32_t p_addr;
} gr1553hwaddr;
/**
* @brief Internal BC driver structure
*/
......@@ -155,8 +162,10 @@ typedef struct {
void *mem_start; /**< pointer to device's memory */
/* bc specific */
bc_command_t *cl; /**< pointer to user's list */
unsigned int cl_size; /**< user command list size */
bc_command_t *cl; /**< pointer to user's list */
unsigned int cl_size; /**< user command list size */
unsigned int a_cl_size; /**< user async command list size */
struct gr1553bc_bd_tr *sync; /**< current bc command list */
struct gr1553bc_bd_tr *last_read; /**< current bc command list */
struct gr1553bc_bd_tr *async; /**< current bc asynchronous command list */
......@@ -166,6 +175,9 @@ typedef struct {
void *shortcut_cmd; /**< pointer to write_cmd_shortcut_t allocated memory */
unsigned int shortcut_offset; /**< index to where to put new shortcut */
gr1553hwaddr *hwlist; /**< physical to virtual adresses struct */
unsigned int data_buffer_size; /**< number of data commands */
/* rt specific */
struct gr1553rt_sa* sa_table; /**< Subaddress table used for RT mode */
struct gr1553rt_bd* bds_start; /**< Start Address for buffer descriptors */
......@@ -177,14 +189,6 @@ typedef struct {
} grb_priv;
/**
* @brief Store matching physical/virtual addresses used in the GR1553BC
*/
typedef struct {
uint32_t v_addr;
uint32_t p_addr;
} gr1553hwaddr;
/* Available Modes */
#define FEAT_BC 0x1
#define FEAT_RT 0x2
......
......@@ -43,10 +43,7 @@
#define __GR1553BC_H__
#include <iop.h>
#include <stdint.h>
#include <IOPgr1553b.h>
#include <IOPlibio.h>
#include <IOPmilstd_config.h>
/* A BC descriptor accessed as is */
struct gr1553bc_bd_raw {
......@@ -120,6 +117,4 @@ void gr1553bc_start_sync(grb_priv *priv);
air_status_code_e gr1553bc_add_async_data(grb_priv *priv, uint8_t *data, milstd_header_t *hdr, uint32_t size);
air_status_code_e gr1553bc_erase_async_data(grb_priv *priv);
unsigned long get_virtual_addr(unsigned long p_addr);
#endif
......@@ -39,10 +39,8 @@
#include <air.h>
#include <bsp.h>
#include <IOPlibio.h>
#include <IOPgrspw.h>
#include <spw_support.h>
#include <IOPdriverconfig_interface.h>
#define DBGSPW_IOCALLS 1
#define DBGSPW_TX 2
......
......@@ -20,7 +20,6 @@
#define __MIL1553BRM_H__
#include <iop.h>
#include <IOPlibio.h>
#ifdef __cplusplus
extern "C" {
......@@ -169,6 +168,7 @@ struct irq_log_list {
*/
typedef struct {
unsigned int memarea_base;
milstd_config_t * config;
struct brm_reg *regs; /**< BRM core registers */
/**
......@@ -347,32 +347,29 @@ typedef struct {
* Function set used to access the MilStd driver
* @{
*/
air_status_code_e brm_initialize(unsigned int major, unsigned int minor, void *arg);
air_status_code_e brm_open(unsigned int major, unsigned int minor, void *arg);
air_status_code_e brm_close(unsigned int major, unsigned int minor, void *arg);
air_status_code_e brm_read(unsigned int major, unsigned int minor, void *arg);
air_status_code_e brm_write(unsigned int major, unsigned int minor, void *arg);
air_status_code_e brm_control(unsigned int major, unsigned int minor, void *arg);
uint32_t brm_initialize(iop_device_driver_t *iop_dev, void *arg);
uint32_t brm_open(brm_priv *brm);
uint32_t brm_close(brm_priv *brm);
uint32_t brm_read(iop_device_driver_t *iop_dev, void *arg);
uint32_t brm_write(iop_device_driver_t *iop_dev, void *arg);
air_status_code_e brm_control(brm_priv *brm, void *arg);
unsigned int brm_get_operative_mode(int minor);
air_status_code_e brm_do_list(int minor);
air_status_code_e brm_list_done(int minor);
void *brm_get_memarea(int minor);
int brm_get_number_bc_blocks(int minor);
unsigned int brm_get_operative_mode(brm_priv *brm);
air_status_code_e brm_do_list(brm_priv *brm);
air_status_code_e brm_list_done(brm_priv *brm);
int brm_get_number_bc_blocks(brm_priv *brm);
void brm_bc_start_list(unsigned int minor);
void brm_bc_start_list(brm_priv *brm);
void brm_bc_stop_list(unsigned int minor);
void brm_bc_stop_list(brm_priv *brm);
air_status_code_e brm_bc_init_user_list(unsigned int minor);
air_status_code_e brm_bc_init_user_list(brm_priv *brm);
air_status_code_e brm_bc_process_completed_list(unsigned int minor,
libio_rw_args_t *rw_args);
uint32_t brm_bc_process_completed_list(iop_device_driver_t *iop_dev, void *arg);
air_status_code_e brm_bc_insert_new_data(unsigned int minor, uint8_t *data,
air_status_code_e brm_bc_insert_new_data(brm_priv *bDev, uint8_t *data,
milstd_header_t *hdr, unsigned int size);
/**@}*/
......