/****************************************************************************
*
*	Name:			FwInit.h
*
*	Description:	Firmware Initialization routines header file.
*
*	Copyright:		(c) 1999 Conexant Systems Inc.
*
*	Revision:	Date:		Author:				Description:
*
*	Linux-1.0	May 29 2002	Shen Wei Wang			Created.
*					shenwei.wang@conexant.com
*
*****************************************************************************
*	$Author:   Shen Wei Wang  $
*	$Revision:   1.0  $
*	$Modtime:   May 29 2002 11:09:58  $
****************************************************************************/

#ifndef FWINIT_H_
#define FWINIT_H_


#define CONFIG_FILE_NAME	"/etc/Config.dat"
#define FIRMWARE_FILE_NAME	"/etc/CnxE2Fw.bin"

typedef enum
{
	USB_CMD_ERR,
	USB_GET_VER,
	USB_READ_MEM,
	USB_WRITE_MEM,
	USB_RMW_MEM,
	USB_CHECKSUM_MEM,
	USB_GOTO_MEM
} BL_COMMAND;

typedef struct tagUSBCMDSTRUCT 
{
	BYTE  USBCmd;
	BYTE  ByteCount;
	BYTE  AccessType;
	BYTE  AckRequest;
	DWORD dwAddress;
	BYTE  USBData[56];
} USBCMDSTRUCT, *PUSBCMDSTRUCT;  

/****************************************************************************
*  Macro definitions
****************************************************************************/

#ifdef DEBUG
#define DBG_PRINT10(arg...)  printk( __FILE__ ":" __FUNCTION__"-->" arg)
#define DBG_PRINT00(arg...)  printk( __FILE__ ":" __FUNCTION__"-->" arg)

#else
#define DBG_PRINT00(arg...)
#define DBG_PRINT10(arg...)
#endif


#define ROUND(Exp, Base)				\
(							\
	(((Exp) + (Base) - 1) / (Base)) * (Base)	\
)							\

#define MEMORY_ALLOCATE(s)				\
(							\
	vmalloc (s)					\
)		

#define MEMORY_VFREE(s)					\
(							\
	vfree (s)					\
)		

#define MEMORY_ZERO(pDst, uLength) \
		memset((pDst), \
		0, (uLength))
		
#endif


