- 18 3月, 2016 1 次提交
-
-
由 Aaro Koskinen 提交于
Commit 1f330c32 ("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: 1f330c32 ("drivers/firmware/broadcom/bcm47xx_nvram.c: use __ioread32_copy() instead of open-coding") Signed-off-by: NAaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: NStephen 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 21 1月, 2016 1 次提交
-
-
由 Stephen Boyd 提交于
Now that we have a generic library function for this, replace the open-coded instance. Signed-off-by: NStephen 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 19 8月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Signed-off-by: NAxel 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: NRalf Baechle <ralf@linux-mips.org>
-
- 22 6月, 2015 5 次提交
-
-
由 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: NRafał Miłecki <zajec5@gmail.com> Reviewed-by: NPaul 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: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
This simplifies code just a bit (also maybe makes it a bit more intuitive?) and will allow us to stop storing header. Right now we copy whole NVRAM including its header to the internal buffer. It is not needed to store a header as we don't access all these details like CRC, flags, etc. The next improvement that should follow is copying only the real contents. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Arend van Spriel <arend@broadcom.com> Cc: Hante Meuleman <meuleman@broadcom.com> Patchwork: https://patchwork.linux-mips.org/patch/10535/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Hante Meuleman 提交于
Host platforms such as routers supported by OpenWrt can support NVRAM reading directly from internal NVRAM store. The brcmfmac for one requires the complete nvram contents to select what needs to be sent to wireless device. Signed-off-by: NArend van Spriel <arend@broadcom.com> Signed-off-by: NHante Meuleman <meuleman@broadcom.com> Reviewed-by: NArend Van Spriel <arend@broadcom.com> Reviewed-by: NFranky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: NDaniel (Deognyoun) Kim <dekim@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10093/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
First of all it shouldn't modify copied NVRAM just to make sure it can loop over all entries. It's enough to just compare current position pointer with the end of buffer address. Secondly buffer is guaranteed to be \0 ended, so we don't need strnchr. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Hante Meuleman <meuleman@broadcom.com> Cc: Ian Kent <raven@themaw.net> Patchwork: https://patchwork.linux-mips.org/patch/10032/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
This will simplify reading its contents. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Hante Meuleman <meuleman@broadcom.com> Cc: Ian Kent <raven@themaw.net> Patchwork: https://patchwork.linux-mips.org/patch/10031/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 02 4月, 2015 3 次提交
-
-
由 Rafał Miłecki 提交于
When dealing with whole flash content (bcm47xx_nvram_init_from_mem) we need to find NVRAM start trying various partition sizes (nvram_sizes). This is not needed when using MTD as we have direct partition access. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: https://patchwork.linux-mips.org/patch/9652/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
For years Broadcom devices use 64 KiB NVRAM partition size and some of them indeed have it filled in more than 50%. This change allows reading whole NVRAM e.g. on Netgear WNDR4500 and Netgear R8000. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: https://patchwork.linux-mips.org/patch/9651/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
We use IO functions like readl & ioremap_nocache, so include linux/io.h Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: https://patchwork.linux-mips.org/patch/9650/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 01 4月, 2015 4 次提交
-
-
由 Rafał Miłecki 提交于
[ralf@linux-mips.org: Fixed conflicts.] Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Paul Walmsley <paul@pwsan.com> Patchwork: https://patchwork.linux-mips.org/patch/8665/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
There are two reasons for having this header in the common place: 1) Simplifying drivers that read NVRAM entries. We will be able to safely call bcm47xx_nvram_* functions without #ifdef-s. 2) Getting NVRAM driver out of MIPS arch code. This is needed to support BCM5301X arch which also requires this NVRAM driver. Patch for that will follow once we get is reviewed. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Arnd Bergmann <arnd@arndb.de> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-soc@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8619/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8662/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
Also drop some unneeded memset-s. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8661/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 24 11月, 2014 5 次提交
-
-
由 Rafał Miłecki 提交于
1) Move private defines to the .c file 2) Move SPROM helper to the sprom.c 3) Drop unused code 4) Rename magic to the NVRAM_MAGIC 5) Add const to the char pointer we never modify Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8289/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
NVRAM can be read using magic memory offset, but after all it's just a flash partition. On platforms where NVRAM isn't needed early we can get it using mtd subsystem. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8266/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
This drops ssb/bcma dependency and will allow us to make it a standalone driver. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: https://patchwork.linux-mips.org/patch/8233/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
This makes NVRAM code less bcm47xx/ssb specific allowing it to become a standalone driver in the future. A similar patch for bcma will follow when it's ready. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7612/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Rafał Miłecki 提交于
We should be using ioremap_nocache helper which handles remaps in a smarter way. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/7611/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 19 3月, 2014 1 次提交
-
-
由 Rafał Miłecki 提交于
Broadcom boards support 32 GPIOs and NVRAM may have entires for higher ones too. Example: gpio23=wombo_reset Signed-off-by: NRafa? Mi?ecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Rafał Miłecki <zajec5@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/6547/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 25 1月, 2014 1 次提交
-
-
由 Paul Gortmaker 提交于
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NJohn Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6320/
-
- 23 1月, 2014 1 次提交
-
-
由 Hauke Mehrtens 提交于
Move the possible nvram sizes from the stack into the data segment Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NJohn Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6044/
-
- 30 10月, 2013 1 次提交
-
-
由 Hauke Mehrtens 提交于
The nvram contains some gpio configuration for boards. It is stored in a gpio<number>=name format e.g. gpio8=wps_button gpio4=robo_reset This patches adds a function to parse these entries, so other driver can use it. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5841/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 16 2月, 2013 7 次提交
-
-
由 Hauke Mehrtens 提交于
The nvram functions are exported and used by some normal drivers. To prevent name clashes with ofter parts of the kernel code add a bcm47xx_ prefix in front of the function names and the header file name. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4744/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Hauke Mehrtens 提交于
The old code just worked for nvram with a size of 0x8000 bytes. This patch adds support for reading nvram from partitions of 0xF000 and 0x10000 bytes. There is just 32KB space for the nvram, but most devices do not use the full size and this code reads the first 32KB in that case and prints a warning. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4743/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Hauke Mehrtens 提交于
Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4742/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Hauke Mehrtens 提交于
Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4741/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Hauke Mehrtens 提交于
This makes it possible to handle the case of not being able to read the nvram ram. This could happen when the code searching for the specific flash chip have not run jet. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4740/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Hauke Mehrtens 提交于
Instead of using our own error codes use some common codes. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4739/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
由 Rafał Miłecki 提交于
Also check if parallel flash is present at all before accessing it and add support for serial flash on BCMA bus. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Acked-by: NHauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4738/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
-
- 01 2月, 2013 1 次提交
-
-
由 Ralf Baechle 提交于
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 20 10月, 2012 1 次提交
-
-
由 Hauke Mehrtens 提交于
This is a preparing step for adding serial flash support. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
- 06 3月, 2012 1 次提交
-
-
由 Hauke Mehrtens 提交于
Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
- 09 8月, 2011 3 次提交
-
-
由 Hauke Mehrtens 提交于
This patch add support for the bcma bus. Broadcom uses only Mips 74K CPUs on the new SoC and on the old ons using ssb bus there are no Mips 74K CPUs. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Acked-by: NRalf Baechle <ralf@linux-mips.org> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
由 Hauke Mehrtens 提交于
Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Acked-by: NRalf Baechle <ralf@linux-mips.org> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
由 Hauke Mehrtens 提交于
Prepare bcm47xx to support different System buses. Before adding support for bcma it should be possible to build bcm47xx without the need of ssb. With this patch bcm47xx does not directly contain a ssb_bus, but a union contain all the supported system buses. As a SoC just uses one system bus a union is a good choice. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Acked-by: NRalf Baechle <ralf@linux-mips.org> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
-
- 19 5月, 2011 1 次提交
-
-
由 Hauke Mehrtens 提交于
We are generating the prefix based on the PCI bus address the device is on. This is done like Broadcom does it in their code expect that the the bus number is increased by one. In the SB bus implementation used by Broadcom the SB bus emulates a PCI bus so the kernel sees one PCI bus more then in our implementation. We do not handle prefixes like sb/1/ yet as they are only used on the new bus which is not implemented yet. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2364/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 05 8月, 2010 1 次提交
-
-
由 Hauke Mehrtens 提交于
Nvram_getenv should behave like cfe_getenv. cfe_getenv returns 0 on success and -9 if the value was not found. If the input was wrong -8 will be returned by cfe_getenv. Change nvram_getenv to do the same. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Cc: Waldemar Brodkorb <wbx@openadk.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1520/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 06 7月, 2010 1 次提交
-
-
由 Waldemar Brodkorb 提交于
When trying to netboot a Linksys WRT54GS WLAN router, the bootup fails, because of following error message: ... [ 0.424000] b44: b44.c:v2.0 [ 0.424000] b44: Invalid MAC address found in EEPROM [ 0.432000] b44 ssb0:1: Problem fetching invariants of chip,aborting [ 0.436000] b44: probe of ssb0:1 failed with error -22 ... The router uses a CFE bootloader, but most of the needed environment variables for network card initialization, are not available from CFE via printenv and even though not via cfe_getenv(). The required environment variables are saved in a special partition in flash memory. The attached patch implement nvram_getenv and enables bootup via NFS root on my router. Most of the patch is extracted from the OpenWrt subversion repository and stripped down and cleaned up to just fix this issue. [Ralf: sorted out header file inclusions. Lots of unneded headers and such that should have been included.] Signed-off-by: NWaldemar Brodkorb <wbx@openadk.org> Reviewed-by: NPhil Sutter <phil@nwl.cc> To: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/1359/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-