mirror of https://gitee.com/openkylin/linux.git
Staging: bcm: Properly format and remove comments as needed in Ioctl.h
This patch formats all comments and removes them as needed. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bce0f9f5c3
commit
6117c1f32d
|
@ -30,41 +30,25 @@ typedef struct stGPIOInfo
|
||||||
|
|
||||||
typedef struct stUserThreadReq
|
typedef struct stUserThreadReq
|
||||||
{
|
{
|
||||||
//0->Inactivate LED thread.
|
/* 0->Inactivate LED thread. */
|
||||||
//1->Activate the LED thread
|
/* 1->Activate the LED thread */
|
||||||
UINT ThreadState;
|
UINT ThreadState;
|
||||||
} __attribute__((packed))USER_THREAD_REQ, *PUSER_THREAD_REQ;
|
} __attribute__((packed))USER_THREAD_REQ, *PUSER_THREAD_REQ;
|
||||||
|
|
||||||
#define LED_THREAD_ACTIVATION_REQ 1
|
#define LED_THREAD_ACTIVATION_REQ 1
|
||||||
|
|
||||||
////********** ioctl codes ***********////
|
|
||||||
|
|
||||||
#define BCM_IOCTL 'k'
|
#define BCM_IOCTL 'k'
|
||||||
//1.Control code for CONTROL MESSAGES
|
|
||||||
#define IOCTL_SEND_CONTROL_MESSAGE _IOW(BCM_IOCTL, 0x801, int)
|
#define IOCTL_SEND_CONTROL_MESSAGE _IOW(BCM_IOCTL, 0x801, int)
|
||||||
//2.Control code to write a particular value to a particular register
|
#define IOCTL_BCM_REGISTER_WRITE _IOW(BCM_IOCTL, 0x802, int)
|
||||||
#define IOCTL_BCM_REGISTER_WRITE _IOW(BCM_IOCTL, 0x802, int) //
|
#define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int)
|
||||||
//3.
|
#define IOCTL_BCM_COMMON_MEMORY_WRITE _IOW(BCM_IOCTL, 0x804, int)
|
||||||
#define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int) //
|
#define IOCTL_BCM_COMMON_MEMORY_READ _IOR(BCM_IOCTL, 0x805, int)
|
||||||
//4.Control code to write x number of bytes to common memory
|
#define IOCTL_GET_CONTROL_MESSAGE _IOR(BCM_IOCTL, 0x806, int)
|
||||||
//starting from address y
|
#define IOCTL_BCM_FIRMWARE_DOWNLOAD _IOW(BCM_IOCTL, 0x807, int)
|
||||||
#define IOCTL_BCM_COMMON_MEMORY_WRITE _IOW(BCM_IOCTL, 0x804, int)//
|
|
||||||
//5.Control code to write x number of bytes to common memory
|
|
||||||
//starting from address y
|
|
||||||
#define IOCTL_BCM_COMMON_MEMORY_READ _IOR(BCM_IOCTL, 0x805, int)//
|
|
||||||
//6.Control code for CONTROL MESSAGES
|
|
||||||
#define IOCTL_GET_CONTROL_MESSAGE _IOR(BCM_IOCTL, 0x806, int)//
|
|
||||||
//7.Control code for FIRMWARE DOWNLOAD
|
|
||||||
#define IOCTL_BCM_FIRMWARE_DOWNLOAD _IOW(BCM_IOCTL, 0x807, int)//
|
|
||||||
#define IOCTL_BCM_SET_SEND_VCID _IOW(BCM_IOCTL, 0x808, int)
|
#define IOCTL_BCM_SET_SEND_VCID _IOW(BCM_IOCTL, 0x808, int)
|
||||||
//9.Control code for TRANSFER MODE SWITCHING
|
|
||||||
#define IOCTL_BCM_SWITCH_TRANSFER_MODE _IOW(BCM_IOCTL, 0x809, int)
|
#define IOCTL_BCM_SWITCH_TRANSFER_MODE _IOW(BCM_IOCTL, 0x809, int)
|
||||||
//10.Control code for LINK UP
|
|
||||||
#define IOCTL_LINK_REQ _IOW(BCM_IOCTL, 0x80A, int)
|
#define IOCTL_LINK_REQ _IOW(BCM_IOCTL, 0x80A, int)
|
||||||
//11.Control code for RSSI Level Request
|
|
||||||
#define IOCTL_RSSI_LEVEL_REQ _IOW(BCM_IOCTL, 0x80B, int)
|
#define IOCTL_RSSI_LEVEL_REQ _IOW(BCM_IOCTL, 0x80B, int)
|
||||||
//12.Control code for IDLE MODE CONTROL
|
|
||||||
#define IOCTL_IDLE_REQ _IOW(BCM_IOCTL, 0x80C, int)
|
#define IOCTL_IDLE_REQ _IOW(BCM_IOCTL, 0x80C, int)
|
||||||
//13.Control code for SS/BS info
|
|
||||||
#define IOCTL_SS_INFO_REQ _IOW(BCM_IOCTL, 0x80D, int)
|
#define IOCTL_SS_INFO_REQ _IOW(BCM_IOCTL, 0x80D, int)
|
||||||
#define IOCTL_GET_STATISTICS_POINTER _IOW(BCM_IOCTL, 0x80E, int)
|
#define IOCTL_GET_STATISTICS_POINTER _IOW(BCM_IOCTL, 0x80E, int)
|
||||||
#define IOCTL_CM_REQUEST _IOW(BCM_IOCTL, 0x80F, int)
|
#define IOCTL_CM_REQUEST _IOW(BCM_IOCTL, 0x80F, int)
|
||||||
|
@ -142,13 +126,9 @@ typedef struct _DEVICE_DRIVER_INFO
|
||||||
typedef struct _NVM_READWRITE
|
typedef struct _NVM_READWRITE
|
||||||
{
|
{
|
||||||
void __user *pBuffer;
|
void __user *pBuffer;
|
||||||
// Data to be written from|read to. Memory should be allocated by the caller.
|
|
||||||
uint32_t uiOffset;
|
uint32_t uiOffset;
|
||||||
// offset at which data should be written to or read from.
|
|
||||||
uint32_t uiNumBytes;
|
uint32_t uiNumBytes;
|
||||||
// No. of bytes to be written or read.
|
|
||||||
bool bVerify;
|
bool bVerify;
|
||||||
// Applicable only for write. If set verification of written data will be done.
|
|
||||||
} NVM_READWRITE, *PNVM_READWRITE;
|
} NVM_READWRITE, *PNVM_READWRITE;
|
||||||
|
|
||||||
typedef struct bulkwrmbuffer
|
typedef struct bulkwrmbuffer
|
||||||
|
@ -159,17 +139,9 @@ typedef struct bulkwrmbuffer
|
||||||
|
|
||||||
} BULKWRM_BUFFER, *PBULKWRM_BUFFER;
|
} BULKWRM_BUFFER, *PBULKWRM_BUFFER;
|
||||||
|
|
||||||
/***********Structure used for FlashMap2.x *******************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* These are Sction present inside the Flash.
|
|
||||||
* There is sectional RD/WR for flash Map 2.x.
|
|
||||||
* hence these section will be used in read/write API.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef enum _FLASH2X_SECTION_VAL
|
typedef enum _FLASH2X_SECTION_VAL
|
||||||
{
|
{
|
||||||
NO_SECTION_VAL = 0, //no section is chosen when absolute offset is given for RD/WR
|
NO_SECTION_VAL = 0, /* no section is chosen when absolute offset is given for RD/WR */
|
||||||
ISO_IMAGE1,
|
ISO_IMAGE1,
|
||||||
ISO_IMAGE2,
|
ISO_IMAGE2,
|
||||||
DSD0,
|
DSD0,
|
||||||
|
@ -188,32 +160,29 @@ typedef enum _FLASH2X_SECTION_VAL
|
||||||
} FLASH2X_SECTION_VAL;
|
} FLASH2X_SECTION_VAL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure used for READ/WRITE Flash Map2.x
|
* Structure used for READ/WRITE Flash Map2.x
|
||||||
*/
|
*/
|
||||||
typedef struct _FLASH2X_READWRITE
|
typedef struct _FLASH2X_READWRITE
|
||||||
{
|
{
|
||||||
FLASH2X_SECTION_VAL Section; //which section has to be read/written
|
FLASH2X_SECTION_VAL Section; /* which section has to be read/written */
|
||||||
B_UINT32 offset; //Offset within Section.
|
B_UINT32 offset; /* Offset within Section. */
|
||||||
B_UINT32 numOfBytes; //NOB from the offset
|
B_UINT32 numOfBytes; /* NOB from the offset */
|
||||||
B_UINT32 bVerify;
|
B_UINT32 bVerify;
|
||||||
void __user *pDataBuff; //Buffer for reading/writing
|
void __user *pDataBuff; /* Buffer for reading/writing */
|
||||||
} FLASH2X_READWRITE, *PFLASH2X_READWRITE;
|
} FLASH2X_READWRITE, *PFLASH2X_READWRITE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This structure is used for coping one section to other.
|
* This structure is used for coping one section to other.
|
||||||
* there are two ways to copy one section to other.
|
* there are two ways to copy one section to other.
|
||||||
* it NOB =0, complete section will be copied on to other.
|
* it NOB =0, complete section will be copied on to other.
|
||||||
* if NOB !=0, only NOB will be copied from the given offset.
|
* if NOB !=0, only NOB will be copied from the given offset.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _FLASH2X_COPY_SECTION
|
typedef struct _FLASH2X_COPY_SECTION
|
||||||
{
|
{
|
||||||
//Src Section from which Data has to be copied to DstSection
|
|
||||||
FLASH2X_SECTION_VAL SrcSection;
|
FLASH2X_SECTION_VAL SrcSection;
|
||||||
//Destination Section from where Data has to be coppied.
|
|
||||||
FLASH2X_SECTION_VAL DstSection;
|
FLASH2X_SECTION_VAL DstSection;
|
||||||
//Offset within Section. if NOB =0 it will be ignored and data will be coped from offset 0.
|
|
||||||
B_UINT32 offset;
|
B_UINT32 offset;
|
||||||
//NOB from the offset. if NOB = 0 complete src section will be copied to Destination section.
|
|
||||||
B_UINT32 numOfBytes;
|
B_UINT32 numOfBytes;
|
||||||
} FLASH2X_COPY_SECTION, *PFLASH2X_COPY_SECTION;
|
} FLASH2X_COPY_SECTION, *PFLASH2X_COPY_SECTION;
|
||||||
|
|
||||||
|
@ -225,15 +194,15 @@ typedef enum _SECTION_TYPE
|
||||||
} SECTION_TYPE, *PSECTION_TYPE;
|
} SECTION_TYPE, *PSECTION_TYPE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This section provide the complete bitmap of the Flash.
|
* This section provide the complete bitmap of the Flash.
|
||||||
* using this map lib/APP will isssue read/write command.
|
* using this map lib/APP will isssue read/write command.
|
||||||
Fields are defined as :
|
* Fields are defined as :
|
||||||
Bit [0] = section is present //1:present, 0: Not present
|
* Bit [0] = section is present //1:present, 0: Not present
|
||||||
* Bit [1] = section is valid //1: valid, 0: not valid
|
* Bit [1] = section is valid //1: valid, 0: not valid
|
||||||
* Bit [2] = Section is R/W //0: RW, 1: RO
|
* Bit [2] = Section is R/W //0: RW, 1: RO
|
||||||
* Bit [3] = Section is Active or not 1 means Active, 0->inactive
|
* Bit [3] = Section is Active or not 1 means Active, 0->inactive
|
||||||
* Bit [7...3] = Reserved
|
* Bit [7...3] = Reserved
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _FLASH2X_BITMAP
|
typedef struct _FLASH2X_BITMAP
|
||||||
{
|
{
|
||||||
|
@ -247,36 +216,35 @@ typedef struct _FLASH2X_BITMAP
|
||||||
UCHAR VSA2;
|
UCHAR VSA2;
|
||||||
UCHAR SCSI;
|
UCHAR SCSI;
|
||||||
UCHAR CONTROL_SECTION;
|
UCHAR CONTROL_SECTION;
|
||||||
//Reserved for future use
|
/* Reserved for future use */
|
||||||
UCHAR Reserved0;
|
UCHAR Reserved0;
|
||||||
UCHAR Reserved1;
|
UCHAR Reserved1;
|
||||||
UCHAR Reserved2;
|
UCHAR Reserved2;
|
||||||
} FLASH2X_BITMAP, *PFLASH2X_BITMAP;
|
} FLASH2X_BITMAP, *PFLASH2X_BITMAP;
|
||||||
|
|
||||||
//for net entry time check
|
|
||||||
typedef struct _ST_TIME_ELAPSED_
|
typedef struct _ST_TIME_ELAPSED_
|
||||||
{
|
{
|
||||||
ULONG64 ul64TimeElapsedSinceNetEntry;
|
ULONG64 ul64TimeElapsedSinceNetEntry;
|
||||||
UINT32 uiReserved[4]; //By chance if required for future proofing
|
UINT32 uiReserved[4];
|
||||||
} ST_TIME_ELAPSED, *PST_TIME_ELAPSED;
|
} ST_TIME_ELAPSED, *PST_TIME_ELAPSED;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
WIMAX_IDX = 0, /*To access WiMAX chip GPIO's for GPIO_MULTI_INFO or GPIO_MULTI_MODE*/
|
WIMAX_IDX = 0, /* To access WiMAX chip GPIO's for GPIO_MULTI_INFO or GPIO_MULTI_MODE */
|
||||||
HOST_IDX, /*To access Host chip GPIO's for GPIO_MULTI_INFO or GPIO_MULTI_MODE*/
|
HOST_IDX, /* To access Host chip GPIO's for GPIO_MULTI_INFO or GPIO_MULTI_MODE */
|
||||||
MAX_IDX
|
MAX_IDX
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct stGPIOMultiInfo
|
typedef struct stGPIOMultiInfo
|
||||||
{
|
{
|
||||||
UINT uiGPIOCommand; /* 1 for set and 0 for get*/
|
UINT uiGPIOCommand; /* 1 for set and 0 for get */
|
||||||
UINT uiGPIOMask; /* set the correspondig bit to 1 to access GPIO*/
|
UINT uiGPIOMask; /* set the correspondig bit to 1 to access GPIO */
|
||||||
UINT uiGPIOValue; /* 0 or 1; value to be set when command is 1.*/
|
UINT uiGPIOValue; /* 0 or 1; value to be set when command is 1. */
|
||||||
} __attribute__((packed))GPIO_MULTI_INFO, *PGPIO_MULTI_INFO;
|
} __attribute__((packed))GPIO_MULTI_INFO, *PGPIO_MULTI_INFO;
|
||||||
|
|
||||||
typedef struct stGPIOMultiMode
|
typedef struct stGPIOMultiMode
|
||||||
{
|
{
|
||||||
UINT uiGPIOMode; /* 1 for OUT mode, 0 for IN mode*/
|
UINT uiGPIOMode; /* 1 for OUT mode, 0 for IN mode */
|
||||||
UINT uiGPIOMask; /* GPIO mask to set mode*/
|
UINT uiGPIOMask; /* GPIO mask to set mode */
|
||||||
} __attribute__((packed))GPIO_MULTI_MODE, *PGPIO_MULTI_MODE;
|
} __attribute__((packed))GPIO_MULTI_MODE, *PGPIO_MULTI_MODE;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue