[PATCH V5] wlcore/wl18xx: fw logger over sdio

2015-12-03 Thread Guy Mishol
From: Shahar Patury 

enable the FW Logger to work over the SDIO interface instead of only
over UART.
in new design we will use fw internal memory instead of packet ram
that was used in older (and wl12xx) design.
this change will reduce the impact on tp and stability.
adding new event to notify fw logger is ready to be read.
adding dynamic configuration to debugfs.

Signed-off-by: Shahar Patury 
---
V5: Resubmitted again due to cpu interface changes

 drivers/net/wireless/ti/wl18xx/event.c   |2 +
 drivers/net/wireless/ti/wl18xx/event.h   |1 +
 drivers/net/wireless/ti/wl18xx/main.c|9 ++-
 drivers/net/wireless/ti/wlcore/cmd.h |1 -
 drivers/net/wireless/ti/wlcore/debugfs.c |   60 +++
 drivers/net/wireless/ti/wlcore/event.c   |   82 +
 drivers/net/wireless/ti/wlcore/event.h   |9 +++
 drivers/net/wireless/ti/wlcore/io.c  |   11 ++--
 drivers/net/wireless/ti/wlcore/io.h  |4 +-
 drivers/net/wireless/ti/wlcore/main.c|   96 +++--
 drivers/net/wireless/ti/wlcore/rx.c  |1 -
 drivers/net/wireless/ti/wlcore/sysfs.c   |   26 
 drivers/net/wireless/ti/wlcore/wlcore.h  |3 -
 13 files changed, 177 insertions(+), 128 deletions(-)

diff --git a/drivers/net/wireless/ti/wl18xx/event.c 
b/drivers/net/wireless/ti/wl18xx/event.c
index 09c7e09..719907a 100644
--- a/drivers/net/wireless/ti/wl18xx/event.c
+++ b/drivers/net/wireless/ti/wl18xx/event.c
@@ -205,6 +205,8 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl)
 mbox->sc_ssid,
 mbox->sc_pwd_len,
 mbox->sc_pwd);
+   if (vector & FW_LOGGER_INDICATION)
+   wlcore_event_fw_logger(wl);
 
return 0;
 }
diff --git a/drivers/net/wireless/ti/wl18xx/event.h 
b/drivers/net/wireless/ti/wl18xx/event.h
index f3d4f13..070de12 100644
--- a/drivers/net/wireless/ti/wl18xx/event.h
+++ b/drivers/net/wireless/ti/wl18xx/event.h
@@ -41,6 +41,7 @@ enum {
SMART_CONFIG_SYNC_EVENT_ID   = BIT(22),
SMART_CONFIG_DECODE_EVENT_ID = BIT(23),
TIME_SYNC_EVENT_ID   = BIT(24),
+   FW_LOGGER_INDICATION= BIT(25),
 };
 
 enum wl18xx_radar_types {
diff --git a/drivers/net/wireless/ti/wl18xx/main.c 
b/drivers/net/wireless/ti/wl18xx/main.c
index 50cce42..60eda4d 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -461,7 +461,7 @@ static struct wlcore_conf wl18xx_conf = {
},
.fwlog = {
.mode = WL12XX_FWLOG_CONTINUOUS,
-   .mem_blocks   = 2,
+   .mem_blocks   = 0,
.severity = 0,
.timestamp= WL12XX_FWLOG_TIMESTAMP_DISABLED,
.output   = WL12XX_FWLOG_OUTPUT_DBG_PINS,
@@ -584,7 +584,7 @@ static const struct wlcore_partition_set 
wl18xx_ptable[PART_TABLE_LEN] = {
.mem  = { .start = 0x00A0, .size  = 0x00012000 },
.reg  = { .start = 0x00807000, .size  = 0x5000 },
.mem2 = { .start = 0x0080, .size  = 0xB000 },
-   .mem3 = { .start = 0x, .size  = 0x },
+   .mem3 = { .start = 0x00401594, .size  = 0x1020 },
},
[PART_DOWN] = {
.mem  = { .start = 0x, .size  = 0x00014000 },
@@ -602,7 +602,7 @@ static const struct wlcore_partition_set 
wl18xx_ptable[PART_TABLE_LEN] = {
.mem  = { .start = 0x0080, .size  = 0x50FC },
.reg  = { .start = 0x00B00404, .size  = 0x1000 },
.mem2 = { .start = 0x00C0, .size  = 0x0400 },
-   .mem3 = { .start = 0x, .size  = 0x },
+   .mem3 = { .start = 0x00401594, .size  = 0x1020 },
},
[PART_PHY_INIT] = {
.mem  = { .start = WL18XX_PHY_INIT_MEM_ADDR,
@@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl)
DFS_CHANNELS_CONFIG_COMPLETE_EVENT |
SMART_CONFIG_SYNC_EVENT_ID |
SMART_CONFIG_DECODE_EVENT_ID |
-   TIME_SYNC_EVENT_ID;
+   TIME_SYNC_EVENT_ID |
+   FW_LOGGER_INDICATION;
 
wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;
 
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h 
b/drivers/net/wireless/ti/wlcore/cmd.h
index 8dc46c0..e28e2f2 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.h
+++ b/drivers/net/wireless/ti/wlcore/cmd.h
@@ -626,7 +626,6 @@ struct wl12xx_cmd_remove_peer {
  */
 enum wl12xx_fwlogger_log_mode {
WL12XX_FWLOG_CONTINUOUS,
-   WL12XX_FWLOG_ON_DEMAND
 };
 
 /* Include/exclude timestamps from the log messages */
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c 

Re: [PATCH V5] wlcore/wl18xx: fw logger over sdio

2015-12-11 Thread Kalle Valo
Guy Mishol  writes:

> From: Shahar Patury 
>
> enable the FW Logger to work over the SDIO interface instead of only
> over UART.
> in new design we will use fw internal memory instead of packet ram
> that was used in older (and wl12xx) design.
> this change will reduce the impact on tp and stability.
> adding new event to notify fw logger is ready to be read.
> adding dynamic configuration to debugfs.
>
> Signed-off-by: Shahar Patury 

If you submit a patch written by someone else you should add your own
Signed-off-by line. Hence I can't take this in this form, so please
resend.

Also please format your commit logs properly: use capitalisation,
cleanly word wrap the lines and so on. It should look like something you
could give your english teacher without she having a heart attack :)

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html