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
25 +++ b/Documentation/devicetree/bindings/misc/bcm47xx-sprom.txt
27 +Broadcom bcm47xx/bcm53xx sprom converter
29 +This driver provbides an sprom based on a given nvram.
33 +- compatible : brcm,bcm47xx-sprom
35 +- nvram : reference to a nvram driver, e.g. bcm47xx-nvram
40 + compatible = "brcm,bcm47xx-sprom";
43 --- a/drivers/misc/Kconfig
44 +++ b/drivers/misc/Kconfig
45 @@ -515,6 +515,17 @@ config VEXPRESS_SYSCFG
46 bus. System Configuration interface is one of the possible means
47 of generating transactions on this bus.
50 + tristate "BCM47XX sprom driver"
52 + This driver parses the sprom from a given nvram which is found on
53 + Broadcom bcm47xx and bcm53xx SoCs.
55 + The sprom contains board configuration data like the
56 + calibration data fro the wifi chips, the mac addresses used
57 + by the board and many other board configuration data. This
58 + driver will provide the sprom to bcma.
60 source "drivers/misc/c2port/Kconfig"
61 source "drivers/misc/eeprom/Kconfig"
62 source "drivers/misc/cb710/Kconfig"
63 --- a/drivers/misc/Makefile
64 +++ b/drivers/misc/Makefile
65 @@ -56,3 +56,4 @@ obj-$(CONFIG_GENWQE) += genwqe/
66 obj-$(CONFIG_ECHO) += echo/
67 obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
68 obj-$(CONFIG_CXL_BASE) += cxl/
69 +obj-$(CONFIG_BCM47XX_SPROM) += bcm47xx-sprom.o