summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/bus_sdio.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2019-09-19 14:25:38 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 10:43:39 +0200
commit652b4afb240e5dc196995597942309e89e89c767 (patch)
tree87485071d34ff3cd36ea1a0e4a39df2fa3d6f137 /drivers/staging/wfx/bus_sdio.c
parentfee695e3e30f72a18d4631b8d7589cf413282c7c (diff)
staging: wfx: load firmware
A firmware is necessary to run the chip. wfx_init_device() is in charge of loading firmware on chip and doing low level initialization. Firmwares for WF200 are available here: https://github.com/SiliconLabs/wfx-firmware/ Note that firmware are encrypted. Driver checks that key used to encrypt firmware match with key burned into chip. Currently, "C0" key is used for production chips. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20190919142527.31797-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/bus_sdio.c')
-rw-r--r--drivers/staging/wfx/bus_sdio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c
index 35bcca7ec5dc..25c587fe2141 100644
--- a/drivers/staging/wfx/bus_sdio.c
+++ b/drivers/staging/wfx/bus_sdio.c
@@ -17,6 +17,7 @@
#include "main.h"
static const struct wfx_platform_data wfx_sdio_pdata = {
+ .file_fw = "wfm_wf200",
};
struct wfx_sdio_priv {
@@ -204,8 +205,14 @@ static int wfx_sdio_probe(struct sdio_func *func,
goto err2;
}
+ ret = wfx_probe(bus->core);
+ if (ret)
+ goto err3;
+
return 0;
+err3:
+ wfx_free_common(bus->core);
err2:
wfx_sdio_irq_unsubscribe(bus);
err1:
@@ -220,6 +227,7 @@ static void wfx_sdio_remove(struct sdio_func *func)
{
struct wfx_sdio_priv *bus = sdio_get_drvdata(func);
+ wfx_release(bus->core);
wfx_free_common(bus->core);
wfx_sdio_irq_unsubscribe(bus);
sdio_claim_host(func);