linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wlcore/wl12xx: Fix fw logger over sdio
@ 2016-04-14  8:58 Guy Mishol
  2016-05-11 18:15 ` Kalle Valo
  2016-05-11 18:26 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Guy Mishol @ 2016-04-14  8:58 UTC (permalink / raw)
  To: linux-wireless; +Cc: Guy Mishol

The commit fb724ed5c617 ("wlcore: Fix regression in
wlcore_set_partition()") fixed wl12xx functionality.
However, it reverted the support in fw logger
over sdio in wl18xx.

This patch reverts the changes made and also fixes
the original functionality issue introduced in wl12xx.

Fixes: fb724ed5c617
("wlcore: Fix regression in wlcore_set_partition()")

Signed-off-by: Guy Mishol <guym@ti.com>
---
 drivers/net/wireless/ti/wl12xx/main.c |  4 ++--
 drivers/net/wireless/ti/wlcore/io.c   | 17 ++++++++++++++---
 drivers/net/wireless/ti/wlcore/io.h   |  3 ++-
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index a0d6ccc..2a52e894 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -553,8 +553,8 @@ static struct wlcore_partition_set wl12xx_ptable[PART_TABLE_LEN] = {
 			.size  = 0x00000004
 		},
 		.mem3 = {
-			.start = 0x00040404,
-			.size  = 0x00000000
+			.start = 0x00000000,
+			.size  = 0x00040404
 		},
 	},
 
diff --git a/drivers/net/wireless/ti/wlcore/io.c b/drivers/net/wireless/ti/wlcore/io.c
index 564ca75..1cc6d5a 100644
--- a/drivers/net/wireless/ti/wlcore/io.c
+++ b/drivers/net/wireless/ti/wlcore/io.c
@@ -175,14 +175,25 @@ int wlcore_set_partition(struct wl1271 *wl,
 	if (ret < 0)
 		goto out;
 
-	/* We don't need the size of the last partition, as it is
-	 * automatically calculated based on the total memory size and
-	 * the sizes of the previous partitions.
+	/* wl12xx only: We don't need the size of the last partition,
+	 * as it is automatically calculated based on the total memory
+	 * size and the sizes of the previous partitions.
+	 *
+	 * wl18xx re-defines the HW_PART3 addresses for logger over
+	 * SDIO support. wl12xx is expecting the write to
+	 * HW_PART3_START_ADDR at offset 24. This creates conflict
+	 * between the addresses.
+	 * In order to fix this the expected value is written to
+	 * HW_PART3_SIZE_ADDR instead which is at offset 24 after changes.
 	 */
 	ret = wlcore_raw_write32(wl, HW_PART3_START_ADDR, p->mem3.start);
 	if (ret < 0)
 		goto out;
 
+	ret = wlcore_raw_write32(wl, HW_PART3_SIZE_ADDR, p->mem3.size);
+	if (ret < 0)
+		goto out;
+
 out:
 	return ret;
 }
diff --git a/drivers/net/wireless/ti/wlcore/io.h b/drivers/net/wireless/ti/wlcore/io.h
index 10cf374..704ce64 100644
--- a/drivers/net/wireless/ti/wlcore/io.h
+++ b/drivers/net/wireless/ti/wlcore/io.h
@@ -36,7 +36,8 @@
 #define HW_PART1_START_ADDR             (HW_PARTITION_REGISTERS_ADDR + 12)
 #define HW_PART2_SIZE_ADDR              (HW_PARTITION_REGISTERS_ADDR + 16)
 #define HW_PART2_START_ADDR             (HW_PARTITION_REGISTERS_ADDR + 20)
-#define HW_PART3_START_ADDR             (HW_PARTITION_REGISTERS_ADDR + 24)
+#define HW_PART3_SIZE_ADDR              (HW_PARTITION_REGISTERS_ADDR + 24)
+#define HW_PART3_START_ADDR             (HW_PARTITION_REGISTERS_ADDR + 28)
 
 #define HW_ACCESS_REGISTER_SIZE         4
 
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] wlcore/wl12xx: Fix fw logger over sdio
  2016-04-14  8:58 [PATCH] wlcore/wl12xx: Fix fw logger over sdio Guy Mishol
@ 2016-05-11 18:15 ` Kalle Valo
  2016-05-11 18:26 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-05-11 18:15 UTC (permalink / raw)
  To: Guy Mishol; +Cc: linux-wireless

Guy Mishol <guym@ti.com> writes:

> The commit fb724ed5c617 ("wlcore: Fix regression in
> wlcore_set_partition()") fixed wl12xx functionality.
> However, it reverted the support in fw logger
> over sdio in wl18xx.
>
> This patch reverts the changes made and also fixes
> the original functionality issue introduced in wl12xx.
>
> Fixes: fb724ed5c617
> ("wlcore: Fix regression in wlcore_set_partition()")
>
> Signed-off-by: Guy Mishol <guym@ti.com>

Fixes in one line, no line wrapping please. Also no empty line between
Fixes and S-o-b lines. I'll fix these this time.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wlcore/wl12xx: Fix fw logger over sdio
  2016-04-14  8:58 [PATCH] wlcore/wl12xx: Fix fw logger over sdio Guy Mishol
  2016-05-11 18:15 ` Kalle Valo
@ 2016-05-11 18:26 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-05-11 18:26 UTC (permalink / raw)
  To: Guy Mishol; +Cc: linux-wireless, Guy Mishol

Guy Mishol <guym@ti.com> wrote:
> The commit fb724ed5c617 ("wlcore: Fix regression in
> wlcore_set_partition()") fixed wl12xx functionality.
> However, it reverted the support in fw logger
> over sdio in wl18xx.
> 
> This patch reverts the changes made and also fixes
> the original functionality issue introduced in wl12xx.
> 
> Fixes: fb724ed5c617 ("wlcore: Fix regression in wlcore_set_partition()")
> Signed-off-by: Guy Mishol <guym@ti.com>

Thanks, 1 patch applied to wireless-drivers-next.git:

6fe813e3d561 wlcore/wl12xx: Fix fw logger over sdio

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/8833001/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-11 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14  8:58 [PATCH] wlcore/wl12xx: Fix fw logger over sdio Guy Mishol
2016-05-11 18:15 ` Kalle Valo
2016-05-11 18:26 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).