From: Dirk Eibach Date: Mon, 22 Apr 2013 13:16:02 +0200 Subject: [U-Boot] [PATCH 01/11] powerpc/ppc4xx: Add generic accessor functions for gdsys FPGA In-Reply-To: <1366629372-32022-1-git-send-email-eibach@gdsys.de> References: <1366629372-32022-1-git-send-email-eibach@gdsys.de> Message-ID: <1366629372-32022-2-git-send-email-eibach@gdsys.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de A set of accessor functions was added to be able to access not only memory mapped FPGA in a generic way. Signed-off-by: Dirk Eibach --- include/gdsys_fpga.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/gdsys_fpga.h b/include/gdsys_fpga.h index 1758d74..c12a31d 100644 --- a/include/gdsys_fpga.h +++ b/include/gdsys_fpga.h @@ -32,9 +32,14 @@ enum { FPGA_STATE_PLATFORM = 1 << 2, }; +#define REG(reg) offsetof(struct ihs_fpga, reg) + int get_fpga_state(unsigned dev); void print_fpga_state(unsigned dev); +void fpga_set_reg(unsigned int fpga, u16 reg, u16 data); +u16 fpga_get_reg(unsigned int fpga, u16 reg); + struct ihs_gpio { u16 read; u16 clear; -- 1.7.10.4