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