Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ft1000_download.c File Reference
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/usb.h>
#include <linux/vmalloc.h>
#include "ft1000_usb.h"

Go to the source code of this file.

Data Structures

struct  dsp_file_hdr
 
struct  dsp_image_info
 

Macros

#define DWNLD_HANDSHAKE_LOC   0x02
 
#define DWNLD_TYPE_LOC   0x04
 
#define DWNLD_SIZE_MSW_LOC   0x06
 
#define DWNLD_SIZE_LSW_LOC   0x08
 
#define DWNLD_PS_HDR_LOC   0x0A
 
#define MAX_DSP_WAIT_LOOPS   40
 
#define DSP_WAIT_SLEEP_TIME   1000 /* 1 millisecond */
 
#define DSP_WAIT_DISPATCH_LVL   50 /* 50 usec */
 
#define HANDSHAKE_TIMEOUT_VALUE   0xF1F1
 
#define HANDSHAKE_RESET_VALUE   0xFEFE /* When DSP requests startover */
 
#define HANDSHAKE_RESET_VALUE_USB   0xFE7E /* When DSP requests startover */
 
#define HANDSHAKE_DSP_BL_READY   0xFEFE /* At start DSP writes this when bootloader ready */
 
#define HANDSHAKE_DSP_BL_READY_USB   0xFE7E /* At start DSP writes this when bootloader ready */
 
#define HANDSHAKE_DRIVER_READY   0xFFFF /* Driver writes after receiving 0xFEFE */
 
#define HANDSHAKE_SEND_DATA   0x0000 /* DSP writes this when ready for more data */
 
#define HANDSHAKE_REQUEST   0x0001 /* Request from DSP */
 
#define HANDSHAKE_RESPONSE   0x0000 /* Satisfied DSP request */
 
#define REQUEST_CODE_LENGTH   0x0000
 
#define REQUEST_RUN_ADDRESS   0x0001
 
#define REQUEST_CODE_SEGMENT   0x0002 /* In WORD count */
 
#define REQUEST_DONE_BL   0x0003
 
#define REQUEST_DONE_CL   0x0004
 
#define REQUEST_VERSION_INFO   0x0005
 
#define REQUEST_CODE_BY_VERSION   0x0006
 
#define REQUEST_MAILBOX_DATA   0x0007
 
#define REQUEST_FILE_CHECKSUM   0x0008
 
#define STATE_START_DWNLD   0x01
 
#define STATE_BOOT_DWNLD   0x02
 
#define STATE_CODE_DWNLD   0x03
 
#define STATE_DONE_DWNLD   0x04
 
#define STATE_SECTION_PROV   0x05
 
#define STATE_DONE_PROV   0x06
 
#define STATE_DONE_FILE   0x07
 
#define MAX_LENGTH   0x7f0
 
#define DWNLD_MAG_TYPE_LOC   0x00
 
#define DWNLD_MAG_LEN_LOC   0x01
 
#define DWNLD_MAG_ADDR_LOC   0x02
 
#define DWNLD_MAG_CHKSUM_LOC   0x03
 
#define DWNLD_MAG_VAL_LOC   0x04
 
#define HANDSHAKE_MAG_DSP_BL_READY   0xFEFE0000 /* At start DSP writes this when bootloader ready */
 
#define HANDSHAKE_MAG_DSP_ENTRY   0x01000000 /* Dsp writes this to request for entry address */
 
#define HANDSHAKE_MAG_DSP_DATA   0x02000000 /* Dsp writes this to request for data block */
 
#define HANDSHAKE_MAG_DSP_DONE   0x03000000 /* Dsp writes this to indicate download done */
 
#define HANDSHAKE_MAG_DRV_READY   0xFFFF0000 /* Driver writes this to indicate ready to download */
 
#define HANDSHAKE_MAG_DRV_DATA   0x02FECDAB /* Driver writes this to indicate data available to DSP */
 
#define HANDSHAKE_MAG_DRV_ENTRY   0x01FECDAB /* Driver writes this to indicate entry point to DSP */
 
#define HANDSHAKE_MAG_TIMEOUT_VALUE   0xF1F1
 
#define DWNLD_MAG1_HANDSHAKE_LOC   0x00
 
#define DWNLD_MAG1_TYPE_LOC   0x01
 
#define DWNLD_MAG1_SIZE_LOC   0x02
 
#define DWNLD_MAG1_PS_HDR_LOC   0x03
 

Functions

u16 scram_dnldr (struct ft1000_device *ft1000dev, void *pFileStart, u32 FileLength)
 

Variables

struct dsp_file_hdr __attribute__
 

Macro Definition Documentation

#define DSP_WAIT_DISPATCH_LVL   50 /* 50 usec */

Definition at line 29 of file ft1000_download.c.

#define DSP_WAIT_SLEEP_TIME   1000 /* 1 millisecond */

Definition at line 28 of file ft1000_download.c.

#define DWNLD_HANDSHAKE_LOC   0x02

Definition at line 21 of file ft1000_download.c.

#define DWNLD_MAG1_HANDSHAKE_LOC   0x00

Definition at line 82 of file ft1000_download.c.

#define DWNLD_MAG1_PS_HDR_LOC   0x03

Definition at line 85 of file ft1000_download.c.

#define DWNLD_MAG1_SIZE_LOC   0x02

Definition at line 84 of file ft1000_download.c.

#define DWNLD_MAG1_TYPE_LOC   0x01

Definition at line 83 of file ft1000_download.c.

#define DWNLD_MAG_ADDR_LOC   0x02

Definition at line 65 of file ft1000_download.c.

#define DWNLD_MAG_CHKSUM_LOC   0x03

Definition at line 66 of file ft1000_download.c.

#define DWNLD_MAG_LEN_LOC   0x01

Definition at line 64 of file ft1000_download.c.

#define DWNLD_MAG_TYPE_LOC   0x00

Definition at line 63 of file ft1000_download.c.

#define DWNLD_MAG_VAL_LOC   0x04

Definition at line 67 of file ft1000_download.c.

#define DWNLD_PS_HDR_LOC   0x0A

Definition at line 25 of file ft1000_download.c.

#define DWNLD_SIZE_LSW_LOC   0x08

Definition at line 24 of file ft1000_download.c.

#define DWNLD_SIZE_MSW_LOC   0x06

Definition at line 23 of file ft1000_download.c.

#define DWNLD_TYPE_LOC   0x04

Definition at line 22 of file ft1000_download.c.

#define HANDSHAKE_DRIVER_READY   0xFFFF /* Driver writes after receiving 0xFEFE */

Definition at line 36 of file ft1000_download.c.

#define HANDSHAKE_DSP_BL_READY   0xFEFE /* At start DSP writes this when bootloader ready */

Definition at line 34 of file ft1000_download.c.

#define HANDSHAKE_DSP_BL_READY_USB   0xFE7E /* At start DSP writes this when bootloader ready */

Definition at line 35 of file ft1000_download.c.

#define HANDSHAKE_MAG_DRV_DATA   0x02FECDAB /* Driver writes this to indicate data available to DSP */

Definition at line 75 of file ft1000_download.c.

#define HANDSHAKE_MAG_DRV_ENTRY   0x01FECDAB /* Driver writes this to indicate entry point to DSP */

Definition at line 76 of file ft1000_download.c.

#define HANDSHAKE_MAG_DRV_READY   0xFFFF0000 /* Driver writes this to indicate ready to download */

Definition at line 74 of file ft1000_download.c.

#define HANDSHAKE_MAG_DSP_BL_READY   0xFEFE0000 /* At start DSP writes this when bootloader ready */

Definition at line 69 of file ft1000_download.c.

#define HANDSHAKE_MAG_DSP_DATA   0x02000000 /* Dsp writes this to request for data block */

Definition at line 71 of file ft1000_download.c.

#define HANDSHAKE_MAG_DSP_DONE   0x03000000 /* Dsp writes this to indicate download done */

Definition at line 72 of file ft1000_download.c.

#define HANDSHAKE_MAG_DSP_ENTRY   0x01000000 /* Dsp writes this to request for entry address */

Definition at line 70 of file ft1000_download.c.

#define HANDSHAKE_MAG_TIMEOUT_VALUE   0xF1F1

Definition at line 78 of file ft1000_download.c.

#define HANDSHAKE_REQUEST   0x0001 /* Request from DSP */

Definition at line 39 of file ft1000_download.c.

#define HANDSHAKE_RESET_VALUE   0xFEFE /* When DSP requests startover */

Definition at line 32 of file ft1000_download.c.

#define HANDSHAKE_RESET_VALUE_USB   0xFE7E /* When DSP requests startover */

Definition at line 33 of file ft1000_download.c.

#define HANDSHAKE_RESPONSE   0x0000 /* Satisfied DSP request */

Definition at line 40 of file ft1000_download.c.

#define HANDSHAKE_SEND_DATA   0x0000 /* DSP writes this when ready for more data */

Definition at line 37 of file ft1000_download.c.

#define HANDSHAKE_TIMEOUT_VALUE   0xF1F1

Definition at line 31 of file ft1000_download.c.

#define MAX_DSP_WAIT_LOOPS   40

Definition at line 27 of file ft1000_download.c.

#define MAX_LENGTH   0x7f0

Definition at line 60 of file ft1000_download.c.

#define REQUEST_CODE_BY_VERSION   0x0006

Definition at line 48 of file ft1000_download.c.

#define REQUEST_CODE_LENGTH   0x0000

Definition at line 42 of file ft1000_download.c.

#define REQUEST_CODE_SEGMENT   0x0002 /* In WORD count */

Definition at line 44 of file ft1000_download.c.

#define REQUEST_DONE_BL   0x0003

Definition at line 45 of file ft1000_download.c.

#define REQUEST_DONE_CL   0x0004

Definition at line 46 of file ft1000_download.c.

#define REQUEST_FILE_CHECKSUM   0x0008

Definition at line 50 of file ft1000_download.c.

#define REQUEST_MAILBOX_DATA   0x0007

Definition at line 49 of file ft1000_download.c.

#define REQUEST_RUN_ADDRESS   0x0001

Definition at line 43 of file ft1000_download.c.

#define REQUEST_VERSION_INFO   0x0005

Definition at line 47 of file ft1000_download.c.

#define STATE_BOOT_DWNLD   0x02

Definition at line 53 of file ft1000_download.c.

#define STATE_CODE_DWNLD   0x03

Definition at line 54 of file ft1000_download.c.

#define STATE_DONE_DWNLD   0x04

Definition at line 55 of file ft1000_download.c.

#define STATE_DONE_FILE   0x07

Definition at line 58 of file ft1000_download.c.

#define STATE_DONE_PROV   0x06

Definition at line 57 of file ft1000_download.c.

#define STATE_SECTION_PROV   0x05

Definition at line 56 of file ft1000_download.c.

#define STATE_START_DWNLD   0x01

Definition at line 52 of file ft1000_download.c.

Function Documentation

u16 scram_dnldr ( struct ft1000_device ft1000dev,
void pFileStart,
u32  FileLength 
)

Definition at line 685 of file ft1000_download.c.

Variable Documentation