asm-offsets.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. DEFINE(AIPI1_PSR0, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr0));
  23. DEFINE(AIPI1_PSR1, IMX_AIPI1_BASE + offsetof(struct aipi_regs, psr1));
  24. DEFINE(AIPI2_PSR0, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr0));
  25. DEFINE(AIPI2_PSR1, IMX_AIPI2_BASE + offsetof(struct aipi_regs, psr1));
  26. DEFINE(CSCR, IMX_PLL_BASE + offsetof(struct pll_regs, cscr));
  27. DEFINE(MPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, mpctl0));
  28. DEFINE(SPCTL0, IMX_PLL_BASE + offsetof(struct pll_regs, spctl0));
  29. DEFINE(PCDR0, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr0));
  30. DEFINE(PCDR1, IMX_PLL_BASE + offsetof(struct pll_regs, pcdr1));
  31. DEFINE(PCCR0, IMX_PLL_BASE + offsetof(struct pll_regs, pccr0));
  32. DEFINE(PCCR1, IMX_PLL_BASE + offsetof(struct pll_regs, pccr1));
  33. DEFINE(ESDCTL0_ROF, offsetof(struct esdramc_regs, esdctl0));
  34. DEFINE(ESDCFG0_ROF, offsetof(struct esdramc_regs, esdcfg0));
  35. DEFINE(ESDCTL1_ROF, offsetof(struct esdramc_regs, esdctl1));
  36. DEFINE(ESDCFG1_ROF, offsetof(struct esdramc_regs, esdcfg1));
  37. DEFINE(ESDMISC_ROF, offsetof(struct esdramc_regs, esdmisc));
  38. return 0;
  39. }