sdramtext.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * void sdramtext(const struct config_ram * config_ram);
  11. *
  12. * sdram.h
  13. *
  14. * print SDRAM configuration on stdout as an ASCII string; this
  15. * format is suitable input for Atheros Windows Device Manager;
  16. *
  17. * Contributor(s):
  18. * Charles Maier <cmaier@qca.qualcomm.com>
  19. *
  20. *--------------------------------------------------------------------*/
  21. #ifndef SDRAMTEXT_SOURCE
  22. #define SDRAMTEXT_SOURCE
  23. #include <stdio.h>
  24. #include <unistd.h>
  25. #include "../ram/sdram.h"
  26. #include "../tools/memory.h"
  27. void sdramtext (struct config_ram * config_ram)
  28. {
  29. printf ("%08X", htonl (config_ram->SDRAMSIZE));
  30. printf ("%08X", htonl (config_ram->SDRAMCONF));
  31. printf ("%08X", htonl (config_ram->SDRAMTIM0));
  32. printf ("%08X", htonl (config_ram->SDRAMTIM1));
  33. printf ("%08X", htonl (config_ram->SDRAMCNTRL));
  34. printf ("%08X", htonl (config_ram->SDRAMREF));
  35. printf ("%08X", htonl (config_ram->MACCLOCK));
  36. printf ("%08X", htonl (config_ram->SDRAMRSVD));
  37. return;
  38. }
  39. #endif