wl18xx: FDSP Code RAM Corruption fix
authorIdo Reis <idor@ti.com>
Tue, 27 Nov 2012 06:44:51 +0000 (08:44 +0200)
committerLuciano Coelho <coelho@ti.com>
Mon, 17 Jun 2013 08:56:58 +0000 (11:56 +0300)
commite3b8bbb9e81536f19d6e0b2c6e8186db47dfd426
tree699746df2df9e36326a6ad2baa4e9537eb0f40f1
parent1105a13bb8ad29cf83d46989ee462d196038be87
wl18xx: FDSP Code RAM Corruption fix

In PG2.0 there is an issue where PHY's FDSP Code RAM sometimes gets
corrupted when exiting from ELP mode. This issue is related to FDSP
Code RAM clock implementation.

PG2.1 introduces a HW fix for this issue that requires the driver to
change the FDSP Code Ram clock settings (mux it to ATGP clock instead
of its own clock).

This workaround uses PHY_FPGA_SPARE_1 register and is relevant to WL8
PG2.1 devices.

The fix is also backward compatible with older PG2.0 devices where the
register PHY_FPGA_SPARE_1 is not used and not connected.

The fix is done in the wl18xx_pre_upload function (must be performed
before uploading the FW code) and includes the following steps:

1. Disable FDSP clock
2. Set ATPG clock toward FDSP Code RAM rather than its own clock.
3. Re-enable FDSP clock

Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl18xx/main.c
drivers/net/wireless/ti/wl18xx/reg.h