bf548-ezkit.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #include <asm/gpio.h>
  14. #include <asm/portmux.h>
  15. #include <asm/sdh.h>
  16. DECLARE_GLOBAL_DATA_PTR;
  17. int checkboard(void)
  18. {
  19. printf("Board: ADI BF548 EZ-Kit board\n");
  20. printf(" Support: http://blackfin.uclinux.org/\n");
  21. return 0;
  22. }
  23. int board_early_init_f(void)
  24. {
  25. /* Set async addr lines as peripheral */
  26. const unsigned short pins[] = {
  27. P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  28. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20,
  29. P_A21, P_A22, P_A23, P_A24, 0
  30. };
  31. return peripheral_request_list(pins, "async");
  32. }
  33. #ifdef CONFIG_SMC911X
  34. int board_eth_init(bd_t *bis)
  35. {
  36. return smc911x_initialize(0, CONFIG_SMC911X_BASE);
  37. }
  38. #endif
  39. #ifdef CONFIG_BFIN_SDH
  40. int board_mmc_init(bd_t *bis)
  41. {
  42. return bfin_mmc_init(bis);
  43. }
  44. #endif
  45. #ifdef CONFIG_USB_BLACKFIN
  46. void board_musb_init(void)
  47. {
  48. /*
  49. * Rev 1.0 BF549 EZ-KITs require PE7 to be high for both device
  50. * and OTG host modes, while rev 1.1 and greater require PE7 to
  51. * be low for device mode and high for host mode. We set it high
  52. * here because we are in host mode.
  53. */
  54. gpio_request(GPIO_PE7, "musb-vbus");
  55. gpio_direction_output(GPIO_PE7, 1);
  56. }
  57. #endif