staging: ft1000: Get rid of UCHAR typedef.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e2cb7da167
commit
c8f775c88b
@@ -534,7 +534,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
|
|||||||
//
|
//
|
||||||
// Parameters: struct ft1000_device - device structure
|
// Parameters: struct ft1000_device - device structure
|
||||||
// USHORT **pUsFile - DSP image file pointer in USHORT
|
// USHORT **pUsFile - DSP image file pointer in USHORT
|
||||||
// UCHAR **pUcFile - DSP image file pointer in UCHAR
|
// 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,7 +546,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
|
|||||||
// Notes:
|
// Notes:
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, UCHAR **pUcFile, long word_length)
|
static ULONG write_blk (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 **pUcFile, long word_length)
|
||||||
{
|
{
|
||||||
ULONG Status = STATUS_SUCCESS;
|
ULONG Status = STATUS_SUCCESS;
|
||||||
USHORT dpram;
|
USHORT dpram;
|
||||||
@@ -690,7 +690,7 @@ static void usb_dnld_complete (struct urb *urb)
|
|||||||
//
|
//
|
||||||
// Parameters: struct ft1000_device - device structure
|
// Parameters: struct ft1000_device - device structure
|
||||||
// USHORT **pUsFile - DSP image file pointer in USHORT
|
// USHORT **pUsFile - DSP image file pointer in USHORT
|
||||||
// UCHAR **pUcFile - DSP image file pointer in UCHAR
|
// 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)
|
|||||||
// Notes:
|
// Notes:
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
static ULONG write_blk_fifo (struct ft1000_device *ft1000dev, USHORT **pUsFile, UCHAR **pUcFile, long word_length)
|
static ULONG write_blk_fifo (struct ft1000_device *ft1000dev, USHORT **pUsFile, u8 **pUcFile, long word_length)
|
||||||
{
|
{
|
||||||
ULONG Status = STATUS_SUCCESS;
|
ULONG Status = STATUS_SUCCESS;
|
||||||
int byte_length;
|
int byte_length;
|
||||||
@@ -789,8 +789,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
|
|||||||
struct drv_msg *pMailBoxData;
|
struct drv_msg *pMailBoxData;
|
||||||
USHORT *pUsData = NULL;
|
USHORT *pUsData = NULL;
|
||||||
USHORT *pUsFile = NULL;
|
USHORT *pUsFile = NULL;
|
||||||
UCHAR *pUcFile = NULL;
|
u8 *pUcFile = NULL;
|
||||||
UCHAR *pBootEnd = NULL, *pCodeEnd= NULL;
|
u8 *pBootEnd = NULL, *pCodeEnd= NULL;
|
||||||
int imageN;
|
int imageN;
|
||||||
long loader_code_address, loader_code_size = 0;
|
long loader_code_address, loader_code_size = 0;
|
||||||
long run_address = 0, run_size = 0;
|
long run_address = 0, run_size = 0;
|
||||||
@@ -821,9 +821,9 @@ 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 = (USHORT *)(pFileStart + pFileHdr5->loader_offset);
|
||||||
pUcFile = (UCHAR *)(pFileStart + pFileHdr5->loader_offset);
|
pUcFile = (u8 *)(pFileStart + pFileHdr5->loader_offset);
|
||||||
|
|
||||||
pBootEnd = (UCHAR *)(pFileStart + pFileHdr5->loader_code_end);
|
pBootEnd = (u8 *)(pFileStart + pFileHdr5->loader_code_end);
|
||||||
|
|
||||||
loader_code_address = pFileHdr5->loader_code_address;
|
loader_code_address = pFileHdr5->loader_code_address;
|
||||||
loader_code_size = pFileHdr5->loader_code_size;
|
loader_code_size = pFileHdr5->loader_code_size;
|
||||||
@@ -879,7 +879,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
|
|||||||
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 = (USHORT *)(pBootEnd);
|
||||||
pUcFile = (UCHAR *)(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);
|
||||||
uiState = STATE_CODE_DWNLD;
|
uiState = STATE_CODE_DWNLD;
|
||||||
@@ -989,7 +989,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
|
|||||||
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 = (USHORT *)(pFileStart + pFileHdr5->commands_offset);
|
||||||
pUcFile = (UCHAR *)(pFileStart + pFileHdr5->commands_offset);
|
pUcFile = (u8 *)(pFileStart + pFileHdr5->commands_offset);
|
||||||
uiState = STATE_DONE_DWNLD;
|
uiState = STATE_DONE_DWNLD;
|
||||||
break;
|
break;
|
||||||
case REQUEST_CODE_SEGMENT:
|
case REQUEST_CODE_SEGMENT:
|
||||||
@@ -1119,8 +1119,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
|
|||||||
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 = (USHORT *)(pFileStart + pDspImageInfoV6->begin_offset);
|
||||||
pUcFile = (UCHAR *)(pFileStart + pDspImageInfoV6->begin_offset);
|
pUcFile = (u8 *)(pFileStart + pDspImageInfoV6->begin_offset);
|
||||||
pCodeEnd = (UCHAR *)(pFileStart + pDspImageInfoV6->end_offset);
|
pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset);
|
||||||
run_address = pDspImageInfoV6->run_address;
|
run_address = pDspImageInfoV6->run_address;
|
||||||
run_size = pDspImageInfoV6->image_size;
|
run_size = pDspImageInfoV6->image_size;
|
||||||
image_chksum = (ULONG)pDspImageInfoV6->checksum;
|
image_chksum = (ULONG)pDspImageInfoV6->checksum;
|
||||||
@@ -1188,7 +1188,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
|
|||||||
pprov_record->pprov_data = pbuffer;
|
pprov_record->pprov_data = pbuffer;
|
||||||
list_add_tail (&pprov_record->list, &pft1000info->prov_list);
|
list_add_tail (&pprov_record->list, &pft1000info->prov_list);
|
||||||
// Move to next entry if available
|
// Move to next entry if available
|
||||||
pUcFile = (UCHAR *)((unsigned long)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(struct pseudo_hdr));
|
pUcFile = (u8 *)((unsigned long)pUcFile + (UINT)((usHdrLength + 1) & 0xFFFFFFFE) + sizeof(struct pseudo_hdr));
|
||||||
if ( (unsigned long)(pUcFile) - (unsigned long)(pFileStart) >= (unsigned long)FileLength) {
|
if ( (unsigned long)(pUcFile) - (unsigned long)(pFileStart) >= (unsigned long)FileLength) {
|
||||||
uiState = STATE_DONE_FILE;
|
uiState = STATE_DONE_FILE;
|
||||||
}
|
}
|
||||||
|
@@ -367,7 +367,7 @@ u16 ft1000_write_dpram16(struct ft1000_device *ft1000dev, USHORT indx, USHORT va
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer)
|
u16 fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *buffer)
|
||||||
{
|
{
|
||||||
UCHAR buf[16];
|
u8 buf[16];
|
||||||
USHORT pos;
|
USHORT pos;
|
||||||
u16 ret = STATUS_SUCCESS;
|
u16 ret = STATUS_SUCCESS;
|
||||||
|
|
||||||
@@ -419,8 +419,8 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *b
|
|||||||
USHORT pos1;
|
USHORT pos1;
|
||||||
USHORT pos2;
|
USHORT pos2;
|
||||||
USHORT i;
|
USHORT i;
|
||||||
UCHAR buf[32];
|
u8 buf[32];
|
||||||
UCHAR resultbuffer[32];
|
u8 resultbuffer[32];
|
||||||
u8 *pdata;
|
u8 *pdata;
|
||||||
u16 ret = STATUS_SUCCESS;
|
u16 ret = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
@@ -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 UCHAR u8
|
|
||||||
#define USHORT u16
|
#define USHORT u16
|
||||||
#define ULONG u32 /* WTF ??? */
|
#define ULONG u32 /* WTF ??? */
|
||||||
#define BOOLEAN u8
|
#define BOOLEAN u8
|
||||||
@@ -371,15 +370,15 @@ struct prov_record {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ISR_EMPTY (UCHAR)0x00 // no bits set in ISR
|
#define ISR_EMPTY (u8)0x00 // no bits set in ISR
|
||||||
|
|
||||||
#define ISR_DOORBELL_ACK (UCHAR)0x01 // the doorbell i sent has been recieved.
|
#define ISR_DOORBELL_ACK (u8)0x01 // the doorbell i sent has been recieved.
|
||||||
|
|
||||||
#define ISR_DOORBELL_PEND (UCHAR)0x02 // doorbell for me
|
#define ISR_DOORBELL_PEND (u8)0x02 // doorbell for me
|
||||||
|
|
||||||
#define ISR_RCV (UCHAR)0x04 // packet received with no errors
|
#define ISR_RCV (u8)0x04 // packet received with no errors
|
||||||
|
|
||||||
#define ISR_WATERMARK (UCHAR)0x08 //
|
#define ISR_WATERMARK (u8)0x08 //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user