cm-bf548.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. int board_early_init_f(void)
  21. {
  22. /* Port H: PH8 - PH13 == A4 - A9
  23. * address lines of the parallel asynchronous memory interface
  24. */
  25. /************************************************
  26. * configure GPIO *
  27. * set port H function enable register *
  28. * configure PH8-PH13 as peripheral (not GPIO) *
  29. *************************************************/
  30. bfin_write_PORTH_FER(0x3F03);
  31. /************************************************
  32. * set port H MUX to configure PH8-PH13 *
  33. * 1st Function (MUX = 00) (bits 16-27 == 0) *
  34. * Set to address signals A4-A9 *
  35. *************************************************/
  36. bfin_write_PORTH_MUX(0);
  37. /************************************************
  38. * set port H direction register *
  39. * enable PH8-PH13 as outputs *
  40. *************************************************/
  41. bfin_write_PORTH_DIR_SET(0x3F00);
  42. /* Port I: PI0 - PH14 == A10 - A24
  43. * address lines of the parallel asynchronous memory interface
  44. */
  45. /************************************************
  46. * set port I function enable register *
  47. * configure PI0-PI14 as peripheral (not GPIO) *
  48. *************************************************/
  49. bfin_write_PORTI_FER(0x7fff);
  50. /**************************************************
  51. * set PORT I MUX to configure PI14-PI0 as *
  52. * 1st Function (MUX=00) - address signals A10-A24 *
  53. ***************************************************/
  54. bfin_write_PORTI_MUX(0);
  55. /****************************************
  56. * set PORT I direction register *
  57. * enable PI0 - PI14 as outputs *
  58. *****************************************/
  59. bfin_write_PORTI_DIR_SET(0x7fff);
  60. return 0;
  61. }
  62. int board_eth_init(bd_t *bis)
  63. {
  64. int rc = 0;
  65. #ifdef CONFIG_SMC911X
  66. rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
  67. #endif
  68. return rc;
  69. }