bf561-ezkit.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * U-boot - ezkit561.c
  3. *
  4. * Copyright (c) 2005 Bas Vermeulen <bas@buyways.nl>
  5. * Copyright (c) 2005-2007 Analog Devices Inc.
  6. *
  7. * (C) Copyright 2000-2004
  8. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  9. *
  10. * See file CREDITS for list of people who contributed to this
  11. * project.
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation; either version 2 of
  16. * the License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  26. * MA 02110-1301 USA
  27. */
  28. #include <common.h>
  29. #include <asm/io.h>
  30. DECLARE_GLOBAL_DATA_PTR;
  31. int checkboard(void)
  32. {
  33. printf("CPU: ADSP BF561\n");
  34. printf("Board: ADI BF561 EZ-Kit Lite board\n");
  35. printf(" Support: http://blackfin.uclinux.org/\n");
  36. return 0;
  37. }
  38. long int initdram(int board_type)
  39. {
  40. #ifdef DEBUG
  41. int brate;
  42. char *tmp = getenv("baudrate");
  43. brate = simple_strtoul(tmp, NULL, 16);
  44. printf("Serial Port initialized with Baud rate = %x\n", brate);
  45. printf("SDRAM attributes:\n");
  46. printf("tRCD %d SCLK Cycles,tRP %d SCLK Cycles,tRAS %d SCLK Cycles"
  47. "tWR %d SCLK Cycles,CAS Latency %d SCLK cycles \n",
  48. 3, 3, 6, 2, 3);
  49. printf("SDRAM Begin: 0x%x\n", CFG_SDRAM_BASE);
  50. printf("Bank size = %d MB\n", CFG_MAX_RAM_SIZE >> 20);
  51. #endif
  52. gd->bd->bi_memstart = CFG_SDRAM_BASE;
  53. gd->bd->bi_memsize = CFG_MAX_RAM_SIZE;
  54. return CFG_MAX_RAM_SIZE;
  55. }
  56. #if defined(CONFIG_MISC_INIT_R)
  57. /* miscellaneous platform dependent initialisations */
  58. int misc_init_r(void)
  59. {
  60. /* Keep PF12 low to be able to drive the USB-LAN Extender */
  61. *pFIO0_DIR = 0x0000;
  62. *pFIO0_FLAG_C = 0x1000; /* Clear PF12 */
  63. sync();
  64. *pFIO0_POLAR = 0x0000;
  65. sync();
  66. return 0;
  67. }
  68. #endif