bf609-ezkit.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * U-boot - main board file
  3. *
  4. * Copyright (c) 2008-2011 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #include <common.h>
  9. #include <netdev.h>
  10. #include <asm/blackfin.h>
  11. #include <asm/io.h>
  12. #include <asm/portmux.h>
  13. #include "soft_switch.h"
  14. int checkboard(void)
  15. {
  16. printf("Board: ADI BF609 EZ-Kit board\n");
  17. printf(" Support: http://blackfin.uclinux.org/\n");
  18. return 0;
  19. }
  20. int board_early_init_f(void)
  21. {
  22. static const unsigned short pins[] = {
  23. P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  24. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
  25. P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
  26. };
  27. peripheral_request_list(pins, "smc0");
  28. return 0;
  29. }
  30. #ifdef CONFIG_DESIGNWARE_ETH
  31. int board_eth_init(bd_t *bis)
  32. {
  33. int ret = 0;
  34. if (CONFIG_DW_PORTS & 1) {
  35. static const unsigned short pins[] = P_RMII0;
  36. if (!peripheral_request_list(pins, "emac0"))
  37. ret += designware_initialize(0, EMAC0_MACCFG, 1, 0);
  38. }
  39. if (CONFIG_DW_PORTS & 2) {
  40. static const unsigned short pins[] = P_RMII1;
  41. if (!peripheral_request_list(pins, "emac1"))
  42. ret += designware_initialize(1, EMAC1_MACCFG, 1, 0);
  43. }
  44. return ret;
  45. }
  46. #endif
  47. #ifdef CONFIG_BFIN_SDH
  48. int board_mmc_init(bd_t *bis)
  49. {
  50. return bfin_mmc_init(bis);
  51. }
  52. #endif
  53. /* miscellaneous platform dependent initialisations */
  54. int misc_init_r(void)
  55. {
  56. printf("other init\n");
  57. return setup_board_switches();
  58. }