adciop.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 <netdev.h>
  25. #include "adciop.h"
  26. /* ------------------------------------------------------------------------- */
  27. #define _NOT_USED_ 0xFFFFFFFF
  28. /* ------------------------------------------------------------------------- */
  29. int board_early_init_f (void)
  30. {
  31. /*
  32. * Set port pin in escc2 to keep living, and configure user led output
  33. */
  34. *(unsigned char *) 0x2000033e = 0x77; /* ESCC2: PCR bit3=pwr on, bit7=led out */
  35. *(unsigned char *) 0x2000033c = 0x88; /* ESCC2: PVR pwr on, led off */
  36. /*
  37. * Init pci regs
  38. */
  39. *(unsigned long *) 0x50000304 = 0x02900007; /* enable mem/io/master bits */
  40. *(unsigned long *) 0x500001b4 = 0x00000000; /* disable pci interrupt output enable */
  41. *(unsigned long *) 0x50000354 = 0x00c05800; /* disable emun interrupt output enable */
  42. *(unsigned long *) 0x50000344 = 0x00000000; /* disable pme interrupt output enable */
  43. *(unsigned long *) 0x50000310 = 0x00000000; /* pcibar0 */
  44. *(unsigned long *) 0x50000314 = 0x00000000; /* pcibar1 */
  45. *(unsigned long *) 0x50000318 = 0x00000000; /* pcibar2 */
  46. return 0;
  47. }
  48. /*
  49. * Check Board Identity:
  50. */
  51. int checkboard (void)
  52. {
  53. char str[64];
  54. int i = getenv_r ("serial#", str, sizeof (str));
  55. puts ("Board: ");
  56. if (!i || strncmp (str, "ADCIOP", 6)) {
  57. puts ("### No HW ID - assuming ADCIOP\n");
  58. return (1);
  59. }
  60. puts (str);
  61. putc ('\n');
  62. return 0;
  63. }
  64. /* ------------------------------------------------------------------------- */
  65. phys_size_t initdram (int board_type)
  66. {
  67. return (16 * 1024 * 1024);
  68. }
  69. /* ------------------------------------------------------------------------- */
  70. int testdram (void)
  71. {
  72. /* TODO: XXX XXX XXX */
  73. printf ("test: 16 MB - ok\n");
  74. return (0);
  75. }
  76. /* ------------------------------------------------------------------------- */
  77. int board_eth_init(bd_t *bis)
  78. {
  79. return pci_eth_init(bis);
  80. }