voiceblue.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * (C) Copyright 2005 2N TELEKOMUNIKACE, Ladislav Michl
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #include <common.h>
  22. #include <netdev.h>
  23. DECLARE_GLOBAL_DATA_PTR;
  24. int board_init(void)
  25. {
  26. *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0xaa;
  27. /* arch number of VoiceBlue board */
  28. gd->bd->bi_arch_number = MACH_TYPE_VOICEBLUE;
  29. /* adress of boot parameters */
  30. gd->bd->bi_boot_params = 0x10000100;
  31. return 0;
  32. }
  33. int dram_init(void)
  34. {
  35. *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0xff;
  36. /* Take the Ethernet controller out of reset and wait
  37. * for the EEPROM load to complete. */
  38. *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) |= 0x80;
  39. udelay(10); /* doesn't work before timer_init call */
  40. *((volatile unsigned short *) GPIO_DATA_OUTPUT_REG) &= ~0x80;
  41. udelay(500);
  42. gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
  43. gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
  44. return 0;
  45. }
  46. int misc_init_r(void)
  47. {
  48. *((volatile unsigned short *) VOICEBLUE_LED_REG) = 0x55;
  49. return 0;
  50. }
  51. int board_late_init(void)
  52. {
  53. *((volatile unsigned char *) VOICEBLUE_LED_REG) = 0x00;
  54. return 0;
  55. }
  56. #ifdef CONFIG_CMD_NET
  57. int board_eth_init(bd_t *bis)
  58. {
  59. int rc = 0;
  60. #ifdef CONFIG_SMC91111
  61. rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
  62. #endif
  63. return rc;
  64. }
  65. #endif