1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 4 * Copyright (C) 2008 Yusuke Goda <goda.yusuke@renesas.com> 5 */ 6 7#include <common.h> 8#include <ide.h> 9#include <init.h> 10#include <net.h> 11#include <asm/processor.h> 12#include <asm/io.h> 13#include <asm/pci.h> 14#include <netdev.h> 15#include "r7780mp.h" 16 17int checkboard(void) 18{ 19#if defined(CONFIG_R7780MP) 20 puts("BOARD: Renesas Solutions R7780MP\n"); 21#else 22 puts("BOARD: Renesas Solutions R7780RP\n"); 23#endif 24 return 0; 25} 26 27int board_init(void) 28{ 29 /* SCIF Enable */ 30 writew(0x0, PHCR); 31 32 return 0; 33} 34 35void led_set_state(unsigned short value) 36{ 37 38} 39 40void ide_set_reset(int idereset) 41{ 42 /* if reset = 1 IDE reset will be asserted */ 43 if (idereset) { 44 writew(0x432, FPGA_CFCTL); 45#if defined(CONFIG_R7780MP) 46 writew(inw(FPGA_CFPOW)|0x01, FPGA_CFPOW); 47#else 48 writew(inw(FPGA_CFPOW)|0x02, FPGA_CFPOW); 49#endif 50 writew(0x01, FPGA_CFCDINTCLR); 51 } 52} 53 54static struct pci_controller hose; 55void pci_init_board(void) 56{ 57 pci_sh7780_init(&hose); 58} 59 60int board_eth_init(bd_t *bis) 61{ 62 /* return >= 0 if a chip is found, the board's AX88796L is n2k-based */ 63 return ne2k_register() + pci_eth_init(bis); 64} 65