r2dplus.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2007,2008
  4. * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  5. */
  6. #include <common.h>
  7. #include <ide.h>
  8. #include <netdev.h>
  9. #include <asm/processor.h>
  10. #include <asm/io.h>
  11. #include <asm/pci.h>
  12. int checkboard(void)
  13. {
  14. puts("BOARD: Renesas Solutions R2D Plus\n");
  15. return 0;
  16. }
  17. int board_init(void)
  18. {
  19. return 0;
  20. }
  21. int board_late_init(void)
  22. {
  23. return 0;
  24. }
  25. #define FPGA_BASE 0xA4000000
  26. #define FPGA_CFCTL (FPGA_BASE + 0x04)
  27. #define CFCTL_EN (0x432)
  28. #define FPGA_CFPOW (FPGA_BASE + 0x06)
  29. #define CFPOW_ON (0x02)
  30. #define FPGA_CFCDINTCLR (FPGA_BASE + 0x2A)
  31. #define CFCDINTCLR_EN (0x01)
  32. void ide_set_reset(int idereset)
  33. {
  34. /* if reset = 1 IDE reset will be asserted */
  35. if (idereset) {
  36. outw(CFCTL_EN, FPGA_CFCTL); /* CF enable */
  37. outw(inw(FPGA_CFPOW)|CFPOW_ON, FPGA_CFPOW); /* Power OM */
  38. outw(CFCDINTCLR_EN, FPGA_CFCDINTCLR); /* Int clear */
  39. }
  40. }
  41. static struct pci_controller hose;
  42. void pci_init_board(void)
  43. {
  44. pci_sh7751_init(&hose);
  45. }
  46. int board_eth_init(bd_t *bis)
  47. {
  48. return pci_eth_init(bis);
  49. }