112-bcm53xx-sprom-add-sprom-driver.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 4e0ab3269a6d260a41a3673157753147f5f71341 Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke@hauke-m.de>
  3. Date: Sun, 4 May 2014 13:19:20 +0200
  4. Subject: [PATCH 03/17] bcm47xx-sprom: add Broadcom sprom parser driver
  5. This driver needs an nvram driver and fetches the sprom values from the
  6. nvram and provides it to any other driver. The calibration data for the
  7. wifi chip the mac address and some more board description data is
  8. stores in the sprom.
  9. This is based on a copy of arch/mips/bcm47xx/sprom.c and my plan is to
  10. make the bcm47xx MIPS SoCs also use this driver some time later.
  11. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  12. ---
  13. .../devicetree/bindings/misc/bcm47xx-sprom.txt | 16 +
  14. drivers/misc/Kconfig | 11 +
  15. drivers/misc/Makefile | 1 +
  16. drivers/misc/bcm47xx-sprom.c | 690 +++++++++++++++++++++
  17. 4 files changed, 718 insertions(+)
  18. create mode 100644 Documentation/devicetree/bindings/misc/bcm47xx-sprom.txt
  19. create mode 100644 drivers/misc/bcm47xx-sprom.c
  20. --- a/drivers/firmware/broadcom/Kconfig
  21. +++ b/drivers/firmware/broadcom/Kconfig
  22. @@ -9,3 +9,14 @@ config BCM47XX_NVRAM
  23. This driver provides an easy way to get value of requested parameter.
  24. It simply reads content of NVRAM and parses it. It doesn't control any
  25. hardware part itself.
  26. +
  27. +config BCM47XX_SPROM
  28. + bool "Broadcom SPROM driver"
  29. + depends on BCM47XX_NVRAM
  30. + help
  31. + Broadcom devices store configuration data in SPROM. Accessing it is
  32. + specific to the bus host type, e.g. PCI(e) devices have it mapped in
  33. + a PCI BAR.
  34. + In case of SoC devices SPROM content is stored on a flash used by
  35. + bootloader firmware CFE. This driver provides method to ssb and bcma
  36. + drivers to read SPROM on SoC.
  37. --- a/drivers/firmware/broadcom/Makefile
  38. +++ b/drivers/firmware/broadcom/Makefile
  39. @@ -1 +1,2 @@
  40. obj-$(CONFIG_BCM47XX_NVRAM) += bcm47xx_nvram.o
  41. +obj-$(CONFIG_BCM47XX_SPROM) += bcm47xx_sprom.o