17 Aug, 2020

1 commit


28 Jan, 2020

1 commit


07 Jan, 2020

1 commit


06 Jan, 2020

1 commit


01 Nov, 2019

1 commit


23 Sep, 2019

1 commit

  • 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
    Cc: Philippe Mathieu-Daudé
    Cc: Paul Burton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

26 Aug, 2019

2 commits

  • Allow building building the BCM47xx NVRAM and SPROM drivers using
    COMPILE_TEST.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Cc: joe@perches.com
    Cc: Rafał Miłecki
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Florian 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
    Reviewed-by: Philippe Mathieu-Daudé
    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Cc: joe@perches.com
    Cc: Rafał Miłecki
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Florian Fainelli
     

31 May, 2019

1 commit

  • 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
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit


23 Apr, 2018

1 commit

  • 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
    Cc: Ralf Baechle
    Cc: Hauke Mehrtens
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/19005/
    Signed-off-by: James Hogan

    Rafał Miłecki
     

09 Mar, 2018

1 commit


04 Aug, 2016

1 commit

  • The use of config_enabled() against config options is ambiguous. In
    practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
    author might have used it for the meaning of IS_ENABLED(). Using
    IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the intention
    clearer.

    This commit replaces config_enabled() with IS_ENABLED() where possible.
    This commit is only touching bool config options.

    I noticed two cases where config_enabled() is used against a tristate
    option:

    - config_enabled(CONFIG_HWMON)
    [ drivers/net/wireless/ath/ath10k/thermal.c ]

    - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
    [ drivers/gpu/drm/gma500/opregion.c ]

    I did not touch them because they should be converted to IS_BUILTIN()
    in order to keep the logic, but I was not sure it was the authors'
    intention.

    Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook
    Cc: Stas Sergeev
    Cc: Matt Redfearn
    Cc: Joshua Kinard
    Cc: Jiri Slaby
    Cc: Bjorn Helgaas
    Cc: Borislav Petkov
    Cc: Markos Chandras
    Cc: "Dmitry V. Levin"
    Cc: yu-cheng yu
    Cc: James Hogan
    Cc: Brian Gerst
    Cc: Johannes Berg
    Cc: Peter Zijlstra
    Cc: Al Viro
    Cc: Will Drewry
    Cc: Nikolay Martynov
    Cc: Huacai Chen
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Daniel Borkmann
    Cc: Leonid Yegoshin
    Cc: Rafal Milecki
    Cc: James Cowgill
    Cc: Greg Kroah-Hartman
    Cc: Ralf Baechle
    Cc: Alex Smith
    Cc: Adam Buchbinder
    Cc: Qais Yousef
    Cc: Jiang Liu
    Cc: Mikko Rapeli
    Cc: Paul Gortmaker
    Cc: Denys Vlasenko
    Cc: Brian Norris
    Cc: Hidehiro Kawai
    Cc: "Luis R. Rodriguez"
    Cc: Andy Lutomirski
    Cc: Ingo Molnar
    Cc: Dave Hansen
    Cc: "Kirill A. Shutemov"
    Cc: Roland McGrath
    Cc: Paul Burton
    Cc: Kalle Valo
    Cc: Viresh Kumar
    Cc: Tony Wu
    Cc: Huaitong Han
    Cc: Sumit Semwal
    Cc: Alexei Starovoitov
    Cc: Juergen Gross
    Cc: Jason Cooper
    Cc: "David S. Miller"
    Cc: Oleg Nesterov
    Cc: Andrea Gelmini
    Cc: David Woodhouse
    Cc: Marc Zyngier
    Cc: Rabin Vincent
    Cc: "Maciej W. Rozycki"
    Cc: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

13 May, 2016

1 commit

  • Broadcom ARM home routers store SPROM content in NVRAM just like MIPS
    ones. To share SPROM code we need to move it out of arch/mips/ to some
    common place. We already have bcm47xx_nvram in firmware path and SPROM
    should fit there as well.
    This driver is responsible for parsing SoC configuration data into a
    struct shared between ssb and bcma buses.
    This was tested with BCM4706 & BCM5357C0 (BCM47XX) and BCM4708A0
    (ARCH_BCM_5301X).

    Signed-off-by: Rafał Miłecki
    Cc: Hauke Mehrtens
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12210/
    Signed-off-by: Ralf Baechle

    Rafał Miłecki
     

18 Mar, 2016

1 commit

  • 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
    Reviewed-by: Stephen Boyd
    Cc: Rafal Milecki
    Cc: Hauke Mehrtens
    Cc: [4.4.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aaro Koskinen
     

21 Jan, 2016

1 commit


19 Aug, 2015

1 commit


22 Jun, 2015

1 commit

  • 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
    Reviewed-by: Paul Walmsley
    Cc: linux-mips@linux-mips.org
    Cc: Hauke Mehrtens
    Cc: Seiji Aguchi
    Cc: Greg Kroah-Hartman
    Cc: Ard Biesheuvel
    Cc: Mike Waychison
    Cc: Roy Franz
    Cc: Matt Fleming
    Cc: Linus Torvalds
    Patchwork: https://patchwork.linux-mips.org/patch/10544/
    Signed-off-by: Ralf Baechle

    Rafał Miłecki