blob: 5ba6613ed567cc91a3c33eb3023385565e3f8e88 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Dirk Eibach20614a22013-06-26 16:04:26 +02002/*
3 * (C) Copyright 2013
Mario Sixb4893582018-03-06 08:04:58 +01004 * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
Dirk Eibach20614a22013-06-26 16:04:26 +02005 */
6
Mario Six78510212019-03-29 10:18:10 +01007#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
8
Dirk Eibach20614a22013-06-26 16:04:26 +02009#include <common.h>
10#include <gdsys_fpga.h>
11
12#include <asm/io.h>
13
14int fpga_set_reg(u32 fpga, u16 *reg, off_t regoff, u16 data)
15{
16 out_le16(reg, data);
17
18 return 0;
19}
20
21int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data)
22{
23 *data = in_le16(reg);
24
25 return 0;
26}
Mario Six78510212019-03-29 10:18:10 +010027
28#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */