blackstamp.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. phys_size_t initdram(int board_type)
  24. {
  25. gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
  26. gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
  27. return gd->bd->bi_memsize;
  28. }
  29. #ifdef SHARED_RESOURCES
  30. void swap_to(int device_id)
  31. {
  32. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
  33. SSYNC();
  34. if (device_id == ETHERNET)
  35. bfin_write_FIO_FLAG_S(PF0);
  36. else if (device_id == FLASH)
  37. bfin_write_FIO_FLAG_C(PF0);
  38. else
  39. printf("Unknown device to switch\n");
  40. SSYNC();
  41. }
  42. #endif
  43. #ifdef CONFIG_SMC91111
  44. int board_eth_init(bd_t *bis)
  45. {
  46. return smc91111_initialize(0, CONFIG_SMC91111_BASE);
  47. }
  48. #endif