r7780mp.c 1.1 KB

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