blackstamp.c 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * U-boot - blackstamp.c BlackStamp board specific routines
  3. * Most code stolen from boards/bf533-stamp/bf533-stamp.c
  4. * Edited to the BlackStamp by Ben Matthews for UR LLE
  5. *
  6. * Copyright (c) 2005-2009 Analog Devices Inc.
  7. *
  8. * (C) Copyright 2000-2004
  9. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  10. *
  11. * Licensed under the GPL-2 or later.
  12. */
  13. #include <common.h>
  14. #include <netdev.h>
  15. #include <asm/io.h>
  16. DECLARE_GLOBAL_DATA_PTR;
  17. int checkboard(void)
  18. {
  19. printf("Board: BlackStamp\n");
  20. printf("Support: http://blackfin.uclinux.org/gf/project/blackstamp/\n");
  21. return 0;
  22. }
  23. #ifdef SHARED_RESOURCES
  24. void swap_to(int device_id)
  25. {
  26. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
  27. SSYNC();
  28. if (device_id == ETHERNET)
  29. bfin_write_FIO_FLAG_S(PF0);
  30. else if (device_id == FLASH)
  31. bfin_write_FIO_FLAG_C(PF0);
  32. else
  33. printf("Unknown device to switch\n");
  34. SSYNC();
  35. }
  36. #endif
  37. #ifdef CONFIG_SMC91111
  38. int board_eth_init(bd_t *bis)
  39. {
  40. return smc91111_initialize(0, CONFIG_SMC91111_BASE);
  41. }
  42. #endif