cm-bf548.c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * U-boot - main board file
  3. *
  4. * Copyright (c) 2005-2008 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #include <common.h>
  9. #include <config.h>
  10. #include <command.h>
  11. #include <netdev.h>
  12. #include <asm/blackfin.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. int checkboard(void)
  15. {
  16. printf("Board: Bluetechnix CM-BF548 board\n");
  17. printf(" Support: http://www.bluetechnix.at/\n");
  18. return 0;
  19. }
  20. phys_size_t initdram(int board_type)
  21. {
  22. gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
  23. gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
  24. return gd->bd->bi_memsize;
  25. }
  26. int board_early_init_f(void)
  27. {
  28. /* Port H: PH8 - PH13 == A4 - A9
  29. * address lines of the parallel asynchronous memory interface
  30. */
  31. /************************************************
  32. * configure GPIO *
  33. * set port H function enable register *
  34. * configure PH8-PH13 as peripheral (not GPIO) *
  35. *************************************************/
  36. bfin_write_PORTH_FER(0x3F03);
  37. /************************************************
  38. * set port H MUX to configure PH8-PH13 *
  39. * 1st Function (MUX = 00) (bits 16-27 == 0) *
  40. * Set to address signals A4-A9 *
  41. *************************************************/
  42. bfin_write_PORTH_MUX(0);
  43. /************************************************
  44. * set port H direction register *
  45. * enable PH8-PH13 as outputs *
  46. *************************************************/
  47. bfin_write_PORTH_DIR_SET(0x3F00);
  48. /* Port I: PI0 - PH14 == A10 - A24
  49. * address lines of the parallel asynchronous memory interface
  50. */
  51. /************************************************
  52. * set port I function enable register *
  53. * configure PI0-PI14 as peripheral (not GPIO) *
  54. *************************************************/
  55. bfin_write_PORTI_FER(0x7fff);
  56. /**************************************************
  57. * set PORT I MUX to configure PI14-PI0 as *
  58. * 1st Function (MUX=00) - address signals A10-A24 *
  59. ***************************************************/
  60. bfin_write_PORTI_MUX(0);
  61. /****************************************
  62. * set PORT I direction register *
  63. * enable PI0 - PI14 as outputs *
  64. *****************************************/
  65. bfin_write_PORTI_DIR_SET(0x7fff);
  66. return 0;
  67. }
  68. int board_eth_init(bd_t *bis)
  69. {
  70. int rc = 0;
  71. #ifdef CONFIG_SMC911X
  72. rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
  73. #endif
  74. return rc;
  75. }