xref: /openbmc/u-boot/board/gdsys/common/fpga.c (revision 78a88f79)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2013
4  * Dirk Eibach,  Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
5  */
6 
7 #include <common.h>
8 #include <gdsys_fpga.h>
9 
10 #include <asm/io.h>
11 
12 int fpga_set_reg(u32 fpga, u16 *reg, off_t regoff, u16 data)
13 {
14 	out_le16(reg, data);
15 
16 	return 0;
17 }
18 
19 int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data)
20 {
21 	*data = in_le16(reg);
22 
23 	return 0;
24 }
25