/******************************************************************************/
/*                       Copyright 2001 Broadcom Corporation                  */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corp.  It may not be reproduced, used, sold or transferred to  */
/* any third party without the prior written consent of Broadcom Corp.        */
/* All rights reserved.                                                       */
/******************************************************************************/
/*   FileName        : bcm_transfer.h                                         */
/*   Purpose         : Header file for the transfer layer using memory map    */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 26-Nov-2001                                            */
/*   History         : Compiled by CCS                                        */
/******************************************************************************/
/*   $Id: bcm_transfer.h,v 1.10 2004/06/22 13:51:08 hanssens Exp $  */
/******************************************************************************/

#ifndef TRANSFER_H
# define TRANSFER_H

# include "bcm_userdef.h"

# define DEV_ADDRESS(device) ((BASE_ADDRESS)+(device%2)*(OFFSET_ADDRESS) + ((device/2)*0x40000))
//# define DEV_ADDRESS(device) ((BASE_ADDRESS)+(device)*(OFFSET_ADDRESS))

/* access type */
typedef enum {BCM_READ=1, BCM_WRITE=0} access_t;

/* functions declarations */
void transferDriverInit(void);
void transferReq(uint32 dev_address, access_t access, uint32 address, 
                 uint8 *data, uint32 size);
void transferClose(void);
void transferResetBCM6410(uint16 devId);

#endif
