r2dplus.c 1.2 KB

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