r7780mp.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #include <common.h>
  7. #include <ide.h>
  8. #include <asm/processor.h>
  9. #include <asm/io.h>
  10. #include <asm/pci.h>
  11. #include <netdev.h>
  12. #include "r7780mp.h"
  13. int checkboard(void)
  14. {
  15. #if defined(CONFIG_R7780MP)
  16. puts("BOARD: Renesas Solutions R7780MP\n");
  17. #else
  18. puts("BOARD: Renesas Solutions R7780RP\n");
  19. #endif
  20. return 0;
  21. }
  22. int board_init(void)
  23. {
  24. /* SCIF Enable */
  25. writew(0x0, PHCR);
  26. return 0;
  27. }
  28. void led_set_state(unsigned short value)
  29. {
  30. }
  31. void ide_set_reset(int idereset)
  32. {
  33. /* if reset = 1 IDE reset will be asserted */
  34. if (idereset) {
  35. writew(0x432, FPGA_CFCTL);
  36. #if defined(CONFIG_R7780MP)
  37. writew(inw(FPGA_CFPOW)|0x01, FPGA_CFPOW);
  38. #else
  39. writew(inw(FPGA_CFPOW)|0x02, FPGA_CFPOW);
  40. #endif
  41. writew(0x01, FPGA_CFCDINTCLR);
  42. }
  43. }
  44. static struct pci_controller hose;
  45. void pci_init_board(void)
  46. {
  47. pci_sh7780_init(&hose);
  48. }
  49. int board_eth_init(bd_t *bis)
  50. {
  51. /* return >= 0 if a chip is found, the board's AX88796L is n2k-based */
  52. return ne2k_register() + pci_eth_init(bis);
  53. }