Loading drivers/staging/ath6kl/bmi/include/bmi_internal.h +2 −2 Original line number Diff line number Diff line Loading @@ -44,12 +44,12 @@ static bool bmiDone; int bmiBufferSend(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length); u32 length); int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, u32 length, bool want_timeout); #endif drivers/staging/ath6kl/bmi/src/bmi.c +78 −78 Original line number Diff line number Diff line Loading @@ -54,12 +54,12 @@ very simple. */ static bool pendingEventsFuncCheck = false; static A_UINT32 *pBMICmdCredits; static u32 *pBMICmdCredits; static A_UCHAR *pBMICmdBuf; #define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \ sizeof(A_UINT32) /* cmd */ + \ sizeof(A_UINT32) /* addr */ + \ sizeof(A_UINT32))/* length */ sizeof(u32) /* cmd */ + \ sizeof(u32) /* addr */ + \ sizeof(u32))/* length */ #define BMI_COMMAND_FITS(sz) ((sz) <= MAX_BMI_CMDBUF_SZ) /* APIs visible to the driver */ Loading @@ -79,7 +79,7 @@ BMIInit(void) * bus stack. */ if (!pBMICmdCredits) { pBMICmdCredits = (A_UINT32 *)A_MALLOC_NOWAIT(4); pBMICmdCredits = (u32 *)A_MALLOC_NOWAIT(4); A_ASSERT(pBMICmdCredits); } Loading Loading @@ -109,7 +109,7 @@ int BMIDone(HIF_DEVICE *device) { int status; A_UINT32 cid; u32 cid; if (bmiDone) { AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n")); Loading Loading @@ -145,7 +145,7 @@ int BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) { int status; A_UINT32 cid; u32 cid; if (bmiDone) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Command disallowed\n")); Loading Loading @@ -202,14 +202,14 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) int BMIReadMemory(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, rxlen; u32 offset; u32 remaining, rxlen; A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length))); memset (pBMICmdBuf, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length)); Loading Loading @@ -258,15 +258,15 @@ BMIReadMemory(HIF_DEVICE *device, int BMIWriteMemory(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, txlen; const A_UINT32 header = sizeof(cid) + sizeof(address) + sizeof(length); u32 offset; u32 remaining, txlen; const u32 header = sizeof(cid) + sizeof(address) + sizeof(length); A_UCHAR alignedBuffer[BMI_DATASZ_MAX]; A_UCHAR *src; Loading Loading @@ -323,12 +323,12 @@ BMIWriteMemory(HIF_DEVICE *device, int BMIExecute(HIF_DEVICE *device, A_UINT32 address, A_UINT32 *param) u32 address, u32 *param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address) + sizeof(param)); Loading Loading @@ -371,11 +371,11 @@ BMIExecute(HIF_DEVICE *device, int BMISetAppStart(HIF_DEVICE *device, A_UINT32 address) u32 address) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -408,12 +408,12 @@ BMISetAppStart(HIF_DEVICE *device, int BMIReadSOCRegister(HIF_DEVICE *device, A_UINT32 address, A_UINT32 *param) u32 address, u32 *param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -454,12 +454,12 @@ BMIReadSOCRegister(HIF_DEVICE *device, int BMIWriteSOCRegister(HIF_DEVICE *device, A_UINT32 address, A_UINT32 param) u32 address, u32 param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address) + sizeof(param)); Loading Loading @@ -494,15 +494,15 @@ BMIWriteSOCRegister(HIF_DEVICE *device, int BMIrompatchInstall(HIF_DEVICE *device, A_UINT32 ROM_addr, A_UINT32 RAM_addr, A_UINT32 nbytes, A_UINT32 do_activate, A_UINT32 *rompatch_id) u32 ROM_addr, u32 RAM_addr, u32 nbytes, u32 do_activate, u32 *rompatch_id) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(ROM_addr) + sizeof(RAM_addr) + sizeof(nbytes) + sizeof(do_activate))); Loading Loading @@ -550,11 +550,11 @@ BMIrompatchInstall(HIF_DEVICE *device, int BMIrompatchUninstall(HIF_DEVICE *device, A_UINT32 rompatch_id) u32 rompatch_id) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(rompatch_id))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(rompatch_id)); Loading Loading @@ -587,14 +587,14 @@ BMIrompatchUninstall(HIF_DEVICE *device, static int _BMIrompatchChangeActivation(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list, A_UINT32 do_activate) u32 rompatch_count, u32 *rompatch_list, u32 do_activate) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 length; u32 offset; u32 length; A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) + sizeof(rompatch_count))); memset(pBMICmdBuf, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(rompatch_count)); Loading Loading @@ -631,16 +631,16 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device, int BMIrompatchActivate(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list) u32 rompatch_count, u32 *rompatch_list) { return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 1); } int BMIrompatchDeactivate(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list) u32 rompatch_count, u32 *rompatch_list) { return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 0); } Loading @@ -648,13 +648,13 @@ BMIrompatchDeactivate(HIF_DEVICE *device, int BMILZData(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, txlen; const A_UINT32 header = sizeof(cid) + sizeof(length); u32 offset; u32 remaining, txlen; const u32 header = sizeof(cid) + sizeof(length); A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX+header)); memset (pBMICmdBuf, 0, BMI_DATASZ_MAX+header); Loading Loading @@ -697,11 +697,11 @@ BMILZData(HIF_DEVICE *device, int BMILZStreamStart(HIF_DEVICE *device, A_UINT32 address) u32 address) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -736,12 +736,12 @@ BMILZStreamStart(HIF_DEVICE *device, int bmiBufferSend(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) u32 length) { int status; A_UINT32 timeout; A_UINT32 address; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; u32 timeout; u32 address; u32 mboxAddress[HTC_MAILBOX_NUM_MAX]; HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR, &mboxAddress[0], sizeof(mboxAddress)); Loading Loading @@ -784,12 +784,12 @@ bmiBufferSend(HIF_DEVICE *device, int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, u32 length, bool want_timeout) { int status; A_UINT32 address; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; u32 address; u32 mboxAddress[HTC_MAILBOX_NUM_MAX]; HIF_PENDING_EVENTS_INFO hifPendingEvents; static HIF_PENDING_EVENTS_FUNC getPendingEventsFunc = NULL; Loading Loading @@ -857,8 +857,8 @@ bmiBufferReceive(HIF_DEVICE *device, * NB: word_available is declared static for esoteric reasons * having to do with protection on some OSes. */ static A_UINT32 word_available; A_UINT32 timeout; static u32 word_available; u32 timeout; word_available = 0; timeout = BMI_COMMUNICATION_TIMEOUT; Loading @@ -873,7 +873,7 @@ bmiBufferReceive(HIF_DEVICE *device, break; } if (hifPendingEvents.AvailableRecvBytes >= sizeof(A_UINT32)) { if (hifPendingEvents.AvailableRecvBytes >= sizeof(u32)) { word_available = 1; } continue; Loading Loading @@ -920,7 +920,7 @@ bmiBufferReceive(HIF_DEVICE *device, * reduce BMI_DATASZ_MAX to 32 or 64 */ if ((length > 4) && (length < 128)) { /* check against MBOX FIFO size */ A_UINT32 timeout; u32 timeout; *pBMICmdCredits = 0; timeout = BMI_COMMUNICATION_TIMEOUT; Loading Loading @@ -958,12 +958,12 @@ bmiBufferReceive(HIF_DEVICE *device, } int BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 length) BMIFastDownload(HIF_DEVICE *device, u32 address, A_UCHAR *buffer, u32 length) { int status = A_ERROR; A_UINT32 lastWord = 0; A_UINT32 lastWordOffset = length & ~0x3; A_UINT32 unalignedBytes = length & 0x3; u32 lastWord = 0; u32 lastWordOffset = length & ~0x3; u32 unalignedBytes = length & 0x3; status = BMILZStreamStart (device, address); if (status) { Loading Loading @@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 } int BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, u32 length) { return bmiBufferSend(device, buffer, length); } int BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, bool want_timeout) BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, u32 length, bool want_timeout) { return bmiBufferReceive(device, buffer, length, want_timeout); } drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +3 −3 Original line number Diff line number Diff line Loading @@ -53,10 +53,10 @@ typedef struct bus_request { struct bus_request *next; /* link list of available requests */ struct bus_request *inusenext; /* link list of in use requests */ struct semaphore sem_req; A_UINT32 address; /* request data */ u32 address; /* request data */ A_UCHAR *buffer; A_UINT32 length; A_UINT32 request; u32 length; u32 request; void *context; int status; struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */ Loading drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +21 −21 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsi int reset_sdio_on_unload = 0; module_param(reset_sdio_on_unload, int, 0644); extern A_UINT32 nohifscattersupport; extern u32 nohifscattersupport; /* ------ Static Variables ------ */ Loading Loading @@ -102,9 +102,9 @@ static struct dev_pm_ops ar6k_device_pm_ops = { static int registered = 0; OSDRV_CALLBACKS osdrvCallbacks; extern A_UINT32 onebitmode; extern A_UINT32 busspeedlow; extern A_UINT32 debughif; extern u32 onebitmode; extern u32 busspeedlow; extern u32 debughif; static void ResetAllCards(void); static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func); Loading Loading @@ -154,10 +154,10 @@ int HIFInit(OSDRV_CALLBACKS *callbacks) static int __HIFReadWrite(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length, A_UINT32 request, u32 length, u32 request, void *context) { u8 opcode; Loading Loading @@ -331,10 +331,10 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) /* queue a read/write request */ int HIFReadWrite(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length, A_UINT32 request, u32 length, u32 request, void *context) { int status = A_OK; Loading Loading @@ -465,7 +465,7 @@ static int async_task(void *param) return 0; } static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp) static A_INT32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp) { struct mmc_command cmd; A_INT32 err; Loading Loading @@ -495,7 +495,7 @@ int ReinitSDIO(HIF_DEVICE *device) struct mmc_card *card; struct sdio_func *func; u8 cmd52_resp; A_UINT32 clock; u32 clock; func = device->func; card = func->card; Loading @@ -506,9 +506,9 @@ int ReinitSDIO(HIF_DEVICE *device) do { if (!device->is_suspend) { A_UINT32 resp; u32 resp; u16 rca; A_UINT32 i; u32 i; int bit = fls(host->ocr_avail) - 1; /* emulate the mmc_power_up(...) */ host->ios.vdd = bit; Loading Loading @@ -692,22 +692,22 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) int HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen) void *config, u32 configLen) { A_UINT32 count; u32 count; int status = A_OK; switch(opcode) { case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: ((A_UINT32 *)config)[0] = HIF_MBOX0_BLOCK_SIZE; ((A_UINT32 *)config)[1] = HIF_MBOX1_BLOCK_SIZE; ((A_UINT32 *)config)[2] = HIF_MBOX2_BLOCK_SIZE; ((A_UINT32 *)config)[3] = HIF_MBOX3_BLOCK_SIZE; ((u32 *)config)[0] = HIF_MBOX0_BLOCK_SIZE; ((u32 *)config)[1] = HIF_MBOX1_BLOCK_SIZE; ((u32 *)config)[2] = HIF_MBOX2_BLOCK_SIZE; ((u32 *)config)[3] = HIF_MBOX3_BLOCK_SIZE; break; case HIF_DEVICE_GET_MBOX_ADDR: for (count = 0; count < 4; count ++) { ((A_UINT32 *)config)[count] = HIF_MBOX_START_ADDR(count); ((u32 *)config)[count] = HIF_MBOX_START_ADDR(count); } if (configLen >= sizeof(HIF_DEVICE_MBOX_INFO)) { Loading drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) { int status = A_EINVAL; A_UINT32 request = pReq->Request; u32 request = pReq->Request; HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0]; do { Loading Loading
drivers/staging/ath6kl/bmi/include/bmi_internal.h +2 −2 Original line number Diff line number Diff line Loading @@ -44,12 +44,12 @@ static bool bmiDone; int bmiBufferSend(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length); u32 length); int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, u32 length, bool want_timeout); #endif
drivers/staging/ath6kl/bmi/src/bmi.c +78 −78 Original line number Diff line number Diff line Loading @@ -54,12 +54,12 @@ very simple. */ static bool pendingEventsFuncCheck = false; static A_UINT32 *pBMICmdCredits; static u32 *pBMICmdCredits; static A_UCHAR *pBMICmdBuf; #define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \ sizeof(A_UINT32) /* cmd */ + \ sizeof(A_UINT32) /* addr */ + \ sizeof(A_UINT32))/* length */ sizeof(u32) /* cmd */ + \ sizeof(u32) /* addr */ + \ sizeof(u32))/* length */ #define BMI_COMMAND_FITS(sz) ((sz) <= MAX_BMI_CMDBUF_SZ) /* APIs visible to the driver */ Loading @@ -79,7 +79,7 @@ BMIInit(void) * bus stack. */ if (!pBMICmdCredits) { pBMICmdCredits = (A_UINT32 *)A_MALLOC_NOWAIT(4); pBMICmdCredits = (u32 *)A_MALLOC_NOWAIT(4); A_ASSERT(pBMICmdCredits); } Loading Loading @@ -109,7 +109,7 @@ int BMIDone(HIF_DEVICE *device) { int status; A_UINT32 cid; u32 cid; if (bmiDone) { AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n")); Loading Loading @@ -145,7 +145,7 @@ int BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) { int status; A_UINT32 cid; u32 cid; if (bmiDone) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Command disallowed\n")); Loading Loading @@ -202,14 +202,14 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) int BMIReadMemory(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, rxlen; u32 offset; u32 remaining, rxlen; A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length))); memset (pBMICmdBuf, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length)); Loading Loading @@ -258,15 +258,15 @@ BMIReadMemory(HIF_DEVICE *device, int BMIWriteMemory(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, txlen; const A_UINT32 header = sizeof(cid) + sizeof(address) + sizeof(length); u32 offset; u32 remaining, txlen; const u32 header = sizeof(cid) + sizeof(address) + sizeof(length); A_UCHAR alignedBuffer[BMI_DATASZ_MAX]; A_UCHAR *src; Loading Loading @@ -323,12 +323,12 @@ BMIWriteMemory(HIF_DEVICE *device, int BMIExecute(HIF_DEVICE *device, A_UINT32 address, A_UINT32 *param) u32 address, u32 *param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address) + sizeof(param)); Loading Loading @@ -371,11 +371,11 @@ BMIExecute(HIF_DEVICE *device, int BMISetAppStart(HIF_DEVICE *device, A_UINT32 address) u32 address) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -408,12 +408,12 @@ BMISetAppStart(HIF_DEVICE *device, int BMIReadSOCRegister(HIF_DEVICE *device, A_UINT32 address, A_UINT32 *param) u32 address, u32 *param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -454,12 +454,12 @@ BMIReadSOCRegister(HIF_DEVICE *device, int BMIWriteSOCRegister(HIF_DEVICE *device, A_UINT32 address, A_UINT32 param) u32 address, u32 param) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address) + sizeof(param)); Loading Loading @@ -494,15 +494,15 @@ BMIWriteSOCRegister(HIF_DEVICE *device, int BMIrompatchInstall(HIF_DEVICE *device, A_UINT32 ROM_addr, A_UINT32 RAM_addr, A_UINT32 nbytes, A_UINT32 do_activate, A_UINT32 *rompatch_id) u32 ROM_addr, u32 RAM_addr, u32 nbytes, u32 do_activate, u32 *rompatch_id) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(ROM_addr) + sizeof(RAM_addr) + sizeof(nbytes) + sizeof(do_activate))); Loading Loading @@ -550,11 +550,11 @@ BMIrompatchInstall(HIF_DEVICE *device, int BMIrompatchUninstall(HIF_DEVICE *device, A_UINT32 rompatch_id) u32 rompatch_id) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(rompatch_id))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(rompatch_id)); Loading Loading @@ -587,14 +587,14 @@ BMIrompatchUninstall(HIF_DEVICE *device, static int _BMIrompatchChangeActivation(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list, A_UINT32 do_activate) u32 rompatch_count, u32 *rompatch_list, u32 do_activate) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 length; u32 offset; u32 length; A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) + sizeof(rompatch_count))); memset(pBMICmdBuf, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(rompatch_count)); Loading Loading @@ -631,16 +631,16 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device, int BMIrompatchActivate(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list) u32 rompatch_count, u32 *rompatch_list) { return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 1); } int BMIrompatchDeactivate(HIF_DEVICE *device, A_UINT32 rompatch_count, A_UINT32 *rompatch_list) u32 rompatch_count, u32 *rompatch_list) { return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 0); } Loading @@ -648,13 +648,13 @@ BMIrompatchDeactivate(HIF_DEVICE *device, int BMILZData(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) u32 length) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; A_UINT32 remaining, txlen; const A_UINT32 header = sizeof(cid) + sizeof(length); u32 offset; u32 remaining, txlen; const u32 header = sizeof(cid) + sizeof(length); A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX+header)); memset (pBMICmdBuf, 0, BMI_DATASZ_MAX+header); Loading Loading @@ -697,11 +697,11 @@ BMILZData(HIF_DEVICE *device, int BMILZStreamStart(HIF_DEVICE *device, A_UINT32 address) u32 address) { A_UINT32 cid; u32 cid; int status; A_UINT32 offset; u32 offset; A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); memset (pBMICmdBuf, 0, sizeof(cid) + sizeof(address)); Loading Loading @@ -736,12 +736,12 @@ BMILZStreamStart(HIF_DEVICE *device, int bmiBufferSend(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) u32 length) { int status; A_UINT32 timeout; A_UINT32 address; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; u32 timeout; u32 address; u32 mboxAddress[HTC_MAILBOX_NUM_MAX]; HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR, &mboxAddress[0], sizeof(mboxAddress)); Loading Loading @@ -784,12 +784,12 @@ bmiBufferSend(HIF_DEVICE *device, int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, u32 length, bool want_timeout) { int status; A_UINT32 address; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; u32 address; u32 mboxAddress[HTC_MAILBOX_NUM_MAX]; HIF_PENDING_EVENTS_INFO hifPendingEvents; static HIF_PENDING_EVENTS_FUNC getPendingEventsFunc = NULL; Loading Loading @@ -857,8 +857,8 @@ bmiBufferReceive(HIF_DEVICE *device, * NB: word_available is declared static for esoteric reasons * having to do with protection on some OSes. */ static A_UINT32 word_available; A_UINT32 timeout; static u32 word_available; u32 timeout; word_available = 0; timeout = BMI_COMMUNICATION_TIMEOUT; Loading @@ -873,7 +873,7 @@ bmiBufferReceive(HIF_DEVICE *device, break; } if (hifPendingEvents.AvailableRecvBytes >= sizeof(A_UINT32)) { if (hifPendingEvents.AvailableRecvBytes >= sizeof(u32)) { word_available = 1; } continue; Loading Loading @@ -920,7 +920,7 @@ bmiBufferReceive(HIF_DEVICE *device, * reduce BMI_DATASZ_MAX to 32 or 64 */ if ((length > 4) && (length < 128)) { /* check against MBOX FIFO size */ A_UINT32 timeout; u32 timeout; *pBMICmdCredits = 0; timeout = BMI_COMMUNICATION_TIMEOUT; Loading Loading @@ -958,12 +958,12 @@ bmiBufferReceive(HIF_DEVICE *device, } int BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 length) BMIFastDownload(HIF_DEVICE *device, u32 address, A_UCHAR *buffer, u32 length) { int status = A_ERROR; A_UINT32 lastWord = 0; A_UINT32 lastWordOffset = length & ~0x3; A_UINT32 unalignedBytes = length & 0x3; u32 lastWord = 0; u32 lastWordOffset = length & ~0x3; u32 unalignedBytes = length & 0x3; status = BMILZStreamStart (device, address); if (status) { Loading Loading @@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 } int BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, u32 length) { return bmiBufferSend(device, buffer, length); } int BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, bool want_timeout) BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, u32 length, bool want_timeout) { return bmiBufferReceive(device, buffer, length, want_timeout); }
drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +3 −3 Original line number Diff line number Diff line Loading @@ -53,10 +53,10 @@ typedef struct bus_request { struct bus_request *next; /* link list of available requests */ struct bus_request *inusenext; /* link list of in use requests */ struct semaphore sem_req; A_UINT32 address; /* request data */ u32 address; /* request data */ A_UCHAR *buffer; A_UINT32 length; A_UINT32 request; u32 length; u32 request; void *context; int status; struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */ Loading
drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +21 −21 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsi int reset_sdio_on_unload = 0; module_param(reset_sdio_on_unload, int, 0644); extern A_UINT32 nohifscattersupport; extern u32 nohifscattersupport; /* ------ Static Variables ------ */ Loading Loading @@ -102,9 +102,9 @@ static struct dev_pm_ops ar6k_device_pm_ops = { static int registered = 0; OSDRV_CALLBACKS osdrvCallbacks; extern A_UINT32 onebitmode; extern A_UINT32 busspeedlow; extern A_UINT32 debughif; extern u32 onebitmode; extern u32 busspeedlow; extern u32 debughif; static void ResetAllCards(void); static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func); Loading Loading @@ -154,10 +154,10 @@ int HIFInit(OSDRV_CALLBACKS *callbacks) static int __HIFReadWrite(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length, A_UINT32 request, u32 length, u32 request, void *context) { u8 opcode; Loading Loading @@ -331,10 +331,10 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) /* queue a read/write request */ int HIFReadWrite(HIF_DEVICE *device, A_UINT32 address, u32 address, A_UCHAR *buffer, A_UINT32 length, A_UINT32 request, u32 length, u32 request, void *context) { int status = A_OK; Loading Loading @@ -465,7 +465,7 @@ static int async_task(void *param) return 0; } static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, A_UINT32 flags, A_UINT32 *resp) static A_INT32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp) { struct mmc_command cmd; A_INT32 err; Loading Loading @@ -495,7 +495,7 @@ int ReinitSDIO(HIF_DEVICE *device) struct mmc_card *card; struct sdio_func *func; u8 cmd52_resp; A_UINT32 clock; u32 clock; func = device->func; card = func->card; Loading @@ -506,9 +506,9 @@ int ReinitSDIO(HIF_DEVICE *device) do { if (!device->is_suspend) { A_UINT32 resp; u32 resp; u16 rca; A_UINT32 i; u32 i; int bit = fls(host->ocr_avail) - 1; /* emulate the mmc_power_up(...) */ host->ios.vdd = bit; Loading Loading @@ -692,22 +692,22 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) int HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen) void *config, u32 configLen) { A_UINT32 count; u32 count; int status = A_OK; switch(opcode) { case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: ((A_UINT32 *)config)[0] = HIF_MBOX0_BLOCK_SIZE; ((A_UINT32 *)config)[1] = HIF_MBOX1_BLOCK_SIZE; ((A_UINT32 *)config)[2] = HIF_MBOX2_BLOCK_SIZE; ((A_UINT32 *)config)[3] = HIF_MBOX3_BLOCK_SIZE; ((u32 *)config)[0] = HIF_MBOX0_BLOCK_SIZE; ((u32 *)config)[1] = HIF_MBOX1_BLOCK_SIZE; ((u32 *)config)[2] = HIF_MBOX2_BLOCK_SIZE; ((u32 *)config)[3] = HIF_MBOX3_BLOCK_SIZE; break; case HIF_DEVICE_GET_MBOX_ADDR: for (count = 0; count < 4; count ++) { ((A_UINT32 *)config)[count] = HIF_MBOX_START_ADDR(count); ((u32 *)config)[count] = HIF_MBOX_START_ADDR(count); } if (configLen >= sizeof(HIF_DEVICE_MBOX_INFO)) { Loading
drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) { int status = A_EINVAL; A_UINT32 request = pReq->Request; u32 request = pReq->Request; HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0]; do { Loading