1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-26 16:13:55 +01:00

drivers: Add AXI uclass

Add a uclass for AXI (Advanced eXtensible Interface) busses, and a
driver for the gdsys IHS AXI bus on IHS FPGAs.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Mario Six
2018-08-09 14:51:16 +02:00
committed by Anatolij Gustschin
parent f05ebbf47a
commit a63e54ab5f
7 changed files with 142 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ source "drivers/adc/Kconfig"
source "drivers/ata/Kconfig"
source "drivers/axi/Kconfig"
source "drivers/block/Kconfig"
source "drivers/bootcount/Kconfig"

View File

@@ -103,6 +103,7 @@ obj-y += smem/
obj-y += soc/
obj-$(CONFIG_REMOTEPROC) += remoteproc/
obj-y += thermal/
obj-y += axi/
obj-$(CONFIG_MACH_PIC32) += ddr/microchip/
endif

13
drivers/axi/Kconfig Normal file
View File

@@ -0,0 +1,13 @@
menuconfig AXI
bool "AXI bus drivers"
help
Support AXI (Advanced eXtensible Interface) busses, a on-chip
interconnect specification for managing functional blocks in SoC
designs, which is also often used in designs involving FPGAs (e.g.
communication with IP cores in Xilinx FPGAs).
These types of busses expose a virtual address space that can be
accessed using different address widths (8, 16, and 32 are supported
for now).
Other similar bus architectures may be compatible as well.

8
drivers/axi/Makefile Normal file
View File

@@ -0,0 +1,8 @@
#
# (C) Copyright 2017
# Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(CONFIG_AXI) += axi-uclass.o

39
drivers/axi/axi-uclass.c Normal file
View File

@@ -0,0 +1,39 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2017
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
#include <common.h>
#include <dm.h>
#include <axi.h>
int axi_read(struct udevice *dev, ulong address, void *data,
enum axi_size_t size)
{
struct axi_ops *ops = axi_get_ops(dev);
if (!ops->read)
return -ENOSYS;
return ops->read(dev, address, data, size);
}
int axi_write(struct udevice *dev, ulong address, void *data,
enum axi_size_t size)
{
struct axi_ops *ops = axi_get_ops(dev);
if (!ops->write)
return -ENOSYS;
return ops->write(dev, address, data, size);
}
UCLASS_DRIVER(axi) = {
.id = UCLASS_AXI,
.name = "axi",
.post_bind = dm_scan_fdt_dev,
.flags = DM_UC_FLAG_SEQ_ALIAS,
};