]> Git Repo - J-u-boot.git/blame - drivers/axi/axi-uclass.c
ram: rk3399: Map chipselect for lpddr4
[J-u-boot.git] / drivers / axi / axi-uclass.c
CommitLineData
a63e54ab
MS
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2017
4 * Mario Six, Guntermann & Drunck GmbH, [email protected]
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <axi.h>
10
11int axi_read(struct udevice *dev, ulong address, void *data,
12 enum axi_size_t size)
13{
14 struct axi_ops *ops = axi_get_ops(dev);
15
16 if (!ops->read)
17 return -ENOSYS;
18
19 return ops->read(dev, address, data, size);
20}
21
22int axi_write(struct udevice *dev, ulong address, void *data,
23 enum axi_size_t size)
24{
25 struct axi_ops *ops = axi_get_ops(dev);
26
27 if (!ops->write)
28 return -ENOSYS;
29
30 return ops->write(dev, address, data, size);
31}
32
33UCLASS_DRIVER(axi) = {
34 .id = UCLASS_AXI,
35 .name = "axi",
36 .post_bind = dm_scan_fdt_dev,
37 .flags = DM_UC_FLAG_SEQ_ALIAS,
38};
39
This page took 0.06476 seconds and 4 git commands to generate.