bf609-ezkit.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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/sdh.h>
  13. #include <asm/portmux.h>
  14. #include "soft_switch.h"
  15. int checkboard(void)
  16. {
  17. printf("Board: ADI BF609 EZ-Kit board\n");
  18. printf(" Support: http://blackfin.uclinux.org/\n");
  19. return 0;
  20. }
  21. int board_early_init_f(void)
  22. {
  23. static const unsigned short pins[] = {
  24. P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  25. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
  26. P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
  27. };
  28. peripheral_request_list(pins, "smc0");
  29. return 0;
  30. }
  31. #ifdef CONFIG_ETH_DESIGNWARE
  32. int board_eth_init(bd_t *bis)
  33. {
  34. int ret = 0;
  35. if (CONFIG_DW_PORTS & 1) {
  36. static const unsigned short pins[] = P_RMII0;
  37. if (!peripheral_request_list(pins, "emac0"))
  38. ret += designware_initialize(EMAC0_MACCFG, 0);
  39. }
  40. if (CONFIG_DW_PORTS & 2) {
  41. static const unsigned short pins[] = P_RMII1;
  42. if (!peripheral_request_list(pins, "emac1"))
  43. ret += designware_initialize(EMAC1_MACCFG, 0);
  44. }
  45. return ret;
  46. }
  47. #endif
  48. #ifdef CONFIG_BFIN_SDH
  49. int board_mmc_init(bd_t *bis)
  50. {
  51. return bfin_mmc_init(bis);
  52. }
  53. #endif
  54. /* miscellaneous platform dependent initialisations */
  55. int misc_init_r(void)
  56. {
  57. printf("other init\n");
  58. return setup_board_switches();
  59. }