r2dplus.c 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 <init.h>
  9. #include <net.h>
  10. #include <netdev.h>
  11. #include <asm/processor.h>
  12. #include <asm/io.h>
  13. int checkboard(void)
  14. {
  15. puts("BOARD: Renesas Solutions R2D Plus\n");
  16. return 0;
  17. }
  18. int board_init(void)
  19. {
  20. return 0;
  21. }
  22. int board_late_init(void)
  23. {
  24. return 0;
  25. }
  26. #define FPGA_BASE 0xA4000000
  27. #define FPGA_CFCTL (FPGA_BASE + 0x04)
  28. #define CFCTL_EN (0x432)
  29. #define FPGA_CFPOW (FPGA_BASE + 0x06)
  30. #define CFPOW_ON (0x02)
  31. #define FPGA_CFCDINTCLR (FPGA_BASE + 0x2A)
  32. #define CFCDINTCLR_EN (0x01)
  33. void ide_set_reset(int idereset)
  34. {
  35. /* if reset = 1 IDE reset will be asserted */
  36. if (idereset) {
  37. outw(CFCTL_EN, FPGA_CFCTL); /* CF enable */
  38. outw(inw(FPGA_CFPOW)|CFPOW_ON, FPGA_CFPOW); /* Power OM */
  39. outw(CFCDINTCLR_EN, FPGA_CFCDINTCLR); /* Int clear */
  40. }
  41. }
  42. #ifndef CONFIG_DM_ETH
  43. int board_eth_init(struct bd_info *bis)
  44. {
  45. return pci_eth_init(bis);
  46. }
  47. #endif