Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228027
b: refs/heads/master
c: c8f775c
h: refs/heads/master
i:
  228025: 9f551ed
  228023: 1098cb4
v: v3
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Nov 10, 2010
1 parent d96a98e commit 6465ab2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2cb7da1671eb659c8edc81be9838afdd0b6b2cc
refs/heads/master: c8f775c88b1b84909d5d73b171a48302bf46b2f8
26 changes: 13 additions & 13 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
//
// Parameters: struct ft1000_device - device structure
// 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
// to DPRAM
//
Expand All @@ -546,7 +546,7 @@ static USHORT hdr_checksum(struct pseudo_hdr *pHdr)
// 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;
USHORT dpram;
Expand Down Expand Up @@ -690,7 +690,7 @@ static void usb_dnld_complete (struct urb *urb)
//
// Parameters: struct ft1000_device - device structure
// 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
// to DPRAM
//
Expand All @@ -702,7 +702,7 @@ static void usb_dnld_complete (struct urb *urb)
// 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;
int byte_length;
Expand Down Expand Up @@ -789,8 +789,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
struct drv_msg *pMailBoxData;
USHORT *pUsData = NULL;
USHORT *pUsFile = NULL;
UCHAR *pUcFile = NULL;
UCHAR *pBootEnd = NULL, *pCodeEnd= NULL;
u8 *pUcFile = NULL;
u8 *pBootEnd = NULL, *pCodeEnd= NULL;
int imageN;
long loader_code_address, loader_code_size = 0;
long run_address = 0, run_size = 0;
Expand Down Expand Up @@ -821,9 +821,9 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
ft1000_write_register (ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK);

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_size = pFileHdr5->loader_code_size;
Expand Down Expand Up @@ -879,7 +879,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
DEBUG("FT1000:REQUEST_DONE_BL\n");
/* Reposition ptrs to beginning of code section */
pUsFile = (USHORT *)(pBootEnd);
pUcFile = (UCHAR *)(pBootEnd);
pUcFile = (u8 *)(pBootEnd);
//DEBUG("FT1000:download:pUsFile = 0x%8x\n", (int)pUsFile);
//DEBUG("FT1000:download:pUcFile = 0x%8x\n", (int)pUcFile);
uiState = STATE_CODE_DWNLD;
Expand Down Expand Up @@ -989,7 +989,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
pft1000info->usbboot = 3;
/* Reposition ptrs to beginning of provisioning section */
pUsFile = (USHORT *)(pFileStart + pFileHdr5->commands_offset);
pUcFile = (UCHAR *)(pFileStart + pFileHdr5->commands_offset);
pUcFile = (u8 *)(pFileStart + pFileHdr5->commands_offset);
uiState = STATE_DONE_DWNLD;
break;
case REQUEST_CODE_SEGMENT:
Expand Down Expand Up @@ -1119,8 +1119,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
bGoodVersion = TRUE;
DEBUG("FT1000:download: bGoodVersion is TRUE\n");
pUsFile = (USHORT *)(pFileStart + pDspImageInfoV6->begin_offset);
pUcFile = (UCHAR *)(pFileStart + pDspImageInfoV6->begin_offset);
pCodeEnd = (UCHAR *)(pFileStart + pDspImageInfoV6->end_offset);
pUcFile = (u8 *)(pFileStart + pDspImageInfoV6->begin_offset);
pCodeEnd = (u8 *)(pFileStart + pDspImageInfoV6->end_offset);
run_address = pDspImageInfoV6->run_address;
run_size = pDspImageInfoV6->image_size;
image_chksum = (ULONG)pDspImageInfoV6->checksum;
Expand Down Expand Up @@ -1188,7 +1188,7 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, ULONG FileLe
pprov_record->pprov_data = pbuffer;
list_add_tail (&pprov_record->list, &pft1000info->prov_list);
// 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) {
uiState = STATE_DONE_FILE;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
UCHAR buf[16];
u8 buf[16];
USHORT pos;
u16 ret = STATUS_SUCCESS;

Expand Down Expand Up @@ -419,8 +419,8 @@ u16 fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, USHORT indx, u8 *b
USHORT pos1;
USHORT pos2;
USHORT i;
UCHAR buf[32];
UCHAR resultbuffer[32];
u8 buf[32];
u8 resultbuffer[32];
u8 *pdata;
u16 ret = STATUS_SUCCESS;

Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ struct prov_record {
/*end of Jim*/
#define DEBUG(args...) printk(KERN_INFO args)

#define UCHAR u8
#define USHORT u16
#define ULONG u32 /* WTF ??? */
#define BOOLEAN u8
Expand Down Expand Up @@ -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 //



Expand Down

0 comments on commit 6465ab2

Please sign in to comment.