summaryrefslogtreecommitdiff
path: root/drivers/firmware/broadcom/bcm47xx_nvram.c
AgeCommit message (Collapse)Author
2019-09-22firmware: bcm47xx_nvram: _really_ correct size_t printf formatLinus Torvalds
Commit feb4eb060c3a ("firmware: bcm47xx_nvram: Correct size_t printf format") was wrong, and changed a printout of 'header.len' - which is an u32 type - to use '%zu'. It apparently did pattern matching on the other case, where it printed out 'nvram_len', which is indeed of type 'size_t'. Rather than undoing the change, this just makes it use the variable that the change seemed to expect to be used. Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Cc: Paul Burton <paul.burton@mips.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-08-26firmware: bcm47xx_nvram: Correct size_t printf formatFlorian Fainelli
When building on a 64-bit host, we will get warnings like those: drivers/firmware/broadcom/bcm47xx_nvram.c:103:3: note: in expansion of macro 'pr_err' pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", ^~~~~~ drivers/firmware/broadcom/bcm47xx_nvram.c:103:28: note: format string is defined here pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", ~^ %li Use %zu instead for that purpose. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: linux-mips@linux-mips.org Cc: joe@perches.com Cc: Rafał Miłecki <zajec5@gmail.com> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas 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 as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23firmware: bcm47xx_nvram: Support small (0x6000 B) NVRAM partitionsRafał Miłecki
Some old devices with 4 MiB flashes were using 0x1000 block size and could use smaller (0x6000 bytes) flash partition for storing NVRAM content. This adds support for reading NVRAM on Netgear WNR1000 V3. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/19005/ Signed-off-by: James Hogan <jhogan@kernel.org>
2016-03-17drivers/firmware/broadcom/bcm47xx_nvram.c: fix incorrect __ioread32_copyAaro Koskinen
Commit 1f330c327900 ("drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding") switched to use a generic copy function, but failed to notice that the header pointer is updated between the two copies, resulting in bogus data being copied in the latter one. Fix by keeping the old header pointer. The patch fixes totally broken networking on WRT54GL router (both LAN and WLAN interfaces fail to probe). Fixes: 1f330c327900 ("drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Rafal Milecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: <stable@vger.kernel.org> [4.4.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-20drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of ↵Stephen Boyd
open-coding Now that we have a generic library function for this, replace the open-coded instance. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: <zajec5@gmail.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-08-19FIRMWARE: bcm47xx_nvram: Fix module license.Axel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11020/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-06-21MIPS: BCM47xx: Move NVRAM driver to the drivers/firmware/Rafał Miłecki
After Broadcom switched from MIPS to ARM for their home routers we need to have NVRAM driver in some common place (not arch/mips/). As explained in Kconfig, this driver is responsible for parsing SoC configuration data that is passed to the kernel in flash from the bootloader firmware called "CFE". We were thinking about putting it in bus directory, however there are two possible buses for MIPS: drivers/ssb/ and drivers/bcma/. So this won't fit there and this is why I would like to move this driver to the drivers/firmware/. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Paul Walmsley <paul@pwsan.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Seiji Aguchi <seiji.aguchi@hds.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Mike Waychison <mikew@google.com> Cc: Roy Franz <roy.franz@linaro.org> Cc: Matt Fleming <matt.fleming@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Patchwork: https://patchwork.linux-mips.org/patch/10544/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>