bf548-ezkit.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 <netdev.h>
  10. #include <config.h>
  11. #include <command.h>
  12. #include <asm/blackfin.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. int checkboard(void)
  15. {
  16. printf("Board: ADI BF548 EZ-Kit board\n");
  17. printf(" Support: http://blackfin.uclinux.org/\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. #ifdef CONFIG_SMC911X
  69. int board_eth_init(bd_t *bis)
  70. {
  71. return smc911x_initialize(0, CONFIG_SMC911X_BASE);
  72. }
  73. #endif