mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 05:42:58 +00:00
a63e54ab5f
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>
39 lines
747 B
C
39 lines
747 B
C
// 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,
|
|
};
|
|
|