blackstamp.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <asm/io.h>
  15. DECLARE_GLOBAL_DATA_PTR;
  16. int checkboard(void)
  17. {
  18. printf("Board: BlackStamp\n");
  19. printf("Support: http://blackfin.uclinux.org/gf/project/blackstamp/\n");
  20. return 0;
  21. }
  22. phys_size_t initdram(int board_type)
  23. {
  24. gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
  25. gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
  26. return gd->bd->bi_memsize;
  27. }
  28. #ifdef SHARED_RESOURCES
  29. void swap_to(int device_id)
  30. {
  31. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
  32. SSYNC();
  33. if (device_id == ETHERNET)
  34. bfin_write_FIO_FLAG_S(PF0);
  35. else if (device_id == FLASH)
  36. bfin_write_FIO_FLAG_C(PF0);
  37. else
  38. printf("Unknown device to switch\n");
  39. SSYNC();
  40. }
  41. #endif