Skip to contentSkip to conversation

bus: add Broadcom GISB bus arbiter timeout/error handler

PATCH RESEND Applied Florian Fainelli 2 participants 5 messages May 19, 2014 – May 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover bus: add Broadcom GISB bus arbiter timeout/error handler

Hi all,

This patch adds support for the Broadcom GISB bus arbiter timeout/error handler. GISB is a custom and proprietary bus used in the Broadcom Set Top Box devices exclusively. The bus arbiter offers the possibly to decode faulting masters as well as masters that are timing out on the bus.

V2 addresses some comments made by Arnd, and widens the audience by posting on linux-arm-kernel as well.

These patches should be merged via the 'arm-soc' tree. I am resending those such that every mailing-list has them in copy.

Thank you!

Florian Fainelli (3):
bus: add Broadcom GISB arbiter bus timeout/error handler
Documentation: devicetree: add Broadcom GISB arbiter bindings
Documentation: sysfs: add Broadcom GISB arbiter sysfs properties

 .../ABI/testing/sysfs-platform-brcmstb-gisb-arb    |   8 +
 .../devicetree/bindings/bus/brcm,gisb-arb.txt      |  30 +++
 drivers/bus/Kconfig                                |  11 +-
 drivers/bus/Makefile                               |   1 +
 drivers/bus/brcmstb_gisb.c                         | 289 +++++++++++++++++++++
 5 files changed, 338 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb
 create mode 100644 Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
 create mode 100644 drivers/bus/brcmstb_gisb.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH RESEND v2 1/3 bus: add Broadcom GISB bus arbiter timeout/error handler

This patch adds support for the Broadcom GISB arbiter bus timeout/error handler. GISB is a proprietary bus used by Broadcom Set Top Box System-on-a-chip devices (BCM7xxx) which allows multiple masters and clients to be interfaced with each other.

The bus arbiter offers support for generating two interrupts towards the host CPU, thus allowing us to "catch" clock gated masters, or masters being volontarily blocked for powersaving purposes, or do general system troubleshooting.

We also register a hook with the ARM fault exception handling to allow printing a more informative message than "imprecise external abort at 0x00000000" for instance.

---
Changes in v2:
- use IS_ENABLED() instead of ifdef for CONFIG_PHYS_ADDR_T_64BIT
- fixed typo in Kconfig introduced by the patch

 drivers/bus/Kconfig        |   9 ++
 drivers/bus/Makefile       |   1 +
 drivers/bus/brcmstb_gisb.c | 289 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 299 insertions(+)
 create mode 100644 drivers/bus/brcmstb_gisb.c
drivers/bus/Kconfig +9 -0
index 552373c4e362..7541d7685e28 100644
@@ -41,4 +41,13 @@ config ARM_CCI
 	help
 	  Driver supporting the CCI cache coherent interconnect for ARM
 	  platforms.
+
+config BRCMSTB_GISB_ARB
+	bool "Broadcom STB GISB bus arbiter"
+	depends on ARM
+	help
+	  Driver for the Broadcom Set Top Box System-on-a-chip internal bus
+	  arbiter. This driver provides timeout and target abort error handling
+	  and internal bus master decoding.
+
 endmenu
drivers/bus/Makefile +1 -0
index 8947bdd0de8b..8683739936c0 100644
@@ -10,3 +10,4 @@ obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
 obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
 # CCI cache coherent interconnect for ARM platforms
 obj-$(CONFIG_ARM_CCI)		+= arm-cci.o
+obj-$(CONFIG_BRCMSTB_GISB_ARB)	+= brcmstb_gisb.o
drivers/bus/brcmstb_gisb.c new file +289 -0

289 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH RESEND v2 2/3 Documentation: devicetree: add Broadcom GISB arbiter bindings

In reply to Florian Fainelli

This patch adds the Broadcom GISB arbiter Device Tree binding that is used on all Broadcom Set-top-box System-on-a-chip.

---
Changes in v2:
- respin

 .../devicetree/bindings/bus/brcm,gisb-arb.txt      | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt new file +30 -0
new file mode 100644
index 000000000000..e2d501d20c9a
@@ -0,0 +1,30 @@
+Broadcom GISB bus Arbiter controller
+
+Required properties:
+
+- compatible: should be "brcm,gisb-arb"
+- reg: specifies the base physical address and size of the registers
+- interrupt-parent: specifies the phandle to the parent interrupt controller
+  this arbiter gets interrupt line from
+- interrupts: specifies the two interrupts (timeout and TEA) to be used from
+  the parent interrupt controller
+
+Optional properties:
+
+- brcm,gisb-arb-master-mask: 32-bits wide bitmask used to specify which GISB
+  masters are valid at the system level
+- brcm,gisb-arb-master-names: string list of the litteral name of the GISB
+  masters. Should match the number of bits set in brcm,gisb-master-mask and
+  the order in which they appear
+
+Example:
+
+gisb-arb at f0400000 {
+	compatible = "brcm,gisb-arb";
+	reg = <0xf0400000 0x800>;
+	interrupts = <0>, <2>;
+	interrupt-parent = <&sun_l2_intc>;
+
+	brcm,gisb-arb-master-mask = <0x7>;
+	brcm,gisb-arb-master-names = "bsp_0", "scpu_0", "cpu_0";
+};
Signature · 1 line
1.9.1
#3 lore raw

PATCH RESEND v2 3/3 Documentation: sysfs: add Broadcom GISB arbiter sysfs properties

In reply to Florian Fainelli

This patch documents the sysfs properties exposed by the Broadcom GISB bus arbiter hardware.

---
Changes in v2:
- respin

 Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb
Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb new file +8 -0
new file mode 100644
index 000000000000..f1bad92bbe27
@@ -0,0 +1,8 @@
+What:		/sys/devices/../../gisb_arb_timeout
+Date:		May 2014
+KernelVersion:	3.17
+Contact:	Florian Fainelli <[email protected]>
+Description:
+		Returns the currently configured raw timeout value of the
+		Broadcom Set Top Box internal GISB bus arbiter. Minimum value
+		is 1, and maximum value is 0xffffffff.
Signature · 1 line
1.9.1
#4 lore raw
In reply to Florian Fainelli
Quoted 7 lines · Florian Fainelli

Hi all,

This patch adds support for the Broadcom GISB bus arbiter timeout/error handler. GISB is a custom and proprietary bus used in the Broadcom Set Top Box devices exclusively. The bus arbiter offers the possibly to decode faulting masters as well as masters that are timing out on the bus.

Quoted 7 lines

V2 addresses some comments made by Arnd, and widens the audience by posting on linux-arm-kernel as well.

These patches should be merged via the 'arm-soc' tree. I am resending those such that every mailing-list has them in copy.

Thank you!

Applied to the next/drivers branch now. I've changed the Kconfig and Makefile slightly to maintain alphabetical ordering, which helps avoid a merge conflict with the vexpress drivers.

Arnd