summaryrefslogtreecommitdiff
path: root/board/gdsys/405ep/dlvision-10g.c
diff options
context:
space:
mode:
authorDirk Eibach <eibach@gdsys.de>2013-06-26 16:04:26 +0200
committerStefan Roese <sr@denx.de>2013-07-25 19:35:42 +0200
commitaba27acf6711dce0ef1507f2f9f02a80d70a45da (patch)
treef77350104f847ab46c990c7119cb705f51089a09 /board/gdsys/405ep/dlvision-10g.c
parentaaf5e825606a70ddc8fca8e366d8c16a6fd3cc7c (diff)
downloadu-boot-imx-aba27acf6711dce0ef1507f2f9f02a80d70a45da.zip
u-boot-imx-aba27acf6711dce0ef1507f2f9f02a80d70a45da.tar.gz
u-boot-imx-aba27acf6711dce0ef1507f2f9f02a80d70a45da.tar.bz2
powerpc/ppc4xx: Use generic accessor functions for gdsys FPGA
A set of accessor functions was added to be able to access not only memory mapped FPGA in a generic way. Thanks to Wolfgang Denk for getting this sorted properly. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/gdsys/405ep/dlvision-10g.c')
-rw-r--r--board/gdsys/405ep/dlvision-10g.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c
index 48d8786..35dfbbc 100644
--- a/board/gdsys/405ep/dlvision-10g.c
+++ b/board/gdsys/405ep/dlvision-10g.c
@@ -55,6 +55,8 @@ enum {
RAM_DDR2_64 = 2,
};
+struct ihs_fpga *fpga_ptr[] = CONFIG_SYS_FPGA_PTR;
+
int misc_init_r(void)
{
/* startup fans */
@@ -79,10 +81,9 @@ static unsigned int get_mc2_present(void)
static void print_fpga_info(unsigned dev)
{
- struct ihs_fpga *fpga = (struct ihs_fpga *) CONFIG_SYS_FPGA_BASE(dev);
- u16 versions = in_le16(&fpga->versions);
- u16 fpga_version = in_le16(&fpga->fpga_version);
- u16 fpga_features = in_le16(&fpga->fpga_features);
+ u16 versions;
+ u16 fpga_version;
+ u16 fpga_features;
unsigned unit_type;
unsigned hardware_version;
unsigned feature_rs232;
@@ -96,6 +97,10 @@ static void print_fpga_info(unsigned dev)
printf("FPGA%d: ", dev);
+ FPGA_GET_REG(dev, versions, &versions);
+ FPGA_GET_REG(dev, fpga_version, &fpga_version);
+ FPGA_GET_REG(dev, fpga_features, &fpga_features);
+
hardware_version = versions & 0x000f;
if (fpga_state
@@ -247,8 +252,9 @@ int checkboard(void)
int last_stage_init(void)
{
- struct ihs_fpga *fpga = (struct ihs_fpga *) CONFIG_SYS_FPGA_BASE(0);
- u16 versions = in_le16(&fpga->versions);
+ u16 versions;
+
+ FPGA_GET_REG(0, versions, &versions);
print_fpga_info(0);
if (get_mc2_present())