Loading drivers/staging/bcm/Ioctl.h +40 −72 Original line number Diff line number Diff line Loading @@ -30,41 +30,25 @@ typedef struct stGPIOInfo typedef struct stUserThreadReq { //0->Inactivate LED thread. //1->Activate the LED thread /* 0->Inactivate LED thread. */ /* 1->Activate the LED thread */ UINT ThreadState; } __attribute__((packed))USER_THREAD_REQ, *PUSER_THREAD_REQ; #define LED_THREAD_ACTIVATION_REQ 1 ////********** ioctl codes ***********//// #define LED_THREAD_ACTIVATION_REQ 1 #define BCM_IOCTL 'k' //1.Control code for CONTROL MESSAGES #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) // //3. #define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int) // //4.Control code to write x number of bytes to common memory //starting from address y #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_REGISTER_WRITE _IOW(BCM_IOCTL, 0x802, int) #define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int) #define IOCTL_BCM_COMMON_MEMORY_WRITE _IOW(BCM_IOCTL, 0x804, int) #define IOCTL_BCM_COMMON_MEMORY_READ _IOR(BCM_IOCTL, 0x805, int) #define IOCTL_GET_CONTROL_MESSAGE _IOR(BCM_IOCTL, 0x806, int) #define IOCTL_BCM_FIRMWARE_DOWNLOAD _IOW(BCM_IOCTL, 0x807, 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) //10.Control code for LINK UP #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) //12.Control code for IDLE MODE CONTROL #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_GET_STATISTICS_POINTER _IOW(BCM_IOCTL, 0x80E, int) #define IOCTL_CM_REQUEST _IOW(BCM_IOCTL, 0x80F, int) Loading Loading @@ -142,13 +126,9 @@ typedef struct _DEVICE_DRIVER_INFO typedef struct _NVM_READWRITE { void __user *pBuffer; // Data to be written from|read to. Memory should be allocated by the caller. uint32_t uiOffset; // offset at which data should be written to or read from. uint32_t uiNumBytes; // No. of bytes to be written or read. bool bVerify; // Applicable only for write. If set verification of written data will be done. } NVM_READWRITE, *PNVM_READWRITE; typedef struct bulkwrmbuffer Loading @@ -159,17 +139,9 @@ typedef struct bulkwrmbuffer } 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 { 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_IMAGE2, DSD0, Loading @@ -192,12 +164,13 @@ typedef enum _FLASH2X_SECTION_VAL */ typedef struct _FLASH2X_READWRITE { FLASH2X_SECTION_VAL Section; //which section has to be read/written B_UINT32 offset; //Offset within Section. B_UINT32 numOfBytes; //NOB from the offset FLASH2X_SECTION_VAL Section; /* which section has to be read/written */ B_UINT32 offset; /* Offset within Section. */ B_UINT32 numOfBytes; /* NOB from the offset */ B_UINT32 bVerify; void __user *pDataBuff; //Buffer for reading/writing void __user *pDataBuff; /* Buffer for reading/writing */ } FLASH2X_READWRITE, *PFLASH2X_READWRITE; /* * This structure is used for coping one section to other. * there are two ways to copy one section to other. Loading @@ -207,13 +180,9 @@ typedef struct _FLASH2X_READWRITE typedef struct _FLASH2X_COPY_SECTION { //Src Section from which Data has to be copied to DstSection FLASH2X_SECTION_VAL SrcSection; //Destination Section from where Data has to be coppied. 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; //NOB from the offset. if NOB = 0 complete src section will be copied to Destination section. B_UINT32 numOfBytes; } FLASH2X_COPY_SECTION, *PFLASH2X_COPY_SECTION; Loading @@ -227,8 +196,8 @@ typedef enum _SECTION_TYPE /* * This section provide the complete bitmap of the Flash. * using this map lib/APP will isssue read/write command. Fields are defined as : Bit [0] = section is present //1:present, 0: Not present * Fields are defined as : * Bit [0] = section is present //1:present, 0: Not present * Bit [1] = section is valid //1: valid, 0: not valid * Bit [2] = Section is R/W //0: RW, 1: RO * Bit [3] = Section is Active or not 1 means Active, 0->inactive Loading @@ -247,17 +216,16 @@ typedef struct _FLASH2X_BITMAP UCHAR VSA2; UCHAR SCSI; UCHAR CONTROL_SECTION; //Reserved for future use /* Reserved for future use */ UCHAR Reserved0; UCHAR Reserved1; UCHAR Reserved2; } FLASH2X_BITMAP, *PFLASH2X_BITMAP; //for net entry time check typedef struct _ST_TIME_ELAPSED_ { ULONG64 ul64TimeElapsedSinceNetEntry; UINT32 uiReserved[4]; //By chance if required for future proofing UINT32 uiReserved[4]; } ST_TIME_ELAPSED, *PST_TIME_ELAPSED; enum { Loading Loading
drivers/staging/bcm/Ioctl.h +40 −72 Original line number Diff line number Diff line Loading @@ -30,41 +30,25 @@ typedef struct stGPIOInfo typedef struct stUserThreadReq { //0->Inactivate LED thread. //1->Activate the LED thread /* 0->Inactivate LED thread. */ /* 1->Activate the LED thread */ UINT ThreadState; } __attribute__((packed))USER_THREAD_REQ, *PUSER_THREAD_REQ; #define LED_THREAD_ACTIVATION_REQ 1 ////********** ioctl codes ***********//// #define LED_THREAD_ACTIVATION_REQ 1 #define BCM_IOCTL 'k' //1.Control code for CONTROL MESSAGES #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) // //3. #define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int) // //4.Control code to write x number of bytes to common memory //starting from address y #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_REGISTER_WRITE _IOW(BCM_IOCTL, 0x802, int) #define IOCTL_BCM_REGISTER_READ _IOR(BCM_IOCTL, 0x803, int) #define IOCTL_BCM_COMMON_MEMORY_WRITE _IOW(BCM_IOCTL, 0x804, int) #define IOCTL_BCM_COMMON_MEMORY_READ _IOR(BCM_IOCTL, 0x805, int) #define IOCTL_GET_CONTROL_MESSAGE _IOR(BCM_IOCTL, 0x806, int) #define IOCTL_BCM_FIRMWARE_DOWNLOAD _IOW(BCM_IOCTL, 0x807, 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) //10.Control code for LINK UP #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) //12.Control code for IDLE MODE CONTROL #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_GET_STATISTICS_POINTER _IOW(BCM_IOCTL, 0x80E, int) #define IOCTL_CM_REQUEST _IOW(BCM_IOCTL, 0x80F, int) Loading Loading @@ -142,13 +126,9 @@ typedef struct _DEVICE_DRIVER_INFO typedef struct _NVM_READWRITE { void __user *pBuffer; // Data to be written from|read to. Memory should be allocated by the caller. uint32_t uiOffset; // offset at which data should be written to or read from. uint32_t uiNumBytes; // No. of bytes to be written or read. bool bVerify; // Applicable only for write. If set verification of written data will be done. } NVM_READWRITE, *PNVM_READWRITE; typedef struct bulkwrmbuffer Loading @@ -159,17 +139,9 @@ typedef struct bulkwrmbuffer } 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 { 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_IMAGE2, DSD0, Loading @@ -192,12 +164,13 @@ typedef enum _FLASH2X_SECTION_VAL */ typedef struct _FLASH2X_READWRITE { FLASH2X_SECTION_VAL Section; //which section has to be read/written B_UINT32 offset; //Offset within Section. B_UINT32 numOfBytes; //NOB from the offset FLASH2X_SECTION_VAL Section; /* which section has to be read/written */ B_UINT32 offset; /* Offset within Section. */ B_UINT32 numOfBytes; /* NOB from the offset */ B_UINT32 bVerify; void __user *pDataBuff; //Buffer for reading/writing void __user *pDataBuff; /* Buffer for reading/writing */ } FLASH2X_READWRITE, *PFLASH2X_READWRITE; /* * This structure is used for coping one section to other. * there are two ways to copy one section to other. Loading @@ -207,13 +180,9 @@ typedef struct _FLASH2X_READWRITE typedef struct _FLASH2X_COPY_SECTION { //Src Section from which Data has to be copied to DstSection FLASH2X_SECTION_VAL SrcSection; //Destination Section from where Data has to be coppied. 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; //NOB from the offset. if NOB = 0 complete src section will be copied to Destination section. B_UINT32 numOfBytes; } FLASH2X_COPY_SECTION, *PFLASH2X_COPY_SECTION; Loading @@ -227,8 +196,8 @@ typedef enum _SECTION_TYPE /* * This section provide the complete bitmap of the Flash. * using this map lib/APP will isssue read/write command. Fields are defined as : Bit [0] = section is present //1:present, 0: Not present * Fields are defined as : * Bit [0] = section is present //1:present, 0: Not present * Bit [1] = section is valid //1: valid, 0: not valid * Bit [2] = Section is R/W //0: RW, 1: RO * Bit [3] = Section is Active or not 1 means Active, 0->inactive Loading @@ -247,17 +216,16 @@ typedef struct _FLASH2X_BITMAP UCHAR VSA2; UCHAR SCSI; UCHAR CONTROL_SECTION; //Reserved for future use /* Reserved for future use */ UCHAR Reserved0; UCHAR Reserved1; UCHAR Reserved2; } FLASH2X_BITMAP, *PFLASH2X_BITMAP; //for net entry time check typedef struct _ST_TIME_ELAPSED_ { ULONG64 ul64TimeElapsedSinceNetEntry; UINT32 uiReserved[4]; //By chance if required for future proofing UINT32 uiReserved[4]; } ST_TIME_ELAPSED, *PST_TIME_ELAPSED; enum { Loading