mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
dab0569b97
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48935
46 lines
1.9 KiB
Diff
46 lines
1.9 KiB
Diff
From 4e0ab3269a6d260a41a3673157753147f5f71341 Mon Sep 17 00:00:00 2001
|
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
Date: Sun, 4 May 2014 13:19:20 +0200
|
|
Subject: [PATCH 03/17] bcm47xx-sprom: add Broadcom sprom parser driver
|
|
|
|
This driver needs an nvram driver and fetches the sprom values from the
|
|
nvram and provides it to any other driver. The calibration data for the
|
|
wifi chip the mac address and some more board description data is
|
|
stores in the sprom.
|
|
|
|
This is based on a copy of arch/mips/bcm47xx/sprom.c and my plan is to
|
|
make the bcm47xx MIPS SoCs also use this driver some time later.
|
|
|
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
---
|
|
.../devicetree/bindings/misc/bcm47xx-sprom.txt | 16 +
|
|
drivers/misc/Kconfig | 11 +
|
|
drivers/misc/Makefile | 1 +
|
|
drivers/misc/bcm47xx-sprom.c | 690 +++++++++++++++++++++
|
|
4 files changed, 718 insertions(+)
|
|
create mode 100644 Documentation/devicetree/bindings/misc/bcm47xx-sprom.txt
|
|
create mode 100644 drivers/misc/bcm47xx-sprom.c
|
|
|
|
--- a/drivers/firmware/broadcom/Kconfig
|
|
+++ b/drivers/firmware/broadcom/Kconfig
|
|
@@ -9,3 +9,14 @@ config BCM47XX_NVRAM
|
|
This driver provides an easy way to get value of requested parameter.
|
|
It simply reads content of NVRAM and parses it. It doesn't control any
|
|
hardware part itself.
|
|
+
|
|
+config BCM47XX_SPROM
|
|
+ bool "Broadcom SPROM driver"
|
|
+ depends on BCM47XX_NVRAM
|
|
+ help
|
|
+ Broadcom devices store configuration data in SPROM. Accessing it is
|
|
+ specific to the bus host type, e.g. PCI(e) devices have it mapped in
|
|
+ a PCI BAR.
|
|
+ In case of SoC devices SPROM content is stored on a flash used by
|
|
+ bootloader firmware CFE. This driver provides method to ssb and bcma
|
|
+ drivers to read SPROM on SoC.
|
|
--- a/drivers/firmware/broadcom/Makefile
|
|
+++ b/drivers/firmware/broadcom/Makefile
|
|
@@ -1 +1,2 @@
|
|
obj-$(CONFIG_BCM47XX_NVRAM) += bcm47xx_nvram.o
|
|
+obj-$(CONFIG_BCM47XX_SPROM) += bcm47xx_sprom.o
|