adciop.c 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * (C) Copyright 2000
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <common.h>
  24. #include "adciop.h"
  25. /* ------------------------------------------------------------------------- */
  26. #define _NOT_USED_ 0xFFFFFFFF
  27. /* ------------------------------------------------------------------------- */
  28. int board_early_init_f (void)
  29. {
  30. /*
  31. * Set port pin in escc2 to keep living, and configure user led output
  32. */
  33. *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */
  34. *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */
  35. /*
  36. * Init pci regs
  37. */
  38. *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */
  39. *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */
  40. *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */
  41. *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */
  42. *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */
  43. *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */
  44. *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */
  45. return 0;
  46. }
  47. /*
  48. * Check Board Identity:
  49. */
  50. int checkboard (void)
  51. {
  52. char str[64];
  53. int i = getenv_r ("serial#", str, sizeof (str));
  54. puts ("Board: ");
  55. if (!i || strncmp (str, "ADCIOP", 6)) {
  56. puts ("### No HW ID - assuming ADCIOP\n");
  57. return (1);
  58. }
  59. puts (str);
  60. putc ('\n');
  61. return 0;
  62. }
  63. /* ------------------------------------------------------------------------- */
  64. long int initdram (int board_type)
  65. {
  66. return (16 * 1024 * 1024);
  67. }
  68. /* ------------------------------------------------------------------------- */
  69. int testdram (void)
  70. {
  71. /* TODO: XXX XXX XXX */
  72. printf ("test: 16 MB - ok\n");
  73. return (0);
  74. }
  75. /* ------------------------------------------------------------------------- */