*/
#include <common.h>
+#include <console.h>
#include <mpc5xxx.h>
#include <pci.h>
#include <asm/processor.h>
#include <libfdt.h>
#include <netdev.h>
+#include <video.h>
#ifdef CONFIG_VIDEO_SM501
#include <sm501.h>
#endif
/*
- * ATTENTION: Although partially referenced initdram does NOT make real use
+ * ATTENTION: Although partially referenced dram_init does NOT make real use
* use of CONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS_SDRAM_BASE
* is something else than 0x00000000.
*/
-phys_size_t initdram (int board_type)
+int dram_init(void)
{
ulong dramsize = 0;
ulong dramsize2 = 0;
}
#if defined(CONFIG_TQM5200_B)
- return dramsize + dramsize2;
+ gd->ram_size = dramsize + dramsize2;
#else
- return dramsize;
+ gd->ram_size = dramsize;
#endif /* CONFIG_TQM5200_B */
+
+ return 0;
}
int checkboard (void)
{
-#if defined(CONFIG_AEVFIFO)
- puts ("Board: AEVFIFO\n");
- return 0;
-#endif
-
#if defined(CONFIG_TQM5200S)
# define MODULE_NAME "TQM5200S"
#else
#if defined(CONFIG_STK52XX)
# define CARRIER_NAME "STK52xx"
-#elif defined(CONFIG_TB5200)
-# define CARRIER_NAME "TB5200"
#elif defined(CONFIG_CAM5200)
# define CARRIER_NAME "CAM5200"
#elif defined(CONFIG_FO300)
static int tfp410_read_reg(int reg, uchar *buf)
{
- if (i2c_read(CONFIG_SYS_TFP410_ADDR, reg, 1, buf, 1) != 0) {
- puts ("Error reading the chip.\n");
- return 1;
- }
- return 0;
+ puts("Error reading the chip.\n");
+ return -ENOSYS;
}
static int tfp410_write_reg(int reg, uchar buf)
{
- if (i2c_write(CONFIG_SYS_TFP410_ADDR, reg, 1, &buf, 1) != 0) {
- puts ("Error writing the chip.\n");
- return 1;
- }
- return 0;
+ puts("Error writing the chip.\n");
+ return -ENOSYS;
}
typedef struct _tfp410_config {
{
volatile struct mpc5xxx_lpb *lpb =
(struct mpc5xxx_lpb *) MPC5XXX_LPB;
- int oldbus = i2c_get_bus_num();
uchar buf;
int i = 0;
- i2c_set_bus_num(CONFIG_SYS_TFP410_BUS);
-
/* check version */
if (tfp410_read_reg(TFP410_REG_DEV_ID_H, &buf) != 0)
return -1;
i++;
}
printf("TFP410 initialized.\n");
- i2c_set_bus_num(oldbus);
/* set deadcycle for cs3 to 0 */
setbits_be32(&lpb->cs_deadcycle, 0xffffcfff);
if (line_number == 1) {
strcpy (info, " Board: TQM5200 (TQ-Components GmbH)");
#if defined (CONFIG_CHARON) || defined (CONFIG_FO300) || \
- defined(CONFIG_STK52XX) || defined(CONFIG_TB5200)
+ defined(CONFIG_STK52XX)
} else if (line_number == 2) {
#if defined (CONFIG_CHARON)
strcpy (info, " on a CHARON carrier board");
#if defined (CONFIG_STK52XX)
strcpy (info, " on a STK52xx carrier board");
#endif
-#if defined (CONFIG_TB5200)
- strcpy (info, " on a TB5200 carrier board");
-#endif
#if defined (CONFIG_FO300)
strcpy (info, " on a FO300 carrier board");
#endif
#endif /* CONFIG_VIDEO_SM501 */
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#if defined(CONFIG_VIDEO)
fdt_add_edid(blob, "smi,sm501", edid_buf);
#endif
+
+ return 0;
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */