Skip to content

Commit 8f93662

Browse files
fancerarndb
authored andcommitted
bus: Add Baikal-T1 APB-bus driver
Baikal-T1 AXI-APB bridge is used to access the SoC subsystem CSRs. IO requests are routed to this bus by means of the DW AMBA 3 AXI Interconnect. In case if an attempted APB transaction stays with no response for a pre-defined time an interrupt occurs and the bus gets freed for a next operation. This driver provides the interrupt handler to detect the erroneous address, prints an error message about the address fault, updates an errors counter. The counter and the APB-bus operations timeout can be accessed via corresponding sysfs nodes. A dedicated sysfs-node can be also used to artificially cause the bus errors described above. [arnd: fix build warnings for missing includes and wrong return types] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Serge Semin <[email protected]> Cc: Alexey Malahov <[email protected]> Cc: Paul Burton <[email protected]> Cc: Olof Johansson <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Reported-by: kbuild test robot <[email protected]> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 63cb771 commit 8f93662

File tree

3 files changed

+438
-0
lines changed

3 files changed

+438
-0
lines changed

drivers/bus/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ config BRCMSTB_GISB_ARB
2929
arbiter. This driver provides timeout and target abort error handling
3030
and internal bus master decoding.
3131

32+
config BT1_APB
33+
tristate "Baikal-T1 APB-bus driver"
34+
depends on MIPS_BAIKAL_T1 || COMPILE_TEST
35+
select REGMAP_MMIO
36+
help
37+
Baikal-T1 AXI-APB bridge is used to access the SoC subsystem CSRs.
38+
IO requests are routed to this bus by means of the DW AMBA 3 AXI
39+
Interconnect. In case of any APB protocol collisions, slave device
40+
not responding on timeout an IRQ is raised with an erroneous address
41+
reported to the APB terminator (APB Errors Handler Block). This
42+
driver provides the interrupt handler to detect the erroneous
43+
address, prints an error message about the address fault, updates an
44+
errors counter. The counter and the APB-bus operations timeout can be
45+
accessed via corresponding sysfs nodes.
46+
3247
config BT1_AXI
3348
tristate "Baikal-T1 AXI-bus driver"
3449
depends on MIPS_BAIKAL_T1 || COMPILE_TEST

drivers/bus/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj-$(CONFIG_MOXTET) += moxtet.o
1313
# DPAA2 fsl-mc bus
1414
obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
1515

16+
obj-$(CONFIG_BT1_APB) += bt1-apb.o
1617
obj-$(CONFIG_BT1_AXI) += bt1-axi.o
1718
obj-$(CONFIG_IMX_WEIM) += imx-weim.o
1819
obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o

0 commit comments

Comments
 (0)