2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-03-11 03:55:12 +00:00
|
|
|
/*
|
2008-03-12 09:02:57 +00:00
|
|
|
* Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
2008-03-11 03:55:12 +00:00
|
|
|
* Copyright (C) 2008 Yusuke Goda <goda.yusuke@renesas.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <ide.h>
|
2019-11-14 19:57:47 +00:00
|
|
|
#include <init.h>
|
2020-05-10 17:39:56 +00:00
|
|
|
#include <net.h>
|
2008-03-11 03:55:12 +00:00
|
|
|
#include <asm/processor.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/pci.h>
|
2008-08-31 16:49:42 +00:00
|
|
|
#include <netdev.h>
|
2008-03-11 03:55:12 +00:00
|
|
|
#include "r7780mp.h"
|
|
|
|
|
|
|
|
int checkboard(void)
|
|
|
|
{
|
|
|
|
#if defined(CONFIG_R7780MP)
|
|
|
|
puts("BOARD: Renesas Solutions R7780MP\n");
|
|
|
|
#else
|
|
|
|
puts("BOARD: Renesas Solutions R7780RP\n");
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int board_init(void)
|
|
|
|
{
|
|
|
|
/* SCIF Enable */
|
2008-06-17 07:27:41 +00:00
|
|
|
writew(0x0, PHCR);
|
2008-03-11 03:55:12 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-06-17 07:27:41 +00:00
|
|
|
void led_set_state(unsigned short value)
|
2008-03-11 03:55:12 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2008-06-17 07:27:41 +00:00
|
|
|
void ide_set_reset(int idereset)
|
2008-03-11 03:55:12 +00:00
|
|
|
{
|
|
|
|
/* if reset = 1 IDE reset will be asserted */
|
2008-06-17 07:27:41 +00:00
|
|
|
if (idereset) {
|
|
|
|
writew(0x432, FPGA_CFCTL);
|
2008-03-11 03:55:12 +00:00
|
|
|
#if defined(CONFIG_R7780MP)
|
2008-06-17 07:27:41 +00:00
|
|
|
writew(inw(FPGA_CFPOW)|0x01, FPGA_CFPOW);
|
2008-03-11 03:55:12 +00:00
|
|
|
#else
|
2008-06-17 07:27:41 +00:00
|
|
|
writew(inw(FPGA_CFPOW)|0x02, FPGA_CFPOW);
|
2008-03-11 03:55:12 +00:00
|
|
|
#endif
|
2008-06-17 07:27:41 +00:00
|
|
|
writew(0x01, FPGA_CFCDINTCLR);
|
2008-03-11 03:55:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct pci_controller hose;
|
|
|
|
void pci_init_board(void)
|
|
|
|
{
|
2008-06-17 07:27:41 +00:00
|
|
|
pci_sh7780_init(&hose);
|
2008-03-11 03:55:12 +00:00
|
|
|
}
|
2008-08-31 16:49:42 +00:00
|
|
|
|
2020-06-26 06:13:33 +00:00
|
|
|
int board_eth_init(struct bd_info *bis)
|
2008-08-31 16:49:42 +00:00
|
|
|
{
|
2011-10-20 10:56:59 +00:00
|
|
|
/* return >= 0 if a chip is found, the board's AX88796L is n2k-based */
|
|
|
|
return ne2k_register() + pci_eth_init(bis);
|
2008-08-31 16:49:42 +00:00
|
|
|
}
|