Print fpga info at last_stage_init on gdsys 405ep boards.
Use dtt_init() to startup fans.
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/ppc4xx-gpio.h>
+#include <dtt.h>
#include "405ep.h"
#include <gdsys_fpga.h>
RAM_DDR2_64 = 2,
};
+int misc_init_r(void)
+{
+ /* startup fans */
+ dtt_init();
+
+ return 0;
+}
+
static unsigned int get_hwver(void)
{
u16 latch3 = in_le16((void *)LATCH3_BASE);
*/
int checkboard(void)
{
- char buf[64];
- int i = getenv_f("serial#", buf, sizeof(buf));
+ char *s = getenv("serial#");
- printf("Board: ");
+ puts("Board: ");
- printf("DLVision 10G");
+ puts("DLVision 10G");
- if (i > 0) {
+ if (s != NULL) {
puts(", serial# ");
- puts(buf);
+ puts(s);
}
puts("\n");
- print_fpga_info(0);
- if (get_mc2_present())
- print_fpga_info(1);
-
return 0;
}
ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0);
u16 versions = in_le16(&fpga->versions);
+ print_fpga_info(0);
+ if (get_mc2_present())
+ print_fpga_info(1);
+
if (((versions >> 4) & 0x000f) != UNITTYPE_MAIN_USER)
return 0;
#include <asm/io.h>
#include <asm/ppc4xx-gpio.h>
+#include <dtt.h>
#include <miiphy.h>
#include "405ep.h"
HWVER_122 = 3,
};
+int misc_init_r(void)
+{
+ /* startup fans */
+ dtt_init();
+
+ return 0;
+}
+
int configure_gbit_phy(unsigned char addr)
{
unsigned short value;
*/
int checkboard(void)
{
- char buf[64];
- int i = getenv_f("serial#", buf, sizeof(buf));
+ char *s = getenv("serial#");
+
+ puts("Board: CATCenter Io");
+
+ if (s != NULL) {
+ puts(", serial# ");
+ puts(s);
+ }
+
+ puts("\n");
+
+ return 0;
+}
+
+static void print_fpga_info(void)
+{
ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0);
u16 versions = in_le16(&fpga->versions);
u16 fpga_version = in_le16(&fpga->fpga_version);
feature_channels = fpga_features & 0x007f;
feature_expansion = fpga_features & (1<<15);
- printf("Board: ");
-
- printf("CATCenter Io");
-
- if (i > 0) {
- puts(", serial# ");
- puts(buf);
- }
- puts("\n ");
+ puts("FPGA: ");
switch (unit_type) {
case UNITTYPE_CCD_SWITCH:
printf(" %d channel(s)", feature_channels);
printf(", expansion %ssupported\n", feature_expansion ? "" : "un");
-
- return 0;
}
/*
ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0);
unsigned int k;
+ print_fpga_info();
+
miiphy_register(CONFIG_SYS_GBIT_MII_BUSNAME,
bb_miiphy_read, bb_miiphy_write);
*/
int checkboard(void)
{
- char buf[64];
- int i = getenv_f("serial#", buf, sizeof(buf));
+ char *s = getenv("serial#");
+
+ puts("Board: ");
+
+ puts("IoCon");
+
+ if (s != NULL) {
+ puts(", serial# ");
+ puts(s);
+ }
+
+ puts("\n");
+
+ return 0;
+}
+
+static void print_fpga_info(void)
+{
ihs_fpga_t *fpga = (ihs_fpga_t *) CONFIG_SYS_FPGA_BASE(0);
u16 versions = in_le16(&fpga->versions);
u16 fpga_version = in_le16(&fpga->fpga_version);
feature_carriers = (fpga_features & 0x000c) >> 2;
feature_video_channels = fpga_features & 0x0003;
- printf("Board: ");
-
- printf("IoCon");
-
- if (i > 0) {
- puts(", serial# ");
- puts(buf);
- }
- puts("\n ");
-
switch (unit_type) {
case UNITTYPE_MAIN_USER:
printf("Mainchannel");
printf(", %d carrier(s)", feature_carriers);
printf(", %d video channel(s)\n", feature_video_channels);
-
- return 0;
}
int last_stage_init(void)
{
+ print_fpga_info();
+
return osd_probe(0);
}
#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_BOARD_EARLY_INIT_R
+#define CONFIG_MISC_INIT_R
#define CONFIG_LAST_STAGE_INIT
#define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */
* Commands additional to the ones defined in amcc-common.h
*/
#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DTT
#undef CONFIG_CMD_EEPROM
/*
#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_BOARD_EARLY_INIT_R
+#define CONFIG_MISC_INIT_R
#define CONFIG_LAST_STAGE_INIT
#define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */
* Commands additional to the ones defined in amcc-common.h
*/
#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DTT
#undef CONFIG_CMD_EEPROM
/*