Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ab71a02 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Ralf Baechle
Browse files

MIPS: BCM47xx: Move SPROM driver to drivers/firmware/



Broadcom ARM home routers store SPROM content in NVRAM just like MIPS
ones. To share SPROM code we need to move it out of arch/mips/ to some
common place. We already have bcm47xx_nvram in firmware path and SPROM
should fit there as well.
This driver is responsible for parsing SoC configuration data into a
struct shared between ssb and bcma buses.
This was tested with BCM4706 & BCM5357C0 (BCM47XX) and BCM4708A0
(ARCH_BCM_5301X).

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12210/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent b11d0227
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ config BCM47XX
	select GPIOLIB
	select LEDS_GPIO_REGISTER
	select BCM47XX_NVRAM
	select BCM47XX_SPROM
	help
	 Support for BCM47XX based boards

+1 −1
Original line number Diff line number Diff line
@@ -3,5 +3,5 @@
# under Linux.
#

obj-y				+= irq.o prom.o serial.o setup.o time.o sprom.o
obj-y				+= irq.o prom.o serial.o setup.o time.o
obj-y				+= board.o buttons.o leds.o workarounds.o
+0 −3
Original line number Diff line number Diff line
@@ -10,9 +10,6 @@
/* prom.c */
void __init bcm47xx_prom_highmem_init(void);

/* sprom.c */
void bcm47xx_sprom_register_fallbacks(void);

/* buttons.c */
int __init bcm47xx_buttons_register(void);

+1 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@

#include "bcm47xx_private.h"

#include <linux/bcm47xx_sprom.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/ethtool.h>
@@ -151,7 +152,6 @@ void __init plat_mem_setup(void)
		pr_info("Using bcma bus\n");
#ifdef CONFIG_BCM47XX_BCMA
		bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
		bcm47xx_sprom_register_fallbacks();
		bcm47xx_register_bcma();
		bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
#ifdef CONFIG_HIGHMEM
+11 −0
Original line number Diff line number Diff line
@@ -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.
Loading