Stefano Babic | 1c2b3ac | 2011-01-20 07:49:52 +0000 | [diff] [blame] | 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 | |
| 18 | #include <common.h> |
| 19 | #include <asm/arch/imx-regs.h> |
| 20 | |
| 21 | #include <linux/kbuild.h> |
| 22 | |
| 23 | int main(void) |
| 24 | { |
| 25 | |
| 26 | /* Round up to make sure size gives nice stack alignment */ |
| 27 | DEFINE(CLKCTL_CCMR, offsetof(struct ccm_regs, ccmr)); |
| 28 | DEFINE(CLKCTL_PDR0, offsetof(struct ccm_regs, pdr0)); |
| 29 | DEFINE(CLKCTL_PDR1, offsetof(struct ccm_regs, pdr1)); |
| 30 | DEFINE(CLKCTL_PDR2, offsetof(struct ccm_regs, pdr2)); |
| 31 | DEFINE(CLKCTL_PDR3, offsetof(struct ccm_regs, pdr3)); |
| 32 | DEFINE(CLKCTL_PDR4, offsetof(struct ccm_regs, pdr4)); |
| 33 | DEFINE(CLKCTL_RCSR, offsetof(struct ccm_regs, rcsr)); |
| 34 | DEFINE(CLKCTL_MPCTL, offsetof(struct ccm_regs, mpctl)); |
| 35 | DEFINE(CLKCTL_PPCTL, offsetof(struct ccm_regs, ppctl)); |
| 36 | DEFINE(CLKCTL_ACMR, offsetof(struct ccm_regs, acmr)); |
| 37 | DEFINE(CLKCTL_COSR, offsetof(struct ccm_regs, cosr)); |
| 38 | DEFINE(CLKCTL_CGR0, offsetof(struct ccm_regs, cgr0)); |
| 39 | DEFINE(CLKCTL_CGR1, offsetof(struct ccm_regs, cgr1)); |
| 40 | DEFINE(CLKCTL_CGR2, offsetof(struct ccm_regs, cgr2)); |
| 41 | |
| 42 | return 0; |
| 43 | } |