Re: [PATCH 2/2] bus: add Altera timeout bridge driver

From: Krzysztof Kozlowski

Date: Sat Oct 03 2026 - 17:32:49 EST


On 03/10/2026 22:19, Vyacheslav Yurkov via B4 Relay wrote:
> From: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
>
> Add support for the Altera timeout bridge IP.
>
> The bridge connects an Avalon bus to the HPS and monitors accesses for
> timeouts. When a timeout occurs the interrupt communicates the event via
> sysfs, which user space can monitor to handle it accordingly. The
> address with the timeout is reported as well.
>

Neither this nor binding explains what is this hardware and where I can
find it.

> Signed-off-by: Vyacheslav Yurkov <V.Yurkov.EXT@xxxxxxxxxx>
> ---
> drivers/bus/Kconfig | 10 ++
> drivers/bus/Makefile | 1 +
> drivers/bus/altera-timeout-bridge.c | 219 ++++++++++++++++++++++++++++++++++++
> 3 files changed, 230 insertions(+)
>
> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
> index e4b1db809187..8a4ad96742e5 100644
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -247,6 +247,16 @@ config DA8XX_MSTPRI
> configuration. Allows to adjust the priorities of all master
> peripherals.
>
> +config ALTERA_TIMEOUT_BRIDGE
> + tristate "Altera AXI Timeout Bridge bus"
> + depends on OF
> + default n
> + help
> + Driver for Altera AXI Timeout Bridge, which can be used a bus.
> + The subordinate devices can be connected to the bridge, which
> + detects frozen read/write requests and notifies user space by
> + means of a sysfs interrupt flag.




> +
> +static ssize_t irq_count_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + struct altera_timeout_bridge_data *driver_data = dev_get_drvdata(dev);
> +
> + return sysfs_emit(buf, "%d\n", atomic_read(&driver_data->irq_count));
> +}
> +
> +static DEVICE_ATTR_RO(timeout_irq);
> +static DEVICE_ATTR_RO(irq_count);

Missing ABI documentation.


> +


> +
> +#define ONLY_BUS ((void *) 1) /* Match if the device is only a bus. */
> +
> +static const struct of_device_id altera_timeout_bridge_of_match[] = {
> + { .compatible = "altera-timeout-bridge", },
> + { .compatible = "simple-bus", .data = ONLY_BUS },

I don't understand why you want to bind to generic compatible.



> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, altera_timeout_bridge_of_match);
> +
> +static struct platform_driver altera_timeout_bridge_driver = {
> + .probe = altera_timeout_bridge_probe,
> + .driver = {
> + .name = "altera-timeout-bridge",
> + .of_match_table = altera_timeout_bridge_of_match,
> + },
> +};
> +
> +module_platform_driver(altera_timeout_bridge_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_DESCRIPTION("Avalon Timeout Bridge Bus");
> +MODULE_AUTHOR("Vyacheslav Yurkov (V.Yurkov.EXT@xxxxxxxxxx)");
> +
>


Best regards,
Krzysztof