aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/fwio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/wfx/fwio.c')
-rw-r--r--drivers/staging/wfx/fwio.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c
index 1b8aec02d169..98a9391b2bee 100644
--- a/drivers/staging/wfx/fwio.c
+++ b/drivers/staging/wfx/fwio.c
@@ -14,11 +14,11 @@
#include "wfx.h"
#include "hwio.h"
-// Addresses below are in SRAM area
+/* Addresses below are in SRAM area */
#define WFX_DNLD_FIFO 0x09004000
#define DNLD_BLOCK_SIZE 0x0400
-#define DNLD_FIFO_SIZE 0x8000 // (32 * DNLD_BLOCK_SIZE)
-// Download Control Area (DCA)
+#define DNLD_FIFO_SIZE 0x8000 /* (32 * DNLD_BLOCK_SIZE) */
+/* Download Control Area (DCA) */
#define WFX_DCA_IMAGE_SIZE 0x0900C000
#define WFX_DCA_PUT 0x0900C004
#define WFX_DCA_GET 0x0900C008
@@ -58,8 +58,8 @@
#define ERR_ECC_PUB_KEY 0x11
#define ERR_MAC_KEY 0x18
-#define DCA_TIMEOUT 50 // milliseconds
-#define WAKEUP_TIMEOUT 200 // milliseconds
+#define DCA_TIMEOUT 50 /* milliseconds */
+#define WAKEUP_TIMEOUT 200 /* milliseconds */
static const char * const fwio_errors[] = {
[ERR_INVALID_SEC_TYPE] = "Invalid section type or wrong encryption",
@@ -69,8 +69,7 @@ static const char * const fwio_errors[] = {
[ERR_MAC_KEY] = "MAC key not initialized",
};
-/*
- * request_firmware() allocate data using vmalloc(). It is not compatible with
+/* request_firmware() allocate data using vmalloc(). It is not compatible with
* underlying hardware that use DMA. Function below detect this case and
* allocate a bounce buffer if necessary.
*
@@ -125,7 +124,7 @@ static int get_firmware(struct wfx_dev *wdev, u32 keyset_chip,
data = (*fw)->data;
if (memcmp(data, "KEYSET", 6) != 0) {
- // Legacy firmware format
+ /* Legacy firmware format */
*file_offset = 0;
keyset_file = 0x90;
} else {
@@ -207,8 +206,9 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len)
if (ret < 0)
return ret;
- // WFx seems to not support writing 0 in this register during
- // first loop
+ /* The device seems to not support writing 0 in this register
+ * during first loop
+ */
offs += DNLD_BLOCK_SIZE;
ret = sram_reg_write(wdev, WFX_DCA_PUT, offs);
if (ret < 0)
@@ -265,7 +265,7 @@ static int load_firmware_secure(struct wfx_dev *wdev)
if (ret)
goto error;
- sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); // Fifo init
+ sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); /* Fifo init */
sram_write_dma_safe(wdev, WFX_DCA_FW_VERSION, "\x01\x00\x00\x00",
FW_VERSION_SIZE);
sram_write_dma_safe(wdev, WFX_DCA_FW_SIGNATURE, fw->data + fw_offset,
@@ -289,7 +289,7 @@ static int load_firmware_secure(struct wfx_dev *wdev)
sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_COMPLETE);
ret = wait_ncp_status(wdev, NCP_AUTH_OK);
- // Legacy ROM support
+ /* Legacy ROM support */
if (ret < 0)
ret = wait_ncp_status(wdev, NCP_PUB_KEY_RDY);
if (ret < 0)
@@ -334,7 +334,7 @@ int wfx_init_device(struct wfx_dev *wdev)
{
int ret;
int hw_revision, hw_type;
- int wakeup_timeout = 50; // ms
+ int wakeup_timeout = 50; /* ms */
ktime_t now, start;
u32 reg;