Drivers: Staging: ft1000: Fixed C99 // comments styling issue
This patch removes C99 style comments from the driver and whenever possible attempts to match coding style of the rest of the driver. Signed-off-by: Daniel Dodge <danieldodgese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9b89b04935
commit
588c31eacd
|
@ -1,32 +1,32 @@
|
||||||
//---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
// FT1000 driver for Flarion Flash OFDM NIC Device
|
FT1000 driver for Flarion Flash OFDM NIC Device
|
||||||
//
|
|
||||||
// Copyright (C) 2002 Flarion Technologies, All rights reserved.
|
Copyright (C) 2002 Flarion Technologies, All rights reserved.
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
// under the terms of the GNU General Public License as published by the Free
|
under the terms of the GNU General Public License as published by the Free
|
||||||
// Software Foundation; either version 2 of the License, or (at your option) any
|
Software Foundation; either version 2 of the License, or (at your option) any
|
||||||
// later version. This program is distributed in the hope that it will be useful,
|
later version. This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
// more details. You should have received a copy of the GNU General Public
|
more details. You should have received a copy of the GNU General Public
|
||||||
// License along with this program; if not, write to the
|
License along with this program; if not, write to the
|
||||||
// Free Software Foundation, Inc., 59 Temple Place -
|
Free Software Foundation, Inc., 59 Temple Place -
|
||||||
// Suite 330, Boston, MA 02111-1307, USA.
|
Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
//
|
|
||||||
// File: boot.h
|
File: boot.h
|
||||||
//
|
|
||||||
// Description: boatloader
|
Description: boatloader
|
||||||
//
|
|
||||||
// History:
|
History:
|
||||||
// 1/11/05 Whc Ported to Linux.
|
1/11/05 Whc Ported to Linux.
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
---------------------------------------------------------------------------*/
|
||||||
#ifndef _BOOTH_
|
#ifndef _BOOTH_
|
||||||
#define _BOOTH_
|
#define _BOOTH_
|
||||||
|
|
||||||
// Official bootloader
|
/* Official bootloader */
|
||||||
static unsigned char bootimage[] = {
|
static unsigned char bootimage[] = {
|
||||||
0x00, 0x00, 0x01, 0x5E, 0x00, 0x00,
|
0x00, 0x00, 0x01, 0x5E, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x02, 0xD7,
|
0x00, 0x00, 0x00, 0x00, 0x02, 0xD7,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
#define MAX_LENGTH 0x7f0
|
#define MAX_LENGTH 0x7f0
|
||||||
|
|
||||||
// Temporary download mechanism for Magnemite
|
/* Temporary download mechanism for Magnemite */
|
||||||
#define DWNLD_MAG_TYPE_LOC 0x00
|
#define DWNLD_MAG_TYPE_LOC 0x00
|
||||||
#define DWNLD_MAG_LEN_LOC 0x01
|
#define DWNLD_MAG_LEN_LOC 0x01
|
||||||
#define DWNLD_MAG_ADDR_LOC 0x02
|
#define DWNLD_MAG_ADDR_LOC 0x02
|
||||||
|
@ -74,35 +74,35 @@
|
||||||
#define HANDSHAKE_MAG_TIMEOUT_VALUE 0xF1F1
|
#define HANDSHAKE_MAG_TIMEOUT_VALUE 0xF1F1
|
||||||
|
|
||||||
|
|
||||||
// New Magnemite downloader
|
/* New Magnemite downloader */
|
||||||
#define DWNLD_MAG1_HANDSHAKE_LOC 0x00
|
#define DWNLD_MAG1_HANDSHAKE_LOC 0x00
|
||||||
#define DWNLD_MAG1_TYPE_LOC 0x01
|
#define DWNLD_MAG1_TYPE_LOC 0x01
|
||||||
#define DWNLD_MAG1_SIZE_LOC 0x02
|
#define DWNLD_MAG1_SIZE_LOC 0x02
|
||||||
#define DWNLD_MAG1_PS_HDR_LOC 0x03
|
#define DWNLD_MAG1_PS_HDR_LOC 0x03
|
||||||
|
|
||||||
struct dsp_file_hdr {
|
struct dsp_file_hdr {
|
||||||
long version_id; // Version ID of this image format.
|
long version_id; /* Version ID of this image format. */
|
||||||
long package_id; // Package ID of code release.
|
long package_id; /* Package ID of code release. */
|
||||||
long build_date; // Date/time stamp when file was built.
|
long build_date; /* Date/time stamp when file was built. */
|
||||||
long commands_offset; // Offset to attached commands in Pseudo Hdr format.
|
long commands_offset; /* Offset to attached commands in Pseudo Hdr format. */
|
||||||
long loader_offset; // Offset to bootloader code.
|
long loader_offset; /* Offset to bootloader code. */
|
||||||
long loader_code_address; // Start address of bootloader.
|
long loader_code_address; /* Start address of bootloader. */
|
||||||
long loader_code_end; // Where bootloader code ends.
|
long loader_code_end; /* Where bootloader code ends. */
|
||||||
long loader_code_size;
|
long loader_code_size;
|
||||||
long version_data_offset; // Offset were scrambled version data begins.
|
long version_data_offset; /* Offset were scrambled version data begins. */
|
||||||
long version_data_size; // Size, in words, of scrambled version data.
|
long version_data_size; /* Size, in words, of scrambled version data. */
|
||||||
long nDspImages; // Number of DSP images in file.
|
long nDspImages; /* Number of DSP images in file. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
struct dsp_image_info {
|
struct dsp_image_info {
|
||||||
long coff_date; // Date/time when DSP Coff image was built.
|
long coff_date; /* Date/time when DSP Coff image was built. */
|
||||||
long begin_offset; // Offset in file where image begins.
|
long begin_offset; /* Offset in file where image begins. */
|
||||||
long end_offset; // Offset in file where image begins.
|
long end_offset; /* Offset in file where image begins. */
|
||||||
long run_address; // On chip Start address of DSP code.
|
long run_address; /* On chip Start address of DSP code. */
|
||||||
long image_size; // Size of image.
|
long image_size; /* Size of image. */
|
||||||
long version; // Embedded version # of DSP code.
|
long version; /* Embedded version # of DSP code. */
|
||||||
unsigned short checksum; // DSP File checksum
|
unsigned short checksum; /* DSP File checksum */
|
||||||
unsigned short pad1;
|
unsigned short pad1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ static int write_blk(struct ft1000_usb *ft1000dev, u16 **pUsFile, u8 **pUcFile,
|
||||||
|
|
||||||
static void usb_dnld_complete(struct urb *urb)
|
static void usb_dnld_complete(struct urb *urb)
|
||||||
{
|
{
|
||||||
//DEBUG("****** usb_dnld_complete\n");
|
/* DEBUG("****** usb_dnld_complete\n"); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* writes a block of DSP image to DPRAM
|
/* writes a block of DSP image to DPRAM
|
||||||
|
@ -651,9 +651,9 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
ft1000dev->usbboot = 0;
|
ft1000dev->usbboot = 0;
|
||||||
ft1000dev->dspalive = 0xffff;
|
ft1000dev->dspalive = 0xffff;
|
||||||
|
|
||||||
//
|
/*
|
||||||
// Get version id of file, at first 4 bytes of file, for newer files.
|
* Get version id of file, at first 4 bytes of file, for newer files.
|
||||||
//
|
*/
|
||||||
|
|
||||||
state = STATE_START_DWNLD;
|
state = STATE_START_DWNLD;
|
||||||
|
|
||||||
|
@ -702,8 +702,8 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
/* Reposition ptrs to beginning of code section */
|
/* Reposition ptrs to beginning of code section */
|
||||||
s_file = (u16 *) (boot_end);
|
s_file = (u16 *) (boot_end);
|
||||||
c_file = (u8 *) (boot_end);
|
c_file = (u8 *) (boot_end);
|
||||||
//DEBUG("FT1000:download:s_file = 0x%8x\n", (int)s_file);
|
/* DEBUG("FT1000:download:s_file = 0x%8x\n", (int)s_file); */
|
||||||
//DEBUG("FT1000:download:c_file = 0x%8x\n", (int)c_file);
|
/* DEBUG("FT1000:download:c_file = 0x%8x\n", (int)c_file); */
|
||||||
state = STATE_CODE_DWNLD;
|
state = STATE_CODE_DWNLD;
|
||||||
ft1000dev->fcodeldr = 1;
|
ft1000dev->fcodeldr = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -735,7 +735,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_CODE_DWNLD:
|
case STATE_CODE_DWNLD:
|
||||||
//DEBUG("FT1000:STATE_CODE_DWNLD\n");
|
/* DEBUG("FT1000:STATE_CODE_DWNLD\n"); */
|
||||||
ft1000dev->bootmode = 0;
|
ft1000dev->bootmode = 0;
|
||||||
if (ft1000dev->usbboot)
|
if (ft1000dev->usbboot)
|
||||||
handshake =
|
handshake =
|
||||||
|
@ -805,7 +805,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
state = STATE_DONE_DWNLD;
|
state = STATE_DONE_DWNLD;
|
||||||
break;
|
break;
|
||||||
case REQUEST_CODE_SEGMENT:
|
case REQUEST_CODE_SEGMENT:
|
||||||
//DEBUG("FT1000:download: REQUEST_CODE_SEGMENT - CODELOADER\n");
|
/* DEBUG("FT1000:download: REQUEST_CODE_SEGMENT - CODELOADER\n"); */
|
||||||
if (!correct_version) {
|
if (!correct_version) {
|
||||||
DEBUG
|
DEBUG
|
||||||
("FT1000:download:Download error: Got Code Segment request before image offset request.\n");
|
("FT1000:download:Download error: Got Code Segment request before image offset request.\n");
|
||||||
|
@ -823,7 +823,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
case REQUEST_MAILBOX_DATA:
|
case REQUEST_MAILBOX_DATA:
|
||||||
DEBUG
|
DEBUG
|
||||||
("FT1000:download: REQUEST_MAILBOX_DATA\n");
|
("FT1000:download: REQUEST_MAILBOX_DATA\n");
|
||||||
// Convert length from byte count to word count. Make sure we round up.
|
/* Convert length from byte count to word count. Make sure we round up. */
|
||||||
word_length =
|
word_length =
|
||||||
(long)(pft1000info->DSPInfoBlklen +
|
(long)(pft1000info->DSPInfoBlklen +
|
||||||
1) / 2;
|
1) / 2;
|
||||||
|
@ -939,7 +939,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
}
|
}
|
||||||
dsp_img_info++;
|
dsp_img_info++;
|
||||||
|
|
||||||
} //end of for
|
} /* end of for */
|
||||||
|
|
||||||
if (!correct_version) {
|
if (!correct_version) {
|
||||||
/*
|
/*
|
||||||
|
@ -1002,7 +1002,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
(u32) (pseudo_header_len +
|
(u32) (pseudo_header_len +
|
||||||
sizeof(struct
|
sizeof(struct
|
||||||
pseudo_hdr)));
|
pseudo_hdr)));
|
||||||
// link provisioning data
|
/* link provisioning data */
|
||||||
pprov_record =
|
pprov_record =
|
||||||
kmalloc(sizeof(struct prov_record),
|
kmalloc(sizeof(struct prov_record),
|
||||||
GFP_ATOMIC);
|
GFP_ATOMIC);
|
||||||
|
@ -1013,7 +1013,7 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
|
||||||
list,
|
list,
|
||||||
&pft1000info->
|
&pft1000info->
|
||||||
prov_list);
|
prov_list);
|
||||||
// Move to next entry if available
|
/* Move to next entry if available */
|
||||||
c_file =
|
c_file =
|
||||||
(u8 *) ((unsigned long)
|
(u8 *) ((unsigned long)
|
||||||
c_file +
|
c_file +
|
||||||
|
|
Loading…
Reference in New Issue