bubinga.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * (C) Copyright 2000-2005
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <asm/processor.h>
  9. #include <asm/io.h>
  10. long int spd_sdram(void);
  11. int board_early_init_f(void)
  12. {
  13. mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
  14. mtdcr(UIC0ER, 0x00000000); /* disable all ints */
  15. mtdcr(UIC0CR, 0x00000010);
  16. mtdcr(UIC0PR, 0xFFFF7FF0); /* set int polarities */
  17. mtdcr(UIC0TR, 0x00000010); /* set int trigger levels */
  18. mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
  19. /*
  20. * Configure CPC0_PCI to enable PerWE as output
  21. * and enable the internal PCI arbiter if selected
  22. */
  23. if (in_8((void *)FPGA_REG1) & FPGA_REG1_PCI_INT_ARB)
  24. mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN);
  25. else
  26. mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN);
  27. return 0;
  28. }
  29. /*
  30. * Check Board Identity:
  31. */
  32. int checkboard(void)
  33. {
  34. char buf[64];
  35. int i = getenv_f("serial#", buf, sizeof(buf));
  36. puts("Board: Bubinga - AMCC PPC405EP Evaluation Board");
  37. if (i > 0) {
  38. puts(", serial# ");
  39. puts(buf);
  40. }
  41. putc('\n');
  42. return (0);
  43. }
  44. /* -------------------------------------------------------------------------
  45. initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
  46. the necessary info for SDRAM controller configuration
  47. ------------------------------------------------------------------------- */
  48. phys_size_t initdram(int board_type)
  49. {
  50. return spd_sdram();
  51. }