sdrampeek.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * void sdrampeek(const struct config_ram * config_ram);
  11. *
  12. * sdram.h
  13. *
  14. * print SDRAM configuration on stdout in human-readable format;
  15. *
  16. * Contributor(s):
  17. * Charles Maier <cmaier@qca.qualcomm.com>
  18. *
  19. *--------------------------------------------------------------------*/
  20. #ifndef SDRAMPEEK_SOURCE
  21. #define SDRAMPEEK_SOURCE
  22. #include <stdio.h>
  23. #include "../ram/sdram.h"
  24. #include "../tools/memory.h"
  25. void sdrampeek (struct config_ram * config_ram)
  26. {
  27. printf ("\tSIZE=0x%08X (%dmb)\n", LE32TOH (config_ram->SDRAMSIZE), LE32TOH (config_ram->SDRAMSIZE) >> 20);
  28. printf ("\tCONF=0x%08X\n", LE32TOH (config_ram->SDRAMCONF));
  29. printf ("\tTIM0=0x%08X\n", LE32TOH (config_ram->SDRAMTIM0));
  30. printf ("\tTIM1=0x%08X\n", LE32TOH (config_ram->SDRAMTIM1));
  31. printf ("\tCNTRL=0x%08X\n", LE32TOH (config_ram->SDRAMCNTRL));
  32. printf ("\tREF=0x%08X\n", LE32TOH (config_ram->SDRAMREF));
  33. printf ("\tCLOCK=0x%08X\n", LE32TOH (config_ram->MACCLOCK));
  34. return;
  35. }
  36. #endif