summaryrefslogtreecommitdiffstats
path: root/board/gdsys/405ep
diff options
context:
space:
mode:
authorDirk Eibach <dirk.eibach@gdsys.cc>2014-07-03 09:28:22 +0200
committerTom Rini <trini@ti.com>2014-07-07 19:47:19 -0400
commit3a990bfaeaf3d8388e1a62163e9361fe89ae3c79 (patch)
tree741216917eb6f247f9182e2046d89b1d88cbb6b7 /board/gdsys/405ep
parent5568fb4402d5b0e01f61867c281b07633f529fd4 (diff)
downloadblackbird-obmc-uboot-3a990bfaeaf3d8388e1a62163e9361fe89ae3c79.tar.gz
blackbird-obmc-uboot-3a990bfaeaf3d8388e1a62163e9361fe89ae3c79.zip
board: gdsys: Make gdsys osd hardware detection more robust
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Diffstat (limited to 'board/gdsys/405ep')
-rw-r--r--board/gdsys/405ep/iocon.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/board/gdsys/405ep/iocon.c b/board/gdsys/405ep/iocon.c
index 079dfb2e73..6ae15e13f4 100644
--- a/board/gdsys/405ep/iocon.c
+++ b/board/gdsys/405ep/iocon.c
@@ -15,7 +15,6 @@
#include "405ep.h"
#include <gdsys_fpga.h>
-#include "../common/dp501.h"
#include "../common/osd.h"
#include "../common/mclink.h"
@@ -99,8 +98,6 @@ enum {
unsigned int mclink_fpgacount;
struct ihs_fpga *fpga_ptr[] = CONFIG_SYS_FPGA_PTR;
-int dp501_i2c[] = CONFIG_SYS_DP501_I2C;
-
static int setup_88e1518(const char *bus, unsigned char addr);
int fpga_set_reg(u32 fpga, u16 *reg, off_t regoff, u16 data)
@@ -374,20 +371,16 @@ int last_stage_init(void)
u16 fpga_features;
int feature_carrier_speed = fpga_features & (1<<4);
bool ch0_rgmii2_present = false;
- int old_bus = i2c_get_bus_num();
FPGA_GET_REG(0, fpga_features, &fpga_features);
- /* Turn on Parade DP501 */
- pca9698_direction_output(0x20, 9, 1);
- udelay(500000);
-
- i2c_set_bus_num(dp501_i2c[0]);
- dp501_powerup(0x08);
- i2c_set_bus_num(old_bus);
+ if (!legacy) {
+ /* Turn on Parade DP501 */
+ pca9698_direction_output(0x20, 9, 1);
+ udelay(500000);
- if (!legacy)
ch0_rgmii2_present = !pca9698_get_value(0x20, 30);
+ }
print_fpga_info(0, ch0_rgmii2_present);
osd_probe(0);
OpenPOWER on IntegriCloud