asm-offsets.c 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
  3. *
  4. * This program is used to generate definitions needed by
  5. * assembly language modules.
  6. *
  7. * We use the technique used in the OSF Mach kernel code:
  8. * generate asm statements containing #defines,
  9. * compile this file to assembler, and then extract the
  10. * #defines from the assembly-language output.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License
  14. * as published by the Free Software Foundation; either version
  15. * 2 of the License, or (at your option) any later version.
  16. */
  17. #include <common.h>
  18. #include <asm/arch/imx-regs.h>
  19. #include <linux/kbuild.h>
  20. int main(void)
  21. {
  22. /* Round up to make sure size gives nice stack alignment */
  23. DEFINE(CLKCTL_CCMR, offsetof(struct clkctl, ccr));
  24. DEFINE(CLKCTL_CCDR, offsetof(struct clkctl, ccdr));
  25. DEFINE(CLKCTL_CSR, offsetof(struct clkctl, csr));
  26. DEFINE(CLKCTL_CCSR, offsetof(struct clkctl, ccsr));
  27. DEFINE(CLKCTL_CACRR, offsetof(struct clkctl, cacrr));
  28. DEFINE(CLKCTL_CBCDR, offsetof(struct clkctl, cbcdr));
  29. DEFINE(CLKCTL_CBCMR, offsetof(struct clkctl, cbcmr));
  30. DEFINE(CLKCTL_CSCMR1, offsetof(struct clkctl, cscmr1));
  31. DEFINE(CLKCTL_CSCMR2, offsetof(struct clkctl, cscmr2));
  32. DEFINE(CLKCTL_CSCDR1, offsetof(struct clkctl, cscdr1));
  33. DEFINE(CLKCTL_CS1CDR, offsetof(struct clkctl, cs1cdr));
  34. DEFINE(CLKCTL_CS2CDR, offsetof(struct clkctl, cs2cdr));
  35. DEFINE(CLKCTL_CDCDR, offsetof(struct clkctl, cdcdr));
  36. DEFINE(CLKCTL_CHSCCDR, offsetof(struct clkctl, chsccdr));
  37. DEFINE(CLKCTL_CSCDR2, offsetof(struct clkctl, cscdr2));
  38. DEFINE(CLKCTL_CSCDR3, offsetof(struct clkctl, cscdr3));
  39. DEFINE(CLKCTL_CSCDR4, offsetof(struct clkctl, cscdr4));
  40. DEFINE(CLKCTL_CWDR, offsetof(struct clkctl, cwdr));
  41. DEFINE(CLKCTL_CDHIPR, offsetof(struct clkctl, cdhipr));
  42. DEFINE(CLKCTL_CDCR, offsetof(struct clkctl, cdcr));
  43. DEFINE(CLKCTL_CTOR, offsetof(struct clkctl, ctor));
  44. DEFINE(CLKCTL_CLPCR, offsetof(struct clkctl, clpcr));
  45. DEFINE(CLKCTL_CISR, offsetof(struct clkctl, cisr));
  46. DEFINE(CLKCTL_CIMR, offsetof(struct clkctl, cimr));
  47. DEFINE(CLKCTL_CCOSR, offsetof(struct clkctl, ccosr));
  48. DEFINE(CLKCTL_CGPR, offsetof(struct clkctl, cgpr));
  49. DEFINE(CLKCTL_CCGR0, offsetof(struct clkctl, ccgr0));
  50. DEFINE(CLKCTL_CCGR1, offsetof(struct clkctl, ccgr1));
  51. DEFINE(CLKCTL_CCGR2, offsetof(struct clkctl, ccgr2));
  52. DEFINE(CLKCTL_CCGR3, offsetof(struct clkctl, ccgr3));
  53. DEFINE(CLKCTL_CCGR4, offsetof(struct clkctl, ccgr4));
  54. DEFINE(CLKCTL_CCGR5, offsetof(struct clkctl, ccgr5));
  55. DEFINE(CLKCTL_CCGR6, offsetof(struct clkctl, ccgr6));
  56. DEFINE(CLKCTL_CMEOR, offsetof(struct clkctl, cmeor));
  57. #if defined(CONFIG_MX53)
  58. DEFINE(CLKCTL_CCGR7, offsetof(struct clkctl, ccgr7));
  59. #endif
  60. /* DPLL */
  61. DEFINE(PLL_DP_CTL, offsetof(struct dpll, dp_ctl));
  62. DEFINE(PLL_DP_CONFIG, offsetof(struct dpll, dp_config));
  63. DEFINE(PLL_DP_OP, offsetof(struct dpll, dp_op));
  64. DEFINE(PLL_DP_MFD, offsetof(struct dpll, dp_mfd));
  65. DEFINE(PLL_DP_MFN, offsetof(struct dpll, dp_mfn));
  66. DEFINE(PLL_DP_HFS_OP, offsetof(struct dpll, dp_hfs_op));
  67. DEFINE(PLL_DP_HFS_MFD, offsetof(struct dpll, dp_hfs_mfd));
  68. DEFINE(PLL_DP_HFS_MFN, offsetof(struct dpll, dp_hfs_mfn));
  69. return 0;
  70. }