Commit fc549a05 authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman

staging: ft1000: Get rid of USHORT typedef usage.

Signed-off-by: default avatarMarek Belisko <marek.belisko@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d1674983
...@@ -653,12 +653,12 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command, ...@@ -653,12 +653,12 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
{ {
IOCTL_DPRAM_BLK *dpram_data; IOCTL_DPRAM_BLK *dpram_data;
//IOCTL_DPRAM_COMMAND dpram_command; //IOCTL_DPRAM_COMMAND dpram_command;
USHORT qtype; u16 qtype;
USHORT msgsz; u16 msgsz;
struct pseudo_hdr *ppseudo_hdr; struct pseudo_hdr *ppseudo_hdr;
u16 *pmsg; u16 *pmsg;
USHORT total_len; u16 total_len;
USHORT app_index; u16 app_index;
u16 status; u16 status;
//DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_SET_DPRAM called\n"); //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_SET_DPRAM called\n");
......
...@@ -126,7 +126,7 @@ struct dsp_image_info { ...@@ -126,7 +126,7 @@ struct dsp_image_info {
static ULONG check_usb_db (struct ft1000_device *ft1000dev) static ULONG check_usb_db (struct ft1000_device *ft1000dev)
{ {
int loopcnt; int loopcnt;
USHORT temp; u16 temp;
ULONG status; ULONG status;
loopcnt = 0; loopcnt = 0;
...@@ -190,7 +190,7 @@ static ULONG check_usb_db (struct ft1000_device *ft1000dev) ...@@ -190,7 +190,7 @@ static ULONG check_usb_db (struct ft1000_device *ft1000dev)
// Function: get_handshake // Function: get_handshake
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_device - device structure
// USHORT expected_value - the handshake value expected // u16 expected_value - the handshake value expected
// //
// Returns: handshakevalue - success // Returns: handshakevalue - success
// HANDSHAKE_TIMEOUT_VALUE - failure // HANDSHAKE_TIMEOUT_VALUE - failure
...@@ -200,9 +200,9 @@ static ULONG check_usb_db (struct ft1000_device *ft1000dev) ...@@ -200,9 +200,9 @@ static ULONG check_usb_db (struct ft1000_device *ft1000dev)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_value) static u16 get_handshake(struct ft1000_device *ft1000dev, u16 expected_value)
{ {
USHORT handshake; u16 handshake;
int loopcnt; int loopcnt;
ULONG status=0; ULONG status=0;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
...@@ -259,7 +259,7 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_val ...@@ -259,7 +259,7 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_val
// Function: put_handshake // Function: put_handshake
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_device - device structure
// USHORT handshake_value - handshake to be written // u16 handshake_value - handshake to be written
// //
// Returns: none // Returns: none
// //
...@@ -269,10 +269,10 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_val ...@@ -269,10 +269,10 @@ static USHORT get_handshake(struct ft1000_device *ft1000dev, USHORT expected_val
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void put_handshake(struct ft1000_device *ft1000dev,USHORT handshake_value) static void put_handshake(struct ft1000_device *ft1000dev,u16 handshake_value)
{ {
ULONG tempx; ULONG tempx;
USHORT tempword; u16 tempword;
ULONG status; ULONG status;
...@@ -280,18 +280,18 @@ static void put_handshake(struct ft1000_device *ft1000dev,USHORT handshake_value ...@@ -280,18 +280,18 @@ static void put_handshake(struct ft1000_device *ft1000dev,USHORT handshake_value
tempx = (ULONG)handshake_value; tempx = (ULONG)handshake_value;
tempx = ntohl(tempx); tempx = ntohl(tempx);
tempword = (USHORT)(tempx & 0xffff); tempword = (u16)(tempx & 0xffff);
status = ft1000_write_dpram16 (ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword, 0); status = ft1000_write_dpram16 (ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword, 0);
tempword = (USHORT)(tempx >> 16); tempword = (u16)(tempx >> 16);
status = ft1000_write_dpram16 (ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword, 1); status = ft1000_write_dpram16 (ft1000dev, DWNLD_MAG1_HANDSHAKE_LOC, tempword, 1);
status = ft1000_write_register(ft1000dev, FT1000_DB_DNLD_TX, FT1000_REG_DOORBELL); status = ft1000_write_register(ft1000dev, FT1000_DB_DNLD_TX, FT1000_REG_DOORBELL);
} }
static USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT expected_value) static u16 get_handshake_usb(struct ft1000_device *ft1000dev, u16 expected_value)
{ {
USHORT handshake; u16 handshake;
int loopcnt; int loopcnt;
USHORT temp; u16 temp;
ULONG status=0; ULONG status=0;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
...@@ -327,7 +327,7 @@ static USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT expected ...@@ -327,7 +327,7 @@ static USHORT get_handshake_usb(struct ft1000_device *ft1000dev, USHORT expected
return HANDSHAKE_TIMEOUT_VALUE; return HANDSHAKE_TIMEOUT_VALUE;
} }
static void put_handshake_usb(struct ft1000_device *ft1000dev,USHORT handshake_value) static void put_handshake_usb(struct ft1000_device *ft1000dev,u16 handshake_value)
{ {
int i; int i;
...@@ -346,11 +346,11 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,USHORT handshake_v ...@@ -346,11 +346,11 @@ static void put_handshake_usb(struct ft1000_device *ft1000dev,USHORT handshake_v
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static USHORT get_request_type(struct ft1000_device *ft1000dev) static u16 get_request_type(struct ft1000_device *ft1000dev)
{ {
USHORT request_type; u16 request_type;
ULONG status; ULONG status;
USHORT tempword; u16 tempword;
ULONG tempx; ULONG tempx;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
...@@ -367,18 +367,18 @@ static USHORT get_request_type(struct ft1000_device *ft1000dev) ...@@ -367,18 +367,18 @@ static USHORT get_request_type(struct ft1000_device *ft1000dev)
tempx |= (tempword << 16); tempx |= (tempword << 16);
tempx = ntohl(tempx); tempx = ntohl(tempx);
} }
request_type = (USHORT)tempx; request_type = (u16)tempx;
//DEBUG("get_request_type: request_type is %x\n", request_type); //DEBUG("get_request_type: request_type is %x\n", request_type);
return request_type; return request_type;
} }
static USHORT get_request_type_usb(struct ft1000_device *ft1000dev) static u16 get_request_type_usb(struct ft1000_device *ft1000dev)
{ {
USHORT request_type; u16 request_type;
ULONG status; ULONG status;
USHORT tempword; u16 tempword;
ULONG tempx; ULONG tempx;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
if ( pft1000info->bootmode == 1) if ( pft1000info->bootmode == 1)
...@@ -399,7 +399,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev) ...@@ -399,7 +399,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev)
tempx |= (tempword << 16); tempx |= (tempword << 16);
tempx = ntohl(tempx); tempx = ntohl(tempx);
} }
request_type = (USHORT)tempx; request_type = (u16)tempx;
//DEBUG("get_request_type: request_type is %x\n", request_type); //DEBUG("get_request_type: request_type is %x\n", request_type);
return request_type; return request_type;
...@@ -421,7 +421,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev) ...@@ -421,7 +421,7 @@ static USHORT get_request_type_usb(struct ft1000_device *ft1000dev)
static long get_request_value(struct ft1000_device *ft1000dev) static long get_request_value(struct ft1000_device *ft1000dev)
{ {
ULONG value; ULONG value;
USHORT tempword; u16 tempword;
ULONG status; ULONG status;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
...@@ -450,7 +450,7 @@ static long get_request_value(struct ft1000_device *ft1000dev) ...@@ -450,7 +450,7 @@ static long get_request_value(struct ft1000_device *ft1000dev)
static long get_request_value_usb(struct ft1000_device *ft1000dev) static long get_request_value_usb(struct ft1000_device *ft1000dev)
{ {
ULONG value; ULONG value;
USHORT tempword; u16 tempword;
ULONG status; ULONG status;
struct ft1000_info * pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info * pft1000info = netdev_priv(ft1000dev->net);
...@@ -516,10 +516,10 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue) ...@@ -516,10 +516,10 @@ static void put_request_value(struct ft1000_device *ft1000dev, long lvalue)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static USHORT hdr_checksum(struct pseudo_hdr *pHdr) static u16 hdr_checksum(struct pseudo_hdr *pHdr)
{ {
USHORT *usPtr = (USHORT *)pHdr; u16 *usPtr = (u16 *)pHdr;
USHORT chksum; u16 chksum;
chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^ chksum = ((((((usPtr[0] ^ usPtr[1]) ^ usPtr[2]) ^ usPtr[3]) ^
...@@ -533,7 +533,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr) ...@@ -533,7 +533,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
// Function: write_blk // Function: write_blk
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_device - device structure
// USHORT **pUsFile - DSP image file pointer in USHORT // u16 **pUsFile - DSP image file pointer in u16
// u8 **pUcFile - DSP image file pointer in u8 // u8 **pUcFile - DSP image file pointer in u8
// long word_length - lenght of the buffer to be written // long word_length - lenght of the buffer to be written
// to DPRAM // to DPRAM
...@@ -546,20 +546,20 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr) ...@@ -546,20 +546,20 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 **pUcFile, long word_length) static ULONG write_blk (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **pUcFile, long word_length)
{ {
ULONG Status = STATUS_SUCCESS; ULONG Status = STATUS_SUCCESS;
USHORT dpram; u16 dpram;
long temp_word_length; long temp_word_length;
int loopcnt, i, j; int loopcnt, i, j;
USHORT *pTempFile; u16 *pTempFile;
USHORT tempword; u16 tempword;
USHORT tempbuffer[64]; u16 tempbuffer[64];
USHORT resultbuffer[64]; u16 resultbuffer[64];
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
//DEBUG("FT1000:download:start word_length = %d\n",(int)word_length); //DEBUG("FT1000:download:start word_length = %d\n",(int)word_length);
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
tempword = *(*pUsFile); tempword = *(*pUsFile);
(*pUsFile)++; (*pUsFile)++;
Status = ft1000_write_dpram16(ft1000dev, dpram, tempword, 0); Status = ft1000_write_dpram16(ft1000dev, dpram, tempword, 0);
...@@ -569,7 +569,7 @@ static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 ** ...@@ -569,7 +569,7 @@ static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 **
*pUcFile = *pUcFile + 4; *pUcFile = *pUcFile + 4;
word_length--; word_length--;
tempword = (USHORT)word_length; tempword = (u16)word_length;
word_length = (word_length / 16) + 1; word_length = (word_length / 16) + 1;
pTempFile = *pUsFile; pTempFile = *pUsFile;
temp_word_length = word_length; temp_word_length = word_length;
...@@ -689,7 +689,7 @@ static void usb_dnld_complete (struct urb *urb) ...@@ -689,7 +689,7 @@ static void usb_dnld_complete (struct urb *urb)
// Function: write_blk_fifo // Function: write_blk_fifo
// //
// Parameters: struct ft1000_device - device structure // Parameters: struct ft1000_device - device structure
// USHORT **pUsFile - DSP image file pointer in USHORT // u16 **pUsFile - DSP image file pointer in u16
// u8 **pUcFile - DSP image file pointer in u8 // u8 **pUcFile - DSP image file pointer in u8
// long word_length - lenght of the buffer to be written // long word_length - lenght of the buffer to be written
// to DPRAM // to DPRAM
...@@ -702,7 +702,7 @@ static void usb_dnld_complete (struct urb *urb) ...@@ -702,7 +702,7 @@ static void usb_dnld_complete (struct urb *urb)
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static ULONG write_blk_fifo (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 **pUcFile, long word_length) static ULONG write_blk_fifo (struct ft1000_device *ft1000dev, u16 **pUsFile, u8 **pUcFile, long word_length)
{ {
ULONG Status = STATUS_SUCCESS; ULONG Status = STATUS_SUCCESS;
int byte_length; int byte_length;
...@@ -774,21 +774,21 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -774,21 +774,21 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
{ {
u16 Status = STATUS_SUCCESS; u16 Status = STATUS_SUCCESS;
UINT uiState; UINT uiState;
USHORT handshake; u16 handshake;
struct pseudo_hdr *pHdr; struct pseudo_hdr *pHdr;
USHORT usHdrLength; u16 usHdrLength;
long word_length; long word_length;
USHORT request; u16 request;
USHORT temp; u16 temp;
USHORT tempword; u16 tempword;
struct dsp_file_hdr *pFileHdr5; struct dsp_file_hdr *pFileHdr5;
struct dsp_image_info *pDspImageInfoV6 = NULL; struct dsp_image_info *pDspImageInfoV6 = NULL;
long requested_version; long requested_version;
BOOLEAN bGoodVersion; BOOLEAN bGoodVersion;
struct drv_msg *pMailBoxData; struct drv_msg *pMailBoxData;
USHORT *pUsData = NULL; u16 *pUsData = NULL;
USHORT *pUsFile = NULL; u16 *pUsFile = NULL;
u8 *pUcFile = NULL; u8 *pUcFile = NULL;
u8 *pBootEnd = NULL, *pCodeEnd= NULL; u8 *pBootEnd = NULL, *pCodeEnd= NULL;
int imageN; int imageN;
...@@ -798,7 +798,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -798,7 +798,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
ULONG templong; ULONG templong;
ULONG image_chksum = 0; ULONG image_chksum = 0;
USHORT dpram = 0; u16 dpram = 0;
u8 *pbuffer; u8 *pbuffer;
struct prov_record *pprov_record; struct prov_record *pprov_record;
struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net); struct ft1000_info *pft1000info = netdev_priv(ft1000dev->net);
...@@ -820,7 +820,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -820,7 +820,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
ft1000_write_register (ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK); ft1000_write_register (ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK);
pUsFile = (USHORT *)(pFileStart + pFileHdr5->loader_offset); pUsFile = (u16 *)(pFileStart + pFileHdr5->loader_offset);
pUcFile = (u8 *)(pFileStart + pFileHdr5->loader_offset); pUcFile = (u8 *)(pFileStart + pFileHdr5->loader_offset);
pBootEnd = (u8 *)(pFileStart + pFileHdr5->loader_code_end); pBootEnd = (u8 *)(pFileStart + pFileHdr5->loader_code_end);
...@@ -878,7 +878,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -878,7 +878,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
case REQUEST_DONE_BL: case REQUEST_DONE_BL:
DEBUG("FT1000:REQUEST_DONE_BL\n"); DEBUG("FT1000:REQUEST_DONE_BL\n");
/* Reposition ptrs to beginning of code section */ /* Reposition ptrs to beginning of code section */
pUsFile = (USHORT *)(pBootEnd); pUsFile = (u16 *)(pBootEnd);
pUcFile = (u8 *)(pBootEnd); pUcFile = (u8 *)(pBootEnd);
//DEBUG("FT1000:download:pUsFile = 0x%8x\n", (int)pUsFile); //DEBUG("FT1000:download:pUsFile = 0x%8x\n", (int)pUsFile);
//DEBUG("FT1000:download:pUcFile = 0x%8x\n", (int)pUcFile); //DEBUG("FT1000:download:pUcFile = 0x%8x\n", (int)pUcFile);
...@@ -909,7 +909,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -909,7 +909,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
/* /*
* Position ASIC DPRAM auto-increment pointer. * Position ASIC DPRAM auto-increment pointer.
*/ */
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
word_length = word_length / 2; word_length = word_length / 2;
...@@ -988,7 +988,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -988,7 +988,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
case REQUEST_DONE_CL: case REQUEST_DONE_CL:
pft1000info->usbboot = 3; pft1000info->usbboot = 3;
/* Reposition ptrs to beginning of provisioning section */ /* Reposition ptrs to beginning of provisioning section */
pUsFile = (USHORT *)(pFileStart + pFileHdr5->commands_offset); pUsFile = (u16 *)(pFileStart + pFileHdr5->commands_offset);
pUcFile = (u8 *)(pFileStart + pFileHdr5->commands_offset); pUcFile = (u8 *)(pFileStart + pFileHdr5->commands_offset);
uiState = STATE_DONE_DWNLD; uiState = STATE_DONE_DWNLD;
break; break;
...@@ -1027,7 +1027,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -1027,7 +1027,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
/* /*
* Position ASIC DPRAM auto-increment pointer. * Position ASIC DPRAM auto-increment pointer.
*/ */
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
word_length = word_length / 2; word_length = word_length / 2;
...@@ -1053,8 +1053,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -1053,8 +1053,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
*/ */
pUsData = (USHORT *)&pMailBoxData->data[0]; pUsData = (u16 *)&pMailBoxData->data[0];
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
...@@ -1079,10 +1079,10 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -1079,10 +1079,10 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
* Position ASIC DPRAM auto-increment pointer. * Position ASIC DPRAM auto-increment pointer.
*/ */
pUsFile = (USHORT *)(pFileStart + pFileHdr5->version_data_offset); pUsFile = (u16 *)(pFileStart + pFileHdr5->version_data_offset);
dpram = (USHORT)DWNLD_MAG1_PS_HDR_LOC; dpram = (u16)DWNLD_MAG1_PS_HDR_LOC;
if (word_length & 0x1) if (word_length & 0x1)
word_length++; word_length++;
...@@ -1110,15 +1110,15 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe ...@@ -1110,15 +1110,15 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
for (imageN = 0; imageN < pFileHdr5->nDspImages; imageN++) for (imageN = 0; imageN < pFileHdr5->nDspImages; imageN++)
{ {
temp = (USHORT)(pDspImageInfoV6->version); temp = (u16)(pDspImageInfoV6->version);
templong = temp; templong = temp;
temp = (USHORT)(pDspImageInfoV6->version >> 16); temp = (u16)(pDspImageInfoV6->version >> 16);
templong |= (temp << 16); templong |= (temp << 16);
if (templong == (ULONG)requested_version) if (templong == (ULONG)requested_version)
{ {
bGoodVersion = TRUE; bGoodVersion = TRUE;
DEBUG("FT1000:download: bGoodVersion is TRUE\n"); DEBUG("FT1000:download: bGoodVersion is TRUE\n");
pUsFile = (USHORT *)(pFileStart + pDspImageInfoV6->begin_offset); pUsFile = (u16 *)(pFileStart + pDspImageInfoV6->begin_offset);
pUcFile = (u8 *)(pFileStart + pDspImageInfoV6->begin_offset); pUcFile = (u8 *)(pFileStart + pDspImageInfoV6->begin_offset);
pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset); pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset);
run_address = pDspImageInfoV6->run_address; run_address = pDspImageInfoV6->run_address;
......
...@@ -160,7 +160,7 @@ u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegInd ...@@ -160,7 +160,7 @@ u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegInd
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRegIndx) u16 ft1000_write_register(struct ft1000_device *ft1000dev, u16 value, u16 nRegIndx)
{ {
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
...@@ -196,7 +196,7 @@ u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRe ...@@ -196,7 +196,7 @@ u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRe
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, USHORT cnt) u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt)
{ {
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
...@@ -235,7 +235,7 @@ u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer ...@@ -235,7 +235,7 @@ u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, USHORT cnt) u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt)
{ {
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
...@@ -272,7 +272,7 @@ u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffe ...@@ -272,7 +272,7 @@ u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffe
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, u8 highlow) u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u8 highlow)
{ {
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
...@@ -320,7 +320,7 @@ u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer ...@@ -320,7 +320,7 @@ u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT value, u8 highlow) u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, u16 indx, u16 value, u8 highlow)
{ {
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
...@@ -365,10 +365,10 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va ...@@ -365,10 +365,10 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer) u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer)
{ {
u8 buf[16]; u8 buf[16];
USHORT pos; u16 pos;
u16 ret = STATUS_SUCCESS; u16 ret = STATUS_SUCCESS;
//DEBUG("fix_ft1000_read_dpram32: indx: %d \n", indx); //DEBUG("fix_ft1000_read_dpram32: indx: %d \n", indx);
...@@ -414,11 +414,11 @@ u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *bu ...@@ -414,11 +414,11 @@ u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *bu
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer) u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer)
{ {
USHORT pos1; u16 pos1;
USHORT pos2; u16 pos2;
USHORT i; u16 i;
u8 buf[32]; u8 buf[32];
u8 resultbuffer[32]; u8 resultbuffer[32];
u8 *pdata; u8 *pdata;
...@@ -494,7 +494,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *b ...@@ -494,7 +494,7 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *b
static void card_reset_dsp (struct ft1000_device *ft1000dev, BOOLEAN value) static void card_reset_dsp (struct ft1000_device *ft1000dev, BOOLEAN value)
{ {
u16 status = STATUS_SUCCESS; u16 status = STATUS_SUCCESS;
USHORT tempword; u16 tempword;
status = ft1000_write_register (ft1000dev, HOST_INTF_BE, FT1000_REG_SUP_CTRL); status = ft1000_write_register (ft1000dev, HOST_INTF_BE, FT1000_REG_SUP_CTRL);
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_SUP_CTRL); status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_SUP_CTRL);
...@@ -593,7 +593,7 @@ void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int siz ...@@ -593,7 +593,7 @@ void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int siz
int dsp_reload(struct ft1000_device *ft1000dev) int dsp_reload(struct ft1000_device *ft1000dev)
{ {
u16 status; u16 status;
USHORT tempword; u16 tempword;
ULONG templong; ULONG templong;
struct ft1000_info *pft1000info; struct ft1000_info *pft1000info;
...@@ -1543,7 +1543,7 @@ static int ft1000_dsp_prov(void *arg) ...@@ -1543,7 +1543,7 @@ static int ft1000_dsp_prov(void *arg)
struct pseudo_hdr *ppseudo_hdr; struct pseudo_hdr *ppseudo_hdr;
u16 *pmsg; u16 *pmsg;
u16 status; u16 status;
USHORT TempShortBuf [256]; u16 TempShortBuf [256];
DEBUG("*** DspProv Entered\n"); DEBUG("*** DspProv Entered\n");
...@@ -1876,7 +1876,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) { ...@@ -1876,7 +1876,7 @@ static int ft1000_proc_drvmsg (struct ft1000_device *dev, u16 size) {
*pmsg++ = convert.wrd; *pmsg++ = convert.wrd;
*pmsg++ = htons(info->DrvErrNum); *pmsg++ = htons(info->DrvErrNum);
CardSendCommand (dev, (unsigned char*)&tempbuffer[0], (USHORT)(0x0012 + PSEUDOSZ)); CardSendCommand (dev, (unsigned char*)&tempbuffer[0], (u16)(0x0012 + PSEUDOSZ));
info->DrvErrNum = 0; info->DrvErrNum = 0;
} }
info->DrvMsgPend = 0; info->DrvMsgPend = 0;
...@@ -1907,9 +1907,9 @@ int ft1000_poll(void* dev_id) { ...@@ -1907,9 +1907,9 @@ int ft1000_poll(void* dev_id) {
u16 status; u16 status;
u16 size; u16 size;
int i; int i;
USHORT data; u16 data;
USHORT modulo; u16 modulo;
USHORT portid; u16 portid;
u16 nxtph; u16 nxtph;
struct dpram_blk *pdpram_blk; struct dpram_blk *pdpram_blk;
struct pseudo_hdr *ppseudo_hdr; struct pseudo_hdr *ppseudo_hdr;
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
#include "ft1000_usb.h" #include "ft1000_usb.h"
extern u16 ft1000_read_register(struct usb_device *dev, u16 *Data, u8 nRegIndx); extern u16 ft1000_read_register(struct usb_device *dev, u16 *Data, u8 nRegIndx);
extern u16 ft1000_write_register(struct usb_device *dev, USHORT value, u8 nRegIndx); extern u16 ft1000_write_register(struct usb_device *dev, u16 value, u8 nRegIndx);
#endif #endif
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
//#endif //#endif
u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev, USHORT indx, u16 ft1000_read_dpram16 (struct ft1000_device *ft1000dev, u16 indx,
u8 *buffer, u8 highlow); u8 *buffer, u8 highlow);
......
...@@ -98,7 +98,6 @@ struct prov_record { ...@@ -98,7 +98,6 @@ struct prov_record {
/*end of Jim*/ /*end of Jim*/
#define DEBUG(args...) printk(KERN_INFO args) #define DEBUG(args...) printk(KERN_INFO args)
#define USHORT u16
#define ULONG u32 /* WTF ??? */ #define ULONG u32 /* WTF ??? */
#define BOOLEAN u8 #define BOOLEAN u8
#define PULONG u32 * #define PULONG u32 *
...@@ -561,13 +560,13 @@ struct dpram_blk { ...@@ -561,13 +560,13 @@ struct dpram_blk {
} __attribute__ ((packed)); } __attribute__ ((packed));
u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegIndx); u16 ft1000_read_register(struct ft1000_device *ft1000dev, u16* Data, u16 nRegIndx);
u16 ft1000_write_register(struct ft1000_device *ft1000dev, USHORT value, u16 nRegIndx); u16 ft1000_write_register(struct ft1000_device *ft1000dev, u16 value, u16 nRegIndx);
u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, USHORT cnt); u16 ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt);
u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, USHORT cnt); u16 ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt);
u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer, u8 highlow); u16 ft1000_read_dpram16(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u8 highlow);
u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT value, u8 highlow); u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, u16 indx, u16 value, u8 highlow);
u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer); u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer);
u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer); u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer);
extern void *pFileStart; extern void *pFileStart;
extern size_t FileLength; extern size_t FileLength;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment