summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/boot.c
AgeCommit message (Collapse)Author
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 246 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-26wlcore: Fix config firmware loading issuesTony Lindgren
Booting multiple wl12xx and wl18xx devices using the same rootfs is a pain. You currently have to symlink the right nvs file depending on the wl12xx type. For example, with wl1271-nvs.bin being a symlink to wl127x-nvs.bin by default and trying to bring up a wl128x based device: wlcore: ERROR nvs size is not as expected: 1113 != 912 wlcore: ERROR NVS file is needed during boot wlcore: ERROR NVS file is needed during boot wlcore: ERROR firmware boot failed despite 3 retries Note that wl18xx uses a separate config firmware wl18xx-conf.bin that can be generated with tools using the following two git repos: git.ti.com/wilink8-wlan/18xx-ti-utils git.ti.com/wilink8-wlan/wl18xx_fw So let's not configure the nvs file for wl18xx as it's not needed AFAIK. If it turns out that we also need the nvs file for wl18xx, we can just add it to the config firmware data for wl18xx. Let's fix the issue by using the chip specific config firmware data, and make sure we produce understandable warnings if something is missing. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-07-18wlcore/wl18xx: mesh: added initial mesh support for wl8Maital Hahn
1. Added support for interface and role of mesh type. 2. Enabled enable/start of mesh-point role, and opening and closing a connection with a mesh peer. 3. Added multirole combination of mesh and ap under the same limits of dual ap mode. 4. Add support for 'sta_rc_update' opcode for mesh IF. The 'sta_rc_update' opcode is being used in mesh_plink.c. Add support in wlcore to handle this opcode correctly for mesh (as opposed to current implementation that handles STA only). 5. Bumped the firmware version to support new Mesh functionality Signed-off-by: Maital Hahn <maitalm@ti.com> Signed-off-by: Yaniv Machani <yanivma@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-24wlcore: remove wl12xx_platform_dataEliad Peller
Now that we have wlcore device-tree bindings in place (for both wl12xx and wl18xx), remove the legacy wl12xx_platform_data struct, and move its members into the platform device data (that is passed to wlcore) Davinci 850 is the only platform that still set the platform data in the legacy way (and doesn't have DT bindings), so remove the relevant code/Kconfig option from the board file (as suggested by Sekhar Nori) Since no one currently uses wlcore_spi, simply remove its platform data support (DT bindings will have to be added if someone actually needs it) Signed-off-by: Luciano Coelho <luca@coelho.fi> Signed-off-by: Eliad Peller <eliad@wizery.com> Tested-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-02-08wlcore: use single-role version when verifying the PLT firmwareLuciano Coelho
The PLT firmware used by wl12xx for calibration always has the same version number as the single-role firmware. Currntly the driver rejects the PLT firmware since anything that is not single-role uses the multi-role version. Fix this by using the single-role version for everything except multi-role. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore/wl12xx/wl18xx: verify multi-role and single-role fw versionsLuciano Coelho
Previously we were only checking the single-role firmware version. Now add code to check for the firmware versions separately for each firmware type. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore: change way of checking the firmware versionLuciano Coelho
The firmwares version string contain 5 integers. We used to consider all the digits (except for the first one, which indicates the chip) as linearly increasing version numbers. This is not correct, because some of the integers indicate type of firmware (eg. single-role vs. multi-role) or the internal project it was created for. Besides, this varies a bit from chip to chip, so we need to make the firmware version checks more flexible (eg. allow the lower driver to ignore some of the integers). Additionally, we need to change the code so that we only check for a linearly increasing number on the fields where this actually makes sense. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: update events enum/struct to new fw apiEliad Peller
The event mailbox in wl18xx has a different (non-compatible) structure. Create common functions in wlcore to handle the events, and call them from the chip-specific event mailbox parsers. This way, each driver (wl12xx/wl18xx) extracts the event mailbox by itself according to its own structure, and then calls the common wlcore functions to handle it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: fix a couple small memory leaksDan Carpenter
We should free "chunk" here before returning the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore/wl12xx/wl18xx: check min FW versionArik Nemtsov
Refuse to boot if the FW version is too old. The minimum version is set per chip, with the option of setting it per PG in the future. When boot fails because of an old FW, display a helpful message. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_raw_write32Ido Yariv
Propagate errors from wl1271_raw_write32 and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_raw_read32Ido Yariv
Propagate errors from wl1271_raw_read32. Since the read functions had no way of returning errors in-band, change their prototypes. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_writeIdo Yariv
Propagate errors from wl1271_write and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_readIdo Yariv
Propagate errors from wl1271_read and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wlcore/wl12xx/wl18xx: make NVS file optional for wl18xxArik Nemtsov
Don't spew errors when we can't find the NVS file in wlcore. Instead fail the wl12xx boot HW op if the NVS isn't found. Take this opportunity to remove some dead code from register_hw() which looks for the NVS again needlessly. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore: create private static_data area and add operation to parse itLuciano Coelho
The wl18xx firmware has more information in the static_data than wl12xx. To be able to parse that in an abstracted way, this patch adds a priv area to the static data struct and an operation that allows the lower driver to parse it if necessary. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-05-15wlcore/wl12xx: implement better beacon loss handlingBartosz.Markowski@tieto.com
Make use of REGAINED_BSS_EVENT and instead of reporting connection loss immediately on each BEACON_LOSE event, try if not regained in reasonable period of time. Signed-off-by: bartosz.markowski <bartosz.markowski@tieto.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: use GFP_KERNEL together with GFP_DMALuciano Coelho
GFP_DMA should not be used by itself, it still needs GFP_KERNEL or such. Fix two occurrences of allocations with GFP_DMA only. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: move identify firmware function to a lower driver opLuciano Coelho
Different chip families have different firmware versions, so we need to identify the firmware to enable quirks, reject the used version etc. in the lower drivers. This commit turns the fw_ver_quirks function into an identify_fw operation. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore: add quirk to disable ELPLuciano Coelho
ELP is a very complicated process in the firmware. Due to its complexity, in some early firmware revisions, the ELP feature is disabled. To support this cases, this patch adds a quirk that disables ELP mode. When ELP is not supported, do not attempt to enter ELP when requested by the driver. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore: remove some unnecessary event mailbox address readsLuciano Coelho
We were reading the even mailbox address three times, which was completely unnecessary and complicated things regarding partition selection. Remove the unnecessry reads and set the address for mailbox 1 and 2 after the first read. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: add quirk for legacy NVS supportLuciano Coelho
Instead of checking the chip ID directly in the wlcore code to decide whether to use the new or the old NVS format, we now use a quirk that should be set by the low level driver to say that it needs to use the old format. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: move top initialization to wl12xxLuciano Coelho
The top registers initialization is very specific to the actual hardware used, even the way in which we read from and write to the top registers varies from chip to chip. This patch moves all top registers initialization to wl12xx. Also add a boot op for the wlcore module to call at the right time and a few callbacks with the common called to be called from the lower drivers boot operations. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: add chip-specific identify chip operationLuciano Coelho
Move the code that identifies the chip ID and selects the appropriate firmware to an operation implemented by the lower driver. Also move the quirks definitions into wlcore.h and rename to WLCORE_QUIRK_*. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: implement chip-specific register tablesLuciano Coelho
Add register tables support in wlcore, add some new IO functions to read and write to chip-specific register and data addresses. Move some common register values from wl12xx to wlcore and add the registers table to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: implement chip-specific partition tablesLuciano Coelho
Add partition tables to wlcore, move and reorganize partition setting functions. Move wl12xx partition table to use the wlcore partition table instead. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wl12xx/wlcore: rename wl12xx to wlcoreLuciano Coelho
Rename the wl12xx driver directory to wlcore as an initial step towards the split of the driver into wlcore and wl12xx. We just rename the directory first to keep git blame happy. Signed-off-by: Luciano Coelho <coelho@ti.com>